{-# 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.SecurityHub.Types.AwsSqsQueueDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsSqsQueueDetails = AwsSqsQueueDetails'
{
AwsSqsQueueDetails -> Maybe Text
kmsMasterKeyId :: Prelude.Maybe Prelude.Text,
AwsSqsQueueDetails -> Maybe Text
queueName :: Prelude.Maybe Prelude.Text,
AwsSqsQueueDetails -> Maybe Int
kmsDataKeyReusePeriodSeconds :: Prelude.Maybe Prelude.Int,
AwsSqsQueueDetails -> Maybe Text
deadLetterTargetArn :: Prelude.Maybe Prelude.Text
}
deriving (AwsSqsQueueDetails -> AwsSqsQueueDetails -> Bool
(AwsSqsQueueDetails -> AwsSqsQueueDetails -> Bool)
-> (AwsSqsQueueDetails -> AwsSqsQueueDetails -> Bool)
-> Eq AwsSqsQueueDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsSqsQueueDetails -> AwsSqsQueueDetails -> Bool
$c/= :: AwsSqsQueueDetails -> AwsSqsQueueDetails -> Bool
== :: AwsSqsQueueDetails -> AwsSqsQueueDetails -> Bool
$c== :: AwsSqsQueueDetails -> AwsSqsQueueDetails -> Bool
Prelude.Eq, ReadPrec [AwsSqsQueueDetails]
ReadPrec AwsSqsQueueDetails
Int -> ReadS AwsSqsQueueDetails
ReadS [AwsSqsQueueDetails]
(Int -> ReadS AwsSqsQueueDetails)
-> ReadS [AwsSqsQueueDetails]
-> ReadPrec AwsSqsQueueDetails
-> ReadPrec [AwsSqsQueueDetails]
-> Read AwsSqsQueueDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsSqsQueueDetails]
$creadListPrec :: ReadPrec [AwsSqsQueueDetails]
readPrec :: ReadPrec AwsSqsQueueDetails
$creadPrec :: ReadPrec AwsSqsQueueDetails
readList :: ReadS [AwsSqsQueueDetails]
$creadList :: ReadS [AwsSqsQueueDetails]
readsPrec :: Int -> ReadS AwsSqsQueueDetails
$creadsPrec :: Int -> ReadS AwsSqsQueueDetails
Prelude.Read, Int -> AwsSqsQueueDetails -> ShowS
[AwsSqsQueueDetails] -> ShowS
AwsSqsQueueDetails -> String
(Int -> AwsSqsQueueDetails -> ShowS)
-> (AwsSqsQueueDetails -> String)
-> ([AwsSqsQueueDetails] -> ShowS)
-> Show AwsSqsQueueDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsSqsQueueDetails] -> ShowS
$cshowList :: [AwsSqsQueueDetails] -> ShowS
show :: AwsSqsQueueDetails -> String
$cshow :: AwsSqsQueueDetails -> String
showsPrec :: Int -> AwsSqsQueueDetails -> ShowS
$cshowsPrec :: Int -> AwsSqsQueueDetails -> ShowS
Prelude.Show, (forall x. AwsSqsQueueDetails -> Rep AwsSqsQueueDetails x)
-> (forall x. Rep AwsSqsQueueDetails x -> AwsSqsQueueDetails)
-> Generic AwsSqsQueueDetails
forall x. Rep AwsSqsQueueDetails x -> AwsSqsQueueDetails
forall x. AwsSqsQueueDetails -> Rep AwsSqsQueueDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AwsSqsQueueDetails x -> AwsSqsQueueDetails
$cfrom :: forall x. AwsSqsQueueDetails -> Rep AwsSqsQueueDetails x
Prelude.Generic)
newAwsSqsQueueDetails ::
AwsSqsQueueDetails
newAwsSqsQueueDetails :: AwsSqsQueueDetails
newAwsSqsQueueDetails =
AwsSqsQueueDetails' :: Maybe Text
-> Maybe Text -> Maybe Int -> Maybe Text -> AwsSqsQueueDetails
AwsSqsQueueDetails'
{ $sel:kmsMasterKeyId:AwsSqsQueueDetails' :: Maybe Text
kmsMasterKeyId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:queueName:AwsSqsQueueDetails' :: Maybe Text
queueName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsDataKeyReusePeriodSeconds:AwsSqsQueueDetails' :: Maybe Int
kmsDataKeyReusePeriodSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:deadLetterTargetArn:AwsSqsQueueDetails' :: Maybe Text
deadLetterTargetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsSqsQueueDetails_kmsMasterKeyId :: Lens.Lens' AwsSqsQueueDetails (Prelude.Maybe Prelude.Text)
awsSqsQueueDetails_kmsMasterKeyId :: (Maybe Text -> f (Maybe Text))
-> AwsSqsQueueDetails -> f AwsSqsQueueDetails
awsSqsQueueDetails_kmsMasterKeyId = (AwsSqsQueueDetails -> Maybe Text)
-> (AwsSqsQueueDetails -> Maybe Text -> AwsSqsQueueDetails)
-> Lens
AwsSqsQueueDetails AwsSqsQueueDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsSqsQueueDetails' {Maybe Text
kmsMasterKeyId :: Maybe Text
$sel:kmsMasterKeyId:AwsSqsQueueDetails' :: AwsSqsQueueDetails -> Maybe Text
kmsMasterKeyId} -> Maybe Text
kmsMasterKeyId) (\s :: AwsSqsQueueDetails
s@AwsSqsQueueDetails' {} Maybe Text
a -> AwsSqsQueueDetails
s {$sel:kmsMasterKeyId:AwsSqsQueueDetails' :: Maybe Text
kmsMasterKeyId = Maybe Text
a} :: AwsSqsQueueDetails)
awsSqsQueueDetails_queueName :: Lens.Lens' AwsSqsQueueDetails (Prelude.Maybe Prelude.Text)
awsSqsQueueDetails_queueName :: (Maybe Text -> f (Maybe Text))
-> AwsSqsQueueDetails -> f AwsSqsQueueDetails
awsSqsQueueDetails_queueName = (AwsSqsQueueDetails -> Maybe Text)
-> (AwsSqsQueueDetails -> Maybe Text -> AwsSqsQueueDetails)
-> Lens
AwsSqsQueueDetails AwsSqsQueueDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsSqsQueueDetails' {Maybe Text
queueName :: Maybe Text
$sel:queueName:AwsSqsQueueDetails' :: AwsSqsQueueDetails -> Maybe Text
queueName} -> Maybe Text
queueName) (\s :: AwsSqsQueueDetails
s@AwsSqsQueueDetails' {} Maybe Text
a -> AwsSqsQueueDetails
s {$sel:queueName:AwsSqsQueueDetails' :: Maybe Text
queueName = Maybe Text
a} :: AwsSqsQueueDetails)
awsSqsQueueDetails_kmsDataKeyReusePeriodSeconds :: Lens.Lens' AwsSqsQueueDetails (Prelude.Maybe Prelude.Int)
awsSqsQueueDetails_kmsDataKeyReusePeriodSeconds :: (Maybe Int -> f (Maybe Int))
-> AwsSqsQueueDetails -> f AwsSqsQueueDetails
awsSqsQueueDetails_kmsDataKeyReusePeriodSeconds = (AwsSqsQueueDetails -> Maybe Int)
-> (AwsSqsQueueDetails -> Maybe Int -> AwsSqsQueueDetails)
-> Lens
AwsSqsQueueDetails AwsSqsQueueDetails (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsSqsQueueDetails' {Maybe Int
kmsDataKeyReusePeriodSeconds :: Maybe Int
$sel:kmsDataKeyReusePeriodSeconds:AwsSqsQueueDetails' :: AwsSqsQueueDetails -> Maybe Int
kmsDataKeyReusePeriodSeconds} -> Maybe Int
kmsDataKeyReusePeriodSeconds) (\s :: AwsSqsQueueDetails
s@AwsSqsQueueDetails' {} Maybe Int
a -> AwsSqsQueueDetails
s {$sel:kmsDataKeyReusePeriodSeconds:AwsSqsQueueDetails' :: Maybe Int
kmsDataKeyReusePeriodSeconds = Maybe Int
a} :: AwsSqsQueueDetails)
awsSqsQueueDetails_deadLetterTargetArn :: Lens.Lens' AwsSqsQueueDetails (Prelude.Maybe Prelude.Text)
awsSqsQueueDetails_deadLetterTargetArn :: (Maybe Text -> f (Maybe Text))
-> AwsSqsQueueDetails -> f AwsSqsQueueDetails
awsSqsQueueDetails_deadLetterTargetArn = (AwsSqsQueueDetails -> Maybe Text)
-> (AwsSqsQueueDetails -> Maybe Text -> AwsSqsQueueDetails)
-> Lens
AwsSqsQueueDetails AwsSqsQueueDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsSqsQueueDetails' {Maybe Text
deadLetterTargetArn :: Maybe Text
$sel:deadLetterTargetArn:AwsSqsQueueDetails' :: AwsSqsQueueDetails -> Maybe Text
deadLetterTargetArn} -> Maybe Text
deadLetterTargetArn) (\s :: AwsSqsQueueDetails
s@AwsSqsQueueDetails' {} Maybe Text
a -> AwsSqsQueueDetails
s {$sel:deadLetterTargetArn:AwsSqsQueueDetails' :: Maybe Text
deadLetterTargetArn = Maybe Text
a} :: AwsSqsQueueDetails)
instance Core.FromJSON AwsSqsQueueDetails where
parseJSON :: Value -> Parser AwsSqsQueueDetails
parseJSON =
String
-> (Object -> Parser AwsSqsQueueDetails)
-> Value
-> Parser AwsSqsQueueDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsSqsQueueDetails"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Int -> Maybe Text -> AwsSqsQueueDetails
AwsSqsQueueDetails'
(Maybe Text
-> Maybe Text -> Maybe Int -> Maybe Text -> AwsSqsQueueDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Int -> Maybe Text -> AwsSqsQueueDetails)
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
"KmsMasterKeyId")
Parser
(Maybe Text -> Maybe Int -> Maybe Text -> AwsSqsQueueDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> Maybe Text -> AwsSqsQueueDetails)
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
"QueueName")
Parser (Maybe Int -> Maybe Text -> AwsSqsQueueDetails)
-> Parser (Maybe Int) -> Parser (Maybe Text -> AwsSqsQueueDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KmsDataKeyReusePeriodSeconds")
Parser (Maybe Text -> AwsSqsQueueDetails)
-> Parser (Maybe Text) -> Parser AwsSqsQueueDetails
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
"DeadLetterTargetArn")
)
instance Prelude.Hashable AwsSqsQueueDetails
instance Prelude.NFData AwsSqsQueueDetails
instance Core.ToJSON AwsSqsQueueDetails where
toJSON :: AwsSqsQueueDetails -> Value
toJSON AwsSqsQueueDetails' {Maybe Int
Maybe Text
deadLetterTargetArn :: Maybe Text
kmsDataKeyReusePeriodSeconds :: Maybe Int
queueName :: Maybe Text
kmsMasterKeyId :: Maybe Text
$sel:deadLetterTargetArn:AwsSqsQueueDetails' :: AwsSqsQueueDetails -> Maybe Text
$sel:kmsDataKeyReusePeriodSeconds:AwsSqsQueueDetails' :: AwsSqsQueueDetails -> Maybe Int
$sel:queueName:AwsSqsQueueDetails' :: AwsSqsQueueDetails -> Maybe Text
$sel:kmsMasterKeyId:AwsSqsQueueDetails' :: AwsSqsQueueDetails -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"KmsMasterKeyId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsMasterKeyId,
(Text
"QueueName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
queueName,
(Text
"KmsDataKeyReusePeriodSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
kmsDataKeyReusePeriodSeconds,
(Text
"DeadLetterTargetArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
deadLetterTargetArn
]
)