{-# 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.UpdateCondition 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 UpdateCondition = UpdateCondition'
{
UpdateCondition -> Maybe Bool
exists :: Prelude.Maybe Prelude.Bool,
UpdateCondition -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
UpdateCondition -> Maybe Text
value :: Prelude.Maybe Prelude.Text
}
deriving (UpdateCondition -> UpdateCondition -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateCondition -> UpdateCondition -> Bool
$c/= :: UpdateCondition -> UpdateCondition -> Bool
== :: UpdateCondition -> UpdateCondition -> Bool
$c== :: UpdateCondition -> UpdateCondition -> Bool
Prelude.Eq, ReadPrec [UpdateCondition]
ReadPrec UpdateCondition
Int -> ReadS UpdateCondition
ReadS [UpdateCondition]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateCondition]
$creadListPrec :: ReadPrec [UpdateCondition]
readPrec :: ReadPrec UpdateCondition
$creadPrec :: ReadPrec UpdateCondition
readList :: ReadS [UpdateCondition]
$creadList :: ReadS [UpdateCondition]
readsPrec :: Int -> ReadS UpdateCondition
$creadsPrec :: Int -> ReadS UpdateCondition
Prelude.Read, Int -> UpdateCondition -> ShowS
[UpdateCondition] -> ShowS
UpdateCondition -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateCondition] -> ShowS
$cshowList :: [UpdateCondition] -> ShowS
show :: UpdateCondition -> String
$cshow :: UpdateCondition -> String
showsPrec :: Int -> UpdateCondition -> ShowS
$cshowsPrec :: Int -> UpdateCondition -> ShowS
Prelude.Show, forall x. Rep UpdateCondition x -> UpdateCondition
forall x. UpdateCondition -> Rep UpdateCondition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateCondition x -> UpdateCondition
$cfrom :: forall x. UpdateCondition -> Rep UpdateCondition x
Prelude.Generic)
newUpdateCondition ::
UpdateCondition
newUpdateCondition :: UpdateCondition
newUpdateCondition =
UpdateCondition'
{ $sel:exists:UpdateCondition' :: Maybe Bool
exists = forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateCondition' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:value:UpdateCondition' :: Maybe Text
value = forall a. Maybe a
Prelude.Nothing
}
updateCondition_exists :: Lens.Lens' UpdateCondition (Prelude.Maybe Prelude.Bool)
updateCondition_exists :: Lens' UpdateCondition (Maybe Bool)
updateCondition_exists = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCondition' {Maybe Bool
exists :: Maybe Bool
$sel:exists:UpdateCondition' :: UpdateCondition -> Maybe Bool
exists} -> Maybe Bool
exists) (\s :: UpdateCondition
s@UpdateCondition' {} Maybe Bool
a -> UpdateCondition
s {$sel:exists:UpdateCondition' :: Maybe Bool
exists = Maybe Bool
a} :: UpdateCondition)
updateCondition_name :: Lens.Lens' UpdateCondition (Prelude.Maybe Prelude.Text)
updateCondition_name :: Lens' UpdateCondition (Maybe Text)
updateCondition_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCondition' {Maybe Text
name :: Maybe Text
$sel:name:UpdateCondition' :: UpdateCondition -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateCondition
s@UpdateCondition' {} Maybe Text
a -> UpdateCondition
s {$sel:name:UpdateCondition' :: Maybe Text
name = Maybe Text
a} :: UpdateCondition)
updateCondition_value :: Lens.Lens' UpdateCondition (Prelude.Maybe Prelude.Text)
updateCondition_value :: Lens' UpdateCondition (Maybe Text)
updateCondition_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCondition' {Maybe Text
value :: Maybe Text
$sel:value:UpdateCondition' :: UpdateCondition -> Maybe Text
value} -> Maybe Text
value) (\s :: UpdateCondition
s@UpdateCondition' {} Maybe Text
a -> UpdateCondition
s {$sel:value:UpdateCondition' :: Maybe Text
value = Maybe Text
a} :: UpdateCondition)
instance Prelude.Hashable UpdateCondition where
hashWithSalt :: Int -> UpdateCondition -> Int
hashWithSalt Int
_salt UpdateCondition' {Maybe Bool
Maybe Text
value :: Maybe Text
name :: Maybe Text
exists :: Maybe Bool
$sel:value:UpdateCondition' :: UpdateCondition -> Maybe Text
$sel:name:UpdateCondition' :: UpdateCondition -> Maybe Text
$sel:exists:UpdateCondition' :: UpdateCondition -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
exists
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
value
instance Prelude.NFData UpdateCondition where
rnf :: UpdateCondition -> ()
rnf UpdateCondition' {Maybe Bool
Maybe Text
value :: Maybe Text
name :: Maybe Text
exists :: Maybe Bool
$sel:value:UpdateCondition' :: UpdateCondition -> Maybe Text
$sel:name:UpdateCondition' :: UpdateCondition -> Maybe Text
$sel:exists:UpdateCondition' :: UpdateCondition -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
exists
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
value
instance Data.ToQuery UpdateCondition where
toQuery :: UpdateCondition -> QueryString
toQuery UpdateCondition' {Maybe Bool
Maybe Text
value :: Maybe Text
name :: Maybe Text
exists :: Maybe Bool
$sel:value:UpdateCondition' :: UpdateCondition -> Maybe Text
$sel:name:UpdateCondition' :: UpdateCondition -> Maybe Text
$sel:exists:UpdateCondition' :: UpdateCondition -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Exists" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
exists,
ByteString
"Name" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
name,
ByteString
"Value" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
value
]