module Stratosphere.Cognito.IdentityPoolRoleAttachment.RoleMappingProperty (
        module Exports, RoleMappingProperty(..), mkRoleMappingProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Cognito.IdentityPoolRoleAttachment.RulesConfigurationTypeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RoleMappingProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html>
    RoleMappingProperty {RoleMappingProperty -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html#cfn-cognito-identitypoolroleattachment-rolemapping-ambiguousroleresolution>
                         RoleMappingProperty -> Maybe (Value Text)
ambiguousRoleResolution :: (Prelude.Maybe (Value Prelude.Text)),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html#cfn-cognito-identitypoolroleattachment-rolemapping-identityprovider>
                         RoleMappingProperty -> Maybe (Value Text)
identityProvider :: (Prelude.Maybe (Value Prelude.Text)),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html#cfn-cognito-identitypoolroleattachment-rolemapping-rulesconfiguration>
                         RoleMappingProperty -> Maybe RulesConfigurationTypeProperty
rulesConfiguration :: (Prelude.Maybe RulesConfigurationTypeProperty),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html#cfn-cognito-identitypoolroleattachment-rolemapping-type>
                         RoleMappingProperty -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (RoleMappingProperty -> RoleMappingProperty -> Bool
(RoleMappingProperty -> RoleMappingProperty -> Bool)
-> (RoleMappingProperty -> RoleMappingProperty -> Bool)
-> Eq RoleMappingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RoleMappingProperty -> RoleMappingProperty -> Bool
== :: RoleMappingProperty -> RoleMappingProperty -> Bool
$c/= :: RoleMappingProperty -> RoleMappingProperty -> Bool
/= :: RoleMappingProperty -> RoleMappingProperty -> Bool
Prelude.Eq, Int -> RoleMappingProperty -> ShowS
[RoleMappingProperty] -> ShowS
RoleMappingProperty -> String
(Int -> RoleMappingProperty -> ShowS)
-> (RoleMappingProperty -> String)
-> ([RoleMappingProperty] -> ShowS)
-> Show RoleMappingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RoleMappingProperty -> ShowS
showsPrec :: Int -> RoleMappingProperty -> ShowS
$cshow :: RoleMappingProperty -> String
show :: RoleMappingProperty -> String
$cshowList :: [RoleMappingProperty] -> ShowS
showList :: [RoleMappingProperty] -> ShowS
Prelude.Show)
mkRoleMappingProperty :: Value Prelude.Text -> RoleMappingProperty
mkRoleMappingProperty :: Value Text -> RoleMappingProperty
mkRoleMappingProperty Value Text
type'
  = RoleMappingProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type',
       ambiguousRoleResolution :: Maybe (Value Text)
ambiguousRoleResolution = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       identityProvider :: Maybe (Value Text)
identityProvider = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       rulesConfiguration :: Maybe RulesConfigurationTypeProperty
rulesConfiguration = Maybe RulesConfigurationTypeProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RoleMappingProperty where
  toResourceProperties :: RoleMappingProperty -> ResourceProperties
toResourceProperties RoleMappingProperty {Maybe (Value Text)
Maybe RulesConfigurationTypeProperty
()
Value Text
haddock_workaround_ :: RoleMappingProperty -> ()
ambiguousRoleResolution :: RoleMappingProperty -> Maybe (Value Text)
identityProvider :: RoleMappingProperty -> Maybe (Value Text)
rulesConfiguration :: RoleMappingProperty -> Maybe RulesConfigurationTypeProperty
type' :: RoleMappingProperty -> Value Text
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
identityProvider :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::IdentityPoolRoleAttachment.RoleMapping",
         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
"Type" 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
type']
                           ([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
"AmbiguousRoleResolution"
                                 (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)
ambiguousRoleResolution,
                               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
"IdentityProvider" (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)
identityProvider,
                               Key -> RulesConfigurationTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RulesConfiguration" (RulesConfigurationTypeProperty -> (Key, Value))
-> Maybe RulesConfigurationTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RulesConfigurationTypeProperty
rulesConfiguration]))}
instance JSON.ToJSON RoleMappingProperty where
  toJSON :: RoleMappingProperty -> Value
toJSON RoleMappingProperty {Maybe (Value Text)
Maybe RulesConfigurationTypeProperty
()
Value Text
haddock_workaround_ :: RoleMappingProperty -> ()
ambiguousRoleResolution :: RoleMappingProperty -> Maybe (Value Text)
identityProvider :: RoleMappingProperty -> Maybe (Value Text)
rulesConfiguration :: RoleMappingProperty -> Maybe RulesConfigurationTypeProperty
type' :: RoleMappingProperty -> Value Text
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
identityProvider :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
type' :: 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
"Type" 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
type']
              ([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
"AmbiguousRoleResolution"
                    (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)
ambiguousRoleResolution,
                  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
"IdentityProvider" (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)
identityProvider,
                  Key -> RulesConfigurationTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RulesConfiguration" (RulesConfigurationTypeProperty -> (Key, Value))
-> Maybe RulesConfigurationTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RulesConfigurationTypeProperty
rulesConfiguration])))
instance Property "AmbiguousRoleResolution" RoleMappingProperty where
  type PropertyType "AmbiguousRoleResolution" RoleMappingProperty = Value Prelude.Text
  set :: PropertyType "AmbiguousRoleResolution" RoleMappingProperty
-> RoleMappingProperty -> RoleMappingProperty
set PropertyType "AmbiguousRoleResolution" RoleMappingProperty
newValue RoleMappingProperty {Maybe (Value Text)
Maybe RulesConfigurationTypeProperty
()
Value Text
haddock_workaround_ :: RoleMappingProperty -> ()
ambiguousRoleResolution :: RoleMappingProperty -> Maybe (Value Text)
identityProvider :: RoleMappingProperty -> Maybe (Value Text)
rulesConfiguration :: RoleMappingProperty -> Maybe RulesConfigurationTypeProperty
type' :: RoleMappingProperty -> Value Text
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
identityProvider :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
type' :: Value Text
..}
    = RoleMappingProperty
        {ambiguousRoleResolution :: Maybe (Value Text)
ambiguousRoleResolution = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AmbiguousRoleResolution" RoleMappingProperty
Value Text
newValue, Maybe (Value Text)
Maybe RulesConfigurationTypeProperty
()
Value Text
haddock_workaround_ :: ()
identityProvider :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
type' :: Value Text
haddock_workaround_ :: ()
identityProvider :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
type' :: Value Text
..}
instance Property "IdentityProvider" RoleMappingProperty where
  type PropertyType "IdentityProvider" RoleMappingProperty = Value Prelude.Text
  set :: PropertyType "IdentityProvider" RoleMappingProperty
-> RoleMappingProperty -> RoleMappingProperty
set PropertyType "IdentityProvider" RoleMappingProperty
newValue RoleMappingProperty {Maybe (Value Text)
Maybe RulesConfigurationTypeProperty
()
Value Text
haddock_workaround_ :: RoleMappingProperty -> ()
ambiguousRoleResolution :: RoleMappingProperty -> Maybe (Value Text)
identityProvider :: RoleMappingProperty -> Maybe (Value Text)
rulesConfiguration :: RoleMappingProperty -> Maybe RulesConfigurationTypeProperty
type' :: RoleMappingProperty -> Value Text
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
identityProvider :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
type' :: Value Text
..}
    = RoleMappingProperty
        {identityProvider :: Maybe (Value Text)
identityProvider = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IdentityProvider" RoleMappingProperty
Value Text
newValue, Maybe (Value Text)
Maybe RulesConfigurationTypeProperty
()
Value Text
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
type' :: Value Text
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
type' :: Value Text
..}
instance Property "RulesConfiguration" RoleMappingProperty where
  type PropertyType "RulesConfiguration" RoleMappingProperty = RulesConfigurationTypeProperty
  set :: PropertyType "RulesConfiguration" RoleMappingProperty
-> RoleMappingProperty -> RoleMappingProperty
set PropertyType "RulesConfiguration" RoleMappingProperty
newValue RoleMappingProperty {Maybe (Value Text)
Maybe RulesConfigurationTypeProperty
()
Value Text
haddock_workaround_ :: RoleMappingProperty -> ()
ambiguousRoleResolution :: RoleMappingProperty -> Maybe (Value Text)
identityProvider :: RoleMappingProperty -> Maybe (Value Text)
rulesConfiguration :: RoleMappingProperty -> Maybe RulesConfigurationTypeProperty
type' :: RoleMappingProperty -> Value Text
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
identityProvider :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
type' :: Value Text
..}
    = RoleMappingProperty
        {rulesConfiguration :: Maybe RulesConfigurationTypeProperty
rulesConfiguration = RulesConfigurationTypeProperty
-> Maybe RulesConfigurationTypeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RulesConfiguration" RoleMappingProperty
RulesConfigurationTypeProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
identityProvider :: Maybe (Value Text)
type' :: Value Text
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
identityProvider :: Maybe (Value Text)
type' :: Value Text
..}
instance Property "Type" RoleMappingProperty where
  type PropertyType "Type" RoleMappingProperty = Value Prelude.Text
  set :: PropertyType "Type" RoleMappingProperty
-> RoleMappingProperty -> RoleMappingProperty
set PropertyType "Type" RoleMappingProperty
newValue RoleMappingProperty {Maybe (Value Text)
Maybe RulesConfigurationTypeProperty
()
Value Text
haddock_workaround_ :: RoleMappingProperty -> ()
ambiguousRoleResolution :: RoleMappingProperty -> Maybe (Value Text)
identityProvider :: RoleMappingProperty -> Maybe (Value Text)
rulesConfiguration :: RoleMappingProperty -> Maybe RulesConfigurationTypeProperty
type' :: RoleMappingProperty -> Value Text
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
identityProvider :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
type' :: Value Text
..}
    = RoleMappingProperty {type' :: Value Text
type' = PropertyType "Type" RoleMappingProperty
Value Text
newValue, Maybe (Value Text)
Maybe RulesConfigurationTypeProperty
()
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
identityProvider :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
haddock_workaround_ :: ()
ambiguousRoleResolution :: Maybe (Value Text)
identityProvider :: Maybe (Value Text)
rulesConfiguration :: Maybe RulesConfigurationTypeProperty
..}