module Stratosphere.CloudFront.VpcOrigin (
module Exports, VpcOrigin(..), mkVpcOrigin
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CloudFront.VpcOrigin.VpcOriginEndpointConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
data VpcOrigin
=
VpcOrigin {VpcOrigin -> ()
haddock_workaround_ :: (),
VpcOrigin -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
VpcOrigin -> VpcOriginEndpointConfigProperty
vpcOriginEndpointConfig :: VpcOriginEndpointConfigProperty}
deriving stock (VpcOrigin -> VpcOrigin -> Bool
(VpcOrigin -> VpcOrigin -> Bool)
-> (VpcOrigin -> VpcOrigin -> Bool) -> Eq VpcOrigin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VpcOrigin -> VpcOrigin -> Bool
== :: VpcOrigin -> VpcOrigin -> Bool
$c/= :: VpcOrigin -> VpcOrigin -> Bool
/= :: VpcOrigin -> VpcOrigin -> Bool
Prelude.Eq, Int -> VpcOrigin -> ShowS
[VpcOrigin] -> ShowS
VpcOrigin -> String
(Int -> VpcOrigin -> ShowS)
-> (VpcOrigin -> String)
-> ([VpcOrigin] -> ShowS)
-> Show VpcOrigin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VpcOrigin -> ShowS
showsPrec :: Int -> VpcOrigin -> ShowS
$cshow :: VpcOrigin -> String
show :: VpcOrigin -> String
$cshowList :: [VpcOrigin] -> ShowS
showList :: [VpcOrigin] -> ShowS
Prelude.Show)
mkVpcOrigin :: VpcOriginEndpointConfigProperty -> VpcOrigin
mkVpcOrigin :: VpcOriginEndpointConfigProperty -> VpcOrigin
mkVpcOrigin VpcOriginEndpointConfigProperty
vpcOriginEndpointConfig
= VpcOrigin
{haddock_workaround_ :: ()
haddock_workaround_ = (),
vpcOriginEndpointConfig :: VpcOriginEndpointConfigProperty
vpcOriginEndpointConfig = VpcOriginEndpointConfigProperty
vpcOriginEndpointConfig,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VpcOrigin where
toResourceProperties :: VpcOrigin -> ResourceProperties
toResourceProperties VpcOrigin {Maybe [Tag]
()
VpcOriginEndpointConfigProperty
haddock_workaround_ :: VpcOrigin -> ()
tags :: VpcOrigin -> Maybe [Tag]
vpcOriginEndpointConfig :: VpcOrigin -> VpcOriginEndpointConfigProperty
haddock_workaround_ :: ()
tags :: Maybe [Tag]
vpcOriginEndpointConfig :: VpcOriginEndpointConfigProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CloudFront::VpcOrigin",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"VpcOriginEndpointConfig" Key -> VpcOriginEndpointConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= VpcOriginEndpointConfigProperty
vpcOriginEndpointConfig]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON VpcOrigin where
toJSON :: VpcOrigin -> Value
toJSON VpcOrigin {Maybe [Tag]
()
VpcOriginEndpointConfigProperty
haddock_workaround_ :: VpcOrigin -> ()
tags :: VpcOrigin -> Maybe [Tag]
vpcOriginEndpointConfig :: VpcOrigin -> VpcOriginEndpointConfigProperty
haddock_workaround_ :: ()
tags :: Maybe [Tag]
vpcOriginEndpointConfig :: VpcOriginEndpointConfigProperty
..}
= [(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
"VpcOriginEndpointConfig" Key -> VpcOriginEndpointConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= VpcOriginEndpointConfigProperty
vpcOriginEndpointConfig]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Tags" VpcOrigin where
type PropertyType "Tags" VpcOrigin = [Tag]
set :: PropertyType "Tags" VpcOrigin -> VpcOrigin -> VpcOrigin
set PropertyType "Tags" VpcOrigin
newValue VpcOrigin {Maybe [Tag]
()
VpcOriginEndpointConfigProperty
haddock_workaround_ :: VpcOrigin -> ()
tags :: VpcOrigin -> Maybe [Tag]
vpcOriginEndpointConfig :: VpcOrigin -> VpcOriginEndpointConfigProperty
haddock_workaround_ :: ()
tags :: Maybe [Tag]
vpcOriginEndpointConfig :: VpcOriginEndpointConfigProperty
..}
= VpcOrigin {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" VpcOrigin
newValue, ()
VpcOriginEndpointConfigProperty
haddock_workaround_ :: ()
vpcOriginEndpointConfig :: VpcOriginEndpointConfigProperty
haddock_workaround_ :: ()
vpcOriginEndpointConfig :: VpcOriginEndpointConfigProperty
..}
instance Property "VpcOriginEndpointConfig" VpcOrigin where
type PropertyType "VpcOriginEndpointConfig" VpcOrigin = VpcOriginEndpointConfigProperty
set :: PropertyType "VpcOriginEndpointConfig" VpcOrigin
-> VpcOrigin -> VpcOrigin
set PropertyType "VpcOriginEndpointConfig" VpcOrigin
newValue VpcOrigin {Maybe [Tag]
()
VpcOriginEndpointConfigProperty
haddock_workaround_ :: VpcOrigin -> ()
tags :: VpcOrigin -> Maybe [Tag]
vpcOriginEndpointConfig :: VpcOrigin -> VpcOriginEndpointConfigProperty
haddock_workaround_ :: ()
tags :: Maybe [Tag]
vpcOriginEndpointConfig :: VpcOriginEndpointConfigProperty
..}
= VpcOrigin {vpcOriginEndpointConfig :: VpcOriginEndpointConfigProperty
vpcOriginEndpointConfig = PropertyType "VpcOriginEndpointConfig" VpcOrigin
VpcOriginEndpointConfigProperty
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}