module Stratosphere.IAM.User.LoginProfileProperty (
LoginProfileProperty(..), mkLoginProfileProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LoginProfileProperty
=
LoginProfileProperty {LoginProfileProperty -> ()
haddock_workaround_ :: (),
LoginProfileProperty -> Value Text
password :: (Value Prelude.Text),
LoginProfileProperty -> Maybe (Value Bool)
passwordResetRequired :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (LoginProfileProperty -> LoginProfileProperty -> Bool
(LoginProfileProperty -> LoginProfileProperty -> Bool)
-> (LoginProfileProperty -> LoginProfileProperty -> Bool)
-> Eq LoginProfileProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LoginProfileProperty -> LoginProfileProperty -> Bool
== :: LoginProfileProperty -> LoginProfileProperty -> Bool
$c/= :: LoginProfileProperty -> LoginProfileProperty -> Bool
/= :: LoginProfileProperty -> LoginProfileProperty -> Bool
Prelude.Eq, Int -> LoginProfileProperty -> ShowS
[LoginProfileProperty] -> ShowS
LoginProfileProperty -> String
(Int -> LoginProfileProperty -> ShowS)
-> (LoginProfileProperty -> String)
-> ([LoginProfileProperty] -> ShowS)
-> Show LoginProfileProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LoginProfileProperty -> ShowS
showsPrec :: Int -> LoginProfileProperty -> ShowS
$cshow :: LoginProfileProperty -> String
show :: LoginProfileProperty -> String
$cshowList :: [LoginProfileProperty] -> ShowS
showList :: [LoginProfileProperty] -> ShowS
Prelude.Show)
mkLoginProfileProperty ::
Value Prelude.Text -> LoginProfileProperty
mkLoginProfileProperty :: Value Text -> LoginProfileProperty
mkLoginProfileProperty Value Text
password
= LoginProfileProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), password :: Value Text
password = Value Text
password,
passwordResetRequired :: Maybe (Value Bool)
passwordResetRequired = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LoginProfileProperty where
toResourceProperties :: LoginProfileProperty -> ResourceProperties
toResourceProperties LoginProfileProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: LoginProfileProperty -> ()
password :: LoginProfileProperty -> Value Text
passwordResetRequired :: LoginProfileProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
password :: Value Text
passwordResetRequired :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IAM::User.LoginProfile",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Password" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
password]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PasswordResetRequired"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
passwordResetRequired]))}
instance JSON.ToJSON LoginProfileProperty where
toJSON :: LoginProfileProperty -> Value
toJSON LoginProfileProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: LoginProfileProperty -> ()
password :: LoginProfileProperty -> Value Text
passwordResetRequired :: LoginProfileProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
password :: Value Text
passwordResetRequired :: Maybe (Value Bool)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Password" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
password]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PasswordResetRequired"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
passwordResetRequired])))
instance Property "Password" LoginProfileProperty where
type PropertyType "Password" LoginProfileProperty = Value Prelude.Text
set :: PropertyType "Password" LoginProfileProperty
-> LoginProfileProperty -> LoginProfileProperty
set PropertyType "Password" LoginProfileProperty
newValue LoginProfileProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: LoginProfileProperty -> ()
password :: LoginProfileProperty -> Value Text
passwordResetRequired :: LoginProfileProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
password :: Value Text
passwordResetRequired :: Maybe (Value Bool)
..}
= LoginProfileProperty {password :: Value Text
password = PropertyType "Password" LoginProfileProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
passwordResetRequired :: Maybe (Value Bool)
haddock_workaround_ :: ()
passwordResetRequired :: Maybe (Value Bool)
..}
instance Property "PasswordResetRequired" LoginProfileProperty where
type PropertyType "PasswordResetRequired" LoginProfileProperty = Value Prelude.Bool
set :: PropertyType "PasswordResetRequired" LoginProfileProperty
-> LoginProfileProperty -> LoginProfileProperty
set PropertyType "PasswordResetRequired" LoginProfileProperty
newValue LoginProfileProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: LoginProfileProperty -> ()
password :: LoginProfileProperty -> Value Text
passwordResetRequired :: LoginProfileProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
password :: Value Text
passwordResetRequired :: Maybe (Value Bool)
..}
= LoginProfileProperty
{passwordResetRequired :: Maybe (Value Bool)
passwordResetRequired = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PasswordResetRequired" LoginProfileProperty
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
password :: Value Text
haddock_workaround_ :: ()
password :: Value Text
..}