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

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

-- |
-- Module      : Amazonka.Comprehend.Types.EndpointProperties
-- 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)
module Amazonka.Comprehend.Types.EndpointProperties where

import Amazonka.Comprehend.Types.EndpointStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Specifies information about the specified endpoint.
--
-- /See:/ 'newEndpointProperties' smart constructor.
data EndpointProperties = EndpointProperties'
  { -- | The creation date and time of the endpoint.
    EndpointProperties -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | Specifies the status of the endpoint. Because the endpoint updates and
    -- creation are asynchronous, so customers will need to wait for the
    -- endpoint to be @Ready@ status before making inference requests.
    EndpointProperties -> Maybe EndpointStatus
status :: Prelude.Maybe EndpointStatus,
    -- | The Amazon Resource Number (ARN) of the model to which the endpoint is
    -- attached.
    EndpointProperties -> Maybe Text
modelArn :: Prelude.Maybe Prelude.Text,
    -- | ARN of the new model to use for updating an existing endpoint. This ARN
    -- is going to be different from the model ARN when the update is in
    -- progress
    EndpointProperties -> Maybe Text
desiredModelArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the endpoint was last modified.
    EndpointProperties -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The desired number of inference units to be used by the model using this
    -- endpoint. Each inference unit represents of a throughput of 100
    -- characters per second.
    EndpointProperties -> Maybe Natural
desiredInferenceUnits :: Prelude.Maybe Prelude.Natural,
    -- | The number of inference units currently used by the model using this
    -- endpoint.
    EndpointProperties -> Maybe Natural
currentInferenceUnits :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) of the AWS identity and Access Management
    -- (IAM) role that grants Amazon Comprehend read access to trained custom
    -- models encrypted with a customer managed key (ModelKmsKeyId).
    EndpointProperties -> Maybe Text
dataAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Data access role ARN to use in case the new model is encrypted with a
    -- customer KMS key.
    EndpointProperties -> Maybe Text
desiredDataAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies a reason for failure in cases of @Failed@ status.
    EndpointProperties -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Number (ARN) of the endpoint.
    EndpointProperties -> Maybe Text
endpointArn :: Prelude.Maybe Prelude.Text
  }
  deriving (EndpointProperties -> EndpointProperties -> Bool
(EndpointProperties -> EndpointProperties -> Bool)
-> (EndpointProperties -> EndpointProperties -> Bool)
-> Eq EndpointProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EndpointProperties -> EndpointProperties -> Bool
$c/= :: EndpointProperties -> EndpointProperties -> Bool
== :: EndpointProperties -> EndpointProperties -> Bool
$c== :: EndpointProperties -> EndpointProperties -> Bool
Prelude.Eq, ReadPrec [EndpointProperties]
ReadPrec EndpointProperties
Int -> ReadS EndpointProperties
ReadS [EndpointProperties]
(Int -> ReadS EndpointProperties)
-> ReadS [EndpointProperties]
-> ReadPrec EndpointProperties
-> ReadPrec [EndpointProperties]
-> Read EndpointProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EndpointProperties]
$creadListPrec :: ReadPrec [EndpointProperties]
readPrec :: ReadPrec EndpointProperties
$creadPrec :: ReadPrec EndpointProperties
readList :: ReadS [EndpointProperties]
$creadList :: ReadS [EndpointProperties]
readsPrec :: Int -> ReadS EndpointProperties
$creadsPrec :: Int -> ReadS EndpointProperties
Prelude.Read, Int -> EndpointProperties -> ShowS
[EndpointProperties] -> ShowS
EndpointProperties -> String
(Int -> EndpointProperties -> ShowS)
-> (EndpointProperties -> String)
-> ([EndpointProperties] -> ShowS)
-> Show EndpointProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EndpointProperties] -> ShowS
$cshowList :: [EndpointProperties] -> ShowS
show :: EndpointProperties -> String
$cshow :: EndpointProperties -> String
showsPrec :: Int -> EndpointProperties -> ShowS
$cshowsPrec :: Int -> EndpointProperties -> ShowS
Prelude.Show, (forall x. EndpointProperties -> Rep EndpointProperties x)
-> (forall x. Rep EndpointProperties x -> EndpointProperties)
-> Generic EndpointProperties
forall x. Rep EndpointProperties x -> EndpointProperties
forall x. EndpointProperties -> Rep EndpointProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EndpointProperties x -> EndpointProperties
$cfrom :: forall x. EndpointProperties -> Rep EndpointProperties x
Prelude.Generic)

-- |
-- Create a value of 'EndpointProperties' 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:
--
-- 'creationTime', 'endpointProperties_creationTime' - The creation date and time of the endpoint.
--
-- 'status', 'endpointProperties_status' - Specifies the status of the endpoint. Because the endpoint updates and
-- creation are asynchronous, so customers will need to wait for the
-- endpoint to be @Ready@ status before making inference requests.
--
-- 'modelArn', 'endpointProperties_modelArn' - The Amazon Resource Number (ARN) of the model to which the endpoint is
-- attached.
--
-- 'desiredModelArn', 'endpointProperties_desiredModelArn' - ARN of the new model to use for updating an existing endpoint. This ARN
-- is going to be different from the model ARN when the update is in
-- progress
--
-- 'lastModifiedTime', 'endpointProperties_lastModifiedTime' - The date and time that the endpoint was last modified.
--
-- 'desiredInferenceUnits', 'endpointProperties_desiredInferenceUnits' - The desired number of inference units to be used by the model using this
-- endpoint. Each inference unit represents of a throughput of 100
-- characters per second.
--
-- 'currentInferenceUnits', 'endpointProperties_currentInferenceUnits' - The number of inference units currently used by the model using this
-- endpoint.
--
-- 'dataAccessRoleArn', 'endpointProperties_dataAccessRoleArn' - The Amazon Resource Name (ARN) of the AWS identity and Access Management
-- (IAM) role that grants Amazon Comprehend read access to trained custom
-- models encrypted with a customer managed key (ModelKmsKeyId).
--
-- 'desiredDataAccessRoleArn', 'endpointProperties_desiredDataAccessRoleArn' - Data access role ARN to use in case the new model is encrypted with a
-- customer KMS key.
--
-- 'message', 'endpointProperties_message' - Specifies a reason for failure in cases of @Failed@ status.
--
-- 'endpointArn', 'endpointProperties_endpointArn' - The Amazon Resource Number (ARN) of the endpoint.
newEndpointProperties ::
  EndpointProperties
newEndpointProperties :: EndpointProperties
newEndpointProperties =
  EndpointProperties' :: Maybe POSIX
-> Maybe EndpointStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EndpointProperties
EndpointProperties'
    { $sel:creationTime:EndpointProperties' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:status:EndpointProperties' :: Maybe EndpointStatus
status = Maybe EndpointStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:modelArn:EndpointProperties' :: Maybe Text
modelArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:desiredModelArn:EndpointProperties' :: Maybe Text
desiredModelArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:EndpointProperties' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:desiredInferenceUnits:EndpointProperties' :: Maybe Natural
desiredInferenceUnits = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:currentInferenceUnits:EndpointProperties' :: Maybe Natural
currentInferenceUnits = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:dataAccessRoleArn:EndpointProperties' :: Maybe Text
dataAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:desiredDataAccessRoleArn:EndpointProperties' :: Maybe Text
desiredDataAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:message:EndpointProperties' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointArn:EndpointProperties' :: Maybe Text
endpointArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The creation date and time of the endpoint.
endpointProperties_creationTime :: Lens.Lens' EndpointProperties (Prelude.Maybe Prelude.UTCTime)
endpointProperties_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EndpointProperties -> f EndpointProperties
endpointProperties_creationTime = (EndpointProperties -> Maybe POSIX)
-> (EndpointProperties -> Maybe POSIX -> EndpointProperties)
-> Lens
     EndpointProperties EndpointProperties (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointProperties' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:EndpointProperties' :: EndpointProperties -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: EndpointProperties
s@EndpointProperties' {} Maybe POSIX
a -> EndpointProperties
s {$sel:creationTime:EndpointProperties' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: EndpointProperties) ((Maybe POSIX -> f (Maybe POSIX))
 -> EndpointProperties -> f EndpointProperties)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EndpointProperties
-> f EndpointProperties
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

-- | Specifies the status of the endpoint. Because the endpoint updates and
-- creation are asynchronous, so customers will need to wait for the
-- endpoint to be @Ready@ status before making inference requests.
endpointProperties_status :: Lens.Lens' EndpointProperties (Prelude.Maybe EndpointStatus)
endpointProperties_status :: (Maybe EndpointStatus -> f (Maybe EndpointStatus))
-> EndpointProperties -> f EndpointProperties
endpointProperties_status = (EndpointProperties -> Maybe EndpointStatus)
-> (EndpointProperties
    -> Maybe EndpointStatus -> EndpointProperties)
-> Lens
     EndpointProperties
     EndpointProperties
     (Maybe EndpointStatus)
     (Maybe EndpointStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointProperties' {Maybe EndpointStatus
status :: Maybe EndpointStatus
$sel:status:EndpointProperties' :: EndpointProperties -> Maybe EndpointStatus
status} -> Maybe EndpointStatus
status) (\s :: EndpointProperties
s@EndpointProperties' {} Maybe EndpointStatus
a -> EndpointProperties
s {$sel:status:EndpointProperties' :: Maybe EndpointStatus
status = Maybe EndpointStatus
a} :: EndpointProperties)

-- | The Amazon Resource Number (ARN) of the model to which the endpoint is
-- attached.
endpointProperties_modelArn :: Lens.Lens' EndpointProperties (Prelude.Maybe Prelude.Text)
endpointProperties_modelArn :: (Maybe Text -> f (Maybe Text))
-> EndpointProperties -> f EndpointProperties
endpointProperties_modelArn = (EndpointProperties -> Maybe Text)
-> (EndpointProperties -> Maybe Text -> EndpointProperties)
-> Lens
     EndpointProperties EndpointProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointProperties' {Maybe Text
modelArn :: Maybe Text
$sel:modelArn:EndpointProperties' :: EndpointProperties -> Maybe Text
modelArn} -> Maybe Text
modelArn) (\s :: EndpointProperties
s@EndpointProperties' {} Maybe Text
a -> EndpointProperties
s {$sel:modelArn:EndpointProperties' :: Maybe Text
modelArn = Maybe Text
a} :: EndpointProperties)

-- | ARN of the new model to use for updating an existing endpoint. This ARN
-- is going to be different from the model ARN when the update is in
-- progress
endpointProperties_desiredModelArn :: Lens.Lens' EndpointProperties (Prelude.Maybe Prelude.Text)
endpointProperties_desiredModelArn :: (Maybe Text -> f (Maybe Text))
-> EndpointProperties -> f EndpointProperties
endpointProperties_desiredModelArn = (EndpointProperties -> Maybe Text)
-> (EndpointProperties -> Maybe Text -> EndpointProperties)
-> Lens
     EndpointProperties EndpointProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointProperties' {Maybe Text
desiredModelArn :: Maybe Text
$sel:desiredModelArn:EndpointProperties' :: EndpointProperties -> Maybe Text
desiredModelArn} -> Maybe Text
desiredModelArn) (\s :: EndpointProperties
s@EndpointProperties' {} Maybe Text
a -> EndpointProperties
s {$sel:desiredModelArn:EndpointProperties' :: Maybe Text
desiredModelArn = Maybe Text
a} :: EndpointProperties)

-- | The date and time that the endpoint was last modified.
endpointProperties_lastModifiedTime :: Lens.Lens' EndpointProperties (Prelude.Maybe Prelude.UTCTime)
endpointProperties_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EndpointProperties -> f EndpointProperties
endpointProperties_lastModifiedTime = (EndpointProperties -> Maybe POSIX)
-> (EndpointProperties -> Maybe POSIX -> EndpointProperties)
-> Lens
     EndpointProperties EndpointProperties (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointProperties' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:EndpointProperties' :: EndpointProperties -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: EndpointProperties
s@EndpointProperties' {} Maybe POSIX
a -> EndpointProperties
s {$sel:lastModifiedTime:EndpointProperties' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: EndpointProperties) ((Maybe POSIX -> f (Maybe POSIX))
 -> EndpointProperties -> f EndpointProperties)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EndpointProperties
-> f EndpointProperties
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 desired number of inference units to be used by the model using this
-- endpoint. Each inference unit represents of a throughput of 100
-- characters per second.
endpointProperties_desiredInferenceUnits :: Lens.Lens' EndpointProperties (Prelude.Maybe Prelude.Natural)
endpointProperties_desiredInferenceUnits :: (Maybe Natural -> f (Maybe Natural))
-> EndpointProperties -> f EndpointProperties
endpointProperties_desiredInferenceUnits = (EndpointProperties -> Maybe Natural)
-> (EndpointProperties -> Maybe Natural -> EndpointProperties)
-> Lens
     EndpointProperties
     EndpointProperties
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointProperties' {Maybe Natural
desiredInferenceUnits :: Maybe Natural
$sel:desiredInferenceUnits:EndpointProperties' :: EndpointProperties -> Maybe Natural
desiredInferenceUnits} -> Maybe Natural
desiredInferenceUnits) (\s :: EndpointProperties
s@EndpointProperties' {} Maybe Natural
a -> EndpointProperties
s {$sel:desiredInferenceUnits:EndpointProperties' :: Maybe Natural
desiredInferenceUnits = Maybe Natural
a} :: EndpointProperties)

-- | The number of inference units currently used by the model using this
-- endpoint.
endpointProperties_currentInferenceUnits :: Lens.Lens' EndpointProperties (Prelude.Maybe Prelude.Natural)
endpointProperties_currentInferenceUnits :: (Maybe Natural -> f (Maybe Natural))
-> EndpointProperties -> f EndpointProperties
endpointProperties_currentInferenceUnits = (EndpointProperties -> Maybe Natural)
-> (EndpointProperties -> Maybe Natural -> EndpointProperties)
-> Lens
     EndpointProperties
     EndpointProperties
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointProperties' {Maybe Natural
currentInferenceUnits :: Maybe Natural
$sel:currentInferenceUnits:EndpointProperties' :: EndpointProperties -> Maybe Natural
currentInferenceUnits} -> Maybe Natural
currentInferenceUnits) (\s :: EndpointProperties
s@EndpointProperties' {} Maybe Natural
a -> EndpointProperties
s {$sel:currentInferenceUnits:EndpointProperties' :: Maybe Natural
currentInferenceUnits = Maybe Natural
a} :: EndpointProperties)

-- | The Amazon Resource Name (ARN) of the AWS identity and Access Management
-- (IAM) role that grants Amazon Comprehend read access to trained custom
-- models encrypted with a customer managed key (ModelKmsKeyId).
endpointProperties_dataAccessRoleArn :: Lens.Lens' EndpointProperties (Prelude.Maybe Prelude.Text)
endpointProperties_dataAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> EndpointProperties -> f EndpointProperties
endpointProperties_dataAccessRoleArn = (EndpointProperties -> Maybe Text)
-> (EndpointProperties -> Maybe Text -> EndpointProperties)
-> Lens
     EndpointProperties EndpointProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointProperties' {Maybe Text
dataAccessRoleArn :: Maybe Text
$sel:dataAccessRoleArn:EndpointProperties' :: EndpointProperties -> Maybe Text
dataAccessRoleArn} -> Maybe Text
dataAccessRoleArn) (\s :: EndpointProperties
s@EndpointProperties' {} Maybe Text
a -> EndpointProperties
s {$sel:dataAccessRoleArn:EndpointProperties' :: Maybe Text
dataAccessRoleArn = Maybe Text
a} :: EndpointProperties)

-- | Data access role ARN to use in case the new model is encrypted with a
-- customer KMS key.
endpointProperties_desiredDataAccessRoleArn :: Lens.Lens' EndpointProperties (Prelude.Maybe Prelude.Text)
endpointProperties_desiredDataAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> EndpointProperties -> f EndpointProperties
endpointProperties_desiredDataAccessRoleArn = (EndpointProperties -> Maybe Text)
-> (EndpointProperties -> Maybe Text -> EndpointProperties)
-> Lens
     EndpointProperties EndpointProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointProperties' {Maybe Text
desiredDataAccessRoleArn :: Maybe Text
$sel:desiredDataAccessRoleArn:EndpointProperties' :: EndpointProperties -> Maybe Text
desiredDataAccessRoleArn} -> Maybe Text
desiredDataAccessRoleArn) (\s :: EndpointProperties
s@EndpointProperties' {} Maybe Text
a -> EndpointProperties
s {$sel:desiredDataAccessRoleArn:EndpointProperties' :: Maybe Text
desiredDataAccessRoleArn = Maybe Text
a} :: EndpointProperties)

-- | Specifies a reason for failure in cases of @Failed@ status.
endpointProperties_message :: Lens.Lens' EndpointProperties (Prelude.Maybe Prelude.Text)
endpointProperties_message :: (Maybe Text -> f (Maybe Text))
-> EndpointProperties -> f EndpointProperties
endpointProperties_message = (EndpointProperties -> Maybe Text)
-> (EndpointProperties -> Maybe Text -> EndpointProperties)
-> Lens
     EndpointProperties EndpointProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointProperties' {Maybe Text
message :: Maybe Text
$sel:message:EndpointProperties' :: EndpointProperties -> Maybe Text
message} -> Maybe Text
message) (\s :: EndpointProperties
s@EndpointProperties' {} Maybe Text
a -> EndpointProperties
s {$sel:message:EndpointProperties' :: Maybe Text
message = Maybe Text
a} :: EndpointProperties)

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

instance Core.FromJSON EndpointProperties where
  parseJSON :: Value -> Parser EndpointProperties
parseJSON =
    String
-> (Object -> Parser EndpointProperties)
-> Value
-> Parser EndpointProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EndpointProperties"
      ( \Object
x ->
          Maybe POSIX
-> Maybe EndpointStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EndpointProperties
EndpointProperties'
            (Maybe POSIX
 -> Maybe EndpointStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> EndpointProperties)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe EndpointStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> EndpointProperties)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
            Parser
  (Maybe EndpointStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> EndpointProperties)
-> Parser (Maybe EndpointStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> EndpointProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EndpointStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> EndpointProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> EndpointProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ModelArn")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> EndpointProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> EndpointProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DesiredModelArn")
            Parser
  (Maybe POSIX
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> EndpointProperties)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> EndpointProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedTime")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> EndpointProperties)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> EndpointProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DesiredInferenceUnits")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> EndpointProperties)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> EndpointProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrentInferenceUnits")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> EndpointProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> EndpointProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataAccessRoleArn")
            Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> EndpointProperties)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> EndpointProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DesiredDataAccessRoleArn")
            Parser (Maybe Text -> Maybe Text -> EndpointProperties)
-> Parser (Maybe Text) -> Parser (Maybe Text -> EndpointProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Message")
            Parser (Maybe Text -> EndpointProperties)
-> Parser (Maybe Text) -> Parser EndpointProperties
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndpointArn")
      )

instance Prelude.Hashable EndpointProperties

instance Prelude.NFData EndpointProperties