module Stratosphere.EC2.RouteServerEndpoint (
        RouteServerEndpoint(..), mkRouteServerEndpoint
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data RouteServerEndpoint
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-routeserverendpoint.html>
    RouteServerEndpoint {RouteServerEndpoint -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-routeserverendpoint.html#cfn-ec2-routeserverendpoint-routeserverid>
                         RouteServerEndpoint -> Value Text
routeServerId :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-routeserverendpoint.html#cfn-ec2-routeserverendpoint-subnetid>
                         RouteServerEndpoint -> Value Text
subnetId :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-routeserverendpoint.html#cfn-ec2-routeserverendpoint-tags>
                         RouteServerEndpoint -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (RouteServerEndpoint -> RouteServerEndpoint -> Bool
(RouteServerEndpoint -> RouteServerEndpoint -> Bool)
-> (RouteServerEndpoint -> RouteServerEndpoint -> Bool)
-> Eq RouteServerEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RouteServerEndpoint -> RouteServerEndpoint -> Bool
== :: RouteServerEndpoint -> RouteServerEndpoint -> Bool
$c/= :: RouteServerEndpoint -> RouteServerEndpoint -> Bool
/= :: RouteServerEndpoint -> RouteServerEndpoint -> Bool
Prelude.Eq, Int -> RouteServerEndpoint -> ShowS
[RouteServerEndpoint] -> ShowS
RouteServerEndpoint -> String
(Int -> RouteServerEndpoint -> ShowS)
-> (RouteServerEndpoint -> String)
-> ([RouteServerEndpoint] -> ShowS)
-> Show RouteServerEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RouteServerEndpoint -> ShowS
showsPrec :: Int -> RouteServerEndpoint -> ShowS
$cshow :: RouteServerEndpoint -> String
show :: RouteServerEndpoint -> String
$cshowList :: [RouteServerEndpoint] -> ShowS
showList :: [RouteServerEndpoint] -> ShowS
Prelude.Show)
mkRouteServerEndpoint ::
  Value Prelude.Text -> Value Prelude.Text -> RouteServerEndpoint
mkRouteServerEndpoint :: Value Text -> Value Text -> RouteServerEndpoint
mkRouteServerEndpoint Value Text
routeServerId Value Text
subnetId
  = RouteServerEndpoint
      {haddock_workaround_ :: ()
haddock_workaround_ = (), routeServerId :: Value Text
routeServerId = Value Text
routeServerId,
       subnetId :: Value Text
subnetId = Value Text
subnetId, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RouteServerEndpoint where
  toResourceProperties :: RouteServerEndpoint -> ResourceProperties
toResourceProperties RouteServerEndpoint {Maybe [Tag]
()
Value Text
haddock_workaround_ :: RouteServerEndpoint -> ()
routeServerId :: RouteServerEndpoint -> Value Text
subnetId :: RouteServerEndpoint -> Value Text
tags :: RouteServerEndpoint -> Maybe [Tag]
haddock_workaround_ :: ()
routeServerId :: Value Text
subnetId :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::RouteServerEndpoint",
         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
"RouteServerId" 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
routeServerId,
                            Key
"SubnetId" 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
subnetId]
                           ([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 RouteServerEndpoint where
  toJSON :: RouteServerEndpoint -> Value
toJSON RouteServerEndpoint {Maybe [Tag]
()
Value Text
haddock_workaround_ :: RouteServerEndpoint -> ()
routeServerId :: RouteServerEndpoint -> Value Text
subnetId :: RouteServerEndpoint -> Value Text
tags :: RouteServerEndpoint -> Maybe [Tag]
haddock_workaround_ :: ()
routeServerId :: Value Text
subnetId :: 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
"RouteServerId" 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
routeServerId,
               Key
"SubnetId" 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
subnetId]
              ([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 "RouteServerId" RouteServerEndpoint where
  type PropertyType "RouteServerId" RouteServerEndpoint = Value Prelude.Text
  set :: PropertyType "RouteServerId" RouteServerEndpoint
-> RouteServerEndpoint -> RouteServerEndpoint
set PropertyType "RouteServerId" RouteServerEndpoint
newValue RouteServerEndpoint {Maybe [Tag]
()
Value Text
haddock_workaround_ :: RouteServerEndpoint -> ()
routeServerId :: RouteServerEndpoint -> Value Text
subnetId :: RouteServerEndpoint -> Value Text
tags :: RouteServerEndpoint -> Maybe [Tag]
haddock_workaround_ :: ()
routeServerId :: Value Text
subnetId :: Value Text
tags :: Maybe [Tag]
..}
    = RouteServerEndpoint {routeServerId :: Value Text
routeServerId = PropertyType "RouteServerId" RouteServerEndpoint
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
subnetId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
subnetId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "SubnetId" RouteServerEndpoint where
  type PropertyType "SubnetId" RouteServerEndpoint = Value Prelude.Text
  set :: PropertyType "SubnetId" RouteServerEndpoint
-> RouteServerEndpoint -> RouteServerEndpoint
set PropertyType "SubnetId" RouteServerEndpoint
newValue RouteServerEndpoint {Maybe [Tag]
()
Value Text
haddock_workaround_ :: RouteServerEndpoint -> ()
routeServerId :: RouteServerEndpoint -> Value Text
subnetId :: RouteServerEndpoint -> Value Text
tags :: RouteServerEndpoint -> Maybe [Tag]
haddock_workaround_ :: ()
routeServerId :: Value Text
subnetId :: Value Text
tags :: Maybe [Tag]
..}
    = RouteServerEndpoint {subnetId :: Value Text
subnetId = PropertyType "SubnetId" RouteServerEndpoint
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
routeServerId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
routeServerId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" RouteServerEndpoint where
  type PropertyType "Tags" RouteServerEndpoint = [Tag]
  set :: PropertyType "Tags" RouteServerEndpoint
-> RouteServerEndpoint -> RouteServerEndpoint
set PropertyType "Tags" RouteServerEndpoint
newValue RouteServerEndpoint {Maybe [Tag]
()
Value Text
haddock_workaround_ :: RouteServerEndpoint -> ()
routeServerId :: RouteServerEndpoint -> Value Text
subnetId :: RouteServerEndpoint -> Value Text
tags :: RouteServerEndpoint -> Maybe [Tag]
haddock_workaround_ :: ()
routeServerId :: Value Text
subnetId :: Value Text
tags :: Maybe [Tag]
..}
    = RouteServerEndpoint {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" RouteServerEndpoint
newValue, ()
Value Text
haddock_workaround_ :: ()
routeServerId :: Value Text
subnetId :: Value Text
haddock_workaround_ :: ()
routeServerId :: Value Text
subnetId :: Value Text
..}