module Stratosphere.AppSync.Api.CognitoConfigProperty (
CognitoConfigProperty(..), mkCognitoConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CognitoConfigProperty
=
CognitoConfigProperty {CognitoConfigProperty -> ()
haddock_workaround_ :: (),
CognitoConfigProperty -> Maybe (Value Text)
appIdClientRegex :: (Prelude.Maybe (Value Prelude.Text)),
CognitoConfigProperty -> Value Text
awsRegion :: (Value Prelude.Text),
CognitoConfigProperty -> Value Text
userPoolId :: (Value Prelude.Text)}
deriving stock (CognitoConfigProperty -> CognitoConfigProperty -> Bool
(CognitoConfigProperty -> CognitoConfigProperty -> Bool)
-> (CognitoConfigProperty -> CognitoConfigProperty -> Bool)
-> Eq CognitoConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CognitoConfigProperty -> CognitoConfigProperty -> Bool
== :: CognitoConfigProperty -> CognitoConfigProperty -> Bool
$c/= :: CognitoConfigProperty -> CognitoConfigProperty -> Bool
/= :: CognitoConfigProperty -> CognitoConfigProperty -> Bool
Prelude.Eq, Int -> CognitoConfigProperty -> ShowS
[CognitoConfigProperty] -> ShowS
CognitoConfigProperty -> String
(Int -> CognitoConfigProperty -> ShowS)
-> (CognitoConfigProperty -> String)
-> ([CognitoConfigProperty] -> ShowS)
-> Show CognitoConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CognitoConfigProperty -> ShowS
showsPrec :: Int -> CognitoConfigProperty -> ShowS
$cshow :: CognitoConfigProperty -> String
show :: CognitoConfigProperty -> String
$cshowList :: [CognitoConfigProperty] -> ShowS
showList :: [CognitoConfigProperty] -> ShowS
Prelude.Show)
mkCognitoConfigProperty ::
Value Prelude.Text -> Value Prelude.Text -> CognitoConfigProperty
mkCognitoConfigProperty :: Value Text -> Value Text -> CognitoConfigProperty
mkCognitoConfigProperty Value Text
awsRegion Value Text
userPoolId
= CognitoConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), awsRegion :: Value Text
awsRegion = Value Text
awsRegion,
userPoolId :: Value Text
userPoolId = Value Text
userPoolId, appIdClientRegex :: Maybe (Value Text)
appIdClientRegex = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CognitoConfigProperty where
toResourceProperties :: CognitoConfigProperty -> ResourceProperties
toResourceProperties CognitoConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CognitoConfigProperty -> ()
appIdClientRegex :: CognitoConfigProperty -> Maybe (Value Text)
awsRegion :: CognitoConfigProperty -> Value Text
userPoolId :: CognitoConfigProperty -> Value Text
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Value Text
userPoolId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppSync::Api.CognitoConfig",
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
"AwsRegion" 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
awsRegion, Key
"UserPoolId" 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
userPoolId]
([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
"AppIdClientRegex" (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)
appIdClientRegex]))}
instance JSON.ToJSON CognitoConfigProperty where
toJSON :: CognitoConfigProperty -> Value
toJSON CognitoConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CognitoConfigProperty -> ()
appIdClientRegex :: CognitoConfigProperty -> Maybe (Value Text)
awsRegion :: CognitoConfigProperty -> Value Text
userPoolId :: CognitoConfigProperty -> Value Text
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Value Text
userPoolId :: Value Text
..}
= [(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
"AwsRegion" 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
awsRegion, Key
"UserPoolId" 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
userPoolId]
([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
"AppIdClientRegex" (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)
appIdClientRegex])))
instance Property "AppIdClientRegex" CognitoConfigProperty where
type PropertyType "AppIdClientRegex" CognitoConfigProperty = Value Prelude.Text
set :: PropertyType "AppIdClientRegex" CognitoConfigProperty
-> CognitoConfigProperty -> CognitoConfigProperty
set PropertyType "AppIdClientRegex" CognitoConfigProperty
newValue CognitoConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CognitoConfigProperty -> ()
appIdClientRegex :: CognitoConfigProperty -> Maybe (Value Text)
awsRegion :: CognitoConfigProperty -> Value Text
userPoolId :: CognitoConfigProperty -> Value Text
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Value Text
userPoolId :: Value Text
..}
= CognitoConfigProperty
{appIdClientRegex :: Maybe (Value Text)
appIdClientRegex = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AppIdClientRegex" CognitoConfigProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
awsRegion :: Value Text
userPoolId :: Value Text
haddock_workaround_ :: ()
awsRegion :: Value Text
userPoolId :: Value Text
..}
instance Property "AwsRegion" CognitoConfigProperty where
type PropertyType "AwsRegion" CognitoConfigProperty = Value Prelude.Text
set :: PropertyType "AwsRegion" CognitoConfigProperty
-> CognitoConfigProperty -> CognitoConfigProperty
set PropertyType "AwsRegion" CognitoConfigProperty
newValue CognitoConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CognitoConfigProperty -> ()
appIdClientRegex :: CognitoConfigProperty -> Maybe (Value Text)
awsRegion :: CognitoConfigProperty -> Value Text
userPoolId :: CognitoConfigProperty -> Value Text
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Value Text
userPoolId :: Value Text
..}
= CognitoConfigProperty {awsRegion :: Value Text
awsRegion = PropertyType "AwsRegion" CognitoConfigProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
userPoolId :: Value Text
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
userPoolId :: Value Text
..}
instance Property "UserPoolId" CognitoConfigProperty where
type PropertyType "UserPoolId" CognitoConfigProperty = Value Prelude.Text
set :: PropertyType "UserPoolId" CognitoConfigProperty
-> CognitoConfigProperty -> CognitoConfigProperty
set PropertyType "UserPoolId" CognitoConfigProperty
newValue CognitoConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CognitoConfigProperty -> ()
appIdClientRegex :: CognitoConfigProperty -> Maybe (Value Text)
awsRegion :: CognitoConfigProperty -> Value Text
userPoolId :: CognitoConfigProperty -> Value Text
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Value Text
userPoolId :: Value Text
..}
= CognitoConfigProperty {userPoolId :: Value Text
userPoolId = PropertyType "UserPoolId" CognitoConfigProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Value Text
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Value Text
..}