module Stratosphere.NetworkManager.ConnectPeer.BgpOptionsProperty (
BgpOptionsProperty(..), mkBgpOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BgpOptionsProperty
=
BgpOptionsProperty {BgpOptionsProperty -> ()
haddock_workaround_ :: (),
BgpOptionsProperty -> Maybe (Value Double)
peerAsn :: (Prelude.Maybe (Value Prelude.Double))}
deriving stock (BgpOptionsProperty -> BgpOptionsProperty -> Bool
(BgpOptionsProperty -> BgpOptionsProperty -> Bool)
-> (BgpOptionsProperty -> BgpOptionsProperty -> Bool)
-> Eq BgpOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BgpOptionsProperty -> BgpOptionsProperty -> Bool
== :: BgpOptionsProperty -> BgpOptionsProperty -> Bool
$c/= :: BgpOptionsProperty -> BgpOptionsProperty -> Bool
/= :: BgpOptionsProperty -> BgpOptionsProperty -> Bool
Prelude.Eq, Int -> BgpOptionsProperty -> ShowS
[BgpOptionsProperty] -> ShowS
BgpOptionsProperty -> String
(Int -> BgpOptionsProperty -> ShowS)
-> (BgpOptionsProperty -> String)
-> ([BgpOptionsProperty] -> ShowS)
-> Show BgpOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BgpOptionsProperty -> ShowS
showsPrec :: Int -> BgpOptionsProperty -> ShowS
$cshow :: BgpOptionsProperty -> String
show :: BgpOptionsProperty -> String
$cshowList :: [BgpOptionsProperty] -> ShowS
showList :: [BgpOptionsProperty] -> ShowS
Prelude.Show)
mkBgpOptionsProperty :: BgpOptionsProperty
mkBgpOptionsProperty :: BgpOptionsProperty
mkBgpOptionsProperty
= BgpOptionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), peerAsn :: Maybe (Value Double)
peerAsn = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BgpOptionsProperty where
toResourceProperties :: BgpOptionsProperty -> ResourceProperties
toResourceProperties BgpOptionsProperty {Maybe (Value Double)
()
haddock_workaround_ :: BgpOptionsProperty -> ()
peerAsn :: BgpOptionsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
peerAsn :: Maybe (Value Double)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::NetworkManager::ConnectPeer.BgpOptions",
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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PeerAsn" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
peerAsn])}
instance JSON.ToJSON BgpOptionsProperty where
toJSON :: BgpOptionsProperty -> Value
toJSON BgpOptionsProperty {Maybe (Value Double)
()
haddock_workaround_ :: BgpOptionsProperty -> ()
peerAsn :: BgpOptionsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
peerAsn :: Maybe (Value Double)
..}
= [(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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PeerAsn" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
peerAsn]))
instance Property "PeerAsn" BgpOptionsProperty where
type PropertyType "PeerAsn" BgpOptionsProperty = Value Prelude.Double
set :: PropertyType "PeerAsn" BgpOptionsProperty
-> BgpOptionsProperty -> BgpOptionsProperty
set PropertyType "PeerAsn" BgpOptionsProperty
newValue BgpOptionsProperty {Maybe (Value Double)
()
haddock_workaround_ :: BgpOptionsProperty -> ()
peerAsn :: BgpOptionsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
peerAsn :: Maybe (Value Double)
..}
= BgpOptionsProperty {peerAsn :: Maybe (Value Double)
peerAsn = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PeerAsn" BgpOptionsProperty
Value Double
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}