{-# 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.OrganizationConformancePack where
import Amazonka.Config.Types.ConformancePackInputParameter
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 OrganizationConformancePack = OrganizationConformancePack'
{
OrganizationConformancePack
-> Maybe [ConformancePackInputParameter]
conformancePackInputParameters :: Prelude.Maybe [ConformancePackInputParameter],
OrganizationConformancePack -> Maybe Text
deliveryS3Bucket :: Prelude.Maybe Prelude.Text,
OrganizationConformancePack -> Maybe Text
deliveryS3KeyPrefix :: Prelude.Maybe Prelude.Text,
OrganizationConformancePack -> Maybe [Text]
excludedAccounts :: Prelude.Maybe [Prelude.Text],
OrganizationConformancePack -> Text
organizationConformancePackName :: Prelude.Text,
OrganizationConformancePack -> Text
organizationConformancePackArn :: Prelude.Text,
OrganizationConformancePack -> POSIX
lastUpdateTime :: Data.POSIX
}
deriving (OrganizationConformancePack -> OrganizationConformancePack -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrganizationConformancePack -> OrganizationConformancePack -> Bool
$c/= :: OrganizationConformancePack -> OrganizationConformancePack -> Bool
== :: OrganizationConformancePack -> OrganizationConformancePack -> Bool
$c== :: OrganizationConformancePack -> OrganizationConformancePack -> Bool
Prelude.Eq, ReadPrec [OrganizationConformancePack]
ReadPrec OrganizationConformancePack
Int -> ReadS OrganizationConformancePack
ReadS [OrganizationConformancePack]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrganizationConformancePack]
$creadListPrec :: ReadPrec [OrganizationConformancePack]
readPrec :: ReadPrec OrganizationConformancePack
$creadPrec :: ReadPrec OrganizationConformancePack
readList :: ReadS [OrganizationConformancePack]
$creadList :: ReadS [OrganizationConformancePack]
readsPrec :: Int -> ReadS OrganizationConformancePack
$creadsPrec :: Int -> ReadS OrganizationConformancePack
Prelude.Read, Int -> OrganizationConformancePack -> ShowS
[OrganizationConformancePack] -> ShowS
OrganizationConformancePack -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrganizationConformancePack] -> ShowS
$cshowList :: [OrganizationConformancePack] -> ShowS
show :: OrganizationConformancePack -> String
$cshow :: OrganizationConformancePack -> String
showsPrec :: Int -> OrganizationConformancePack -> ShowS
$cshowsPrec :: Int -> OrganizationConformancePack -> ShowS
Prelude.Show, forall x.
Rep OrganizationConformancePack x -> OrganizationConformancePack
forall x.
OrganizationConformancePack -> Rep OrganizationConformancePack x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OrganizationConformancePack x -> OrganizationConformancePack
$cfrom :: forall x.
OrganizationConformancePack -> Rep OrganizationConformancePack x
Prelude.Generic)
newOrganizationConformancePack ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
OrganizationConformancePack
newOrganizationConformancePack :: Text -> Text -> UTCTime -> OrganizationConformancePack
newOrganizationConformancePack
Text
pOrganizationConformancePackName_
Text
pOrganizationConformancePackArn_
UTCTime
pLastUpdateTime_ =
OrganizationConformancePack'
{ $sel:conformancePackInputParameters:OrganizationConformancePack' :: Maybe [ConformancePackInputParameter]
conformancePackInputParameters =
forall a. Maybe a
Prelude.Nothing,
$sel:deliveryS3Bucket:OrganizationConformancePack' :: Maybe Text
deliveryS3Bucket = forall a. Maybe a
Prelude.Nothing,
$sel:deliveryS3KeyPrefix:OrganizationConformancePack' :: Maybe Text
deliveryS3KeyPrefix = forall a. Maybe a
Prelude.Nothing,
$sel:excludedAccounts:OrganizationConformancePack' :: Maybe [Text]
excludedAccounts = forall a. Maybe a
Prelude.Nothing,
$sel:organizationConformancePackName:OrganizationConformancePack' :: Text
organizationConformancePackName =
Text
pOrganizationConformancePackName_,
$sel:organizationConformancePackArn:OrganizationConformancePack' :: Text
organizationConformancePackArn =
Text
pOrganizationConformancePackArn_,
$sel:lastUpdateTime:OrganizationConformancePack' :: POSIX
lastUpdateTime =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdateTime_
}
organizationConformancePack_conformancePackInputParameters :: Lens.Lens' OrganizationConformancePack (Prelude.Maybe [ConformancePackInputParameter])
organizationConformancePack_conformancePackInputParameters :: Lens'
OrganizationConformancePack (Maybe [ConformancePackInputParameter])
organizationConformancePack_conformancePackInputParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePack' {Maybe [ConformancePackInputParameter]
conformancePackInputParameters :: Maybe [ConformancePackInputParameter]
$sel:conformancePackInputParameters:OrganizationConformancePack' :: OrganizationConformancePack
-> Maybe [ConformancePackInputParameter]
conformancePackInputParameters} -> Maybe [ConformancePackInputParameter]
conformancePackInputParameters) (\s :: OrganizationConformancePack
s@OrganizationConformancePack' {} Maybe [ConformancePackInputParameter]
a -> OrganizationConformancePack
s {$sel:conformancePackInputParameters:OrganizationConformancePack' :: Maybe [ConformancePackInputParameter]
conformancePackInputParameters = Maybe [ConformancePackInputParameter]
a} :: OrganizationConformancePack) 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
organizationConformancePack_deliveryS3Bucket :: Lens.Lens' OrganizationConformancePack (Prelude.Maybe Prelude.Text)
organizationConformancePack_deliveryS3Bucket :: Lens' OrganizationConformancePack (Maybe Text)
organizationConformancePack_deliveryS3Bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePack' {Maybe Text
deliveryS3Bucket :: Maybe Text
$sel:deliveryS3Bucket:OrganizationConformancePack' :: OrganizationConformancePack -> Maybe Text
deliveryS3Bucket} -> Maybe Text
deliveryS3Bucket) (\s :: OrganizationConformancePack
s@OrganizationConformancePack' {} Maybe Text
a -> OrganizationConformancePack
s {$sel:deliveryS3Bucket:OrganizationConformancePack' :: Maybe Text
deliveryS3Bucket = Maybe Text
a} :: OrganizationConformancePack)
organizationConformancePack_deliveryS3KeyPrefix :: Lens.Lens' OrganizationConformancePack (Prelude.Maybe Prelude.Text)
organizationConformancePack_deliveryS3KeyPrefix :: Lens' OrganizationConformancePack (Maybe Text)
organizationConformancePack_deliveryS3KeyPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePack' {Maybe Text
deliveryS3KeyPrefix :: Maybe Text
$sel:deliveryS3KeyPrefix:OrganizationConformancePack' :: OrganizationConformancePack -> Maybe Text
deliveryS3KeyPrefix} -> Maybe Text
deliveryS3KeyPrefix) (\s :: OrganizationConformancePack
s@OrganizationConformancePack' {} Maybe Text
a -> OrganizationConformancePack
s {$sel:deliveryS3KeyPrefix:OrganizationConformancePack' :: Maybe Text
deliveryS3KeyPrefix = Maybe Text
a} :: OrganizationConformancePack)
organizationConformancePack_excludedAccounts :: Lens.Lens' OrganizationConformancePack (Prelude.Maybe [Prelude.Text])
organizationConformancePack_excludedAccounts :: Lens' OrganizationConformancePack (Maybe [Text])
organizationConformancePack_excludedAccounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePack' {Maybe [Text]
excludedAccounts :: Maybe [Text]
$sel:excludedAccounts:OrganizationConformancePack' :: OrganizationConformancePack -> Maybe [Text]
excludedAccounts} -> Maybe [Text]
excludedAccounts) (\s :: OrganizationConformancePack
s@OrganizationConformancePack' {} Maybe [Text]
a -> OrganizationConformancePack
s {$sel:excludedAccounts:OrganizationConformancePack' :: Maybe [Text]
excludedAccounts = Maybe [Text]
a} :: OrganizationConformancePack) 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
organizationConformancePack_organizationConformancePackName :: Lens.Lens' OrganizationConformancePack Prelude.Text
organizationConformancePack_organizationConformancePackName :: Lens' OrganizationConformancePack Text
organizationConformancePack_organizationConformancePackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePack' {Text
organizationConformancePackName :: Text
$sel:organizationConformancePackName:OrganizationConformancePack' :: OrganizationConformancePack -> Text
organizationConformancePackName} -> Text
organizationConformancePackName) (\s :: OrganizationConformancePack
s@OrganizationConformancePack' {} Text
a -> OrganizationConformancePack
s {$sel:organizationConformancePackName:OrganizationConformancePack' :: Text
organizationConformancePackName = Text
a} :: OrganizationConformancePack)
organizationConformancePack_organizationConformancePackArn :: Lens.Lens' OrganizationConformancePack Prelude.Text
organizationConformancePack_organizationConformancePackArn :: Lens' OrganizationConformancePack Text
organizationConformancePack_organizationConformancePackArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePack' {Text
organizationConformancePackArn :: Text
$sel:organizationConformancePackArn:OrganizationConformancePack' :: OrganizationConformancePack -> Text
organizationConformancePackArn} -> Text
organizationConformancePackArn) (\s :: OrganizationConformancePack
s@OrganizationConformancePack' {} Text
a -> OrganizationConformancePack
s {$sel:organizationConformancePackArn:OrganizationConformancePack' :: Text
organizationConformancePackArn = Text
a} :: OrganizationConformancePack)
organizationConformancePack_lastUpdateTime :: Lens.Lens' OrganizationConformancePack Prelude.UTCTime
organizationConformancePack_lastUpdateTime :: Lens' OrganizationConformancePack UTCTime
organizationConformancePack_lastUpdateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePack' {POSIX
lastUpdateTime :: POSIX
$sel:lastUpdateTime:OrganizationConformancePack' :: OrganizationConformancePack -> POSIX
lastUpdateTime} -> POSIX
lastUpdateTime) (\s :: OrganizationConformancePack
s@OrganizationConformancePack' {} POSIX
a -> OrganizationConformancePack
s {$sel:lastUpdateTime:OrganizationConformancePack' :: POSIX
lastUpdateTime = POSIX
a} :: OrganizationConformancePack) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON OrganizationConformancePack where
parseJSON :: Value -> Parser OrganizationConformancePack
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"OrganizationConformancePack"
( \Object
x ->
Maybe [ConformancePackInputParameter]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Text
-> Text
-> POSIX
-> OrganizationConformancePack
OrganizationConformancePack'
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
"ConformancePackInputParameters"
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
"DeliveryS3Bucket")
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
"DeliveryS3KeyPrefix")
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
"ExcludedAccounts"
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 a
Data..: Key
"OrganizationConformancePackName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"OrganizationConformancePackArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"LastUpdateTime")
)
instance Prelude.Hashable OrganizationConformancePack where
hashWithSalt :: Int -> OrganizationConformancePack -> Int
hashWithSalt Int
_salt OrganizationConformancePack' {Maybe [Text]
Maybe [ConformancePackInputParameter]
Maybe Text
Text
POSIX
lastUpdateTime :: POSIX
organizationConformancePackArn :: Text
organizationConformancePackName :: Text
excludedAccounts :: Maybe [Text]
deliveryS3KeyPrefix :: Maybe Text
deliveryS3Bucket :: Maybe Text
conformancePackInputParameters :: Maybe [ConformancePackInputParameter]
$sel:lastUpdateTime:OrganizationConformancePack' :: OrganizationConformancePack -> POSIX
$sel:organizationConformancePackArn:OrganizationConformancePack' :: OrganizationConformancePack -> Text
$sel:organizationConformancePackName:OrganizationConformancePack' :: OrganizationConformancePack -> Text
$sel:excludedAccounts:OrganizationConformancePack' :: OrganizationConformancePack -> Maybe [Text]
$sel:deliveryS3KeyPrefix:OrganizationConformancePack' :: OrganizationConformancePack -> Maybe Text
$sel:deliveryS3Bucket:OrganizationConformancePack' :: OrganizationConformancePack -> Maybe Text
$sel:conformancePackInputParameters:OrganizationConformancePack' :: OrganizationConformancePack
-> Maybe [ConformancePackInputParameter]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ConformancePackInputParameter]
conformancePackInputParameters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deliveryS3Bucket
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deliveryS3KeyPrefix
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
excludedAccounts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
organizationConformancePackName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
organizationConformancePackArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastUpdateTime
instance Prelude.NFData OrganizationConformancePack where
rnf :: OrganizationConformancePack -> ()
rnf OrganizationConformancePack' {Maybe [Text]
Maybe [ConformancePackInputParameter]
Maybe Text
Text
POSIX
lastUpdateTime :: POSIX
organizationConformancePackArn :: Text
organizationConformancePackName :: Text
excludedAccounts :: Maybe [Text]
deliveryS3KeyPrefix :: Maybe Text
deliveryS3Bucket :: Maybe Text
conformancePackInputParameters :: Maybe [ConformancePackInputParameter]
$sel:lastUpdateTime:OrganizationConformancePack' :: OrganizationConformancePack -> POSIX
$sel:organizationConformancePackArn:OrganizationConformancePack' :: OrganizationConformancePack -> Text
$sel:organizationConformancePackName:OrganizationConformancePack' :: OrganizationConformancePack -> Text
$sel:excludedAccounts:OrganizationConformancePack' :: OrganizationConformancePack -> Maybe [Text]
$sel:deliveryS3KeyPrefix:OrganizationConformancePack' :: OrganizationConformancePack -> Maybe Text
$sel:deliveryS3Bucket:OrganizationConformancePack' :: OrganizationConformancePack -> Maybe Text
$sel:conformancePackInputParameters:OrganizationConformancePack' :: OrganizationConformancePack
-> Maybe [ConformancePackInputParameter]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [ConformancePackInputParameter]
conformancePackInputParameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deliveryS3Bucket
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deliveryS3KeyPrefix
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
excludedAccounts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
organizationConformancePackName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
organizationConformancePackArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastUpdateTime