module Stratosphere.VerifiedPermissions.PolicyStore.SchemaDefinitionProperty (
        SchemaDefinitionProperty(..), mkSchemaDefinitionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SchemaDefinitionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-verifiedpermissions-policystore-schemadefinition.html>
    SchemaDefinitionProperty {SchemaDefinitionProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-verifiedpermissions-policystore-schemadefinition.html#cfn-verifiedpermissions-policystore-schemadefinition-cedarformat>
                              SchemaDefinitionProperty -> Maybe (Value Text)
cedarFormat :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-verifiedpermissions-policystore-schemadefinition.html#cfn-verifiedpermissions-policystore-schemadefinition-cedarjson>
                              SchemaDefinitionProperty -> Maybe (Value Text)
cedarJson :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool
(SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool)
-> (SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool)
-> Eq SchemaDefinitionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool
== :: SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool
$c/= :: SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool
/= :: SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool
Prelude.Eq, Int -> SchemaDefinitionProperty -> ShowS
[SchemaDefinitionProperty] -> ShowS
SchemaDefinitionProperty -> String
(Int -> SchemaDefinitionProperty -> ShowS)
-> (SchemaDefinitionProperty -> String)
-> ([SchemaDefinitionProperty] -> ShowS)
-> Show SchemaDefinitionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SchemaDefinitionProperty -> ShowS
showsPrec :: Int -> SchemaDefinitionProperty -> ShowS
$cshow :: SchemaDefinitionProperty -> String
show :: SchemaDefinitionProperty -> String
$cshowList :: [SchemaDefinitionProperty] -> ShowS
showList :: [SchemaDefinitionProperty] -> ShowS
Prelude.Show)
mkSchemaDefinitionProperty :: SchemaDefinitionProperty
mkSchemaDefinitionProperty :: SchemaDefinitionProperty
mkSchemaDefinitionProperty
  = SchemaDefinitionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cedarFormat :: Maybe (Value Text)
cedarFormat = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       cedarJson :: Maybe (Value Text)
cedarJson = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SchemaDefinitionProperty where
  toResourceProperties :: SchemaDefinitionProperty -> ResourceProperties
toResourceProperties SchemaDefinitionProperty {Maybe (Value Text)
()
haddock_workaround_ :: SchemaDefinitionProperty -> ()
cedarFormat :: SchemaDefinitionProperty -> Maybe (Value Text)
cedarJson :: SchemaDefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cedarFormat :: Maybe (Value Text)
cedarJson :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::VerifiedPermissions::PolicyStore.SchemaDefinition",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([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
"CedarFormat" (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)
cedarFormat,
                            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
"CedarJson" (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)
cedarJson])}
instance JSON.ToJSON SchemaDefinitionProperty where
  toJSON :: SchemaDefinitionProperty -> Value
toJSON SchemaDefinitionProperty {Maybe (Value Text)
()
haddock_workaround_ :: SchemaDefinitionProperty -> ()
cedarFormat :: SchemaDefinitionProperty -> Maybe (Value Text)
cedarJson :: SchemaDefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cedarFormat :: Maybe (Value Text)
cedarJson :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([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
"CedarFormat" (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)
cedarFormat,
               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
"CedarJson" (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)
cedarJson]))
instance Property "CedarFormat" SchemaDefinitionProperty where
  type PropertyType "CedarFormat" SchemaDefinitionProperty = Value Prelude.Text
  set :: PropertyType "CedarFormat" SchemaDefinitionProperty
-> SchemaDefinitionProperty -> SchemaDefinitionProperty
set PropertyType "CedarFormat" SchemaDefinitionProperty
newValue SchemaDefinitionProperty {Maybe (Value Text)
()
haddock_workaround_ :: SchemaDefinitionProperty -> ()
cedarFormat :: SchemaDefinitionProperty -> Maybe (Value Text)
cedarJson :: SchemaDefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cedarFormat :: Maybe (Value Text)
cedarJson :: Maybe (Value Text)
..}
    = SchemaDefinitionProperty
        {cedarFormat :: Maybe (Value Text)
cedarFormat = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CedarFormat" SchemaDefinitionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cedarJson :: Maybe (Value Text)
haddock_workaround_ :: ()
cedarJson :: Maybe (Value Text)
..}
instance Property "CedarJson" SchemaDefinitionProperty where
  type PropertyType "CedarJson" SchemaDefinitionProperty = Value Prelude.Text
  set :: PropertyType "CedarJson" SchemaDefinitionProperty
-> SchemaDefinitionProperty -> SchemaDefinitionProperty
set PropertyType "CedarJson" SchemaDefinitionProperty
newValue SchemaDefinitionProperty {Maybe (Value Text)
()
haddock_workaround_ :: SchemaDefinitionProperty -> ()
cedarFormat :: SchemaDefinitionProperty -> Maybe (Value Text)
cedarJson :: SchemaDefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cedarFormat :: Maybe (Value Text)
cedarJson :: Maybe (Value Text)
..}
    = SchemaDefinitionProperty {cedarJson :: Maybe (Value Text)
cedarJson = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CedarJson" SchemaDefinitionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cedarFormat :: Maybe (Value Text)
haddock_workaround_ :: ()
cedarFormat :: Maybe (Value Text)
..}