module Stratosphere.CloudFront.ResponseHeadersPolicy.StrictTransportSecurityProperty (
StrictTransportSecurityProperty(..),
mkStrictTransportSecurityProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StrictTransportSecurityProperty
=
StrictTransportSecurityProperty {StrictTransportSecurityProperty -> ()
haddock_workaround_ :: (),
StrictTransportSecurityProperty -> Value Integer
accessControlMaxAgeSec :: (Value Prelude.Integer),
StrictTransportSecurityProperty -> Maybe (Value Bool)
includeSubdomains :: (Prelude.Maybe (Value Prelude.Bool)),
StrictTransportSecurityProperty -> Value Bool
override :: (Value Prelude.Bool),
StrictTransportSecurityProperty -> Maybe (Value Bool)
preload :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (StrictTransportSecurityProperty
-> StrictTransportSecurityProperty -> Bool
(StrictTransportSecurityProperty
-> StrictTransportSecurityProperty -> Bool)
-> (StrictTransportSecurityProperty
-> StrictTransportSecurityProperty -> Bool)
-> Eq StrictTransportSecurityProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StrictTransportSecurityProperty
-> StrictTransportSecurityProperty -> Bool
== :: StrictTransportSecurityProperty
-> StrictTransportSecurityProperty -> Bool
$c/= :: StrictTransportSecurityProperty
-> StrictTransportSecurityProperty -> Bool
/= :: StrictTransportSecurityProperty
-> StrictTransportSecurityProperty -> Bool
Prelude.Eq, Int -> StrictTransportSecurityProperty -> ShowS
[StrictTransportSecurityProperty] -> ShowS
StrictTransportSecurityProperty -> String
(Int -> StrictTransportSecurityProperty -> ShowS)
-> (StrictTransportSecurityProperty -> String)
-> ([StrictTransportSecurityProperty] -> ShowS)
-> Show StrictTransportSecurityProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StrictTransportSecurityProperty -> ShowS
showsPrec :: Int -> StrictTransportSecurityProperty -> ShowS
$cshow :: StrictTransportSecurityProperty -> String
show :: StrictTransportSecurityProperty -> String
$cshowList :: [StrictTransportSecurityProperty] -> ShowS
showList :: [StrictTransportSecurityProperty] -> ShowS
Prelude.Show)
mkStrictTransportSecurityProperty ::
Value Prelude.Integer
-> Value Prelude.Bool -> StrictTransportSecurityProperty
mkStrictTransportSecurityProperty :: Value Integer -> Value Bool -> StrictTransportSecurityProperty
mkStrictTransportSecurityProperty Value Integer
accessControlMaxAgeSec Value Bool
override
= StrictTransportSecurityProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
accessControlMaxAgeSec :: Value Integer
accessControlMaxAgeSec = Value Integer
accessControlMaxAgeSec,
override :: Value Bool
override = Value Bool
override, includeSubdomains :: Maybe (Value Bool)
includeSubdomains = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
preload :: Maybe (Value Bool)
preload = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StrictTransportSecurityProperty where
toResourceProperties :: StrictTransportSecurityProperty -> ResourceProperties
toResourceProperties StrictTransportSecurityProperty {Maybe (Value Bool)
()
Value Bool
Value Integer
haddock_workaround_ :: StrictTransportSecurityProperty -> ()
accessControlMaxAgeSec :: StrictTransportSecurityProperty -> Value Integer
includeSubdomains :: StrictTransportSecurityProperty -> Maybe (Value Bool)
override :: StrictTransportSecurityProperty -> Value Bool
preload :: StrictTransportSecurityProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
includeSubdomains :: Maybe (Value Bool)
override :: Value Bool
preload :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CloudFront::ResponseHeadersPolicy.StrictTransportSecurity",
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
"AccessControlMaxAgeSec" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
accessControlMaxAgeSec,
Key
"Override" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
override]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IncludeSubdomains" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
includeSubdomains,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Preload" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
preload]))}
instance JSON.ToJSON StrictTransportSecurityProperty where
toJSON :: StrictTransportSecurityProperty -> Value
toJSON StrictTransportSecurityProperty {Maybe (Value Bool)
()
Value Bool
Value Integer
haddock_workaround_ :: StrictTransportSecurityProperty -> ()
accessControlMaxAgeSec :: StrictTransportSecurityProperty -> Value Integer
includeSubdomains :: StrictTransportSecurityProperty -> Maybe (Value Bool)
override :: StrictTransportSecurityProperty -> Value Bool
preload :: StrictTransportSecurityProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
includeSubdomains :: Maybe (Value Bool)
override :: Value Bool
preload :: Maybe (Value Bool)
..}
= [(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
"AccessControlMaxAgeSec" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
accessControlMaxAgeSec,
Key
"Override" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
override]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IncludeSubdomains" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
includeSubdomains,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Preload" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
preload])))
instance Property "AccessControlMaxAgeSec" StrictTransportSecurityProperty where
type PropertyType "AccessControlMaxAgeSec" StrictTransportSecurityProperty = Value Prelude.Integer
set :: PropertyType
"AccessControlMaxAgeSec" StrictTransportSecurityProperty
-> StrictTransportSecurityProperty
-> StrictTransportSecurityProperty
set PropertyType
"AccessControlMaxAgeSec" StrictTransportSecurityProperty
newValue StrictTransportSecurityProperty {Maybe (Value Bool)
()
Value Bool
Value Integer
haddock_workaround_ :: StrictTransportSecurityProperty -> ()
accessControlMaxAgeSec :: StrictTransportSecurityProperty -> Value Integer
includeSubdomains :: StrictTransportSecurityProperty -> Maybe (Value Bool)
override :: StrictTransportSecurityProperty -> Value Bool
preload :: StrictTransportSecurityProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
includeSubdomains :: Maybe (Value Bool)
override :: Value Bool
preload :: Maybe (Value Bool)
..}
= StrictTransportSecurityProperty
{accessControlMaxAgeSec :: Value Integer
accessControlMaxAgeSec = PropertyType
"AccessControlMaxAgeSec" StrictTransportSecurityProperty
Value Integer
newValue, Maybe (Value Bool)
()
Value Bool
haddock_workaround_ :: ()
includeSubdomains :: Maybe (Value Bool)
override :: Value Bool
preload :: Maybe (Value Bool)
haddock_workaround_ :: ()
includeSubdomains :: Maybe (Value Bool)
override :: Value Bool
preload :: Maybe (Value Bool)
..}
instance Property "IncludeSubdomains" StrictTransportSecurityProperty where
type PropertyType "IncludeSubdomains" StrictTransportSecurityProperty = Value Prelude.Bool
set :: PropertyType "IncludeSubdomains" StrictTransportSecurityProperty
-> StrictTransportSecurityProperty
-> StrictTransportSecurityProperty
set PropertyType "IncludeSubdomains" StrictTransportSecurityProperty
newValue StrictTransportSecurityProperty {Maybe (Value Bool)
()
Value Bool
Value Integer
haddock_workaround_ :: StrictTransportSecurityProperty -> ()
accessControlMaxAgeSec :: StrictTransportSecurityProperty -> Value Integer
includeSubdomains :: StrictTransportSecurityProperty -> Maybe (Value Bool)
override :: StrictTransportSecurityProperty -> Value Bool
preload :: StrictTransportSecurityProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
includeSubdomains :: Maybe (Value Bool)
override :: Value Bool
preload :: Maybe (Value Bool)
..}
= StrictTransportSecurityProperty
{includeSubdomains :: Maybe (Value Bool)
includeSubdomains = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IncludeSubdomains" StrictTransportSecurityProperty
Value Bool
newValue, Maybe (Value Bool)
()
Value Bool
Value Integer
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
override :: Value Bool
preload :: Maybe (Value Bool)
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
override :: Value Bool
preload :: Maybe (Value Bool)
..}
instance Property "Override" StrictTransportSecurityProperty where
type PropertyType "Override" StrictTransportSecurityProperty = Value Prelude.Bool
set :: PropertyType "Override" StrictTransportSecurityProperty
-> StrictTransportSecurityProperty
-> StrictTransportSecurityProperty
set PropertyType "Override" StrictTransportSecurityProperty
newValue StrictTransportSecurityProperty {Maybe (Value Bool)
()
Value Bool
Value Integer
haddock_workaround_ :: StrictTransportSecurityProperty -> ()
accessControlMaxAgeSec :: StrictTransportSecurityProperty -> Value Integer
includeSubdomains :: StrictTransportSecurityProperty -> Maybe (Value Bool)
override :: StrictTransportSecurityProperty -> Value Bool
preload :: StrictTransportSecurityProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
includeSubdomains :: Maybe (Value Bool)
override :: Value Bool
preload :: Maybe (Value Bool)
..}
= StrictTransportSecurityProperty {override :: Value Bool
override = PropertyType "Override" StrictTransportSecurityProperty
Value Bool
newValue, Maybe (Value Bool)
()
Value Integer
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
includeSubdomains :: Maybe (Value Bool)
preload :: Maybe (Value Bool)
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
includeSubdomains :: Maybe (Value Bool)
preload :: Maybe (Value Bool)
..}
instance Property "Preload" StrictTransportSecurityProperty where
type PropertyType "Preload" StrictTransportSecurityProperty = Value Prelude.Bool
set :: PropertyType "Preload" StrictTransportSecurityProperty
-> StrictTransportSecurityProperty
-> StrictTransportSecurityProperty
set PropertyType "Preload" StrictTransportSecurityProperty
newValue StrictTransportSecurityProperty {Maybe (Value Bool)
()
Value Bool
Value Integer
haddock_workaround_ :: StrictTransportSecurityProperty -> ()
accessControlMaxAgeSec :: StrictTransportSecurityProperty -> Value Integer
includeSubdomains :: StrictTransportSecurityProperty -> Maybe (Value Bool)
override :: StrictTransportSecurityProperty -> Value Bool
preload :: StrictTransportSecurityProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
includeSubdomains :: Maybe (Value Bool)
override :: Value Bool
preload :: Maybe (Value Bool)
..}
= StrictTransportSecurityProperty
{preload :: Maybe (Value Bool)
preload = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Preload" StrictTransportSecurityProperty
Value Bool
newValue, Maybe (Value Bool)
()
Value Bool
Value Integer
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
includeSubdomains :: Maybe (Value Bool)
override :: Value Bool
haddock_workaround_ :: ()
accessControlMaxAgeSec :: Value Integer
includeSubdomains :: Maybe (Value Bool)
override :: Value Bool
..}