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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.RuleEvaluationStatus

-- | Information about the status of the rule evaluation.
--
-- /See:/ 'newProfilerRuleEvaluationStatus' smart constructor.
data ProfilerRuleEvaluationStatus = ProfilerRuleEvaluationStatus'
  { -- | Timestamp when the rule evaluation status was last modified.
    ProfilerRuleEvaluationStatus -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | Details from the rule evaluation.
    ProfilerRuleEvaluationStatus -> Maybe Text
statusDetails :: Prelude.Maybe Prelude.Text,
    -- | Status of the rule evaluation.
    ProfilerRuleEvaluationStatus -> Maybe RuleEvaluationStatus
ruleEvaluationStatus :: Prelude.Maybe RuleEvaluationStatus,
    -- | The Amazon Resource Name (ARN) of the rule evaluation job.
    ProfilerRuleEvaluationStatus -> Maybe Text
ruleEvaluationJobArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the rule configuration.
    ProfilerRuleEvaluationStatus -> Maybe Text
ruleConfigurationName :: Prelude.Maybe Prelude.Text
  }
  deriving (ProfilerRuleEvaluationStatus
-> ProfilerRuleEvaluationStatus -> Bool
(ProfilerRuleEvaluationStatus
 -> ProfilerRuleEvaluationStatus -> Bool)
-> (ProfilerRuleEvaluationStatus
    -> ProfilerRuleEvaluationStatus -> Bool)
-> Eq ProfilerRuleEvaluationStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProfilerRuleEvaluationStatus
-> ProfilerRuleEvaluationStatus -> Bool
$c/= :: ProfilerRuleEvaluationStatus
-> ProfilerRuleEvaluationStatus -> Bool
== :: ProfilerRuleEvaluationStatus
-> ProfilerRuleEvaluationStatus -> Bool
$c== :: ProfilerRuleEvaluationStatus
-> ProfilerRuleEvaluationStatus -> Bool
Prelude.Eq, ReadPrec [ProfilerRuleEvaluationStatus]
ReadPrec ProfilerRuleEvaluationStatus
Int -> ReadS ProfilerRuleEvaluationStatus
ReadS [ProfilerRuleEvaluationStatus]
(Int -> ReadS ProfilerRuleEvaluationStatus)
-> ReadS [ProfilerRuleEvaluationStatus]
-> ReadPrec ProfilerRuleEvaluationStatus
-> ReadPrec [ProfilerRuleEvaluationStatus]
-> Read ProfilerRuleEvaluationStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProfilerRuleEvaluationStatus]
$creadListPrec :: ReadPrec [ProfilerRuleEvaluationStatus]
readPrec :: ReadPrec ProfilerRuleEvaluationStatus
$creadPrec :: ReadPrec ProfilerRuleEvaluationStatus
readList :: ReadS [ProfilerRuleEvaluationStatus]
$creadList :: ReadS [ProfilerRuleEvaluationStatus]
readsPrec :: Int -> ReadS ProfilerRuleEvaluationStatus
$creadsPrec :: Int -> ReadS ProfilerRuleEvaluationStatus
Prelude.Read, Int -> ProfilerRuleEvaluationStatus -> ShowS
[ProfilerRuleEvaluationStatus] -> ShowS
ProfilerRuleEvaluationStatus -> String
(Int -> ProfilerRuleEvaluationStatus -> ShowS)
-> (ProfilerRuleEvaluationStatus -> String)
-> ([ProfilerRuleEvaluationStatus] -> ShowS)
-> Show ProfilerRuleEvaluationStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProfilerRuleEvaluationStatus] -> ShowS
$cshowList :: [ProfilerRuleEvaluationStatus] -> ShowS
show :: ProfilerRuleEvaluationStatus -> String
$cshow :: ProfilerRuleEvaluationStatus -> String
showsPrec :: Int -> ProfilerRuleEvaluationStatus -> ShowS
$cshowsPrec :: Int -> ProfilerRuleEvaluationStatus -> ShowS
Prelude.Show, (forall x.
 ProfilerRuleEvaluationStatus -> Rep ProfilerRuleEvaluationStatus x)
-> (forall x.
    Rep ProfilerRuleEvaluationStatus x -> ProfilerRuleEvaluationStatus)
-> Generic ProfilerRuleEvaluationStatus
forall x.
Rep ProfilerRuleEvaluationStatus x -> ProfilerRuleEvaluationStatus
forall x.
ProfilerRuleEvaluationStatus -> Rep ProfilerRuleEvaluationStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProfilerRuleEvaluationStatus x -> ProfilerRuleEvaluationStatus
$cfrom :: forall x.
ProfilerRuleEvaluationStatus -> Rep ProfilerRuleEvaluationStatus x
Prelude.Generic)

-- |
-- Create a value of 'ProfilerRuleEvaluationStatus' 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:
--
-- 'lastModifiedTime', 'profilerRuleEvaluationStatus_lastModifiedTime' - Timestamp when the rule evaluation status was last modified.
--
-- 'statusDetails', 'profilerRuleEvaluationStatus_statusDetails' - Details from the rule evaluation.
--
-- 'ruleEvaluationStatus', 'profilerRuleEvaluationStatus_ruleEvaluationStatus' - Status of the rule evaluation.
--
-- 'ruleEvaluationJobArn', 'profilerRuleEvaluationStatus_ruleEvaluationJobArn' - The Amazon Resource Name (ARN) of the rule evaluation job.
--
-- 'ruleConfigurationName', 'profilerRuleEvaluationStatus_ruleConfigurationName' - The name of the rule configuration.
newProfilerRuleEvaluationStatus ::
  ProfilerRuleEvaluationStatus
newProfilerRuleEvaluationStatus :: ProfilerRuleEvaluationStatus
newProfilerRuleEvaluationStatus =
  ProfilerRuleEvaluationStatus' :: Maybe POSIX
-> Maybe Text
-> Maybe RuleEvaluationStatus
-> Maybe Text
-> Maybe Text
-> ProfilerRuleEvaluationStatus
ProfilerRuleEvaluationStatus'
    { $sel:lastModifiedTime:ProfilerRuleEvaluationStatus' :: Maybe POSIX
lastModifiedTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:statusDetails:ProfilerRuleEvaluationStatus' :: Maybe Text
statusDetails = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ruleEvaluationStatus:ProfilerRuleEvaluationStatus' :: Maybe RuleEvaluationStatus
ruleEvaluationStatus = Maybe RuleEvaluationStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:ruleEvaluationJobArn:ProfilerRuleEvaluationStatus' :: Maybe Text
ruleEvaluationJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ruleConfigurationName:ProfilerRuleEvaluationStatus' :: Maybe Text
ruleConfigurationName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Timestamp when the rule evaluation status was last modified.
profilerRuleEvaluationStatus_lastModifiedTime :: Lens.Lens' ProfilerRuleEvaluationStatus (Prelude.Maybe Prelude.UTCTime)
profilerRuleEvaluationStatus_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProfilerRuleEvaluationStatus -> f ProfilerRuleEvaluationStatus
profilerRuleEvaluationStatus_lastModifiedTime = (ProfilerRuleEvaluationStatus -> Maybe POSIX)
-> (ProfilerRuleEvaluationStatus
    -> Maybe POSIX -> ProfilerRuleEvaluationStatus)
-> Lens
     ProfilerRuleEvaluationStatus
     ProfilerRuleEvaluationStatus
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleEvaluationStatus' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:ProfilerRuleEvaluationStatus' :: ProfilerRuleEvaluationStatus -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: ProfilerRuleEvaluationStatus
s@ProfilerRuleEvaluationStatus' {} Maybe POSIX
a -> ProfilerRuleEvaluationStatus
s {$sel:lastModifiedTime:ProfilerRuleEvaluationStatus' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: ProfilerRuleEvaluationStatus) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProfilerRuleEvaluationStatus -> f ProfilerRuleEvaluationStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProfilerRuleEvaluationStatus
-> f ProfilerRuleEvaluationStatus
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

-- | Details from the rule evaluation.
profilerRuleEvaluationStatus_statusDetails :: Lens.Lens' ProfilerRuleEvaluationStatus (Prelude.Maybe Prelude.Text)
profilerRuleEvaluationStatus_statusDetails :: (Maybe Text -> f (Maybe Text))
-> ProfilerRuleEvaluationStatus -> f ProfilerRuleEvaluationStatus
profilerRuleEvaluationStatus_statusDetails = (ProfilerRuleEvaluationStatus -> Maybe Text)
-> (ProfilerRuleEvaluationStatus
    -> Maybe Text -> ProfilerRuleEvaluationStatus)
-> Lens
     ProfilerRuleEvaluationStatus
     ProfilerRuleEvaluationStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleEvaluationStatus' {Maybe Text
statusDetails :: Maybe Text
$sel:statusDetails:ProfilerRuleEvaluationStatus' :: ProfilerRuleEvaluationStatus -> Maybe Text
statusDetails} -> Maybe Text
statusDetails) (\s :: ProfilerRuleEvaluationStatus
s@ProfilerRuleEvaluationStatus' {} Maybe Text
a -> ProfilerRuleEvaluationStatus
s {$sel:statusDetails:ProfilerRuleEvaluationStatus' :: Maybe Text
statusDetails = Maybe Text
a} :: ProfilerRuleEvaluationStatus)

-- | Status of the rule evaluation.
profilerRuleEvaluationStatus_ruleEvaluationStatus :: Lens.Lens' ProfilerRuleEvaluationStatus (Prelude.Maybe RuleEvaluationStatus)
profilerRuleEvaluationStatus_ruleEvaluationStatus :: (Maybe RuleEvaluationStatus -> f (Maybe RuleEvaluationStatus))
-> ProfilerRuleEvaluationStatus -> f ProfilerRuleEvaluationStatus
profilerRuleEvaluationStatus_ruleEvaluationStatus = (ProfilerRuleEvaluationStatus -> Maybe RuleEvaluationStatus)
-> (ProfilerRuleEvaluationStatus
    -> Maybe RuleEvaluationStatus -> ProfilerRuleEvaluationStatus)
-> Lens
     ProfilerRuleEvaluationStatus
     ProfilerRuleEvaluationStatus
     (Maybe RuleEvaluationStatus)
     (Maybe RuleEvaluationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleEvaluationStatus' {Maybe RuleEvaluationStatus
ruleEvaluationStatus :: Maybe RuleEvaluationStatus
$sel:ruleEvaluationStatus:ProfilerRuleEvaluationStatus' :: ProfilerRuleEvaluationStatus -> Maybe RuleEvaluationStatus
ruleEvaluationStatus} -> Maybe RuleEvaluationStatus
ruleEvaluationStatus) (\s :: ProfilerRuleEvaluationStatus
s@ProfilerRuleEvaluationStatus' {} Maybe RuleEvaluationStatus
a -> ProfilerRuleEvaluationStatus
s {$sel:ruleEvaluationStatus:ProfilerRuleEvaluationStatus' :: Maybe RuleEvaluationStatus
ruleEvaluationStatus = Maybe RuleEvaluationStatus
a} :: ProfilerRuleEvaluationStatus)

-- | The Amazon Resource Name (ARN) of the rule evaluation job.
profilerRuleEvaluationStatus_ruleEvaluationJobArn :: Lens.Lens' ProfilerRuleEvaluationStatus (Prelude.Maybe Prelude.Text)
profilerRuleEvaluationStatus_ruleEvaluationJobArn :: (Maybe Text -> f (Maybe Text))
-> ProfilerRuleEvaluationStatus -> f ProfilerRuleEvaluationStatus
profilerRuleEvaluationStatus_ruleEvaluationJobArn = (ProfilerRuleEvaluationStatus -> Maybe Text)
-> (ProfilerRuleEvaluationStatus
    -> Maybe Text -> ProfilerRuleEvaluationStatus)
-> Lens
     ProfilerRuleEvaluationStatus
     ProfilerRuleEvaluationStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleEvaluationStatus' {Maybe Text
ruleEvaluationJobArn :: Maybe Text
$sel:ruleEvaluationJobArn:ProfilerRuleEvaluationStatus' :: ProfilerRuleEvaluationStatus -> Maybe Text
ruleEvaluationJobArn} -> Maybe Text
ruleEvaluationJobArn) (\s :: ProfilerRuleEvaluationStatus
s@ProfilerRuleEvaluationStatus' {} Maybe Text
a -> ProfilerRuleEvaluationStatus
s {$sel:ruleEvaluationJobArn:ProfilerRuleEvaluationStatus' :: Maybe Text
ruleEvaluationJobArn = Maybe Text
a} :: ProfilerRuleEvaluationStatus)

-- | The name of the rule configuration.
profilerRuleEvaluationStatus_ruleConfigurationName :: Lens.Lens' ProfilerRuleEvaluationStatus (Prelude.Maybe Prelude.Text)
profilerRuleEvaluationStatus_ruleConfigurationName :: (Maybe Text -> f (Maybe Text))
-> ProfilerRuleEvaluationStatus -> f ProfilerRuleEvaluationStatus
profilerRuleEvaluationStatus_ruleConfigurationName = (ProfilerRuleEvaluationStatus -> Maybe Text)
-> (ProfilerRuleEvaluationStatus
    -> Maybe Text -> ProfilerRuleEvaluationStatus)
-> Lens
     ProfilerRuleEvaluationStatus
     ProfilerRuleEvaluationStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfilerRuleEvaluationStatus' {Maybe Text
ruleConfigurationName :: Maybe Text
$sel:ruleConfigurationName:ProfilerRuleEvaluationStatus' :: ProfilerRuleEvaluationStatus -> Maybe Text
ruleConfigurationName} -> Maybe Text
ruleConfigurationName) (\s :: ProfilerRuleEvaluationStatus
s@ProfilerRuleEvaluationStatus' {} Maybe Text
a -> ProfilerRuleEvaluationStatus
s {$sel:ruleConfigurationName:ProfilerRuleEvaluationStatus' :: Maybe Text
ruleConfigurationName = Maybe Text
a} :: ProfilerRuleEvaluationStatus)

instance Core.FromJSON ProfilerRuleEvaluationStatus where
  parseJSON :: Value -> Parser ProfilerRuleEvaluationStatus
parseJSON =
    String
-> (Object -> Parser ProfilerRuleEvaluationStatus)
-> Value
-> Parser ProfilerRuleEvaluationStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ProfilerRuleEvaluationStatus"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe RuleEvaluationStatus
-> Maybe Text
-> Maybe Text
-> ProfilerRuleEvaluationStatus
ProfilerRuleEvaluationStatus'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe RuleEvaluationStatus
 -> Maybe Text
 -> Maybe Text
 -> ProfilerRuleEvaluationStatus)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe RuleEvaluationStatus
      -> Maybe Text
      -> Maybe Text
      -> ProfilerRuleEvaluationStatus)
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
"LastModifiedTime")
            Parser
  (Maybe Text
   -> Maybe RuleEvaluationStatus
   -> Maybe Text
   -> Maybe Text
   -> ProfilerRuleEvaluationStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe RuleEvaluationStatus
      -> Maybe Text -> Maybe Text -> ProfilerRuleEvaluationStatus)
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
"StatusDetails")
            Parser
  (Maybe RuleEvaluationStatus
   -> Maybe Text -> Maybe Text -> ProfilerRuleEvaluationStatus)
-> Parser (Maybe RuleEvaluationStatus)
-> Parser
     (Maybe Text -> Maybe Text -> ProfilerRuleEvaluationStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RuleEvaluationStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RuleEvaluationStatus")
            Parser (Maybe Text -> Maybe Text -> ProfilerRuleEvaluationStatus)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ProfilerRuleEvaluationStatus)
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
"RuleEvaluationJobArn")
            Parser (Maybe Text -> ProfilerRuleEvaluationStatus)
-> Parser (Maybe Text) -> Parser ProfilerRuleEvaluationStatus
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
"RuleConfigurationName")
      )

instance
  Prelude.Hashable
    ProfilerRuleEvaluationStatus

instance Prelude.NFData ProfilerRuleEvaluationStatus