module Stratosphere.Lightsail.Distribution.CookieObjectProperty (
        CookieObjectProperty(..), mkCookieObjectProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CookieObjectProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cookieobject.html>
    CookieObjectProperty {CookieObjectProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cookieobject.html#cfn-lightsail-distribution-cookieobject-cookiesallowlist>
                          CookieObjectProperty -> Maybe (ValueList Text)
cookiesAllowList :: (Prelude.Maybe (ValueList Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cookieobject.html#cfn-lightsail-distribution-cookieobject-option>
                          CookieObjectProperty -> Maybe (Value Text)
option :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CookieObjectProperty -> CookieObjectProperty -> Bool
(CookieObjectProperty -> CookieObjectProperty -> Bool)
-> (CookieObjectProperty -> CookieObjectProperty -> Bool)
-> Eq CookieObjectProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CookieObjectProperty -> CookieObjectProperty -> Bool
== :: CookieObjectProperty -> CookieObjectProperty -> Bool
$c/= :: CookieObjectProperty -> CookieObjectProperty -> Bool
/= :: CookieObjectProperty -> CookieObjectProperty -> Bool
Prelude.Eq, Int -> CookieObjectProperty -> ShowS
[CookieObjectProperty] -> ShowS
CookieObjectProperty -> String
(Int -> CookieObjectProperty -> ShowS)
-> (CookieObjectProperty -> String)
-> ([CookieObjectProperty] -> ShowS)
-> Show CookieObjectProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CookieObjectProperty -> ShowS
showsPrec :: Int -> CookieObjectProperty -> ShowS
$cshow :: CookieObjectProperty -> String
show :: CookieObjectProperty -> String
$cshowList :: [CookieObjectProperty] -> ShowS
showList :: [CookieObjectProperty] -> ShowS
Prelude.Show)
mkCookieObjectProperty :: CookieObjectProperty
mkCookieObjectProperty :: CookieObjectProperty
mkCookieObjectProperty
  = CookieObjectProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cookiesAllowList :: Maybe (ValueList Text)
cookiesAllowList = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       option :: Maybe (Value Text)
option = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CookieObjectProperty where
  toResourceProperties :: CookieObjectProperty -> ResourceProperties
toResourceProperties CookieObjectProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: CookieObjectProperty -> ()
cookiesAllowList :: CookieObjectProperty -> Maybe (ValueList Text)
option :: CookieObjectProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cookiesAllowList :: Maybe (ValueList Text)
option :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lightsail::Distribution.CookieObject",
         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 -> 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
"CookiesAllowList" (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)
cookiesAllowList,
                            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
"Option" (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)
option])}
instance JSON.ToJSON CookieObjectProperty where
  toJSON :: CookieObjectProperty -> Value
toJSON CookieObjectProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: CookieObjectProperty -> ()
cookiesAllowList :: CookieObjectProperty -> Maybe (ValueList Text)
option :: CookieObjectProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cookiesAllowList :: Maybe (ValueList Text)
option :: 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 -> 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
"CookiesAllowList" (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)
cookiesAllowList,
               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
"Option" (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)
option]))
instance Property "CookiesAllowList" CookieObjectProperty where
  type PropertyType "CookiesAllowList" CookieObjectProperty = ValueList Prelude.Text
  set :: PropertyType "CookiesAllowList" CookieObjectProperty
-> CookieObjectProperty -> CookieObjectProperty
set PropertyType "CookiesAllowList" CookieObjectProperty
newValue CookieObjectProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: CookieObjectProperty -> ()
cookiesAllowList :: CookieObjectProperty -> Maybe (ValueList Text)
option :: CookieObjectProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cookiesAllowList :: Maybe (ValueList Text)
option :: Maybe (Value Text)
..}
    = CookieObjectProperty
        {cookiesAllowList :: Maybe (ValueList Text)
cookiesAllowList = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CookiesAllowList" CookieObjectProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
option :: Maybe (Value Text)
haddock_workaround_ :: ()
option :: Maybe (Value Text)
..}
instance Property "Option" CookieObjectProperty where
  type PropertyType "Option" CookieObjectProperty = Value Prelude.Text
  set :: PropertyType "Option" CookieObjectProperty
-> CookieObjectProperty -> CookieObjectProperty
set PropertyType "Option" CookieObjectProperty
newValue CookieObjectProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: CookieObjectProperty -> ()
cookiesAllowList :: CookieObjectProperty -> Maybe (ValueList Text)
option :: CookieObjectProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cookiesAllowList :: Maybe (ValueList Text)
option :: Maybe (Value Text)
..}
    = CookieObjectProperty {option :: Maybe (Value Text)
option = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Option" CookieObjectProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
cookiesAllowList :: Maybe (ValueList Text)
haddock_workaround_ :: ()
cookiesAllowList :: Maybe (ValueList Text)
..}