{-# 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.GetStage
-- 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)
--
-- Gets a Stage.
module Amazonka.ApiGatewayV2.GetStage
  ( -- * Creating a Request
    GetStage (..),
    newGetStage,

    -- * Request Lenses
    getStage_stageName,
    getStage_apiId,

    -- * Destructuring the Response
    GetStageResponse (..),
    newGetStageResponse,

    -- * Response Lenses
    getStageResponse_lastDeploymentStatusMessage,
    getStageResponse_deploymentId,
    getStageResponse_routeSettings,
    getStageResponse_accessLogSettings,
    getStageResponse_clientCertificateId,
    getStageResponse_stageVariables,
    getStageResponse_autoDeploy,
    getStageResponse_createdDate,
    getStageResponse_defaultRouteSettings,
    getStageResponse_apiGatewayManaged,
    getStageResponse_stageName,
    getStageResponse_lastUpdatedDate,
    getStageResponse_description,
    getStageResponse_tags,
    getStageResponse_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

-- | /See:/ 'newGetStage' smart constructor.
data GetStage = GetStage'
  { -- | The stage name. Stage names can only contain alphanumeric characters,
    -- hyphens, and underscores. Maximum length is 128 characters.
    GetStage -> Text
stageName :: Prelude.Text,
    -- | The API identifier.
    GetStage -> Text
apiId :: Prelude.Text
  }
  deriving (GetStage -> GetStage -> Bool
(GetStage -> GetStage -> Bool)
-> (GetStage -> GetStage -> Bool) -> Eq GetStage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetStage -> GetStage -> Bool
$c/= :: GetStage -> GetStage -> Bool
== :: GetStage -> GetStage -> Bool
$c== :: GetStage -> GetStage -> Bool
Prelude.Eq, ReadPrec [GetStage]
ReadPrec GetStage
Int -> ReadS GetStage
ReadS [GetStage]
(Int -> ReadS GetStage)
-> ReadS [GetStage]
-> ReadPrec GetStage
-> ReadPrec [GetStage]
-> Read GetStage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetStage]
$creadListPrec :: ReadPrec [GetStage]
readPrec :: ReadPrec GetStage
$creadPrec :: ReadPrec GetStage
readList :: ReadS [GetStage]
$creadList :: ReadS [GetStage]
readsPrec :: Int -> ReadS GetStage
$creadsPrec :: Int -> ReadS GetStage
Prelude.Read, Int -> GetStage -> ShowS
[GetStage] -> ShowS
GetStage -> String
(Int -> GetStage -> ShowS)
-> (GetStage -> String) -> ([GetStage] -> ShowS) -> Show GetStage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetStage] -> ShowS
$cshowList :: [GetStage] -> ShowS
show :: GetStage -> String
$cshow :: GetStage -> String
showsPrec :: Int -> GetStage -> ShowS
$cshowsPrec :: Int -> GetStage -> ShowS
Prelude.Show, (forall x. GetStage -> Rep GetStage x)
-> (forall x. Rep GetStage x -> GetStage) -> Generic GetStage
forall x. Rep GetStage x -> GetStage
forall x. GetStage -> Rep GetStage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetStage x -> GetStage
$cfrom :: forall x. GetStage -> Rep GetStage x
Prelude.Generic)

-- |
-- Create a value of 'GetStage' 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:
--
-- 'stageName', 'getStage_stageName' - The stage name. Stage names can only contain alphanumeric characters,
-- hyphens, and underscores. Maximum length is 128 characters.
--
-- 'apiId', 'getStage_apiId' - The API identifier.
newGetStage ::
  -- | 'stageName'
  Prelude.Text ->
  -- | 'apiId'
  Prelude.Text ->
  GetStage
newGetStage :: Text -> Text -> GetStage
newGetStage Text
pStageName_ Text
pApiId_ =
  GetStage' :: Text -> Text -> GetStage
GetStage' {$sel:stageName:GetStage' :: Text
stageName = Text
pStageName_, $sel:apiId:GetStage' :: Text
apiId = Text
pApiId_}

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

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

instance Core.AWSRequest GetStage where
  type AWSResponse GetStage = GetStageResponse
  request :: GetStage -> Request GetStage
request = Service -> GetStage -> Request GetStage
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetStage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetStage)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetStage))
-> Logger
-> Service
-> Proxy GetStage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetStage)))
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
-> GetStageResponse
GetStageResponse'
            (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
 -> GetStageResponse)
-> 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
      -> GetStageResponse)
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
   -> GetStageResponse)
-> 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
      -> GetStageResponse)
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
   -> GetStageResponse)
-> 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
      -> GetStageResponse)
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
   -> GetStageResponse)
-> 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
      -> GetStageResponse)
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
   -> GetStageResponse)
-> 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
      -> GetStageResponse)
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
   -> GetStageResponse)
-> 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
      -> GetStageResponse)
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
   -> GetStageResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe POSIX
      -> Maybe RouteSettings
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetStageResponse)
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
   -> GetStageResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe RouteSettings
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetStageResponse)
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
   -> GetStageResponse)
-> Either String (Maybe RouteSettings)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetStageResponse)
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
   -> GetStageResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetStageResponse)
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
   -> GetStageResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetStageResponse)
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
   -> GetStageResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> GetStageResponse)
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 -> GetStageResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> GetStageResponse)
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 -> GetStageResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> GetStageResponse)
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 -> GetStageResponse)
-> Either String Int -> Either String GetStageResponse
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 GetStage

instance Prelude.NFData GetStage

instance Core.ToHeaders GetStage where
  toHeaders :: GetStage -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetStage -> 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.ToPath GetStage where
  toPath :: GetStage -> ByteString
toPath GetStage' {Text
apiId :: Text
stageName :: Text
$sel:apiId:GetStage' :: GetStage -> Text
$sel:stageName:GetStage' :: GetStage -> 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 GetStage where
  toQuery :: GetStage -> QueryString
toQuery = QueryString -> GetStage -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetStageResponse' smart constructor.
data GetStageResponse = GetStageResponse'
  { -- | Describes the status of the last deployment of a stage. Supported only
    -- for stages with autoDeploy enabled.
    GetStageResponse -> 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.
    GetStageResponse -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
    -- | Route settings for the stage, by routeKey.
    GetStageResponse -> Maybe (HashMap Text RouteSettings)
routeSettings :: Prelude.Maybe (Prelude.HashMap Prelude.Text RouteSettings),
    -- | Settings for logging access in this stage.
    GetStageResponse -> Maybe AccessLogSettings
accessLogSettings :: Prelude.Maybe AccessLogSettings,
    -- | The identifier of a client certificate for a Stage. Supported only for
    -- WebSocket APIs.
    GetStageResponse -> 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-._~:\/?#&=,]+.
    GetStageResponse -> 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.
    GetStageResponse -> Maybe Bool
autoDeploy :: Prelude.Maybe Prelude.Bool,
    -- | The timestamp when the stage was created.
    GetStageResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | Default route settings for the stage.
    GetStageResponse -> 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.
    GetStageResponse -> Maybe Bool
apiGatewayManaged :: Prelude.Maybe Prelude.Bool,
    -- | The name of the stage.
    GetStageResponse -> Maybe Text
stageName :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the stage was last updated.
    GetStageResponse -> Maybe POSIX
lastUpdatedDate :: Prelude.Maybe Core.POSIX,
    -- | The description of the stage.
    GetStageResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The collection of tags. Each tag element is associated with a given
    -- resource.
    GetStageResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    GetStageResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetStageResponse -> GetStageResponse -> Bool
(GetStageResponse -> GetStageResponse -> Bool)
-> (GetStageResponse -> GetStageResponse -> Bool)
-> Eq GetStageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetStageResponse -> GetStageResponse -> Bool
$c/= :: GetStageResponse -> GetStageResponse -> Bool
== :: GetStageResponse -> GetStageResponse -> Bool
$c== :: GetStageResponse -> GetStageResponse -> Bool
Prelude.Eq, ReadPrec [GetStageResponse]
ReadPrec GetStageResponse
Int -> ReadS GetStageResponse
ReadS [GetStageResponse]
(Int -> ReadS GetStageResponse)
-> ReadS [GetStageResponse]
-> ReadPrec GetStageResponse
-> ReadPrec [GetStageResponse]
-> Read GetStageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetStageResponse]
$creadListPrec :: ReadPrec [GetStageResponse]
readPrec :: ReadPrec GetStageResponse
$creadPrec :: ReadPrec GetStageResponse
readList :: ReadS [GetStageResponse]
$creadList :: ReadS [GetStageResponse]
readsPrec :: Int -> ReadS GetStageResponse
$creadsPrec :: Int -> ReadS GetStageResponse
Prelude.Read, Int -> GetStageResponse -> ShowS
[GetStageResponse] -> ShowS
GetStageResponse -> String
(Int -> GetStageResponse -> ShowS)
-> (GetStageResponse -> String)
-> ([GetStageResponse] -> ShowS)
-> Show GetStageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetStageResponse] -> ShowS
$cshowList :: [GetStageResponse] -> ShowS
show :: GetStageResponse -> String
$cshow :: GetStageResponse -> String
showsPrec :: Int -> GetStageResponse -> ShowS
$cshowsPrec :: Int -> GetStageResponse -> ShowS
Prelude.Show, (forall x. GetStageResponse -> Rep GetStageResponse x)
-> (forall x. Rep GetStageResponse x -> GetStageResponse)
-> Generic GetStageResponse
forall x. Rep GetStageResponse x -> GetStageResponse
forall x. GetStageResponse -> Rep GetStageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetStageResponse x -> GetStageResponse
$cfrom :: forall x. GetStageResponse -> Rep GetStageResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetStageResponse' 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', 'getStageResponse_lastDeploymentStatusMessage' - Describes the status of the last deployment of a stage. Supported only
-- for stages with autoDeploy enabled.
--
-- 'deploymentId', 'getStageResponse_deploymentId' - The identifier of the Deployment that the Stage is associated with.
-- Can\'t be updated if autoDeploy is enabled.
--
-- 'routeSettings', 'getStageResponse_routeSettings' - Route settings for the stage, by routeKey.
--
-- 'accessLogSettings', 'getStageResponse_accessLogSettings' - Settings for logging access in this stage.
--
-- 'clientCertificateId', 'getStageResponse_clientCertificateId' - The identifier of a client certificate for a Stage. Supported only for
-- WebSocket APIs.
--
-- 'stageVariables', 'getStageResponse_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', 'getStageResponse_autoDeploy' - Specifies whether updates to an API automatically trigger a new
-- deployment. The default value is false.
--
-- 'createdDate', 'getStageResponse_createdDate' - The timestamp when the stage was created.
--
-- 'defaultRouteSettings', 'getStageResponse_defaultRouteSettings' - Default route settings for the stage.
--
-- 'apiGatewayManaged', 'getStageResponse_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', 'getStageResponse_stageName' - The name of the stage.
--
-- 'lastUpdatedDate', 'getStageResponse_lastUpdatedDate' - The timestamp when the stage was last updated.
--
-- 'description', 'getStageResponse_description' - The description of the stage.
--
-- 'tags', 'getStageResponse_tags' - The collection of tags. Each tag element is associated with a given
-- resource.
--
-- 'httpStatus', 'getStageResponse_httpStatus' - The response's http status code.
newGetStageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetStageResponse
newGetStageResponse :: Int -> GetStageResponse
newGetStageResponse Int
pHttpStatus_ =
  GetStageResponse' :: 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
-> GetStageResponse
GetStageResponse'
    { $sel:lastDeploymentStatusMessage:GetStageResponse' :: Maybe Text
lastDeploymentStatusMessage =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentId:GetStageResponse' :: Maybe Text
deploymentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:routeSettings:GetStageResponse' :: Maybe (HashMap Text RouteSettings)
routeSettings = Maybe (HashMap Text RouteSettings)
forall a. Maybe a
Prelude.Nothing,
      $sel:accessLogSettings:GetStageResponse' :: Maybe AccessLogSettings
accessLogSettings = Maybe AccessLogSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:clientCertificateId:GetStageResponse' :: Maybe Text
clientCertificateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stageVariables:GetStageResponse' :: Maybe (HashMap Text Text)
stageVariables = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:autoDeploy:GetStageResponse' :: Maybe Bool
autoDeploy = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:GetStageResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRouteSettings:GetStageResponse' :: Maybe RouteSettings
defaultRouteSettings = Maybe RouteSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:apiGatewayManaged:GetStageResponse' :: Maybe Bool
apiGatewayManaged = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:stageName:GetStageResponse' :: Maybe Text
stageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDate:GetStageResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetStageResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetStageResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetStageResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | Route settings for the stage, by routeKey.
getStageResponse_routeSettings :: Lens.Lens' GetStageResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text RouteSettings))
getStageResponse_routeSettings :: (Maybe (HashMap Text RouteSettings)
 -> f (Maybe (HashMap Text RouteSettings)))
-> GetStageResponse -> f GetStageResponse
getStageResponse_routeSettings = (GetStageResponse -> Maybe (HashMap Text RouteSettings))
-> (GetStageResponse
    -> Maybe (HashMap Text RouteSettings) -> GetStageResponse)
-> Lens
     GetStageResponse
     GetStageResponse
     (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 (\GetStageResponse' {Maybe (HashMap Text RouteSettings)
routeSettings :: Maybe (HashMap Text RouteSettings)
$sel:routeSettings:GetStageResponse' :: GetStageResponse -> Maybe (HashMap Text RouteSettings)
routeSettings} -> Maybe (HashMap Text RouteSettings)
routeSettings) (\s :: GetStageResponse
s@GetStageResponse' {} Maybe (HashMap Text RouteSettings)
a -> GetStageResponse
s {$sel:routeSettings:GetStageResponse' :: Maybe (HashMap Text RouteSettings)
routeSettings = Maybe (HashMap Text RouteSettings)
a} :: GetStageResponse) ((Maybe (HashMap Text RouteSettings)
  -> f (Maybe (HashMap Text RouteSettings)))
 -> GetStageResponse -> f GetStageResponse)
-> ((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)))
-> GetStageResponse
-> f GetStageResponse
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.
getStageResponse_accessLogSettings :: Lens.Lens' GetStageResponse (Prelude.Maybe AccessLogSettings)
getStageResponse_accessLogSettings :: (Maybe AccessLogSettings -> f (Maybe AccessLogSettings))
-> GetStageResponse -> f GetStageResponse
getStageResponse_accessLogSettings = (GetStageResponse -> Maybe AccessLogSettings)
-> (GetStageResponse
    -> Maybe AccessLogSettings -> GetStageResponse)
-> Lens
     GetStageResponse
     GetStageResponse
     (Maybe AccessLogSettings)
     (Maybe AccessLogSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStageResponse' {Maybe AccessLogSettings
accessLogSettings :: Maybe AccessLogSettings
$sel:accessLogSettings:GetStageResponse' :: GetStageResponse -> Maybe AccessLogSettings
accessLogSettings} -> Maybe AccessLogSettings
accessLogSettings) (\s :: GetStageResponse
s@GetStageResponse' {} Maybe AccessLogSettings
a -> GetStageResponse
s {$sel:accessLogSettings:GetStageResponse' :: Maybe AccessLogSettings
accessLogSettings = Maybe AccessLogSettings
a} :: GetStageResponse)

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

-- | 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-._~:\/?#&=,]+.
getStageResponse_stageVariables :: Lens.Lens' GetStageResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getStageResponse_stageVariables :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetStageResponse -> f GetStageResponse
getStageResponse_stageVariables = (GetStageResponse -> Maybe (HashMap Text Text))
-> (GetStageResponse
    -> Maybe (HashMap Text Text) -> GetStageResponse)
-> Lens
     GetStageResponse
     GetStageResponse
     (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 (\GetStageResponse' {Maybe (HashMap Text Text)
stageVariables :: Maybe (HashMap Text Text)
$sel:stageVariables:GetStageResponse' :: GetStageResponse -> Maybe (HashMap Text Text)
stageVariables} -> Maybe (HashMap Text Text)
stageVariables) (\s :: GetStageResponse
s@GetStageResponse' {} Maybe (HashMap Text Text)
a -> GetStageResponse
s {$sel:stageVariables:GetStageResponse' :: Maybe (HashMap Text Text)
stageVariables = Maybe (HashMap Text Text)
a} :: GetStageResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetStageResponse -> f GetStageResponse)
-> ((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)))
-> GetStageResponse
-> f GetStageResponse
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.
getStageResponse_autoDeploy :: Lens.Lens' GetStageResponse (Prelude.Maybe Prelude.Bool)
getStageResponse_autoDeploy :: (Maybe Bool -> f (Maybe Bool))
-> GetStageResponse -> f GetStageResponse
getStageResponse_autoDeploy = (GetStageResponse -> Maybe Bool)
-> (GetStageResponse -> Maybe Bool -> GetStageResponse)
-> Lens GetStageResponse GetStageResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStageResponse' {Maybe Bool
autoDeploy :: Maybe Bool
$sel:autoDeploy:GetStageResponse' :: GetStageResponse -> Maybe Bool
autoDeploy} -> Maybe Bool
autoDeploy) (\s :: GetStageResponse
s@GetStageResponse' {} Maybe Bool
a -> GetStageResponse
s {$sel:autoDeploy:GetStageResponse' :: Maybe Bool
autoDeploy = Maybe Bool
a} :: GetStageResponse)

-- | The timestamp when the stage was created.
getStageResponse_createdDate :: Lens.Lens' GetStageResponse (Prelude.Maybe Prelude.UTCTime)
getStageResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetStageResponse -> f GetStageResponse
getStageResponse_createdDate = (GetStageResponse -> Maybe POSIX)
-> (GetStageResponse -> Maybe POSIX -> GetStageResponse)
-> Lens
     GetStageResponse GetStageResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStageResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:GetStageResponse' :: GetStageResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: GetStageResponse
s@GetStageResponse' {} Maybe POSIX
a -> GetStageResponse
s {$sel:createdDate:GetStageResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: GetStageResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetStageResponse -> f GetStageResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetStageResponse
-> f GetStageResponse
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.
getStageResponse_defaultRouteSettings :: Lens.Lens' GetStageResponse (Prelude.Maybe RouteSettings)
getStageResponse_defaultRouteSettings :: (Maybe RouteSettings -> f (Maybe RouteSettings))
-> GetStageResponse -> f GetStageResponse
getStageResponse_defaultRouteSettings = (GetStageResponse -> Maybe RouteSettings)
-> (GetStageResponse -> Maybe RouteSettings -> GetStageResponse)
-> Lens
     GetStageResponse
     GetStageResponse
     (Maybe RouteSettings)
     (Maybe RouteSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStageResponse' {Maybe RouteSettings
defaultRouteSettings :: Maybe RouteSettings
$sel:defaultRouteSettings:GetStageResponse' :: GetStageResponse -> Maybe RouteSettings
defaultRouteSettings} -> Maybe RouteSettings
defaultRouteSettings) (\s :: GetStageResponse
s@GetStageResponse' {} Maybe RouteSettings
a -> GetStageResponse
s {$sel:defaultRouteSettings:GetStageResponse' :: Maybe RouteSettings
defaultRouteSettings = Maybe RouteSettings
a} :: GetStageResponse)

-- | 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.
getStageResponse_apiGatewayManaged :: Lens.Lens' GetStageResponse (Prelude.Maybe Prelude.Bool)
getStageResponse_apiGatewayManaged :: (Maybe Bool -> f (Maybe Bool))
-> GetStageResponse -> f GetStageResponse
getStageResponse_apiGatewayManaged = (GetStageResponse -> Maybe Bool)
-> (GetStageResponse -> Maybe Bool -> GetStageResponse)
-> Lens GetStageResponse GetStageResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStageResponse' {Maybe Bool
apiGatewayManaged :: Maybe Bool
$sel:apiGatewayManaged:GetStageResponse' :: GetStageResponse -> Maybe Bool
apiGatewayManaged} -> Maybe Bool
apiGatewayManaged) (\s :: GetStageResponse
s@GetStageResponse' {} Maybe Bool
a -> GetStageResponse
s {$sel:apiGatewayManaged:GetStageResponse' :: Maybe Bool
apiGatewayManaged = Maybe Bool
a} :: GetStageResponse)

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

-- | The timestamp when the stage was last updated.
getStageResponse_lastUpdatedDate :: Lens.Lens' GetStageResponse (Prelude.Maybe Prelude.UTCTime)
getStageResponse_lastUpdatedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetStageResponse -> f GetStageResponse
getStageResponse_lastUpdatedDate = (GetStageResponse -> Maybe POSIX)
-> (GetStageResponse -> Maybe POSIX -> GetStageResponse)
-> Lens
     GetStageResponse GetStageResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStageResponse' {Maybe POSIX
lastUpdatedDate :: Maybe POSIX
$sel:lastUpdatedDate:GetStageResponse' :: GetStageResponse -> Maybe POSIX
lastUpdatedDate} -> Maybe POSIX
lastUpdatedDate) (\s :: GetStageResponse
s@GetStageResponse' {} Maybe POSIX
a -> GetStageResponse
s {$sel:lastUpdatedDate:GetStageResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
a} :: GetStageResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetStageResponse -> f GetStageResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetStageResponse
-> f GetStageResponse
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.
getStageResponse_description :: Lens.Lens' GetStageResponse (Prelude.Maybe Prelude.Text)
getStageResponse_description :: (Maybe Text -> f (Maybe Text))
-> GetStageResponse -> f GetStageResponse
getStageResponse_description = (GetStageResponse -> Maybe Text)
-> (GetStageResponse -> Maybe Text -> GetStageResponse)
-> Lens GetStageResponse GetStageResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStageResponse' {Maybe Text
description :: Maybe Text
$sel:description:GetStageResponse' :: GetStageResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: GetStageResponse
s@GetStageResponse' {} Maybe Text
a -> GetStageResponse
s {$sel:description:GetStageResponse' :: Maybe Text
description = Maybe Text
a} :: GetStageResponse)

-- | The collection of tags. Each tag element is associated with a given
-- resource.
getStageResponse_tags :: Lens.Lens' GetStageResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getStageResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetStageResponse -> f GetStageResponse
getStageResponse_tags = (GetStageResponse -> Maybe (HashMap Text Text))
-> (GetStageResponse
    -> Maybe (HashMap Text Text) -> GetStageResponse)
-> Lens
     GetStageResponse
     GetStageResponse
     (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 (\GetStageResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetStageResponse' :: GetStageResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetStageResponse
s@GetStageResponse' {} Maybe (HashMap Text Text)
a -> GetStageResponse
s {$sel:tags:GetStageResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetStageResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetStageResponse -> f GetStageResponse)
-> ((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)))
-> GetStageResponse
-> f GetStageResponse
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.
getStageResponse_httpStatus :: Lens.Lens' GetStageResponse Prelude.Int
getStageResponse_httpStatus :: (Int -> f Int) -> GetStageResponse -> f GetStageResponse
getStageResponse_httpStatus = (GetStageResponse -> Int)
-> (GetStageResponse -> Int -> GetStageResponse)
-> Lens GetStageResponse GetStageResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStageResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetStageResponse' :: GetStageResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetStageResponse
s@GetStageResponse' {} Int
a -> GetStageResponse
s {$sel:httpStatus:GetStageResponse' :: Int
httpStatus = Int
a} :: GetStageResponse)

instance Prelude.NFData GetStageResponse