{-# 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.SageMaker.Types.EndpointConfigSummary
-- 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.SageMaker.Types.EndpointConfigSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides summary information for an endpoint configuration.
--
-- /See:/ 'newEndpointConfigSummary' smart constructor.
data EndpointConfigSummary = EndpointConfigSummary'
  { -- | The name of the endpoint configuration.
    EndpointConfigSummary -> Text
endpointConfigName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the endpoint configuration.
    EndpointConfigSummary -> Text
endpointConfigArn :: Prelude.Text,
    -- | A timestamp that shows when the endpoint configuration was created.
    EndpointConfigSummary -> POSIX
creationTime :: Core.POSIX
  }
  deriving (EndpointConfigSummary -> EndpointConfigSummary -> Bool
(EndpointConfigSummary -> EndpointConfigSummary -> Bool)
-> (EndpointConfigSummary -> EndpointConfigSummary -> Bool)
-> Eq EndpointConfigSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EndpointConfigSummary -> EndpointConfigSummary -> Bool
$c/= :: EndpointConfigSummary -> EndpointConfigSummary -> Bool
== :: EndpointConfigSummary -> EndpointConfigSummary -> Bool
$c== :: EndpointConfigSummary -> EndpointConfigSummary -> Bool
Prelude.Eq, ReadPrec [EndpointConfigSummary]
ReadPrec EndpointConfigSummary
Int -> ReadS EndpointConfigSummary
ReadS [EndpointConfigSummary]
(Int -> ReadS EndpointConfigSummary)
-> ReadS [EndpointConfigSummary]
-> ReadPrec EndpointConfigSummary
-> ReadPrec [EndpointConfigSummary]
-> Read EndpointConfigSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EndpointConfigSummary]
$creadListPrec :: ReadPrec [EndpointConfigSummary]
readPrec :: ReadPrec EndpointConfigSummary
$creadPrec :: ReadPrec EndpointConfigSummary
readList :: ReadS [EndpointConfigSummary]
$creadList :: ReadS [EndpointConfigSummary]
readsPrec :: Int -> ReadS EndpointConfigSummary
$creadsPrec :: Int -> ReadS EndpointConfigSummary
Prelude.Read, Int -> EndpointConfigSummary -> ShowS
[EndpointConfigSummary] -> ShowS
EndpointConfigSummary -> String
(Int -> EndpointConfigSummary -> ShowS)
-> (EndpointConfigSummary -> String)
-> ([EndpointConfigSummary] -> ShowS)
-> Show EndpointConfigSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EndpointConfigSummary] -> ShowS
$cshowList :: [EndpointConfigSummary] -> ShowS
show :: EndpointConfigSummary -> String
$cshow :: EndpointConfigSummary -> String
showsPrec :: Int -> EndpointConfigSummary -> ShowS
$cshowsPrec :: Int -> EndpointConfigSummary -> ShowS
Prelude.Show, (forall x. EndpointConfigSummary -> Rep EndpointConfigSummary x)
-> (forall x. Rep EndpointConfigSummary x -> EndpointConfigSummary)
-> Generic EndpointConfigSummary
forall x. Rep EndpointConfigSummary x -> EndpointConfigSummary
forall x. EndpointConfigSummary -> Rep EndpointConfigSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EndpointConfigSummary x -> EndpointConfigSummary
$cfrom :: forall x. EndpointConfigSummary -> Rep EndpointConfigSummary x
Prelude.Generic)

-- |
-- Create a value of 'EndpointConfigSummary' 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:
--
-- 'endpointConfigName', 'endpointConfigSummary_endpointConfigName' - The name of the endpoint configuration.
--
-- 'endpointConfigArn', 'endpointConfigSummary_endpointConfigArn' - The Amazon Resource Name (ARN) of the endpoint configuration.
--
-- 'creationTime', 'endpointConfigSummary_creationTime' - A timestamp that shows when the endpoint configuration was created.
newEndpointConfigSummary ::
  -- | 'endpointConfigName'
  Prelude.Text ->
  -- | 'endpointConfigArn'
  Prelude.Text ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  EndpointConfigSummary
newEndpointConfigSummary :: Text -> Text -> UTCTime -> EndpointConfigSummary
newEndpointConfigSummary
  Text
pEndpointConfigName_
  Text
pEndpointConfigArn_
  UTCTime
pCreationTime_ =
    EndpointConfigSummary' :: Text -> Text -> POSIX -> EndpointConfigSummary
EndpointConfigSummary'
      { $sel:endpointConfigName:EndpointConfigSummary' :: Text
endpointConfigName =
          Text
pEndpointConfigName_,
        $sel:endpointConfigArn:EndpointConfigSummary' :: Text
endpointConfigArn = Text
pEndpointConfigArn_,
        $sel:creationTime:EndpointConfigSummary' :: 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_
      }

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

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

-- | A timestamp that shows when the endpoint configuration was created.
endpointConfigSummary_creationTime :: Lens.Lens' EndpointConfigSummary Prelude.UTCTime
endpointConfigSummary_creationTime :: (UTCTime -> f UTCTime)
-> EndpointConfigSummary -> f EndpointConfigSummary
endpointConfigSummary_creationTime = (EndpointConfigSummary -> POSIX)
-> (EndpointConfigSummary -> POSIX -> EndpointConfigSummary)
-> Lens EndpointConfigSummary EndpointConfigSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointConfigSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:EndpointConfigSummary' :: EndpointConfigSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: EndpointConfigSummary
s@EndpointConfigSummary' {} POSIX
a -> EndpointConfigSummary
s {$sel:creationTime:EndpointConfigSummary' :: POSIX
creationTime = POSIX
a} :: EndpointConfigSummary) ((POSIX -> f POSIX)
 -> EndpointConfigSummary -> f EndpointConfigSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EndpointConfigSummary
-> f EndpointConfigSummary
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 Core.FromJSON EndpointConfigSummary where
  parseJSON :: Value -> Parser EndpointConfigSummary
parseJSON =
    String
-> (Object -> Parser EndpointConfigSummary)
-> Value
-> Parser EndpointConfigSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EndpointConfigSummary"
      ( \Object
x ->
          Text -> Text -> POSIX -> EndpointConfigSummary
EndpointConfigSummary'
            (Text -> Text -> POSIX -> EndpointConfigSummary)
-> Parser Text -> Parser (Text -> POSIX -> EndpointConfigSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"EndpointConfigName")
            Parser (Text -> POSIX -> EndpointConfigSummary)
-> Parser Text -> Parser (POSIX -> EndpointConfigSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"EndpointConfigArn")
            Parser (POSIX -> EndpointConfigSummary)
-> Parser POSIX -> Parser EndpointConfigSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreationTime")
      )

instance Prelude.Hashable EndpointConfigSummary

instance Prelude.NFData EndpointConfigSummary