{-# 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.MonitoringJobDefinitionSummary
-- 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.MonitoringJobDefinitionSummary where

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

-- | Summary information about a monitoring job.
--
-- /See:/ 'newMonitoringJobDefinitionSummary' smart constructor.
data MonitoringJobDefinitionSummary = MonitoringJobDefinitionSummary'
  { -- | The name of the monitoring job.
    MonitoringJobDefinitionSummary -> Text
monitoringJobDefinitionName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the monitoring job.
    MonitoringJobDefinitionSummary -> Text
monitoringJobDefinitionArn :: Prelude.Text,
    -- | The time that the monitoring job was created.
    MonitoringJobDefinitionSummary -> POSIX
creationTime :: Core.POSIX,
    -- | The name of the endpoint that the job monitors.
    MonitoringJobDefinitionSummary -> Text
endpointName :: Prelude.Text
  }
  deriving (MonitoringJobDefinitionSummary
-> MonitoringJobDefinitionSummary -> Bool
(MonitoringJobDefinitionSummary
 -> MonitoringJobDefinitionSummary -> Bool)
-> (MonitoringJobDefinitionSummary
    -> MonitoringJobDefinitionSummary -> Bool)
-> Eq MonitoringJobDefinitionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MonitoringJobDefinitionSummary
-> MonitoringJobDefinitionSummary -> Bool
$c/= :: MonitoringJobDefinitionSummary
-> MonitoringJobDefinitionSummary -> Bool
== :: MonitoringJobDefinitionSummary
-> MonitoringJobDefinitionSummary -> Bool
$c== :: MonitoringJobDefinitionSummary
-> MonitoringJobDefinitionSummary -> Bool
Prelude.Eq, ReadPrec [MonitoringJobDefinitionSummary]
ReadPrec MonitoringJobDefinitionSummary
Int -> ReadS MonitoringJobDefinitionSummary
ReadS [MonitoringJobDefinitionSummary]
(Int -> ReadS MonitoringJobDefinitionSummary)
-> ReadS [MonitoringJobDefinitionSummary]
-> ReadPrec MonitoringJobDefinitionSummary
-> ReadPrec [MonitoringJobDefinitionSummary]
-> Read MonitoringJobDefinitionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MonitoringJobDefinitionSummary]
$creadListPrec :: ReadPrec [MonitoringJobDefinitionSummary]
readPrec :: ReadPrec MonitoringJobDefinitionSummary
$creadPrec :: ReadPrec MonitoringJobDefinitionSummary
readList :: ReadS [MonitoringJobDefinitionSummary]
$creadList :: ReadS [MonitoringJobDefinitionSummary]
readsPrec :: Int -> ReadS MonitoringJobDefinitionSummary
$creadsPrec :: Int -> ReadS MonitoringJobDefinitionSummary
Prelude.Read, Int -> MonitoringJobDefinitionSummary -> ShowS
[MonitoringJobDefinitionSummary] -> ShowS
MonitoringJobDefinitionSummary -> String
(Int -> MonitoringJobDefinitionSummary -> ShowS)
-> (MonitoringJobDefinitionSummary -> String)
-> ([MonitoringJobDefinitionSummary] -> ShowS)
-> Show MonitoringJobDefinitionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MonitoringJobDefinitionSummary] -> ShowS
$cshowList :: [MonitoringJobDefinitionSummary] -> ShowS
show :: MonitoringJobDefinitionSummary -> String
$cshow :: MonitoringJobDefinitionSummary -> String
showsPrec :: Int -> MonitoringJobDefinitionSummary -> ShowS
$cshowsPrec :: Int -> MonitoringJobDefinitionSummary -> ShowS
Prelude.Show, (forall x.
 MonitoringJobDefinitionSummary
 -> Rep MonitoringJobDefinitionSummary x)
-> (forall x.
    Rep MonitoringJobDefinitionSummary x
    -> MonitoringJobDefinitionSummary)
-> Generic MonitoringJobDefinitionSummary
forall x.
Rep MonitoringJobDefinitionSummary x
-> MonitoringJobDefinitionSummary
forall x.
MonitoringJobDefinitionSummary
-> Rep MonitoringJobDefinitionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MonitoringJobDefinitionSummary x
-> MonitoringJobDefinitionSummary
$cfrom :: forall x.
MonitoringJobDefinitionSummary
-> Rep MonitoringJobDefinitionSummary x
Prelude.Generic)

-- |
-- Create a value of 'MonitoringJobDefinitionSummary' 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:
--
-- 'monitoringJobDefinitionName', 'monitoringJobDefinitionSummary_monitoringJobDefinitionName' - The name of the monitoring job.
--
-- 'monitoringJobDefinitionArn', 'monitoringJobDefinitionSummary_monitoringJobDefinitionArn' - The Amazon Resource Name (ARN) of the monitoring job.
--
-- 'creationTime', 'monitoringJobDefinitionSummary_creationTime' - The time that the monitoring job was created.
--
-- 'endpointName', 'monitoringJobDefinitionSummary_endpointName' - The name of the endpoint that the job monitors.
newMonitoringJobDefinitionSummary ::
  -- | 'monitoringJobDefinitionName'
  Prelude.Text ->
  -- | 'monitoringJobDefinitionArn'
  Prelude.Text ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'endpointName'
  Prelude.Text ->
  MonitoringJobDefinitionSummary
newMonitoringJobDefinitionSummary :: Text -> Text -> UTCTime -> Text -> MonitoringJobDefinitionSummary
newMonitoringJobDefinitionSummary
  Text
pMonitoringJobDefinitionName_
  Text
pMonitoringJobDefinitionArn_
  UTCTime
pCreationTime_
  Text
pEndpointName_ =
    MonitoringJobDefinitionSummary' :: Text -> Text -> POSIX -> Text -> MonitoringJobDefinitionSummary
MonitoringJobDefinitionSummary'
      { $sel:monitoringJobDefinitionName:MonitoringJobDefinitionSummary' :: Text
monitoringJobDefinitionName =
          Text
pMonitoringJobDefinitionName_,
        $sel:monitoringJobDefinitionArn:MonitoringJobDefinitionSummary' :: Text
monitoringJobDefinitionArn =
          Text
pMonitoringJobDefinitionArn_,
        $sel:creationTime:MonitoringJobDefinitionSummary' :: 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:endpointName:MonitoringJobDefinitionSummary' :: Text
endpointName = Text
pEndpointName_
      }

-- | The name of the monitoring job.
monitoringJobDefinitionSummary_monitoringJobDefinitionName :: Lens.Lens' MonitoringJobDefinitionSummary Prelude.Text
monitoringJobDefinitionSummary_monitoringJobDefinitionName :: (Text -> f Text)
-> MonitoringJobDefinitionSummary
-> f MonitoringJobDefinitionSummary
monitoringJobDefinitionSummary_monitoringJobDefinitionName = (MonitoringJobDefinitionSummary -> Text)
-> (MonitoringJobDefinitionSummary
    -> Text -> MonitoringJobDefinitionSummary)
-> Lens
     MonitoringJobDefinitionSummary
     MonitoringJobDefinitionSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinitionSummary' {Text
monitoringJobDefinitionName :: Text
$sel:monitoringJobDefinitionName:MonitoringJobDefinitionSummary' :: MonitoringJobDefinitionSummary -> Text
monitoringJobDefinitionName} -> Text
monitoringJobDefinitionName) (\s :: MonitoringJobDefinitionSummary
s@MonitoringJobDefinitionSummary' {} Text
a -> MonitoringJobDefinitionSummary
s {$sel:monitoringJobDefinitionName:MonitoringJobDefinitionSummary' :: Text
monitoringJobDefinitionName = Text
a} :: MonitoringJobDefinitionSummary)

-- | The Amazon Resource Name (ARN) of the monitoring job.
monitoringJobDefinitionSummary_monitoringJobDefinitionArn :: Lens.Lens' MonitoringJobDefinitionSummary Prelude.Text
monitoringJobDefinitionSummary_monitoringJobDefinitionArn :: (Text -> f Text)
-> MonitoringJobDefinitionSummary
-> f MonitoringJobDefinitionSummary
monitoringJobDefinitionSummary_monitoringJobDefinitionArn = (MonitoringJobDefinitionSummary -> Text)
-> (MonitoringJobDefinitionSummary
    -> Text -> MonitoringJobDefinitionSummary)
-> Lens
     MonitoringJobDefinitionSummary
     MonitoringJobDefinitionSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinitionSummary' {Text
monitoringJobDefinitionArn :: Text
$sel:monitoringJobDefinitionArn:MonitoringJobDefinitionSummary' :: MonitoringJobDefinitionSummary -> Text
monitoringJobDefinitionArn} -> Text
monitoringJobDefinitionArn) (\s :: MonitoringJobDefinitionSummary
s@MonitoringJobDefinitionSummary' {} Text
a -> MonitoringJobDefinitionSummary
s {$sel:monitoringJobDefinitionArn:MonitoringJobDefinitionSummary' :: Text
monitoringJobDefinitionArn = Text
a} :: MonitoringJobDefinitionSummary)

-- | The time that the monitoring job was created.
monitoringJobDefinitionSummary_creationTime :: Lens.Lens' MonitoringJobDefinitionSummary Prelude.UTCTime
monitoringJobDefinitionSummary_creationTime :: (UTCTime -> f UTCTime)
-> MonitoringJobDefinitionSummary
-> f MonitoringJobDefinitionSummary
monitoringJobDefinitionSummary_creationTime = (MonitoringJobDefinitionSummary -> POSIX)
-> (MonitoringJobDefinitionSummary
    -> POSIX -> MonitoringJobDefinitionSummary)
-> Lens
     MonitoringJobDefinitionSummary
     MonitoringJobDefinitionSummary
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinitionSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:MonitoringJobDefinitionSummary' :: MonitoringJobDefinitionSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: MonitoringJobDefinitionSummary
s@MonitoringJobDefinitionSummary' {} POSIX
a -> MonitoringJobDefinitionSummary
s {$sel:creationTime:MonitoringJobDefinitionSummary' :: POSIX
creationTime = POSIX
a} :: MonitoringJobDefinitionSummary) ((POSIX -> f POSIX)
 -> MonitoringJobDefinitionSummary
 -> f MonitoringJobDefinitionSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> MonitoringJobDefinitionSummary
-> f MonitoringJobDefinitionSummary
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

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

instance Core.FromJSON MonitoringJobDefinitionSummary where
  parseJSON :: Value -> Parser MonitoringJobDefinitionSummary
parseJSON =
    String
-> (Object -> Parser MonitoringJobDefinitionSummary)
-> Value
-> Parser MonitoringJobDefinitionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MonitoringJobDefinitionSummary"
      ( \Object
x ->
          Text -> Text -> POSIX -> Text -> MonitoringJobDefinitionSummary
MonitoringJobDefinitionSummary'
            (Text -> Text -> POSIX -> Text -> MonitoringJobDefinitionSummary)
-> Parser Text
-> Parser (Text -> POSIX -> Text -> MonitoringJobDefinitionSummary)
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
"MonitoringJobDefinitionName")
            Parser (Text -> POSIX -> Text -> MonitoringJobDefinitionSummary)
-> Parser Text
-> Parser (POSIX -> Text -> MonitoringJobDefinitionSummary)
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
"MonitoringJobDefinitionArn")
            Parser (POSIX -> Text -> MonitoringJobDefinitionSummary)
-> Parser POSIX -> Parser (Text -> MonitoringJobDefinitionSummary)
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")
            Parser (Text -> MonitoringJobDefinitionSummary)
-> Parser Text -> Parser MonitoringJobDefinitionSummary
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
"EndpointName")
      )

instance
  Prelude.Hashable
    MonitoringJobDefinitionSummary

instance
  Prelude.NFData
    MonitoringJobDefinitionSummary