module Stratosphere.Cognito.IdentityPoolRoleAttachment (
module Exports, IdentityPoolRoleAttachment(..),
mkIdentityPoolRoleAttachment
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Cognito.IdentityPoolRoleAttachment.RoleMappingProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IdentityPoolRoleAttachment
=
IdentityPoolRoleAttachment {IdentityPoolRoleAttachment -> ()
haddock_workaround_ :: (),
IdentityPoolRoleAttachment -> Value Text
identityPoolId :: (Value Prelude.Text),
IdentityPoolRoleAttachment -> Maybe (Map Text RoleMappingProperty)
roleMappings :: (Prelude.Maybe (Prelude.Map Prelude.Text RoleMappingProperty)),
IdentityPoolRoleAttachment -> Maybe (Map Text (Value Text))
roles :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
deriving stock (IdentityPoolRoleAttachment -> IdentityPoolRoleAttachment -> Bool
(IdentityPoolRoleAttachment -> IdentityPoolRoleAttachment -> Bool)
-> (IdentityPoolRoleAttachment
-> IdentityPoolRoleAttachment -> Bool)
-> Eq IdentityPoolRoleAttachment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IdentityPoolRoleAttachment -> IdentityPoolRoleAttachment -> Bool
== :: IdentityPoolRoleAttachment -> IdentityPoolRoleAttachment -> Bool
$c/= :: IdentityPoolRoleAttachment -> IdentityPoolRoleAttachment -> Bool
/= :: IdentityPoolRoleAttachment -> IdentityPoolRoleAttachment -> Bool
Prelude.Eq, Int -> IdentityPoolRoleAttachment -> ShowS
[IdentityPoolRoleAttachment] -> ShowS
IdentityPoolRoleAttachment -> String
(Int -> IdentityPoolRoleAttachment -> ShowS)
-> (IdentityPoolRoleAttachment -> String)
-> ([IdentityPoolRoleAttachment] -> ShowS)
-> Show IdentityPoolRoleAttachment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IdentityPoolRoleAttachment -> ShowS
showsPrec :: Int -> IdentityPoolRoleAttachment -> ShowS
$cshow :: IdentityPoolRoleAttachment -> String
show :: IdentityPoolRoleAttachment -> String
$cshowList :: [IdentityPoolRoleAttachment] -> ShowS
showList :: [IdentityPoolRoleAttachment] -> ShowS
Prelude.Show)
mkIdentityPoolRoleAttachment ::
Value Prelude.Text -> IdentityPoolRoleAttachment
mkIdentityPoolRoleAttachment :: Value Text -> IdentityPoolRoleAttachment
mkIdentityPoolRoleAttachment Value Text
identityPoolId
= IdentityPoolRoleAttachment
{haddock_workaround_ :: ()
haddock_workaround_ = (), identityPoolId :: Value Text
identityPoolId = Value Text
identityPoolId,
roleMappings :: Maybe (Map Text RoleMappingProperty)
roleMappings = Maybe (Map Text RoleMappingProperty)
forall a. Maybe a
Prelude.Nothing, roles :: Maybe (Map Text (Value Text))
roles = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IdentityPoolRoleAttachment where
toResourceProperties :: IdentityPoolRoleAttachment -> ResourceProperties
toResourceProperties IdentityPoolRoleAttachment {Maybe (Map Text (Value Text))
Maybe (Map Text RoleMappingProperty)
()
Value Text
haddock_workaround_ :: IdentityPoolRoleAttachment -> ()
identityPoolId :: IdentityPoolRoleAttachment -> Value Text
roleMappings :: IdentityPoolRoleAttachment -> Maybe (Map Text RoleMappingProperty)
roles :: IdentityPoolRoleAttachment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
identityPoolId :: Value Text
roleMappings :: Maybe (Map Text RoleMappingProperty)
roles :: Maybe (Map Text (Value Text))
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Cognito::IdentityPoolRoleAttachment",
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
"IdentityPoolId" 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
identityPoolId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Map Text RoleMappingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RoleMappings" (Map Text RoleMappingProperty -> (Key, Value))
-> Maybe (Map Text RoleMappingProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text RoleMappingProperty)
roleMappings,
Key -> Map Text (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
"Roles" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
roles]))}
instance JSON.ToJSON IdentityPoolRoleAttachment where
toJSON :: IdentityPoolRoleAttachment -> Value
toJSON IdentityPoolRoleAttachment {Maybe (Map Text (Value Text))
Maybe (Map Text RoleMappingProperty)
()
Value Text
haddock_workaround_ :: IdentityPoolRoleAttachment -> ()
identityPoolId :: IdentityPoolRoleAttachment -> Value Text
roleMappings :: IdentityPoolRoleAttachment -> Maybe (Map Text RoleMappingProperty)
roles :: IdentityPoolRoleAttachment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
identityPoolId :: Value Text
roleMappings :: Maybe (Map Text RoleMappingProperty)
roles :: Maybe (Map Text (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
"IdentityPoolId" 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
identityPoolId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Map Text RoleMappingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RoleMappings" (Map Text RoleMappingProperty -> (Key, Value))
-> Maybe (Map Text RoleMappingProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text RoleMappingProperty)
roleMappings,
Key -> Map Text (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
"Roles" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
roles])))
instance Property "IdentityPoolId" IdentityPoolRoleAttachment where
type PropertyType "IdentityPoolId" IdentityPoolRoleAttachment = Value Prelude.Text
set :: PropertyType "IdentityPoolId" IdentityPoolRoleAttachment
-> IdentityPoolRoleAttachment -> IdentityPoolRoleAttachment
set PropertyType "IdentityPoolId" IdentityPoolRoleAttachment
newValue IdentityPoolRoleAttachment {Maybe (Map Text (Value Text))
Maybe (Map Text RoleMappingProperty)
()
Value Text
haddock_workaround_ :: IdentityPoolRoleAttachment -> ()
identityPoolId :: IdentityPoolRoleAttachment -> Value Text
roleMappings :: IdentityPoolRoleAttachment -> Maybe (Map Text RoleMappingProperty)
roles :: IdentityPoolRoleAttachment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
identityPoolId :: Value Text
roleMappings :: Maybe (Map Text RoleMappingProperty)
roles :: Maybe (Map Text (Value Text))
..}
= IdentityPoolRoleAttachment {identityPoolId :: Value Text
identityPoolId = PropertyType "IdentityPoolId" IdentityPoolRoleAttachment
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (Map Text RoleMappingProperty)
()
haddock_workaround_ :: ()
roleMappings :: Maybe (Map Text RoleMappingProperty)
roles :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
roleMappings :: Maybe (Map Text RoleMappingProperty)
roles :: Maybe (Map Text (Value Text))
..}
instance Property "RoleMappings" IdentityPoolRoleAttachment where
type PropertyType "RoleMappings" IdentityPoolRoleAttachment = Prelude.Map Prelude.Text RoleMappingProperty
set :: PropertyType "RoleMappings" IdentityPoolRoleAttachment
-> IdentityPoolRoleAttachment -> IdentityPoolRoleAttachment
set PropertyType "RoleMappings" IdentityPoolRoleAttachment
newValue IdentityPoolRoleAttachment {Maybe (Map Text (Value Text))
Maybe (Map Text RoleMappingProperty)
()
Value Text
haddock_workaround_ :: IdentityPoolRoleAttachment -> ()
identityPoolId :: IdentityPoolRoleAttachment -> Value Text
roleMappings :: IdentityPoolRoleAttachment -> Maybe (Map Text RoleMappingProperty)
roles :: IdentityPoolRoleAttachment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
identityPoolId :: Value Text
roleMappings :: Maybe (Map Text RoleMappingProperty)
roles :: Maybe (Map Text (Value Text))
..}
= IdentityPoolRoleAttachment
{roleMappings :: Maybe (Map Text RoleMappingProperty)
roleMappings = Map Text RoleMappingProperty
-> Maybe (Map Text RoleMappingProperty)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text RoleMappingProperty
PropertyType "RoleMappings" IdentityPoolRoleAttachment
newValue, Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: ()
identityPoolId :: Value Text
roles :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
identityPoolId :: Value Text
roles :: Maybe (Map Text (Value Text))
..}
instance Property "Roles" IdentityPoolRoleAttachment where
type PropertyType "Roles" IdentityPoolRoleAttachment = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType "Roles" IdentityPoolRoleAttachment
-> IdentityPoolRoleAttachment -> IdentityPoolRoleAttachment
set PropertyType "Roles" IdentityPoolRoleAttachment
newValue IdentityPoolRoleAttachment {Maybe (Map Text (Value Text))
Maybe (Map Text RoleMappingProperty)
()
Value Text
haddock_workaround_ :: IdentityPoolRoleAttachment -> ()
identityPoolId :: IdentityPoolRoleAttachment -> Value Text
roleMappings :: IdentityPoolRoleAttachment -> Maybe (Map Text RoleMappingProperty)
roles :: IdentityPoolRoleAttachment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
identityPoolId :: Value Text
roleMappings :: Maybe (Map Text RoleMappingProperty)
roles :: Maybe (Map Text (Value Text))
..}
= IdentityPoolRoleAttachment {roles :: Maybe (Map Text (Value Text))
roles = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Roles" IdentityPoolRoleAttachment
newValue, Maybe (Map Text RoleMappingProperty)
()
Value Text
haddock_workaround_ :: ()
identityPoolId :: Value Text
roleMappings :: Maybe (Map Text RoleMappingProperty)
haddock_workaround_ :: ()
identityPoolId :: Value Text
roleMappings :: Maybe (Map Text RoleMappingProperty)
..}