module Stratosphere.ApiGateway.BasePathMappingV2 (
BasePathMappingV2(..), mkBasePathMappingV2
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BasePathMappingV2
=
BasePathMappingV2 {BasePathMappingV2 -> ()
haddock_workaround_ :: (),
BasePathMappingV2 -> Maybe (Value Text)
basePath :: (Prelude.Maybe (Value Prelude.Text)),
BasePathMappingV2 -> Value Text
domainNameArn :: (Value Prelude.Text),
BasePathMappingV2 -> Value Text
restApiId :: (Value Prelude.Text),
BasePathMappingV2 -> Maybe (Value Text)
stage :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (BasePathMappingV2 -> BasePathMappingV2 -> Bool
(BasePathMappingV2 -> BasePathMappingV2 -> Bool)
-> (BasePathMappingV2 -> BasePathMappingV2 -> Bool)
-> Eq BasePathMappingV2
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BasePathMappingV2 -> BasePathMappingV2 -> Bool
== :: BasePathMappingV2 -> BasePathMappingV2 -> Bool
$c/= :: BasePathMappingV2 -> BasePathMappingV2 -> Bool
/= :: BasePathMappingV2 -> BasePathMappingV2 -> Bool
Prelude.Eq, Int -> BasePathMappingV2 -> ShowS
[BasePathMappingV2] -> ShowS
BasePathMappingV2 -> String
(Int -> BasePathMappingV2 -> ShowS)
-> (BasePathMappingV2 -> String)
-> ([BasePathMappingV2] -> ShowS)
-> Show BasePathMappingV2
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BasePathMappingV2 -> ShowS
showsPrec :: Int -> BasePathMappingV2 -> ShowS
$cshow :: BasePathMappingV2 -> String
show :: BasePathMappingV2 -> String
$cshowList :: [BasePathMappingV2] -> ShowS
showList :: [BasePathMappingV2] -> ShowS
Prelude.Show)
mkBasePathMappingV2 ::
Value Prelude.Text -> Value Prelude.Text -> BasePathMappingV2
mkBasePathMappingV2 :: Value Text -> Value Text -> BasePathMappingV2
mkBasePathMappingV2 Value Text
domainNameArn Value Text
restApiId
= BasePathMappingV2
{haddock_workaround_ :: ()
haddock_workaround_ = (), domainNameArn :: Value Text
domainNameArn = Value Text
domainNameArn,
restApiId :: Value Text
restApiId = Value Text
restApiId, basePath :: Maybe (Value Text)
basePath = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
stage :: Maybe (Value Text)
stage = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BasePathMappingV2 where
toResourceProperties :: BasePathMappingV2 -> ResourceProperties
toResourceProperties BasePathMappingV2 {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BasePathMappingV2 -> ()
basePath :: BasePathMappingV2 -> Maybe (Value Text)
domainNameArn :: BasePathMappingV2 -> Value Text
restApiId :: BasePathMappingV2 -> Value Text
stage :: BasePathMappingV2 -> Maybe (Value Text)
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
domainNameArn :: Value Text
restApiId :: Value Text
stage :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGateway::BasePathMappingV2",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"DomainNameArn" 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
domainNameArn,
Key
"RestApiId" 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
restApiId]
([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
"BasePath" (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)
basePath,
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
"Stage" (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)
stage]))}
instance JSON.ToJSON BasePathMappingV2 where
toJSON :: BasePathMappingV2 -> Value
toJSON BasePathMappingV2 {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BasePathMappingV2 -> ()
basePath :: BasePathMappingV2 -> Maybe (Value Text)
domainNameArn :: BasePathMappingV2 -> Value Text
restApiId :: BasePathMappingV2 -> Value Text
stage :: BasePathMappingV2 -> Maybe (Value Text)
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
domainNameArn :: Value Text
restApiId :: Value Text
stage :: Maybe (Value Text)
..}
= [(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
"DomainNameArn" 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
domainNameArn,
Key
"RestApiId" 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
restApiId]
([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
"BasePath" (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)
basePath,
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
"Stage" (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)
stage])))
instance Property "BasePath" BasePathMappingV2 where
type PropertyType "BasePath" BasePathMappingV2 = Value Prelude.Text
set :: PropertyType "BasePath" BasePathMappingV2
-> BasePathMappingV2 -> BasePathMappingV2
set PropertyType "BasePath" BasePathMappingV2
newValue BasePathMappingV2 {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BasePathMappingV2 -> ()
basePath :: BasePathMappingV2 -> Maybe (Value Text)
domainNameArn :: BasePathMappingV2 -> Value Text
restApiId :: BasePathMappingV2 -> Value Text
stage :: BasePathMappingV2 -> Maybe (Value Text)
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
domainNameArn :: Value Text
restApiId :: Value Text
stage :: Maybe (Value Text)
..}
= BasePathMappingV2 {basePath :: Maybe (Value Text)
basePath = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BasePath" BasePathMappingV2
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
domainNameArn :: Value Text
restApiId :: Value Text
stage :: Maybe (Value Text)
haddock_workaround_ :: ()
domainNameArn :: Value Text
restApiId :: Value Text
stage :: Maybe (Value Text)
..}
instance Property "DomainNameArn" BasePathMappingV2 where
type PropertyType "DomainNameArn" BasePathMappingV2 = Value Prelude.Text
set :: PropertyType "DomainNameArn" BasePathMappingV2
-> BasePathMappingV2 -> BasePathMappingV2
set PropertyType "DomainNameArn" BasePathMappingV2
newValue BasePathMappingV2 {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BasePathMappingV2 -> ()
basePath :: BasePathMappingV2 -> Maybe (Value Text)
domainNameArn :: BasePathMappingV2 -> Value Text
restApiId :: BasePathMappingV2 -> Value Text
stage :: BasePathMappingV2 -> Maybe (Value Text)
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
domainNameArn :: Value Text
restApiId :: Value Text
stage :: Maybe (Value Text)
..}
= BasePathMappingV2 {domainNameArn :: Value Text
domainNameArn = PropertyType "DomainNameArn" BasePathMappingV2
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
restApiId :: Value Text
stage :: Maybe (Value Text)
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
restApiId :: Value Text
stage :: Maybe (Value Text)
..}
instance Property "RestApiId" BasePathMappingV2 where
type PropertyType "RestApiId" BasePathMappingV2 = Value Prelude.Text
set :: PropertyType "RestApiId" BasePathMappingV2
-> BasePathMappingV2 -> BasePathMappingV2
set PropertyType "RestApiId" BasePathMappingV2
newValue BasePathMappingV2 {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BasePathMappingV2 -> ()
basePath :: BasePathMappingV2 -> Maybe (Value Text)
domainNameArn :: BasePathMappingV2 -> Value Text
restApiId :: BasePathMappingV2 -> Value Text
stage :: BasePathMappingV2 -> Maybe (Value Text)
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
domainNameArn :: Value Text
restApiId :: Value Text
stage :: Maybe (Value Text)
..}
= BasePathMappingV2 {restApiId :: Value Text
restApiId = PropertyType "RestApiId" BasePathMappingV2
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
domainNameArn :: Value Text
stage :: Maybe (Value Text)
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
domainNameArn :: Value Text
stage :: Maybe (Value Text)
..}
instance Property "Stage" BasePathMappingV2 where
type PropertyType "Stage" BasePathMappingV2 = Value Prelude.Text
set :: PropertyType "Stage" BasePathMappingV2
-> BasePathMappingV2 -> BasePathMappingV2
set PropertyType "Stage" BasePathMappingV2
newValue BasePathMappingV2 {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: BasePathMappingV2 -> ()
basePath :: BasePathMappingV2 -> Maybe (Value Text)
domainNameArn :: BasePathMappingV2 -> Value Text
restApiId :: BasePathMappingV2 -> Value Text
stage :: BasePathMappingV2 -> Maybe (Value Text)
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
domainNameArn :: Value Text
restApiId :: Value Text
stage :: Maybe (Value Text)
..}
= BasePathMappingV2 {stage :: Maybe (Value Text)
stage = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Stage" BasePathMappingV2
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
domainNameArn :: Value Text
restApiId :: Value Text
haddock_workaround_ :: ()
basePath :: Maybe (Value Text)
domainNameArn :: Value Text
restApiId :: Value Text
..}