module Stratosphere.VerifiedPermissions.IdentitySource.CognitoUserPoolConfigurationProperty (
        module Exports, CognitoUserPoolConfigurationProperty(..),
        mkCognitoUserPoolConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.VerifiedPermissions.IdentitySource.CognitoGroupConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CognitoUserPoolConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-verifiedpermissions-identitysource-cognitouserpoolconfiguration.html>
    CognitoUserPoolConfigurationProperty {CognitoUserPoolConfigurationProperty -> ()
haddock_workaround_ :: (),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-verifiedpermissions-identitysource-cognitouserpoolconfiguration.html#cfn-verifiedpermissions-identitysource-cognitouserpoolconfiguration-clientids>
                                          CognitoUserPoolConfigurationProperty -> Maybe (ValueList Text)
clientIds :: (Prelude.Maybe (ValueList Prelude.Text)),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-verifiedpermissions-identitysource-cognitouserpoolconfiguration.html#cfn-verifiedpermissions-identitysource-cognitouserpoolconfiguration-groupconfiguration>
                                          CognitoUserPoolConfigurationProperty
-> Maybe CognitoGroupConfigurationProperty
groupConfiguration :: (Prelude.Maybe CognitoGroupConfigurationProperty),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-verifiedpermissions-identitysource-cognitouserpoolconfiguration.html#cfn-verifiedpermissions-identitysource-cognitouserpoolconfiguration-userpoolarn>
                                          CognitoUserPoolConfigurationProperty -> Value Text
userPoolArn :: (Value Prelude.Text)}
  deriving stock (CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty -> Bool
(CognitoUserPoolConfigurationProperty
 -> CognitoUserPoolConfigurationProperty -> Bool)
-> (CognitoUserPoolConfigurationProperty
    -> CognitoUserPoolConfigurationProperty -> Bool)
-> Eq CognitoUserPoolConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty -> Bool
== :: CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty -> Bool
$c/= :: CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty -> Bool
/= :: CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty -> Bool
Prelude.Eq, Int -> CognitoUserPoolConfigurationProperty -> ShowS
[CognitoUserPoolConfigurationProperty] -> ShowS
CognitoUserPoolConfigurationProperty -> String
(Int -> CognitoUserPoolConfigurationProperty -> ShowS)
-> (CognitoUserPoolConfigurationProperty -> String)
-> ([CognitoUserPoolConfigurationProperty] -> ShowS)
-> Show CognitoUserPoolConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CognitoUserPoolConfigurationProperty -> ShowS
showsPrec :: Int -> CognitoUserPoolConfigurationProperty -> ShowS
$cshow :: CognitoUserPoolConfigurationProperty -> String
show :: CognitoUserPoolConfigurationProperty -> String
$cshowList :: [CognitoUserPoolConfigurationProperty] -> ShowS
showList :: [CognitoUserPoolConfigurationProperty] -> ShowS
Prelude.Show)
mkCognitoUserPoolConfigurationProperty ::
  Value Prelude.Text -> CognitoUserPoolConfigurationProperty
mkCognitoUserPoolConfigurationProperty :: Value Text -> CognitoUserPoolConfigurationProperty
mkCognitoUserPoolConfigurationProperty Value Text
userPoolArn
  = CognitoUserPoolConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), userPoolArn :: Value Text
userPoolArn = Value Text
userPoolArn,
       clientIds :: Maybe (ValueList Text)
clientIds = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, groupConfiguration :: Maybe CognitoGroupConfigurationProperty
groupConfiguration = Maybe CognitoGroupConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CognitoUserPoolConfigurationProperty where
  toResourceProperties :: CognitoUserPoolConfigurationProperty -> ResourceProperties
toResourceProperties CognitoUserPoolConfigurationProperty {Maybe (ValueList Text)
Maybe CognitoGroupConfigurationProperty
()
Value Text
haddock_workaround_ :: CognitoUserPoolConfigurationProperty -> ()
clientIds :: CognitoUserPoolConfigurationProperty -> Maybe (ValueList Text)
groupConfiguration :: CognitoUserPoolConfigurationProperty
-> Maybe CognitoGroupConfigurationProperty
userPoolArn :: CognitoUserPoolConfigurationProperty -> Value Text
haddock_workaround_ :: ()
clientIds :: Maybe (ValueList Text)
groupConfiguration :: Maybe CognitoGroupConfigurationProperty
userPoolArn :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::VerifiedPermissions::IdentitySource.CognitoUserPoolConfiguration",
         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
"UserPoolArn" 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
userPoolArn]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ValueList 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
"ClientIds" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
clientIds,
                               Key -> CognitoGroupConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"GroupConfiguration" (CognitoGroupConfigurationProperty -> (Key, Value))
-> Maybe CognitoGroupConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CognitoGroupConfigurationProperty
groupConfiguration]))}
instance JSON.ToJSON CognitoUserPoolConfigurationProperty where
  toJSON :: CognitoUserPoolConfigurationProperty -> Value
toJSON CognitoUserPoolConfigurationProperty {Maybe (ValueList Text)
Maybe CognitoGroupConfigurationProperty
()
Value Text
haddock_workaround_ :: CognitoUserPoolConfigurationProperty -> ()
clientIds :: CognitoUserPoolConfigurationProperty -> Maybe (ValueList Text)
groupConfiguration :: CognitoUserPoolConfigurationProperty
-> Maybe CognitoGroupConfigurationProperty
userPoolArn :: CognitoUserPoolConfigurationProperty -> Value Text
haddock_workaround_ :: ()
clientIds :: Maybe (ValueList Text)
groupConfiguration :: Maybe CognitoGroupConfigurationProperty
userPoolArn :: 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
"UserPoolArn" 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
userPoolArn]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ValueList 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
"ClientIds" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
clientIds,
                  Key -> CognitoGroupConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"GroupConfiguration" (CognitoGroupConfigurationProperty -> (Key, Value))
-> Maybe CognitoGroupConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CognitoGroupConfigurationProperty
groupConfiguration])))
instance Property "ClientIds" CognitoUserPoolConfigurationProperty where
  type PropertyType "ClientIds" CognitoUserPoolConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "ClientIds" CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty
set PropertyType "ClientIds" CognitoUserPoolConfigurationProperty
newValue CognitoUserPoolConfigurationProperty {Maybe (ValueList Text)
Maybe CognitoGroupConfigurationProperty
()
Value Text
haddock_workaround_ :: CognitoUserPoolConfigurationProperty -> ()
clientIds :: CognitoUserPoolConfigurationProperty -> Maybe (ValueList Text)
groupConfiguration :: CognitoUserPoolConfigurationProperty
-> Maybe CognitoGroupConfigurationProperty
userPoolArn :: CognitoUserPoolConfigurationProperty -> Value Text
haddock_workaround_ :: ()
clientIds :: Maybe (ValueList Text)
groupConfiguration :: Maybe CognitoGroupConfigurationProperty
userPoolArn :: Value Text
..}
    = CognitoUserPoolConfigurationProperty
        {clientIds :: Maybe (ValueList Text)
clientIds = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ClientIds" CognitoUserPoolConfigurationProperty
ValueList Text
newValue, Maybe CognitoGroupConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
groupConfiguration :: Maybe CognitoGroupConfigurationProperty
userPoolArn :: Value Text
haddock_workaround_ :: ()
groupConfiguration :: Maybe CognitoGroupConfigurationProperty
userPoolArn :: Value Text
..}
instance Property "GroupConfiguration" CognitoUserPoolConfigurationProperty where
  type PropertyType "GroupConfiguration" CognitoUserPoolConfigurationProperty = CognitoGroupConfigurationProperty
  set :: PropertyType
  "GroupConfiguration" CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty
set PropertyType
  "GroupConfiguration" CognitoUserPoolConfigurationProperty
newValue CognitoUserPoolConfigurationProperty {Maybe (ValueList Text)
Maybe CognitoGroupConfigurationProperty
()
Value Text
haddock_workaround_ :: CognitoUserPoolConfigurationProperty -> ()
clientIds :: CognitoUserPoolConfigurationProperty -> Maybe (ValueList Text)
groupConfiguration :: CognitoUserPoolConfigurationProperty
-> Maybe CognitoGroupConfigurationProperty
userPoolArn :: CognitoUserPoolConfigurationProperty -> Value Text
haddock_workaround_ :: ()
clientIds :: Maybe (ValueList Text)
groupConfiguration :: Maybe CognitoGroupConfigurationProperty
userPoolArn :: Value Text
..}
    = CognitoUserPoolConfigurationProperty
        {groupConfiguration :: Maybe CognitoGroupConfigurationProperty
groupConfiguration = CognitoGroupConfigurationProperty
-> Maybe CognitoGroupConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "GroupConfiguration" CognitoUserPoolConfigurationProperty
CognitoGroupConfigurationProperty
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
clientIds :: Maybe (ValueList Text)
userPoolArn :: Value Text
haddock_workaround_ :: ()
clientIds :: Maybe (ValueList Text)
userPoolArn :: Value Text
..}
instance Property "UserPoolArn" CognitoUserPoolConfigurationProperty where
  type PropertyType "UserPoolArn" CognitoUserPoolConfigurationProperty = Value Prelude.Text
  set :: PropertyType "UserPoolArn" CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty
-> CognitoUserPoolConfigurationProperty
set PropertyType "UserPoolArn" CognitoUserPoolConfigurationProperty
newValue CognitoUserPoolConfigurationProperty {Maybe (ValueList Text)
Maybe CognitoGroupConfigurationProperty
()
Value Text
haddock_workaround_ :: CognitoUserPoolConfigurationProperty -> ()
clientIds :: CognitoUserPoolConfigurationProperty -> Maybe (ValueList Text)
groupConfiguration :: CognitoUserPoolConfigurationProperty
-> Maybe CognitoGroupConfigurationProperty
userPoolArn :: CognitoUserPoolConfigurationProperty -> Value Text
haddock_workaround_ :: ()
clientIds :: Maybe (ValueList Text)
groupConfiguration :: Maybe CognitoGroupConfigurationProperty
userPoolArn :: Value Text
..}
    = CognitoUserPoolConfigurationProperty {userPoolArn :: Value Text
userPoolArn = PropertyType "UserPoolArn" CognitoUserPoolConfigurationProperty
Value Text
newValue, Maybe (ValueList Text)
Maybe CognitoGroupConfigurationProperty
()
haddock_workaround_ :: ()
clientIds :: Maybe (ValueList Text)
groupConfiguration :: Maybe CognitoGroupConfigurationProperty
haddock_workaround_ :: ()
clientIds :: Maybe (ValueList Text)
groupConfiguration :: Maybe CognitoGroupConfigurationProperty
..}