module Stratosphere.DataZone.PolicyGrant (
        module Exports, PolicyGrant(..), mkPolicyGrant
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.DataZone.PolicyGrant.PolicyGrantDetailProperty as Exports
import {-# SOURCE #-} Stratosphere.DataZone.PolicyGrant.PolicyGrantPrincipalProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PolicyGrant
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-policygrant.html>
    PolicyGrant {PolicyGrant -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-policygrant.html#cfn-datazone-policygrant-detail>
                 PolicyGrant -> Maybe PolicyGrantDetailProperty
detail :: (Prelude.Maybe PolicyGrantDetailProperty),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-policygrant.html#cfn-datazone-policygrant-domainidentifier>
                 PolicyGrant -> Value Text
domainIdentifier :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-policygrant.html#cfn-datazone-policygrant-entityidentifier>
                 PolicyGrant -> Value Text
entityIdentifier :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-policygrant.html#cfn-datazone-policygrant-entitytype>
                 PolicyGrant -> Value Text
entityType :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-policygrant.html#cfn-datazone-policygrant-policytype>
                 PolicyGrant -> Value Text
policyType :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-policygrant.html#cfn-datazone-policygrant-principal>
                 PolicyGrant -> Maybe PolicyGrantPrincipalProperty
principal :: (Prelude.Maybe PolicyGrantPrincipalProperty)}
  deriving stock (PolicyGrant -> PolicyGrant -> Bool
(PolicyGrant -> PolicyGrant -> Bool)
-> (PolicyGrant -> PolicyGrant -> Bool) -> Eq PolicyGrant
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyGrant -> PolicyGrant -> Bool
== :: PolicyGrant -> PolicyGrant -> Bool
$c/= :: PolicyGrant -> PolicyGrant -> Bool
/= :: PolicyGrant -> PolicyGrant -> Bool
Prelude.Eq, Int -> PolicyGrant -> ShowS
[PolicyGrant] -> ShowS
PolicyGrant -> String
(Int -> PolicyGrant -> ShowS)
-> (PolicyGrant -> String)
-> ([PolicyGrant] -> ShowS)
-> Show PolicyGrant
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyGrant -> ShowS
showsPrec :: Int -> PolicyGrant -> ShowS
$cshow :: PolicyGrant -> String
show :: PolicyGrant -> String
$cshowList :: [PolicyGrant] -> ShowS
showList :: [PolicyGrant] -> ShowS
Prelude.Show)
mkPolicyGrant ::
  Value Prelude.Text
  -> Value Prelude.Text
     -> Value Prelude.Text -> Value Prelude.Text -> PolicyGrant
mkPolicyGrant :: Value Text -> Value Text -> Value Text -> Value Text -> PolicyGrant
mkPolicyGrant
  Value Text
domainIdentifier
  Value Text
entityIdentifier
  Value Text
entityType
  Value Text
policyType
  = PolicyGrant
      {haddock_workaround_ :: ()
haddock_workaround_ = (), domainIdentifier :: Value Text
domainIdentifier = Value Text
domainIdentifier,
       entityIdentifier :: Value Text
entityIdentifier = Value Text
entityIdentifier, entityType :: Value Text
entityType = Value Text
entityType,
       policyType :: Value Text
policyType = Value Text
policyType, detail :: Maybe PolicyGrantDetailProperty
detail = Maybe PolicyGrantDetailProperty
forall a. Maybe a
Prelude.Nothing,
       principal :: Maybe PolicyGrantPrincipalProperty
principal = Maybe PolicyGrantPrincipalProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PolicyGrant where
  toResourceProperties :: PolicyGrant -> ResourceProperties
toResourceProperties PolicyGrant {Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: PolicyGrant -> ()
detail :: PolicyGrant -> Maybe PolicyGrantDetailProperty
domainIdentifier :: PolicyGrant -> Value Text
entityIdentifier :: PolicyGrant -> Value Text
entityType :: PolicyGrant -> Value Text
policyType :: PolicyGrant -> Value Text
principal :: PolicyGrant -> Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataZone::PolicyGrant",
         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
"DomainIdentifier" 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
domainIdentifier,
                            Key
"EntityIdentifier" 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
entityIdentifier,
                            Key
"EntityType" 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
entityType, Key
"PolicyType" 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
policyType]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> PolicyGrantDetailProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Detail" (PolicyGrantDetailProperty -> (Key, Value))
-> Maybe PolicyGrantDetailProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PolicyGrantDetailProperty
detail,
                               Key -> PolicyGrantPrincipalProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Principal" (PolicyGrantPrincipalProperty -> (Key, Value))
-> Maybe PolicyGrantPrincipalProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PolicyGrantPrincipalProperty
principal]))}
instance JSON.ToJSON PolicyGrant where
  toJSON :: PolicyGrant -> Value
toJSON PolicyGrant {Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: PolicyGrant -> ()
detail :: PolicyGrant -> Maybe PolicyGrantDetailProperty
domainIdentifier :: PolicyGrant -> Value Text
entityIdentifier :: PolicyGrant -> Value Text
entityType :: PolicyGrant -> Value Text
policyType :: PolicyGrant -> Value Text
principal :: PolicyGrant -> Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
    = [(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
"DomainIdentifier" 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
domainIdentifier,
               Key
"EntityIdentifier" 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
entityIdentifier,
               Key
"EntityType" 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
entityType, Key
"PolicyType" 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
policyType]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> PolicyGrantDetailProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Detail" (PolicyGrantDetailProperty -> (Key, Value))
-> Maybe PolicyGrantDetailProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PolicyGrantDetailProperty
detail,
                  Key -> PolicyGrantPrincipalProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Principal" (PolicyGrantPrincipalProperty -> (Key, Value))
-> Maybe PolicyGrantPrincipalProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PolicyGrantPrincipalProperty
principal])))
instance Property "Detail" PolicyGrant where
  type PropertyType "Detail" PolicyGrant = PolicyGrantDetailProperty
  set :: PropertyType "Detail" PolicyGrant -> PolicyGrant -> PolicyGrant
set PropertyType "Detail" PolicyGrant
newValue PolicyGrant {Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: PolicyGrant -> ()
detail :: PolicyGrant -> Maybe PolicyGrantDetailProperty
domainIdentifier :: PolicyGrant -> Value Text
entityIdentifier :: PolicyGrant -> Value Text
entityType :: PolicyGrant -> Value Text
policyType :: PolicyGrant -> Value Text
principal :: PolicyGrant -> Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
    = PolicyGrant {detail :: Maybe PolicyGrantDetailProperty
detail = PolicyGrantDetailProperty -> Maybe PolicyGrantDetailProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Detail" PolicyGrant
PolicyGrantDetailProperty
newValue, Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: ()
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
instance Property "DomainIdentifier" PolicyGrant where
  type PropertyType "DomainIdentifier" PolicyGrant = Value Prelude.Text
  set :: PropertyType "DomainIdentifier" PolicyGrant
-> PolicyGrant -> PolicyGrant
set PropertyType "DomainIdentifier" PolicyGrant
newValue PolicyGrant {Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: PolicyGrant -> ()
detail :: PolicyGrant -> Maybe PolicyGrantDetailProperty
domainIdentifier :: PolicyGrant -> Value Text
entityIdentifier :: PolicyGrant -> Value Text
entityType :: PolicyGrant -> Value Text
policyType :: PolicyGrant -> Value Text
principal :: PolicyGrant -> Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
    = PolicyGrant {domainIdentifier :: Value Text
domainIdentifier = PropertyType "DomainIdentifier" PolicyGrant
Value Text
newValue, Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
instance Property "EntityIdentifier" PolicyGrant where
  type PropertyType "EntityIdentifier" PolicyGrant = Value Prelude.Text
  set :: PropertyType "EntityIdentifier" PolicyGrant
-> PolicyGrant -> PolicyGrant
set PropertyType "EntityIdentifier" PolicyGrant
newValue PolicyGrant {Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: PolicyGrant -> ()
detail :: PolicyGrant -> Maybe PolicyGrantDetailProperty
domainIdentifier :: PolicyGrant -> Value Text
entityIdentifier :: PolicyGrant -> Value Text
entityType :: PolicyGrant -> Value Text
policyType :: PolicyGrant -> Value Text
principal :: PolicyGrant -> Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
    = PolicyGrant {entityIdentifier :: Value Text
entityIdentifier = PropertyType "EntityIdentifier" PolicyGrant
Value Text
newValue, Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
instance Property "EntityType" PolicyGrant where
  type PropertyType "EntityType" PolicyGrant = Value Prelude.Text
  set :: PropertyType "EntityType" PolicyGrant -> PolicyGrant -> PolicyGrant
set PropertyType "EntityType" PolicyGrant
newValue PolicyGrant {Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: PolicyGrant -> ()
detail :: PolicyGrant -> Maybe PolicyGrantDetailProperty
domainIdentifier :: PolicyGrant -> Value Text
entityIdentifier :: PolicyGrant -> Value Text
entityType :: PolicyGrant -> Value Text
policyType :: PolicyGrant -> Value Text
principal :: PolicyGrant -> Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
    = PolicyGrant {entityType :: Value Text
entityType = PropertyType "EntityType" PolicyGrant
Value Text
newValue, Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
instance Property "PolicyType" PolicyGrant where
  type PropertyType "PolicyType" PolicyGrant = Value Prelude.Text
  set :: PropertyType "PolicyType" PolicyGrant -> PolicyGrant -> PolicyGrant
set PropertyType "PolicyType" PolicyGrant
newValue PolicyGrant {Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: PolicyGrant -> ()
detail :: PolicyGrant -> Maybe PolicyGrantDetailProperty
domainIdentifier :: PolicyGrant -> Value Text
entityIdentifier :: PolicyGrant -> Value Text
entityType :: PolicyGrant -> Value Text
policyType :: PolicyGrant -> Value Text
principal :: PolicyGrant -> Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
    = PolicyGrant {policyType :: Value Text
policyType = PropertyType "PolicyType" PolicyGrant
Value Text
newValue, Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
instance Property "Principal" PolicyGrant where
  type PropertyType "Principal" PolicyGrant = PolicyGrantPrincipalProperty
  set :: PropertyType "Principal" PolicyGrant -> PolicyGrant -> PolicyGrant
set PropertyType "Principal" PolicyGrant
newValue PolicyGrant {Maybe PolicyGrantDetailProperty
Maybe PolicyGrantPrincipalProperty
()
Value Text
haddock_workaround_ :: PolicyGrant -> ()
detail :: PolicyGrant -> Maybe PolicyGrantDetailProperty
domainIdentifier :: PolicyGrant -> Value Text
entityIdentifier :: PolicyGrant -> Value Text
entityType :: PolicyGrant -> Value Text
policyType :: PolicyGrant -> Value Text
principal :: PolicyGrant -> Maybe PolicyGrantPrincipalProperty
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
principal :: Maybe PolicyGrantPrincipalProperty
..}
    = PolicyGrant {principal :: Maybe PolicyGrantPrincipalProperty
principal = PolicyGrantPrincipalProperty -> Maybe PolicyGrantPrincipalProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Principal" PolicyGrant
PolicyGrantPrincipalProperty
newValue, Maybe PolicyGrantDetailProperty
()
Value Text
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
haddock_workaround_ :: ()
detail :: Maybe PolicyGrantDetailProperty
domainIdentifier :: Value Text
entityIdentifier :: Value Text
entityType :: Value Text
policyType :: Value Text
..}