module Stratosphere.CloudFront.Distribution.CookiesProperty (
CookiesProperty(..), mkCookiesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CookiesProperty
=
CookiesProperty {CookiesProperty -> ()
haddock_workaround_ :: (),
CookiesProperty -> Value Text
forward :: (Value Prelude.Text),
CookiesProperty -> Maybe (ValueList Text)
whitelistedNames :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (CookiesProperty -> CookiesProperty -> Bool
(CookiesProperty -> CookiesProperty -> Bool)
-> (CookiesProperty -> CookiesProperty -> Bool)
-> Eq CookiesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CookiesProperty -> CookiesProperty -> Bool
== :: CookiesProperty -> CookiesProperty -> Bool
$c/= :: CookiesProperty -> CookiesProperty -> Bool
/= :: CookiesProperty -> CookiesProperty -> Bool
Prelude.Eq, Int -> CookiesProperty -> ShowS
[CookiesProperty] -> ShowS
CookiesProperty -> String
(Int -> CookiesProperty -> ShowS)
-> (CookiesProperty -> String)
-> ([CookiesProperty] -> ShowS)
-> Show CookiesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CookiesProperty -> ShowS
showsPrec :: Int -> CookiesProperty -> ShowS
$cshow :: CookiesProperty -> String
show :: CookiesProperty -> String
$cshowList :: [CookiesProperty] -> ShowS
showList :: [CookiesProperty] -> ShowS
Prelude.Show)
mkCookiesProperty :: Value Prelude.Text -> CookiesProperty
mkCookiesProperty :: Value Text -> CookiesProperty
mkCookiesProperty Value Text
forward
= CookiesProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), forward :: Value Text
forward = Value Text
forward,
whitelistedNames :: Maybe (ValueList Text)
whitelistedNames = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CookiesProperty where
toResourceProperties :: CookiesProperty -> ResourceProperties
toResourceProperties CookiesProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CookiesProperty -> ()
forward :: CookiesProperty -> Value Text
whitelistedNames :: CookiesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
forward :: Value Text
whitelistedNames :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CloudFront::Distribution.Cookies",
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
"Forward" 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
forward]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"WhitelistedNames" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
whitelistedNames]))}
instance JSON.ToJSON CookiesProperty where
toJSON :: CookiesProperty -> Value
toJSON CookiesProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CookiesProperty -> ()
forward :: CookiesProperty -> Value Text
whitelistedNames :: CookiesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
forward :: Value Text
whitelistedNames :: Maybe (ValueList 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
"Forward" 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
forward]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"WhitelistedNames" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
whitelistedNames])))
instance Property "Forward" CookiesProperty where
type PropertyType "Forward" CookiesProperty = Value Prelude.Text
set :: PropertyType "Forward" CookiesProperty
-> CookiesProperty -> CookiesProperty
set PropertyType "Forward" CookiesProperty
newValue CookiesProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CookiesProperty -> ()
forward :: CookiesProperty -> Value Text
whitelistedNames :: CookiesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
forward :: Value Text
whitelistedNames :: Maybe (ValueList Text)
..}
= CookiesProperty {forward :: Value Text
forward = PropertyType "Forward" CookiesProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
whitelistedNames :: Maybe (ValueList Text)
haddock_workaround_ :: ()
whitelistedNames :: Maybe (ValueList Text)
..}
instance Property "WhitelistedNames" CookiesProperty where
type PropertyType "WhitelistedNames" CookiesProperty = ValueList Prelude.Text
set :: PropertyType "WhitelistedNames" CookiesProperty
-> CookiesProperty -> CookiesProperty
set PropertyType "WhitelistedNames" CookiesProperty
newValue CookiesProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CookiesProperty -> ()
forward :: CookiesProperty -> Value Text
whitelistedNames :: CookiesProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
forward :: Value Text
whitelistedNames :: Maybe (ValueList Text)
..}
= CookiesProperty {whitelistedNames :: Maybe (ValueList Text)
whitelistedNames = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "WhitelistedNames" CookiesProperty
ValueList Text
newValue, ()
Value Text
haddock_workaround_ :: ()
forward :: Value Text
haddock_workaround_ :: ()
forward :: Value Text
..}