{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ApiGatewayV2.UpdateApiMapping
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- The API mapping.
module Amazonka.ApiGatewayV2.UpdateApiMapping
  ( -- * Creating a Request
    UpdateApiMapping (..),
    newUpdateApiMapping,

    -- * Request Lenses
    updateApiMapping_apiMappingKey,
    updateApiMapping_stage,
    updateApiMapping_apiMappingId,
    updateApiMapping_apiId,
    updateApiMapping_domainName,

    -- * Destructuring the Response
    UpdateApiMappingResponse (..),
    newUpdateApiMappingResponse,

    -- * Response Lenses
    updateApiMappingResponse_apiId,
    updateApiMappingResponse_apiMappingId,
    updateApiMappingResponse_apiMappingKey,
    updateApiMappingResponse_stage,
    updateApiMappingResponse_httpStatus,
  )
where

import Amazonka.ApiGatewayV2.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Updates an ApiMapping.
--
-- /See:/ 'newUpdateApiMapping' smart constructor.
data UpdateApiMapping = UpdateApiMapping'
  { -- | The API mapping key.
    UpdateApiMapping -> Maybe Text
apiMappingKey :: Prelude.Maybe Prelude.Text,
    -- | The API stage.
    UpdateApiMapping -> Maybe Text
stage :: Prelude.Maybe Prelude.Text,
    -- | The API mapping identifier.
    UpdateApiMapping -> Text
apiMappingId :: Prelude.Text,
    -- | The API identifier.
    UpdateApiMapping -> Text
apiId :: Prelude.Text,
    -- | The domain name.
    UpdateApiMapping -> Text
domainName :: Prelude.Text
  }
  deriving (UpdateApiMapping -> UpdateApiMapping -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApiMapping -> UpdateApiMapping -> Bool
$c/= :: UpdateApiMapping -> UpdateApiMapping -> Bool
== :: UpdateApiMapping -> UpdateApiMapping -> Bool
$c== :: UpdateApiMapping -> UpdateApiMapping -> Bool
Prelude.Eq, ReadPrec [UpdateApiMapping]
ReadPrec UpdateApiMapping
Int -> ReadS UpdateApiMapping
ReadS [UpdateApiMapping]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApiMapping]
$creadListPrec :: ReadPrec [UpdateApiMapping]
readPrec :: ReadPrec UpdateApiMapping
$creadPrec :: ReadPrec UpdateApiMapping
readList :: ReadS [UpdateApiMapping]
$creadList :: ReadS [UpdateApiMapping]
readsPrec :: Int -> ReadS UpdateApiMapping
$creadsPrec :: Int -> ReadS UpdateApiMapping
Prelude.Read, Int -> UpdateApiMapping -> ShowS
[UpdateApiMapping] -> ShowS
UpdateApiMapping -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApiMapping] -> ShowS
$cshowList :: [UpdateApiMapping] -> ShowS
show :: UpdateApiMapping -> String
$cshow :: UpdateApiMapping -> String
showsPrec :: Int -> UpdateApiMapping -> ShowS
$cshowsPrec :: Int -> UpdateApiMapping -> ShowS
Prelude.Show, forall x. Rep UpdateApiMapping x -> UpdateApiMapping
forall x. UpdateApiMapping -> Rep UpdateApiMapping x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateApiMapping x -> UpdateApiMapping
$cfrom :: forall x. UpdateApiMapping -> Rep UpdateApiMapping x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApiMapping' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'apiMappingKey', 'updateApiMapping_apiMappingKey' - The API mapping key.
--
-- 'stage', 'updateApiMapping_stage' - The API stage.
--
-- 'apiMappingId', 'updateApiMapping_apiMappingId' - The API mapping identifier.
--
-- 'apiId', 'updateApiMapping_apiId' - The API identifier.
--
-- 'domainName', 'updateApiMapping_domainName' - The domain name.
newUpdateApiMapping ::
  -- | 'apiMappingId'
  Prelude.Text ->
  -- | 'apiId'
  Prelude.Text ->
  -- | 'domainName'
  Prelude.Text ->
  UpdateApiMapping
newUpdateApiMapping :: Text -> Text -> Text -> UpdateApiMapping
newUpdateApiMapping
  Text
pApiMappingId_
  Text
pApiId_
  Text
pDomainName_ =
    UpdateApiMapping'
      { $sel:apiMappingKey:UpdateApiMapping' :: Maybe Text
apiMappingKey = forall a. Maybe a
Prelude.Nothing,
        $sel:stage:UpdateApiMapping' :: Maybe Text
stage = forall a. Maybe a
Prelude.Nothing,
        $sel:apiMappingId:UpdateApiMapping' :: Text
apiMappingId = Text
pApiMappingId_,
        $sel:apiId:UpdateApiMapping' :: Text
apiId = Text
pApiId_,
        $sel:domainName:UpdateApiMapping' :: Text
domainName = Text
pDomainName_
      }

-- | The API mapping key.
updateApiMapping_apiMappingKey :: Lens.Lens' UpdateApiMapping (Prelude.Maybe Prelude.Text)
updateApiMapping_apiMappingKey :: Lens' UpdateApiMapping (Maybe Text)
updateApiMapping_apiMappingKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApiMapping' {Maybe Text
apiMappingKey :: Maybe Text
$sel:apiMappingKey:UpdateApiMapping' :: UpdateApiMapping -> Maybe Text
apiMappingKey} -> Maybe Text
apiMappingKey) (\s :: UpdateApiMapping
s@UpdateApiMapping' {} Maybe Text
a -> UpdateApiMapping
s {$sel:apiMappingKey:UpdateApiMapping' :: Maybe Text
apiMappingKey = Maybe Text
a} :: UpdateApiMapping)

-- | The API stage.
updateApiMapping_stage :: Lens.Lens' UpdateApiMapping (Prelude.Maybe Prelude.Text)
updateApiMapping_stage :: Lens' UpdateApiMapping (Maybe Text)
updateApiMapping_stage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApiMapping' {Maybe Text
stage :: Maybe Text
$sel:stage:UpdateApiMapping' :: UpdateApiMapping -> Maybe Text
stage} -> Maybe Text
stage) (\s :: UpdateApiMapping
s@UpdateApiMapping' {} Maybe Text
a -> UpdateApiMapping
s {$sel:stage:UpdateApiMapping' :: Maybe Text
stage = Maybe Text
a} :: UpdateApiMapping)

-- | The API mapping identifier.
updateApiMapping_apiMappingId :: Lens.Lens' UpdateApiMapping Prelude.Text
updateApiMapping_apiMappingId :: Lens' UpdateApiMapping Text
updateApiMapping_apiMappingId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApiMapping' {Text
apiMappingId :: Text
$sel:apiMappingId:UpdateApiMapping' :: UpdateApiMapping -> Text
apiMappingId} -> Text
apiMappingId) (\s :: UpdateApiMapping
s@UpdateApiMapping' {} Text
a -> UpdateApiMapping
s {$sel:apiMappingId:UpdateApiMapping' :: Text
apiMappingId = Text
a} :: UpdateApiMapping)

-- | The API identifier.
updateApiMapping_apiId :: Lens.Lens' UpdateApiMapping Prelude.Text
updateApiMapping_apiId :: Lens' UpdateApiMapping Text
updateApiMapping_apiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApiMapping' {Text
apiId :: Text
$sel:apiId:UpdateApiMapping' :: UpdateApiMapping -> Text
apiId} -> Text
apiId) (\s :: UpdateApiMapping
s@UpdateApiMapping' {} Text
a -> UpdateApiMapping
s {$sel:apiId:UpdateApiMapping' :: Text
apiId = Text
a} :: UpdateApiMapping)

-- | The domain name.
updateApiMapping_domainName :: Lens.Lens' UpdateApiMapping Prelude.Text
updateApiMapping_domainName :: Lens' UpdateApiMapping Text
updateApiMapping_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApiMapping' {Text
domainName :: Text
$sel:domainName:UpdateApiMapping' :: UpdateApiMapping -> Text
domainName} -> Text
domainName) (\s :: UpdateApiMapping
s@UpdateApiMapping' {} Text
a -> UpdateApiMapping
s {$sel:domainName:UpdateApiMapping' :: Text
domainName = Text
a} :: UpdateApiMapping)

instance Core.AWSRequest UpdateApiMapping where
  type
    AWSResponse UpdateApiMapping =
      UpdateApiMappingResponse
  request :: (Service -> Service)
-> UpdateApiMapping -> Request UpdateApiMapping
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateApiMapping
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateApiMapping)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateApiMappingResponse
UpdateApiMappingResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"apiId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"apiMappingId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"apiMappingKey")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"stage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateApiMapping where
  hashWithSalt :: Int -> UpdateApiMapping -> Int
hashWithSalt Int
_salt UpdateApiMapping' {Maybe Text
Text
domainName :: Text
apiId :: Text
apiMappingId :: Text
stage :: Maybe Text
apiMappingKey :: Maybe Text
$sel:domainName:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:apiId:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:apiMappingId:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:stage:UpdateApiMapping' :: UpdateApiMapping -> Maybe Text
$sel:apiMappingKey:UpdateApiMapping' :: UpdateApiMapping -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
apiMappingKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
apiMappingId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
apiId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName

instance Prelude.NFData UpdateApiMapping where
  rnf :: UpdateApiMapping -> ()
rnf UpdateApiMapping' {Maybe Text
Text
domainName :: Text
apiId :: Text
apiMappingId :: Text
stage :: Maybe Text
apiMappingKey :: Maybe Text
$sel:domainName:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:apiId:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:apiMappingId:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:stage:UpdateApiMapping' :: UpdateApiMapping -> Maybe Text
$sel:apiMappingKey:UpdateApiMapping' :: UpdateApiMapping -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiMappingKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
apiMappingId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
apiId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
domainName

instance Data.ToHeaders UpdateApiMapping where
  toHeaders :: UpdateApiMapping -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateApiMapping where
  toJSON :: UpdateApiMapping -> Value
toJSON UpdateApiMapping' {Maybe Text
Text
domainName :: Text
apiId :: Text
apiMappingId :: Text
stage :: Maybe Text
apiMappingKey :: Maybe Text
$sel:domainName:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:apiId:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:apiMappingId:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:stage:UpdateApiMapping' :: UpdateApiMapping -> Maybe Text
$sel:apiMappingKey:UpdateApiMapping' :: UpdateApiMapping -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"apiMappingKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
apiMappingKey,
            (Key
"stage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
stage,
            forall a. a -> Maybe a
Prelude.Just (Key
"apiId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
apiId)
          ]
      )

instance Data.ToPath UpdateApiMapping where
  toPath :: UpdateApiMapping -> ByteString
toPath UpdateApiMapping' {Maybe Text
Text
domainName :: Text
apiId :: Text
apiMappingId :: Text
stage :: Maybe Text
apiMappingKey :: Maybe Text
$sel:domainName:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:apiId:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:apiMappingId:UpdateApiMapping' :: UpdateApiMapping -> Text
$sel:stage:UpdateApiMapping' :: UpdateApiMapping -> Maybe Text
$sel:apiMappingKey:UpdateApiMapping' :: UpdateApiMapping -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v2/domainnames/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
domainName,
        ByteString
"/apimappings/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
apiMappingId
      ]

instance Data.ToQuery UpdateApiMapping where
  toQuery :: UpdateApiMapping -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateApiMappingResponse' smart constructor.
data UpdateApiMappingResponse = UpdateApiMappingResponse'
  { -- | The API identifier.
    UpdateApiMappingResponse -> Maybe Text
apiId :: Prelude.Maybe Prelude.Text,
    -- | The API mapping identifier.
    UpdateApiMappingResponse -> Maybe Text
apiMappingId :: Prelude.Maybe Prelude.Text,
    -- | The API mapping key.
    UpdateApiMappingResponse -> Maybe Text
apiMappingKey :: Prelude.Maybe Prelude.Text,
    -- | The API stage.
    UpdateApiMappingResponse -> Maybe Text
stage :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateApiMappingResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateApiMappingResponse -> UpdateApiMappingResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApiMappingResponse -> UpdateApiMappingResponse -> Bool
$c/= :: UpdateApiMappingResponse -> UpdateApiMappingResponse -> Bool
== :: UpdateApiMappingResponse -> UpdateApiMappingResponse -> Bool
$c== :: UpdateApiMappingResponse -> UpdateApiMappingResponse -> Bool
Prelude.Eq, ReadPrec [UpdateApiMappingResponse]
ReadPrec UpdateApiMappingResponse
Int -> ReadS UpdateApiMappingResponse
ReadS [UpdateApiMappingResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApiMappingResponse]
$creadListPrec :: ReadPrec [UpdateApiMappingResponse]
readPrec :: ReadPrec UpdateApiMappingResponse
$creadPrec :: ReadPrec UpdateApiMappingResponse
readList :: ReadS [UpdateApiMappingResponse]
$creadList :: ReadS [UpdateApiMappingResponse]
readsPrec :: Int -> ReadS UpdateApiMappingResponse
$creadsPrec :: Int -> ReadS UpdateApiMappingResponse
Prelude.Read, Int -> UpdateApiMappingResponse -> ShowS
[UpdateApiMappingResponse] -> ShowS
UpdateApiMappingResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApiMappingResponse] -> ShowS
$cshowList :: [UpdateApiMappingResponse] -> ShowS
show :: UpdateApiMappingResponse -> String
$cshow :: UpdateApiMappingResponse -> String
showsPrec :: Int -> UpdateApiMappingResponse -> ShowS
$cshowsPrec :: Int -> UpdateApiMappingResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateApiMappingResponse x -> UpdateApiMappingResponse
forall x.
UpdateApiMappingResponse -> Rep UpdateApiMappingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateApiMappingResponse x -> UpdateApiMappingResponse
$cfrom :: forall x.
UpdateApiMappingResponse -> Rep UpdateApiMappingResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApiMappingResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'apiId', 'updateApiMappingResponse_apiId' - The API identifier.
--
-- 'apiMappingId', 'updateApiMappingResponse_apiMappingId' - The API mapping identifier.
--
-- 'apiMappingKey', 'updateApiMappingResponse_apiMappingKey' - The API mapping key.
--
-- 'stage', 'updateApiMappingResponse_stage' - The API stage.
--
-- 'httpStatus', 'updateApiMappingResponse_httpStatus' - The response's http status code.
newUpdateApiMappingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateApiMappingResponse
newUpdateApiMappingResponse :: Int -> UpdateApiMappingResponse
newUpdateApiMappingResponse Int
pHttpStatus_ =
  UpdateApiMappingResponse'
    { $sel:apiId:UpdateApiMappingResponse' :: Maybe Text
apiId = forall a. Maybe a
Prelude.Nothing,
      $sel:apiMappingId:UpdateApiMappingResponse' :: Maybe Text
apiMappingId = forall a. Maybe a
Prelude.Nothing,
      $sel:apiMappingKey:UpdateApiMappingResponse' :: Maybe Text
apiMappingKey = forall a. Maybe a
Prelude.Nothing,
      $sel:stage:UpdateApiMappingResponse' :: Maybe Text
stage = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateApiMappingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The API identifier.
updateApiMappingResponse_apiId :: Lens.Lens' UpdateApiMappingResponse (Prelude.Maybe Prelude.Text)
updateApiMappingResponse_apiId :: Lens' UpdateApiMappingResponse (Maybe Text)
updateApiMappingResponse_apiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApiMappingResponse' {Maybe Text
apiId :: Maybe Text
$sel:apiId:UpdateApiMappingResponse' :: UpdateApiMappingResponse -> Maybe Text
apiId} -> Maybe Text
apiId) (\s :: UpdateApiMappingResponse
s@UpdateApiMappingResponse' {} Maybe Text
a -> UpdateApiMappingResponse
s {$sel:apiId:UpdateApiMappingResponse' :: Maybe Text
apiId = Maybe Text
a} :: UpdateApiMappingResponse)

-- | The API mapping identifier.
updateApiMappingResponse_apiMappingId :: Lens.Lens' UpdateApiMappingResponse (Prelude.Maybe Prelude.Text)
updateApiMappingResponse_apiMappingId :: Lens' UpdateApiMappingResponse (Maybe Text)
updateApiMappingResponse_apiMappingId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApiMappingResponse' {Maybe Text
apiMappingId :: Maybe Text
$sel:apiMappingId:UpdateApiMappingResponse' :: UpdateApiMappingResponse -> Maybe Text
apiMappingId} -> Maybe Text
apiMappingId) (\s :: UpdateApiMappingResponse
s@UpdateApiMappingResponse' {} Maybe Text
a -> UpdateApiMappingResponse
s {$sel:apiMappingId:UpdateApiMappingResponse' :: Maybe Text
apiMappingId = Maybe Text
a} :: UpdateApiMappingResponse)

-- | The API mapping key.
updateApiMappingResponse_apiMappingKey :: Lens.Lens' UpdateApiMappingResponse (Prelude.Maybe Prelude.Text)
updateApiMappingResponse_apiMappingKey :: Lens' UpdateApiMappingResponse (Maybe Text)
updateApiMappingResponse_apiMappingKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApiMappingResponse' {Maybe Text
apiMappingKey :: Maybe Text
$sel:apiMappingKey:UpdateApiMappingResponse' :: UpdateApiMappingResponse -> Maybe Text
apiMappingKey} -> Maybe Text
apiMappingKey) (\s :: UpdateApiMappingResponse
s@UpdateApiMappingResponse' {} Maybe Text
a -> UpdateApiMappingResponse
s {$sel:apiMappingKey:UpdateApiMappingResponse' :: Maybe Text
apiMappingKey = Maybe Text
a} :: UpdateApiMappingResponse)

-- | The API stage.
updateApiMappingResponse_stage :: Lens.Lens' UpdateApiMappingResponse (Prelude.Maybe Prelude.Text)
updateApiMappingResponse_stage :: Lens' UpdateApiMappingResponse (Maybe Text)
updateApiMappingResponse_stage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApiMappingResponse' {Maybe Text
stage :: Maybe Text
$sel:stage:UpdateApiMappingResponse' :: UpdateApiMappingResponse -> Maybe Text
stage} -> Maybe Text
stage) (\s :: UpdateApiMappingResponse
s@UpdateApiMappingResponse' {} Maybe Text
a -> UpdateApiMappingResponse
s {$sel:stage:UpdateApiMappingResponse' :: Maybe Text
stage = Maybe Text
a} :: UpdateApiMappingResponse)

-- | The response's http status code.
updateApiMappingResponse_httpStatus :: Lens.Lens' UpdateApiMappingResponse Prelude.Int
updateApiMappingResponse_httpStatus :: Lens' UpdateApiMappingResponse Int
updateApiMappingResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApiMappingResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateApiMappingResponse' :: UpdateApiMappingResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateApiMappingResponse
s@UpdateApiMappingResponse' {} Int
a -> UpdateApiMappingResponse
s {$sel:httpStatus:UpdateApiMappingResponse' :: Int
httpStatus = Int
a} :: UpdateApiMappingResponse)

instance Prelude.NFData UpdateApiMappingResponse where
  rnf :: UpdateApiMappingResponse -> ()
rnf UpdateApiMappingResponse' {Int
Maybe Text
httpStatus :: Int
stage :: Maybe Text
apiMappingKey :: Maybe Text
apiMappingId :: Maybe Text
apiId :: Maybe Text
$sel:httpStatus:UpdateApiMappingResponse' :: UpdateApiMappingResponse -> Int
$sel:stage:UpdateApiMappingResponse' :: UpdateApiMappingResponse -> Maybe Text
$sel:apiMappingKey:UpdateApiMappingResponse' :: UpdateApiMappingResponse -> Maybe Text
$sel:apiMappingId:UpdateApiMappingResponse' :: UpdateApiMappingResponse -> Maybe Text
$sel:apiId:UpdateApiMappingResponse' :: UpdateApiMappingResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiMappingId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiMappingKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus