module Stratosphere.EC2.TransitGatewayConnect.TransitGatewayConnectOptionsProperty (
        TransitGatewayConnectOptionsProperty(..),
        mkTransitGatewayConnectOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TransitGatewayConnectOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-transitgatewayconnect-transitgatewayconnectoptions.html>
    TransitGatewayConnectOptionsProperty {TransitGatewayConnectOptionsProperty -> ()
haddock_workaround_ :: (),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-transitgatewayconnect-transitgatewayconnectoptions.html#cfn-ec2-transitgatewayconnect-transitgatewayconnectoptions-protocol>
                                          TransitGatewayConnectOptionsProperty -> Maybe (Value Text)
protocol :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (TransitGatewayConnectOptionsProperty
-> TransitGatewayConnectOptionsProperty -> Bool
(TransitGatewayConnectOptionsProperty
 -> TransitGatewayConnectOptionsProperty -> Bool)
-> (TransitGatewayConnectOptionsProperty
    -> TransitGatewayConnectOptionsProperty -> Bool)
-> Eq TransitGatewayConnectOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransitGatewayConnectOptionsProperty
-> TransitGatewayConnectOptionsProperty -> Bool
== :: TransitGatewayConnectOptionsProperty
-> TransitGatewayConnectOptionsProperty -> Bool
$c/= :: TransitGatewayConnectOptionsProperty
-> TransitGatewayConnectOptionsProperty -> Bool
/= :: TransitGatewayConnectOptionsProperty
-> TransitGatewayConnectOptionsProperty -> Bool
Prelude.Eq, Int -> TransitGatewayConnectOptionsProperty -> ShowS
[TransitGatewayConnectOptionsProperty] -> ShowS
TransitGatewayConnectOptionsProperty -> String
(Int -> TransitGatewayConnectOptionsProperty -> ShowS)
-> (TransitGatewayConnectOptionsProperty -> String)
-> ([TransitGatewayConnectOptionsProperty] -> ShowS)
-> Show TransitGatewayConnectOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransitGatewayConnectOptionsProperty -> ShowS
showsPrec :: Int -> TransitGatewayConnectOptionsProperty -> ShowS
$cshow :: TransitGatewayConnectOptionsProperty -> String
show :: TransitGatewayConnectOptionsProperty -> String
$cshowList :: [TransitGatewayConnectOptionsProperty] -> ShowS
showList :: [TransitGatewayConnectOptionsProperty] -> ShowS
Prelude.Show)
mkTransitGatewayConnectOptionsProperty ::
  TransitGatewayConnectOptionsProperty
mkTransitGatewayConnectOptionsProperty :: TransitGatewayConnectOptionsProperty
mkTransitGatewayConnectOptionsProperty
  = TransitGatewayConnectOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), protocol :: Maybe (Value Text)
protocol = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TransitGatewayConnectOptionsProperty where
  toResourceProperties :: TransitGatewayConnectOptionsProperty -> ResourceProperties
toResourceProperties TransitGatewayConnectOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: TransitGatewayConnectOptionsProperty -> ()
protocol :: TransitGatewayConnectOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
protocol :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::TransitGatewayConnect.TransitGatewayConnectOptions",
         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 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
"Protocol" (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)
protocol])}
instance JSON.ToJSON TransitGatewayConnectOptionsProperty where
  toJSON :: TransitGatewayConnectOptionsProperty -> Value
toJSON TransitGatewayConnectOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: TransitGatewayConnectOptionsProperty -> ()
protocol :: TransitGatewayConnectOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
protocol :: 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 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
"Protocol" (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)
protocol]))
instance Property "Protocol" TransitGatewayConnectOptionsProperty where
  type PropertyType "Protocol" TransitGatewayConnectOptionsProperty = Value Prelude.Text
  set :: PropertyType "Protocol" TransitGatewayConnectOptionsProperty
-> TransitGatewayConnectOptionsProperty
-> TransitGatewayConnectOptionsProperty
set PropertyType "Protocol" TransitGatewayConnectOptionsProperty
newValue TransitGatewayConnectOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: TransitGatewayConnectOptionsProperty -> ()
protocol :: TransitGatewayConnectOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
protocol :: Maybe (Value Text)
..}
    = TransitGatewayConnectOptionsProperty
        {protocol :: Maybe (Value Text)
protocol = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Protocol" TransitGatewayConnectOptionsProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}