{-# 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.ConformancePackDetail 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 ConformancePackDetail = ConformancePackDetail'
{
ConformancePackDetail -> Maybe Text
deliveryS3Bucket :: Prelude.Maybe Prelude.Text,
ConformancePackDetail -> Maybe Text
deliveryS3KeyPrefix :: Prelude.Maybe Prelude.Text,
ConformancePackDetail -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
ConformancePackDetail -> Maybe POSIX
lastUpdateRequestedTime :: Prelude.Maybe Core.POSIX,
ConformancePackDetail -> Maybe [ConformancePackInputParameter]
conformancePackInputParameters :: Prelude.Maybe [ConformancePackInputParameter],
ConformancePackDetail -> Text
conformancePackName :: Prelude.Text,
ConformancePackDetail -> Text
conformancePackArn :: Prelude.Text,
ConformancePackDetail -> Text
conformancePackId :: Prelude.Text
}
deriving (ConformancePackDetail -> ConformancePackDetail -> Bool
(ConformancePackDetail -> ConformancePackDetail -> Bool)
-> (ConformancePackDetail -> ConformancePackDetail -> Bool)
-> Eq ConformancePackDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConformancePackDetail -> ConformancePackDetail -> Bool
$c/= :: ConformancePackDetail -> ConformancePackDetail -> Bool
== :: ConformancePackDetail -> ConformancePackDetail -> Bool
$c== :: ConformancePackDetail -> ConformancePackDetail -> Bool
Prelude.Eq, ReadPrec [ConformancePackDetail]
ReadPrec ConformancePackDetail
Int -> ReadS ConformancePackDetail
ReadS [ConformancePackDetail]
(Int -> ReadS ConformancePackDetail)
-> ReadS [ConformancePackDetail]
-> ReadPrec ConformancePackDetail
-> ReadPrec [ConformancePackDetail]
-> Read ConformancePackDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConformancePackDetail]
$creadListPrec :: ReadPrec [ConformancePackDetail]
readPrec :: ReadPrec ConformancePackDetail
$creadPrec :: ReadPrec ConformancePackDetail
readList :: ReadS [ConformancePackDetail]
$creadList :: ReadS [ConformancePackDetail]
readsPrec :: Int -> ReadS ConformancePackDetail
$creadsPrec :: Int -> ReadS ConformancePackDetail
Prelude.Read, Int -> ConformancePackDetail -> ShowS
[ConformancePackDetail] -> ShowS
ConformancePackDetail -> String
(Int -> ConformancePackDetail -> ShowS)
-> (ConformancePackDetail -> String)
-> ([ConformancePackDetail] -> ShowS)
-> Show ConformancePackDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConformancePackDetail] -> ShowS
$cshowList :: [ConformancePackDetail] -> ShowS
show :: ConformancePackDetail -> String
$cshow :: ConformancePackDetail -> String
showsPrec :: Int -> ConformancePackDetail -> ShowS
$cshowsPrec :: Int -> ConformancePackDetail -> ShowS
Prelude.Show, (forall x. ConformancePackDetail -> Rep ConformancePackDetail x)
-> (forall x. Rep ConformancePackDetail x -> ConformancePackDetail)
-> Generic ConformancePackDetail
forall x. Rep ConformancePackDetail x -> ConformancePackDetail
forall x. ConformancePackDetail -> Rep ConformancePackDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConformancePackDetail x -> ConformancePackDetail
$cfrom :: forall x. ConformancePackDetail -> Rep ConformancePackDetail x
Prelude.Generic)
newConformancePackDetail ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ConformancePackDetail
newConformancePackDetail :: Text -> Text -> Text -> ConformancePackDetail
newConformancePackDetail
Text
pConformancePackName_
Text
pConformancePackArn_
Text
pConformancePackId_ =
ConformancePackDetail' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [ConformancePackInputParameter]
-> Text
-> Text
-> Text
-> ConformancePackDetail
ConformancePackDetail'
{ $sel:deliveryS3Bucket:ConformancePackDetail' :: Maybe Text
deliveryS3Bucket =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deliveryS3KeyPrefix:ConformancePackDetail' :: Maybe Text
deliveryS3KeyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdBy:ConformancePackDetail' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateRequestedTime:ConformancePackDetail' :: Maybe POSIX
lastUpdateRequestedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:conformancePackInputParameters:ConformancePackDetail' :: Maybe [ConformancePackInputParameter]
conformancePackInputParameters = Maybe [ConformancePackInputParameter]
forall a. Maybe a
Prelude.Nothing,
$sel:conformancePackName:ConformancePackDetail' :: Text
conformancePackName = Text
pConformancePackName_,
$sel:conformancePackArn:ConformancePackDetail' :: Text
conformancePackArn = Text
pConformancePackArn_,
$sel:conformancePackId:ConformancePackDetail' :: Text
conformancePackId = Text
pConformancePackId_
}
conformancePackDetail_deliveryS3Bucket :: Lens.Lens' ConformancePackDetail (Prelude.Maybe Prelude.Text)
conformancePackDetail_deliveryS3Bucket :: (Maybe Text -> f (Maybe Text))
-> ConformancePackDetail -> f ConformancePackDetail
conformancePackDetail_deliveryS3Bucket = (ConformancePackDetail -> Maybe Text)
-> (ConformancePackDetail -> Maybe Text -> ConformancePackDetail)
-> Lens
ConformancePackDetail
ConformancePackDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackDetail' {Maybe Text
deliveryS3Bucket :: Maybe Text
$sel:deliveryS3Bucket:ConformancePackDetail' :: ConformancePackDetail -> Maybe Text
deliveryS3Bucket} -> Maybe Text
deliveryS3Bucket) (\s :: ConformancePackDetail
s@ConformancePackDetail' {} Maybe Text
a -> ConformancePackDetail
s {$sel:deliveryS3Bucket:ConformancePackDetail' :: Maybe Text
deliveryS3Bucket = Maybe Text
a} :: ConformancePackDetail)
conformancePackDetail_deliveryS3KeyPrefix :: Lens.Lens' ConformancePackDetail (Prelude.Maybe Prelude.Text)
conformancePackDetail_deliveryS3KeyPrefix :: (Maybe Text -> f (Maybe Text))
-> ConformancePackDetail -> f ConformancePackDetail
conformancePackDetail_deliveryS3KeyPrefix = (ConformancePackDetail -> Maybe Text)
-> (ConformancePackDetail -> Maybe Text -> ConformancePackDetail)
-> Lens
ConformancePackDetail
ConformancePackDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackDetail' {Maybe Text
deliveryS3KeyPrefix :: Maybe Text
$sel:deliveryS3KeyPrefix:ConformancePackDetail' :: ConformancePackDetail -> Maybe Text
deliveryS3KeyPrefix} -> Maybe Text
deliveryS3KeyPrefix) (\s :: ConformancePackDetail
s@ConformancePackDetail' {} Maybe Text
a -> ConformancePackDetail
s {$sel:deliveryS3KeyPrefix:ConformancePackDetail' :: Maybe Text
deliveryS3KeyPrefix = Maybe Text
a} :: ConformancePackDetail)
conformancePackDetail_createdBy :: Lens.Lens' ConformancePackDetail (Prelude.Maybe Prelude.Text)
conformancePackDetail_createdBy :: (Maybe Text -> f (Maybe Text))
-> ConformancePackDetail -> f ConformancePackDetail
conformancePackDetail_createdBy = (ConformancePackDetail -> Maybe Text)
-> (ConformancePackDetail -> Maybe Text -> ConformancePackDetail)
-> Lens
ConformancePackDetail
ConformancePackDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackDetail' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:ConformancePackDetail' :: ConformancePackDetail -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: ConformancePackDetail
s@ConformancePackDetail' {} Maybe Text
a -> ConformancePackDetail
s {$sel:createdBy:ConformancePackDetail' :: Maybe Text
createdBy = Maybe Text
a} :: ConformancePackDetail)
conformancePackDetail_lastUpdateRequestedTime :: Lens.Lens' ConformancePackDetail (Prelude.Maybe Prelude.UTCTime)
conformancePackDetail_lastUpdateRequestedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConformancePackDetail -> f ConformancePackDetail
conformancePackDetail_lastUpdateRequestedTime = (ConformancePackDetail -> Maybe POSIX)
-> (ConformancePackDetail -> Maybe POSIX -> ConformancePackDetail)
-> Lens
ConformancePackDetail
ConformancePackDetail
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackDetail' {Maybe POSIX
lastUpdateRequestedTime :: Maybe POSIX
$sel:lastUpdateRequestedTime:ConformancePackDetail' :: ConformancePackDetail -> Maybe POSIX
lastUpdateRequestedTime} -> Maybe POSIX
lastUpdateRequestedTime) (\s :: ConformancePackDetail
s@ConformancePackDetail' {} Maybe POSIX
a -> ConformancePackDetail
s {$sel:lastUpdateRequestedTime:ConformancePackDetail' :: Maybe POSIX
lastUpdateRequestedTime = Maybe POSIX
a} :: ConformancePackDetail) ((Maybe POSIX -> f (Maybe POSIX))
-> ConformancePackDetail -> f ConformancePackDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConformancePackDetail
-> f ConformancePackDetail
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
conformancePackDetail_conformancePackInputParameters :: Lens.Lens' ConformancePackDetail (Prelude.Maybe [ConformancePackInputParameter])
conformancePackDetail_conformancePackInputParameters :: (Maybe [ConformancePackInputParameter]
-> f (Maybe [ConformancePackInputParameter]))
-> ConformancePackDetail -> f ConformancePackDetail
conformancePackDetail_conformancePackInputParameters = (ConformancePackDetail -> Maybe [ConformancePackInputParameter])
-> (ConformancePackDetail
-> Maybe [ConformancePackInputParameter] -> ConformancePackDetail)
-> Lens
ConformancePackDetail
ConformancePackDetail
(Maybe [ConformancePackInputParameter])
(Maybe [ConformancePackInputParameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackDetail' {Maybe [ConformancePackInputParameter]
conformancePackInputParameters :: Maybe [ConformancePackInputParameter]
$sel:conformancePackInputParameters:ConformancePackDetail' :: ConformancePackDetail -> Maybe [ConformancePackInputParameter]
conformancePackInputParameters} -> Maybe [ConformancePackInputParameter]
conformancePackInputParameters) (\s :: ConformancePackDetail
s@ConformancePackDetail' {} Maybe [ConformancePackInputParameter]
a -> ConformancePackDetail
s {$sel:conformancePackInputParameters:ConformancePackDetail' :: Maybe [ConformancePackInputParameter]
conformancePackInputParameters = Maybe [ConformancePackInputParameter]
a} :: ConformancePackDetail) ((Maybe [ConformancePackInputParameter]
-> f (Maybe [ConformancePackInputParameter]))
-> ConformancePackDetail -> f ConformancePackDetail)
-> ((Maybe [ConformancePackInputParameter]
-> f (Maybe [ConformancePackInputParameter]))
-> Maybe [ConformancePackInputParameter]
-> f (Maybe [ConformancePackInputParameter]))
-> (Maybe [ConformancePackInputParameter]
-> f (Maybe [ConformancePackInputParameter]))
-> ConformancePackDetail
-> f ConformancePackDetail
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
conformancePackDetail_conformancePackName :: Lens.Lens' ConformancePackDetail Prelude.Text
conformancePackDetail_conformancePackName :: (Text -> f Text)
-> ConformancePackDetail -> f ConformancePackDetail
conformancePackDetail_conformancePackName = (ConformancePackDetail -> Text)
-> (ConformancePackDetail -> Text -> ConformancePackDetail)
-> Lens ConformancePackDetail ConformancePackDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackDetail' {Text
conformancePackName :: Text
$sel:conformancePackName:ConformancePackDetail' :: ConformancePackDetail -> Text
conformancePackName} -> Text
conformancePackName) (\s :: ConformancePackDetail
s@ConformancePackDetail' {} Text
a -> ConformancePackDetail
s {$sel:conformancePackName:ConformancePackDetail' :: Text
conformancePackName = Text
a} :: ConformancePackDetail)
conformancePackDetail_conformancePackArn :: Lens.Lens' ConformancePackDetail Prelude.Text
conformancePackDetail_conformancePackArn :: (Text -> f Text)
-> ConformancePackDetail -> f ConformancePackDetail
conformancePackDetail_conformancePackArn = (ConformancePackDetail -> Text)
-> (ConformancePackDetail -> Text -> ConformancePackDetail)
-> Lens ConformancePackDetail ConformancePackDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackDetail' {Text
conformancePackArn :: Text
$sel:conformancePackArn:ConformancePackDetail' :: ConformancePackDetail -> Text
conformancePackArn} -> Text
conformancePackArn) (\s :: ConformancePackDetail
s@ConformancePackDetail' {} Text
a -> ConformancePackDetail
s {$sel:conformancePackArn:ConformancePackDetail' :: Text
conformancePackArn = Text
a} :: ConformancePackDetail)
conformancePackDetail_conformancePackId :: Lens.Lens' ConformancePackDetail Prelude.Text
conformancePackDetail_conformancePackId :: (Text -> f Text)
-> ConformancePackDetail -> f ConformancePackDetail
conformancePackDetail_conformancePackId = (ConformancePackDetail -> Text)
-> (ConformancePackDetail -> Text -> ConformancePackDetail)
-> Lens ConformancePackDetail ConformancePackDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackDetail' {Text
conformancePackId :: Text
$sel:conformancePackId:ConformancePackDetail' :: ConformancePackDetail -> Text
conformancePackId} -> Text
conformancePackId) (\s :: ConformancePackDetail
s@ConformancePackDetail' {} Text
a -> ConformancePackDetail
s {$sel:conformancePackId:ConformancePackDetail' :: Text
conformancePackId = Text
a} :: ConformancePackDetail)
instance Core.FromJSON ConformancePackDetail where
parseJSON :: Value -> Parser ConformancePackDetail
parseJSON =
String
-> (Object -> Parser ConformancePackDetail)
-> Value
-> Parser ConformancePackDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConformancePackDetail"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [ConformancePackInputParameter]
-> Text
-> Text
-> Text
-> ConformancePackDetail
ConformancePackDetail'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [ConformancePackInputParameter]
-> Text
-> Text
-> Text
-> ConformancePackDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [ConformancePackInputParameter]
-> Text
-> Text
-> Text
-> ConformancePackDetail)
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 Text
-> Maybe POSIX
-> Maybe [ConformancePackInputParameter]
-> Text
-> Text
-> Text
-> ConformancePackDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe [ConformancePackInputParameter]
-> Text
-> Text
-> Text
-> ConformancePackDetail)
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 Text
-> Maybe POSIX
-> Maybe [ConformancePackInputParameter]
-> Text
-> Text
-> Text
-> ConformancePackDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe [ConformancePackInputParameter]
-> Text
-> Text
-> Text
-> ConformancePackDetail)
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 POSIX
-> Maybe [ConformancePackInputParameter]
-> Text
-> Text
-> Text
-> ConformancePackDetail)
-> Parser (Maybe POSIX)
-> Parser
(Maybe [ConformancePackInputParameter]
-> Text -> Text -> Text -> ConformancePackDetail)
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
"LastUpdateRequestedTime")
Parser
(Maybe [ConformancePackInputParameter]
-> Text -> Text -> Text -> ConformancePackDetail)
-> Parser (Maybe [ConformancePackInputParameter])
-> Parser (Text -> Text -> Text -> ConformancePackDetail)
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 (Text -> Text -> Text -> ConformancePackDetail)
-> Parser Text -> Parser (Text -> Text -> ConformancePackDetail)
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
"ConformancePackName")
Parser (Text -> Text -> ConformancePackDetail)
-> Parser Text -> Parser (Text -> ConformancePackDetail)
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
"ConformancePackArn")
Parser (Text -> ConformancePackDetail)
-> Parser Text -> Parser ConformancePackDetail
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
"ConformancePackId")
)
instance Prelude.Hashable ConformancePackDetail
instance Prelude.NFData ConformancePackDetail