{-# 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.UpdateStage
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a Stage.
module Amazonka.ApiGatewayV2.UpdateStage
  ( -- * Creating a Request
    UpdateStage (..),
    newUpdateStage,

    -- * Request Lenses
    updateStage_deploymentId,
    updateStage_routeSettings,
    updateStage_accessLogSettings,
    updateStage_clientCertificateId,
    updateStage_stageVariables,
    updateStage_autoDeploy,
    updateStage_defaultRouteSettings,
    updateStage_description,
    updateStage_stageName,
    updateStage_apiId,

    -- * Destructuring the Response
    UpdateStageResponse (..),
    newUpdateStageResponse,

    -- * Response Lenses
    updateStageResponse_lastDeploymentStatusMessage,
    updateStageResponse_deploymentId,
    updateStageResponse_routeSettings,
    updateStageResponse_accessLogSettings,
    updateStageResponse_clientCertificateId,
    updateStageResponse_stageVariables,
    updateStageResponse_autoDeploy,
    updateStageResponse_createdDate,
    updateStageResponse_defaultRouteSettings,
    updateStageResponse_apiGatewayManaged,
    updateStageResponse_stageName,
    updateStageResponse_lastUpdatedDate,
    updateStageResponse_description,
    updateStageResponse_tags,
    updateStageResponse_httpStatus,
  )
where

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

-- | Updates a Stage.
--
-- /See:/ 'newUpdateStage' smart constructor.
data UpdateStage = UpdateStage'
  { -- | The deployment identifier for the API stage. Can\'t be updated if
    -- autoDeploy is enabled.
    UpdateStage -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
    -- | Route settings for the stage.
    UpdateStage -> Maybe (HashMap Text RouteSettings)
routeSettings :: Prelude.Maybe (Prelude.HashMap Prelude.Text RouteSettings),
    -- | Settings for logging access in this stage.
    UpdateStage -> Maybe AccessLogSettings
accessLogSettings :: Prelude.Maybe AccessLogSettings,
    -- | The identifier of a client certificate for a Stage.
    UpdateStage -> Maybe Text
clientCertificateId :: Prelude.Maybe Prelude.Text,
    -- | A map that defines the stage variables for a Stage. Variable names can
    -- have alphanumeric and underscore characters, and the values must match
    -- [A-Za-z0-9-._~:\/?#&=,]+.
    UpdateStage -> Maybe (HashMap Text Text)
stageVariables :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Specifies whether updates to an API automatically trigger a new
    -- deployment. The default value is false.
    UpdateStage -> Maybe Bool
autoDeploy :: Prelude.Maybe Prelude.Bool,
    -- | The default route settings for the stage.
    UpdateStage -> Maybe RouteSettings
defaultRouteSettings :: Prelude.Maybe RouteSettings,
    -- | The description for the API stage.
    UpdateStage -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The stage name. Stage names can contain only alphanumeric characters,
    -- hyphens, and underscores, or be $default. Maximum length is 128
    -- characters.
    UpdateStage -> Text
stageName :: Prelude.Text,
    -- | The API identifier.
    UpdateStage -> Text
apiId :: Prelude.Text
  }
  deriving (UpdateStage -> UpdateStage -> Bool
(UpdateStage -> UpdateStage -> Bool)
-> (UpdateStage -> UpdateStage -> Bool) -> Eq UpdateStage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateStage -> UpdateStage -> Bool
$c/= :: UpdateStage -> UpdateStage -> Bool
== :: UpdateStage -> UpdateStage -> Bool
$c== :: UpdateStage -> UpdateStage -> Bool
Prelude.Eq, ReadPrec [UpdateStage]
ReadPrec UpdateStage
Int -> ReadS UpdateStage
ReadS [UpdateStage]
(Int -> ReadS UpdateStage)
-> ReadS [UpdateStage]
-> ReadPrec UpdateStage
-> ReadPrec [UpdateStage]
-> Read UpdateStage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateStage]
$creadListPrec :: ReadPrec [UpdateStage]
readPrec :: ReadPrec UpdateStage
$creadPrec :: ReadPrec UpdateStage
readList :: ReadS [UpdateStage]
$creadList :: ReadS [UpdateStage]
readsPrec :: Int -> ReadS UpdateStage
$creadsPrec :: Int -> ReadS UpdateStage
Prelude.Read, Int -> UpdateStage -> ShowS
[UpdateStage] -> ShowS
UpdateStage -> String
(Int -> UpdateStage -> ShowS)
-> (UpdateStage -> String)
-> ([UpdateStage] -> ShowS)
-> Show UpdateStage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateStage] -> ShowS
$cshowList :: [UpdateStage] -> ShowS
show :: UpdateStage -> String
$cshow :: UpdateStage -> String
showsPrec :: Int -> UpdateStage -> ShowS
$cshowsPrec :: Int -> UpdateStage -> ShowS
Prelude.Show, (forall x. UpdateStage -> Rep UpdateStage x)
-> (forall x. Rep UpdateStage x -> UpdateStage)
-> Generic UpdateStage
forall x. Rep UpdateStage x -> UpdateStage
forall x. UpdateStage -> Rep UpdateStage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateStage x -> UpdateStage
$cfrom :: forall x. UpdateStage -> Rep UpdateStage x
Prelude.Generic)

-- |
-- Create a value of 'UpdateStage' 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:
--
-- 'deploymentId', 'updateStage_deploymentId' - The deployment identifier for the API stage. Can\'t be updated if
-- autoDeploy is enabled.
--
-- 'routeSettings', 'updateStage_routeSettings' - Route settings for the stage.
--
-- 'accessLogSettings', 'updateStage_accessLogSettings' - Settings for logging access in this stage.
--
-- 'clientCertificateId', 'updateStage_clientCertificateId' - The identifier of a client certificate for a Stage.
--
-- 'stageVariables', 'updateStage_stageVariables' - A map that defines the stage variables for a Stage. Variable names can
-- have alphanumeric and underscore characters, and the values must match
-- [A-Za-z0-9-._~:\/?#&=,]+.
--
-- 'autoDeploy', 'updateStage_autoDeploy' - Specifies whether updates to an API automatically trigger a new
-- deployment. The default value is false.
--
-- 'defaultRouteSettings', 'updateStage_defaultRouteSettings' - The default route settings for the stage.
--
-- 'description', 'updateStage_description' - The description for the API stage.
--
-- 'stageName', 'updateStage_stageName' - The stage name. Stage names can contain only alphanumeric characters,
-- hyphens, and underscores, or be $default. Maximum length is 128
-- characters.
--
-- 'apiId', 'updateStage_apiId' - The API identifier.
newUpdateStage ::
  -- | 'stageName'
  Prelude.Text ->
  -- | 'apiId'
  Prelude.Text ->
  UpdateStage
newUpdateStage :: Text -> Text -> UpdateStage
newUpdateStage Text
pStageName_ Text
pApiId_ =
  UpdateStage' :: Maybe Text
-> Maybe (HashMap Text RouteSettings)
-> Maybe AccessLogSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> Maybe RouteSettings
-> Maybe Text
-> Text
-> Text
-> UpdateStage
UpdateStage'
    { $sel:deploymentId:UpdateStage' :: Maybe Text
deploymentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:routeSettings:UpdateStage' :: Maybe (HashMap Text RouteSettings)
routeSettings = Maybe (HashMap Text RouteSettings)
forall a. Maybe a
Prelude.Nothing,
      $sel:accessLogSettings:UpdateStage' :: Maybe AccessLogSettings
accessLogSettings = Maybe AccessLogSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:clientCertificateId:UpdateStage' :: Maybe Text
clientCertificateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stageVariables:UpdateStage' :: Maybe (HashMap Text Text)
stageVariables = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:autoDeploy:UpdateStage' :: Maybe Bool
autoDeploy = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRouteSettings:UpdateStage' :: Maybe RouteSettings
defaultRouteSettings = Maybe RouteSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateStage' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stageName:UpdateStage' :: Text
stageName = Text
pStageName_,
      $sel:apiId:UpdateStage' :: Text
apiId = Text
pApiId_
    }

-- | The deployment identifier for the API stage. Can\'t be updated if
-- autoDeploy is enabled.
updateStage_deploymentId :: Lens.Lens' UpdateStage (Prelude.Maybe Prelude.Text)
updateStage_deploymentId :: (Maybe Text -> f (Maybe Text)) -> UpdateStage -> f UpdateStage
updateStage_deploymentId = (UpdateStage -> Maybe Text)
-> (UpdateStage -> Maybe Text -> UpdateStage)
-> Lens UpdateStage UpdateStage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStage' {Maybe Text
deploymentId :: Maybe Text
$sel:deploymentId:UpdateStage' :: UpdateStage -> Maybe Text
deploymentId} -> Maybe Text
deploymentId) (\s :: UpdateStage
s@UpdateStage' {} Maybe Text
a -> UpdateStage
s {$sel:deploymentId:UpdateStage' :: Maybe Text
deploymentId = Maybe Text
a} :: UpdateStage)

-- | Route settings for the stage.
updateStage_routeSettings :: Lens.Lens' UpdateStage (Prelude.Maybe (Prelude.HashMap Prelude.Text RouteSettings))
updateStage_routeSettings :: (Maybe (HashMap Text RouteSettings)
 -> f (Maybe (HashMap Text RouteSettings)))
-> UpdateStage -> f UpdateStage
updateStage_routeSettings = (UpdateStage -> Maybe (HashMap Text RouteSettings))
-> (UpdateStage
    -> Maybe (HashMap Text RouteSettings) -> UpdateStage)
-> Lens
     UpdateStage
     UpdateStage
     (Maybe (HashMap Text RouteSettings))
     (Maybe (HashMap Text RouteSettings))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStage' {Maybe (HashMap Text RouteSettings)
routeSettings :: Maybe (HashMap Text RouteSettings)
$sel:routeSettings:UpdateStage' :: UpdateStage -> Maybe (HashMap Text RouteSettings)
routeSettings} -> Maybe (HashMap Text RouteSettings)
routeSettings) (\s :: UpdateStage
s@UpdateStage' {} Maybe (HashMap Text RouteSettings)
a -> UpdateStage
s {$sel:routeSettings:UpdateStage' :: Maybe (HashMap Text RouteSettings)
routeSettings = Maybe (HashMap Text RouteSettings)
a} :: UpdateStage) ((Maybe (HashMap Text RouteSettings)
  -> f (Maybe (HashMap Text RouteSettings)))
 -> UpdateStage -> f UpdateStage)
-> ((Maybe (HashMap Text RouteSettings)
     -> f (Maybe (HashMap Text RouteSettings)))
    -> Maybe (HashMap Text RouteSettings)
    -> f (Maybe (HashMap Text RouteSettings)))
-> (Maybe (HashMap Text RouteSettings)
    -> f (Maybe (HashMap Text RouteSettings)))
-> UpdateStage
-> f UpdateStage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
-> Iso
     (Maybe (HashMap Text RouteSettings))
     (Maybe (HashMap Text RouteSettings))
     (Maybe (HashMap Text RouteSettings))
     (Maybe (HashMap Text RouteSettings))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Settings for logging access in this stage.
updateStage_accessLogSettings :: Lens.Lens' UpdateStage (Prelude.Maybe AccessLogSettings)
updateStage_accessLogSettings :: (Maybe AccessLogSettings -> f (Maybe AccessLogSettings))
-> UpdateStage -> f UpdateStage
updateStage_accessLogSettings = (UpdateStage -> Maybe AccessLogSettings)
-> (UpdateStage -> Maybe AccessLogSettings -> UpdateStage)
-> Lens
     UpdateStage
     UpdateStage
     (Maybe AccessLogSettings)
     (Maybe AccessLogSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStage' {Maybe AccessLogSettings
accessLogSettings :: Maybe AccessLogSettings
$sel:accessLogSettings:UpdateStage' :: UpdateStage -> Maybe AccessLogSettings
accessLogSettings} -> Maybe AccessLogSettings
accessLogSettings) (\s :: UpdateStage
s@UpdateStage' {} Maybe AccessLogSettings
a -> UpdateStage
s {$sel:accessLogSettings:UpdateStage' :: Maybe AccessLogSettings
accessLogSettings = Maybe AccessLogSettings
a} :: UpdateStage)

-- | The identifier of a client certificate for a Stage.
updateStage_clientCertificateId :: Lens.Lens' UpdateStage (Prelude.Maybe Prelude.Text)
updateStage_clientCertificateId :: (Maybe Text -> f (Maybe Text)) -> UpdateStage -> f UpdateStage
updateStage_clientCertificateId = (UpdateStage -> Maybe Text)
-> (UpdateStage -> Maybe Text -> UpdateStage)
-> Lens UpdateStage UpdateStage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStage' {Maybe Text
clientCertificateId :: Maybe Text
$sel:clientCertificateId:UpdateStage' :: UpdateStage -> Maybe Text
clientCertificateId} -> Maybe Text
clientCertificateId) (\s :: UpdateStage
s@UpdateStage' {} Maybe Text
a -> UpdateStage
s {$sel:clientCertificateId:UpdateStage' :: Maybe Text
clientCertificateId = Maybe Text
a} :: UpdateStage)

-- | A map that defines the stage variables for a Stage. Variable names can
-- have alphanumeric and underscore characters, and the values must match
-- [A-Za-z0-9-._~:\/?#&=,]+.
updateStage_stageVariables :: Lens.Lens' UpdateStage (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateStage_stageVariables :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateStage -> f UpdateStage
updateStage_stageVariables = (UpdateStage -> Maybe (HashMap Text Text))
-> (UpdateStage -> Maybe (HashMap Text Text) -> UpdateStage)
-> Lens
     UpdateStage
     UpdateStage
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStage' {Maybe (HashMap Text Text)
stageVariables :: Maybe (HashMap Text Text)
$sel:stageVariables:UpdateStage' :: UpdateStage -> Maybe (HashMap Text Text)
stageVariables} -> Maybe (HashMap Text Text)
stageVariables) (\s :: UpdateStage
s@UpdateStage' {} Maybe (HashMap Text Text)
a -> UpdateStage
s {$sel:stageVariables:UpdateStage' :: Maybe (HashMap Text Text)
stageVariables = Maybe (HashMap Text Text)
a} :: UpdateStage) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateStage -> f UpdateStage)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateStage
-> f UpdateStage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies whether updates to an API automatically trigger a new
-- deployment. The default value is false.
updateStage_autoDeploy :: Lens.Lens' UpdateStage (Prelude.Maybe Prelude.Bool)
updateStage_autoDeploy :: (Maybe Bool -> f (Maybe Bool)) -> UpdateStage -> f UpdateStage
updateStage_autoDeploy = (UpdateStage -> Maybe Bool)
-> (UpdateStage -> Maybe Bool -> UpdateStage)
-> Lens UpdateStage UpdateStage (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStage' {Maybe Bool
autoDeploy :: Maybe Bool
$sel:autoDeploy:UpdateStage' :: UpdateStage -> Maybe Bool
autoDeploy} -> Maybe Bool
autoDeploy) (\s :: UpdateStage
s@UpdateStage' {} Maybe Bool
a -> UpdateStage
s {$sel:autoDeploy:UpdateStage' :: Maybe Bool
autoDeploy = Maybe Bool
a} :: UpdateStage)

-- | The default route settings for the stage.
updateStage_defaultRouteSettings :: Lens.Lens' UpdateStage (Prelude.Maybe RouteSettings)
updateStage_defaultRouteSettings :: (Maybe RouteSettings -> f (Maybe RouteSettings))
-> UpdateStage -> f UpdateStage
updateStage_defaultRouteSettings = (UpdateStage -> Maybe RouteSettings)
-> (UpdateStage -> Maybe RouteSettings -> UpdateStage)
-> Lens
     UpdateStage UpdateStage (Maybe RouteSettings) (Maybe RouteSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStage' {Maybe RouteSettings
defaultRouteSettings :: Maybe RouteSettings
$sel:defaultRouteSettings:UpdateStage' :: UpdateStage -> Maybe RouteSettings
defaultRouteSettings} -> Maybe RouteSettings
defaultRouteSettings) (\s :: UpdateStage
s@UpdateStage' {} Maybe RouteSettings
a -> UpdateStage
s {$sel:defaultRouteSettings:UpdateStage' :: Maybe RouteSettings
defaultRouteSettings = Maybe RouteSettings
a} :: UpdateStage)

-- | The description for the API stage.
updateStage_description :: Lens.Lens' UpdateStage (Prelude.Maybe Prelude.Text)
updateStage_description :: (Maybe Text -> f (Maybe Text)) -> UpdateStage -> f UpdateStage
updateStage_description = (UpdateStage -> Maybe Text)
-> (UpdateStage -> Maybe Text -> UpdateStage)
-> Lens UpdateStage UpdateStage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStage' {Maybe Text
description :: Maybe Text
$sel:description:UpdateStage' :: UpdateStage -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateStage
s@UpdateStage' {} Maybe Text
a -> UpdateStage
s {$sel:description:UpdateStage' :: Maybe Text
description = Maybe Text
a} :: UpdateStage)

-- | The stage name. Stage names can contain only alphanumeric characters,
-- hyphens, and underscores, or be $default. Maximum length is 128
-- characters.
updateStage_stageName :: Lens.Lens' UpdateStage Prelude.Text
updateStage_stageName :: (Text -> f Text) -> UpdateStage -> f UpdateStage
updateStage_stageName = (UpdateStage -> Text)
-> (UpdateStage -> Text -> UpdateStage)
-> Lens UpdateStage UpdateStage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStage' {Text
stageName :: Text
$sel:stageName:UpdateStage' :: UpdateStage -> Text
stageName} -> Text
stageName) (\s :: UpdateStage
s@UpdateStage' {} Text
a -> UpdateStage
s {$sel:stageName:UpdateStage' :: Text
stageName = Text
a} :: UpdateStage)

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

instance Core.AWSRequest UpdateStage where
  type AWSResponse UpdateStage = UpdateStageResponse
  request :: UpdateStage -> Request UpdateStage
request = Service -> UpdateStage -> Request UpdateStage
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateStage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateStage)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateStage))
-> Logger
-> Service
-> Proxy UpdateStage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateStage)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe (HashMap Text RouteSettings)
-> Maybe AccessLogSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> Maybe POSIX
-> Maybe RouteSettings
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> UpdateStageResponse
UpdateStageResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text RouteSettings)
 -> Maybe AccessLogSettings
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Bool
 -> Maybe POSIX
 -> Maybe RouteSettings
 -> Maybe Bool
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> UpdateStageResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text RouteSettings)
      -> Maybe AccessLogSettings
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe RouteSettings
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastDeploymentStatusMessage")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text RouteSettings)
   -> Maybe AccessLogSettings
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe RouteSettings
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text RouteSettings)
      -> Maybe AccessLogSettings
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe RouteSettings
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deploymentId")
            Either
  String
  (Maybe (HashMap Text RouteSettings)
   -> Maybe AccessLogSettings
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe RouteSettings
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe (HashMap Text RouteSettings))
-> Either
     String
     (Maybe AccessLogSettings
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe RouteSettings
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe (HashMap Text RouteSettings)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"routeSettings" Either String (Maybe (Maybe (HashMap Text RouteSettings)))
-> Maybe (HashMap Text RouteSettings)
-> Either String (Maybe (HashMap Text RouteSettings))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text RouteSettings)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe AccessLogSettings
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe RouteSettings
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe AccessLogSettings)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe RouteSettings
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe AccessLogSettings)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"accessLogSettings")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe RouteSettings
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe RouteSettings
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"clientCertificateId")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe RouteSettings
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Maybe Bool
      -> Maybe POSIX
      -> Maybe RouteSettings
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"stageVariables" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Bool
   -> Maybe POSIX
   -> Maybe RouteSettings
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe POSIX
      -> Maybe RouteSettings
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"autoDeploy")
            Either
  String
  (Maybe POSIX
   -> Maybe RouteSettings
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe RouteSettings
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdDate")
            Either
  String
  (Maybe RouteSettings
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe RouteSettings)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe RouteSettings)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"defaultRouteSettings")
            Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"apiGatewayManaged")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"stageName")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateStageResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastUpdatedDate")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> UpdateStageResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
            Either
  String (Maybe (HashMap Text Text) -> Int -> UpdateStageResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> UpdateStageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> UpdateStageResponse)
-> Either String Int -> Either String UpdateStageResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateStage

instance Prelude.NFData UpdateStage

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

instance Core.ToJSON UpdateStage where
  toJSON :: UpdateStage -> Value
toJSON UpdateStage' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text RouteSettings)
Maybe AccessLogSettings
Maybe RouteSettings
Text
apiId :: Text
stageName :: Text
description :: Maybe Text
defaultRouteSettings :: Maybe RouteSettings
autoDeploy :: Maybe Bool
stageVariables :: Maybe (HashMap Text Text)
clientCertificateId :: Maybe Text
accessLogSettings :: Maybe AccessLogSettings
routeSettings :: Maybe (HashMap Text RouteSettings)
deploymentId :: Maybe Text
$sel:apiId:UpdateStage' :: UpdateStage -> Text
$sel:stageName:UpdateStage' :: UpdateStage -> Text
$sel:description:UpdateStage' :: UpdateStage -> Maybe Text
$sel:defaultRouteSettings:UpdateStage' :: UpdateStage -> Maybe RouteSettings
$sel:autoDeploy:UpdateStage' :: UpdateStage -> Maybe Bool
$sel:stageVariables:UpdateStage' :: UpdateStage -> Maybe (HashMap Text Text)
$sel:clientCertificateId:UpdateStage' :: UpdateStage -> Maybe Text
$sel:accessLogSettings:UpdateStage' :: UpdateStage -> Maybe AccessLogSettings
$sel:routeSettings:UpdateStage' :: UpdateStage -> Maybe (HashMap Text RouteSettings)
$sel:deploymentId:UpdateStage' :: UpdateStage -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"deploymentId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
deploymentId,
            (Text
"routeSettings" Text -> HashMap Text RouteSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text RouteSettings -> Pair)
-> Maybe (HashMap Text RouteSettings) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text RouteSettings)
routeSettings,
            (Text
"accessLogSettings" Text -> AccessLogSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AccessLogSettings -> Pair)
-> Maybe AccessLogSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccessLogSettings
accessLogSettings,
            (Text
"clientCertificateId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientCertificateId,
            (Text
"stageVariables" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
stageVariables,
            (Text
"autoDeploy" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
autoDeploy,
            (Text
"defaultRouteSettings" Text -> RouteSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RouteSettings -> Pair) -> Maybe RouteSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RouteSettings
defaultRouteSettings,
            (Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description
          ]
      )

instance Core.ToPath UpdateStage where
  toPath :: UpdateStage -> ByteString
toPath UpdateStage' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text RouteSettings)
Maybe AccessLogSettings
Maybe RouteSettings
Text
apiId :: Text
stageName :: Text
description :: Maybe Text
defaultRouteSettings :: Maybe RouteSettings
autoDeploy :: Maybe Bool
stageVariables :: Maybe (HashMap Text Text)
clientCertificateId :: Maybe Text
accessLogSettings :: Maybe AccessLogSettings
routeSettings :: Maybe (HashMap Text RouteSettings)
deploymentId :: Maybe Text
$sel:apiId:UpdateStage' :: UpdateStage -> Text
$sel:stageName:UpdateStage' :: UpdateStage -> Text
$sel:description:UpdateStage' :: UpdateStage -> Maybe Text
$sel:defaultRouteSettings:UpdateStage' :: UpdateStage -> Maybe RouteSettings
$sel:autoDeploy:UpdateStage' :: UpdateStage -> Maybe Bool
$sel:stageVariables:UpdateStage' :: UpdateStage -> Maybe (HashMap Text Text)
$sel:clientCertificateId:UpdateStage' :: UpdateStage -> Maybe Text
$sel:accessLogSettings:UpdateStage' :: UpdateStage -> Maybe AccessLogSettings
$sel:routeSettings:UpdateStage' :: UpdateStage -> Maybe (HashMap Text RouteSettings)
$sel:deploymentId:UpdateStage' :: UpdateStage -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v2/apis/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
apiId,
        ByteString
"/stages/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
stageName
      ]

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

-- | /See:/ 'newUpdateStageResponse' smart constructor.
data UpdateStageResponse = UpdateStageResponse'
  { -- | Describes the status of the last deployment of a stage. Supported only
    -- for stages with autoDeploy enabled.
    UpdateStageResponse -> Maybe Text
lastDeploymentStatusMessage :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the Deployment that the Stage is associated with.
    -- Can\'t be updated if autoDeploy is enabled.
    UpdateStageResponse -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
    -- | Route settings for the stage, by routeKey.
    UpdateStageResponse -> Maybe (HashMap Text RouteSettings)
routeSettings :: Prelude.Maybe (Prelude.HashMap Prelude.Text RouteSettings),
    -- | Settings for logging access in this stage.
    UpdateStageResponse -> Maybe AccessLogSettings
accessLogSettings :: Prelude.Maybe AccessLogSettings,
    -- | The identifier of a client certificate for a Stage. Supported only for
    -- WebSocket APIs.
    UpdateStageResponse -> Maybe Text
clientCertificateId :: Prelude.Maybe Prelude.Text,
    -- | A map that defines the stage variables for a stage resource. Variable
    -- names can have alphanumeric and underscore characters, and the values
    -- must match [A-Za-z0-9-._~:\/?#&=,]+.
    UpdateStageResponse -> Maybe (HashMap Text Text)
stageVariables :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Specifies whether updates to an API automatically trigger a new
    -- deployment. The default value is false.
    UpdateStageResponse -> Maybe Bool
autoDeploy :: Prelude.Maybe Prelude.Bool,
    -- | The timestamp when the stage was created.
    UpdateStageResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | Default route settings for the stage.
    UpdateStageResponse -> Maybe RouteSettings
defaultRouteSettings :: Prelude.Maybe RouteSettings,
    -- | Specifies whether a stage is managed by API Gateway. If you created an
    -- API using quick create, the $default stage is managed by API Gateway.
    -- You can\'t modify the $default stage.
    UpdateStageResponse -> Maybe Bool
apiGatewayManaged :: Prelude.Maybe Prelude.Bool,
    -- | The name of the stage.
    UpdateStageResponse -> Maybe Text
stageName :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the stage was last updated.
    UpdateStageResponse -> Maybe POSIX
lastUpdatedDate :: Prelude.Maybe Core.POSIX,
    -- | The description of the stage.
    UpdateStageResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The collection of tags. Each tag element is associated with a given
    -- resource.
    UpdateStageResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    UpdateStageResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateStageResponse -> UpdateStageResponse -> Bool
(UpdateStageResponse -> UpdateStageResponse -> Bool)
-> (UpdateStageResponse -> UpdateStageResponse -> Bool)
-> Eq UpdateStageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateStageResponse -> UpdateStageResponse -> Bool
$c/= :: UpdateStageResponse -> UpdateStageResponse -> Bool
== :: UpdateStageResponse -> UpdateStageResponse -> Bool
$c== :: UpdateStageResponse -> UpdateStageResponse -> Bool
Prelude.Eq, ReadPrec [UpdateStageResponse]
ReadPrec UpdateStageResponse
Int -> ReadS UpdateStageResponse
ReadS [UpdateStageResponse]
(Int -> ReadS UpdateStageResponse)
-> ReadS [UpdateStageResponse]
-> ReadPrec UpdateStageResponse
-> ReadPrec [UpdateStageResponse]
-> Read UpdateStageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateStageResponse]
$creadListPrec :: ReadPrec [UpdateStageResponse]
readPrec :: ReadPrec UpdateStageResponse
$creadPrec :: ReadPrec UpdateStageResponse
readList :: ReadS [UpdateStageResponse]
$creadList :: ReadS [UpdateStageResponse]
readsPrec :: Int -> ReadS UpdateStageResponse
$creadsPrec :: Int -> ReadS UpdateStageResponse
Prelude.Read, Int -> UpdateStageResponse -> ShowS
[UpdateStageResponse] -> ShowS
UpdateStageResponse -> String
(Int -> UpdateStageResponse -> ShowS)
-> (UpdateStageResponse -> String)
-> ([UpdateStageResponse] -> ShowS)
-> Show UpdateStageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateStageResponse] -> ShowS
$cshowList :: [UpdateStageResponse] -> ShowS
show :: UpdateStageResponse -> String
$cshow :: UpdateStageResponse -> String
showsPrec :: Int -> UpdateStageResponse -> ShowS
$cshowsPrec :: Int -> UpdateStageResponse -> ShowS
Prelude.Show, (forall x. UpdateStageResponse -> Rep UpdateStageResponse x)
-> (forall x. Rep UpdateStageResponse x -> UpdateStageResponse)
-> Generic UpdateStageResponse
forall x. Rep UpdateStageResponse x -> UpdateStageResponse
forall x. UpdateStageResponse -> Rep UpdateStageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateStageResponse x -> UpdateStageResponse
$cfrom :: forall x. UpdateStageResponse -> Rep UpdateStageResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateStageResponse' 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:
--
-- 'lastDeploymentStatusMessage', 'updateStageResponse_lastDeploymentStatusMessage' - Describes the status of the last deployment of a stage. Supported only
-- for stages with autoDeploy enabled.
--
-- 'deploymentId', 'updateStageResponse_deploymentId' - The identifier of the Deployment that the Stage is associated with.
-- Can\'t be updated if autoDeploy is enabled.
--
-- 'routeSettings', 'updateStageResponse_routeSettings' - Route settings for the stage, by routeKey.
--
-- 'accessLogSettings', 'updateStageResponse_accessLogSettings' - Settings for logging access in this stage.
--
-- 'clientCertificateId', 'updateStageResponse_clientCertificateId' - The identifier of a client certificate for a Stage. Supported only for
-- WebSocket APIs.
--
-- 'stageVariables', 'updateStageResponse_stageVariables' - A map that defines the stage variables for a stage resource. Variable
-- names can have alphanumeric and underscore characters, and the values
-- must match [A-Za-z0-9-._~:\/?#&=,]+.
--
-- 'autoDeploy', 'updateStageResponse_autoDeploy' - Specifies whether updates to an API automatically trigger a new
-- deployment. The default value is false.
--
-- 'createdDate', 'updateStageResponse_createdDate' - The timestamp when the stage was created.
--
-- 'defaultRouteSettings', 'updateStageResponse_defaultRouteSettings' - Default route settings for the stage.
--
-- 'apiGatewayManaged', 'updateStageResponse_apiGatewayManaged' - Specifies whether a stage is managed by API Gateway. If you created an
-- API using quick create, the $default stage is managed by API Gateway.
-- You can\'t modify the $default stage.
--
-- 'stageName', 'updateStageResponse_stageName' - The name of the stage.
--
-- 'lastUpdatedDate', 'updateStageResponse_lastUpdatedDate' - The timestamp when the stage was last updated.
--
-- 'description', 'updateStageResponse_description' - The description of the stage.
--
-- 'tags', 'updateStageResponse_tags' - The collection of tags. Each tag element is associated with a given
-- resource.
--
-- 'httpStatus', 'updateStageResponse_httpStatus' - The response's http status code.
newUpdateStageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateStageResponse
newUpdateStageResponse :: Int -> UpdateStageResponse
newUpdateStageResponse Int
pHttpStatus_ =
  UpdateStageResponse' :: Maybe Text
-> Maybe Text
-> Maybe (HashMap Text RouteSettings)
-> Maybe AccessLogSettings
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> Maybe POSIX
-> Maybe RouteSettings
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> UpdateStageResponse
UpdateStageResponse'
    { $sel:lastDeploymentStatusMessage:UpdateStageResponse' :: Maybe Text
lastDeploymentStatusMessage =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentId:UpdateStageResponse' :: Maybe Text
deploymentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:routeSettings:UpdateStageResponse' :: Maybe (HashMap Text RouteSettings)
routeSettings = Maybe (HashMap Text RouteSettings)
forall a. Maybe a
Prelude.Nothing,
      $sel:accessLogSettings:UpdateStageResponse' :: Maybe AccessLogSettings
accessLogSettings = Maybe AccessLogSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:clientCertificateId:UpdateStageResponse' :: Maybe Text
clientCertificateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stageVariables:UpdateStageResponse' :: Maybe (HashMap Text Text)
stageVariables = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:autoDeploy:UpdateStageResponse' :: Maybe Bool
autoDeploy = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:UpdateStageResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRouteSettings:UpdateStageResponse' :: Maybe RouteSettings
defaultRouteSettings = Maybe RouteSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:apiGatewayManaged:UpdateStageResponse' :: Maybe Bool
apiGatewayManaged = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:stageName:UpdateStageResponse' :: Maybe Text
stageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:UpdateStageResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateStageResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateStageResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateStageResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Describes the status of the last deployment of a stage. Supported only
-- for stages with autoDeploy enabled.
updateStageResponse_lastDeploymentStatusMessage :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.Text)
updateStageResponse_lastDeploymentStatusMessage :: (Maybe Text -> f (Maybe Text))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_lastDeploymentStatusMessage = (UpdateStageResponse -> Maybe Text)
-> (UpdateStageResponse -> Maybe Text -> UpdateStageResponse)
-> Lens
     UpdateStageResponse UpdateStageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe Text
lastDeploymentStatusMessage :: Maybe Text
$sel:lastDeploymentStatusMessage:UpdateStageResponse' :: UpdateStageResponse -> Maybe Text
lastDeploymentStatusMessage} -> Maybe Text
lastDeploymentStatusMessage) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe Text
a -> UpdateStageResponse
s {$sel:lastDeploymentStatusMessage:UpdateStageResponse' :: Maybe Text
lastDeploymentStatusMessage = Maybe Text
a} :: UpdateStageResponse)

-- | The identifier of the Deployment that the Stage is associated with.
-- Can\'t be updated if autoDeploy is enabled.
updateStageResponse_deploymentId :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.Text)
updateStageResponse_deploymentId :: (Maybe Text -> f (Maybe Text))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_deploymentId = (UpdateStageResponse -> Maybe Text)
-> (UpdateStageResponse -> Maybe Text -> UpdateStageResponse)
-> Lens
     UpdateStageResponse UpdateStageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe Text
deploymentId :: Maybe Text
$sel:deploymentId:UpdateStageResponse' :: UpdateStageResponse -> Maybe Text
deploymentId} -> Maybe Text
deploymentId) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe Text
a -> UpdateStageResponse
s {$sel:deploymentId:UpdateStageResponse' :: Maybe Text
deploymentId = Maybe Text
a} :: UpdateStageResponse)

-- | Route settings for the stage, by routeKey.
updateStageResponse_routeSettings :: Lens.Lens' UpdateStageResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text RouteSettings))
updateStageResponse_routeSettings :: (Maybe (HashMap Text RouteSettings)
 -> f (Maybe (HashMap Text RouteSettings)))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_routeSettings = (UpdateStageResponse -> Maybe (HashMap Text RouteSettings))
-> (UpdateStageResponse
    -> Maybe (HashMap Text RouteSettings) -> UpdateStageResponse)
-> Lens
     UpdateStageResponse
     UpdateStageResponse
     (Maybe (HashMap Text RouteSettings))
     (Maybe (HashMap Text RouteSettings))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe (HashMap Text RouteSettings)
routeSettings :: Maybe (HashMap Text RouteSettings)
$sel:routeSettings:UpdateStageResponse' :: UpdateStageResponse -> Maybe (HashMap Text RouteSettings)
routeSettings} -> Maybe (HashMap Text RouteSettings)
routeSettings) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe (HashMap Text RouteSettings)
a -> UpdateStageResponse
s {$sel:routeSettings:UpdateStageResponse' :: Maybe (HashMap Text RouteSettings)
routeSettings = Maybe (HashMap Text RouteSettings)
a} :: UpdateStageResponse) ((Maybe (HashMap Text RouteSettings)
  -> f (Maybe (HashMap Text RouteSettings)))
 -> UpdateStageResponse -> f UpdateStageResponse)
-> ((Maybe (HashMap Text RouteSettings)
     -> f (Maybe (HashMap Text RouteSettings)))
    -> Maybe (HashMap Text RouteSettings)
    -> f (Maybe (HashMap Text RouteSettings)))
-> (Maybe (HashMap Text RouteSettings)
    -> f (Maybe (HashMap Text RouteSettings)))
-> UpdateStageResponse
-> f UpdateStageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
-> Iso
     (Maybe (HashMap Text RouteSettings))
     (Maybe (HashMap Text RouteSettings))
     (Maybe (HashMap Text RouteSettings))
     (Maybe (HashMap Text RouteSettings))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
  (HashMap Text RouteSettings)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Settings for logging access in this stage.
updateStageResponse_accessLogSettings :: Lens.Lens' UpdateStageResponse (Prelude.Maybe AccessLogSettings)
updateStageResponse_accessLogSettings :: (Maybe AccessLogSettings -> f (Maybe AccessLogSettings))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_accessLogSettings = (UpdateStageResponse -> Maybe AccessLogSettings)
-> (UpdateStageResponse
    -> Maybe AccessLogSettings -> UpdateStageResponse)
-> Lens
     UpdateStageResponse
     UpdateStageResponse
     (Maybe AccessLogSettings)
     (Maybe AccessLogSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe AccessLogSettings
accessLogSettings :: Maybe AccessLogSettings
$sel:accessLogSettings:UpdateStageResponse' :: UpdateStageResponse -> Maybe AccessLogSettings
accessLogSettings} -> Maybe AccessLogSettings
accessLogSettings) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe AccessLogSettings
a -> UpdateStageResponse
s {$sel:accessLogSettings:UpdateStageResponse' :: Maybe AccessLogSettings
accessLogSettings = Maybe AccessLogSettings
a} :: UpdateStageResponse)

-- | The identifier of a client certificate for a Stage. Supported only for
-- WebSocket APIs.
updateStageResponse_clientCertificateId :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.Text)
updateStageResponse_clientCertificateId :: (Maybe Text -> f (Maybe Text))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_clientCertificateId = (UpdateStageResponse -> Maybe Text)
-> (UpdateStageResponse -> Maybe Text -> UpdateStageResponse)
-> Lens
     UpdateStageResponse UpdateStageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe Text
clientCertificateId :: Maybe Text
$sel:clientCertificateId:UpdateStageResponse' :: UpdateStageResponse -> Maybe Text
clientCertificateId} -> Maybe Text
clientCertificateId) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe Text
a -> UpdateStageResponse
s {$sel:clientCertificateId:UpdateStageResponse' :: Maybe Text
clientCertificateId = Maybe Text
a} :: UpdateStageResponse)

-- | A map that defines the stage variables for a stage resource. Variable
-- names can have alphanumeric and underscore characters, and the values
-- must match [A-Za-z0-9-._~:\/?#&=,]+.
updateStageResponse_stageVariables :: Lens.Lens' UpdateStageResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateStageResponse_stageVariables :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_stageVariables = (UpdateStageResponse -> Maybe (HashMap Text Text))
-> (UpdateStageResponse
    -> Maybe (HashMap Text Text) -> UpdateStageResponse)
-> Lens
     UpdateStageResponse
     UpdateStageResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe (HashMap Text Text)
stageVariables :: Maybe (HashMap Text Text)
$sel:stageVariables:UpdateStageResponse' :: UpdateStageResponse -> Maybe (HashMap Text Text)
stageVariables} -> Maybe (HashMap Text Text)
stageVariables) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe (HashMap Text Text)
a -> UpdateStageResponse
s {$sel:stageVariables:UpdateStageResponse' :: Maybe (HashMap Text Text)
stageVariables = Maybe (HashMap Text Text)
a} :: UpdateStageResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateStageResponse -> f UpdateStageResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateStageResponse
-> f UpdateStageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies whether updates to an API automatically trigger a new
-- deployment. The default value is false.
updateStageResponse_autoDeploy :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.Bool)
updateStageResponse_autoDeploy :: (Maybe Bool -> f (Maybe Bool))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_autoDeploy = (UpdateStageResponse -> Maybe Bool)
-> (UpdateStageResponse -> Maybe Bool -> UpdateStageResponse)
-> Lens
     UpdateStageResponse UpdateStageResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe Bool
autoDeploy :: Maybe Bool
$sel:autoDeploy:UpdateStageResponse' :: UpdateStageResponse -> Maybe Bool
autoDeploy} -> Maybe Bool
autoDeploy) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe Bool
a -> UpdateStageResponse
s {$sel:autoDeploy:UpdateStageResponse' :: Maybe Bool
autoDeploy = Maybe Bool
a} :: UpdateStageResponse)

-- | The timestamp when the stage was created.
updateStageResponse_createdDate :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.UTCTime)
updateStageResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_createdDate = (UpdateStageResponse -> Maybe POSIX)
-> (UpdateStageResponse -> Maybe POSIX -> UpdateStageResponse)
-> Lens
     UpdateStageResponse UpdateStageResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:UpdateStageResponse' :: UpdateStageResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe POSIX
a -> UpdateStageResponse
s {$sel:createdDate:UpdateStageResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: UpdateStageResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateStageResponse -> f UpdateStageResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateStageResponse
-> f UpdateStageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Default route settings for the stage.
updateStageResponse_defaultRouteSettings :: Lens.Lens' UpdateStageResponse (Prelude.Maybe RouteSettings)
updateStageResponse_defaultRouteSettings :: (Maybe RouteSettings -> f (Maybe RouteSettings))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_defaultRouteSettings = (UpdateStageResponse -> Maybe RouteSettings)
-> (UpdateStageResponse
    -> Maybe RouteSettings -> UpdateStageResponse)
-> Lens
     UpdateStageResponse
     UpdateStageResponse
     (Maybe RouteSettings)
     (Maybe RouteSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe RouteSettings
defaultRouteSettings :: Maybe RouteSettings
$sel:defaultRouteSettings:UpdateStageResponse' :: UpdateStageResponse -> Maybe RouteSettings
defaultRouteSettings} -> Maybe RouteSettings
defaultRouteSettings) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe RouteSettings
a -> UpdateStageResponse
s {$sel:defaultRouteSettings:UpdateStageResponse' :: Maybe RouteSettings
defaultRouteSettings = Maybe RouteSettings
a} :: UpdateStageResponse)

-- | Specifies whether a stage is managed by API Gateway. If you created an
-- API using quick create, the $default stage is managed by API Gateway.
-- You can\'t modify the $default stage.
updateStageResponse_apiGatewayManaged :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.Bool)
updateStageResponse_apiGatewayManaged :: (Maybe Bool -> f (Maybe Bool))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_apiGatewayManaged = (UpdateStageResponse -> Maybe Bool)
-> (UpdateStageResponse -> Maybe Bool -> UpdateStageResponse)
-> Lens
     UpdateStageResponse UpdateStageResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe Bool
apiGatewayManaged :: Maybe Bool
$sel:apiGatewayManaged:UpdateStageResponse' :: UpdateStageResponse -> Maybe Bool
apiGatewayManaged} -> Maybe Bool
apiGatewayManaged) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe Bool
a -> UpdateStageResponse
s {$sel:apiGatewayManaged:UpdateStageResponse' :: Maybe Bool
apiGatewayManaged = Maybe Bool
a} :: UpdateStageResponse)

-- | The name of the stage.
updateStageResponse_stageName :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.Text)
updateStageResponse_stageName :: (Maybe Text -> f (Maybe Text))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_stageName = (UpdateStageResponse -> Maybe Text)
-> (UpdateStageResponse -> Maybe Text -> UpdateStageResponse)
-> Lens
     UpdateStageResponse UpdateStageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe Text
stageName :: Maybe Text
$sel:stageName:UpdateStageResponse' :: UpdateStageResponse -> Maybe Text
stageName} -> Maybe Text
stageName) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe Text
a -> UpdateStageResponse
s {$sel:stageName:UpdateStageResponse' :: Maybe Text
stageName = Maybe Text
a} :: UpdateStageResponse)

-- | The timestamp when the stage was last updated.
updateStageResponse_lastUpdatedDate :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.UTCTime)
updateStageResponse_lastUpdatedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_lastUpdatedDate = (UpdateStageResponse -> Maybe POSIX)
-> (UpdateStageResponse -> Maybe POSIX -> UpdateStageResponse)
-> Lens
     UpdateStageResponse UpdateStageResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe POSIX
lastUpdatedDate :: Maybe POSIX
$sel:lastUpdatedDate:UpdateStageResponse' :: UpdateStageResponse -> Maybe POSIX
lastUpdatedDate} -> Maybe POSIX
lastUpdatedDate) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe POSIX
a -> UpdateStageResponse
s {$sel:lastUpdatedDate:UpdateStageResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
a} :: UpdateStageResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateStageResponse -> f UpdateStageResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateStageResponse
-> f UpdateStageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The description of the stage.
updateStageResponse_description :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.Text)
updateStageResponse_description :: (Maybe Text -> f (Maybe Text))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_description = (UpdateStageResponse -> Maybe Text)
-> (UpdateStageResponse -> Maybe Text -> UpdateStageResponse)
-> Lens
     UpdateStageResponse UpdateStageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe Text
description :: Maybe Text
$sel:description:UpdateStageResponse' :: UpdateStageResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe Text
a -> UpdateStageResponse
s {$sel:description:UpdateStageResponse' :: Maybe Text
description = Maybe Text
a} :: UpdateStageResponse)

-- | The collection of tags. Each tag element is associated with a given
-- resource.
updateStageResponse_tags :: Lens.Lens' UpdateStageResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateStageResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateStageResponse -> f UpdateStageResponse
updateStageResponse_tags = (UpdateStageResponse -> Maybe (HashMap Text Text))
-> (UpdateStageResponse
    -> Maybe (HashMap Text Text) -> UpdateStageResponse)
-> Lens
     UpdateStageResponse
     UpdateStageResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:UpdateStageResponse' :: UpdateStageResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe (HashMap Text Text)
a -> UpdateStageResponse
s {$sel:tags:UpdateStageResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: UpdateStageResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateStageResponse -> f UpdateStageResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateStageResponse
-> f UpdateStageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData UpdateStageResponse