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

import Amazonka.Config.Types.ConfigurationItemStatus
import Amazonka.Config.Types.Relationship
import Amazonka.Config.Types.ResourceType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A list that contains detailed configurations of a specified resource.
--
-- /See:/ 'newConfigurationItem' smart constructor.
data ConfigurationItem = ConfigurationItem'
  { -- | The ID of the resource (for example, @sg-xxxxxx@).
    ConfigurationItem -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | The type of Amazon Web Services resource.
    ConfigurationItem -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | An identifier that indicates the ordering of the configuration items of
    -- a resource.
    ConfigurationItem -> Maybe Text
configurationStateId :: Prelude.Maybe Prelude.Text,
    -- | Amazon Resource Name (ARN) associated with the resource.
    ConfigurationItem -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The custom name of the resource, if available.
    ConfigurationItem -> Maybe Text
resourceName :: Prelude.Maybe Prelude.Text,
    -- | The time stamp when the resource was created.
    ConfigurationItem -> Maybe POSIX
resourceCreationTime :: Prelude.Maybe Core.POSIX,
    -- | The configuration item status. The valid values are:
    --
    -- -   OK – The resource configuration has been updated
    --
    -- -   ResourceDiscovered – The resource was newly discovered
    --
    -- -   ResourceNotRecorded – The resource was discovered but its
    --     configuration was not recorded since the recorder excludes the
    --     recording of resources of this type
    --
    -- -   ResourceDeleted – The resource was deleted
    --
    -- -   ResourceDeletedNotRecorded – The resource was deleted but its
    --     configuration was not recorded since the recorder excludes the
    --     recording of resources of this type
    --
    -- The CIs do not incur any cost.
    ConfigurationItem -> Maybe ConfigurationItemStatus
configurationItemStatus :: Prelude.Maybe ConfigurationItemStatus,
    -- | The time when the configuration recording was initiated.
    ConfigurationItem -> Maybe POSIX
configurationItemCaptureTime :: Prelude.Maybe Core.POSIX,
    -- | The 12-digit Amazon Web Services account ID associated with the
    -- resource.
    ConfigurationItem -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | Configuration attributes that Config returns for certain resource types
    -- to supplement the information returned for the @configuration@
    -- parameter.
    ConfigurationItem -> Maybe (HashMap Text Text)
supplementaryConfiguration :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Availability Zone associated with the resource.
    ConfigurationItem -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | A list of related Amazon Web Services resources.
    ConfigurationItem -> Maybe [Relationship]
relationships :: Prelude.Maybe [Relationship],
    -- | The version number of the resource configuration.
    ConfigurationItem -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The region where the resource resides.
    ConfigurationItem -> Maybe Text
awsRegion :: Prelude.Maybe Prelude.Text,
    -- | A list of CloudTrail event IDs.
    --
    -- A populated field indicates that the current configuration was initiated
    -- by the events recorded in the CloudTrail log. For more information about
    -- CloudTrail, see
    -- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html What Is CloudTrail>.
    --
    -- An empty field indicates that the current configuration was not
    -- initiated by any event. As of Version 1.3, the relatedEvents field is
    -- empty. You can access the
    -- <https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_LookupEvents.html LookupEvents API>
    -- in the /CloudTrail API Reference/ to retrieve the events for the
    -- resource.
    ConfigurationItem -> Maybe [Text]
relatedEvents :: Prelude.Maybe [Prelude.Text],
    -- | The description of the resource configuration.
    ConfigurationItem -> Maybe Text
configuration :: Prelude.Maybe Prelude.Text,
    -- | Unique MD5 hash that represents the configuration item\'s state.
    --
    -- You can use MD5 hash to compare the states of two or more configuration
    -- items that are associated with the same resource.
    ConfigurationItem -> Maybe Text
configurationItemMD5Hash :: Prelude.Maybe Prelude.Text,
    -- | A mapping of key value tags associated with the resource.
    ConfigurationItem -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (ConfigurationItem -> ConfigurationItem -> Bool
(ConfigurationItem -> ConfigurationItem -> Bool)
-> (ConfigurationItem -> ConfigurationItem -> Bool)
-> Eq ConfigurationItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigurationItem -> ConfigurationItem -> Bool
$c/= :: ConfigurationItem -> ConfigurationItem -> Bool
== :: ConfigurationItem -> ConfigurationItem -> Bool
$c== :: ConfigurationItem -> ConfigurationItem -> Bool
Prelude.Eq, ReadPrec [ConfigurationItem]
ReadPrec ConfigurationItem
Int -> ReadS ConfigurationItem
ReadS [ConfigurationItem]
(Int -> ReadS ConfigurationItem)
-> ReadS [ConfigurationItem]
-> ReadPrec ConfigurationItem
-> ReadPrec [ConfigurationItem]
-> Read ConfigurationItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigurationItem]
$creadListPrec :: ReadPrec [ConfigurationItem]
readPrec :: ReadPrec ConfigurationItem
$creadPrec :: ReadPrec ConfigurationItem
readList :: ReadS [ConfigurationItem]
$creadList :: ReadS [ConfigurationItem]
readsPrec :: Int -> ReadS ConfigurationItem
$creadsPrec :: Int -> ReadS ConfigurationItem
Prelude.Read, Int -> ConfigurationItem -> ShowS
[ConfigurationItem] -> ShowS
ConfigurationItem -> String
(Int -> ConfigurationItem -> ShowS)
-> (ConfigurationItem -> String)
-> ([ConfigurationItem] -> ShowS)
-> Show ConfigurationItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigurationItem] -> ShowS
$cshowList :: [ConfigurationItem] -> ShowS
show :: ConfigurationItem -> String
$cshow :: ConfigurationItem -> String
showsPrec :: Int -> ConfigurationItem -> ShowS
$cshowsPrec :: Int -> ConfigurationItem -> ShowS
Prelude.Show, (forall x. ConfigurationItem -> Rep ConfigurationItem x)
-> (forall x. Rep ConfigurationItem x -> ConfigurationItem)
-> Generic ConfigurationItem
forall x. Rep ConfigurationItem x -> ConfigurationItem
forall x. ConfigurationItem -> Rep ConfigurationItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfigurationItem x -> ConfigurationItem
$cfrom :: forall x. ConfigurationItem -> Rep ConfigurationItem x
Prelude.Generic)

-- |
-- Create a value of 'ConfigurationItem' 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:
--
-- 'resourceId', 'configurationItem_resourceId' - The ID of the resource (for example, @sg-xxxxxx@).
--
-- 'resourceType', 'configurationItem_resourceType' - The type of Amazon Web Services resource.
--
-- 'configurationStateId', 'configurationItem_configurationStateId' - An identifier that indicates the ordering of the configuration items of
-- a resource.
--
-- 'arn', 'configurationItem_arn' - Amazon Resource Name (ARN) associated with the resource.
--
-- 'resourceName', 'configurationItem_resourceName' - The custom name of the resource, if available.
--
-- 'resourceCreationTime', 'configurationItem_resourceCreationTime' - The time stamp when the resource was created.
--
-- 'configurationItemStatus', 'configurationItem_configurationItemStatus' - The configuration item status. The valid values are:
--
-- -   OK – The resource configuration has been updated
--
-- -   ResourceDiscovered – The resource was newly discovered
--
-- -   ResourceNotRecorded – The resource was discovered but its
--     configuration was not recorded since the recorder excludes the
--     recording of resources of this type
--
-- -   ResourceDeleted – The resource was deleted
--
-- -   ResourceDeletedNotRecorded – The resource was deleted but its
--     configuration was not recorded since the recorder excludes the
--     recording of resources of this type
--
-- The CIs do not incur any cost.
--
-- 'configurationItemCaptureTime', 'configurationItem_configurationItemCaptureTime' - The time when the configuration recording was initiated.
--
-- 'accountId', 'configurationItem_accountId' - The 12-digit Amazon Web Services account ID associated with the
-- resource.
--
-- 'supplementaryConfiguration', 'configurationItem_supplementaryConfiguration' - Configuration attributes that Config returns for certain resource types
-- to supplement the information returned for the @configuration@
-- parameter.
--
-- 'availabilityZone', 'configurationItem_availabilityZone' - The Availability Zone associated with the resource.
--
-- 'relationships', 'configurationItem_relationships' - A list of related Amazon Web Services resources.
--
-- 'version', 'configurationItem_version' - The version number of the resource configuration.
--
-- 'awsRegion', 'configurationItem_awsRegion' - The region where the resource resides.
--
-- 'relatedEvents', 'configurationItem_relatedEvents' - A list of CloudTrail event IDs.
--
-- A populated field indicates that the current configuration was initiated
-- by the events recorded in the CloudTrail log. For more information about
-- CloudTrail, see
-- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html What Is CloudTrail>.
--
-- An empty field indicates that the current configuration was not
-- initiated by any event. As of Version 1.3, the relatedEvents field is
-- empty. You can access the
-- <https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_LookupEvents.html LookupEvents API>
-- in the /CloudTrail API Reference/ to retrieve the events for the
-- resource.
--
-- 'configuration', 'configurationItem_configuration' - The description of the resource configuration.
--
-- 'configurationItemMD5Hash', 'configurationItem_configurationItemMD5Hash' - Unique MD5 hash that represents the configuration item\'s state.
--
-- You can use MD5 hash to compare the states of two or more configuration
-- items that are associated with the same resource.
--
-- 'tags', 'configurationItem_tags' - A mapping of key value tags associated with the resource.
newConfigurationItem ::
  ConfigurationItem
newConfigurationItem :: ConfigurationItem
newConfigurationItem =
  ConfigurationItem' :: Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ConfigurationItemStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe [Relationship]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ConfigurationItem
ConfigurationItem'
    { $sel:resourceId:ConfigurationItem' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:ConfigurationItem' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationStateId:ConfigurationItem' :: Maybe Text
configurationStateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ConfigurationItem' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceName:ConfigurationItem' :: Maybe Text
resourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceCreationTime:ConfigurationItem' :: Maybe POSIX
resourceCreationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationItemStatus:ConfigurationItem' :: Maybe ConfigurationItemStatus
configurationItemStatus = Maybe ConfigurationItemStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationItemCaptureTime:ConfigurationItem' :: Maybe POSIX
configurationItemCaptureTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:ConfigurationItem' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:supplementaryConfiguration:ConfigurationItem' :: Maybe (HashMap Text Text)
supplementaryConfiguration = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZone:ConfigurationItem' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:relationships:ConfigurationItem' :: Maybe [Relationship]
relationships = Maybe [Relationship]
forall a. Maybe a
Prelude.Nothing,
      $sel:version:ConfigurationItem' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:awsRegion:ConfigurationItem' :: Maybe Text
awsRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:relatedEvents:ConfigurationItem' :: Maybe [Text]
relatedEvents = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:configuration:ConfigurationItem' :: Maybe Text
configuration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationItemMD5Hash:ConfigurationItem' :: Maybe Text
configurationItemMD5Hash = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ConfigurationItem' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the resource (for example, @sg-xxxxxx@).
configurationItem_resourceId :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.Text)
configurationItem_resourceId :: (Maybe Text -> f (Maybe Text))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_resourceId = (ConfigurationItem -> Maybe Text)
-> (ConfigurationItem -> Maybe Text -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:ConfigurationItem' :: ConfigurationItem -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe Text
a -> ConfigurationItem
s {$sel:resourceId:ConfigurationItem' :: Maybe Text
resourceId = Maybe Text
a} :: ConfigurationItem)

-- | The type of Amazon Web Services resource.
configurationItem_resourceType :: Lens.Lens' ConfigurationItem (Prelude.Maybe ResourceType)
configurationItem_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_resourceType = (ConfigurationItem -> Maybe ResourceType)
-> (ConfigurationItem -> Maybe ResourceType -> ConfigurationItem)
-> Lens
     ConfigurationItem
     ConfigurationItem
     (Maybe ResourceType)
     (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:ConfigurationItem' :: ConfigurationItem -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe ResourceType
a -> ConfigurationItem
s {$sel:resourceType:ConfigurationItem' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: ConfigurationItem)

-- | An identifier that indicates the ordering of the configuration items of
-- a resource.
configurationItem_configurationStateId :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.Text)
configurationItem_configurationStateId :: (Maybe Text -> f (Maybe Text))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_configurationStateId = (ConfigurationItem -> Maybe Text)
-> (ConfigurationItem -> Maybe Text -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe Text
configurationStateId :: Maybe Text
$sel:configurationStateId:ConfigurationItem' :: ConfigurationItem -> Maybe Text
configurationStateId} -> Maybe Text
configurationStateId) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe Text
a -> ConfigurationItem
s {$sel:configurationStateId:ConfigurationItem' :: Maybe Text
configurationStateId = Maybe Text
a} :: ConfigurationItem)

-- | Amazon Resource Name (ARN) associated with the resource.
configurationItem_arn :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.Text)
configurationItem_arn :: (Maybe Text -> f (Maybe Text))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_arn = (ConfigurationItem -> Maybe Text)
-> (ConfigurationItem -> Maybe Text -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe Text
arn :: Maybe Text
$sel:arn:ConfigurationItem' :: ConfigurationItem -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe Text
a -> ConfigurationItem
s {$sel:arn:ConfigurationItem' :: Maybe Text
arn = Maybe Text
a} :: ConfigurationItem)

-- | The custom name of the resource, if available.
configurationItem_resourceName :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.Text)
configurationItem_resourceName :: (Maybe Text -> f (Maybe Text))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_resourceName = (ConfigurationItem -> Maybe Text)
-> (ConfigurationItem -> Maybe Text -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe Text
resourceName :: Maybe Text
$sel:resourceName:ConfigurationItem' :: ConfigurationItem -> Maybe Text
resourceName} -> Maybe Text
resourceName) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe Text
a -> ConfigurationItem
s {$sel:resourceName:ConfigurationItem' :: Maybe Text
resourceName = Maybe Text
a} :: ConfigurationItem)

-- | The time stamp when the resource was created.
configurationItem_resourceCreationTime :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.UTCTime)
configurationItem_resourceCreationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_resourceCreationTime = (ConfigurationItem -> Maybe POSIX)
-> (ConfigurationItem -> Maybe POSIX -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe POSIX
resourceCreationTime :: Maybe POSIX
$sel:resourceCreationTime:ConfigurationItem' :: ConfigurationItem -> Maybe POSIX
resourceCreationTime} -> Maybe POSIX
resourceCreationTime) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe POSIX
a -> ConfigurationItem
s {$sel:resourceCreationTime:ConfigurationItem' :: Maybe POSIX
resourceCreationTime = Maybe POSIX
a} :: ConfigurationItem) ((Maybe POSIX -> f (Maybe POSIX))
 -> ConfigurationItem -> f ConfigurationItem)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationItem
-> f ConfigurationItem
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 configuration item status. The valid values are:
--
-- -   OK – The resource configuration has been updated
--
-- -   ResourceDiscovered – The resource was newly discovered
--
-- -   ResourceNotRecorded – The resource was discovered but its
--     configuration was not recorded since the recorder excludes the
--     recording of resources of this type
--
-- -   ResourceDeleted – The resource was deleted
--
-- -   ResourceDeletedNotRecorded – The resource was deleted but its
--     configuration was not recorded since the recorder excludes the
--     recording of resources of this type
--
-- The CIs do not incur any cost.
configurationItem_configurationItemStatus :: Lens.Lens' ConfigurationItem (Prelude.Maybe ConfigurationItemStatus)
configurationItem_configurationItemStatus :: (Maybe ConfigurationItemStatus
 -> f (Maybe ConfigurationItemStatus))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_configurationItemStatus = (ConfigurationItem -> Maybe ConfigurationItemStatus)
-> (ConfigurationItem
    -> Maybe ConfigurationItemStatus -> ConfigurationItem)
-> Lens
     ConfigurationItem
     ConfigurationItem
     (Maybe ConfigurationItemStatus)
     (Maybe ConfigurationItemStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe ConfigurationItemStatus
configurationItemStatus :: Maybe ConfigurationItemStatus
$sel:configurationItemStatus:ConfigurationItem' :: ConfigurationItem -> Maybe ConfigurationItemStatus
configurationItemStatus} -> Maybe ConfigurationItemStatus
configurationItemStatus) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe ConfigurationItemStatus
a -> ConfigurationItem
s {$sel:configurationItemStatus:ConfigurationItem' :: Maybe ConfigurationItemStatus
configurationItemStatus = Maybe ConfigurationItemStatus
a} :: ConfigurationItem)

-- | The time when the configuration recording was initiated.
configurationItem_configurationItemCaptureTime :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.UTCTime)
configurationItem_configurationItemCaptureTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_configurationItemCaptureTime = (ConfigurationItem -> Maybe POSIX)
-> (ConfigurationItem -> Maybe POSIX -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe POSIX
configurationItemCaptureTime :: Maybe POSIX
$sel:configurationItemCaptureTime:ConfigurationItem' :: ConfigurationItem -> Maybe POSIX
configurationItemCaptureTime} -> Maybe POSIX
configurationItemCaptureTime) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe POSIX
a -> ConfigurationItem
s {$sel:configurationItemCaptureTime:ConfigurationItem' :: Maybe POSIX
configurationItemCaptureTime = Maybe POSIX
a} :: ConfigurationItem) ((Maybe POSIX -> f (Maybe POSIX))
 -> ConfigurationItem -> f ConfigurationItem)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationItem
-> f ConfigurationItem
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 12-digit Amazon Web Services account ID associated with the
-- resource.
configurationItem_accountId :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.Text)
configurationItem_accountId :: (Maybe Text -> f (Maybe Text))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_accountId = (ConfigurationItem -> Maybe Text)
-> (ConfigurationItem -> Maybe Text -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe Text
accountId :: Maybe Text
$sel:accountId:ConfigurationItem' :: ConfigurationItem -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe Text
a -> ConfigurationItem
s {$sel:accountId:ConfigurationItem' :: Maybe Text
accountId = Maybe Text
a} :: ConfigurationItem)

-- | Configuration attributes that Config returns for certain resource types
-- to supplement the information returned for the @configuration@
-- parameter.
configurationItem_supplementaryConfiguration :: Lens.Lens' ConfigurationItem (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
configurationItem_supplementaryConfiguration :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_supplementaryConfiguration = (ConfigurationItem -> Maybe (HashMap Text Text))
-> (ConfigurationItem
    -> Maybe (HashMap Text Text) -> ConfigurationItem)
-> Lens
     ConfigurationItem
     ConfigurationItem
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe (HashMap Text Text)
supplementaryConfiguration :: Maybe (HashMap Text Text)
$sel:supplementaryConfiguration:ConfigurationItem' :: ConfigurationItem -> Maybe (HashMap Text Text)
supplementaryConfiguration} -> Maybe (HashMap Text Text)
supplementaryConfiguration) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe (HashMap Text Text)
a -> ConfigurationItem
s {$sel:supplementaryConfiguration:ConfigurationItem' :: Maybe (HashMap Text Text)
supplementaryConfiguration = Maybe (HashMap Text Text)
a} :: ConfigurationItem) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ConfigurationItem -> f ConfigurationItem)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ConfigurationItem
-> f ConfigurationItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Availability Zone associated with the resource.
configurationItem_availabilityZone :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.Text)
configurationItem_availabilityZone :: (Maybe Text -> f (Maybe Text))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_availabilityZone = (ConfigurationItem -> Maybe Text)
-> (ConfigurationItem -> Maybe Text -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:ConfigurationItem' :: ConfigurationItem -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe Text
a -> ConfigurationItem
s {$sel:availabilityZone:ConfigurationItem' :: Maybe Text
availabilityZone = Maybe Text
a} :: ConfigurationItem)

-- | A list of related Amazon Web Services resources.
configurationItem_relationships :: Lens.Lens' ConfigurationItem (Prelude.Maybe [Relationship])
configurationItem_relationships :: (Maybe [Relationship] -> f (Maybe [Relationship]))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_relationships = (ConfigurationItem -> Maybe [Relationship])
-> (ConfigurationItem -> Maybe [Relationship] -> ConfigurationItem)
-> Lens
     ConfigurationItem
     ConfigurationItem
     (Maybe [Relationship])
     (Maybe [Relationship])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe [Relationship]
relationships :: Maybe [Relationship]
$sel:relationships:ConfigurationItem' :: ConfigurationItem -> Maybe [Relationship]
relationships} -> Maybe [Relationship]
relationships) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe [Relationship]
a -> ConfigurationItem
s {$sel:relationships:ConfigurationItem' :: Maybe [Relationship]
relationships = Maybe [Relationship]
a} :: ConfigurationItem) ((Maybe [Relationship] -> f (Maybe [Relationship]))
 -> ConfigurationItem -> f ConfigurationItem)
-> ((Maybe [Relationship] -> f (Maybe [Relationship]))
    -> Maybe [Relationship] -> f (Maybe [Relationship]))
-> (Maybe [Relationship] -> f (Maybe [Relationship]))
-> ConfigurationItem
-> f ConfigurationItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Relationship] [Relationship] [Relationship] [Relationship]
-> Iso
     (Maybe [Relationship])
     (Maybe [Relationship])
     (Maybe [Relationship])
     (Maybe [Relationship])
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 [Relationship] [Relationship] [Relationship] [Relationship]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The version number of the resource configuration.
configurationItem_version :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.Text)
configurationItem_version :: (Maybe Text -> f (Maybe Text))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_version = (ConfigurationItem -> Maybe Text)
-> (ConfigurationItem -> Maybe Text -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe Text
version :: Maybe Text
$sel:version:ConfigurationItem' :: ConfigurationItem -> Maybe Text
version} -> Maybe Text
version) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe Text
a -> ConfigurationItem
s {$sel:version:ConfigurationItem' :: Maybe Text
version = Maybe Text
a} :: ConfigurationItem)

-- | The region where the resource resides.
configurationItem_awsRegion :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.Text)
configurationItem_awsRegion :: (Maybe Text -> f (Maybe Text))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_awsRegion = (ConfigurationItem -> Maybe Text)
-> (ConfigurationItem -> Maybe Text -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe Text
awsRegion :: Maybe Text
$sel:awsRegion:ConfigurationItem' :: ConfigurationItem -> Maybe Text
awsRegion} -> Maybe Text
awsRegion) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe Text
a -> ConfigurationItem
s {$sel:awsRegion:ConfigurationItem' :: Maybe Text
awsRegion = Maybe Text
a} :: ConfigurationItem)

-- | A list of CloudTrail event IDs.
--
-- A populated field indicates that the current configuration was initiated
-- by the events recorded in the CloudTrail log. For more information about
-- CloudTrail, see
-- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html What Is CloudTrail>.
--
-- An empty field indicates that the current configuration was not
-- initiated by any event. As of Version 1.3, the relatedEvents field is
-- empty. You can access the
-- <https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_LookupEvents.html LookupEvents API>
-- in the /CloudTrail API Reference/ to retrieve the events for the
-- resource.
configurationItem_relatedEvents :: Lens.Lens' ConfigurationItem (Prelude.Maybe [Prelude.Text])
configurationItem_relatedEvents :: (Maybe [Text] -> f (Maybe [Text]))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_relatedEvents = (ConfigurationItem -> Maybe [Text])
-> (ConfigurationItem -> Maybe [Text] -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe [Text]
relatedEvents :: Maybe [Text]
$sel:relatedEvents:ConfigurationItem' :: ConfigurationItem -> Maybe [Text]
relatedEvents} -> Maybe [Text]
relatedEvents) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe [Text]
a -> ConfigurationItem
s {$sel:relatedEvents:ConfigurationItem' :: Maybe [Text]
relatedEvents = Maybe [Text]
a} :: ConfigurationItem) ((Maybe [Text] -> f (Maybe [Text]))
 -> ConfigurationItem -> f ConfigurationItem)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ConfigurationItem
-> f ConfigurationItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The description of the resource configuration.
configurationItem_configuration :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.Text)
configurationItem_configuration :: (Maybe Text -> f (Maybe Text))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_configuration = (ConfigurationItem -> Maybe Text)
-> (ConfigurationItem -> Maybe Text -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe Text
configuration :: Maybe Text
$sel:configuration:ConfigurationItem' :: ConfigurationItem -> Maybe Text
configuration} -> Maybe Text
configuration) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe Text
a -> ConfigurationItem
s {$sel:configuration:ConfigurationItem' :: Maybe Text
configuration = Maybe Text
a} :: ConfigurationItem)

-- | Unique MD5 hash that represents the configuration item\'s state.
--
-- You can use MD5 hash to compare the states of two or more configuration
-- items that are associated with the same resource.
configurationItem_configurationItemMD5Hash :: Lens.Lens' ConfigurationItem (Prelude.Maybe Prelude.Text)
configurationItem_configurationItemMD5Hash :: (Maybe Text -> f (Maybe Text))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_configurationItemMD5Hash = (ConfigurationItem -> Maybe Text)
-> (ConfigurationItem -> Maybe Text -> ConfigurationItem)
-> Lens
     ConfigurationItem ConfigurationItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe Text
configurationItemMD5Hash :: Maybe Text
$sel:configurationItemMD5Hash:ConfigurationItem' :: ConfigurationItem -> Maybe Text
configurationItemMD5Hash} -> Maybe Text
configurationItemMD5Hash) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe Text
a -> ConfigurationItem
s {$sel:configurationItemMD5Hash:ConfigurationItem' :: Maybe Text
configurationItemMD5Hash = Maybe Text
a} :: ConfigurationItem)

-- | A mapping of key value tags associated with the resource.
configurationItem_tags :: Lens.Lens' ConfigurationItem (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
configurationItem_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ConfigurationItem -> f ConfigurationItem
configurationItem_tags = (ConfigurationItem -> Maybe (HashMap Text Text))
-> (ConfigurationItem
    -> Maybe (HashMap Text Text) -> ConfigurationItem)
-> Lens
     ConfigurationItem
     ConfigurationItem
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationItem' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ConfigurationItem' :: ConfigurationItem -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ConfigurationItem
s@ConfigurationItem' {} Maybe (HashMap Text Text)
a -> ConfigurationItem
s {$sel:tags:ConfigurationItem' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ConfigurationItem) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ConfigurationItem -> f ConfigurationItem)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ConfigurationItem
-> f ConfigurationItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON ConfigurationItem where
  parseJSON :: Value -> Parser ConfigurationItem
parseJSON =
    String
-> (Object -> Parser ConfigurationItem)
-> Value
-> Parser ConfigurationItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ConfigurationItem"
      ( \Object
x ->
          Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ConfigurationItemStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe [Relationship]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ConfigurationItem
ConfigurationItem'
            (Maybe Text
 -> Maybe ResourceType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ConfigurationItemStatus
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe [Relationship]
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> ConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe ResourceType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ConfigurationItemStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
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
"resourceId")
            Parser
  (Maybe ResourceType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ConfigurationItemStatus
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe ResourceType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ConfigurationItemStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ConfigurationItemStatus
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ConfigurationItemStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
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
"configurationStateId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ConfigurationItemStatus
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ConfigurationItemStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
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
"arn")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe ConfigurationItemStatus
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ConfigurationItemStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
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
"resourceName")
            Parser
  (Maybe POSIX
   -> Maybe ConfigurationItemStatus
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ConfigurationItemStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
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
"resourceCreationTime")
            Parser
  (Maybe ConfigurationItemStatus
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe ConfigurationItemStatus)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConfigurationItemStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configurationItemStatus")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
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
"configurationItemCaptureTime")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
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
"accountId")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Text
      -> Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"supplementaryConfiguration"
                            Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Relationship]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
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
"availabilityZone")
            Parser
  (Maybe [Relationship]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe [Relationship])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Relationship]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"relationships" Parser (Maybe (Maybe [Relationship]))
-> Maybe [Relationship] -> Parser (Maybe [Relationship])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Relationship]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
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
"version")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ConfigurationItem)
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
"awsRegion")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ConfigurationItem)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe (HashMap Text Text) -> ConfigurationItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"relatedEvents" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe (HashMap Text Text) -> ConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe (HashMap Text Text) -> ConfigurationItem)
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
"configuration")
            Parser
  (Maybe Text -> Maybe (HashMap Text Text) -> ConfigurationItem)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> ConfigurationItem)
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
"configurationItemMD5Hash")
            Parser (Maybe (HashMap Text Text) -> ConfigurationItem)
-> Parser (Maybe (HashMap Text Text)) -> Parser ConfigurationItem
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ConfigurationItem

instance Prelude.NFData ConfigurationItem