module Stratosphere.EC2.RouteServerPeer (
module Exports, RouteServerPeer(..), mkRouteServerPeer
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EC2.RouteServerPeer.BgpOptionsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data RouteServerPeer
=
RouteServerPeer {RouteServerPeer -> ()
haddock_workaround_ :: (),
RouteServerPeer -> BgpOptionsProperty
bgpOptions :: BgpOptionsProperty,
RouteServerPeer -> Value Text
peerAddress :: (Value Prelude.Text),
RouteServerPeer -> Value Text
routeServerEndpointId :: (Value Prelude.Text),
RouteServerPeer -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (RouteServerPeer -> RouteServerPeer -> Bool
(RouteServerPeer -> RouteServerPeer -> Bool)
-> (RouteServerPeer -> RouteServerPeer -> Bool)
-> Eq RouteServerPeer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RouteServerPeer -> RouteServerPeer -> Bool
== :: RouteServerPeer -> RouteServerPeer -> Bool
$c/= :: RouteServerPeer -> RouteServerPeer -> Bool
/= :: RouteServerPeer -> RouteServerPeer -> Bool
Prelude.Eq, Int -> RouteServerPeer -> ShowS
[RouteServerPeer] -> ShowS
RouteServerPeer -> String
(Int -> RouteServerPeer -> ShowS)
-> (RouteServerPeer -> String)
-> ([RouteServerPeer] -> ShowS)
-> Show RouteServerPeer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RouteServerPeer -> ShowS
showsPrec :: Int -> RouteServerPeer -> ShowS
$cshow :: RouteServerPeer -> String
show :: RouteServerPeer -> String
$cshowList :: [RouteServerPeer] -> ShowS
showList :: [RouteServerPeer] -> ShowS
Prelude.Show)
mkRouteServerPeer ::
BgpOptionsProperty
-> Value Prelude.Text -> Value Prelude.Text -> RouteServerPeer
mkRouteServerPeer :: BgpOptionsProperty -> Value Text -> Value Text -> RouteServerPeer
mkRouteServerPeer BgpOptionsProperty
bgpOptions Value Text
peerAddress Value Text
routeServerEndpointId
= RouteServerPeer
{haddock_workaround_ :: ()
haddock_workaround_ = (), bgpOptions :: BgpOptionsProperty
bgpOptions = BgpOptionsProperty
bgpOptions,
peerAddress :: Value Text
peerAddress = Value Text
peerAddress,
routeServerEndpointId :: Value Text
routeServerEndpointId = Value Text
routeServerEndpointId,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RouteServerPeer where
toResourceProperties :: RouteServerPeer -> ResourceProperties
toResourceProperties RouteServerPeer {Maybe [Tag]
()
Value Text
BgpOptionsProperty
haddock_workaround_ :: RouteServerPeer -> ()
bgpOptions :: RouteServerPeer -> BgpOptionsProperty
peerAddress :: RouteServerPeer -> Value Text
routeServerEndpointId :: RouteServerPeer -> Value Text
tags :: RouteServerPeer -> Maybe [Tag]
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
peerAddress :: Value Text
routeServerEndpointId :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::RouteServerPeer",
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
"BgpOptions" Key -> BgpOptionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= BgpOptionsProperty
bgpOptions,
Key
"PeerAddress" 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
peerAddress,
Key
"RouteServerEndpointId" 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
routeServerEndpointId]
([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 RouteServerPeer where
toJSON :: RouteServerPeer -> Value
toJSON RouteServerPeer {Maybe [Tag]
()
Value Text
BgpOptionsProperty
haddock_workaround_ :: RouteServerPeer -> ()
bgpOptions :: RouteServerPeer -> BgpOptionsProperty
peerAddress :: RouteServerPeer -> Value Text
routeServerEndpointId :: RouteServerPeer -> Value Text
tags :: RouteServerPeer -> Maybe [Tag]
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
peerAddress :: Value Text
routeServerEndpointId :: Value Text
tags :: Maybe [Tag]
..}
= [(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
"BgpOptions" Key -> BgpOptionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= BgpOptionsProperty
bgpOptions,
Key
"PeerAddress" 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
peerAddress,
Key
"RouteServerEndpointId" 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
routeServerEndpointId]
([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 "BgpOptions" RouteServerPeer where
type PropertyType "BgpOptions" RouteServerPeer = BgpOptionsProperty
set :: PropertyType "BgpOptions" RouteServerPeer
-> RouteServerPeer -> RouteServerPeer
set PropertyType "BgpOptions" RouteServerPeer
newValue RouteServerPeer {Maybe [Tag]
()
Value Text
BgpOptionsProperty
haddock_workaround_ :: RouteServerPeer -> ()
bgpOptions :: RouteServerPeer -> BgpOptionsProperty
peerAddress :: RouteServerPeer -> Value Text
routeServerEndpointId :: RouteServerPeer -> Value Text
tags :: RouteServerPeer -> Maybe [Tag]
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
peerAddress :: Value Text
routeServerEndpointId :: Value Text
tags :: Maybe [Tag]
..}
= RouteServerPeer {bgpOptions :: BgpOptionsProperty
bgpOptions = PropertyType "BgpOptions" RouteServerPeer
BgpOptionsProperty
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
peerAddress :: Value Text
routeServerEndpointId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
peerAddress :: Value Text
routeServerEndpointId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "PeerAddress" RouteServerPeer where
type PropertyType "PeerAddress" RouteServerPeer = Value Prelude.Text
set :: PropertyType "PeerAddress" RouteServerPeer
-> RouteServerPeer -> RouteServerPeer
set PropertyType "PeerAddress" RouteServerPeer
newValue RouteServerPeer {Maybe [Tag]
()
Value Text
BgpOptionsProperty
haddock_workaround_ :: RouteServerPeer -> ()
bgpOptions :: RouteServerPeer -> BgpOptionsProperty
peerAddress :: RouteServerPeer -> Value Text
routeServerEndpointId :: RouteServerPeer -> Value Text
tags :: RouteServerPeer -> Maybe [Tag]
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
peerAddress :: Value Text
routeServerEndpointId :: Value Text
tags :: Maybe [Tag]
..}
= RouteServerPeer {peerAddress :: Value Text
peerAddress = PropertyType "PeerAddress" RouteServerPeer
Value Text
newValue, Maybe [Tag]
()
Value Text
BgpOptionsProperty
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
routeServerEndpointId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
routeServerEndpointId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "RouteServerEndpointId" RouteServerPeer where
type PropertyType "RouteServerEndpointId" RouteServerPeer = Value Prelude.Text
set :: PropertyType "RouteServerEndpointId" RouteServerPeer
-> RouteServerPeer -> RouteServerPeer
set PropertyType "RouteServerEndpointId" RouteServerPeer
newValue RouteServerPeer {Maybe [Tag]
()
Value Text
BgpOptionsProperty
haddock_workaround_ :: RouteServerPeer -> ()
bgpOptions :: RouteServerPeer -> BgpOptionsProperty
peerAddress :: RouteServerPeer -> Value Text
routeServerEndpointId :: RouteServerPeer -> Value Text
tags :: RouteServerPeer -> Maybe [Tag]
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
peerAddress :: Value Text
routeServerEndpointId :: Value Text
tags :: Maybe [Tag]
..}
= RouteServerPeer {routeServerEndpointId :: Value Text
routeServerEndpointId = PropertyType "RouteServerEndpointId" RouteServerPeer
Value Text
newValue, Maybe [Tag]
()
Value Text
BgpOptionsProperty
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
peerAddress :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
peerAddress :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" RouteServerPeer where
type PropertyType "Tags" RouteServerPeer = [Tag]
set :: PropertyType "Tags" RouteServerPeer
-> RouteServerPeer -> RouteServerPeer
set PropertyType "Tags" RouteServerPeer
newValue RouteServerPeer {Maybe [Tag]
()
Value Text
BgpOptionsProperty
haddock_workaround_ :: RouteServerPeer -> ()
bgpOptions :: RouteServerPeer -> BgpOptionsProperty
peerAddress :: RouteServerPeer -> Value Text
routeServerEndpointId :: RouteServerPeer -> Value Text
tags :: RouteServerPeer -> Maybe [Tag]
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
peerAddress :: Value Text
routeServerEndpointId :: Value Text
tags :: Maybe [Tag]
..}
= RouteServerPeer {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" RouteServerPeer
newValue, ()
Value Text
BgpOptionsProperty
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
peerAddress :: Value Text
routeServerEndpointId :: Value Text
haddock_workaround_ :: ()
bgpOptions :: BgpOptionsProperty
peerAddress :: Value Text
routeServerEndpointId :: Value Text
..}