module Stratosphere.ApiGatewayV2.ApiMapping (
ApiMapping(..), mkApiMapping
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ApiMapping
=
ApiMapping {ApiMapping -> ()
haddock_workaround_ :: (),
ApiMapping -> Value Text
apiId :: (Value Prelude.Text),
ApiMapping -> Maybe (Value Text)
apiMappingKey :: (Prelude.Maybe (Value Prelude.Text)),
ApiMapping -> Value Text
domainName :: (Value Prelude.Text),
ApiMapping -> Value Text
stage :: (Value Prelude.Text)}
deriving stock (ApiMapping -> ApiMapping -> Bool
(ApiMapping -> ApiMapping -> Bool)
-> (ApiMapping -> ApiMapping -> Bool) -> Eq ApiMapping
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ApiMapping -> ApiMapping -> Bool
== :: ApiMapping -> ApiMapping -> Bool
$c/= :: ApiMapping -> ApiMapping -> Bool
/= :: ApiMapping -> ApiMapping -> Bool
Prelude.Eq, Int -> ApiMapping -> ShowS
[ApiMapping] -> ShowS
ApiMapping -> String
(Int -> ApiMapping -> ShowS)
-> (ApiMapping -> String)
-> ([ApiMapping] -> ShowS)
-> Show ApiMapping
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ApiMapping -> ShowS
showsPrec :: Int -> ApiMapping -> ShowS
$cshow :: ApiMapping -> String
show :: ApiMapping -> String
$cshowList :: [ApiMapping] -> ShowS
showList :: [ApiMapping] -> ShowS
Prelude.Show)
mkApiMapping ::
Value Prelude.Text
-> Value Prelude.Text -> Value Prelude.Text -> ApiMapping
mkApiMapping :: Value Text -> Value Text -> Value Text -> ApiMapping
mkApiMapping Value Text
apiId Value Text
domainName Value Text
stage
= ApiMapping
{haddock_workaround_ :: ()
haddock_workaround_ = (), apiId :: Value Text
apiId = Value Text
apiId, domainName :: Value Text
domainName = Value Text
domainName,
stage :: Value Text
stage = Value Text
stage, apiMappingKey :: Maybe (Value Text)
apiMappingKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ApiMapping where
toResourceProperties :: ApiMapping -> ResourceProperties
toResourceProperties ApiMapping {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiMapping -> ()
apiId :: ApiMapping -> Value Text
apiMappingKey :: ApiMapping -> Maybe (Value Text)
domainName :: ApiMapping -> Value Text
stage :: ApiMapping -> Value Text
haddock_workaround_ :: ()
apiId :: Value Text
apiMappingKey :: Maybe (Value Text)
domainName :: Value Text
stage :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGatewayV2::ApiMapping",
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
"ApiId" 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
apiId, 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,
Key
"Stage" 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
stage]
([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
"ApiMappingKey" (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)
apiMappingKey]))}
instance JSON.ToJSON ApiMapping where
toJSON :: ApiMapping -> Value
toJSON ApiMapping {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiMapping -> ()
apiId :: ApiMapping -> Value Text
apiMappingKey :: ApiMapping -> Maybe (Value Text)
domainName :: ApiMapping -> Value Text
stage :: ApiMapping -> Value Text
haddock_workaround_ :: ()
apiId :: Value Text
apiMappingKey :: Maybe (Value Text)
domainName :: Value Text
stage :: 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
"ApiId" 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
apiId, 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,
Key
"Stage" 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
stage]
([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
"ApiMappingKey" (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)
apiMappingKey])))
instance Property "ApiId" ApiMapping where
type PropertyType "ApiId" ApiMapping = Value Prelude.Text
set :: PropertyType "ApiId" ApiMapping -> ApiMapping -> ApiMapping
set PropertyType "ApiId" ApiMapping
newValue ApiMapping {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiMapping -> ()
apiId :: ApiMapping -> Value Text
apiMappingKey :: ApiMapping -> Maybe (Value Text)
domainName :: ApiMapping -> Value Text
stage :: ApiMapping -> Value Text
haddock_workaround_ :: ()
apiId :: Value Text
apiMappingKey :: Maybe (Value Text)
domainName :: Value Text
stage :: Value Text
..} = ApiMapping {apiId :: Value Text
apiId = PropertyType "ApiId" ApiMapping
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
apiMappingKey :: Maybe (Value Text)
domainName :: Value Text
stage :: Value Text
haddock_workaround_ :: ()
apiMappingKey :: Maybe (Value Text)
domainName :: Value Text
stage :: Value Text
..}
instance Property "ApiMappingKey" ApiMapping where
type PropertyType "ApiMappingKey" ApiMapping = Value Prelude.Text
set :: PropertyType "ApiMappingKey" ApiMapping -> ApiMapping -> ApiMapping
set PropertyType "ApiMappingKey" ApiMapping
newValue ApiMapping {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiMapping -> ()
apiId :: ApiMapping -> Value Text
apiMappingKey :: ApiMapping -> Maybe (Value Text)
domainName :: ApiMapping -> Value Text
stage :: ApiMapping -> Value Text
haddock_workaround_ :: ()
apiId :: Value Text
apiMappingKey :: Maybe (Value Text)
domainName :: Value Text
stage :: Value Text
..}
= ApiMapping {apiMappingKey :: Maybe (Value Text)
apiMappingKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ApiMappingKey" ApiMapping
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
apiId :: Value Text
domainName :: Value Text
stage :: Value Text
haddock_workaround_ :: ()
apiId :: Value Text
domainName :: Value Text
stage :: Value Text
..}
instance Property "DomainName" ApiMapping where
type PropertyType "DomainName" ApiMapping = Value Prelude.Text
set :: PropertyType "DomainName" ApiMapping -> ApiMapping -> ApiMapping
set PropertyType "DomainName" ApiMapping
newValue ApiMapping {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiMapping -> ()
apiId :: ApiMapping -> Value Text
apiMappingKey :: ApiMapping -> Maybe (Value Text)
domainName :: ApiMapping -> Value Text
stage :: ApiMapping -> Value Text
haddock_workaround_ :: ()
apiId :: Value Text
apiMappingKey :: Maybe (Value Text)
domainName :: Value Text
stage :: Value Text
..}
= ApiMapping {domainName :: Value Text
domainName = PropertyType "DomainName" ApiMapping
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
apiId :: Value Text
apiMappingKey :: Maybe (Value Text)
stage :: Value Text
haddock_workaround_ :: ()
apiId :: Value Text
apiMappingKey :: Maybe (Value Text)
stage :: Value Text
..}
instance Property "Stage" ApiMapping where
type PropertyType "Stage" ApiMapping = Value Prelude.Text
set :: PropertyType "Stage" ApiMapping -> ApiMapping -> ApiMapping
set PropertyType "Stage" ApiMapping
newValue ApiMapping {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ApiMapping -> ()
apiId :: ApiMapping -> Value Text
apiMappingKey :: ApiMapping -> Maybe (Value Text)
domainName :: ApiMapping -> Value Text
stage :: ApiMapping -> Value Text
haddock_workaround_ :: ()
apiId :: Value Text
apiMappingKey :: Maybe (Value Text)
domainName :: Value Text
stage :: Value Text
..} = ApiMapping {stage :: Value Text
stage = PropertyType "Stage" ApiMapping
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
apiId :: Value Text
apiMappingKey :: Maybe (Value Text)
domainName :: Value Text
haddock_workaround_ :: ()
apiId :: Value Text
apiMappingKey :: Maybe (Value Text)
domainName :: Value Text
..}