module Stratosphere.CloudFront.KeyGroup.KeyGroupConfigProperty (
        KeyGroupConfigProperty(..), mkKeyGroupConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data KeyGroupConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-keygroup-keygroupconfig.html>
    KeyGroupConfigProperty {KeyGroupConfigProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-keygroup-keygroupconfig.html#cfn-cloudfront-keygroup-keygroupconfig-comment>
                            KeyGroupConfigProperty -> Maybe (Value Text)
comment :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-keygroup-keygroupconfig.html#cfn-cloudfront-keygroup-keygroupconfig-items>
                            KeyGroupConfigProperty -> ValueList Text
items :: (ValueList Prelude.Text),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-keygroup-keygroupconfig.html#cfn-cloudfront-keygroup-keygroupconfig-name>
                            KeyGroupConfigProperty -> Value Text
name :: (Value Prelude.Text)}
  deriving stock (KeyGroupConfigProperty -> KeyGroupConfigProperty -> Bool
(KeyGroupConfigProperty -> KeyGroupConfigProperty -> Bool)
-> (KeyGroupConfigProperty -> KeyGroupConfigProperty -> Bool)
-> Eq KeyGroupConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KeyGroupConfigProperty -> KeyGroupConfigProperty -> Bool
== :: KeyGroupConfigProperty -> KeyGroupConfigProperty -> Bool
$c/= :: KeyGroupConfigProperty -> KeyGroupConfigProperty -> Bool
/= :: KeyGroupConfigProperty -> KeyGroupConfigProperty -> Bool
Prelude.Eq, Int -> KeyGroupConfigProperty -> ShowS
[KeyGroupConfigProperty] -> ShowS
KeyGroupConfigProperty -> String
(Int -> KeyGroupConfigProperty -> ShowS)
-> (KeyGroupConfigProperty -> String)
-> ([KeyGroupConfigProperty] -> ShowS)
-> Show KeyGroupConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KeyGroupConfigProperty -> ShowS
showsPrec :: Int -> KeyGroupConfigProperty -> ShowS
$cshow :: KeyGroupConfigProperty -> String
show :: KeyGroupConfigProperty -> String
$cshowList :: [KeyGroupConfigProperty] -> ShowS
showList :: [KeyGroupConfigProperty] -> ShowS
Prelude.Show)
mkKeyGroupConfigProperty ::
  ValueList Prelude.Text
  -> Value Prelude.Text -> KeyGroupConfigProperty
mkKeyGroupConfigProperty :: ValueList Text -> Value Text -> KeyGroupConfigProperty
mkKeyGroupConfigProperty ValueList Text
items Value Text
name
  = KeyGroupConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), items :: ValueList Text
items = ValueList Text
items, name :: Value Text
name = Value Text
name,
       comment :: Maybe (Value Text)
comment = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties KeyGroupConfigProperty where
  toResourceProperties :: KeyGroupConfigProperty -> ResourceProperties
toResourceProperties KeyGroupConfigProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: KeyGroupConfigProperty -> ()
comment :: KeyGroupConfigProperty -> Maybe (Value Text)
items :: KeyGroupConfigProperty -> ValueList Text
name :: KeyGroupConfigProperty -> Value Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
items :: ValueList Text
name :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFront::KeyGroup.KeyGroupConfig",
         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
"Items" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
items, Key
"Name" 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
name]
                           ([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
"Comment" (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)
comment]))}
instance JSON.ToJSON KeyGroupConfigProperty where
  toJSON :: KeyGroupConfigProperty -> Value
toJSON KeyGroupConfigProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: KeyGroupConfigProperty -> ()
comment :: KeyGroupConfigProperty -> Maybe (Value Text)
items :: KeyGroupConfigProperty -> ValueList Text
name :: KeyGroupConfigProperty -> Value Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
items :: ValueList Text
name :: 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
"Items" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
items, Key
"Name" 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
name]
              ([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
"Comment" (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)
comment])))
instance Property "Comment" KeyGroupConfigProperty where
  type PropertyType "Comment" KeyGroupConfigProperty = Value Prelude.Text
  set :: PropertyType "Comment" KeyGroupConfigProperty
-> KeyGroupConfigProperty -> KeyGroupConfigProperty
set PropertyType "Comment" KeyGroupConfigProperty
newValue KeyGroupConfigProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: KeyGroupConfigProperty -> ()
comment :: KeyGroupConfigProperty -> Maybe (Value Text)
items :: KeyGroupConfigProperty -> ValueList Text
name :: KeyGroupConfigProperty -> Value Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
items :: ValueList Text
name :: Value Text
..}
    = KeyGroupConfigProperty {comment :: Maybe (Value Text)
comment = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Comment" KeyGroupConfigProperty
Value Text
newValue, ()
ValueList Text
Value Text
haddock_workaround_ :: ()
items :: ValueList Text
name :: Value Text
haddock_workaround_ :: ()
items :: ValueList Text
name :: Value Text
..}
instance Property "Items" KeyGroupConfigProperty where
  type PropertyType "Items" KeyGroupConfigProperty = ValueList Prelude.Text
  set :: PropertyType "Items" KeyGroupConfigProperty
-> KeyGroupConfigProperty -> KeyGroupConfigProperty
set PropertyType "Items" KeyGroupConfigProperty
newValue KeyGroupConfigProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: KeyGroupConfigProperty -> ()
comment :: KeyGroupConfigProperty -> Maybe (Value Text)
items :: KeyGroupConfigProperty -> ValueList Text
name :: KeyGroupConfigProperty -> Value Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
items :: ValueList Text
name :: Value Text
..}
    = KeyGroupConfigProperty {items :: ValueList Text
items = PropertyType "Items" KeyGroupConfigProperty
ValueList Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Name" KeyGroupConfigProperty where
  type PropertyType "Name" KeyGroupConfigProperty = Value Prelude.Text
  set :: PropertyType "Name" KeyGroupConfigProperty
-> KeyGroupConfigProperty -> KeyGroupConfigProperty
set PropertyType "Name" KeyGroupConfigProperty
newValue KeyGroupConfigProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: KeyGroupConfigProperty -> ()
comment :: KeyGroupConfigProperty -> Maybe (Value Text)
items :: KeyGroupConfigProperty -> ValueList Text
name :: KeyGroupConfigProperty -> Value Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
items :: ValueList Text
name :: Value Text
..}
    = KeyGroupConfigProperty {name :: Value Text
name = PropertyType "Name" KeyGroupConfigProperty
Value Text
newValue, Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
items :: ValueList Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
items :: ValueList Text
..}