{-# 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 #-}
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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ConfigurationAggregator = ConfigurationAggregator'
{
ConfigurationAggregator -> Maybe [AccountAggregationSource]
accountAggregationSources :: Prelude.Maybe [AccountAggregationSource],
ConfigurationAggregator -> Maybe Text
configurationAggregatorArn :: Prelude.Maybe Prelude.Text,
ConfigurationAggregator -> Maybe Text
configurationAggregatorName :: Prelude.Maybe Prelude.Text,
ConfigurationAggregator -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
ConfigurationAggregator -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
ConfigurationAggregator -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Data.POSIX,
ConfigurationAggregator -> Maybe OrganizationAggregationSource
organizationAggregationSource :: Prelude.Maybe OrganizationAggregationSource
}
deriving (ConfigurationAggregator -> ConfigurationAggregator -> Bool
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]
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
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. 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)
newConfigurationAggregator ::
ConfigurationAggregator
newConfigurationAggregator :: ConfigurationAggregator
newConfigurationAggregator =
ConfigurationAggregator'
{ $sel:accountAggregationSources:ConfigurationAggregator' :: Maybe [AccountAggregationSource]
accountAggregationSources =
forall a. Maybe a
Prelude.Nothing,
$sel:configurationAggregatorArn:ConfigurationAggregator' :: Maybe Text
configurationAggregatorArn = forall a. Maybe a
Prelude.Nothing,
$sel:configurationAggregatorName:ConfigurationAggregator' :: Maybe Text
configurationAggregatorName = forall a. Maybe a
Prelude.Nothing,
$sel:createdBy:ConfigurationAggregator' :: Maybe Text
createdBy = forall a. Maybe a
Prelude.Nothing,
$sel:creationTime:ConfigurationAggregator' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTime:ConfigurationAggregator' :: Maybe POSIX
lastUpdatedTime = forall a. Maybe a
Prelude.Nothing,
$sel:organizationAggregationSource:ConfigurationAggregator' :: Maybe OrganizationAggregationSource
organizationAggregationSource = forall a. Maybe a
Prelude.Nothing
}
configurationAggregator_accountAggregationSources :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe [AccountAggregationSource])
configurationAggregator_accountAggregationSources :: Lens' ConfigurationAggregator (Maybe [AccountAggregationSource])
configurationAggregator_accountAggregationSources = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
configurationAggregator_configurationAggregatorArn :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe Prelude.Text)
configurationAggregator_configurationAggregatorArn :: Lens' ConfigurationAggregator (Maybe Text)
configurationAggregator_configurationAggregatorArn = 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)
configurationAggregator_configurationAggregatorName :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe Prelude.Text)
configurationAggregator_configurationAggregatorName :: Lens' ConfigurationAggregator (Maybe Text)
configurationAggregator_configurationAggregatorName = 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)
configurationAggregator_createdBy :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe Prelude.Text)
configurationAggregator_createdBy :: Lens' ConfigurationAggregator (Maybe Text)
configurationAggregator_createdBy = 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)
configurationAggregator_creationTime :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe Prelude.UTCTime)
configurationAggregator_creationTime :: Lens' ConfigurationAggregator (Maybe UTCTime)
configurationAggregator_creationTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
configurationAggregator_lastUpdatedTime :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe Prelude.UTCTime)
configurationAggregator_lastUpdatedTime :: Lens' ConfigurationAggregator (Maybe UTCTime)
configurationAggregator_lastUpdatedTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
configurationAggregator_organizationAggregationSource :: Lens.Lens' ConfigurationAggregator (Prelude.Maybe OrganizationAggregationSource)
configurationAggregator_organizationAggregationSource :: Lens' ConfigurationAggregator (Maybe OrganizationAggregationSource)
configurationAggregator_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)
instance Data.FromJSON ConfigurationAggregator where
parseJSON :: Value -> Parser ConfigurationAggregator
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConfigurationAggregator"
( \Object
x ->
Maybe [AccountAggregationSource]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe OrganizationAggregationSource
-> ConfigurationAggregator
ConfigurationAggregator'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AccountAggregationSources"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ConfigurationAggregatorArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ConfigurationAggregatorName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreatedBy")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastUpdatedTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OrganizationAggregationSource")
)
instance Prelude.Hashable ConfigurationAggregator where
hashWithSalt :: Int -> ConfigurationAggregator -> Int
hashWithSalt Int
_salt ConfigurationAggregator' {Maybe [AccountAggregationSource]
Maybe Text
Maybe POSIX
Maybe OrganizationAggregationSource
organizationAggregationSource :: Maybe OrganizationAggregationSource
lastUpdatedTime :: Maybe POSIX
creationTime :: Maybe POSIX
createdBy :: Maybe Text
configurationAggregatorName :: Maybe Text
configurationAggregatorArn :: Maybe Text
accountAggregationSources :: Maybe [AccountAggregationSource]
$sel:organizationAggregationSource:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe OrganizationAggregationSource
$sel:lastUpdatedTime:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe POSIX
$sel:creationTime:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe POSIX
$sel:createdBy:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe Text
$sel:configurationAggregatorName:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe Text
$sel:configurationAggregatorArn:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe Text
$sel:accountAggregationSources:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe [AccountAggregationSource]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [AccountAggregationSource]
accountAggregationSources
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configurationAggregatorArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configurationAggregatorName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
createdBy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OrganizationAggregationSource
organizationAggregationSource
instance Prelude.NFData ConfigurationAggregator where
rnf :: ConfigurationAggregator -> ()
rnf ConfigurationAggregator' {Maybe [AccountAggregationSource]
Maybe Text
Maybe POSIX
Maybe OrganizationAggregationSource
organizationAggregationSource :: Maybe OrganizationAggregationSource
lastUpdatedTime :: Maybe POSIX
creationTime :: Maybe POSIX
createdBy :: Maybe Text
configurationAggregatorName :: Maybe Text
configurationAggregatorArn :: Maybe Text
accountAggregationSources :: Maybe [AccountAggregationSource]
$sel:organizationAggregationSource:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe OrganizationAggregationSource
$sel:lastUpdatedTime:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe POSIX
$sel:creationTime:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe POSIX
$sel:createdBy:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe Text
$sel:configurationAggregatorName:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe Text
$sel:configurationAggregatorArn:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe Text
$sel:accountAggregationSources:ConfigurationAggregator' :: ConfigurationAggregator -> Maybe [AccountAggregationSource]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [AccountAggregationSource]
accountAggregationSources
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationAggregatorArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationAggregatorName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdBy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OrganizationAggregationSource
organizationAggregationSource