{-# 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 Amazonka.Config.Types.TemplateSSMDocumentDetails
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 ConformancePackDetail = ConformancePackDetail'
{
ConformancePackDetail -> Maybe [ConformancePackInputParameter]
conformancePackInputParameters :: Prelude.Maybe [ConformancePackInputParameter],
ConformancePackDetail -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
ConformancePackDetail -> Maybe Text
deliveryS3Bucket :: Prelude.Maybe Prelude.Text,
ConformancePackDetail -> Maybe Text
deliveryS3KeyPrefix :: Prelude.Maybe Prelude.Text,
ConformancePackDetail -> Maybe POSIX
lastUpdateRequestedTime :: Prelude.Maybe Data.POSIX,
ConformancePackDetail -> Maybe TemplateSSMDocumentDetails
templateSSMDocumentDetails :: Prelude.Maybe TemplateSSMDocumentDetails,
ConformancePackDetail -> Text
conformancePackName :: Prelude.Text,
ConformancePackDetail -> Text
conformancePackArn :: Prelude.Text,
ConformancePackDetail -> Text
conformancePackId :: Prelude.Text
}
deriving (ConformancePackDetail -> ConformancePackDetail -> Bool
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]
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
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. 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'
{ $sel:conformancePackInputParameters:ConformancePackDetail' :: Maybe [ConformancePackInputParameter]
conformancePackInputParameters =
forall a. Maybe a
Prelude.Nothing,
$sel:createdBy:ConformancePackDetail' :: Maybe Text
createdBy = forall a. Maybe a
Prelude.Nothing,
$sel:deliveryS3Bucket:ConformancePackDetail' :: Maybe Text
deliveryS3Bucket = forall a. Maybe a
Prelude.Nothing,
$sel:deliveryS3KeyPrefix:ConformancePackDetail' :: Maybe Text
deliveryS3KeyPrefix = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateRequestedTime:ConformancePackDetail' :: Maybe POSIX
lastUpdateRequestedTime = forall a. Maybe a
Prelude.Nothing,
$sel:templateSSMDocumentDetails:ConformancePackDetail' :: Maybe TemplateSSMDocumentDetails
templateSSMDocumentDetails = 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_conformancePackInputParameters :: Lens.Lens' ConformancePackDetail (Prelude.Maybe [ConformancePackInputParameter])
conformancePackDetail_conformancePackInputParameters :: Lens' ConformancePackDetail (Maybe [ConformancePackInputParameter])
conformancePackDetail_conformancePackInputParameters = 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) 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
conformancePackDetail_createdBy :: Lens.Lens' ConformancePackDetail (Prelude.Maybe Prelude.Text)
conformancePackDetail_createdBy :: Lens' ConformancePackDetail (Maybe Text)
conformancePackDetail_createdBy = 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_deliveryS3Bucket :: Lens.Lens' ConformancePackDetail (Prelude.Maybe Prelude.Text)
conformancePackDetail_deliveryS3Bucket :: Lens' ConformancePackDetail (Maybe Text)
conformancePackDetail_deliveryS3Bucket = 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 :: Lens' ConformancePackDetail (Maybe Text)
conformancePackDetail_deliveryS3KeyPrefix = 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_lastUpdateRequestedTime :: Lens.Lens' ConformancePackDetail (Prelude.Maybe Prelude.UTCTime)
conformancePackDetail_lastUpdateRequestedTime :: Lens' ConformancePackDetail (Maybe UTCTime)
conformancePackDetail_lastUpdateRequestedTime = 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) 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
conformancePackDetail_templateSSMDocumentDetails :: Lens.Lens' ConformancePackDetail (Prelude.Maybe TemplateSSMDocumentDetails)
conformancePackDetail_templateSSMDocumentDetails :: Lens' ConformancePackDetail (Maybe TemplateSSMDocumentDetails)
conformancePackDetail_templateSSMDocumentDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackDetail' {Maybe TemplateSSMDocumentDetails
templateSSMDocumentDetails :: Maybe TemplateSSMDocumentDetails
$sel:templateSSMDocumentDetails:ConformancePackDetail' :: ConformancePackDetail -> Maybe TemplateSSMDocumentDetails
templateSSMDocumentDetails} -> Maybe TemplateSSMDocumentDetails
templateSSMDocumentDetails) (\s :: ConformancePackDetail
s@ConformancePackDetail' {} Maybe TemplateSSMDocumentDetails
a -> ConformancePackDetail
s {$sel:templateSSMDocumentDetails:ConformancePackDetail' :: Maybe TemplateSSMDocumentDetails
templateSSMDocumentDetails = Maybe TemplateSSMDocumentDetails
a} :: ConformancePackDetail)
conformancePackDetail_conformancePackName :: Lens.Lens' ConformancePackDetail Prelude.Text
conformancePackDetail_conformancePackName :: Lens' ConformancePackDetail Text
conformancePackDetail_conformancePackName = 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 :: Lens' ConformancePackDetail Text
conformancePackDetail_conformancePackArn = 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 :: Lens' ConformancePackDetail Text
conformancePackDetail_conformancePackId = 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 Data.FromJSON ConformancePackDetail where
parseJSON :: Value -> Parser ConformancePackDetail
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConformancePackDetail"
( \Object
x ->
Maybe [ConformancePackInputParameter]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe TemplateSSMDocumentDetails
-> Text
-> Text
-> Text
-> ConformancePackDetail
ConformancePackDetail'
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
"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
"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
"LastUpdateRequestedTime")
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
"TemplateSSMDocumentDetails")
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
"ConformancePackName")
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
"ConformancePackArn")
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
"ConformancePackId")
)
instance Prelude.Hashable ConformancePackDetail where
hashWithSalt :: Int -> ConformancePackDetail -> Int
hashWithSalt Int
_salt ConformancePackDetail' {Maybe [ConformancePackInputParameter]
Maybe Text
Maybe POSIX
Maybe TemplateSSMDocumentDetails
Text
conformancePackId :: Text
conformancePackArn :: Text
conformancePackName :: Text
templateSSMDocumentDetails :: Maybe TemplateSSMDocumentDetails
lastUpdateRequestedTime :: Maybe POSIX
deliveryS3KeyPrefix :: Maybe Text
deliveryS3Bucket :: Maybe Text
createdBy :: Maybe Text
conformancePackInputParameters :: Maybe [ConformancePackInputParameter]
$sel:conformancePackId:ConformancePackDetail' :: ConformancePackDetail -> Text
$sel:conformancePackArn:ConformancePackDetail' :: ConformancePackDetail -> Text
$sel:conformancePackName:ConformancePackDetail' :: ConformancePackDetail -> Text
$sel:templateSSMDocumentDetails:ConformancePackDetail' :: ConformancePackDetail -> Maybe TemplateSSMDocumentDetails
$sel:lastUpdateRequestedTime:ConformancePackDetail' :: ConformancePackDetail -> Maybe POSIX
$sel:deliveryS3KeyPrefix:ConformancePackDetail' :: ConformancePackDetail -> Maybe Text
$sel:deliveryS3Bucket:ConformancePackDetail' :: ConformancePackDetail -> Maybe Text
$sel:createdBy:ConformancePackDetail' :: ConformancePackDetail -> Maybe Text
$sel:conformancePackInputParameters:ConformancePackDetail' :: ConformancePackDetail -> 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
createdBy
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 POSIX
lastUpdateRequestedTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TemplateSSMDocumentDetails
templateSSMDocumentDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
conformancePackName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
conformancePackArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
conformancePackId
instance Prelude.NFData ConformancePackDetail where
rnf :: ConformancePackDetail -> ()
rnf ConformancePackDetail' {Maybe [ConformancePackInputParameter]
Maybe Text
Maybe POSIX
Maybe TemplateSSMDocumentDetails
Text
conformancePackId :: Text
conformancePackArn :: Text
conformancePackName :: Text
templateSSMDocumentDetails :: Maybe TemplateSSMDocumentDetails
lastUpdateRequestedTime :: Maybe POSIX
deliveryS3KeyPrefix :: Maybe Text
deliveryS3Bucket :: Maybe Text
createdBy :: Maybe Text
conformancePackInputParameters :: Maybe [ConformancePackInputParameter]
$sel:conformancePackId:ConformancePackDetail' :: ConformancePackDetail -> Text
$sel:conformancePackArn:ConformancePackDetail' :: ConformancePackDetail -> Text
$sel:conformancePackName:ConformancePackDetail' :: ConformancePackDetail -> Text
$sel:templateSSMDocumentDetails:ConformancePackDetail' :: ConformancePackDetail -> Maybe TemplateSSMDocumentDetails
$sel:lastUpdateRequestedTime:ConformancePackDetail' :: ConformancePackDetail -> Maybe POSIX
$sel:deliveryS3KeyPrefix:ConformancePackDetail' :: ConformancePackDetail -> Maybe Text
$sel:deliveryS3Bucket:ConformancePackDetail' :: ConformancePackDetail -> Maybe Text
$sel:createdBy:ConformancePackDetail' :: ConformancePackDetail -> Maybe Text
$sel:conformancePackInputParameters:ConformancePackDetail' :: ConformancePackDetail -> 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
createdBy
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 POSIX
lastUpdateRequestedTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TemplateSSMDocumentDetails
templateSSMDocumentDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
conformancePackName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
conformancePackArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
conformancePackId