module Stratosphere.CloudFormation.HookVersion (
        module Exports, HookVersion(..), mkHookVersion
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CloudFormation.HookVersion.LoggingConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data HookVersion
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html>
    HookVersion {HookVersion -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html#cfn-cloudformation-hookversion-executionrolearn>
                 HookVersion -> Maybe (Value Text)
executionRoleArn :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html#cfn-cloudformation-hookversion-loggingconfig>
                 HookVersion -> Maybe LoggingConfigProperty
loggingConfig :: (Prelude.Maybe LoggingConfigProperty),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html#cfn-cloudformation-hookversion-schemahandlerpackage>
                 HookVersion -> Value Text
schemaHandlerPackage :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-hookversion.html#cfn-cloudformation-hookversion-typename>
                 HookVersion -> Value Text
typeName :: (Value Prelude.Text)}
  deriving stock (HookVersion -> HookVersion -> Bool
(HookVersion -> HookVersion -> Bool)
-> (HookVersion -> HookVersion -> Bool) -> Eq HookVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HookVersion -> HookVersion -> Bool
== :: HookVersion -> HookVersion -> Bool
$c/= :: HookVersion -> HookVersion -> Bool
/= :: HookVersion -> HookVersion -> Bool
Prelude.Eq, Int -> HookVersion -> ShowS
[HookVersion] -> ShowS
HookVersion -> String
(Int -> HookVersion -> ShowS)
-> (HookVersion -> String)
-> ([HookVersion] -> ShowS)
-> Show HookVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HookVersion -> ShowS
showsPrec :: Int -> HookVersion -> ShowS
$cshow :: HookVersion -> String
show :: HookVersion -> String
$cshowList :: [HookVersion] -> ShowS
showList :: [HookVersion] -> ShowS
Prelude.Show)
mkHookVersion ::
  Value Prelude.Text -> Value Prelude.Text -> HookVersion
mkHookVersion :: Value Text -> Value Text -> HookVersion
mkHookVersion Value Text
schemaHandlerPackage Value Text
typeName
  = HookVersion
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       schemaHandlerPackage :: Value Text
schemaHandlerPackage = Value Text
schemaHandlerPackage, typeName :: Value Text
typeName = Value Text
typeName,
       executionRoleArn :: Maybe (Value Text)
executionRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       loggingConfig :: Maybe LoggingConfigProperty
loggingConfig = Maybe LoggingConfigProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties HookVersion where
  toResourceProperties :: HookVersion -> ResourceProperties
toResourceProperties HookVersion {Maybe (Value Text)
Maybe LoggingConfigProperty
()
Value Text
haddock_workaround_ :: HookVersion -> ()
executionRoleArn :: HookVersion -> Maybe (Value Text)
loggingConfig :: HookVersion -> Maybe LoggingConfigProperty
schemaHandlerPackage :: HookVersion -> Value Text
typeName :: HookVersion -> Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
loggingConfig :: Maybe LoggingConfigProperty
schemaHandlerPackage :: Value Text
typeName :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFormation::HookVersion",
         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
"SchemaHandlerPackage" 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
schemaHandlerPackage,
                            Key
"TypeName" 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
typeName]
                           ([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
"ExecutionRoleArn" (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)
executionRoleArn,
                               Key -> LoggingConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LoggingConfig" (LoggingConfigProperty -> (Key, Value))
-> Maybe LoggingConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingConfigProperty
loggingConfig]))}
instance JSON.ToJSON HookVersion where
  toJSON :: HookVersion -> Value
toJSON HookVersion {Maybe (Value Text)
Maybe LoggingConfigProperty
()
Value Text
haddock_workaround_ :: HookVersion -> ()
executionRoleArn :: HookVersion -> Maybe (Value Text)
loggingConfig :: HookVersion -> Maybe LoggingConfigProperty
schemaHandlerPackage :: HookVersion -> Value Text
typeName :: HookVersion -> Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
loggingConfig :: Maybe LoggingConfigProperty
schemaHandlerPackage :: Value Text
typeName :: 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
"SchemaHandlerPackage" 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
schemaHandlerPackage,
               Key
"TypeName" 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
typeName]
              ([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
"ExecutionRoleArn" (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)
executionRoleArn,
                  Key -> LoggingConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LoggingConfig" (LoggingConfigProperty -> (Key, Value))
-> Maybe LoggingConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingConfigProperty
loggingConfig])))
instance Property "ExecutionRoleArn" HookVersion where
  type PropertyType "ExecutionRoleArn" HookVersion = Value Prelude.Text
  set :: PropertyType "ExecutionRoleArn" HookVersion
-> HookVersion -> HookVersion
set PropertyType "ExecutionRoleArn" HookVersion
newValue HookVersion {Maybe (Value Text)
Maybe LoggingConfigProperty
()
Value Text
haddock_workaround_ :: HookVersion -> ()
executionRoleArn :: HookVersion -> Maybe (Value Text)
loggingConfig :: HookVersion -> Maybe LoggingConfigProperty
schemaHandlerPackage :: HookVersion -> Value Text
typeName :: HookVersion -> Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
loggingConfig :: Maybe LoggingConfigProperty
schemaHandlerPackage :: Value Text
typeName :: Value Text
..}
    = HookVersion {executionRoleArn :: Maybe (Value Text)
executionRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ExecutionRoleArn" HookVersion
Value Text
newValue, Maybe LoggingConfigProperty
()
Value Text
haddock_workaround_ :: ()
loggingConfig :: Maybe LoggingConfigProperty
schemaHandlerPackage :: Value Text
typeName :: Value Text
haddock_workaround_ :: ()
loggingConfig :: Maybe LoggingConfigProperty
schemaHandlerPackage :: Value Text
typeName :: Value Text
..}
instance Property "LoggingConfig" HookVersion where
  type PropertyType "LoggingConfig" HookVersion = LoggingConfigProperty
  set :: PropertyType "LoggingConfig" HookVersion
-> HookVersion -> HookVersion
set PropertyType "LoggingConfig" HookVersion
newValue HookVersion {Maybe (Value Text)
Maybe LoggingConfigProperty
()
Value Text
haddock_workaround_ :: HookVersion -> ()
executionRoleArn :: HookVersion -> Maybe (Value Text)
loggingConfig :: HookVersion -> Maybe LoggingConfigProperty
schemaHandlerPackage :: HookVersion -> Value Text
typeName :: HookVersion -> Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
loggingConfig :: Maybe LoggingConfigProperty
schemaHandlerPackage :: Value Text
typeName :: Value Text
..}
    = HookVersion {loggingConfig :: Maybe LoggingConfigProperty
loggingConfig = LoggingConfigProperty -> Maybe LoggingConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LoggingConfig" HookVersion
LoggingConfigProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
schemaHandlerPackage :: Value Text
typeName :: Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
schemaHandlerPackage :: Value Text
typeName :: Value Text
..}
instance Property "SchemaHandlerPackage" HookVersion where
  type PropertyType "SchemaHandlerPackage" HookVersion = Value Prelude.Text
  set :: PropertyType "SchemaHandlerPackage" HookVersion
-> HookVersion -> HookVersion
set PropertyType "SchemaHandlerPackage" HookVersion
newValue HookVersion {Maybe (Value Text)
Maybe LoggingConfigProperty
()
Value Text
haddock_workaround_ :: HookVersion -> ()
executionRoleArn :: HookVersion -> Maybe (Value Text)
loggingConfig :: HookVersion -> Maybe LoggingConfigProperty
schemaHandlerPackage :: HookVersion -> Value Text
typeName :: HookVersion -> Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
loggingConfig :: Maybe LoggingConfigProperty
schemaHandlerPackage :: Value Text
typeName :: Value Text
..}
    = HookVersion {schemaHandlerPackage :: Value Text
schemaHandlerPackage = PropertyType "SchemaHandlerPackage" HookVersion
Value Text
newValue, Maybe (Value Text)
Maybe LoggingConfigProperty
()
Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
loggingConfig :: Maybe LoggingConfigProperty
typeName :: Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
loggingConfig :: Maybe LoggingConfigProperty
typeName :: Value Text
..}
instance Property "TypeName" HookVersion where
  type PropertyType "TypeName" HookVersion = Value Prelude.Text
  set :: PropertyType "TypeName" HookVersion -> HookVersion -> HookVersion
set PropertyType "TypeName" HookVersion
newValue HookVersion {Maybe (Value Text)
Maybe LoggingConfigProperty
()
Value Text
haddock_workaround_ :: HookVersion -> ()
executionRoleArn :: HookVersion -> Maybe (Value Text)
loggingConfig :: HookVersion -> Maybe LoggingConfigProperty
schemaHandlerPackage :: HookVersion -> Value Text
typeName :: HookVersion -> Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
loggingConfig :: Maybe LoggingConfigProperty
schemaHandlerPackage :: Value Text
typeName :: Value Text
..}
    = HookVersion {typeName :: Value Text
typeName = PropertyType "TypeName" HookVersion
Value Text
newValue, Maybe (Value Text)
Maybe LoggingConfigProperty
()
Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
loggingConfig :: Maybe LoggingConfigProperty
schemaHandlerPackage :: Value Text
haddock_workaround_ :: ()
executionRoleArn :: Maybe (Value Text)
loggingConfig :: Maybe LoggingConfigProperty
schemaHandlerPackage :: Value Text
..}