module Stratosphere.VerifiedPermissions.IdentitySource (
        module Exports, IdentitySource(..), mkIdentitySource
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.VerifiedPermissions.IdentitySource.IdentitySourceConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IdentitySource
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-verifiedpermissions-identitysource.html>
    IdentitySource {IdentitySource -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-verifiedpermissions-identitysource.html#cfn-verifiedpermissions-identitysource-configuration>
                    IdentitySource -> IdentitySourceConfigurationProperty
configuration :: IdentitySourceConfigurationProperty,
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-verifiedpermissions-identitysource.html#cfn-verifiedpermissions-identitysource-policystoreid>
                    IdentitySource -> Value Text
policyStoreId :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-verifiedpermissions-identitysource.html#cfn-verifiedpermissions-identitysource-principalentitytype>
                    IdentitySource -> Maybe (Value Text)
principalEntityType :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (IdentitySource -> IdentitySource -> Bool
(IdentitySource -> IdentitySource -> Bool)
-> (IdentitySource -> IdentitySource -> Bool) -> Eq IdentitySource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IdentitySource -> IdentitySource -> Bool
== :: IdentitySource -> IdentitySource -> Bool
$c/= :: IdentitySource -> IdentitySource -> Bool
/= :: IdentitySource -> IdentitySource -> Bool
Prelude.Eq, Int -> IdentitySource -> ShowS
[IdentitySource] -> ShowS
IdentitySource -> String
(Int -> IdentitySource -> ShowS)
-> (IdentitySource -> String)
-> ([IdentitySource] -> ShowS)
-> Show IdentitySource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IdentitySource -> ShowS
showsPrec :: Int -> IdentitySource -> ShowS
$cshow :: IdentitySource -> String
show :: IdentitySource -> String
$cshowList :: [IdentitySource] -> ShowS
showList :: [IdentitySource] -> ShowS
Prelude.Show)
mkIdentitySource ::
  IdentitySourceConfigurationProperty
  -> Value Prelude.Text -> IdentitySource
mkIdentitySource :: IdentitySourceConfigurationProperty -> Value Text -> IdentitySource
mkIdentitySource IdentitySourceConfigurationProperty
configuration Value Text
policyStoreId
  = IdentitySource
      {haddock_workaround_ :: ()
haddock_workaround_ = (), configuration :: IdentitySourceConfigurationProperty
configuration = IdentitySourceConfigurationProperty
configuration,
       policyStoreId :: Value Text
policyStoreId = Value Text
policyStoreId,
       principalEntityType :: Maybe (Value Text)
principalEntityType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IdentitySource where
  toResourceProperties :: IdentitySource -> ResourceProperties
toResourceProperties IdentitySource {Maybe (Value Text)
()
Value Text
IdentitySourceConfigurationProperty
haddock_workaround_ :: IdentitySource -> ()
configuration :: IdentitySource -> IdentitySourceConfigurationProperty
policyStoreId :: IdentitySource -> Value Text
principalEntityType :: IdentitySource -> Maybe (Value Text)
haddock_workaround_ :: ()
configuration :: IdentitySourceConfigurationProperty
policyStoreId :: Value Text
principalEntityType :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::VerifiedPermissions::IdentitySource",
         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
"Configuration" Key -> IdentitySourceConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= IdentitySourceConfigurationProperty
configuration,
                            Key
"PolicyStoreId" 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
policyStoreId]
                           ([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
"PrincipalEntityType"
                                 (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)
principalEntityType]))}
instance JSON.ToJSON IdentitySource where
  toJSON :: IdentitySource -> Value
toJSON IdentitySource {Maybe (Value Text)
()
Value Text
IdentitySourceConfigurationProperty
haddock_workaround_ :: IdentitySource -> ()
configuration :: IdentitySource -> IdentitySourceConfigurationProperty
policyStoreId :: IdentitySource -> Value Text
principalEntityType :: IdentitySource -> Maybe (Value Text)
haddock_workaround_ :: ()
configuration :: IdentitySourceConfigurationProperty
policyStoreId :: Value Text
principalEntityType :: Maybe (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
"Configuration" Key -> IdentitySourceConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= IdentitySourceConfigurationProperty
configuration,
               Key
"PolicyStoreId" 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
policyStoreId]
              ([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
"PrincipalEntityType"
                    (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)
principalEntityType])))
instance Property "Configuration" IdentitySource where
  type PropertyType "Configuration" IdentitySource = IdentitySourceConfigurationProperty
  set :: PropertyType "Configuration" IdentitySource
-> IdentitySource -> IdentitySource
set PropertyType "Configuration" IdentitySource
newValue IdentitySource {Maybe (Value Text)
()
Value Text
IdentitySourceConfigurationProperty
haddock_workaround_ :: IdentitySource -> ()
configuration :: IdentitySource -> IdentitySourceConfigurationProperty
policyStoreId :: IdentitySource -> Value Text
principalEntityType :: IdentitySource -> Maybe (Value Text)
haddock_workaround_ :: ()
configuration :: IdentitySourceConfigurationProperty
policyStoreId :: Value Text
principalEntityType :: Maybe (Value Text)
..}
    = IdentitySource {configuration :: IdentitySourceConfigurationProperty
configuration = PropertyType "Configuration" IdentitySource
IdentitySourceConfigurationProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
policyStoreId :: Value Text
principalEntityType :: Maybe (Value Text)
haddock_workaround_ :: ()
policyStoreId :: Value Text
principalEntityType :: Maybe (Value Text)
..}
instance Property "PolicyStoreId" IdentitySource where
  type PropertyType "PolicyStoreId" IdentitySource = Value Prelude.Text
  set :: PropertyType "PolicyStoreId" IdentitySource
-> IdentitySource -> IdentitySource
set PropertyType "PolicyStoreId" IdentitySource
newValue IdentitySource {Maybe (Value Text)
()
Value Text
IdentitySourceConfigurationProperty
haddock_workaround_ :: IdentitySource -> ()
configuration :: IdentitySource -> IdentitySourceConfigurationProperty
policyStoreId :: IdentitySource -> Value Text
principalEntityType :: IdentitySource -> Maybe (Value Text)
haddock_workaround_ :: ()
configuration :: IdentitySourceConfigurationProperty
policyStoreId :: Value Text
principalEntityType :: Maybe (Value Text)
..}
    = IdentitySource {policyStoreId :: Value Text
policyStoreId = PropertyType "PolicyStoreId" IdentitySource
Value Text
newValue, Maybe (Value Text)
()
IdentitySourceConfigurationProperty
haddock_workaround_ :: ()
configuration :: IdentitySourceConfigurationProperty
principalEntityType :: Maybe (Value Text)
haddock_workaround_ :: ()
configuration :: IdentitySourceConfigurationProperty
principalEntityType :: Maybe (Value Text)
..}
instance Property "PrincipalEntityType" IdentitySource where
  type PropertyType "PrincipalEntityType" IdentitySource = Value Prelude.Text
  set :: PropertyType "PrincipalEntityType" IdentitySource
-> IdentitySource -> IdentitySource
set PropertyType "PrincipalEntityType" IdentitySource
newValue IdentitySource {Maybe (Value Text)
()
Value Text
IdentitySourceConfigurationProperty
haddock_workaround_ :: IdentitySource -> ()
configuration :: IdentitySource -> IdentitySourceConfigurationProperty
policyStoreId :: IdentitySource -> Value Text
principalEntityType :: IdentitySource -> Maybe (Value Text)
haddock_workaround_ :: ()
configuration :: IdentitySourceConfigurationProperty
policyStoreId :: Value Text
principalEntityType :: Maybe (Value Text)
..}
    = IdentitySource {principalEntityType :: Maybe (Value Text)
principalEntityType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PrincipalEntityType" IdentitySource
Value Text
newValue, ()
Value Text
IdentitySourceConfigurationProperty
haddock_workaround_ :: ()
configuration :: IdentitySourceConfigurationProperty
policyStoreId :: Value Text
haddock_workaround_ :: ()
configuration :: IdentitySourceConfigurationProperty
policyStoreId :: Value Text
..}