{-# 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.EndpointsResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.EndpointResponse
import qualified Amazonka.Prelude as Prelude
data EndpointsResponse = EndpointsResponse'
{
EndpointsResponse -> [EndpointResponse]
item :: [EndpointResponse]
}
deriving (EndpointsResponse -> EndpointsResponse -> Bool
(EndpointsResponse -> EndpointsResponse -> Bool)
-> (EndpointsResponse -> EndpointsResponse -> Bool)
-> Eq EndpointsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EndpointsResponse -> EndpointsResponse -> Bool
$c/= :: EndpointsResponse -> EndpointsResponse -> Bool
== :: EndpointsResponse -> EndpointsResponse -> Bool
$c== :: EndpointsResponse -> EndpointsResponse -> Bool
Prelude.Eq, ReadPrec [EndpointsResponse]
ReadPrec EndpointsResponse
Int -> ReadS EndpointsResponse
ReadS [EndpointsResponse]
(Int -> ReadS EndpointsResponse)
-> ReadS [EndpointsResponse]
-> ReadPrec EndpointsResponse
-> ReadPrec [EndpointsResponse]
-> Read EndpointsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EndpointsResponse]
$creadListPrec :: ReadPrec [EndpointsResponse]
readPrec :: ReadPrec EndpointsResponse
$creadPrec :: ReadPrec EndpointsResponse
readList :: ReadS [EndpointsResponse]
$creadList :: ReadS [EndpointsResponse]
readsPrec :: Int -> ReadS EndpointsResponse
$creadsPrec :: Int -> ReadS EndpointsResponse
Prelude.Read, Int -> EndpointsResponse -> ShowS
[EndpointsResponse] -> ShowS
EndpointsResponse -> String
(Int -> EndpointsResponse -> ShowS)
-> (EndpointsResponse -> String)
-> ([EndpointsResponse] -> ShowS)
-> Show EndpointsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EndpointsResponse] -> ShowS
$cshowList :: [EndpointsResponse] -> ShowS
show :: EndpointsResponse -> String
$cshow :: EndpointsResponse -> String
showsPrec :: Int -> EndpointsResponse -> ShowS
$cshowsPrec :: Int -> EndpointsResponse -> ShowS
Prelude.Show, (forall x. EndpointsResponse -> Rep EndpointsResponse x)
-> (forall x. Rep EndpointsResponse x -> EndpointsResponse)
-> Generic EndpointsResponse
forall x. Rep EndpointsResponse x -> EndpointsResponse
forall x. EndpointsResponse -> Rep EndpointsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EndpointsResponse x -> EndpointsResponse
$cfrom :: forall x. EndpointsResponse -> Rep EndpointsResponse x
Prelude.Generic)
newEndpointsResponse ::
EndpointsResponse
newEndpointsResponse :: EndpointsResponse
newEndpointsResponse =
EndpointsResponse' :: [EndpointResponse] -> EndpointsResponse
EndpointsResponse' {$sel:item:EndpointsResponse' :: [EndpointResponse]
item = [EndpointResponse]
forall a. Monoid a => a
Prelude.mempty}
endpointsResponse_item :: Lens.Lens' EndpointsResponse [EndpointResponse]
endpointsResponse_item :: ([EndpointResponse] -> f [EndpointResponse])
-> EndpointsResponse -> f EndpointsResponse
endpointsResponse_item = (EndpointsResponse -> [EndpointResponse])
-> (EndpointsResponse -> [EndpointResponse] -> EndpointsResponse)
-> Lens
EndpointsResponse
EndpointsResponse
[EndpointResponse]
[EndpointResponse]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointsResponse' {[EndpointResponse]
item :: [EndpointResponse]
$sel:item:EndpointsResponse' :: EndpointsResponse -> [EndpointResponse]
item} -> [EndpointResponse]
item) (\s :: EndpointsResponse
s@EndpointsResponse' {} [EndpointResponse]
a -> EndpointsResponse
s {$sel:item:EndpointsResponse' :: [EndpointResponse]
item = [EndpointResponse]
a} :: EndpointsResponse) (([EndpointResponse] -> f [EndpointResponse])
-> EndpointsResponse -> f EndpointsResponse)
-> (([EndpointResponse] -> f [EndpointResponse])
-> [EndpointResponse] -> f [EndpointResponse])
-> ([EndpointResponse] -> f [EndpointResponse])
-> EndpointsResponse
-> f EndpointsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EndpointResponse] -> f [EndpointResponse])
-> [EndpointResponse] -> f [EndpointResponse]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON EndpointsResponse where
parseJSON :: Value -> Parser EndpointsResponse
parseJSON =
String
-> (Object -> Parser EndpointsResponse)
-> Value
-> Parser EndpointsResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EndpointsResponse"
( \Object
x ->
[EndpointResponse] -> EndpointsResponse
EndpointsResponse'
([EndpointResponse] -> EndpointsResponse)
-> Parser [EndpointResponse] -> Parser EndpointsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe [EndpointResponse])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Item" Parser (Maybe [EndpointResponse])
-> [EndpointResponse] -> Parser [EndpointResponse]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [EndpointResponse]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable EndpointsResponse
instance Prelude.NFData EndpointsResponse