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