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

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

-- | The detailed configuration of a specified resource.
--
-- /See:/ 'newBaseConfigurationItem' smart constructor.
data BaseConfigurationItem = BaseConfigurationItem'
  { -- | The ID of the resource (for example., sg-xxxxxx).
    BaseConfigurationItem -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | The type of Amazon Web Services resource.
    BaseConfigurationItem -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | An identifier that indicates the ordering of the configuration items of
    -- a resource.
    BaseConfigurationItem -> Maybe Text
configurationStateId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the resource.
    BaseConfigurationItem -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The custom name of the resource, if available.
    BaseConfigurationItem -> Maybe Text
resourceName :: Prelude.Maybe Prelude.Text,
    -- | The time stamp when the resource was created.
    BaseConfigurationItem -> 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.
    BaseConfigurationItem -> Maybe ConfigurationItemStatus
configurationItemStatus :: Prelude.Maybe ConfigurationItemStatus,
    -- | The time when the configuration recording was initiated.
    BaseConfigurationItem -> Maybe POSIX
configurationItemCaptureTime :: Prelude.Maybe Core.POSIX,
    -- | The 12-digit Amazon Web Services account ID associated with the
    -- resource.
    BaseConfigurationItem -> 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.
    BaseConfigurationItem -> Maybe (HashMap Text Text)
supplementaryConfiguration :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Availability Zone associated with the resource.
    BaseConfigurationItem -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The version number of the resource configuration.
    BaseConfigurationItem -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The region where the resource resides.
    BaseConfigurationItem -> Maybe Text
awsRegion :: Prelude.Maybe Prelude.Text,
    -- | The description of the resource configuration.
    BaseConfigurationItem -> Maybe Text
configuration :: Prelude.Maybe Prelude.Text
  }
  deriving (BaseConfigurationItem -> BaseConfigurationItem -> Bool
(BaseConfigurationItem -> BaseConfigurationItem -> Bool)
-> (BaseConfigurationItem -> BaseConfigurationItem -> Bool)
-> Eq BaseConfigurationItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BaseConfigurationItem -> BaseConfigurationItem -> Bool
$c/= :: BaseConfigurationItem -> BaseConfigurationItem -> Bool
== :: BaseConfigurationItem -> BaseConfigurationItem -> Bool
$c== :: BaseConfigurationItem -> BaseConfigurationItem -> Bool
Prelude.Eq, ReadPrec [BaseConfigurationItem]
ReadPrec BaseConfigurationItem
Int -> ReadS BaseConfigurationItem
ReadS [BaseConfigurationItem]
(Int -> ReadS BaseConfigurationItem)
-> ReadS [BaseConfigurationItem]
-> ReadPrec BaseConfigurationItem
-> ReadPrec [BaseConfigurationItem]
-> Read BaseConfigurationItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BaseConfigurationItem]
$creadListPrec :: ReadPrec [BaseConfigurationItem]
readPrec :: ReadPrec BaseConfigurationItem
$creadPrec :: ReadPrec BaseConfigurationItem
readList :: ReadS [BaseConfigurationItem]
$creadList :: ReadS [BaseConfigurationItem]
readsPrec :: Int -> ReadS BaseConfigurationItem
$creadsPrec :: Int -> ReadS BaseConfigurationItem
Prelude.Read, Int -> BaseConfigurationItem -> ShowS
[BaseConfigurationItem] -> ShowS
BaseConfigurationItem -> String
(Int -> BaseConfigurationItem -> ShowS)
-> (BaseConfigurationItem -> String)
-> ([BaseConfigurationItem] -> ShowS)
-> Show BaseConfigurationItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BaseConfigurationItem] -> ShowS
$cshowList :: [BaseConfigurationItem] -> ShowS
show :: BaseConfigurationItem -> String
$cshow :: BaseConfigurationItem -> String
showsPrec :: Int -> BaseConfigurationItem -> ShowS
$cshowsPrec :: Int -> BaseConfigurationItem -> ShowS
Prelude.Show, (forall x. BaseConfigurationItem -> Rep BaseConfigurationItem x)
-> (forall x. Rep BaseConfigurationItem x -> BaseConfigurationItem)
-> Generic BaseConfigurationItem
forall x. Rep BaseConfigurationItem x -> BaseConfigurationItem
forall x. BaseConfigurationItem -> Rep BaseConfigurationItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BaseConfigurationItem x -> BaseConfigurationItem
$cfrom :: forall x. BaseConfigurationItem -> Rep BaseConfigurationItem x
Prelude.Generic)

-- |
-- Create a value of 'BaseConfigurationItem' 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', 'baseConfigurationItem_resourceId' - The ID of the resource (for example., sg-xxxxxx).
--
-- 'resourceType', 'baseConfigurationItem_resourceType' - The type of Amazon Web Services resource.
--
-- 'configurationStateId', 'baseConfigurationItem_configurationStateId' - An identifier that indicates the ordering of the configuration items of
-- a resource.
--
-- 'arn', 'baseConfigurationItem_arn' - The Amazon Resource Name (ARN) of the resource.
--
-- 'resourceName', 'baseConfigurationItem_resourceName' - The custom name of the resource, if available.
--
-- 'resourceCreationTime', 'baseConfigurationItem_resourceCreationTime' - The time stamp when the resource was created.
--
-- 'configurationItemStatus', 'baseConfigurationItem_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', 'baseConfigurationItem_configurationItemCaptureTime' - The time when the configuration recording was initiated.
--
-- 'accountId', 'baseConfigurationItem_accountId' - The 12-digit Amazon Web Services account ID associated with the
-- resource.
--
-- 'supplementaryConfiguration', 'baseConfigurationItem_supplementaryConfiguration' - Configuration attributes that Config returns for certain resource types
-- to supplement the information returned for the configuration parameter.
--
-- 'availabilityZone', 'baseConfigurationItem_availabilityZone' - The Availability Zone associated with the resource.
--
-- 'version', 'baseConfigurationItem_version' - The version number of the resource configuration.
--
-- 'awsRegion', 'baseConfigurationItem_awsRegion' - The region where the resource resides.
--
-- 'configuration', 'baseConfigurationItem_configuration' - The description of the resource configuration.
newBaseConfigurationItem ::
  BaseConfigurationItem
newBaseConfigurationItem :: BaseConfigurationItem
newBaseConfigurationItem =
  BaseConfigurationItem' :: 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 Text
-> Maybe Text
-> Maybe Text
-> BaseConfigurationItem
BaseConfigurationItem'
    { $sel:resourceId:BaseConfigurationItem' :: Maybe Text
resourceId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:BaseConfigurationItem' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationStateId:BaseConfigurationItem' :: Maybe Text
configurationStateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:BaseConfigurationItem' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceName:BaseConfigurationItem' :: Maybe Text
resourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceCreationTime:BaseConfigurationItem' :: Maybe POSIX
resourceCreationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationItemStatus:BaseConfigurationItem' :: Maybe ConfigurationItemStatus
configurationItemStatus = Maybe ConfigurationItemStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationItemCaptureTime:BaseConfigurationItem' :: Maybe POSIX
configurationItemCaptureTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:BaseConfigurationItem' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:supplementaryConfiguration:BaseConfigurationItem' :: Maybe (HashMap Text Text)
supplementaryConfiguration = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZone:BaseConfigurationItem' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:BaseConfigurationItem' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:awsRegion:BaseConfigurationItem' :: Maybe Text
awsRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configuration:BaseConfigurationItem' :: Maybe Text
configuration = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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

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

-- | The time stamp when the resource was created.
baseConfigurationItem_resourceCreationTime :: Lens.Lens' BaseConfigurationItem (Prelude.Maybe Prelude.UTCTime)
baseConfigurationItem_resourceCreationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BaseConfigurationItem -> f BaseConfigurationItem
baseConfigurationItem_resourceCreationTime = (BaseConfigurationItem -> Maybe POSIX)
-> (BaseConfigurationItem -> Maybe POSIX -> BaseConfigurationItem)
-> Lens
     BaseConfigurationItem
     BaseConfigurationItem
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaseConfigurationItem' {Maybe POSIX
resourceCreationTime :: Maybe POSIX
$sel:resourceCreationTime:BaseConfigurationItem' :: BaseConfigurationItem -> Maybe POSIX
resourceCreationTime} -> Maybe POSIX
resourceCreationTime) (\s :: BaseConfigurationItem
s@BaseConfigurationItem' {} Maybe POSIX
a -> BaseConfigurationItem
s {$sel:resourceCreationTime:BaseConfigurationItem' :: Maybe POSIX
resourceCreationTime = Maybe POSIX
a} :: BaseConfigurationItem) ((Maybe POSIX -> f (Maybe POSIX))
 -> BaseConfigurationItem -> f BaseConfigurationItem)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BaseConfigurationItem
-> f BaseConfigurationItem
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.
baseConfigurationItem_configurationItemStatus :: Lens.Lens' BaseConfigurationItem (Prelude.Maybe ConfigurationItemStatus)
baseConfigurationItem_configurationItemStatus :: (Maybe ConfigurationItemStatus
 -> f (Maybe ConfigurationItemStatus))
-> BaseConfigurationItem -> f BaseConfigurationItem
baseConfigurationItem_configurationItemStatus = (BaseConfigurationItem -> Maybe ConfigurationItemStatus)
-> (BaseConfigurationItem
    -> Maybe ConfigurationItemStatus -> BaseConfigurationItem)
-> Lens
     BaseConfigurationItem
     BaseConfigurationItem
     (Maybe ConfigurationItemStatus)
     (Maybe ConfigurationItemStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaseConfigurationItem' {Maybe ConfigurationItemStatus
configurationItemStatus :: Maybe ConfigurationItemStatus
$sel:configurationItemStatus:BaseConfigurationItem' :: BaseConfigurationItem -> Maybe ConfigurationItemStatus
configurationItemStatus} -> Maybe ConfigurationItemStatus
configurationItemStatus) (\s :: BaseConfigurationItem
s@BaseConfigurationItem' {} Maybe ConfigurationItemStatus
a -> BaseConfigurationItem
s {$sel:configurationItemStatus:BaseConfigurationItem' :: Maybe ConfigurationItemStatus
configurationItemStatus = Maybe ConfigurationItemStatus
a} :: BaseConfigurationItem)

-- | The time when the configuration recording was initiated.
baseConfigurationItem_configurationItemCaptureTime :: Lens.Lens' BaseConfigurationItem (Prelude.Maybe Prelude.UTCTime)
baseConfigurationItem_configurationItemCaptureTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BaseConfigurationItem -> f BaseConfigurationItem
baseConfigurationItem_configurationItemCaptureTime = (BaseConfigurationItem -> Maybe POSIX)
-> (BaseConfigurationItem -> Maybe POSIX -> BaseConfigurationItem)
-> Lens
     BaseConfigurationItem
     BaseConfigurationItem
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaseConfigurationItem' {Maybe POSIX
configurationItemCaptureTime :: Maybe POSIX
$sel:configurationItemCaptureTime:BaseConfigurationItem' :: BaseConfigurationItem -> Maybe POSIX
configurationItemCaptureTime} -> Maybe POSIX
configurationItemCaptureTime) (\s :: BaseConfigurationItem
s@BaseConfigurationItem' {} Maybe POSIX
a -> BaseConfigurationItem
s {$sel:configurationItemCaptureTime:BaseConfigurationItem' :: Maybe POSIX
configurationItemCaptureTime = Maybe POSIX
a} :: BaseConfigurationItem) ((Maybe POSIX -> f (Maybe POSIX))
 -> BaseConfigurationItem -> f BaseConfigurationItem)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BaseConfigurationItem
-> f BaseConfigurationItem
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.
baseConfigurationItem_accountId :: Lens.Lens' BaseConfigurationItem (Prelude.Maybe Prelude.Text)
baseConfigurationItem_accountId :: (Maybe Text -> f (Maybe Text))
-> BaseConfigurationItem -> f BaseConfigurationItem
baseConfigurationItem_accountId = (BaseConfigurationItem -> Maybe Text)
-> (BaseConfigurationItem -> Maybe Text -> BaseConfigurationItem)
-> Lens
     BaseConfigurationItem
     BaseConfigurationItem
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaseConfigurationItem' {Maybe Text
accountId :: Maybe Text
$sel:accountId:BaseConfigurationItem' :: BaseConfigurationItem -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: BaseConfigurationItem
s@BaseConfigurationItem' {} Maybe Text
a -> BaseConfigurationItem
s {$sel:accountId:BaseConfigurationItem' :: Maybe Text
accountId = Maybe Text
a} :: BaseConfigurationItem)

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

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

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

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

instance Core.FromJSON BaseConfigurationItem where
  parseJSON :: Value -> Parser BaseConfigurationItem
parseJSON =
    String
-> (Object -> Parser BaseConfigurationItem)
-> Value
-> Parser BaseConfigurationItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BaseConfigurationItem"
      ( \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 Text
-> Maybe Text
-> Maybe Text
-> BaseConfigurationItem
BaseConfigurationItem'
            (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 Text
 -> Maybe Text
 -> Maybe Text
 -> BaseConfigurationItem)
-> 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 Text
      -> Maybe Text
      -> Maybe Text
      -> BaseConfigurationItem)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> BaseConfigurationItem)
-> 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 Text
      -> Maybe Text
      -> Maybe Text
      -> BaseConfigurationItem)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> BaseConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ConfigurationItemStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BaseConfigurationItem)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> BaseConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ConfigurationItemStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BaseConfigurationItem)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> BaseConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ConfigurationItemStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BaseConfigurationItem)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> BaseConfigurationItem)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ConfigurationItemStatus
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BaseConfigurationItem)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> BaseConfigurationItem)
-> Parser (Maybe ConfigurationItemStatus)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BaseConfigurationItem)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> BaseConfigurationItem)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BaseConfigurationItem)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> BaseConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> BaseConfigurationItem)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> BaseConfigurationItem)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> BaseConfigurationItem)
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 Text -> Maybe Text -> Maybe Text -> BaseConfigurationItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> BaseConfigurationItem)
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 Text -> Maybe Text -> Maybe Text -> BaseConfigurationItem)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> BaseConfigurationItem)
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 -> BaseConfigurationItem)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> BaseConfigurationItem)
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 -> BaseConfigurationItem)
-> Parser (Maybe Text) -> Parser BaseConfigurationItem
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")
      )

instance Prelude.Hashable BaseConfigurationItem

instance Prelude.NFData BaseConfigurationItem