module Stratosphere.Lightsail.Distribution.InputOriginProperty (
InputOriginProperty(..), mkInputOriginProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InputOriginProperty
=
InputOriginProperty {InputOriginProperty -> ()
haddock_workaround_ :: (),
InputOriginProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
InputOriginProperty -> Maybe (Value Text)
protocolPolicy :: (Prelude.Maybe (Value Prelude.Text)),
InputOriginProperty -> Maybe (Value Text)
regionName :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (InputOriginProperty -> InputOriginProperty -> Bool
(InputOriginProperty -> InputOriginProperty -> Bool)
-> (InputOriginProperty -> InputOriginProperty -> Bool)
-> Eq InputOriginProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InputOriginProperty -> InputOriginProperty -> Bool
== :: InputOriginProperty -> InputOriginProperty -> Bool
$c/= :: InputOriginProperty -> InputOriginProperty -> Bool
/= :: InputOriginProperty -> InputOriginProperty -> Bool
Prelude.Eq, Int -> InputOriginProperty -> ShowS
[InputOriginProperty] -> ShowS
InputOriginProperty -> String
(Int -> InputOriginProperty -> ShowS)
-> (InputOriginProperty -> String)
-> ([InputOriginProperty] -> ShowS)
-> Show InputOriginProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InputOriginProperty -> ShowS
showsPrec :: Int -> InputOriginProperty -> ShowS
$cshow :: InputOriginProperty -> String
show :: InputOriginProperty -> String
$cshowList :: [InputOriginProperty] -> ShowS
showList :: [InputOriginProperty] -> ShowS
Prelude.Show)
mkInputOriginProperty :: InputOriginProperty
mkInputOriginProperty :: InputOriginProperty
mkInputOriginProperty
= InputOriginProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
protocolPolicy :: Maybe (Value Text)
protocolPolicy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, regionName :: Maybe (Value Text)
regionName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InputOriginProperty where
toResourceProperties :: InputOriginProperty -> ResourceProperties
toResourceProperties InputOriginProperty {Maybe (Value Text)
()
haddock_workaround_ :: InputOriginProperty -> ()
name :: InputOriginProperty -> Maybe (Value Text)
protocolPolicy :: InputOriginProperty -> Maybe (Value Text)
regionName :: InputOriginProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
protocolPolicy :: Maybe (Value Text)
regionName :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lightsail::Distribution.InputOrigin",
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 -> 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
"ProtocolPolicy" (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)
protocolPolicy,
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
"RegionName" (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)
regionName])}
instance JSON.ToJSON InputOriginProperty where
toJSON :: InputOriginProperty -> Value
toJSON InputOriginProperty {Maybe (Value Text)
()
haddock_workaround_ :: InputOriginProperty -> ()
name :: InputOriginProperty -> Maybe (Value Text)
protocolPolicy :: InputOriginProperty -> Maybe (Value Text)
regionName :: InputOriginProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
protocolPolicy :: Maybe (Value Text)
regionName :: 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 -> 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
"ProtocolPolicy" (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)
protocolPolicy,
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
"RegionName" (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)
regionName]))
instance Property "Name" InputOriginProperty where
type PropertyType "Name" InputOriginProperty = Value Prelude.Text
set :: PropertyType "Name" InputOriginProperty
-> InputOriginProperty -> InputOriginProperty
set PropertyType "Name" InputOriginProperty
newValue InputOriginProperty {Maybe (Value Text)
()
haddock_workaround_ :: InputOriginProperty -> ()
name :: InputOriginProperty -> Maybe (Value Text)
protocolPolicy :: InputOriginProperty -> Maybe (Value Text)
regionName :: InputOriginProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
protocolPolicy :: Maybe (Value Text)
regionName :: Maybe (Value Text)
..}
= InputOriginProperty {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" InputOriginProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
protocolPolicy :: Maybe (Value Text)
regionName :: Maybe (Value Text)
haddock_workaround_ :: ()
protocolPolicy :: Maybe (Value Text)
regionName :: Maybe (Value Text)
..}
instance Property "ProtocolPolicy" InputOriginProperty where
type PropertyType "ProtocolPolicy" InputOriginProperty = Value Prelude.Text
set :: PropertyType "ProtocolPolicy" InputOriginProperty
-> InputOriginProperty -> InputOriginProperty
set PropertyType "ProtocolPolicy" InputOriginProperty
newValue InputOriginProperty {Maybe (Value Text)
()
haddock_workaround_ :: InputOriginProperty -> ()
name :: InputOriginProperty -> Maybe (Value Text)
protocolPolicy :: InputOriginProperty -> Maybe (Value Text)
regionName :: InputOriginProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
protocolPolicy :: Maybe (Value Text)
regionName :: Maybe (Value Text)
..}
= InputOriginProperty {protocolPolicy :: Maybe (Value Text)
protocolPolicy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ProtocolPolicy" InputOriginProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
regionName :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
regionName :: Maybe (Value Text)
..}
instance Property "RegionName" InputOriginProperty where
type PropertyType "RegionName" InputOriginProperty = Value Prelude.Text
set :: PropertyType "RegionName" InputOriginProperty
-> InputOriginProperty -> InputOriginProperty
set PropertyType "RegionName" InputOriginProperty
newValue InputOriginProperty {Maybe (Value Text)
()
haddock_workaround_ :: InputOriginProperty -> ()
name :: InputOriginProperty -> Maybe (Value Text)
protocolPolicy :: InputOriginProperty -> Maybe (Value Text)
regionName :: InputOriginProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
protocolPolicy :: Maybe (Value Text)
regionName :: Maybe (Value Text)
..}
= InputOriginProperty {regionName :: Maybe (Value Text)
regionName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RegionName" InputOriginProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
protocolPolicy :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
protocolPolicy :: Maybe (Value Text)
..}