module Stratosphere.AppSync.GraphQLApi.UserPoolConfigProperty (
        UserPoolConfigProperty(..), mkUserPoolConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UserPoolConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-userpoolconfig.html>
    UserPoolConfigProperty {UserPoolConfigProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-userpoolconfig.html#cfn-appsync-graphqlapi-userpoolconfig-appidclientregex>
                            UserPoolConfigProperty -> Maybe (Value Text)
appIdClientRegex :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-userpoolconfig.html#cfn-appsync-graphqlapi-userpoolconfig-awsregion>
                            UserPoolConfigProperty -> Maybe (Value Text)
awsRegion :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-userpoolconfig.html#cfn-appsync-graphqlapi-userpoolconfig-defaultaction>
                            UserPoolConfigProperty -> Maybe (Value Text)
defaultAction :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-userpoolconfig.html#cfn-appsync-graphqlapi-userpoolconfig-userpoolid>
                            UserPoolConfigProperty -> Maybe (Value Text)
userPoolId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (UserPoolConfigProperty -> UserPoolConfigProperty -> Bool
(UserPoolConfigProperty -> UserPoolConfigProperty -> Bool)
-> (UserPoolConfigProperty -> UserPoolConfigProperty -> Bool)
-> Eq UserPoolConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UserPoolConfigProperty -> UserPoolConfigProperty -> Bool
== :: UserPoolConfigProperty -> UserPoolConfigProperty -> Bool
$c/= :: UserPoolConfigProperty -> UserPoolConfigProperty -> Bool
/= :: UserPoolConfigProperty -> UserPoolConfigProperty -> Bool
Prelude.Eq, Int -> UserPoolConfigProperty -> ShowS
[UserPoolConfigProperty] -> ShowS
UserPoolConfigProperty -> String
(Int -> UserPoolConfigProperty -> ShowS)
-> (UserPoolConfigProperty -> String)
-> ([UserPoolConfigProperty] -> ShowS)
-> Show UserPoolConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UserPoolConfigProperty -> ShowS
showsPrec :: Int -> UserPoolConfigProperty -> ShowS
$cshow :: UserPoolConfigProperty -> String
show :: UserPoolConfigProperty -> String
$cshowList :: [UserPoolConfigProperty] -> ShowS
showList :: [UserPoolConfigProperty] -> ShowS
Prelude.Show)
mkUserPoolConfigProperty :: UserPoolConfigProperty
mkUserPoolConfigProperty :: UserPoolConfigProperty
mkUserPoolConfigProperty
  = UserPoolConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), appIdClientRegex :: Maybe (Value Text)
appIdClientRegex = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       awsRegion :: Maybe (Value Text)
awsRegion = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, defaultAction :: Maybe (Value Text)
defaultAction = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       userPoolId :: Maybe (Value Text)
userPoolId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UserPoolConfigProperty where
  toResourceProperties :: UserPoolConfigProperty -> ResourceProperties
toResourceProperties UserPoolConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserPoolConfigProperty -> ()
appIdClientRegex :: UserPoolConfigProperty -> Maybe (Value Text)
awsRegion :: UserPoolConfigProperty -> Maybe (Value Text)
defaultAction :: UserPoolConfigProperty -> Maybe (Value Text)
userPoolId :: UserPoolConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppSync::GraphQLApi.UserPoolConfig",
         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
"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,
                            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
"AwsRegion" (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)
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..=) Key
"DefaultAction" (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)
defaultAction,
                            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
"UserPoolId" (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)
userPoolId])}
instance JSON.ToJSON UserPoolConfigProperty where
  toJSON :: UserPoolConfigProperty -> Value
toJSON UserPoolConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserPoolConfigProperty -> ()
appIdClientRegex :: UserPoolConfigProperty -> Maybe (Value Text)
awsRegion :: UserPoolConfigProperty -> Maybe (Value Text)
defaultAction :: UserPoolConfigProperty -> Maybe (Value Text)
userPoolId :: UserPoolConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
userPoolId :: 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
"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,
               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
"AwsRegion" (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)
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..=) Key
"DefaultAction" (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)
defaultAction,
               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
"UserPoolId" (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)
userPoolId]))
instance Property "AppIdClientRegex" UserPoolConfigProperty where
  type PropertyType "AppIdClientRegex" UserPoolConfigProperty = Value Prelude.Text
  set :: PropertyType "AppIdClientRegex" UserPoolConfigProperty
-> UserPoolConfigProperty -> UserPoolConfigProperty
set PropertyType "AppIdClientRegex" UserPoolConfigProperty
newValue UserPoolConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserPoolConfigProperty -> ()
appIdClientRegex :: UserPoolConfigProperty -> Maybe (Value Text)
awsRegion :: UserPoolConfigProperty -> Maybe (Value Text)
defaultAction :: UserPoolConfigProperty -> Maybe (Value Text)
userPoolId :: UserPoolConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
    = UserPoolConfigProperty
        {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" UserPoolConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
awsRegion :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
haddock_workaround_ :: ()
awsRegion :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
instance Property "AwsRegion" UserPoolConfigProperty where
  type PropertyType "AwsRegion" UserPoolConfigProperty = Value Prelude.Text
  set :: PropertyType "AwsRegion" UserPoolConfigProperty
-> UserPoolConfigProperty -> UserPoolConfigProperty
set PropertyType "AwsRegion" UserPoolConfigProperty
newValue UserPoolConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserPoolConfigProperty -> ()
appIdClientRegex :: UserPoolConfigProperty -> Maybe (Value Text)
awsRegion :: UserPoolConfigProperty -> Maybe (Value Text)
defaultAction :: UserPoolConfigProperty -> Maybe (Value Text)
userPoolId :: UserPoolConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
    = UserPoolConfigProperty {awsRegion :: Maybe (Value Text)
awsRegion = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AwsRegion" UserPoolConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
instance Property "DefaultAction" UserPoolConfigProperty where
  type PropertyType "DefaultAction" UserPoolConfigProperty = Value Prelude.Text
  set :: PropertyType "DefaultAction" UserPoolConfigProperty
-> UserPoolConfigProperty -> UserPoolConfigProperty
set PropertyType "DefaultAction" UserPoolConfigProperty
newValue UserPoolConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserPoolConfigProperty -> ()
appIdClientRegex :: UserPoolConfigProperty -> Maybe (Value Text)
awsRegion :: UserPoolConfigProperty -> Maybe (Value Text)
defaultAction :: UserPoolConfigProperty -> Maybe (Value Text)
userPoolId :: UserPoolConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
    = UserPoolConfigProperty
        {defaultAction :: Maybe (Value Text)
defaultAction = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultAction" UserPoolConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
instance Property "UserPoolId" UserPoolConfigProperty where
  type PropertyType "UserPoolId" UserPoolConfigProperty = Value Prelude.Text
  set :: PropertyType "UserPoolId" UserPoolConfigProperty
-> UserPoolConfigProperty -> UserPoolConfigProperty
set PropertyType "UserPoolId" UserPoolConfigProperty
newValue UserPoolConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserPoolConfigProperty -> ()
appIdClientRegex :: UserPoolConfigProperty -> Maybe (Value Text)
awsRegion :: UserPoolConfigProperty -> Maybe (Value Text)
defaultAction :: UserPoolConfigProperty -> Maybe (Value Text)
userPoolId :: UserPoolConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
    = UserPoolConfigProperty {userPoolId :: Maybe (Value Text)
userPoolId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UserPoolId" UserPoolConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
haddock_workaround_ :: ()
appIdClientRegex :: Maybe (Value Text)
awsRegion :: Maybe (Value Text)
defaultAction :: Maybe (Value Text)
..}