{-# 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.Config.Types.ConfigurationRecorderStatus
-- 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.Config.Types.ConfigurationRecorderStatus where

import Amazonka.Config.Types.RecorderStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The current status of the configuration recorder.
--
-- /See:/ 'newConfigurationRecorderStatus' smart constructor.
data ConfigurationRecorderStatus = ConfigurationRecorderStatus'
  { -- | The error code indicating that the recording failed.
    ConfigurationRecorderStatus -> Maybe Text
lastErrorCode :: Prelude.Maybe Prelude.Text,
    -- | The time the recorder was last stopped.
    ConfigurationRecorderStatus -> Maybe POSIX
lastStopTime :: Prelude.Maybe Core.POSIX,
    -- | The time when the status was last changed.
    ConfigurationRecorderStatus -> Maybe POSIX
lastStatusChangeTime :: Prelude.Maybe Core.POSIX,
    -- | Specifies whether or not the recorder is currently recording.
    ConfigurationRecorderStatus -> Maybe Bool
recording :: Prelude.Maybe Prelude.Bool,
    -- | The last (previous) status of the recorder.
    ConfigurationRecorderStatus -> Maybe RecorderStatus
lastStatus :: Prelude.Maybe RecorderStatus,
    -- | The message indicating that the recording failed due to an error.
    ConfigurationRecorderStatus -> Maybe Text
lastErrorMessage :: Prelude.Maybe Prelude.Text,
    -- | The name of the configuration recorder.
    ConfigurationRecorderStatus -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The time the recorder was last started.
    ConfigurationRecorderStatus -> Maybe POSIX
lastStartTime :: Prelude.Maybe Core.POSIX
  }
  deriving (ConfigurationRecorderStatus -> ConfigurationRecorderStatus -> Bool
(ConfigurationRecorderStatus
 -> ConfigurationRecorderStatus -> Bool)
-> (ConfigurationRecorderStatus
    -> ConfigurationRecorderStatus -> Bool)
-> Eq ConfigurationRecorderStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigurationRecorderStatus -> ConfigurationRecorderStatus -> Bool
$c/= :: ConfigurationRecorderStatus -> ConfigurationRecorderStatus -> Bool
== :: ConfigurationRecorderStatus -> ConfigurationRecorderStatus -> Bool
$c== :: ConfigurationRecorderStatus -> ConfigurationRecorderStatus -> Bool
Prelude.Eq, ReadPrec [ConfigurationRecorderStatus]
ReadPrec ConfigurationRecorderStatus
Int -> ReadS ConfigurationRecorderStatus
ReadS [ConfigurationRecorderStatus]
(Int -> ReadS ConfigurationRecorderStatus)
-> ReadS [ConfigurationRecorderStatus]
-> ReadPrec ConfigurationRecorderStatus
-> ReadPrec [ConfigurationRecorderStatus]
-> Read ConfigurationRecorderStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigurationRecorderStatus]
$creadListPrec :: ReadPrec [ConfigurationRecorderStatus]
readPrec :: ReadPrec ConfigurationRecorderStatus
$creadPrec :: ReadPrec ConfigurationRecorderStatus
readList :: ReadS [ConfigurationRecorderStatus]
$creadList :: ReadS [ConfigurationRecorderStatus]
readsPrec :: Int -> ReadS ConfigurationRecorderStatus
$creadsPrec :: Int -> ReadS ConfigurationRecorderStatus
Prelude.Read, Int -> ConfigurationRecorderStatus -> ShowS
[ConfigurationRecorderStatus] -> ShowS
ConfigurationRecorderStatus -> String
(Int -> ConfigurationRecorderStatus -> ShowS)
-> (ConfigurationRecorderStatus -> String)
-> ([ConfigurationRecorderStatus] -> ShowS)
-> Show ConfigurationRecorderStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigurationRecorderStatus] -> ShowS
$cshowList :: [ConfigurationRecorderStatus] -> ShowS
show :: ConfigurationRecorderStatus -> String
$cshow :: ConfigurationRecorderStatus -> String
showsPrec :: Int -> ConfigurationRecorderStatus -> ShowS
$cshowsPrec :: Int -> ConfigurationRecorderStatus -> ShowS
Prelude.Show, (forall x.
 ConfigurationRecorderStatus -> Rep ConfigurationRecorderStatus x)
-> (forall x.
    Rep ConfigurationRecorderStatus x -> ConfigurationRecorderStatus)
-> Generic ConfigurationRecorderStatus
forall x.
Rep ConfigurationRecorderStatus x -> ConfigurationRecorderStatus
forall x.
ConfigurationRecorderStatus -> Rep ConfigurationRecorderStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfigurationRecorderStatus x -> ConfigurationRecorderStatus
$cfrom :: forall x.
ConfigurationRecorderStatus -> Rep ConfigurationRecorderStatus x
Prelude.Generic)

-- |
-- Create a value of 'ConfigurationRecorderStatus' 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:
--
-- 'lastErrorCode', 'configurationRecorderStatus_lastErrorCode' - The error code indicating that the recording failed.
--
-- 'lastStopTime', 'configurationRecorderStatus_lastStopTime' - The time the recorder was last stopped.
--
-- 'lastStatusChangeTime', 'configurationRecorderStatus_lastStatusChangeTime' - The time when the status was last changed.
--
-- 'recording', 'configurationRecorderStatus_recording' - Specifies whether or not the recorder is currently recording.
--
-- 'lastStatus', 'configurationRecorderStatus_lastStatus' - The last (previous) status of the recorder.
--
-- 'lastErrorMessage', 'configurationRecorderStatus_lastErrorMessage' - The message indicating that the recording failed due to an error.
--
-- 'name', 'configurationRecorderStatus_name' - The name of the configuration recorder.
--
-- 'lastStartTime', 'configurationRecorderStatus_lastStartTime' - The time the recorder was last started.
newConfigurationRecorderStatus ::
  ConfigurationRecorderStatus
newConfigurationRecorderStatus :: ConfigurationRecorderStatus
newConfigurationRecorderStatus =
  ConfigurationRecorderStatus' :: Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Bool
-> Maybe RecorderStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ConfigurationRecorderStatus
ConfigurationRecorderStatus'
    { $sel:lastErrorCode:ConfigurationRecorderStatus' :: Maybe Text
lastErrorCode =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastStopTime:ConfigurationRecorderStatus' :: Maybe POSIX
lastStopTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastStatusChangeTime:ConfigurationRecorderStatus' :: Maybe POSIX
lastStatusChangeTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:recording:ConfigurationRecorderStatus' :: Maybe Bool
recording = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:lastStatus:ConfigurationRecorderStatus' :: Maybe RecorderStatus
lastStatus = Maybe RecorderStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:lastErrorMessage:ConfigurationRecorderStatus' :: Maybe Text
lastErrorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ConfigurationRecorderStatus' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastStartTime:ConfigurationRecorderStatus' :: Maybe POSIX
lastStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The error code indicating that the recording failed.
configurationRecorderStatus_lastErrorCode :: Lens.Lens' ConfigurationRecorderStatus (Prelude.Maybe Prelude.Text)
configurationRecorderStatus_lastErrorCode :: (Maybe Text -> f (Maybe Text))
-> ConfigurationRecorderStatus -> f ConfigurationRecorderStatus
configurationRecorderStatus_lastErrorCode = (ConfigurationRecorderStatus -> Maybe Text)
-> (ConfigurationRecorderStatus
    -> Maybe Text -> ConfigurationRecorderStatus)
-> Lens
     ConfigurationRecorderStatus
     ConfigurationRecorderStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationRecorderStatus' {Maybe Text
lastErrorCode :: Maybe Text
$sel:lastErrorCode:ConfigurationRecorderStatus' :: ConfigurationRecorderStatus -> Maybe Text
lastErrorCode} -> Maybe Text
lastErrorCode) (\s :: ConfigurationRecorderStatus
s@ConfigurationRecorderStatus' {} Maybe Text
a -> ConfigurationRecorderStatus
s {$sel:lastErrorCode:ConfigurationRecorderStatus' :: Maybe Text
lastErrorCode = Maybe Text
a} :: ConfigurationRecorderStatus)

-- | The time the recorder was last stopped.
configurationRecorderStatus_lastStopTime :: Lens.Lens' ConfigurationRecorderStatus (Prelude.Maybe Prelude.UTCTime)
configurationRecorderStatus_lastStopTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationRecorderStatus -> f ConfigurationRecorderStatus
configurationRecorderStatus_lastStopTime = (ConfigurationRecorderStatus -> Maybe POSIX)
-> (ConfigurationRecorderStatus
    -> Maybe POSIX -> ConfigurationRecorderStatus)
-> Lens
     ConfigurationRecorderStatus
     ConfigurationRecorderStatus
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationRecorderStatus' {Maybe POSIX
lastStopTime :: Maybe POSIX
$sel:lastStopTime:ConfigurationRecorderStatus' :: ConfigurationRecorderStatus -> Maybe POSIX
lastStopTime} -> Maybe POSIX
lastStopTime) (\s :: ConfigurationRecorderStatus
s@ConfigurationRecorderStatus' {} Maybe POSIX
a -> ConfigurationRecorderStatus
s {$sel:lastStopTime:ConfigurationRecorderStatus' :: Maybe POSIX
lastStopTime = Maybe POSIX
a} :: ConfigurationRecorderStatus) ((Maybe POSIX -> f (Maybe POSIX))
 -> ConfigurationRecorderStatus -> f ConfigurationRecorderStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationRecorderStatus
-> f ConfigurationRecorderStatus
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 time when the status was last changed.
configurationRecorderStatus_lastStatusChangeTime :: Lens.Lens' ConfigurationRecorderStatus (Prelude.Maybe Prelude.UTCTime)
configurationRecorderStatus_lastStatusChangeTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationRecorderStatus -> f ConfigurationRecorderStatus
configurationRecorderStatus_lastStatusChangeTime = (ConfigurationRecorderStatus -> Maybe POSIX)
-> (ConfigurationRecorderStatus
    -> Maybe POSIX -> ConfigurationRecorderStatus)
-> Lens
     ConfigurationRecorderStatus
     ConfigurationRecorderStatus
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationRecorderStatus' {Maybe POSIX
lastStatusChangeTime :: Maybe POSIX
$sel:lastStatusChangeTime:ConfigurationRecorderStatus' :: ConfigurationRecorderStatus -> Maybe POSIX
lastStatusChangeTime} -> Maybe POSIX
lastStatusChangeTime) (\s :: ConfigurationRecorderStatus
s@ConfigurationRecorderStatus' {} Maybe POSIX
a -> ConfigurationRecorderStatus
s {$sel:lastStatusChangeTime:ConfigurationRecorderStatus' :: Maybe POSIX
lastStatusChangeTime = Maybe POSIX
a} :: ConfigurationRecorderStatus) ((Maybe POSIX -> f (Maybe POSIX))
 -> ConfigurationRecorderStatus -> f ConfigurationRecorderStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationRecorderStatus
-> f ConfigurationRecorderStatus
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 whether or not the recorder is currently recording.
configurationRecorderStatus_recording :: Lens.Lens' ConfigurationRecorderStatus (Prelude.Maybe Prelude.Bool)
configurationRecorderStatus_recording :: (Maybe Bool -> f (Maybe Bool))
-> ConfigurationRecorderStatus -> f ConfigurationRecorderStatus
configurationRecorderStatus_recording = (ConfigurationRecorderStatus -> Maybe Bool)
-> (ConfigurationRecorderStatus
    -> Maybe Bool -> ConfigurationRecorderStatus)
-> Lens
     ConfigurationRecorderStatus
     ConfigurationRecorderStatus
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationRecorderStatus' {Maybe Bool
recording :: Maybe Bool
$sel:recording:ConfigurationRecorderStatus' :: ConfigurationRecorderStatus -> Maybe Bool
recording} -> Maybe Bool
recording) (\s :: ConfigurationRecorderStatus
s@ConfigurationRecorderStatus' {} Maybe Bool
a -> ConfigurationRecorderStatus
s {$sel:recording:ConfigurationRecorderStatus' :: Maybe Bool
recording = Maybe Bool
a} :: ConfigurationRecorderStatus)

-- | The last (previous) status of the recorder.
configurationRecorderStatus_lastStatus :: Lens.Lens' ConfigurationRecorderStatus (Prelude.Maybe RecorderStatus)
configurationRecorderStatus_lastStatus :: (Maybe RecorderStatus -> f (Maybe RecorderStatus))
-> ConfigurationRecorderStatus -> f ConfigurationRecorderStatus
configurationRecorderStatus_lastStatus = (ConfigurationRecorderStatus -> Maybe RecorderStatus)
-> (ConfigurationRecorderStatus
    -> Maybe RecorderStatus -> ConfigurationRecorderStatus)
-> Lens
     ConfigurationRecorderStatus
     ConfigurationRecorderStatus
     (Maybe RecorderStatus)
     (Maybe RecorderStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationRecorderStatus' {Maybe RecorderStatus
lastStatus :: Maybe RecorderStatus
$sel:lastStatus:ConfigurationRecorderStatus' :: ConfigurationRecorderStatus -> Maybe RecorderStatus
lastStatus} -> Maybe RecorderStatus
lastStatus) (\s :: ConfigurationRecorderStatus
s@ConfigurationRecorderStatus' {} Maybe RecorderStatus
a -> ConfigurationRecorderStatus
s {$sel:lastStatus:ConfigurationRecorderStatus' :: Maybe RecorderStatus
lastStatus = Maybe RecorderStatus
a} :: ConfigurationRecorderStatus)

-- | The message indicating that the recording failed due to an error.
configurationRecorderStatus_lastErrorMessage :: Lens.Lens' ConfigurationRecorderStatus (Prelude.Maybe Prelude.Text)
configurationRecorderStatus_lastErrorMessage :: (Maybe Text -> f (Maybe Text))
-> ConfigurationRecorderStatus -> f ConfigurationRecorderStatus
configurationRecorderStatus_lastErrorMessage = (ConfigurationRecorderStatus -> Maybe Text)
-> (ConfigurationRecorderStatus
    -> Maybe Text -> ConfigurationRecorderStatus)
-> Lens
     ConfigurationRecorderStatus
     ConfigurationRecorderStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationRecorderStatus' {Maybe Text
lastErrorMessage :: Maybe Text
$sel:lastErrorMessage:ConfigurationRecorderStatus' :: ConfigurationRecorderStatus -> Maybe Text
lastErrorMessage} -> Maybe Text
lastErrorMessage) (\s :: ConfigurationRecorderStatus
s@ConfigurationRecorderStatus' {} Maybe Text
a -> ConfigurationRecorderStatus
s {$sel:lastErrorMessage:ConfigurationRecorderStatus' :: Maybe Text
lastErrorMessage = Maybe Text
a} :: ConfigurationRecorderStatus)

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

-- | The time the recorder was last started.
configurationRecorderStatus_lastStartTime :: Lens.Lens' ConfigurationRecorderStatus (Prelude.Maybe Prelude.UTCTime)
configurationRecorderStatus_lastStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationRecorderStatus -> f ConfigurationRecorderStatus
configurationRecorderStatus_lastStartTime = (ConfigurationRecorderStatus -> Maybe POSIX)
-> (ConfigurationRecorderStatus
    -> Maybe POSIX -> ConfigurationRecorderStatus)
-> Lens
     ConfigurationRecorderStatus
     ConfigurationRecorderStatus
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationRecorderStatus' {Maybe POSIX
lastStartTime :: Maybe POSIX
$sel:lastStartTime:ConfigurationRecorderStatus' :: ConfigurationRecorderStatus -> Maybe POSIX
lastStartTime} -> Maybe POSIX
lastStartTime) (\s :: ConfigurationRecorderStatus
s@ConfigurationRecorderStatus' {} Maybe POSIX
a -> ConfigurationRecorderStatus
s {$sel:lastStartTime:ConfigurationRecorderStatus' :: Maybe POSIX
lastStartTime = Maybe POSIX
a} :: ConfigurationRecorderStatus) ((Maybe POSIX -> f (Maybe POSIX))
 -> ConfigurationRecorderStatus -> f ConfigurationRecorderStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationRecorderStatus
-> f ConfigurationRecorderStatus
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

instance Core.FromJSON ConfigurationRecorderStatus where
  parseJSON :: Value -> Parser ConfigurationRecorderStatus
parseJSON =
    String
-> (Object -> Parser ConfigurationRecorderStatus)
-> Value
-> Parser ConfigurationRecorderStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ConfigurationRecorderStatus"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Bool
-> Maybe RecorderStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ConfigurationRecorderStatus
ConfigurationRecorderStatus'
            (Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Bool
 -> Maybe RecorderStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> ConfigurationRecorderStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe RecorderStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> ConfigurationRecorderStatus)
forall (f :: * -> *) a b. Functor 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
"lastErrorCode")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe RecorderStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> ConfigurationRecorderStatus)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Bool
      -> Maybe RecorderStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> ConfigurationRecorderStatus)
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
"lastStopTime")
            Parser
  (Maybe POSIX
   -> Maybe Bool
   -> Maybe RecorderStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> ConfigurationRecorderStatus)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Bool
      -> Maybe RecorderStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> ConfigurationRecorderStatus)
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
"lastStatusChangeTime")
            Parser
  (Maybe Bool
   -> Maybe RecorderStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> ConfigurationRecorderStatus)
-> Parser (Maybe Bool)
-> Parser
     (Maybe RecorderStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> ConfigurationRecorderStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"recording")
            Parser
  (Maybe RecorderStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> ConfigurationRecorderStatus)
-> Parser (Maybe RecorderStatus)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe POSIX -> ConfigurationRecorderStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RecorderStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastStatus")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe POSIX -> ConfigurationRecorderStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe POSIX -> ConfigurationRecorderStatus)
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
"lastErrorMessage")
            Parser (Maybe Text -> Maybe POSIX -> ConfigurationRecorderStatus)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> ConfigurationRecorderStatus)
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
"name")
            Parser (Maybe POSIX -> ConfigurationRecorderStatus)
-> Parser (Maybe POSIX) -> Parser ConfigurationRecorderStatus
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
"lastStartTime")
      )

instance Prelude.Hashable ConfigurationRecorderStatus

instance Prelude.NFData ConfigurationRecorderStatus