module Stratosphere.EC2.CarrierGateway (
CarrierGateway(..), mkCarrierGateway
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data CarrierGateway
=
CarrierGateway {CarrierGateway -> ()
haddock_workaround_ :: (),
CarrierGateway -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
CarrierGateway -> Value Text
vpcId :: (Value Prelude.Text)}
deriving stock (CarrierGateway -> CarrierGateway -> Bool
(CarrierGateway -> CarrierGateway -> Bool)
-> (CarrierGateway -> CarrierGateway -> Bool) -> Eq CarrierGateway
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CarrierGateway -> CarrierGateway -> Bool
== :: CarrierGateway -> CarrierGateway -> Bool
$c/= :: CarrierGateway -> CarrierGateway -> Bool
/= :: CarrierGateway -> CarrierGateway -> Bool
Prelude.Eq, Int -> CarrierGateway -> ShowS
[CarrierGateway] -> ShowS
CarrierGateway -> String
(Int -> CarrierGateway -> ShowS)
-> (CarrierGateway -> String)
-> ([CarrierGateway] -> ShowS)
-> Show CarrierGateway
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CarrierGateway -> ShowS
showsPrec :: Int -> CarrierGateway -> ShowS
$cshow :: CarrierGateway -> String
show :: CarrierGateway -> String
$cshowList :: [CarrierGateway] -> ShowS
showList :: [CarrierGateway] -> ShowS
Prelude.Show)
mkCarrierGateway :: Value Prelude.Text -> CarrierGateway
mkCarrierGateway :: Value Text -> CarrierGateway
mkCarrierGateway Value Text
vpcId
= CarrierGateway
{haddock_workaround_ :: ()
haddock_workaround_ = (), vpcId :: Value Text
vpcId = Value Text
vpcId, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CarrierGateway where
toResourceProperties :: CarrierGateway -> ResourceProperties
toResourceProperties CarrierGateway {Maybe [Tag]
()
Value Text
haddock_workaround_ :: CarrierGateway -> ()
tags :: CarrierGateway -> Maybe [Tag]
vpcId :: CarrierGateway -> Value Text
haddock_workaround_ :: ()
tags :: Maybe [Tag]
vpcId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::CarrierGateway", 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
"VpcId" 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
vpcId]
([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 CarrierGateway where
toJSON :: CarrierGateway -> Value
toJSON CarrierGateway {Maybe [Tag]
()
Value Text
haddock_workaround_ :: CarrierGateway -> ()
tags :: CarrierGateway -> Maybe [Tag]
vpcId :: CarrierGateway -> Value Text
haddock_workaround_ :: ()
tags :: Maybe [Tag]
vpcId :: 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
"VpcId" 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
vpcId]
([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" CarrierGateway where
type PropertyType "Tags" CarrierGateway = [Tag]
set :: PropertyType "Tags" CarrierGateway
-> CarrierGateway -> CarrierGateway
set PropertyType "Tags" CarrierGateway
newValue CarrierGateway {Maybe [Tag]
()
Value Text
haddock_workaround_ :: CarrierGateway -> ()
tags :: CarrierGateway -> Maybe [Tag]
vpcId :: CarrierGateway -> Value Text
haddock_workaround_ :: ()
tags :: Maybe [Tag]
vpcId :: Value Text
..}
= CarrierGateway {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" CarrierGateway
newValue, ()
Value Text
haddock_workaround_ :: ()
vpcId :: Value Text
haddock_workaround_ :: ()
vpcId :: Value Text
..}
instance Property "VpcId" CarrierGateway where
type PropertyType "VpcId" CarrierGateway = Value Prelude.Text
set :: PropertyType "VpcId" CarrierGateway
-> CarrierGateway -> CarrierGateway
set PropertyType "VpcId" CarrierGateway
newValue CarrierGateway {Maybe [Tag]
()
Value Text
haddock_workaround_ :: CarrierGateway -> ()
tags :: CarrierGateway -> Maybe [Tag]
vpcId :: CarrierGateway -> Value Text
haddock_workaround_ :: ()
tags :: Maybe [Tag]
vpcId :: Value Text
..}
= CarrierGateway {vpcId :: Value Text
vpcId = PropertyType "VpcId" CarrierGateway
Value Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}