{-# 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.EndpointBatchRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Pinpoint.Types.EndpointBatchItem
import qualified Amazonka.Prelude as Prelude
data EndpointBatchRequest = EndpointBatchRequest'
{
EndpointBatchRequest -> [EndpointBatchItem]
item :: [EndpointBatchItem]
}
deriving (EndpointBatchRequest -> EndpointBatchRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EndpointBatchRequest -> EndpointBatchRequest -> Bool
$c/= :: EndpointBatchRequest -> EndpointBatchRequest -> Bool
== :: EndpointBatchRequest -> EndpointBatchRequest -> Bool
$c== :: EndpointBatchRequest -> EndpointBatchRequest -> Bool
Prelude.Eq, ReadPrec [EndpointBatchRequest]
ReadPrec EndpointBatchRequest
Int -> ReadS EndpointBatchRequest
ReadS [EndpointBatchRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EndpointBatchRequest]
$creadListPrec :: ReadPrec [EndpointBatchRequest]
readPrec :: ReadPrec EndpointBatchRequest
$creadPrec :: ReadPrec EndpointBatchRequest
readList :: ReadS [EndpointBatchRequest]
$creadList :: ReadS [EndpointBatchRequest]
readsPrec :: Int -> ReadS EndpointBatchRequest
$creadsPrec :: Int -> ReadS EndpointBatchRequest
Prelude.Read, Int -> EndpointBatchRequest -> ShowS
[EndpointBatchRequest] -> ShowS
EndpointBatchRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EndpointBatchRequest] -> ShowS
$cshowList :: [EndpointBatchRequest] -> ShowS
show :: EndpointBatchRequest -> String
$cshow :: EndpointBatchRequest -> String
showsPrec :: Int -> EndpointBatchRequest -> ShowS
$cshowsPrec :: Int -> EndpointBatchRequest -> ShowS
Prelude.Show, forall x. Rep EndpointBatchRequest x -> EndpointBatchRequest
forall x. EndpointBatchRequest -> Rep EndpointBatchRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EndpointBatchRequest x -> EndpointBatchRequest
$cfrom :: forall x. EndpointBatchRequest -> Rep EndpointBatchRequest x
Prelude.Generic)
newEndpointBatchRequest ::
EndpointBatchRequest
newEndpointBatchRequest :: EndpointBatchRequest
newEndpointBatchRequest =
EndpointBatchRequest' {$sel:item:EndpointBatchRequest' :: [EndpointBatchItem]
item = forall a. Monoid a => a
Prelude.mempty}
endpointBatchRequest_item :: Lens.Lens' EndpointBatchRequest [EndpointBatchItem]
endpointBatchRequest_item :: Lens' EndpointBatchRequest [EndpointBatchItem]
endpointBatchRequest_item = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointBatchRequest' {[EndpointBatchItem]
item :: [EndpointBatchItem]
$sel:item:EndpointBatchRequest' :: EndpointBatchRequest -> [EndpointBatchItem]
item} -> [EndpointBatchItem]
item) (\s :: EndpointBatchRequest
s@EndpointBatchRequest' {} [EndpointBatchItem]
a -> EndpointBatchRequest
s {$sel:item:EndpointBatchRequest' :: [EndpointBatchItem]
item = [EndpointBatchItem]
a} :: EndpointBatchRequest) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable EndpointBatchRequest where
hashWithSalt :: Int -> EndpointBatchRequest -> Int
hashWithSalt Int
_salt EndpointBatchRequest' {[EndpointBatchItem]
item :: [EndpointBatchItem]
$sel:item:EndpointBatchRequest' :: EndpointBatchRequest -> [EndpointBatchItem]
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [EndpointBatchItem]
item
instance Prelude.NFData EndpointBatchRequest where
rnf :: EndpointBatchRequest -> ()
rnf EndpointBatchRequest' {[EndpointBatchItem]
item :: [EndpointBatchItem]
$sel:item:EndpointBatchRequest' :: EndpointBatchRequest -> [EndpointBatchItem]
..} = forall a. NFData a => a -> ()
Prelude.rnf [EndpointBatchItem]
item
instance Data.ToJSON EndpointBatchRequest where
toJSON :: EndpointBatchRequest -> Value
toJSON EndpointBatchRequest' {[EndpointBatchItem]
item :: [EndpointBatchItem]
$sel:item:EndpointBatchRequest' :: EndpointBatchRequest -> [EndpointBatchItem]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"Item" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [EndpointBatchItem]
item)]
)