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

import Amazonka.Config.Types.AccountAggregationSource
import Amazonka.Config.Types.OrganizationAggregationSource
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The details about the configuration aggregator, including information
-- about source accounts, regions, and metadata of the aggregator.
--
-- /See:/ 'newConfigurationAggregator' smart constructor.
data ConfigurationAggregator = ConfigurationAggregator'
  { -- | The Amazon Resource Name (ARN) of the aggregator.
    ConfigurationAggregator -> Maybe Text
configurationAggregatorArn :: Prelude.Maybe Prelude.Text,
    -- | The time stamp when the configuration aggregator was created.
    ConfigurationAggregator -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | Provides an organization and list of regions to be aggregated.
    ConfigurationAggregator -> Maybe OrganizationAggregationSource
organizationAggregationSource :: Prelude.Maybe OrganizationAggregationSource,
    -- | The time of the last update.
    ConfigurationAggregator -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Core.POSIX,
    -- | Provides a list of source accounts and regions to be aggregated.
    ConfigurationAggregator -> Maybe [AccountAggregationSource]
accountAggregationSources :: Prelude.Maybe [AccountAggregationSource],
    -- | Amazon Web Services service that created the configuration aggregator.
    ConfigurationAggregator -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The name of the aggregator.
    ConfigurationAggregator -> Maybe Text
configurationAggregatorName :: Prelude.Maybe Prelude.Text
  }
  deriving (ConfigurationAggregator -> ConfigurationAggregator -> Bool
(ConfigurationAggregator -> ConfigurationAggregator -> Bool)
-> (ConfigurationAggregator -> ConfigurationAggregator -> Bool)
-> Eq ConfigurationAggregator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigurationAggregator -> ConfigurationAggregator -> Bool
$c/= :: ConfigurationAggregator -> ConfigurationAggregator -> Bool
== :: ConfigurationAggregator -> ConfigurationAggregator -> Bool
$c== :: ConfigurationAggregator -> ConfigurationAggregator -> Bool
Prelude.Eq, ReadPrec [ConfigurationAggregator]
ReadPrec ConfigurationAggregator
Int -> ReadS ConfigurationAggregator
ReadS [ConfigurationAggregator]
(Int -> ReadS ConfigurationAggregator)
-> ReadS [ConfigurationAggregator]
-> ReadPrec ConfigurationAggregator
-> ReadPrec [ConfigurationAggregator]
-> Read ConfigurationAggregator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigurationAggregator]
$creadListPrec :: ReadPrec [ConfigurationAggregator]
readPrec :: ReadPrec ConfigurationAggregator
$creadPrec :: ReadPrec ConfigurationAggregator
readList :: ReadS [ConfigurationAggregator]
$creadList :: ReadS [ConfigurationAggregator]
readsPrec :: Int -> ReadS ConfigurationAggregator
$creadsPrec :: Int -> ReadS ConfigurationAggregator
Prelude.Read, Int -> ConfigurationAggregator -> ShowS
[ConfigurationAggregator] -> ShowS
ConfigurationAggregator -> String
(Int -> ConfigurationAggregator -> ShowS)
-> (ConfigurationAggregator -> String)
-> ([ConfigurationAggregator] -> ShowS)
-> Show ConfigurationAggregator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigurationAggregator] -> ShowS
$cshowList :: [ConfigurationAggregator] -> ShowS
show :: ConfigurationAggregator -> String
$cshow :: ConfigurationAggregator -> String
showsPrec :: Int -> ConfigurationAggregator -> ShowS
$cshowsPrec :: Int -> ConfigurationAggregator -> ShowS
Prelude.Show, (forall x.
 ConfigurationAggregator -> Rep ConfigurationAggregator x)
-> (forall x.
    Rep ConfigurationAggregator x -> ConfigurationAggregator)
-> Generic ConfigurationAggregator
forall x. Rep ConfigurationAggregator x -> ConfigurationAggregator
forall x. ConfigurationAggregator -> Rep ConfigurationAggregator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfigurationAggregator x -> ConfigurationAggregator
$cfrom :: forall x. ConfigurationAggregator -> Rep ConfigurationAggregator x
Prelude.Generic)

-- |
-- Create a value of 'ConfigurationAggregator' 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:
--
-- 'configurationAggregatorArn', 'configurationAggregator_configurationAggregatorArn' - The Amazon Resource Name (ARN) of the aggregator.
--
-- 'creationTime', 'configurationAggregator_creationTime' - The time stamp when the configuration aggregator was created.
--
-- 'organizationAggregationSource', 'configurationAggregator_organizationAggregationSource' - Provides an organization and list of regions to be aggregated.
--
-- 'lastUpdatedTime', 'configurationAggregator_lastUpdatedTime' - The time of the last update.
--
-- 'accountAggregationSources', 'configurationAggregator_accountAggregationSources' - Provides a list of source accounts and regions to be aggregated.
--
-- 'createdBy', 'configurationAggregator_createdBy' - Amazon Web Services service that created the configuration aggregator.
--
-- 'configurationAggregatorName', 'configurationAggregator_configurationAggregatorName' - The name of the aggregator.
newConfigurationAggregator ::
  ConfigurationAggregator
newConfigurationAggregator :: ConfigurationAggregator
newConfigurationAggregator =
  ConfigurationAggregator' :: Maybe Text
-> Maybe POSIX
-> Maybe OrganizationAggregationSource
-> Maybe POSIX
-> Maybe [AccountAggregationSource]
-> Maybe Text
-> Maybe Text
-> ConfigurationAggregator
ConfigurationAggregator'
    { $sel:configurationAggregatorArn:ConfigurationAggregator' :: Maybe Text
configurationAggregatorArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTime:ConfigurationAggregator' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:organizationAggregationSource:ConfigurationAggregator' :: Maybe OrganizationAggregationSource
organizationAggregationSource = Maybe OrganizationAggregationSource
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTime:ConfigurationAggregator' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:accountAggregationSources:ConfigurationAggregator' :: Maybe [AccountAggregationSource]
accountAggregationSources = Maybe [AccountAggregationSource]
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:ConfigurationAggregator' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationAggregatorName:ConfigurationAggregator' :: Maybe Text
configurationAggregatorName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The time stamp when the configuration aggregator was created.
configurationAggregator_creationTime :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe Prelude.UTCTime)
configurationAggregator_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationAggregator -> f ConfigurationAggregator
configurationAggregator_creationTime = (ConfigurationAggregator -> Maybe POSIX)
-> (ConfigurationAggregator
    -> Maybe POSIX -> ConfigurationAggregator)
-> Lens
     ConfigurationAggregator
     ConfigurationAggregator
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationAggregator' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: ConfigurationAggregator
s@ConfigurationAggregator' {} Maybe POSIX
a -> ConfigurationAggregator
s {$sel:creationTime:ConfigurationAggregator' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: ConfigurationAggregator) ((Maybe POSIX -> f (Maybe POSIX))
 -> ConfigurationAggregator -> f ConfigurationAggregator)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationAggregator
-> f ConfigurationAggregator
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

-- | Provides an organization and list of regions to be aggregated.
configurationAggregator_organizationAggregationSource :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe OrganizationAggregationSource)
configurationAggregator_organizationAggregationSource :: (Maybe OrganizationAggregationSource
 -> f (Maybe OrganizationAggregationSource))
-> ConfigurationAggregator -> f ConfigurationAggregator
configurationAggregator_organizationAggregationSource = (ConfigurationAggregator -> Maybe OrganizationAggregationSource)
-> (ConfigurationAggregator
    -> Maybe OrganizationAggregationSource -> ConfigurationAggregator)
-> Lens
     ConfigurationAggregator
     ConfigurationAggregator
     (Maybe OrganizationAggregationSource)
     (Maybe OrganizationAggregationSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationAggregator' {Maybe OrganizationAggregationSource
organizationAggregationSource :: Maybe OrganizationAggregationSource
$sel:organizationAggregationSource:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe OrganizationAggregationSource
organizationAggregationSource} -> Maybe OrganizationAggregationSource
organizationAggregationSource) (\s :: ConfigurationAggregator
s@ConfigurationAggregator' {} Maybe OrganizationAggregationSource
a -> ConfigurationAggregator
s {$sel:organizationAggregationSource:ConfigurationAggregator' :: Maybe OrganizationAggregationSource
organizationAggregationSource = Maybe OrganizationAggregationSource
a} :: ConfigurationAggregator)

-- | The time of the last update.
configurationAggregator_lastUpdatedTime :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe Prelude.UTCTime)
configurationAggregator_lastUpdatedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationAggregator -> f ConfigurationAggregator
configurationAggregator_lastUpdatedTime = (ConfigurationAggregator -> Maybe POSIX)
-> (ConfigurationAggregator
    -> Maybe POSIX -> ConfigurationAggregator)
-> Lens
     ConfigurationAggregator
     ConfigurationAggregator
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationAggregator' {Maybe POSIX
lastUpdatedTime :: Maybe POSIX
$sel:lastUpdatedTime:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe POSIX
lastUpdatedTime} -> Maybe POSIX
lastUpdatedTime) (\s :: ConfigurationAggregator
s@ConfigurationAggregator' {} Maybe POSIX
a -> ConfigurationAggregator
s {$sel:lastUpdatedTime:ConfigurationAggregator' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
a} :: ConfigurationAggregator) ((Maybe POSIX -> f (Maybe POSIX))
 -> ConfigurationAggregator -> f ConfigurationAggregator)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigurationAggregator
-> f ConfigurationAggregator
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

-- | Provides a list of source accounts and regions to be aggregated.
configurationAggregator_accountAggregationSources :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe [AccountAggregationSource])
configurationAggregator_accountAggregationSources :: (Maybe [AccountAggregationSource]
 -> f (Maybe [AccountAggregationSource]))
-> ConfigurationAggregator -> f ConfigurationAggregator
configurationAggregator_accountAggregationSources = (ConfigurationAggregator -> Maybe [AccountAggregationSource])
-> (ConfigurationAggregator
    -> Maybe [AccountAggregationSource] -> ConfigurationAggregator)
-> Lens
     ConfigurationAggregator
     ConfigurationAggregator
     (Maybe [AccountAggregationSource])
     (Maybe [AccountAggregationSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationAggregator' {Maybe [AccountAggregationSource]
accountAggregationSources :: Maybe [AccountAggregationSource]
$sel:accountAggregationSources:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe [AccountAggregationSource]
accountAggregationSources} -> Maybe [AccountAggregationSource]
accountAggregationSources) (\s :: ConfigurationAggregator
s@ConfigurationAggregator' {} Maybe [AccountAggregationSource]
a -> ConfigurationAggregator
s {$sel:accountAggregationSources:ConfigurationAggregator' :: Maybe [AccountAggregationSource]
accountAggregationSources = Maybe [AccountAggregationSource]
a} :: ConfigurationAggregator) ((Maybe [AccountAggregationSource]
  -> f (Maybe [AccountAggregationSource]))
 -> ConfigurationAggregator -> f ConfigurationAggregator)
-> ((Maybe [AccountAggregationSource]
     -> f (Maybe [AccountAggregationSource]))
    -> Maybe [AccountAggregationSource]
    -> f (Maybe [AccountAggregationSource]))
-> (Maybe [AccountAggregationSource]
    -> f (Maybe [AccountAggregationSource]))
-> ConfigurationAggregator
-> f ConfigurationAggregator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AccountAggregationSource]
  [AccountAggregationSource]
  [AccountAggregationSource]
  [AccountAggregationSource]
-> Iso
     (Maybe [AccountAggregationSource])
     (Maybe [AccountAggregationSource])
     (Maybe [AccountAggregationSource])
     (Maybe [AccountAggregationSource])
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
  [AccountAggregationSource]
  [AccountAggregationSource]
  [AccountAggregationSource]
  [AccountAggregationSource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Amazon Web Services service that created the configuration aggregator.
configurationAggregator_createdBy :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe Prelude.Text)
configurationAggregator_createdBy :: (Maybe Text -> f (Maybe Text))
-> ConfigurationAggregator -> f ConfigurationAggregator
configurationAggregator_createdBy = (ConfigurationAggregator -> Maybe Text)
-> (ConfigurationAggregator
    -> Maybe Text -> ConfigurationAggregator)
-> Lens
     ConfigurationAggregator
     ConfigurationAggregator
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationAggregator' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: ConfigurationAggregator
s@ConfigurationAggregator' {} Maybe Text
a -> ConfigurationAggregator
s {$sel:createdBy:ConfigurationAggregator' :: Maybe Text
createdBy = Maybe Text
a} :: ConfigurationAggregator)

-- | The name of the aggregator.
configurationAggregator_configurationAggregatorName :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe Prelude.Text)
configurationAggregator_configurationAggregatorName :: (Maybe Text -> f (Maybe Text))
-> ConfigurationAggregator -> f ConfigurationAggregator
configurationAggregator_configurationAggregatorName = (ConfigurationAggregator -> Maybe Text)
-> (ConfigurationAggregator
    -> Maybe Text -> ConfigurationAggregator)
-> Lens
     ConfigurationAggregator
     ConfigurationAggregator
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationAggregator' {Maybe Text
configurationAggregatorName :: Maybe Text
$sel:configurationAggregatorName:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe Text
configurationAggregatorName} -> Maybe Text
configurationAggregatorName) (\s :: ConfigurationAggregator
s@ConfigurationAggregator' {} Maybe Text
a -> ConfigurationAggregator
s {$sel:configurationAggregatorName:ConfigurationAggregator' :: Maybe Text
configurationAggregatorName = Maybe Text
a} :: ConfigurationAggregator)

instance Core.FromJSON ConfigurationAggregator where
  parseJSON :: Value -> Parser ConfigurationAggregator
parseJSON =
    String
-> (Object -> Parser ConfigurationAggregator)
-> Value
-> Parser ConfigurationAggregator
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ConfigurationAggregator"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe OrganizationAggregationSource
-> Maybe POSIX
-> Maybe [AccountAggregationSource]
-> Maybe Text
-> Maybe Text
-> ConfigurationAggregator
ConfigurationAggregator'
            (Maybe Text
 -> Maybe POSIX
 -> Maybe OrganizationAggregationSource
 -> Maybe POSIX
 -> Maybe [AccountAggregationSource]
 -> Maybe Text
 -> Maybe Text
 -> ConfigurationAggregator)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe OrganizationAggregationSource
      -> Maybe POSIX
      -> Maybe [AccountAggregationSource]
      -> Maybe Text
      -> Maybe Text
      -> ConfigurationAggregator)
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
"ConfigurationAggregatorArn")
            Parser
  (Maybe POSIX
   -> Maybe OrganizationAggregationSource
   -> Maybe POSIX
   -> Maybe [AccountAggregationSource]
   -> Maybe Text
   -> Maybe Text
   -> ConfigurationAggregator)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe OrganizationAggregationSource
      -> Maybe POSIX
      -> Maybe [AccountAggregationSource]
      -> Maybe Text
      -> Maybe Text
      -> ConfigurationAggregator)
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
"CreationTime")
            Parser
  (Maybe OrganizationAggregationSource
   -> Maybe POSIX
   -> Maybe [AccountAggregationSource]
   -> Maybe Text
   -> Maybe Text
   -> ConfigurationAggregator)
-> Parser (Maybe OrganizationAggregationSource)
-> Parser
     (Maybe POSIX
      -> Maybe [AccountAggregationSource]
      -> Maybe Text
      -> Maybe Text
      -> ConfigurationAggregator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OrganizationAggregationSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OrganizationAggregationSource")
            Parser
  (Maybe POSIX
   -> Maybe [AccountAggregationSource]
   -> Maybe Text
   -> Maybe Text
   -> ConfigurationAggregator)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [AccountAggregationSource]
      -> Maybe Text -> Maybe Text -> ConfigurationAggregator)
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
"LastUpdatedTime")
            Parser
  (Maybe [AccountAggregationSource]
   -> Maybe Text -> Maybe Text -> ConfigurationAggregator)
-> Parser (Maybe [AccountAggregationSource])
-> Parser (Maybe Text -> Maybe Text -> ConfigurationAggregator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [AccountAggregationSource]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AccountAggregationSources"
                            Parser (Maybe (Maybe [AccountAggregationSource]))
-> Maybe [AccountAggregationSource]
-> Parser (Maybe [AccountAggregationSource])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AccountAggregationSource]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe Text -> Maybe Text -> ConfigurationAggregator)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ConfigurationAggregator)
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
"CreatedBy")
            Parser (Maybe Text -> ConfigurationAggregator)
-> Parser (Maybe Text) -> Parser ConfigurationAggregator
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
"ConfigurationAggregatorName")
      )

instance Prelude.Hashable ConfigurationAggregator

instance Prelude.NFData ConfigurationAggregator