{-# 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.AccessAnalyzer.Types.SqsQueueConfiguration where
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 SqsQueueConfiguration = SqsQueueConfiguration'
{
SqsQueueConfiguration -> Maybe Text
queuePolicy :: Prelude.Maybe Prelude.Text
}
deriving (SqsQueueConfiguration -> SqsQueueConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SqsQueueConfiguration -> SqsQueueConfiguration -> Bool
$c/= :: SqsQueueConfiguration -> SqsQueueConfiguration -> Bool
== :: SqsQueueConfiguration -> SqsQueueConfiguration -> Bool
$c== :: SqsQueueConfiguration -> SqsQueueConfiguration -> Bool
Prelude.Eq, ReadPrec [SqsQueueConfiguration]
ReadPrec SqsQueueConfiguration
Int -> ReadS SqsQueueConfiguration
ReadS [SqsQueueConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SqsQueueConfiguration]
$creadListPrec :: ReadPrec [SqsQueueConfiguration]
readPrec :: ReadPrec SqsQueueConfiguration
$creadPrec :: ReadPrec SqsQueueConfiguration
readList :: ReadS [SqsQueueConfiguration]
$creadList :: ReadS [SqsQueueConfiguration]
readsPrec :: Int -> ReadS SqsQueueConfiguration
$creadsPrec :: Int -> ReadS SqsQueueConfiguration
Prelude.Read, Int -> SqsQueueConfiguration -> ShowS
[SqsQueueConfiguration] -> ShowS
SqsQueueConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SqsQueueConfiguration] -> ShowS
$cshowList :: [SqsQueueConfiguration] -> ShowS
show :: SqsQueueConfiguration -> String
$cshow :: SqsQueueConfiguration -> String
showsPrec :: Int -> SqsQueueConfiguration -> ShowS
$cshowsPrec :: Int -> SqsQueueConfiguration -> ShowS
Prelude.Show, forall x. Rep SqsQueueConfiguration x -> SqsQueueConfiguration
forall x. SqsQueueConfiguration -> Rep SqsQueueConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SqsQueueConfiguration x -> SqsQueueConfiguration
$cfrom :: forall x. SqsQueueConfiguration -> Rep SqsQueueConfiguration x
Prelude.Generic)
newSqsQueueConfiguration ::
SqsQueueConfiguration
newSqsQueueConfiguration :: SqsQueueConfiguration
newSqsQueueConfiguration =
SqsQueueConfiguration'
{ $sel:queuePolicy:SqsQueueConfiguration' :: Maybe Text
queuePolicy =
forall a. Maybe a
Prelude.Nothing
}
sqsQueueConfiguration_queuePolicy :: Lens.Lens' SqsQueueConfiguration (Prelude.Maybe Prelude.Text)
sqsQueueConfiguration_queuePolicy :: Lens' SqsQueueConfiguration (Maybe Text)
sqsQueueConfiguration_queuePolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqsQueueConfiguration' {Maybe Text
queuePolicy :: Maybe Text
$sel:queuePolicy:SqsQueueConfiguration' :: SqsQueueConfiguration -> Maybe Text
queuePolicy} -> Maybe Text
queuePolicy) (\s :: SqsQueueConfiguration
s@SqsQueueConfiguration' {} Maybe Text
a -> SqsQueueConfiguration
s {$sel:queuePolicy:SqsQueueConfiguration' :: Maybe Text
queuePolicy = Maybe Text
a} :: SqsQueueConfiguration)
instance Data.FromJSON SqsQueueConfiguration where
parseJSON :: Value -> Parser SqsQueueConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SqsQueueConfiguration"
( \Object
x ->
Maybe Text -> SqsQueueConfiguration
SqsQueueConfiguration'
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
"queuePolicy")
)
instance Prelude.Hashable SqsQueueConfiguration where
hashWithSalt :: Int -> SqsQueueConfiguration -> Int
hashWithSalt Int
_salt SqsQueueConfiguration' {Maybe Text
queuePolicy :: Maybe Text
$sel:queuePolicy:SqsQueueConfiguration' :: SqsQueueConfiguration -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
queuePolicy
instance Prelude.NFData SqsQueueConfiguration where
rnf :: SqsQueueConfiguration -> ()
rnf SqsQueueConfiguration' {Maybe Text
queuePolicy :: Maybe Text
$sel:queuePolicy:SqsQueueConfiguration' :: SqsQueueConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
queuePolicy
instance Data.ToJSON SqsQueueConfiguration where
toJSON :: SqsQueueConfiguration -> Value
toJSON SqsQueueConfiguration' {Maybe Text
queuePolicy :: Maybe Text
$sel:queuePolicy:SqsQueueConfiguration' :: SqsQueueConfiguration -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"queuePolicy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
queuePolicy]
)