{-# 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.Pinpoint.Types.UpdateAttributesRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateAttributesRequest = UpdateAttributesRequest'
{
UpdateAttributesRequest -> Maybe [Text]
blacklist :: Prelude.Maybe [Prelude.Text]
}
deriving (UpdateAttributesRequest -> UpdateAttributesRequest -> Bool
(UpdateAttributesRequest -> UpdateAttributesRequest -> Bool)
-> (UpdateAttributesRequest -> UpdateAttributesRequest -> Bool)
-> Eq UpdateAttributesRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAttributesRequest -> UpdateAttributesRequest -> Bool
$c/= :: UpdateAttributesRequest -> UpdateAttributesRequest -> Bool
== :: UpdateAttributesRequest -> UpdateAttributesRequest -> Bool
$c== :: UpdateAttributesRequest -> UpdateAttributesRequest -> Bool
Prelude.Eq, ReadPrec [UpdateAttributesRequest]
ReadPrec UpdateAttributesRequest
Int -> ReadS UpdateAttributesRequest
ReadS [UpdateAttributesRequest]
(Int -> ReadS UpdateAttributesRequest)
-> ReadS [UpdateAttributesRequest]
-> ReadPrec UpdateAttributesRequest
-> ReadPrec [UpdateAttributesRequest]
-> Read UpdateAttributesRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAttributesRequest]
$creadListPrec :: ReadPrec [UpdateAttributesRequest]
readPrec :: ReadPrec UpdateAttributesRequest
$creadPrec :: ReadPrec UpdateAttributesRequest
readList :: ReadS [UpdateAttributesRequest]
$creadList :: ReadS [UpdateAttributesRequest]
readsPrec :: Int -> ReadS UpdateAttributesRequest
$creadsPrec :: Int -> ReadS UpdateAttributesRequest
Prelude.Read, Int -> UpdateAttributesRequest -> ShowS
[UpdateAttributesRequest] -> ShowS
UpdateAttributesRequest -> String
(Int -> UpdateAttributesRequest -> ShowS)
-> (UpdateAttributesRequest -> String)
-> ([UpdateAttributesRequest] -> ShowS)
-> Show UpdateAttributesRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAttributesRequest] -> ShowS
$cshowList :: [UpdateAttributesRequest] -> ShowS
show :: UpdateAttributesRequest -> String
$cshow :: UpdateAttributesRequest -> String
showsPrec :: Int -> UpdateAttributesRequest -> ShowS
$cshowsPrec :: Int -> UpdateAttributesRequest -> ShowS
Prelude.Show, (forall x.
UpdateAttributesRequest -> Rep UpdateAttributesRequest x)
-> (forall x.
Rep UpdateAttributesRequest x -> UpdateAttributesRequest)
-> Generic UpdateAttributesRequest
forall x. Rep UpdateAttributesRequest x -> UpdateAttributesRequest
forall x. UpdateAttributesRequest -> Rep UpdateAttributesRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateAttributesRequest x -> UpdateAttributesRequest
$cfrom :: forall x. UpdateAttributesRequest -> Rep UpdateAttributesRequest x
Prelude.Generic)
newUpdateAttributesRequest ::
UpdateAttributesRequest
newUpdateAttributesRequest :: UpdateAttributesRequest
newUpdateAttributesRequest =
UpdateAttributesRequest' :: Maybe [Text] -> UpdateAttributesRequest
UpdateAttributesRequest'
{ $sel:blacklist:UpdateAttributesRequest' :: Maybe [Text]
blacklist =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
updateAttributesRequest_blacklist :: Lens.Lens' UpdateAttributesRequest (Prelude.Maybe [Prelude.Text])
updateAttributesRequest_blacklist :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateAttributesRequest -> f UpdateAttributesRequest
updateAttributesRequest_blacklist = (UpdateAttributesRequest -> Maybe [Text])
-> (UpdateAttributesRequest
-> Maybe [Text] -> UpdateAttributesRequest)
-> Lens
UpdateAttributesRequest
UpdateAttributesRequest
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAttributesRequest' {Maybe [Text]
blacklist :: Maybe [Text]
$sel:blacklist:UpdateAttributesRequest' :: UpdateAttributesRequest -> Maybe [Text]
blacklist} -> Maybe [Text]
blacklist) (\s :: UpdateAttributesRequest
s@UpdateAttributesRequest' {} Maybe [Text]
a -> UpdateAttributesRequest
s {$sel:blacklist:UpdateAttributesRequest' :: Maybe [Text]
blacklist = Maybe [Text]
a} :: UpdateAttributesRequest) ((Maybe [Text] -> f (Maybe [Text]))
-> UpdateAttributesRequest -> f UpdateAttributesRequest)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateAttributesRequest
-> f UpdateAttributesRequest
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
instance Prelude.Hashable UpdateAttributesRequest
instance Prelude.NFData UpdateAttributesRequest
instance Core.ToJSON UpdateAttributesRequest where
toJSON :: UpdateAttributesRequest -> Value
toJSON UpdateAttributesRequest' {Maybe [Text]
blacklist :: Maybe [Text]
$sel:blacklist:UpdateAttributesRequest' :: UpdateAttributesRequest -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"Blacklist" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
blacklist]
)