module Stratosphere.CloudFront.Distribution.TenantConfigProperty (
        module Exports, TenantConfigProperty(..), mkTenantConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CloudFront.Distribution.ParameterDefinitionProperty as Exports
import Stratosphere.ResourceProperties
data TenantConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-tenantconfig.html>
    TenantConfigProperty {TenantConfigProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-tenantconfig.html#cfn-cloudfront-distribution-tenantconfig-parameterdefinitions>
                          TenantConfigProperty -> Maybe [ParameterDefinitionProperty]
parameterDefinitions :: (Prelude.Maybe [ParameterDefinitionProperty])}
  deriving stock (TenantConfigProperty -> TenantConfigProperty -> Bool
(TenantConfigProperty -> TenantConfigProperty -> Bool)
-> (TenantConfigProperty -> TenantConfigProperty -> Bool)
-> Eq TenantConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TenantConfigProperty -> TenantConfigProperty -> Bool
== :: TenantConfigProperty -> TenantConfigProperty -> Bool
$c/= :: TenantConfigProperty -> TenantConfigProperty -> Bool
/= :: TenantConfigProperty -> TenantConfigProperty -> Bool
Prelude.Eq, Int -> TenantConfigProperty -> ShowS
[TenantConfigProperty] -> ShowS
TenantConfigProperty -> String
(Int -> TenantConfigProperty -> ShowS)
-> (TenantConfigProperty -> String)
-> ([TenantConfigProperty] -> ShowS)
-> Show TenantConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TenantConfigProperty -> ShowS
showsPrec :: Int -> TenantConfigProperty -> ShowS
$cshow :: TenantConfigProperty -> String
show :: TenantConfigProperty -> String
$cshowList :: [TenantConfigProperty] -> ShowS
showList :: [TenantConfigProperty] -> ShowS
Prelude.Show)
mkTenantConfigProperty :: TenantConfigProperty
mkTenantConfigProperty :: TenantConfigProperty
mkTenantConfigProperty
  = TenantConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), parameterDefinitions :: Maybe [ParameterDefinitionProperty]
parameterDefinitions = Maybe [ParameterDefinitionProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TenantConfigProperty where
  toResourceProperties :: TenantConfigProperty -> ResourceProperties
toResourceProperties TenantConfigProperty {Maybe [ParameterDefinitionProperty]
()
haddock_workaround_ :: TenantConfigProperty -> ()
parameterDefinitions :: TenantConfigProperty -> Maybe [ParameterDefinitionProperty]
haddock_workaround_ :: ()
parameterDefinitions :: Maybe [ParameterDefinitionProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFront::Distribution.TenantConfig",
         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 -> [ParameterDefinitionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ParameterDefinitions"
                              ([ParameterDefinitionProperty] -> (Key, Value))
-> Maybe [ParameterDefinitionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ParameterDefinitionProperty]
parameterDefinitions])}
instance JSON.ToJSON TenantConfigProperty where
  toJSON :: TenantConfigProperty -> Value
toJSON TenantConfigProperty {Maybe [ParameterDefinitionProperty]
()
haddock_workaround_ :: TenantConfigProperty -> ()
parameterDefinitions :: TenantConfigProperty -> Maybe [ParameterDefinitionProperty]
haddock_workaround_ :: ()
parameterDefinitions :: Maybe [ParameterDefinitionProperty]
..}
    = [(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 -> [ParameterDefinitionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ParameterDefinitions"
                 ([ParameterDefinitionProperty] -> (Key, Value))
-> Maybe [ParameterDefinitionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ParameterDefinitionProperty]
parameterDefinitions]))
instance Property "ParameterDefinitions" TenantConfigProperty where
  type PropertyType "ParameterDefinitions" TenantConfigProperty = [ParameterDefinitionProperty]
  set :: PropertyType "ParameterDefinitions" TenantConfigProperty
-> TenantConfigProperty -> TenantConfigProperty
set PropertyType "ParameterDefinitions" TenantConfigProperty
newValue TenantConfigProperty {Maybe [ParameterDefinitionProperty]
()
haddock_workaround_ :: TenantConfigProperty -> ()
parameterDefinitions :: TenantConfigProperty -> Maybe [ParameterDefinitionProperty]
haddock_workaround_ :: ()
parameterDefinitions :: Maybe [ParameterDefinitionProperty]
..}
    = TenantConfigProperty
        {parameterDefinitions :: Maybe [ParameterDefinitionProperty]
parameterDefinitions = [ParameterDefinitionProperty]
-> Maybe [ParameterDefinitionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ParameterDefinitionProperty]
PropertyType "ParameterDefinitions" TenantConfigProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}