module Stratosphere.EC2.RouteServerPeer.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
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-routeserverpeer-bgpoptions.html>
    BgpOptionsProperty {BgpOptionsProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-routeserverpeer-bgpoptions.html#cfn-ec2-routeserverpeer-bgpoptions-peerasn>
                        BgpOptionsProperty -> Maybe (Value Integer)
peerAsn :: (Prelude.Maybe (Value Prelude.Integer)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-routeserverpeer-bgpoptions.html#cfn-ec2-routeserverpeer-bgpoptions-peerlivenessdetection>
                        BgpOptionsProperty -> Maybe (Value Text)
peerLivenessDetection :: (Prelude.Maybe (Value Prelude.Text))}
  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 Integer)
peerAsn = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       peerLivenessDetection :: Maybe (Value Text)
peerLivenessDetection = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BgpOptionsProperty where
  toResourceProperties :: BgpOptionsProperty -> ResourceProperties
toResourceProperties BgpOptionsProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: BgpOptionsProperty -> ()
peerAsn :: BgpOptionsProperty -> Maybe (Value Integer)
peerLivenessDetection :: BgpOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
peerAsn :: Maybe (Value Integer)
peerLivenessDetection :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::RouteServerPeer.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 Integer -> (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 Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
peerAsn,
                            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
"PeerLivenessDetection"
                              (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)
peerLivenessDetection])}
instance JSON.ToJSON BgpOptionsProperty where
  toJSON :: BgpOptionsProperty -> Value
toJSON BgpOptionsProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: BgpOptionsProperty -> ()
peerAsn :: BgpOptionsProperty -> Maybe (Value Integer)
peerLivenessDetection :: BgpOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
peerAsn :: Maybe (Value Integer)
peerLivenessDetection :: Maybe (Value Text)
..}
    = [(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 Integer -> (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 Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
peerAsn,
               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
"PeerLivenessDetection"
                 (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)
peerLivenessDetection]))
instance Property "PeerAsn" BgpOptionsProperty where
  type PropertyType "PeerAsn" BgpOptionsProperty = Value Prelude.Integer
  set :: PropertyType "PeerAsn" BgpOptionsProperty
-> BgpOptionsProperty -> BgpOptionsProperty
set PropertyType "PeerAsn" BgpOptionsProperty
newValue BgpOptionsProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: BgpOptionsProperty -> ()
peerAsn :: BgpOptionsProperty -> Maybe (Value Integer)
peerLivenessDetection :: BgpOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
peerAsn :: Maybe (Value Integer)
peerLivenessDetection :: Maybe (Value Text)
..}
    = BgpOptionsProperty {peerAsn :: Maybe (Value Integer)
peerAsn = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PeerAsn" BgpOptionsProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
peerLivenessDetection :: Maybe (Value Text)
haddock_workaround_ :: ()
peerLivenessDetection :: Maybe (Value Text)
..}
instance Property "PeerLivenessDetection" BgpOptionsProperty where
  type PropertyType "PeerLivenessDetection" BgpOptionsProperty = Value Prelude.Text
  set :: PropertyType "PeerLivenessDetection" BgpOptionsProperty
-> BgpOptionsProperty -> BgpOptionsProperty
set PropertyType "PeerLivenessDetection" BgpOptionsProperty
newValue BgpOptionsProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: BgpOptionsProperty -> ()
peerAsn :: BgpOptionsProperty -> Maybe (Value Integer)
peerLivenessDetection :: BgpOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
peerAsn :: Maybe (Value Integer)
peerLivenessDetection :: Maybe (Value Text)
..}
    = BgpOptionsProperty
        {peerLivenessDetection :: Maybe (Value Text)
peerLivenessDetection = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PeerLivenessDetection" BgpOptionsProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
peerAsn :: Maybe (Value Integer)
haddock_workaround_ :: ()
peerAsn :: Maybe (Value Integer)
..}