{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a Stage.
module Amazonka.ApiGatewayV2.UpdateStage
  ( -- * Creating a Request
    UpdateStage (..),
    newUpdateStage,

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

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

    -- * Response Lenses
    updateStageResponse_accessLogSettings,
    updateStageResponse_apiGatewayManaged,
    updateStageResponse_autoDeploy,
    updateStageResponse_clientCertificateId,
    updateStageResponse_createdDate,
    updateStageResponse_defaultRouteSettings,
    updateStageResponse_deploymentId,
    updateStageResponse_description,
    updateStageResponse_lastDeploymentStatusMessage,
    updateStageResponse_lastUpdatedDate,
    updateStageResponse_routeSettings,
    updateStageResponse_stageName,
    updateStageResponse_stageVariables,
    updateStageResponse_tags,
    updateStageResponse_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 a Stage.
--
-- /See:/ 'newUpdateStage' smart constructor.
data UpdateStage = UpdateStage'
  { -- | Settings for logging access in this stage.
    UpdateStage -> Maybe AccessLogSettings
accessLogSettings :: Prelude.Maybe AccessLogSettings,
    -- | 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 identifier of a client certificate for a Stage.
    UpdateStage -> Maybe Text
clientCertificateId :: Prelude.Maybe Prelude.Text,
    -- | The default route settings for the stage.
    UpdateStage -> Maybe RouteSettings
defaultRouteSettings :: Prelude.Maybe RouteSettings,
    -- | The deployment identifier for the API stage. Can\'t be updated if
    -- autoDeploy is enabled.
    UpdateStage -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
    -- | The description for the API stage.
    UpdateStage -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Route settings for the stage.
    UpdateStage -> Maybe (HashMap Text RouteSettings)
routeSettings :: Prelude.Maybe (Prelude.HashMap Prelude.Text RouteSettings),
    -- | 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),
    -- | 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
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]
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
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. 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:
--
-- 'accessLogSettings', 'updateStage_accessLogSettings' - Settings for logging access in this stage.
--
-- 'autoDeploy', 'updateStage_autoDeploy' - Specifies whether updates to an API automatically trigger a new
-- deployment. The default value is false.
--
-- 'clientCertificateId', 'updateStage_clientCertificateId' - The identifier of a client certificate for a Stage.
--
-- 'defaultRouteSettings', 'updateStage_defaultRouteSettings' - The default route settings for the stage.
--
-- 'deploymentId', 'updateStage_deploymentId' - The deployment identifier for the API stage. Can\'t be updated if
-- autoDeploy is enabled.
--
-- 'description', 'updateStage_description' - The description for the API stage.
--
-- 'routeSettings', 'updateStage_routeSettings' - Route settings for the 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-._~:\/?#&=,]+.
--
-- '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'
    { $sel:accessLogSettings:UpdateStage' :: Maybe AccessLogSettings
accessLogSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:autoDeploy:UpdateStage' :: Maybe Bool
autoDeploy = forall a. Maybe a
Prelude.Nothing,
      $sel:clientCertificateId:UpdateStage' :: Maybe Text
clientCertificateId = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRouteSettings:UpdateStage' :: Maybe RouteSettings
defaultRouteSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentId:UpdateStage' :: Maybe Text
deploymentId = forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateStage' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:routeSettings:UpdateStage' :: Maybe (HashMap Text RouteSettings)
routeSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:stageVariables:UpdateStage' :: Maybe (HashMap Text Text)
stageVariables = forall a. Maybe a
Prelude.Nothing,
      $sel:stageName:UpdateStage' :: Text
stageName = Text
pStageName_,
      $sel:apiId:UpdateStage' :: Text
apiId = Text
pApiId_
    }

-- | Settings for logging access in this stage.
updateStage_accessLogSettings :: Lens.Lens' UpdateStage (Prelude.Maybe AccessLogSettings)
updateStage_accessLogSettings :: Lens' UpdateStage (Maybe AccessLogSettings)
updateStage_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)

-- | 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 :: Lens' UpdateStage (Maybe Bool)
updateStage_autoDeploy = 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 identifier of a client certificate for a Stage.
updateStage_clientCertificateId :: Lens.Lens' UpdateStage (Prelude.Maybe Prelude.Text)
updateStage_clientCertificateId :: Lens' UpdateStage (Maybe Text)
updateStage_clientCertificateId = 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)

-- | The default route settings for the stage.
updateStage_defaultRouteSettings :: Lens.Lens' UpdateStage (Prelude.Maybe RouteSettings)
updateStage_defaultRouteSettings :: Lens' UpdateStage (Maybe RouteSettings)
updateStage_defaultRouteSettings = 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 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 :: Lens' UpdateStage (Maybe Text)
updateStage_deploymentId = 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)

-- | The description for the API stage.
updateStage_description :: Lens.Lens' UpdateStage (Prelude.Maybe Prelude.Text)
updateStage_description :: Lens' UpdateStage (Maybe Text)
updateStage_description = 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)

-- | Route settings for the stage.
updateStage_routeSettings :: Lens.Lens' UpdateStage (Prelude.Maybe (Prelude.HashMap Prelude.Text RouteSettings))
updateStage_routeSettings :: Lens' UpdateStage (Maybe (HashMap Text RouteSettings))
updateStage_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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: Lens' UpdateStage (Maybe (HashMap Text Text))
updateStage_stageVariables = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: Lens' UpdateStage Text
updateStage_stageName = 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 :: Lens' UpdateStage Text
updateStage_apiId = 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 :: (Service -> Service) -> UpdateStage -> Request UpdateStage
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 UpdateStage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateStage)))
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 AccessLogSettings
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe ISO8601
-> Maybe RouteSettings
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe (HashMap Text RouteSettings)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Int
-> UpdateStageResponse
UpdateStageResponse'
            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
"accessLogSettings")
            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
"apiGatewayManaged")
            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
"autoDeploy")
            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
"clientCertificateId")
            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
"createdDate")
            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
"defaultRouteSettings")
            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
"deploymentId")
            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
"description")
            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
"lastDeploymentStatusMessage")
            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
"lastUpdatedDate")
            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
"routeSettings" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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
"stageName")
            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
"stageVariables" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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 UpdateStage where
  hashWithSalt :: Int -> UpdateStage -> Int
hashWithSalt Int
_salt UpdateStage' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text RouteSettings)
Maybe AccessLogSettings
Maybe RouteSettings
Text
apiId :: Text
stageName :: Text
stageVariables :: Maybe (HashMap Text Text)
routeSettings :: Maybe (HashMap Text RouteSettings)
description :: Maybe Text
deploymentId :: Maybe Text
defaultRouteSettings :: Maybe RouteSettings
clientCertificateId :: Maybe Text
autoDeploy :: Maybe Bool
accessLogSettings :: Maybe AccessLogSettings
$sel:apiId:UpdateStage' :: UpdateStage -> Text
$sel:stageName:UpdateStage' :: UpdateStage -> Text
$sel:stageVariables:UpdateStage' :: UpdateStage -> Maybe (HashMap Text Text)
$sel:routeSettings:UpdateStage' :: UpdateStage -> Maybe (HashMap Text RouteSettings)
$sel:description:UpdateStage' :: UpdateStage -> Maybe Text
$sel:deploymentId:UpdateStage' :: UpdateStage -> Maybe Text
$sel:defaultRouteSettings:UpdateStage' :: UpdateStage -> Maybe RouteSettings
$sel:clientCertificateId:UpdateStage' :: UpdateStage -> Maybe Text
$sel:autoDeploy:UpdateStage' :: UpdateStage -> Maybe Bool
$sel:accessLogSettings:UpdateStage' :: UpdateStage -> Maybe AccessLogSettings
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AccessLogSettings
accessLogSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
autoDeploy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientCertificateId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RouteSettings
defaultRouteSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deploymentId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text RouteSettings)
routeSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
stageVariables
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stageName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
apiId

instance Prelude.NFData UpdateStage where
  rnf :: UpdateStage -> ()
rnf UpdateStage' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text RouteSettings)
Maybe AccessLogSettings
Maybe RouteSettings
Text
apiId :: Text
stageName :: Text
stageVariables :: Maybe (HashMap Text Text)
routeSettings :: Maybe (HashMap Text RouteSettings)
description :: Maybe Text
deploymentId :: Maybe Text
defaultRouteSettings :: Maybe RouteSettings
clientCertificateId :: Maybe Text
autoDeploy :: Maybe Bool
accessLogSettings :: Maybe AccessLogSettings
$sel:apiId:UpdateStage' :: UpdateStage -> Text
$sel:stageName:UpdateStage' :: UpdateStage -> Text
$sel:stageVariables:UpdateStage' :: UpdateStage -> Maybe (HashMap Text Text)
$sel:routeSettings:UpdateStage' :: UpdateStage -> Maybe (HashMap Text RouteSettings)
$sel:description:UpdateStage' :: UpdateStage -> Maybe Text
$sel:deploymentId:UpdateStage' :: UpdateStage -> Maybe Text
$sel:defaultRouteSettings:UpdateStage' :: UpdateStage -> Maybe RouteSettings
$sel:clientCertificateId:UpdateStage' :: UpdateStage -> Maybe Text
$sel:autoDeploy:UpdateStage' :: UpdateStage -> Maybe Bool
$sel:accessLogSettings:UpdateStage' :: UpdateStage -> Maybe AccessLogSettings
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AccessLogSettings
accessLogSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
autoDeploy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientCertificateId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RouteSettings
defaultRouteSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deploymentId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text RouteSettings)
routeSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
stageVariables
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stageName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
apiId

instance Data.ToHeaders UpdateStage where
  toHeaders :: UpdateStage -> 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 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
stageVariables :: Maybe (HashMap Text Text)
routeSettings :: Maybe (HashMap Text RouteSettings)
description :: Maybe Text
deploymentId :: Maybe Text
defaultRouteSettings :: Maybe RouteSettings
clientCertificateId :: Maybe Text
autoDeploy :: Maybe Bool
accessLogSettings :: Maybe AccessLogSettings
$sel:apiId:UpdateStage' :: UpdateStage -> Text
$sel:stageName:UpdateStage' :: UpdateStage -> Text
$sel:stageVariables:UpdateStage' :: UpdateStage -> Maybe (HashMap Text Text)
$sel:routeSettings:UpdateStage' :: UpdateStage -> Maybe (HashMap Text RouteSettings)
$sel:description:UpdateStage' :: UpdateStage -> Maybe Text
$sel:deploymentId:UpdateStage' :: UpdateStage -> Maybe Text
$sel:defaultRouteSettings:UpdateStage' :: UpdateStage -> Maybe RouteSettings
$sel:clientCertificateId:UpdateStage' :: UpdateStage -> Maybe Text
$sel:autoDeploy:UpdateStage' :: UpdateStage -> Maybe Bool
$sel:accessLogSettings:UpdateStage' :: UpdateStage -> Maybe AccessLogSettings
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"accessLogSettings" 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 AccessLogSettings
accessLogSettings,
            (Key
"autoDeploy" 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 Bool
autoDeploy,
            (Key
"clientCertificateId" 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
clientCertificateId,
            (Key
"defaultRouteSettings" 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 RouteSettings
defaultRouteSettings,
            (Key
"deploymentId" 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
deploymentId,
            (Key
"description" 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
description,
            (Key
"routeSettings" 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 (HashMap Text RouteSettings)
routeSettings,
            (Key
"stageVariables" 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 (HashMap Text Text)
stageVariables
          ]
      )

instance Data.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
stageVariables :: Maybe (HashMap Text Text)
routeSettings :: Maybe (HashMap Text RouteSettings)
description :: Maybe Text
deploymentId :: Maybe Text
defaultRouteSettings :: Maybe RouteSettings
clientCertificateId :: Maybe Text
autoDeploy :: Maybe Bool
accessLogSettings :: Maybe AccessLogSettings
$sel:apiId:UpdateStage' :: UpdateStage -> Text
$sel:stageName:UpdateStage' :: UpdateStage -> Text
$sel:stageVariables:UpdateStage' :: UpdateStage -> Maybe (HashMap Text Text)
$sel:routeSettings:UpdateStage' :: UpdateStage -> Maybe (HashMap Text RouteSettings)
$sel:description:UpdateStage' :: UpdateStage -> Maybe Text
$sel:deploymentId:UpdateStage' :: UpdateStage -> Maybe Text
$sel:defaultRouteSettings:UpdateStage' :: UpdateStage -> Maybe RouteSettings
$sel:clientCertificateId:UpdateStage' :: UpdateStage -> Maybe Text
$sel:autoDeploy:UpdateStage' :: UpdateStage -> Maybe Bool
$sel:accessLogSettings:UpdateStage' :: UpdateStage -> Maybe AccessLogSettings
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v2/apis/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
apiId,
        ByteString
"/stages/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
stageName
      ]

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

-- | /See:/ 'newUpdateStageResponse' smart constructor.
data UpdateStageResponse = UpdateStageResponse'
  { -- | Settings for logging access in this stage.
    UpdateStageResponse -> Maybe AccessLogSettings
accessLogSettings :: Prelude.Maybe AccessLogSettings,
    -- | 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,
    -- | 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 identifier of a client certificate for a Stage. Supported only for
    -- WebSocket APIs.
    UpdateStageResponse -> Maybe Text
clientCertificateId :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the stage was created.
    UpdateStageResponse -> Maybe ISO8601
createdDate :: Prelude.Maybe Data.ISO8601,
    -- | Default route settings for the stage.
    UpdateStageResponse -> Maybe RouteSettings
defaultRouteSettings :: Prelude.Maybe RouteSettings,
    -- | 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,
    -- | The description of the stage.
    UpdateStageResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | 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 timestamp when the stage was last updated.
    UpdateStageResponse -> Maybe ISO8601
lastUpdatedDate :: Prelude.Maybe Data.ISO8601,
    -- | Route settings for the stage, by routeKey.
    UpdateStageResponse -> Maybe (HashMap Text RouteSettings)
routeSettings :: Prelude.Maybe (Prelude.HashMap Prelude.Text RouteSettings),
    -- | The name of the stage.
    UpdateStageResponse -> Maybe Text
stageName :: 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),
    -- | 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
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]
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
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. 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:
--
-- 'accessLogSettings', 'updateStageResponse_accessLogSettings' - Settings for logging access in this 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.
--
-- 'autoDeploy', 'updateStageResponse_autoDeploy' - Specifies whether updates to an API automatically trigger a new
-- deployment. The default value is false.
--
-- 'clientCertificateId', 'updateStageResponse_clientCertificateId' - The identifier of a client certificate for a Stage. Supported only for
-- WebSocket APIs.
--
-- 'createdDate', 'updateStageResponse_createdDate' - The timestamp when the stage was created.
--
-- 'defaultRouteSettings', 'updateStageResponse_defaultRouteSettings' - Default route settings for the stage.
--
-- 'deploymentId', 'updateStageResponse_deploymentId' - The identifier of the Deployment that the Stage is associated with.
-- Can\'t be updated if autoDeploy is enabled.
--
-- 'description', 'updateStageResponse_description' - The description of the stage.
--
-- 'lastDeploymentStatusMessage', 'updateStageResponse_lastDeploymentStatusMessage' - Describes the status of the last deployment of a stage. Supported only
-- for stages with autoDeploy enabled.
--
-- 'lastUpdatedDate', 'updateStageResponse_lastUpdatedDate' - The timestamp when the stage was last updated.
--
-- 'routeSettings', 'updateStageResponse_routeSettings' - Route settings for the stage, by routeKey.
--
-- 'stageName', 'updateStageResponse_stageName' - The name of the stage.
--
-- '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-._~:\/?#&=,]+.
--
-- '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'
    { $sel:accessLogSettings:UpdateStageResponse' :: Maybe AccessLogSettings
accessLogSettings =
        forall a. Maybe a
Prelude.Nothing,
      $sel:apiGatewayManaged:UpdateStageResponse' :: Maybe Bool
apiGatewayManaged = forall a. Maybe a
Prelude.Nothing,
      $sel:autoDeploy:UpdateStageResponse' :: Maybe Bool
autoDeploy = forall a. Maybe a
Prelude.Nothing,
      $sel:clientCertificateId:UpdateStageResponse' :: Maybe Text
clientCertificateId = forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:UpdateStageResponse' :: Maybe ISO8601
createdDate = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRouteSettings:UpdateStageResponse' :: Maybe RouteSettings
defaultRouteSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentId:UpdateStageResponse' :: Maybe Text
deploymentId = forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateStageResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:lastDeploymentStatusMessage:UpdateStageResponse' :: Maybe Text
lastDeploymentStatusMessage = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:UpdateStageResponse' :: Maybe ISO8601
lastUpdatedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:routeSettings:UpdateStageResponse' :: Maybe (HashMap Text RouteSettings)
routeSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:stageName:UpdateStageResponse' :: Maybe Text
stageName = forall a. Maybe a
Prelude.Nothing,
      $sel:stageVariables:UpdateStageResponse' :: Maybe (HashMap Text Text)
stageVariables = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateStageResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateStageResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Settings for logging access in this stage.
updateStageResponse_accessLogSettings :: Lens.Lens' UpdateStageResponse (Prelude.Maybe AccessLogSettings)
updateStageResponse_accessLogSettings :: Lens' UpdateStageResponse (Maybe AccessLogSettings)
updateStageResponse_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)

-- | 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 :: Lens' UpdateStageResponse (Maybe Bool)
updateStageResponse_apiGatewayManaged = 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)

-- | 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 :: Lens' UpdateStageResponse (Maybe Bool)
updateStageResponse_autoDeploy = 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 identifier of a client certificate for a Stage. Supported only for
-- WebSocket APIs.
updateStageResponse_clientCertificateId :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.Text)
updateStageResponse_clientCertificateId :: Lens' UpdateStageResponse (Maybe Text)
updateStageResponse_clientCertificateId = 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)

-- | The timestamp when the stage was created.
updateStageResponse_createdDate :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.UTCTime)
updateStageResponse_createdDate :: Lens' UpdateStageResponse (Maybe UTCTime)
updateStageResponse_createdDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe ISO8601
createdDate :: Maybe ISO8601
$sel:createdDate:UpdateStageResponse' :: UpdateStageResponse -> Maybe ISO8601
createdDate} -> Maybe ISO8601
createdDate) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe ISO8601
a -> UpdateStageResponse
s {$sel:createdDate:UpdateStageResponse' :: Maybe ISO8601
createdDate = Maybe ISO8601
a} :: UpdateStageResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Default route settings for the stage.
updateStageResponse_defaultRouteSettings :: Lens.Lens' UpdateStageResponse (Prelude.Maybe RouteSettings)
updateStageResponse_defaultRouteSettings :: Lens' UpdateStageResponse (Maybe RouteSettings)
updateStageResponse_defaultRouteSettings = 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)

-- | 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 :: Lens' UpdateStageResponse (Maybe Text)
updateStageResponse_deploymentId = 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)

-- | The description of the stage.
updateStageResponse_description :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.Text)
updateStageResponse_description :: Lens' UpdateStageResponse (Maybe Text)
updateStageResponse_description = 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)

-- | 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 :: Lens' UpdateStageResponse (Maybe Text)
updateStageResponse_lastDeploymentStatusMessage = 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 timestamp when the stage was last updated.
updateStageResponse_lastUpdatedDate :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.UTCTime)
updateStageResponse_lastUpdatedDate :: Lens' UpdateStageResponse (Maybe UTCTime)
updateStageResponse_lastUpdatedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStageResponse' {Maybe ISO8601
lastUpdatedDate :: Maybe ISO8601
$sel:lastUpdatedDate:UpdateStageResponse' :: UpdateStageResponse -> Maybe ISO8601
lastUpdatedDate} -> Maybe ISO8601
lastUpdatedDate) (\s :: UpdateStageResponse
s@UpdateStageResponse' {} Maybe ISO8601
a -> UpdateStageResponse
s {$sel:lastUpdatedDate:UpdateStageResponse' :: Maybe ISO8601
lastUpdatedDate = Maybe ISO8601
a} :: UpdateStageResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Route settings for the stage, by routeKey.
updateStageResponse_routeSettings :: Lens.Lens' UpdateStageResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text RouteSettings))
updateStageResponse_routeSettings :: Lens' UpdateStageResponse (Maybe (HashMap Text RouteSettings))
updateStageResponse_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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the stage.
updateStageResponse_stageName :: Lens.Lens' UpdateStageResponse (Prelude.Maybe Prelude.Text)
updateStageResponse_stageName :: Lens' UpdateStageResponse (Maybe Text)
updateStageResponse_stageName = 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)

-- | 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 :: Lens' UpdateStageResponse (Maybe (HashMap Text Text))
updateStageResponse_stageVariables = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: Lens' UpdateStageResponse (Maybe (HashMap Text Text))
updateStageResponse_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' UpdateStageResponse Int
updateStageResponse_httpStatus = 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 where
  rnf :: UpdateStageResponse -> ()
rnf UpdateStageResponse' {Int
Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text RouteSettings)
Maybe ISO8601
Maybe AccessLogSettings
Maybe RouteSettings
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
stageVariables :: Maybe (HashMap Text Text)
stageName :: Maybe Text
routeSettings :: Maybe (HashMap Text RouteSettings)
lastUpdatedDate :: Maybe ISO8601
lastDeploymentStatusMessage :: Maybe Text
description :: Maybe Text
deploymentId :: Maybe Text
defaultRouteSettings :: Maybe RouteSettings
createdDate :: Maybe ISO8601
clientCertificateId :: Maybe Text
autoDeploy :: Maybe Bool
apiGatewayManaged :: Maybe Bool
accessLogSettings :: Maybe AccessLogSettings
$sel:httpStatus:UpdateStageResponse' :: UpdateStageResponse -> Int
$sel:tags:UpdateStageResponse' :: UpdateStageResponse -> Maybe (HashMap Text Text)
$sel:stageVariables:UpdateStageResponse' :: UpdateStageResponse -> Maybe (HashMap Text Text)
$sel:stageName:UpdateStageResponse' :: UpdateStageResponse -> Maybe Text
$sel:routeSettings:UpdateStageResponse' :: UpdateStageResponse -> Maybe (HashMap Text RouteSettings)
$sel:lastUpdatedDate:UpdateStageResponse' :: UpdateStageResponse -> Maybe ISO8601
$sel:lastDeploymentStatusMessage:UpdateStageResponse' :: UpdateStageResponse -> Maybe Text
$sel:description:UpdateStageResponse' :: UpdateStageResponse -> Maybe Text
$sel:deploymentId:UpdateStageResponse' :: UpdateStageResponse -> Maybe Text
$sel:defaultRouteSettings:UpdateStageResponse' :: UpdateStageResponse -> Maybe RouteSettings
$sel:createdDate:UpdateStageResponse' :: UpdateStageResponse -> Maybe ISO8601
$sel:clientCertificateId:UpdateStageResponse' :: UpdateStageResponse -> Maybe Text
$sel:autoDeploy:UpdateStageResponse' :: UpdateStageResponse -> Maybe Bool
$sel:apiGatewayManaged:UpdateStageResponse' :: UpdateStageResponse -> Maybe Bool
$sel:accessLogSettings:UpdateStageResponse' :: UpdateStageResponse -> Maybe AccessLogSettings
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AccessLogSettings
accessLogSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
apiGatewayManaged
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
autoDeploy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientCertificateId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RouteSettings
defaultRouteSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deploymentId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastDeploymentStatusMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
lastUpdatedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text RouteSettings)
routeSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stageName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
stageVariables
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus