module Stratosphere.Cognito.UserPoolUser.AttributeTypeProperty (
AttributeTypeProperty(..), mkAttributeTypeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AttributeTypeProperty
=
AttributeTypeProperty {AttributeTypeProperty -> ()
haddock_workaround_ :: (),
AttributeTypeProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
AttributeTypeProperty -> Maybe (Value Text)
value :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (AttributeTypeProperty -> AttributeTypeProperty -> Bool
(AttributeTypeProperty -> AttributeTypeProperty -> Bool)
-> (AttributeTypeProperty -> AttributeTypeProperty -> Bool)
-> Eq AttributeTypeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AttributeTypeProperty -> AttributeTypeProperty -> Bool
== :: AttributeTypeProperty -> AttributeTypeProperty -> Bool
$c/= :: AttributeTypeProperty -> AttributeTypeProperty -> Bool
/= :: AttributeTypeProperty -> AttributeTypeProperty -> Bool
Prelude.Eq, Int -> AttributeTypeProperty -> ShowS
[AttributeTypeProperty] -> ShowS
AttributeTypeProperty -> String
(Int -> AttributeTypeProperty -> ShowS)
-> (AttributeTypeProperty -> String)
-> ([AttributeTypeProperty] -> ShowS)
-> Show AttributeTypeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AttributeTypeProperty -> ShowS
showsPrec :: Int -> AttributeTypeProperty -> ShowS
$cshow :: AttributeTypeProperty -> String
show :: AttributeTypeProperty -> String
$cshowList :: [AttributeTypeProperty] -> ShowS
showList :: [AttributeTypeProperty] -> ShowS
Prelude.Show)
mkAttributeTypeProperty :: AttributeTypeProperty
mkAttributeTypeProperty :: AttributeTypeProperty
mkAttributeTypeProperty
= AttributeTypeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
value :: Maybe (Value Text)
value = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AttributeTypeProperty where
toResourceProperties :: AttributeTypeProperty -> ResourceProperties
toResourceProperties AttributeTypeProperty {Maybe (Value Text)
()
haddock_workaround_ :: AttributeTypeProperty -> ()
name :: AttributeTypeProperty -> Maybe (Value Text)
value :: AttributeTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Cognito::UserPoolUser.AttributeType",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"Name" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
name,
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..=) Key
"Value" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
value])}
instance JSON.ToJSON AttributeTypeProperty where
toJSON :: AttributeTypeProperty -> Value
toJSON AttributeTypeProperty {Maybe (Value Text)
()
haddock_workaround_ :: AttributeTypeProperty -> ()
name :: AttributeTypeProperty -> Maybe (Value Text)
value :: AttributeTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"Name" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
name,
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..=) Key
"Value" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
value]))
instance Property "Name" AttributeTypeProperty where
type PropertyType "Name" AttributeTypeProperty = Value Prelude.Text
set :: PropertyType "Name" AttributeTypeProperty
-> AttributeTypeProperty -> AttributeTypeProperty
set PropertyType "Name" AttributeTypeProperty
newValue AttributeTypeProperty {Maybe (Value Text)
()
haddock_workaround_ :: AttributeTypeProperty -> ()
name :: AttributeTypeProperty -> Maybe (Value Text)
value :: AttributeTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= AttributeTypeProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" AttributeTypeProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
value :: Maybe (Value Text)
haddock_workaround_ :: ()
value :: Maybe (Value Text)
..}
instance Property "Value" AttributeTypeProperty where
type PropertyType "Value" AttributeTypeProperty = Value Prelude.Text
set :: PropertyType "Value" AttributeTypeProperty
-> AttributeTypeProperty -> AttributeTypeProperty
set PropertyType "Value" AttributeTypeProperty
newValue AttributeTypeProperty {Maybe (Value Text)
()
haddock_workaround_ :: AttributeTypeProperty -> ()
name :: AttributeTypeProperty -> Maybe (Value Text)
value :: AttributeTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= AttributeTypeProperty {value :: Maybe (Value Text)
value = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" AttributeTypeProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}