{-# 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.SQS.Types.MessageSystemAttributeValue where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MessageSystemAttributeValue = MessageSystemAttributeValue'
{
MessageSystemAttributeValue -> Maybe Base64
binaryValue :: Prelude.Maybe Core.Base64,
MessageSystemAttributeValue -> Maybe [Text]
stringListValues :: Prelude.Maybe [Prelude.Text],
MessageSystemAttributeValue -> Maybe Text
stringValue :: Prelude.Maybe Prelude.Text,
MessageSystemAttributeValue -> Maybe [Base64]
binaryListValues :: Prelude.Maybe [Core.Base64],
MessageSystemAttributeValue -> Text
dataType :: Prelude.Text
}
deriving (MessageSystemAttributeValue -> MessageSystemAttributeValue -> Bool
(MessageSystemAttributeValue
-> MessageSystemAttributeValue -> Bool)
-> (MessageSystemAttributeValue
-> MessageSystemAttributeValue -> Bool)
-> Eq MessageSystemAttributeValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MessageSystemAttributeValue -> MessageSystemAttributeValue -> Bool
$c/= :: MessageSystemAttributeValue -> MessageSystemAttributeValue -> Bool
== :: MessageSystemAttributeValue -> MessageSystemAttributeValue -> Bool
$c== :: MessageSystemAttributeValue -> MessageSystemAttributeValue -> Bool
Prelude.Eq, ReadPrec [MessageSystemAttributeValue]
ReadPrec MessageSystemAttributeValue
Int -> ReadS MessageSystemAttributeValue
ReadS [MessageSystemAttributeValue]
(Int -> ReadS MessageSystemAttributeValue)
-> ReadS [MessageSystemAttributeValue]
-> ReadPrec MessageSystemAttributeValue
-> ReadPrec [MessageSystemAttributeValue]
-> Read MessageSystemAttributeValue
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MessageSystemAttributeValue]
$creadListPrec :: ReadPrec [MessageSystemAttributeValue]
readPrec :: ReadPrec MessageSystemAttributeValue
$creadPrec :: ReadPrec MessageSystemAttributeValue
readList :: ReadS [MessageSystemAttributeValue]
$creadList :: ReadS [MessageSystemAttributeValue]
readsPrec :: Int -> ReadS MessageSystemAttributeValue
$creadsPrec :: Int -> ReadS MessageSystemAttributeValue
Prelude.Read, Int -> MessageSystemAttributeValue -> ShowS
[MessageSystemAttributeValue] -> ShowS
MessageSystemAttributeValue -> String
(Int -> MessageSystemAttributeValue -> ShowS)
-> (MessageSystemAttributeValue -> String)
-> ([MessageSystemAttributeValue] -> ShowS)
-> Show MessageSystemAttributeValue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MessageSystemAttributeValue] -> ShowS
$cshowList :: [MessageSystemAttributeValue] -> ShowS
show :: MessageSystemAttributeValue -> String
$cshow :: MessageSystemAttributeValue -> String
showsPrec :: Int -> MessageSystemAttributeValue -> ShowS
$cshowsPrec :: Int -> MessageSystemAttributeValue -> ShowS
Prelude.Show, (forall x.
MessageSystemAttributeValue -> Rep MessageSystemAttributeValue x)
-> (forall x.
Rep MessageSystemAttributeValue x -> MessageSystemAttributeValue)
-> Generic MessageSystemAttributeValue
forall x.
Rep MessageSystemAttributeValue x -> MessageSystemAttributeValue
forall x.
MessageSystemAttributeValue -> Rep MessageSystemAttributeValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MessageSystemAttributeValue x -> MessageSystemAttributeValue
$cfrom :: forall x.
MessageSystemAttributeValue -> Rep MessageSystemAttributeValue x
Prelude.Generic)
newMessageSystemAttributeValue ::
Prelude.Text ->
MessageSystemAttributeValue
newMessageSystemAttributeValue :: Text -> MessageSystemAttributeValue
newMessageSystemAttributeValue Text
pDataType_ =
MessageSystemAttributeValue' :: Maybe Base64
-> Maybe [Text]
-> Maybe Text
-> Maybe [Base64]
-> Text
-> MessageSystemAttributeValue
MessageSystemAttributeValue'
{ $sel:binaryValue:MessageSystemAttributeValue' :: Maybe Base64
binaryValue =
Maybe Base64
forall a. Maybe a
Prelude.Nothing,
$sel:stringListValues:MessageSystemAttributeValue' :: Maybe [Text]
stringListValues = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:stringValue:MessageSystemAttributeValue' :: Maybe Text
stringValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:binaryListValues:MessageSystemAttributeValue' :: Maybe [Base64]
binaryListValues = Maybe [Base64]
forall a. Maybe a
Prelude.Nothing,
$sel:dataType:MessageSystemAttributeValue' :: Text
dataType = Text
pDataType_
}
messageSystemAttributeValue_binaryValue :: Lens.Lens' MessageSystemAttributeValue (Prelude.Maybe Prelude.ByteString)
messageSystemAttributeValue_binaryValue :: (Maybe ByteString -> f (Maybe ByteString))
-> MessageSystemAttributeValue -> f MessageSystemAttributeValue
messageSystemAttributeValue_binaryValue = (MessageSystemAttributeValue -> Maybe Base64)
-> (MessageSystemAttributeValue
-> Maybe Base64 -> MessageSystemAttributeValue)
-> Lens
MessageSystemAttributeValue
MessageSystemAttributeValue
(Maybe Base64)
(Maybe Base64)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MessageSystemAttributeValue' {Maybe Base64
binaryValue :: Maybe Base64
$sel:binaryValue:MessageSystemAttributeValue' :: MessageSystemAttributeValue -> Maybe Base64
binaryValue} -> Maybe Base64
binaryValue) (\s :: MessageSystemAttributeValue
s@MessageSystemAttributeValue' {} Maybe Base64
a -> MessageSystemAttributeValue
s {$sel:binaryValue:MessageSystemAttributeValue' :: Maybe Base64
binaryValue = Maybe Base64
a} :: MessageSystemAttributeValue) ((Maybe Base64 -> f (Maybe Base64))
-> MessageSystemAttributeValue -> f MessageSystemAttributeValue)
-> ((Maybe ByteString -> f (Maybe ByteString))
-> Maybe Base64 -> f (Maybe Base64))
-> (Maybe ByteString -> f (Maybe ByteString))
-> MessageSystemAttributeValue
-> f MessageSystemAttributeValue
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso Base64 Base64 ByteString ByteString
-> Iso
(Maybe Base64) (Maybe Base64) (Maybe ByteString) (Maybe ByteString)
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 Base64 Base64 ByteString ByteString
Iso' Base64 ByteString
Core._Base64
messageSystemAttributeValue_stringListValues :: Lens.Lens' MessageSystemAttributeValue (Prelude.Maybe [Prelude.Text])
messageSystemAttributeValue_stringListValues :: (Maybe [Text] -> f (Maybe [Text]))
-> MessageSystemAttributeValue -> f MessageSystemAttributeValue
messageSystemAttributeValue_stringListValues = (MessageSystemAttributeValue -> Maybe [Text])
-> (MessageSystemAttributeValue
-> Maybe [Text] -> MessageSystemAttributeValue)
-> Lens
MessageSystemAttributeValue
MessageSystemAttributeValue
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MessageSystemAttributeValue' {Maybe [Text]
stringListValues :: Maybe [Text]
$sel:stringListValues:MessageSystemAttributeValue' :: MessageSystemAttributeValue -> Maybe [Text]
stringListValues} -> Maybe [Text]
stringListValues) (\s :: MessageSystemAttributeValue
s@MessageSystemAttributeValue' {} Maybe [Text]
a -> MessageSystemAttributeValue
s {$sel:stringListValues:MessageSystemAttributeValue' :: Maybe [Text]
stringListValues = Maybe [Text]
a} :: MessageSystemAttributeValue) ((Maybe [Text] -> f (Maybe [Text]))
-> MessageSystemAttributeValue -> f MessageSystemAttributeValue)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> MessageSystemAttributeValue
-> f MessageSystemAttributeValue
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
messageSystemAttributeValue_stringValue :: Lens.Lens' MessageSystemAttributeValue (Prelude.Maybe Prelude.Text)
messageSystemAttributeValue_stringValue :: (Maybe Text -> f (Maybe Text))
-> MessageSystemAttributeValue -> f MessageSystemAttributeValue
messageSystemAttributeValue_stringValue = (MessageSystemAttributeValue -> Maybe Text)
-> (MessageSystemAttributeValue
-> Maybe Text -> MessageSystemAttributeValue)
-> Lens
MessageSystemAttributeValue
MessageSystemAttributeValue
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MessageSystemAttributeValue' {Maybe Text
stringValue :: Maybe Text
$sel:stringValue:MessageSystemAttributeValue' :: MessageSystemAttributeValue -> Maybe Text
stringValue} -> Maybe Text
stringValue) (\s :: MessageSystemAttributeValue
s@MessageSystemAttributeValue' {} Maybe Text
a -> MessageSystemAttributeValue
s {$sel:stringValue:MessageSystemAttributeValue' :: Maybe Text
stringValue = Maybe Text
a} :: MessageSystemAttributeValue)
messageSystemAttributeValue_binaryListValues :: Lens.Lens' MessageSystemAttributeValue (Prelude.Maybe [Prelude.ByteString])
messageSystemAttributeValue_binaryListValues :: (Maybe [ByteString] -> f (Maybe [ByteString]))
-> MessageSystemAttributeValue -> f MessageSystemAttributeValue
messageSystemAttributeValue_binaryListValues = (MessageSystemAttributeValue -> Maybe [Base64])
-> (MessageSystemAttributeValue
-> Maybe [Base64] -> MessageSystemAttributeValue)
-> Lens
MessageSystemAttributeValue
MessageSystemAttributeValue
(Maybe [Base64])
(Maybe [Base64])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MessageSystemAttributeValue' {Maybe [Base64]
binaryListValues :: Maybe [Base64]
$sel:binaryListValues:MessageSystemAttributeValue' :: MessageSystemAttributeValue -> Maybe [Base64]
binaryListValues} -> Maybe [Base64]
binaryListValues) (\s :: MessageSystemAttributeValue
s@MessageSystemAttributeValue' {} Maybe [Base64]
a -> MessageSystemAttributeValue
s {$sel:binaryListValues:MessageSystemAttributeValue' :: Maybe [Base64]
binaryListValues = Maybe [Base64]
a} :: MessageSystemAttributeValue) ((Maybe [Base64] -> f (Maybe [Base64]))
-> MessageSystemAttributeValue -> f MessageSystemAttributeValue)
-> ((Maybe [ByteString] -> f (Maybe [ByteString]))
-> Maybe [Base64] -> f (Maybe [Base64]))
-> (Maybe [ByteString] -> f (Maybe [ByteString]))
-> MessageSystemAttributeValue
-> f MessageSystemAttributeValue
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Base64] [Base64] [ByteString] [ByteString]
-> Iso
(Maybe [Base64])
(Maybe [Base64])
(Maybe [ByteString])
(Maybe [ByteString])
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 [Base64] [Base64] [ByteString] [ByteString]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
messageSystemAttributeValue_dataType :: Lens.Lens' MessageSystemAttributeValue Prelude.Text
messageSystemAttributeValue_dataType :: (Text -> f Text)
-> MessageSystemAttributeValue -> f MessageSystemAttributeValue
messageSystemAttributeValue_dataType = (MessageSystemAttributeValue -> Text)
-> (MessageSystemAttributeValue
-> Text -> MessageSystemAttributeValue)
-> Lens
MessageSystemAttributeValue MessageSystemAttributeValue Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MessageSystemAttributeValue' {Text
dataType :: Text
$sel:dataType:MessageSystemAttributeValue' :: MessageSystemAttributeValue -> Text
dataType} -> Text
dataType) (\s :: MessageSystemAttributeValue
s@MessageSystemAttributeValue' {} Text
a -> MessageSystemAttributeValue
s {$sel:dataType:MessageSystemAttributeValue' :: Text
dataType = Text
a} :: MessageSystemAttributeValue)
instance Prelude.Hashable MessageSystemAttributeValue
instance Prelude.NFData MessageSystemAttributeValue
instance Core.ToQuery MessageSystemAttributeValue where
toQuery :: MessageSystemAttributeValue -> QueryString
toQuery MessageSystemAttributeValue' {Maybe [Text]
Maybe [Base64]
Maybe Text
Maybe Base64
Text
dataType :: Text
binaryListValues :: Maybe [Base64]
stringValue :: Maybe Text
stringListValues :: Maybe [Text]
binaryValue :: Maybe Base64
$sel:dataType:MessageSystemAttributeValue' :: MessageSystemAttributeValue -> Text
$sel:binaryListValues:MessageSystemAttributeValue' :: MessageSystemAttributeValue -> Maybe [Base64]
$sel:stringValue:MessageSystemAttributeValue' :: MessageSystemAttributeValue -> Maybe Text
$sel:stringListValues:MessageSystemAttributeValue' :: MessageSystemAttributeValue -> Maybe [Text]
$sel:binaryValue:MessageSystemAttributeValue' :: MessageSystemAttributeValue -> Maybe Base64
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"BinaryValue" ByteString -> Maybe Base64 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Base64
binaryValue,
ByteString
"StringListValue"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"StringListValue"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
stringListValues
),
ByteString
"StringValue" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
stringValue,
ByteString
"BinaryListValue"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Base64] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"BinaryListValue"
([Base64] -> QueryString) -> Maybe [Base64] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Base64]
binaryListValues
),
ByteString
"DataType" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dataType
]