{-# 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.SageMaker.DescribeEndpoint
-- 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)
--
-- Returns the description of an endpoint.
module Amazonka.SageMaker.DescribeEndpoint
  ( -- * Creating a Request
    DescribeEndpoint (..),
    newDescribeEndpoint,

    -- * Request Lenses
    describeEndpoint_endpointName,

    -- * Destructuring the Response
    DescribeEndpointResponse (..),
    newDescribeEndpointResponse,

    -- * Response Lenses
    describeEndpointResponse_failureReason,
    describeEndpointResponse_asyncInferenceConfig,
    describeEndpointResponse_productionVariants,
    describeEndpointResponse_lastDeploymentConfig,
    describeEndpointResponse_dataCaptureConfig,
    describeEndpointResponse_httpStatus,
    describeEndpointResponse_endpointName,
    describeEndpointResponse_endpointArn,
    describeEndpointResponse_endpointConfigName,
    describeEndpointResponse_endpointStatus,
    describeEndpointResponse_creationTime,
    describeEndpointResponse_lastModifiedTime,
  )
where

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
import Amazonka.SageMaker.Types

-- | /See:/ 'newDescribeEndpoint' smart constructor.
data DescribeEndpoint = DescribeEndpoint'
  { -- | The name of the endpoint.
    DescribeEndpoint -> Text
endpointName :: Prelude.Text
  }
  deriving (DescribeEndpoint -> DescribeEndpoint -> Bool
(DescribeEndpoint -> DescribeEndpoint -> Bool)
-> (DescribeEndpoint -> DescribeEndpoint -> Bool)
-> Eq DescribeEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEndpoint -> DescribeEndpoint -> Bool
$c/= :: DescribeEndpoint -> DescribeEndpoint -> Bool
== :: DescribeEndpoint -> DescribeEndpoint -> Bool
$c== :: DescribeEndpoint -> DescribeEndpoint -> Bool
Prelude.Eq, ReadPrec [DescribeEndpoint]
ReadPrec DescribeEndpoint
Int -> ReadS DescribeEndpoint
ReadS [DescribeEndpoint]
(Int -> ReadS DescribeEndpoint)
-> ReadS [DescribeEndpoint]
-> ReadPrec DescribeEndpoint
-> ReadPrec [DescribeEndpoint]
-> Read DescribeEndpoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEndpoint]
$creadListPrec :: ReadPrec [DescribeEndpoint]
readPrec :: ReadPrec DescribeEndpoint
$creadPrec :: ReadPrec DescribeEndpoint
readList :: ReadS [DescribeEndpoint]
$creadList :: ReadS [DescribeEndpoint]
readsPrec :: Int -> ReadS DescribeEndpoint
$creadsPrec :: Int -> ReadS DescribeEndpoint
Prelude.Read, Int -> DescribeEndpoint -> ShowS
[DescribeEndpoint] -> ShowS
DescribeEndpoint -> String
(Int -> DescribeEndpoint -> ShowS)
-> (DescribeEndpoint -> String)
-> ([DescribeEndpoint] -> ShowS)
-> Show DescribeEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEndpoint] -> ShowS
$cshowList :: [DescribeEndpoint] -> ShowS
show :: DescribeEndpoint -> String
$cshow :: DescribeEndpoint -> String
showsPrec :: Int -> DescribeEndpoint -> ShowS
$cshowsPrec :: Int -> DescribeEndpoint -> ShowS
Prelude.Show, (forall x. DescribeEndpoint -> Rep DescribeEndpoint x)
-> (forall x. Rep DescribeEndpoint x -> DescribeEndpoint)
-> Generic DescribeEndpoint
forall x. Rep DescribeEndpoint x -> DescribeEndpoint
forall x. DescribeEndpoint -> Rep DescribeEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeEndpoint x -> DescribeEndpoint
$cfrom :: forall x. DescribeEndpoint -> Rep DescribeEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEndpoint' 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:
--
-- 'endpointName', 'describeEndpoint_endpointName' - The name of the endpoint.
newDescribeEndpoint ::
  -- | 'endpointName'
  Prelude.Text ->
  DescribeEndpoint
newDescribeEndpoint :: Text -> DescribeEndpoint
newDescribeEndpoint Text
pEndpointName_ =
  DescribeEndpoint' :: Text -> DescribeEndpoint
DescribeEndpoint' {$sel:endpointName:DescribeEndpoint' :: Text
endpointName = Text
pEndpointName_}

-- | The name of the endpoint.
describeEndpoint_endpointName :: Lens.Lens' DescribeEndpoint Prelude.Text
describeEndpoint_endpointName :: (Text -> f Text) -> DescribeEndpoint -> f DescribeEndpoint
describeEndpoint_endpointName = (DescribeEndpoint -> Text)
-> (DescribeEndpoint -> Text -> DescribeEndpoint)
-> Lens DescribeEndpoint DescribeEndpoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpoint' {Text
endpointName :: Text
$sel:endpointName:DescribeEndpoint' :: DescribeEndpoint -> Text
endpointName} -> Text
endpointName) (\s :: DescribeEndpoint
s@DescribeEndpoint' {} Text
a -> DescribeEndpoint
s {$sel:endpointName:DescribeEndpoint' :: Text
endpointName = Text
a} :: DescribeEndpoint)

instance Core.AWSRequest DescribeEndpoint where
  type
    AWSResponse DescribeEndpoint =
      DescribeEndpointResponse
  request :: DescribeEndpoint -> Request DescribeEndpoint
request = Service -> DescribeEndpoint -> Request DescribeEndpoint
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeEndpoint
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeEndpoint)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeEndpoint))
-> Logger
-> Service
-> Proxy DescribeEndpoint
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeEndpoint)))
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 AsyncInferenceConfig
-> Maybe (NonEmpty ProductionVariantSummary)
-> Maybe DeploymentConfig
-> Maybe DataCaptureConfigSummary
-> Int
-> Text
-> Text
-> Text
-> EndpointStatus
-> POSIX
-> POSIX
-> DescribeEndpointResponse
DescribeEndpointResponse'
            (Maybe Text
 -> Maybe AsyncInferenceConfig
 -> Maybe (NonEmpty ProductionVariantSummary)
 -> Maybe DeploymentConfig
 -> Maybe DataCaptureConfigSummary
 -> Int
 -> Text
 -> Text
 -> Text
 -> EndpointStatus
 -> POSIX
 -> POSIX
 -> DescribeEndpointResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe AsyncInferenceConfig
      -> Maybe (NonEmpty ProductionVariantSummary)
      -> Maybe DeploymentConfig
      -> Maybe DataCaptureConfigSummary
      -> Int
      -> Text
      -> Text
      -> Text
      -> EndpointStatus
      -> POSIX
      -> POSIX
      -> DescribeEndpointResponse)
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
"FailureReason")
            Either
  String
  (Maybe AsyncInferenceConfig
   -> Maybe (NonEmpty ProductionVariantSummary)
   -> Maybe DeploymentConfig
   -> Maybe DataCaptureConfigSummary
   -> Int
   -> Text
   -> Text
   -> Text
   -> EndpointStatus
   -> POSIX
   -> POSIX
   -> DescribeEndpointResponse)
-> Either String (Maybe AsyncInferenceConfig)
-> Either
     String
     (Maybe (NonEmpty ProductionVariantSummary)
      -> Maybe DeploymentConfig
      -> Maybe DataCaptureConfigSummary
      -> Int
      -> Text
      -> Text
      -> Text
      -> EndpointStatus
      -> POSIX
      -> POSIX
      -> DescribeEndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe AsyncInferenceConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AsyncInferenceConfig")
            Either
  String
  (Maybe (NonEmpty ProductionVariantSummary)
   -> Maybe DeploymentConfig
   -> Maybe DataCaptureConfigSummary
   -> Int
   -> Text
   -> Text
   -> Text
   -> EndpointStatus
   -> POSIX
   -> POSIX
   -> DescribeEndpointResponse)
-> Either String (Maybe (NonEmpty ProductionVariantSummary))
-> Either
     String
     (Maybe DeploymentConfig
      -> Maybe DataCaptureConfigSummary
      -> Int
      -> Text
      -> Text
      -> Text
      -> EndpointStatus
      -> POSIX
      -> POSIX
      -> DescribeEndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (NonEmpty ProductionVariantSummary))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ProductionVariants")
            Either
  String
  (Maybe DeploymentConfig
   -> Maybe DataCaptureConfigSummary
   -> Int
   -> Text
   -> Text
   -> Text
   -> EndpointStatus
   -> POSIX
   -> POSIX
   -> DescribeEndpointResponse)
-> Either String (Maybe DeploymentConfig)
-> Either
     String
     (Maybe DataCaptureConfigSummary
      -> Int
      -> Text
      -> Text
      -> Text
      -> EndpointStatus
      -> POSIX
      -> POSIX
      -> DescribeEndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DeploymentConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastDeploymentConfig")
            Either
  String
  (Maybe DataCaptureConfigSummary
   -> Int
   -> Text
   -> Text
   -> Text
   -> EndpointStatus
   -> POSIX
   -> POSIX
   -> DescribeEndpointResponse)
-> Either String (Maybe DataCaptureConfigSummary)
-> Either
     String
     (Int
      -> Text
      -> Text
      -> Text
      -> EndpointStatus
      -> POSIX
      -> POSIX
      -> DescribeEndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DataCaptureConfigSummary)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataCaptureConfig")
            Either
  String
  (Int
   -> Text
   -> Text
   -> Text
   -> EndpointStatus
   -> POSIX
   -> POSIX
   -> DescribeEndpointResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text
      -> Text
      -> EndpointStatus
      -> POSIX
      -> POSIX
      -> DescribeEndpointResponse)
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))
            Either
  String
  (Text
   -> Text
   -> Text
   -> EndpointStatus
   -> POSIX
   -> POSIX
   -> DescribeEndpointResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Text
      -> EndpointStatus
      -> POSIX
      -> POSIX
      -> DescribeEndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"EndpointName")
            Either
  String
  (Text
   -> Text
   -> EndpointStatus
   -> POSIX
   -> POSIX
   -> DescribeEndpointResponse)
-> Either String Text
-> Either
     String
     (Text
      -> EndpointStatus -> POSIX -> POSIX -> DescribeEndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"EndpointArn")
            Either
  String
  (Text
   -> EndpointStatus -> POSIX -> POSIX -> DescribeEndpointResponse)
-> Either String Text
-> Either
     String
     (EndpointStatus -> POSIX -> POSIX -> DescribeEndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"EndpointConfigName")
            Either
  String
  (EndpointStatus -> POSIX -> POSIX -> DescribeEndpointResponse)
-> Either String EndpointStatus
-> Either String (POSIX -> POSIX -> DescribeEndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String EndpointStatus
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"EndpointStatus")
            Either String (POSIX -> POSIX -> DescribeEndpointResponse)
-> Either String POSIX
-> Either String (POSIX -> DescribeEndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CreationTime")
            Either String (POSIX -> DescribeEndpointResponse)
-> Either String POSIX -> Either String DescribeEndpointResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"LastModifiedTime")
      )

instance Prelude.Hashable DescribeEndpoint

instance Prelude.NFData DescribeEndpoint

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

instance Core.ToJSON DescribeEndpoint where
  toJSON :: DescribeEndpoint -> Value
toJSON DescribeEndpoint' {Text
endpointName :: Text
$sel:endpointName:DescribeEndpoint' :: DescribeEndpoint -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EndpointName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
endpointName)]
      )

instance Core.ToPath DescribeEndpoint where
  toPath :: DescribeEndpoint -> ByteString
toPath = ByteString -> DescribeEndpoint -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeEndpointResponse' smart constructor.
data DescribeEndpointResponse = DescribeEndpointResponse'
  { -- | If the status of the endpoint is @Failed@, the reason why it failed.
    DescribeEndpointResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | Returns the description of an endpoint configuration created using the
    -- <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html CreateEndpointConfig>
    -- API.
    DescribeEndpointResponse -> Maybe AsyncInferenceConfig
asyncInferenceConfig :: Prelude.Maybe AsyncInferenceConfig,
    -- | An array of ProductionVariantSummary objects, one for each model hosted
    -- behind this endpoint.
    DescribeEndpointResponse
-> Maybe (NonEmpty ProductionVariantSummary)
productionVariants :: Prelude.Maybe (Prelude.NonEmpty ProductionVariantSummary),
    -- | The most recent deployment configuration for the endpoint.
    DescribeEndpointResponse -> Maybe DeploymentConfig
lastDeploymentConfig :: Prelude.Maybe DeploymentConfig,
    DescribeEndpointResponse -> Maybe DataCaptureConfigSummary
dataCaptureConfig :: Prelude.Maybe DataCaptureConfigSummary,
    -- | The response's http status code.
    DescribeEndpointResponse -> Int
httpStatus :: Prelude.Int,
    -- | Name of the endpoint.
    DescribeEndpointResponse -> Text
endpointName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the endpoint.
    DescribeEndpointResponse -> Text
endpointArn :: Prelude.Text,
    -- | The name of the endpoint configuration associated with this endpoint.
    DescribeEndpointResponse -> Text
endpointConfigName :: Prelude.Text,
    -- | The status of the endpoint.
    --
    -- -   @OutOfService@: Endpoint is not available to take incoming requests.
    --
    -- -   @Creating@: CreateEndpoint is executing.
    --
    -- -   @Updating@: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is
    --     executing.
    --
    -- -   @SystemUpdating@: Endpoint is undergoing maintenance and cannot be
    --     updated or deleted or re-scaled until it has completed. This
    --     maintenance operation does not change any customer-specified values
    --     such as VPC config, KMS encryption, model, instance type, or
    --     instance count.
    --
    -- -   @RollingBack@: Endpoint fails to scale up or down or change its
    --     variant weight and is in the process of rolling back to its previous
    --     configuration. Once the rollback completes, endpoint returns to an
    --     @InService@ status. This transitional status only applies to an
    --     endpoint that has autoscaling enabled and is undergoing variant
    --     weight or capacity changes as part of an
    --     UpdateEndpointWeightsAndCapacities call or when the
    --     UpdateEndpointWeightsAndCapacities operation is called explicitly.
    --
    -- -   @InService@: Endpoint is available to process incoming requests.
    --
    -- -   @Deleting@: DeleteEndpoint is executing.
    --
    -- -   @Failed@: Endpoint could not be created, updated, or re-scaled. Use
    --     DescribeEndpointOutput$FailureReason for information about the
    --     failure. DeleteEndpoint is the only operation that can be performed
    --     on a failed endpoint.
    DescribeEndpointResponse -> EndpointStatus
endpointStatus :: EndpointStatus,
    -- | A timestamp that shows when the endpoint was created.
    DescribeEndpointResponse -> POSIX
creationTime :: Core.POSIX,
    -- | A timestamp that shows when the endpoint was last modified.
    DescribeEndpointResponse -> POSIX
lastModifiedTime :: Core.POSIX
  }
  deriving (DescribeEndpointResponse -> DescribeEndpointResponse -> Bool
(DescribeEndpointResponse -> DescribeEndpointResponse -> Bool)
-> (DescribeEndpointResponse -> DescribeEndpointResponse -> Bool)
-> Eq DescribeEndpointResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEndpointResponse -> DescribeEndpointResponse -> Bool
$c/= :: DescribeEndpointResponse -> DescribeEndpointResponse -> Bool
== :: DescribeEndpointResponse -> DescribeEndpointResponse -> Bool
$c== :: DescribeEndpointResponse -> DescribeEndpointResponse -> Bool
Prelude.Eq, ReadPrec [DescribeEndpointResponse]
ReadPrec DescribeEndpointResponse
Int -> ReadS DescribeEndpointResponse
ReadS [DescribeEndpointResponse]
(Int -> ReadS DescribeEndpointResponse)
-> ReadS [DescribeEndpointResponse]
-> ReadPrec DescribeEndpointResponse
-> ReadPrec [DescribeEndpointResponse]
-> Read DescribeEndpointResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEndpointResponse]
$creadListPrec :: ReadPrec [DescribeEndpointResponse]
readPrec :: ReadPrec DescribeEndpointResponse
$creadPrec :: ReadPrec DescribeEndpointResponse
readList :: ReadS [DescribeEndpointResponse]
$creadList :: ReadS [DescribeEndpointResponse]
readsPrec :: Int -> ReadS DescribeEndpointResponse
$creadsPrec :: Int -> ReadS DescribeEndpointResponse
Prelude.Read, Int -> DescribeEndpointResponse -> ShowS
[DescribeEndpointResponse] -> ShowS
DescribeEndpointResponse -> String
(Int -> DescribeEndpointResponse -> ShowS)
-> (DescribeEndpointResponse -> String)
-> ([DescribeEndpointResponse] -> ShowS)
-> Show DescribeEndpointResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEndpointResponse] -> ShowS
$cshowList :: [DescribeEndpointResponse] -> ShowS
show :: DescribeEndpointResponse -> String
$cshow :: DescribeEndpointResponse -> String
showsPrec :: Int -> DescribeEndpointResponse -> ShowS
$cshowsPrec :: Int -> DescribeEndpointResponse -> ShowS
Prelude.Show, (forall x.
 DescribeEndpointResponse -> Rep DescribeEndpointResponse x)
-> (forall x.
    Rep DescribeEndpointResponse x -> DescribeEndpointResponse)
-> Generic DescribeEndpointResponse
forall x.
Rep DescribeEndpointResponse x -> DescribeEndpointResponse
forall x.
DescribeEndpointResponse -> Rep DescribeEndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeEndpointResponse x -> DescribeEndpointResponse
$cfrom :: forall x.
DescribeEndpointResponse -> Rep DescribeEndpointResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEndpointResponse' 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:
--
-- 'failureReason', 'describeEndpointResponse_failureReason' - If the status of the endpoint is @Failed@, the reason why it failed.
--
-- 'asyncInferenceConfig', 'describeEndpointResponse_asyncInferenceConfig' - Returns the description of an endpoint configuration created using the
-- <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html CreateEndpointConfig>
-- API.
--
-- 'productionVariants', 'describeEndpointResponse_productionVariants' - An array of ProductionVariantSummary objects, one for each model hosted
-- behind this endpoint.
--
-- 'lastDeploymentConfig', 'describeEndpointResponse_lastDeploymentConfig' - The most recent deployment configuration for the endpoint.
--
-- 'dataCaptureConfig', 'describeEndpointResponse_dataCaptureConfig' - Undocumented member.
--
-- 'httpStatus', 'describeEndpointResponse_httpStatus' - The response's http status code.
--
-- 'endpointName', 'describeEndpointResponse_endpointName' - Name of the endpoint.
--
-- 'endpointArn', 'describeEndpointResponse_endpointArn' - The Amazon Resource Name (ARN) of the endpoint.
--
-- 'endpointConfigName', 'describeEndpointResponse_endpointConfigName' - The name of the endpoint configuration associated with this endpoint.
--
-- 'endpointStatus', 'describeEndpointResponse_endpointStatus' - The status of the endpoint.
--
-- -   @OutOfService@: Endpoint is not available to take incoming requests.
--
-- -   @Creating@: CreateEndpoint is executing.
--
-- -   @Updating@: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is
--     executing.
--
-- -   @SystemUpdating@: Endpoint is undergoing maintenance and cannot be
--     updated or deleted or re-scaled until it has completed. This
--     maintenance operation does not change any customer-specified values
--     such as VPC config, KMS encryption, model, instance type, or
--     instance count.
--
-- -   @RollingBack@: Endpoint fails to scale up or down or change its
--     variant weight and is in the process of rolling back to its previous
--     configuration. Once the rollback completes, endpoint returns to an
--     @InService@ status. This transitional status only applies to an
--     endpoint that has autoscaling enabled and is undergoing variant
--     weight or capacity changes as part of an
--     UpdateEndpointWeightsAndCapacities call or when the
--     UpdateEndpointWeightsAndCapacities operation is called explicitly.
--
-- -   @InService@: Endpoint is available to process incoming requests.
--
-- -   @Deleting@: DeleteEndpoint is executing.
--
-- -   @Failed@: Endpoint could not be created, updated, or re-scaled. Use
--     DescribeEndpointOutput$FailureReason for information about the
--     failure. DeleteEndpoint is the only operation that can be performed
--     on a failed endpoint.
--
-- 'creationTime', 'describeEndpointResponse_creationTime' - A timestamp that shows when the endpoint was created.
--
-- 'lastModifiedTime', 'describeEndpointResponse_lastModifiedTime' - A timestamp that shows when the endpoint was last modified.
newDescribeEndpointResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'endpointName'
  Prelude.Text ->
  -- | 'endpointArn'
  Prelude.Text ->
  -- | 'endpointConfigName'
  Prelude.Text ->
  -- | 'endpointStatus'
  EndpointStatus ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'lastModifiedTime'
  Prelude.UTCTime ->
  DescribeEndpointResponse
newDescribeEndpointResponse :: Int
-> Text
-> Text
-> Text
-> EndpointStatus
-> UTCTime
-> UTCTime
-> DescribeEndpointResponse
newDescribeEndpointResponse
  Int
pHttpStatus_
  Text
pEndpointName_
  Text
pEndpointArn_
  Text
pEndpointConfigName_
  EndpointStatus
pEndpointStatus_
  UTCTime
pCreationTime_
  UTCTime
pLastModifiedTime_ =
    DescribeEndpointResponse' :: Maybe Text
-> Maybe AsyncInferenceConfig
-> Maybe (NonEmpty ProductionVariantSummary)
-> Maybe DeploymentConfig
-> Maybe DataCaptureConfigSummary
-> Int
-> Text
-> Text
-> Text
-> EndpointStatus
-> POSIX
-> POSIX
-> DescribeEndpointResponse
DescribeEndpointResponse'
      { $sel:failureReason:DescribeEndpointResponse' :: Maybe Text
failureReason =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:asyncInferenceConfig:DescribeEndpointResponse' :: Maybe AsyncInferenceConfig
asyncInferenceConfig = Maybe AsyncInferenceConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:productionVariants:DescribeEndpointResponse' :: Maybe (NonEmpty ProductionVariantSummary)
productionVariants = Maybe (NonEmpty ProductionVariantSummary)
forall a. Maybe a
Prelude.Nothing,
        $sel:lastDeploymentConfig:DescribeEndpointResponse' :: Maybe DeploymentConfig
lastDeploymentConfig = Maybe DeploymentConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:dataCaptureConfig:DescribeEndpointResponse' :: Maybe DataCaptureConfigSummary
dataCaptureConfig = Maybe DataCaptureConfigSummary
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeEndpointResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:endpointName:DescribeEndpointResponse' :: Text
endpointName = Text
pEndpointName_,
        $sel:endpointArn:DescribeEndpointResponse' :: Text
endpointArn = Text
pEndpointArn_,
        $sel:endpointConfigName:DescribeEndpointResponse' :: Text
endpointConfigName = Text
pEndpointConfigName_,
        $sel:endpointStatus:DescribeEndpointResponse' :: EndpointStatus
endpointStatus = EndpointStatus
pEndpointStatus_,
        $sel:creationTime:DescribeEndpointResponse' :: POSIX
creationTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
        $sel:lastModifiedTime:DescribeEndpointResponse' :: POSIX
lastModifiedTime =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedTime_
      }

-- | If the status of the endpoint is @Failed@, the reason why it failed.
describeEndpointResponse_failureReason :: Lens.Lens' DescribeEndpointResponse (Prelude.Maybe Prelude.Text)
describeEndpointResponse_failureReason :: (Maybe Text -> f (Maybe Text))
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_failureReason = (DescribeEndpointResponse -> Maybe Text)
-> (DescribeEndpointResponse
    -> Maybe Text -> DescribeEndpointResponse)
-> Lens
     DescribeEndpointResponse
     DescribeEndpointResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:DescribeEndpointResponse' :: DescribeEndpointResponse -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} Maybe Text
a -> DescribeEndpointResponse
s {$sel:failureReason:DescribeEndpointResponse' :: Maybe Text
failureReason = Maybe Text
a} :: DescribeEndpointResponse)

-- | Returns the description of an endpoint configuration created using the
-- <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html CreateEndpointConfig>
-- API.
describeEndpointResponse_asyncInferenceConfig :: Lens.Lens' DescribeEndpointResponse (Prelude.Maybe AsyncInferenceConfig)
describeEndpointResponse_asyncInferenceConfig :: (Maybe AsyncInferenceConfig -> f (Maybe AsyncInferenceConfig))
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_asyncInferenceConfig = (DescribeEndpointResponse -> Maybe AsyncInferenceConfig)
-> (DescribeEndpointResponse
    -> Maybe AsyncInferenceConfig -> DescribeEndpointResponse)
-> Lens
     DescribeEndpointResponse
     DescribeEndpointResponse
     (Maybe AsyncInferenceConfig)
     (Maybe AsyncInferenceConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {Maybe AsyncInferenceConfig
asyncInferenceConfig :: Maybe AsyncInferenceConfig
$sel:asyncInferenceConfig:DescribeEndpointResponse' :: DescribeEndpointResponse -> Maybe AsyncInferenceConfig
asyncInferenceConfig} -> Maybe AsyncInferenceConfig
asyncInferenceConfig) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} Maybe AsyncInferenceConfig
a -> DescribeEndpointResponse
s {$sel:asyncInferenceConfig:DescribeEndpointResponse' :: Maybe AsyncInferenceConfig
asyncInferenceConfig = Maybe AsyncInferenceConfig
a} :: DescribeEndpointResponse)

-- | An array of ProductionVariantSummary objects, one for each model hosted
-- behind this endpoint.
describeEndpointResponse_productionVariants :: Lens.Lens' DescribeEndpointResponse (Prelude.Maybe (Prelude.NonEmpty ProductionVariantSummary))
describeEndpointResponse_productionVariants :: (Maybe (NonEmpty ProductionVariantSummary)
 -> f (Maybe (NonEmpty ProductionVariantSummary)))
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_productionVariants = (DescribeEndpointResponse
 -> Maybe (NonEmpty ProductionVariantSummary))
-> (DescribeEndpointResponse
    -> Maybe (NonEmpty ProductionVariantSummary)
    -> DescribeEndpointResponse)
-> Lens
     DescribeEndpointResponse
     DescribeEndpointResponse
     (Maybe (NonEmpty ProductionVariantSummary))
     (Maybe (NonEmpty ProductionVariantSummary))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {Maybe (NonEmpty ProductionVariantSummary)
productionVariants :: Maybe (NonEmpty ProductionVariantSummary)
$sel:productionVariants:DescribeEndpointResponse' :: DescribeEndpointResponse
-> Maybe (NonEmpty ProductionVariantSummary)
productionVariants} -> Maybe (NonEmpty ProductionVariantSummary)
productionVariants) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} Maybe (NonEmpty ProductionVariantSummary)
a -> DescribeEndpointResponse
s {$sel:productionVariants:DescribeEndpointResponse' :: Maybe (NonEmpty ProductionVariantSummary)
productionVariants = Maybe (NonEmpty ProductionVariantSummary)
a} :: DescribeEndpointResponse) ((Maybe (NonEmpty ProductionVariantSummary)
  -> f (Maybe (NonEmpty ProductionVariantSummary)))
 -> DescribeEndpointResponse -> f DescribeEndpointResponse)
-> ((Maybe (NonEmpty ProductionVariantSummary)
     -> f (Maybe (NonEmpty ProductionVariantSummary)))
    -> Maybe (NonEmpty ProductionVariantSummary)
    -> f (Maybe (NonEmpty ProductionVariantSummary)))
-> (Maybe (NonEmpty ProductionVariantSummary)
    -> f (Maybe (NonEmpty ProductionVariantSummary)))
-> DescribeEndpointResponse
-> f DescribeEndpointResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty ProductionVariantSummary)
  (NonEmpty ProductionVariantSummary)
  (NonEmpty ProductionVariantSummary)
  (NonEmpty ProductionVariantSummary)
-> Iso
     (Maybe (NonEmpty ProductionVariantSummary))
     (Maybe (NonEmpty ProductionVariantSummary))
     (Maybe (NonEmpty ProductionVariantSummary))
     (Maybe (NonEmpty ProductionVariantSummary))
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
  (NonEmpty ProductionVariantSummary)
  (NonEmpty ProductionVariantSummary)
  (NonEmpty ProductionVariantSummary)
  (NonEmpty ProductionVariantSummary)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The most recent deployment configuration for the endpoint.
describeEndpointResponse_lastDeploymentConfig :: Lens.Lens' DescribeEndpointResponse (Prelude.Maybe DeploymentConfig)
describeEndpointResponse_lastDeploymentConfig :: (Maybe DeploymentConfig -> f (Maybe DeploymentConfig))
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_lastDeploymentConfig = (DescribeEndpointResponse -> Maybe DeploymentConfig)
-> (DescribeEndpointResponse
    -> Maybe DeploymentConfig -> DescribeEndpointResponse)
-> Lens
     DescribeEndpointResponse
     DescribeEndpointResponse
     (Maybe DeploymentConfig)
     (Maybe DeploymentConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {Maybe DeploymentConfig
lastDeploymentConfig :: Maybe DeploymentConfig
$sel:lastDeploymentConfig:DescribeEndpointResponse' :: DescribeEndpointResponse -> Maybe DeploymentConfig
lastDeploymentConfig} -> Maybe DeploymentConfig
lastDeploymentConfig) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} Maybe DeploymentConfig
a -> DescribeEndpointResponse
s {$sel:lastDeploymentConfig:DescribeEndpointResponse' :: Maybe DeploymentConfig
lastDeploymentConfig = Maybe DeploymentConfig
a} :: DescribeEndpointResponse)

-- | Undocumented member.
describeEndpointResponse_dataCaptureConfig :: Lens.Lens' DescribeEndpointResponse (Prelude.Maybe DataCaptureConfigSummary)
describeEndpointResponse_dataCaptureConfig :: (Maybe DataCaptureConfigSummary
 -> f (Maybe DataCaptureConfigSummary))
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_dataCaptureConfig = (DescribeEndpointResponse -> Maybe DataCaptureConfigSummary)
-> (DescribeEndpointResponse
    -> Maybe DataCaptureConfigSummary -> DescribeEndpointResponse)
-> Lens
     DescribeEndpointResponse
     DescribeEndpointResponse
     (Maybe DataCaptureConfigSummary)
     (Maybe DataCaptureConfigSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {Maybe DataCaptureConfigSummary
dataCaptureConfig :: Maybe DataCaptureConfigSummary
$sel:dataCaptureConfig:DescribeEndpointResponse' :: DescribeEndpointResponse -> Maybe DataCaptureConfigSummary
dataCaptureConfig} -> Maybe DataCaptureConfigSummary
dataCaptureConfig) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} Maybe DataCaptureConfigSummary
a -> DescribeEndpointResponse
s {$sel:dataCaptureConfig:DescribeEndpointResponse' :: Maybe DataCaptureConfigSummary
dataCaptureConfig = Maybe DataCaptureConfigSummary
a} :: DescribeEndpointResponse)

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

-- | Name of the endpoint.
describeEndpointResponse_endpointName :: Lens.Lens' DescribeEndpointResponse Prelude.Text
describeEndpointResponse_endpointName :: (Text -> f Text)
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_endpointName = (DescribeEndpointResponse -> Text)
-> (DescribeEndpointResponse -> Text -> DescribeEndpointResponse)
-> Lens DescribeEndpointResponse DescribeEndpointResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {Text
endpointName :: Text
$sel:endpointName:DescribeEndpointResponse' :: DescribeEndpointResponse -> Text
endpointName} -> Text
endpointName) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} Text
a -> DescribeEndpointResponse
s {$sel:endpointName:DescribeEndpointResponse' :: Text
endpointName = Text
a} :: DescribeEndpointResponse)

-- | The Amazon Resource Name (ARN) of the endpoint.
describeEndpointResponse_endpointArn :: Lens.Lens' DescribeEndpointResponse Prelude.Text
describeEndpointResponse_endpointArn :: (Text -> f Text)
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_endpointArn = (DescribeEndpointResponse -> Text)
-> (DescribeEndpointResponse -> Text -> DescribeEndpointResponse)
-> Lens DescribeEndpointResponse DescribeEndpointResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {Text
endpointArn :: Text
$sel:endpointArn:DescribeEndpointResponse' :: DescribeEndpointResponse -> Text
endpointArn} -> Text
endpointArn) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} Text
a -> DescribeEndpointResponse
s {$sel:endpointArn:DescribeEndpointResponse' :: Text
endpointArn = Text
a} :: DescribeEndpointResponse)

-- | The name of the endpoint configuration associated with this endpoint.
describeEndpointResponse_endpointConfigName :: Lens.Lens' DescribeEndpointResponse Prelude.Text
describeEndpointResponse_endpointConfigName :: (Text -> f Text)
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_endpointConfigName = (DescribeEndpointResponse -> Text)
-> (DescribeEndpointResponse -> Text -> DescribeEndpointResponse)
-> Lens DescribeEndpointResponse DescribeEndpointResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {Text
endpointConfigName :: Text
$sel:endpointConfigName:DescribeEndpointResponse' :: DescribeEndpointResponse -> Text
endpointConfigName} -> Text
endpointConfigName) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} Text
a -> DescribeEndpointResponse
s {$sel:endpointConfigName:DescribeEndpointResponse' :: Text
endpointConfigName = Text
a} :: DescribeEndpointResponse)

-- | The status of the endpoint.
--
-- -   @OutOfService@: Endpoint is not available to take incoming requests.
--
-- -   @Creating@: CreateEndpoint is executing.
--
-- -   @Updating@: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is
--     executing.
--
-- -   @SystemUpdating@: Endpoint is undergoing maintenance and cannot be
--     updated or deleted or re-scaled until it has completed. This
--     maintenance operation does not change any customer-specified values
--     such as VPC config, KMS encryption, model, instance type, or
--     instance count.
--
-- -   @RollingBack@: Endpoint fails to scale up or down or change its
--     variant weight and is in the process of rolling back to its previous
--     configuration. Once the rollback completes, endpoint returns to an
--     @InService@ status. This transitional status only applies to an
--     endpoint that has autoscaling enabled and is undergoing variant
--     weight or capacity changes as part of an
--     UpdateEndpointWeightsAndCapacities call or when the
--     UpdateEndpointWeightsAndCapacities operation is called explicitly.
--
-- -   @InService@: Endpoint is available to process incoming requests.
--
-- -   @Deleting@: DeleteEndpoint is executing.
--
-- -   @Failed@: Endpoint could not be created, updated, or re-scaled. Use
--     DescribeEndpointOutput$FailureReason for information about the
--     failure. DeleteEndpoint is the only operation that can be performed
--     on a failed endpoint.
describeEndpointResponse_endpointStatus :: Lens.Lens' DescribeEndpointResponse EndpointStatus
describeEndpointResponse_endpointStatus :: (EndpointStatus -> f EndpointStatus)
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_endpointStatus = (DescribeEndpointResponse -> EndpointStatus)
-> (DescribeEndpointResponse
    -> EndpointStatus -> DescribeEndpointResponse)
-> Lens
     DescribeEndpointResponse
     DescribeEndpointResponse
     EndpointStatus
     EndpointStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {EndpointStatus
endpointStatus :: EndpointStatus
$sel:endpointStatus:DescribeEndpointResponse' :: DescribeEndpointResponse -> EndpointStatus
endpointStatus} -> EndpointStatus
endpointStatus) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} EndpointStatus
a -> DescribeEndpointResponse
s {$sel:endpointStatus:DescribeEndpointResponse' :: EndpointStatus
endpointStatus = EndpointStatus
a} :: DescribeEndpointResponse)

-- | A timestamp that shows when the endpoint was created.
describeEndpointResponse_creationTime :: Lens.Lens' DescribeEndpointResponse Prelude.UTCTime
describeEndpointResponse_creationTime :: (UTCTime -> f UTCTime)
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_creationTime = (DescribeEndpointResponse -> POSIX)
-> (DescribeEndpointResponse -> POSIX -> DescribeEndpointResponse)
-> Lens
     DescribeEndpointResponse DescribeEndpointResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {POSIX
creationTime :: POSIX
$sel:creationTime:DescribeEndpointResponse' :: DescribeEndpointResponse -> POSIX
creationTime} -> POSIX
creationTime) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} POSIX
a -> DescribeEndpointResponse
s {$sel:creationTime:DescribeEndpointResponse' :: POSIX
creationTime = POSIX
a} :: DescribeEndpointResponse) ((POSIX -> f POSIX)
 -> DescribeEndpointResponse -> f DescribeEndpointResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeEndpointResponse
-> f DescribeEndpointResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A timestamp that shows when the endpoint was last modified.
describeEndpointResponse_lastModifiedTime :: Lens.Lens' DescribeEndpointResponse Prelude.UTCTime
describeEndpointResponse_lastModifiedTime :: (UTCTime -> f UTCTime)
-> DescribeEndpointResponse -> f DescribeEndpointResponse
describeEndpointResponse_lastModifiedTime = (DescribeEndpointResponse -> POSIX)
-> (DescribeEndpointResponse -> POSIX -> DescribeEndpointResponse)
-> Lens
     DescribeEndpointResponse DescribeEndpointResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEndpointResponse' {POSIX
lastModifiedTime :: POSIX
$sel:lastModifiedTime:DescribeEndpointResponse' :: DescribeEndpointResponse -> POSIX
lastModifiedTime} -> POSIX
lastModifiedTime) (\s :: DescribeEndpointResponse
s@DescribeEndpointResponse' {} POSIX
a -> DescribeEndpointResponse
s {$sel:lastModifiedTime:DescribeEndpointResponse' :: POSIX
lastModifiedTime = POSIX
a} :: DescribeEndpointResponse) ((POSIX -> f POSIX)
 -> DescribeEndpointResponse -> f DescribeEndpointResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeEndpointResponse
-> f DescribeEndpointResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Prelude.NFData DescribeEndpointResponse