module Stratosphere.NetworkManager.CustomerGatewayAssociation (
CustomerGatewayAssociation(..), mkCustomerGatewayAssociation
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomerGatewayAssociation
=
CustomerGatewayAssociation {CustomerGatewayAssociation -> ()
haddock_workaround_ :: (),
CustomerGatewayAssociation -> Value Text
customerGatewayArn :: (Value Prelude.Text),
CustomerGatewayAssociation -> Value Text
deviceId :: (Value Prelude.Text),
CustomerGatewayAssociation -> Value Text
globalNetworkId :: (Value Prelude.Text),
CustomerGatewayAssociation -> Maybe (Value Text)
linkId :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool
(CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool)
-> (CustomerGatewayAssociation
-> CustomerGatewayAssociation -> Bool)
-> Eq CustomerGatewayAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool
== :: CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool
$c/= :: CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool
/= :: CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool
Prelude.Eq, Int -> CustomerGatewayAssociation -> ShowS
[CustomerGatewayAssociation] -> ShowS
CustomerGatewayAssociation -> String
(Int -> CustomerGatewayAssociation -> ShowS)
-> (CustomerGatewayAssociation -> String)
-> ([CustomerGatewayAssociation] -> ShowS)
-> Show CustomerGatewayAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomerGatewayAssociation -> ShowS
showsPrec :: Int -> CustomerGatewayAssociation -> ShowS
$cshow :: CustomerGatewayAssociation -> String
show :: CustomerGatewayAssociation -> String
$cshowList :: [CustomerGatewayAssociation] -> ShowS
showList :: [CustomerGatewayAssociation] -> ShowS
Prelude.Show)
mkCustomerGatewayAssociation ::
Value Prelude.Text
-> Value Prelude.Text
-> Value Prelude.Text -> CustomerGatewayAssociation
mkCustomerGatewayAssociation :: Value Text
-> Value Text -> Value Text -> CustomerGatewayAssociation
mkCustomerGatewayAssociation
Value Text
customerGatewayArn
Value Text
deviceId
Value Text
globalNetworkId
= CustomerGatewayAssociation
{haddock_workaround_ :: ()
haddock_workaround_ = (), customerGatewayArn :: Value Text
customerGatewayArn = Value Text
customerGatewayArn,
deviceId :: Value Text
deviceId = Value Text
deviceId, globalNetworkId :: Value Text
globalNetworkId = Value Text
globalNetworkId,
linkId :: Maybe (Value Text)
linkId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomerGatewayAssociation where
toResourceProperties :: CustomerGatewayAssociation -> ResourceProperties
toResourceProperties CustomerGatewayAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomerGatewayAssociation -> ()
customerGatewayArn :: CustomerGatewayAssociation -> Value Text
deviceId :: CustomerGatewayAssociation -> Value Text
globalNetworkId :: CustomerGatewayAssociation -> Value Text
linkId :: CustomerGatewayAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
deviceId :: Value Text
globalNetworkId :: Value Text
linkId :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::NetworkManager::CustomerGatewayAssociation",
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
"CustomerGatewayArn" 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
customerGatewayArn,
Key
"DeviceId" 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
deviceId,
Key
"GlobalNetworkId" 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
globalNetworkId]
([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
"LinkId" (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)
linkId]))}
instance JSON.ToJSON CustomerGatewayAssociation where
toJSON :: CustomerGatewayAssociation -> Value
toJSON CustomerGatewayAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomerGatewayAssociation -> ()
customerGatewayArn :: CustomerGatewayAssociation -> Value Text
deviceId :: CustomerGatewayAssociation -> Value Text
globalNetworkId :: CustomerGatewayAssociation -> Value Text
linkId :: CustomerGatewayAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
deviceId :: Value Text
globalNetworkId :: Value Text
linkId :: 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
"CustomerGatewayArn" 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
customerGatewayArn,
Key
"DeviceId" 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
deviceId,
Key
"GlobalNetworkId" 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
globalNetworkId]
([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
"LinkId" (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)
linkId])))
instance Property "CustomerGatewayArn" CustomerGatewayAssociation where
type PropertyType "CustomerGatewayArn" CustomerGatewayAssociation = Value Prelude.Text
set :: PropertyType "CustomerGatewayArn" CustomerGatewayAssociation
-> CustomerGatewayAssociation -> CustomerGatewayAssociation
set PropertyType "CustomerGatewayArn" CustomerGatewayAssociation
newValue CustomerGatewayAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomerGatewayAssociation -> ()
customerGatewayArn :: CustomerGatewayAssociation -> Value Text
deviceId :: CustomerGatewayAssociation -> Value Text
globalNetworkId :: CustomerGatewayAssociation -> Value Text
linkId :: CustomerGatewayAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
deviceId :: Value Text
globalNetworkId :: Value Text
linkId :: Maybe (Value Text)
..}
= CustomerGatewayAssociation {customerGatewayArn :: Value Text
customerGatewayArn = PropertyType "CustomerGatewayArn" CustomerGatewayAssociation
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
deviceId :: Value Text
globalNetworkId :: Value Text
linkId :: Maybe (Value Text)
haddock_workaround_ :: ()
deviceId :: Value Text
globalNetworkId :: Value Text
linkId :: Maybe (Value Text)
..}
instance Property "DeviceId" CustomerGatewayAssociation where
type PropertyType "DeviceId" CustomerGatewayAssociation = Value Prelude.Text
set :: PropertyType "DeviceId" CustomerGatewayAssociation
-> CustomerGatewayAssociation -> CustomerGatewayAssociation
set PropertyType "DeviceId" CustomerGatewayAssociation
newValue CustomerGatewayAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomerGatewayAssociation -> ()
customerGatewayArn :: CustomerGatewayAssociation -> Value Text
deviceId :: CustomerGatewayAssociation -> Value Text
globalNetworkId :: CustomerGatewayAssociation -> Value Text
linkId :: CustomerGatewayAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
deviceId :: Value Text
globalNetworkId :: Value Text
linkId :: Maybe (Value Text)
..}
= CustomerGatewayAssociation {deviceId :: Value Text
deviceId = PropertyType "DeviceId" CustomerGatewayAssociation
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
globalNetworkId :: Value Text
linkId :: Maybe (Value Text)
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
globalNetworkId :: Value Text
linkId :: Maybe (Value Text)
..}
instance Property "GlobalNetworkId" CustomerGatewayAssociation where
type PropertyType "GlobalNetworkId" CustomerGatewayAssociation = Value Prelude.Text
set :: PropertyType "GlobalNetworkId" CustomerGatewayAssociation
-> CustomerGatewayAssociation -> CustomerGatewayAssociation
set PropertyType "GlobalNetworkId" CustomerGatewayAssociation
newValue CustomerGatewayAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomerGatewayAssociation -> ()
customerGatewayArn :: CustomerGatewayAssociation -> Value Text
deviceId :: CustomerGatewayAssociation -> Value Text
globalNetworkId :: CustomerGatewayAssociation -> Value Text
linkId :: CustomerGatewayAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
deviceId :: Value Text
globalNetworkId :: Value Text
linkId :: Maybe (Value Text)
..}
= CustomerGatewayAssociation {globalNetworkId :: Value Text
globalNetworkId = PropertyType "GlobalNetworkId" CustomerGatewayAssociation
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
deviceId :: Value Text
linkId :: Maybe (Value Text)
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
deviceId :: Value Text
linkId :: Maybe (Value Text)
..}
instance Property "LinkId" CustomerGatewayAssociation where
type PropertyType "LinkId" CustomerGatewayAssociation = Value Prelude.Text
set :: PropertyType "LinkId" CustomerGatewayAssociation
-> CustomerGatewayAssociation -> CustomerGatewayAssociation
set PropertyType "LinkId" CustomerGatewayAssociation
newValue CustomerGatewayAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CustomerGatewayAssociation -> ()
customerGatewayArn :: CustomerGatewayAssociation -> Value Text
deviceId :: CustomerGatewayAssociation -> Value Text
globalNetworkId :: CustomerGatewayAssociation -> Value Text
linkId :: CustomerGatewayAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
deviceId :: Value Text
globalNetworkId :: Value Text
linkId :: Maybe (Value Text)
..}
= CustomerGatewayAssociation {linkId :: Maybe (Value Text)
linkId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LinkId" CustomerGatewayAssociation
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
deviceId :: Value Text
globalNetworkId :: Value Text
haddock_workaround_ :: ()
customerGatewayArn :: Value Text
deviceId :: Value Text
globalNetworkId :: Value Text
..}