module Stratosphere.WorkSpacesWeb.UserSettings.CookieSpecificationProperty (
CookieSpecificationProperty(..), mkCookieSpecificationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CookieSpecificationProperty
=
CookieSpecificationProperty {CookieSpecificationProperty -> ()
haddock_workaround_ :: (),
CookieSpecificationProperty -> Value Text
domain :: (Value Prelude.Text),
CookieSpecificationProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
CookieSpecificationProperty -> Maybe (Value Text)
path :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (CookieSpecificationProperty -> CookieSpecificationProperty -> Bool
(CookieSpecificationProperty
-> CookieSpecificationProperty -> Bool)
-> (CookieSpecificationProperty
-> CookieSpecificationProperty -> Bool)
-> Eq CookieSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CookieSpecificationProperty -> CookieSpecificationProperty -> Bool
== :: CookieSpecificationProperty -> CookieSpecificationProperty -> Bool
$c/= :: CookieSpecificationProperty -> CookieSpecificationProperty -> Bool
/= :: CookieSpecificationProperty -> CookieSpecificationProperty -> Bool
Prelude.Eq, Int -> CookieSpecificationProperty -> ShowS
[CookieSpecificationProperty] -> ShowS
CookieSpecificationProperty -> String
(Int -> CookieSpecificationProperty -> ShowS)
-> (CookieSpecificationProperty -> String)
-> ([CookieSpecificationProperty] -> ShowS)
-> Show CookieSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CookieSpecificationProperty -> ShowS
showsPrec :: Int -> CookieSpecificationProperty -> ShowS
$cshow :: CookieSpecificationProperty -> String
show :: CookieSpecificationProperty -> String
$cshowList :: [CookieSpecificationProperty] -> ShowS
showList :: [CookieSpecificationProperty] -> ShowS
Prelude.Show)
mkCookieSpecificationProperty ::
Value Prelude.Text -> CookieSpecificationProperty
mkCookieSpecificationProperty :: Value Text -> CookieSpecificationProperty
mkCookieSpecificationProperty Value Text
domain
= CookieSpecificationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), domain :: Value Text
domain = Value Text
domain, name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
path :: Maybe (Value Text)
path = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CookieSpecificationProperty where
toResourceProperties :: CookieSpecificationProperty -> ResourceProperties
toResourceProperties CookieSpecificationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CookieSpecificationProperty -> ()
domain :: CookieSpecificationProperty -> Value Text
name :: CookieSpecificationProperty -> Maybe (Value Text)
path :: CookieSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domain :: Value Text
name :: Maybe (Value Text)
path :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::WorkSpacesWeb::UserSettings.CookieSpecification",
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
"Domain" 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
domain]
([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
"Name" (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)
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..=) Key
"Path" (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)
path]))}
instance JSON.ToJSON CookieSpecificationProperty where
toJSON :: CookieSpecificationProperty -> Value
toJSON CookieSpecificationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CookieSpecificationProperty -> ()
domain :: CookieSpecificationProperty -> Value Text
name :: CookieSpecificationProperty -> Maybe (Value Text)
path :: CookieSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domain :: Value Text
name :: Maybe (Value Text)
path :: Maybe (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
"Domain" 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
domain]
([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
"Name" (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)
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..=) Key
"Path" (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)
path])))
instance Property "Domain" CookieSpecificationProperty where
type PropertyType "Domain" CookieSpecificationProperty = Value Prelude.Text
set :: PropertyType "Domain" CookieSpecificationProperty
-> CookieSpecificationProperty -> CookieSpecificationProperty
set PropertyType "Domain" CookieSpecificationProperty
newValue CookieSpecificationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CookieSpecificationProperty -> ()
domain :: CookieSpecificationProperty -> Value Text
name :: CookieSpecificationProperty -> Maybe (Value Text)
path :: CookieSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domain :: Value Text
name :: Maybe (Value Text)
path :: Maybe (Value Text)
..}
= CookieSpecificationProperty {domain :: Value Text
domain = PropertyType "Domain" CookieSpecificationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
path :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
path :: Maybe (Value Text)
..}
instance Property "Name" CookieSpecificationProperty where
type PropertyType "Name" CookieSpecificationProperty = Value Prelude.Text
set :: PropertyType "Name" CookieSpecificationProperty
-> CookieSpecificationProperty -> CookieSpecificationProperty
set PropertyType "Name" CookieSpecificationProperty
newValue CookieSpecificationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CookieSpecificationProperty -> ()
domain :: CookieSpecificationProperty -> Value Text
name :: CookieSpecificationProperty -> Maybe (Value Text)
path :: CookieSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domain :: Value Text
name :: Maybe (Value Text)
path :: Maybe (Value Text)
..}
= CookieSpecificationProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" CookieSpecificationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
domain :: Value Text
path :: Maybe (Value Text)
haddock_workaround_ :: ()
domain :: Value Text
path :: Maybe (Value Text)
..}
instance Property "Path" CookieSpecificationProperty where
type PropertyType "Path" CookieSpecificationProperty = Value Prelude.Text
set :: PropertyType "Path" CookieSpecificationProperty
-> CookieSpecificationProperty -> CookieSpecificationProperty
set PropertyType "Path" CookieSpecificationProperty
newValue CookieSpecificationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CookieSpecificationProperty -> ()
domain :: CookieSpecificationProperty -> Value Text
name :: CookieSpecificationProperty -> Maybe (Value Text)
path :: CookieSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domain :: Value Text
name :: Maybe (Value Text)
path :: Maybe (Value Text)
..}
= CookieSpecificationProperty {path :: Maybe (Value Text)
path = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Path" CookieSpecificationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
domain :: Value Text
name :: Maybe (Value Text)
haddock_workaround_ :: ()
domain :: Value Text
name :: Maybe (Value Text)
..}