{-# 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.SDB.Types.ReplaceableAttribute where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReplaceableAttribute = ReplaceableAttribute'
{
ReplaceableAttribute -> Maybe Bool
replace :: Prelude.Maybe Prelude.Bool,
ReplaceableAttribute -> Text
name :: Prelude.Text,
ReplaceableAttribute -> Text
value :: Prelude.Text
}
deriving (ReplaceableAttribute -> ReplaceableAttribute -> Bool
(ReplaceableAttribute -> ReplaceableAttribute -> Bool)
-> (ReplaceableAttribute -> ReplaceableAttribute -> Bool)
-> Eq ReplaceableAttribute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplaceableAttribute -> ReplaceableAttribute -> Bool
$c/= :: ReplaceableAttribute -> ReplaceableAttribute -> Bool
== :: ReplaceableAttribute -> ReplaceableAttribute -> Bool
$c== :: ReplaceableAttribute -> ReplaceableAttribute -> Bool
Prelude.Eq, ReadPrec [ReplaceableAttribute]
ReadPrec ReplaceableAttribute
Int -> ReadS ReplaceableAttribute
ReadS [ReplaceableAttribute]
(Int -> ReadS ReplaceableAttribute)
-> ReadS [ReplaceableAttribute]
-> ReadPrec ReplaceableAttribute
-> ReadPrec [ReplaceableAttribute]
-> Read ReplaceableAttribute
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplaceableAttribute]
$creadListPrec :: ReadPrec [ReplaceableAttribute]
readPrec :: ReadPrec ReplaceableAttribute
$creadPrec :: ReadPrec ReplaceableAttribute
readList :: ReadS [ReplaceableAttribute]
$creadList :: ReadS [ReplaceableAttribute]
readsPrec :: Int -> ReadS ReplaceableAttribute
$creadsPrec :: Int -> ReadS ReplaceableAttribute
Prelude.Read, Int -> ReplaceableAttribute -> ShowS
[ReplaceableAttribute] -> ShowS
ReplaceableAttribute -> String
(Int -> ReplaceableAttribute -> ShowS)
-> (ReplaceableAttribute -> String)
-> ([ReplaceableAttribute] -> ShowS)
-> Show ReplaceableAttribute
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplaceableAttribute] -> ShowS
$cshowList :: [ReplaceableAttribute] -> ShowS
show :: ReplaceableAttribute -> String
$cshow :: ReplaceableAttribute -> String
showsPrec :: Int -> ReplaceableAttribute -> ShowS
$cshowsPrec :: Int -> ReplaceableAttribute -> ShowS
Prelude.Show, (forall x. ReplaceableAttribute -> Rep ReplaceableAttribute x)
-> (forall x. Rep ReplaceableAttribute x -> ReplaceableAttribute)
-> Generic ReplaceableAttribute
forall x. Rep ReplaceableAttribute x -> ReplaceableAttribute
forall x. ReplaceableAttribute -> Rep ReplaceableAttribute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReplaceableAttribute x -> ReplaceableAttribute
$cfrom :: forall x. ReplaceableAttribute -> Rep ReplaceableAttribute x
Prelude.Generic)
newReplaceableAttribute ::
Prelude.Text ->
Prelude.Text ->
ReplaceableAttribute
newReplaceableAttribute :: Text -> Text -> ReplaceableAttribute
newReplaceableAttribute Text
pName_ Text
pValue_ =
ReplaceableAttribute' :: Maybe Bool -> Text -> Text -> ReplaceableAttribute
ReplaceableAttribute'
{ $sel:replace:ReplaceableAttribute' :: Maybe Bool
replace = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:name:ReplaceableAttribute' :: Text
name = Text
pName_,
$sel:value:ReplaceableAttribute' :: Text
value = Text
pValue_
}
replaceableAttribute_replace :: Lens.Lens' ReplaceableAttribute (Prelude.Maybe Prelude.Bool)
replaceableAttribute_replace :: (Maybe Bool -> f (Maybe Bool))
-> ReplaceableAttribute -> f ReplaceableAttribute
replaceableAttribute_replace = (ReplaceableAttribute -> Maybe Bool)
-> (ReplaceableAttribute -> Maybe Bool -> ReplaceableAttribute)
-> Lens
ReplaceableAttribute ReplaceableAttribute (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplaceableAttribute' {Maybe Bool
replace :: Maybe Bool
$sel:replace:ReplaceableAttribute' :: ReplaceableAttribute -> Maybe Bool
replace} -> Maybe Bool
replace) (\s :: ReplaceableAttribute
s@ReplaceableAttribute' {} Maybe Bool
a -> ReplaceableAttribute
s {$sel:replace:ReplaceableAttribute' :: Maybe Bool
replace = Maybe Bool
a} :: ReplaceableAttribute)
replaceableAttribute_name :: Lens.Lens' ReplaceableAttribute Prelude.Text
replaceableAttribute_name :: (Text -> f Text) -> ReplaceableAttribute -> f ReplaceableAttribute
replaceableAttribute_name = (ReplaceableAttribute -> Text)
-> (ReplaceableAttribute -> Text -> ReplaceableAttribute)
-> Lens ReplaceableAttribute ReplaceableAttribute Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplaceableAttribute' {Text
name :: Text
$sel:name:ReplaceableAttribute' :: ReplaceableAttribute -> Text
name} -> Text
name) (\s :: ReplaceableAttribute
s@ReplaceableAttribute' {} Text
a -> ReplaceableAttribute
s {$sel:name:ReplaceableAttribute' :: Text
name = Text
a} :: ReplaceableAttribute)
replaceableAttribute_value :: Lens.Lens' ReplaceableAttribute Prelude.Text
replaceableAttribute_value :: (Text -> f Text) -> ReplaceableAttribute -> f ReplaceableAttribute
replaceableAttribute_value = (ReplaceableAttribute -> Text)
-> (ReplaceableAttribute -> Text -> ReplaceableAttribute)
-> Lens ReplaceableAttribute ReplaceableAttribute Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplaceableAttribute' {Text
value :: Text
$sel:value:ReplaceableAttribute' :: ReplaceableAttribute -> Text
value} -> Text
value) (\s :: ReplaceableAttribute
s@ReplaceableAttribute' {} Text
a -> ReplaceableAttribute
s {$sel:value:ReplaceableAttribute' :: Text
value = Text
a} :: ReplaceableAttribute)
instance Prelude.Hashable ReplaceableAttribute
instance Prelude.NFData ReplaceableAttribute
instance Core.ToQuery ReplaceableAttribute where
toQuery :: ReplaceableAttribute -> QueryString
toQuery ReplaceableAttribute' {Maybe Bool
Text
value :: Text
name :: Text
replace :: Maybe Bool
$sel:value:ReplaceableAttribute' :: ReplaceableAttribute -> Text
$sel:name:ReplaceableAttribute' :: ReplaceableAttribute -> Text
$sel:replace:ReplaceableAttribute' :: ReplaceableAttribute -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Replace" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
replace,
ByteString
"Name" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
name,
ByteString
"Value" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
value
]