{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OrganizationConformancePack = OrganizationConformancePack'
{
OrganizationConformancePack -> Maybe Text
deliveryS3Bucket :: Prelude.Maybe Prelude.Text,
OrganizationConformancePack -> Maybe Text
deliveryS3KeyPrefix :: Prelude.Maybe Prelude.Text,
OrganizationConformancePack
-> Maybe [ConformancePackInputParameter]
conformancePackInputParameters :: Prelude.Maybe [ConformancePackInputParameter],
OrganizationConformancePack -> Maybe [Text]
excludedAccounts :: Prelude.Maybe [Prelude.Text],
OrganizationConformancePack -> Text
organizationConformancePackName :: Prelude.Text,
OrganizationConformancePack -> Text
organizationConformancePackArn :: Prelude.Text,
OrganizationConformancePack -> POSIX
lastUpdateTime :: Core.POSIX
}
deriving (OrganizationConformancePack -> OrganizationConformancePack -> Bool
(OrganizationConformancePack
-> OrganizationConformancePack -> Bool)
-> (OrganizationConformancePack
-> OrganizationConformancePack -> Bool)
-> Eq OrganizationConformancePack
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]
(Int -> ReadS OrganizationConformancePack)
-> ReadS [OrganizationConformancePack]
-> ReadPrec OrganizationConformancePack
-> ReadPrec [OrganizationConformancePack]
-> Read 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
(Int -> OrganizationConformancePack -> ShowS)
-> (OrganizationConformancePack -> String)
-> ([OrganizationConformancePack] -> ShowS)
-> Show OrganizationConformancePack
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.
OrganizationConformancePack -> Rep OrganizationConformancePack x)
-> (forall x.
Rep OrganizationConformancePack x -> OrganizationConformancePack)
-> Generic OrganizationConformancePack
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' :: Maybe Text
-> Maybe Text
-> Maybe [ConformancePackInputParameter]
-> Maybe [Text]
-> Text
-> Text
-> POSIX
-> OrganizationConformancePack
OrganizationConformancePack'
{ $sel:deliveryS3Bucket:OrganizationConformancePack' :: Maybe Text
deliveryS3Bucket =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deliveryS3KeyPrefix:OrganizationConformancePack' :: Maybe Text
deliveryS3KeyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:conformancePackInputParameters:OrganizationConformancePack' :: Maybe [ConformancePackInputParameter]
conformancePackInputParameters =
Maybe [ConformancePackInputParameter]
forall a. Maybe a
Prelude.Nothing,
$sel:excludedAccounts:OrganizationConformancePack' :: Maybe [Text]
excludedAccounts = Maybe [Text]
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 =
Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdateTime_
}
organizationConformancePack_deliveryS3Bucket :: Lens.Lens' OrganizationConformancePack (Prelude.Maybe Prelude.Text)
organizationConformancePack_deliveryS3Bucket :: (Maybe Text -> f (Maybe Text))
-> OrganizationConformancePack -> f OrganizationConformancePack
organizationConformancePack_deliveryS3Bucket = (OrganizationConformancePack -> Maybe Text)
-> (OrganizationConformancePack
-> Maybe Text -> OrganizationConformancePack)
-> Lens
OrganizationConformancePack
OrganizationConformancePack
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> OrganizationConformancePack -> f OrganizationConformancePack
organizationConformancePack_deliveryS3KeyPrefix = (OrganizationConformancePack -> Maybe Text)
-> (OrganizationConformancePack
-> Maybe Text -> OrganizationConformancePack)
-> Lens
OrganizationConformancePack
OrganizationConformancePack
(Maybe Text)
(Maybe Text)
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_conformancePackInputParameters :: Lens.Lens' OrganizationConformancePack (Prelude.Maybe [ConformancePackInputParameter])
organizationConformancePack_conformancePackInputParameters :: (Maybe [ConformancePackInputParameter]
-> f (Maybe [ConformancePackInputParameter]))
-> OrganizationConformancePack -> f OrganizationConformancePack
organizationConformancePack_conformancePackInputParameters = (OrganizationConformancePack
-> Maybe [ConformancePackInputParameter])
-> (OrganizationConformancePack
-> Maybe [ConformancePackInputParameter]
-> OrganizationConformancePack)
-> Lens
OrganizationConformancePack
OrganizationConformancePack
(Maybe [ConformancePackInputParameter])
(Maybe [ConformancePackInputParameter])
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) ((Maybe [ConformancePackInputParameter]
-> f (Maybe [ConformancePackInputParameter]))
-> OrganizationConformancePack -> f OrganizationConformancePack)
-> ((Maybe [ConformancePackInputParameter]
-> f (Maybe [ConformancePackInputParameter]))
-> Maybe [ConformancePackInputParameter]
-> f (Maybe [ConformancePackInputParameter]))
-> (Maybe [ConformancePackInputParameter]
-> f (Maybe [ConformancePackInputParameter]))
-> OrganizationConformancePack
-> f OrganizationConformancePack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ConformancePackInputParameter]
[ConformancePackInputParameter]
[ConformancePackInputParameter]
[ConformancePackInputParameter]
-> Iso
(Maybe [ConformancePackInputParameter])
(Maybe [ConformancePackInputParameter])
(Maybe [ConformancePackInputParameter])
(Maybe [ConformancePackInputParameter])
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
[ConformancePackInputParameter]
[ConformancePackInputParameter]
[ConformancePackInputParameter]
[ConformancePackInputParameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
organizationConformancePack_excludedAccounts :: Lens.Lens' OrganizationConformancePack (Prelude.Maybe [Prelude.Text])
organizationConformancePack_excludedAccounts :: (Maybe [Text] -> f (Maybe [Text]))
-> OrganizationConformancePack -> f OrganizationConformancePack
organizationConformancePack_excludedAccounts = (OrganizationConformancePack -> Maybe [Text])
-> (OrganizationConformancePack
-> Maybe [Text] -> OrganizationConformancePack)
-> Lens
OrganizationConformancePack
OrganizationConformancePack
(Maybe [Text])
(Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
-> OrganizationConformancePack -> f OrganizationConformancePack)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> OrganizationConformancePack
-> f OrganizationConformancePack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
organizationConformancePack_organizationConformancePackName :: Lens.Lens' OrganizationConformancePack Prelude.Text
organizationConformancePack_organizationConformancePackName :: (Text -> f Text)
-> OrganizationConformancePack -> f OrganizationConformancePack
organizationConformancePack_organizationConformancePackName = (OrganizationConformancePack -> Text)
-> (OrganizationConformancePack
-> Text -> OrganizationConformancePack)
-> Lens
OrganizationConformancePack OrganizationConformancePack Text Text
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 :: (Text -> f Text)
-> OrganizationConformancePack -> f OrganizationConformancePack
organizationConformancePack_organizationConformancePackArn = (OrganizationConformancePack -> Text)
-> (OrganizationConformancePack
-> Text -> OrganizationConformancePack)
-> Lens
OrganizationConformancePack OrganizationConformancePack Text Text
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 :: (UTCTime -> f UTCTime)
-> OrganizationConformancePack -> f OrganizationConformancePack
organizationConformancePack_lastUpdateTime = (OrganizationConformancePack -> POSIX)
-> (OrganizationConformancePack
-> POSIX -> OrganizationConformancePack)
-> Lens
OrganizationConformancePack OrganizationConformancePack POSIX POSIX
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) ((POSIX -> f POSIX)
-> OrganizationConformancePack -> f OrganizationConformancePack)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> OrganizationConformancePack
-> f OrganizationConformancePack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON OrganizationConformancePack where
parseJSON :: Value -> Parser OrganizationConformancePack
parseJSON =
String
-> (Object -> Parser OrganizationConformancePack)
-> Value
-> Parser OrganizationConformancePack
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OrganizationConformancePack"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [ConformancePackInputParameter]
-> Maybe [Text]
-> Text
-> Text
-> POSIX
-> OrganizationConformancePack
OrganizationConformancePack'
(Maybe Text
-> Maybe Text
-> Maybe [ConformancePackInputParameter]
-> Maybe [Text]
-> Text
-> Text
-> POSIX
-> OrganizationConformancePack)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [ConformancePackInputParameter]
-> Maybe [Text]
-> Text
-> Text
-> POSIX
-> OrganizationConformancePack)
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
"DeliveryS3Bucket")
Parser
(Maybe Text
-> Maybe [ConformancePackInputParameter]
-> Maybe [Text]
-> Text
-> Text
-> POSIX
-> OrganizationConformancePack)
-> Parser (Maybe Text)
-> Parser
(Maybe [ConformancePackInputParameter]
-> Maybe [Text]
-> Text
-> Text
-> POSIX
-> OrganizationConformancePack)
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
"DeliveryS3KeyPrefix")
Parser
(Maybe [ConformancePackInputParameter]
-> Maybe [Text]
-> Text
-> Text
-> POSIX
-> OrganizationConformancePack)
-> Parser (Maybe [ConformancePackInputParameter])
-> Parser
(Maybe [Text]
-> Text -> Text -> POSIX -> OrganizationConformancePack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [ConformancePackInputParameter]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConformancePackInputParameters"
Parser (Maybe (Maybe [ConformancePackInputParameter]))
-> Maybe [ConformancePackInputParameter]
-> Parser (Maybe [ConformancePackInputParameter])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ConformancePackInputParameter]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [Text]
-> Text -> Text -> POSIX -> OrganizationConformancePack)
-> Parser (Maybe [Text])
-> Parser (Text -> Text -> POSIX -> OrganizationConformancePack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExcludedAccounts"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Text -> Text -> POSIX -> OrganizationConformancePack)
-> Parser Text
-> Parser (Text -> POSIX -> OrganizationConformancePack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OrganizationConformancePackName")
Parser (Text -> POSIX -> OrganizationConformancePack)
-> Parser Text -> Parser (POSIX -> OrganizationConformancePack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OrganizationConformancePackArn")
Parser (POSIX -> OrganizationConformancePack)
-> Parser POSIX -> Parser OrganizationConformancePack
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LastUpdateTime")
)
instance Prelude.Hashable OrganizationConformancePack
instance Prelude.NFData OrganizationConformancePack