module Stratosphere.VerifiedPermissions.PolicyStore (
        module Exports, PolicyStore(..), mkPolicyStore
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.VerifiedPermissions.PolicyStore.DeletionProtectionProperty as Exports
import {-# SOURCE #-} Stratosphere.VerifiedPermissions.PolicyStore.SchemaDefinitionProperty as Exports
import {-# SOURCE #-} Stratosphere.VerifiedPermissions.PolicyStore.ValidationSettingsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data PolicyStore
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-verifiedpermissions-policystore.html>
    PolicyStore {PolicyStore -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-verifiedpermissions-policystore.html#cfn-verifiedpermissions-policystore-deletionprotection>
                 PolicyStore -> Maybe DeletionProtectionProperty
deletionProtection :: (Prelude.Maybe DeletionProtectionProperty),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-verifiedpermissions-policystore.html#cfn-verifiedpermissions-policystore-description>
                 PolicyStore -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-verifiedpermissions-policystore.html#cfn-verifiedpermissions-policystore-schema>
                 PolicyStore -> Maybe SchemaDefinitionProperty
schema :: (Prelude.Maybe SchemaDefinitionProperty),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-verifiedpermissions-policystore.html#cfn-verifiedpermissions-policystore-tags>
                 PolicyStore -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-verifiedpermissions-policystore.html#cfn-verifiedpermissions-policystore-validationsettings>
                 PolicyStore -> ValidationSettingsProperty
validationSettings :: ValidationSettingsProperty}
  deriving stock (PolicyStore -> PolicyStore -> Bool
(PolicyStore -> PolicyStore -> Bool)
-> (PolicyStore -> PolicyStore -> Bool) -> Eq PolicyStore
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyStore -> PolicyStore -> Bool
== :: PolicyStore -> PolicyStore -> Bool
$c/= :: PolicyStore -> PolicyStore -> Bool
/= :: PolicyStore -> PolicyStore -> Bool
Prelude.Eq, Int -> PolicyStore -> ShowS
[PolicyStore] -> ShowS
PolicyStore -> String
(Int -> PolicyStore -> ShowS)
-> (PolicyStore -> String)
-> ([PolicyStore] -> ShowS)
-> Show PolicyStore
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyStore -> ShowS
showsPrec :: Int -> PolicyStore -> ShowS
$cshow :: PolicyStore -> String
show :: PolicyStore -> String
$cshowList :: [PolicyStore] -> ShowS
showList :: [PolicyStore] -> ShowS
Prelude.Show)
mkPolicyStore :: ValidationSettingsProperty -> PolicyStore
mkPolicyStore :: ValidationSettingsProperty -> PolicyStore
mkPolicyStore ValidationSettingsProperty
validationSettings
  = PolicyStore
      {haddock_workaround_ :: ()
haddock_workaround_ = (), validationSettings :: ValidationSettingsProperty
validationSettings = ValidationSettingsProperty
validationSettings,
       deletionProtection :: Maybe DeletionProtectionProperty
deletionProtection = Maybe DeletionProtectionProperty
forall a. Maybe a
Prelude.Nothing,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, schema :: Maybe SchemaDefinitionProperty
schema = Maybe SchemaDefinitionProperty
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PolicyStore where
  toResourceProperties :: PolicyStore -> ResourceProperties
toResourceProperties PolicyStore {Maybe [Tag]
Maybe (Value Text)
Maybe DeletionProtectionProperty
Maybe SchemaDefinitionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: PolicyStore -> ()
deletionProtection :: PolicyStore -> Maybe DeletionProtectionProperty
description :: PolicyStore -> Maybe (Value Text)
schema :: PolicyStore -> Maybe SchemaDefinitionProperty
tags :: PolicyStore -> Maybe [Tag]
validationSettings :: PolicyStore -> ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::VerifiedPermissions::PolicyStore",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"ValidationSettings" Key -> ValidationSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValidationSettingsProperty
validationSettings]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> DeletionProtectionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeletionProtection" (DeletionProtectionProperty -> (Key, Value))
-> Maybe DeletionProtectionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeletionProtectionProperty
deletionProtection,
                               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
"Description" (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)
description,
                               Key -> SchemaDefinitionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Schema" (SchemaDefinitionProperty -> (Key, Value))
-> Maybe SchemaDefinitionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SchemaDefinitionProperty
schema,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON PolicyStore where
  toJSON :: PolicyStore -> Value
toJSON PolicyStore {Maybe [Tag]
Maybe (Value Text)
Maybe DeletionProtectionProperty
Maybe SchemaDefinitionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: PolicyStore -> ()
deletionProtection :: PolicyStore -> Maybe DeletionProtectionProperty
description :: PolicyStore -> Maybe (Value Text)
schema :: PolicyStore -> Maybe SchemaDefinitionProperty
tags :: PolicyStore -> Maybe [Tag]
validationSettings :: PolicyStore -> ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
..}
    = [(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
"ValidationSettings" Key -> ValidationSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValidationSettingsProperty
validationSettings]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> DeletionProtectionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeletionProtection" (DeletionProtectionProperty -> (Key, Value))
-> Maybe DeletionProtectionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeletionProtectionProperty
deletionProtection,
                  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
"Description" (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)
description,
                  Key -> SchemaDefinitionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Schema" (SchemaDefinitionProperty -> (Key, Value))
-> Maybe SchemaDefinitionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SchemaDefinitionProperty
schema,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "DeletionProtection" PolicyStore where
  type PropertyType "DeletionProtection" PolicyStore = DeletionProtectionProperty
  set :: PropertyType "DeletionProtection" PolicyStore
-> PolicyStore -> PolicyStore
set PropertyType "DeletionProtection" PolicyStore
newValue PolicyStore {Maybe [Tag]
Maybe (Value Text)
Maybe DeletionProtectionProperty
Maybe SchemaDefinitionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: PolicyStore -> ()
deletionProtection :: PolicyStore -> Maybe DeletionProtectionProperty
description :: PolicyStore -> Maybe (Value Text)
schema :: PolicyStore -> Maybe SchemaDefinitionProperty
tags :: PolicyStore -> Maybe [Tag]
validationSettings :: PolicyStore -> ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
..}
    = PolicyStore {deletionProtection :: Maybe DeletionProtectionProperty
deletionProtection = DeletionProtectionProperty -> Maybe DeletionProtectionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeletionProtection" PolicyStore
DeletionProtectionProperty
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe SchemaDefinitionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
..}
instance Property "Description" PolicyStore where
  type PropertyType "Description" PolicyStore = Value Prelude.Text
  set :: PropertyType "Description" PolicyStore
-> PolicyStore -> PolicyStore
set PropertyType "Description" PolicyStore
newValue PolicyStore {Maybe [Tag]
Maybe (Value Text)
Maybe DeletionProtectionProperty
Maybe SchemaDefinitionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: PolicyStore -> ()
deletionProtection :: PolicyStore -> Maybe DeletionProtectionProperty
description :: PolicyStore -> Maybe (Value Text)
schema :: PolicyStore -> Maybe SchemaDefinitionProperty
tags :: PolicyStore -> Maybe [Tag]
validationSettings :: PolicyStore -> ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
..}
    = PolicyStore {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" PolicyStore
Value Text
newValue, Maybe [Tag]
Maybe DeletionProtectionProperty
Maybe SchemaDefinitionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
..}
instance Property "Schema" PolicyStore where
  type PropertyType "Schema" PolicyStore = SchemaDefinitionProperty
  set :: PropertyType "Schema" PolicyStore -> PolicyStore -> PolicyStore
set PropertyType "Schema" PolicyStore
newValue PolicyStore {Maybe [Tag]
Maybe (Value Text)
Maybe DeletionProtectionProperty
Maybe SchemaDefinitionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: PolicyStore -> ()
deletionProtection :: PolicyStore -> Maybe DeletionProtectionProperty
description :: PolicyStore -> Maybe (Value Text)
schema :: PolicyStore -> Maybe SchemaDefinitionProperty
tags :: PolicyStore -> Maybe [Tag]
validationSettings :: PolicyStore -> ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
..}
    = PolicyStore {schema :: Maybe SchemaDefinitionProperty
schema = SchemaDefinitionProperty -> Maybe SchemaDefinitionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Schema" PolicyStore
SchemaDefinitionProperty
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe DeletionProtectionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
..}
instance Property "Tags" PolicyStore where
  type PropertyType "Tags" PolicyStore = [Tag]
  set :: PropertyType "Tags" PolicyStore -> PolicyStore -> PolicyStore
set PropertyType "Tags" PolicyStore
newValue PolicyStore {Maybe [Tag]
Maybe (Value Text)
Maybe DeletionProtectionProperty
Maybe SchemaDefinitionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: PolicyStore -> ()
deletionProtection :: PolicyStore -> Maybe DeletionProtectionProperty
description :: PolicyStore -> Maybe (Value Text)
schema :: PolicyStore -> Maybe SchemaDefinitionProperty
tags :: PolicyStore -> Maybe [Tag]
validationSettings :: PolicyStore -> ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
..}
    = PolicyStore {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" PolicyStore
newValue, Maybe (Value Text)
Maybe DeletionProtectionProperty
Maybe SchemaDefinitionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
validationSettings :: ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
validationSettings :: ValidationSettingsProperty
..}
instance Property "ValidationSettings" PolicyStore where
  type PropertyType "ValidationSettings" PolicyStore = ValidationSettingsProperty
  set :: PropertyType "ValidationSettings" PolicyStore
-> PolicyStore -> PolicyStore
set PropertyType "ValidationSettings" PolicyStore
newValue PolicyStore {Maybe [Tag]
Maybe (Value Text)
Maybe DeletionProtectionProperty
Maybe SchemaDefinitionProperty
()
ValidationSettingsProperty
haddock_workaround_ :: PolicyStore -> ()
deletionProtection :: PolicyStore -> Maybe DeletionProtectionProperty
description :: PolicyStore -> Maybe (Value Text)
schema :: PolicyStore -> Maybe SchemaDefinitionProperty
tags :: PolicyStore -> Maybe [Tag]
validationSettings :: PolicyStore -> ValidationSettingsProperty
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
validationSettings :: ValidationSettingsProperty
..}
    = PolicyStore {validationSettings :: ValidationSettingsProperty
validationSettings = PropertyType "ValidationSettings" PolicyStore
ValidationSettingsProperty
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe DeletionProtectionProperty
Maybe SchemaDefinitionProperty
()
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe DeletionProtectionProperty
description :: Maybe (Value Text)
schema :: Maybe SchemaDefinitionProperty
tags :: Maybe [Tag]
..}