{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:replace:ReplaceableAttribute' :: Maybe Bool
replace = 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 :: Lens' ReplaceableAttribute (Maybe Bool)
replaceableAttribute_replace = 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 :: Lens' ReplaceableAttribute Text
replaceableAttribute_name = 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 :: Lens' ReplaceableAttribute Text
replaceableAttribute_value = 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 where
hashWithSalt :: Int -> ReplaceableAttribute -> Int
hashWithSalt Int
_salt 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
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
replace
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
value
instance Prelude.NFData ReplaceableAttribute where
rnf :: ReplaceableAttribute -> ()
rnf 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
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
replace
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
value
instance Data.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
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Replace" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
replace,
ByteString
"Name" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
name,
ByteString
"Value" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
value
]