{-# 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.EndpointResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.ChannelType
import Amazonka.Pinpoint.Types.EndpointDemographic
import Amazonka.Pinpoint.Types.EndpointLocation
import Amazonka.Pinpoint.Types.EndpointUser
import qualified Amazonka.Prelude as Prelude
data EndpointResponse = EndpointResponse'
{
EndpointResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
EndpointResponse -> Maybe (HashMap Text Double)
metrics :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Double),
EndpointResponse -> Maybe EndpointLocation
location :: Prelude.Maybe EndpointLocation,
EndpointResponse -> Maybe EndpointDemographic
demographic :: Prelude.Maybe EndpointDemographic,
EndpointResponse -> Maybe Text
cohortId :: Prelude.Maybe Prelude.Text,
EndpointResponse -> Maybe Text
address :: Prelude.Maybe Prelude.Text,
EndpointResponse -> Maybe Text
effectiveDate :: Prelude.Maybe Prelude.Text,
EndpointResponse -> Maybe EndpointUser
user :: Prelude.Maybe EndpointUser,
EndpointResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
EndpointResponse -> Maybe (HashMap Text [Text])
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
EndpointResponse -> Maybe Text
endpointStatus :: Prelude.Maybe Prelude.Text,
EndpointResponse -> Maybe Text
optOut :: Prelude.Maybe Prelude.Text,
EndpointResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
EndpointResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
EndpointResponse -> Maybe ChannelType
channelType :: Prelude.Maybe ChannelType
}
deriving (EndpointResponse -> EndpointResponse -> Bool
(EndpointResponse -> EndpointResponse -> Bool)
-> (EndpointResponse -> EndpointResponse -> Bool)
-> Eq EndpointResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EndpointResponse -> EndpointResponse -> Bool
$c/= :: EndpointResponse -> EndpointResponse -> Bool
== :: EndpointResponse -> EndpointResponse -> Bool
$c== :: EndpointResponse -> EndpointResponse -> Bool
Prelude.Eq, ReadPrec [EndpointResponse]
ReadPrec EndpointResponse
Int -> ReadS EndpointResponse
ReadS [EndpointResponse]
(Int -> ReadS EndpointResponse)
-> ReadS [EndpointResponse]
-> ReadPrec EndpointResponse
-> ReadPrec [EndpointResponse]
-> Read EndpointResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EndpointResponse]
$creadListPrec :: ReadPrec [EndpointResponse]
readPrec :: ReadPrec EndpointResponse
$creadPrec :: ReadPrec EndpointResponse
readList :: ReadS [EndpointResponse]
$creadList :: ReadS [EndpointResponse]
readsPrec :: Int -> ReadS EndpointResponse
$creadsPrec :: Int -> ReadS EndpointResponse
Prelude.Read, Int -> EndpointResponse -> ShowS
[EndpointResponse] -> ShowS
EndpointResponse -> String
(Int -> EndpointResponse -> ShowS)
-> (EndpointResponse -> String)
-> ([EndpointResponse] -> ShowS)
-> Show EndpointResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EndpointResponse] -> ShowS
$cshowList :: [EndpointResponse] -> ShowS
show :: EndpointResponse -> String
$cshow :: EndpointResponse -> String
showsPrec :: Int -> EndpointResponse -> ShowS
$cshowsPrec :: Int -> EndpointResponse -> ShowS
Prelude.Show, (forall x. EndpointResponse -> Rep EndpointResponse x)
-> (forall x. Rep EndpointResponse x -> EndpointResponse)
-> Generic EndpointResponse
forall x. Rep EndpointResponse x -> EndpointResponse
forall x. EndpointResponse -> Rep EndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EndpointResponse x -> EndpointResponse
$cfrom :: forall x. EndpointResponse -> Rep EndpointResponse x
Prelude.Generic)
newEndpointResponse ::
EndpointResponse
newEndpointResponse :: EndpointResponse
newEndpointResponse =
EndpointResponse' :: Maybe Text
-> Maybe (HashMap Text Double)
-> Maybe EndpointLocation
-> Maybe EndpointDemographic
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse
EndpointResponse'
{ $sel:requestId:EndpointResponse' :: Maybe Text
requestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:metrics:EndpointResponse' :: Maybe (HashMap Text Double)
metrics = Maybe (HashMap Text Double)
forall a. Maybe a
Prelude.Nothing,
$sel:location:EndpointResponse' :: Maybe EndpointLocation
location = Maybe EndpointLocation
forall a. Maybe a
Prelude.Nothing,
$sel:demographic:EndpointResponse' :: Maybe EndpointDemographic
demographic = Maybe EndpointDemographic
forall a. Maybe a
Prelude.Nothing,
$sel:cohortId:EndpointResponse' :: Maybe Text
cohortId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:address:EndpointResponse' :: Maybe Text
address = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:effectiveDate:EndpointResponse' :: Maybe Text
effectiveDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:user:EndpointResponse' :: Maybe EndpointUser
user = Maybe EndpointUser
forall a. Maybe a
Prelude.Nothing,
$sel:applicationId:EndpointResponse' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attributes:EndpointResponse' :: Maybe (HashMap Text [Text])
attributes = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
$sel:endpointStatus:EndpointResponse' :: Maybe Text
endpointStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:optOut:EndpointResponse' :: Maybe Text
optOut = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:EndpointResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:EndpointResponse' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:channelType:EndpointResponse' :: Maybe ChannelType
channelType = Maybe ChannelType
forall a. Maybe a
Prelude.Nothing
}
endpointResponse_requestId :: Lens.Lens' EndpointResponse (Prelude.Maybe Prelude.Text)
endpointResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> EndpointResponse -> f EndpointResponse
endpointResponse_requestId = (EndpointResponse -> Maybe Text)
-> (EndpointResponse -> Maybe Text -> EndpointResponse)
-> Lens EndpointResponse EndpointResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:EndpointResponse' :: EndpointResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe Text
a -> EndpointResponse
s {$sel:requestId:EndpointResponse' :: Maybe Text
requestId = Maybe Text
a} :: EndpointResponse)
endpointResponse_metrics :: Lens.Lens' EndpointResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Double))
endpointResponse_metrics :: (Maybe (HashMap Text Double) -> f (Maybe (HashMap Text Double)))
-> EndpointResponse -> f EndpointResponse
endpointResponse_metrics = (EndpointResponse -> Maybe (HashMap Text Double))
-> (EndpointResponse
-> Maybe (HashMap Text Double) -> EndpointResponse)
-> Lens
EndpointResponse
EndpointResponse
(Maybe (HashMap Text Double))
(Maybe (HashMap Text Double))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe (HashMap Text Double)
metrics :: Maybe (HashMap Text Double)
$sel:metrics:EndpointResponse' :: EndpointResponse -> Maybe (HashMap Text Double)
metrics} -> Maybe (HashMap Text Double)
metrics) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe (HashMap Text Double)
a -> EndpointResponse
s {$sel:metrics:EndpointResponse' :: Maybe (HashMap Text Double)
metrics = Maybe (HashMap Text Double)
a} :: EndpointResponse) ((Maybe (HashMap Text Double) -> f (Maybe (HashMap Text Double)))
-> EndpointResponse -> f EndpointResponse)
-> ((Maybe (HashMap Text Double)
-> f (Maybe (HashMap Text Double)))
-> Maybe (HashMap Text Double) -> f (Maybe (HashMap Text Double)))
-> (Maybe (HashMap Text Double) -> f (Maybe (HashMap Text Double)))
-> EndpointResponse
-> f EndpointResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Double)
(HashMap Text Double)
(HashMap Text Double)
(HashMap Text Double)
-> Iso
(Maybe (HashMap Text Double))
(Maybe (HashMap Text Double))
(Maybe (HashMap Text Double))
(Maybe (HashMap Text Double))
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
(HashMap Text Double)
(HashMap Text Double)
(HashMap Text Double)
(HashMap Text Double)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
endpointResponse_location :: Lens.Lens' EndpointResponse (Prelude.Maybe EndpointLocation)
endpointResponse_location :: (Maybe EndpointLocation -> f (Maybe EndpointLocation))
-> EndpointResponse -> f EndpointResponse
endpointResponse_location = (EndpointResponse -> Maybe EndpointLocation)
-> (EndpointResponse -> Maybe EndpointLocation -> EndpointResponse)
-> Lens
EndpointResponse
EndpointResponse
(Maybe EndpointLocation)
(Maybe EndpointLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe EndpointLocation
location :: Maybe EndpointLocation
$sel:location:EndpointResponse' :: EndpointResponse -> Maybe EndpointLocation
location} -> Maybe EndpointLocation
location) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe EndpointLocation
a -> EndpointResponse
s {$sel:location:EndpointResponse' :: Maybe EndpointLocation
location = Maybe EndpointLocation
a} :: EndpointResponse)
endpointResponse_demographic :: Lens.Lens' EndpointResponse (Prelude.Maybe EndpointDemographic)
endpointResponse_demographic :: (Maybe EndpointDemographic -> f (Maybe EndpointDemographic))
-> EndpointResponse -> f EndpointResponse
endpointResponse_demographic = (EndpointResponse -> Maybe EndpointDemographic)
-> (EndpointResponse
-> Maybe EndpointDemographic -> EndpointResponse)
-> Lens
EndpointResponse
EndpointResponse
(Maybe EndpointDemographic)
(Maybe EndpointDemographic)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe EndpointDemographic
demographic :: Maybe EndpointDemographic
$sel:demographic:EndpointResponse' :: EndpointResponse -> Maybe EndpointDemographic
demographic} -> Maybe EndpointDemographic
demographic) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe EndpointDemographic
a -> EndpointResponse
s {$sel:demographic:EndpointResponse' :: Maybe EndpointDemographic
demographic = Maybe EndpointDemographic
a} :: EndpointResponse)
endpointResponse_cohortId :: Lens.Lens' EndpointResponse (Prelude.Maybe Prelude.Text)
endpointResponse_cohortId :: (Maybe Text -> f (Maybe Text))
-> EndpointResponse -> f EndpointResponse
endpointResponse_cohortId = (EndpointResponse -> Maybe Text)
-> (EndpointResponse -> Maybe Text -> EndpointResponse)
-> Lens EndpointResponse EndpointResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe Text
cohortId :: Maybe Text
$sel:cohortId:EndpointResponse' :: EndpointResponse -> Maybe Text
cohortId} -> Maybe Text
cohortId) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe Text
a -> EndpointResponse
s {$sel:cohortId:EndpointResponse' :: Maybe Text
cohortId = Maybe Text
a} :: EndpointResponse)
endpointResponse_address :: Lens.Lens' EndpointResponse (Prelude.Maybe Prelude.Text)
endpointResponse_address :: (Maybe Text -> f (Maybe Text))
-> EndpointResponse -> f EndpointResponse
endpointResponse_address = (EndpointResponse -> Maybe Text)
-> (EndpointResponse -> Maybe Text -> EndpointResponse)
-> Lens EndpointResponse EndpointResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe Text
address :: Maybe Text
$sel:address:EndpointResponse' :: EndpointResponse -> Maybe Text
address} -> Maybe Text
address) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe Text
a -> EndpointResponse
s {$sel:address:EndpointResponse' :: Maybe Text
address = Maybe Text
a} :: EndpointResponse)
endpointResponse_effectiveDate :: Lens.Lens' EndpointResponse (Prelude.Maybe Prelude.Text)
endpointResponse_effectiveDate :: (Maybe Text -> f (Maybe Text))
-> EndpointResponse -> f EndpointResponse
endpointResponse_effectiveDate = (EndpointResponse -> Maybe Text)
-> (EndpointResponse -> Maybe Text -> EndpointResponse)
-> Lens EndpointResponse EndpointResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe Text
effectiveDate :: Maybe Text
$sel:effectiveDate:EndpointResponse' :: EndpointResponse -> Maybe Text
effectiveDate} -> Maybe Text
effectiveDate) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe Text
a -> EndpointResponse
s {$sel:effectiveDate:EndpointResponse' :: Maybe Text
effectiveDate = Maybe Text
a} :: EndpointResponse)
endpointResponse_user :: Lens.Lens' EndpointResponse (Prelude.Maybe EndpointUser)
endpointResponse_user :: (Maybe EndpointUser -> f (Maybe EndpointUser))
-> EndpointResponse -> f EndpointResponse
endpointResponse_user = (EndpointResponse -> Maybe EndpointUser)
-> (EndpointResponse -> Maybe EndpointUser -> EndpointResponse)
-> Lens
EndpointResponse
EndpointResponse
(Maybe EndpointUser)
(Maybe EndpointUser)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe EndpointUser
user :: Maybe EndpointUser
$sel:user:EndpointResponse' :: EndpointResponse -> Maybe EndpointUser
user} -> Maybe EndpointUser
user) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe EndpointUser
a -> EndpointResponse
s {$sel:user:EndpointResponse' :: Maybe EndpointUser
user = Maybe EndpointUser
a} :: EndpointResponse)
endpointResponse_applicationId :: Lens.Lens' EndpointResponse (Prelude.Maybe Prelude.Text)
endpointResponse_applicationId :: (Maybe Text -> f (Maybe Text))
-> EndpointResponse -> f EndpointResponse
endpointResponse_applicationId = (EndpointResponse -> Maybe Text)
-> (EndpointResponse -> Maybe Text -> EndpointResponse)
-> Lens EndpointResponse EndpointResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:EndpointResponse' :: EndpointResponse -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe Text
a -> EndpointResponse
s {$sel:applicationId:EndpointResponse' :: Maybe Text
applicationId = Maybe Text
a} :: EndpointResponse)
endpointResponse_attributes :: Lens.Lens' EndpointResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
endpointResponse_attributes :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> EndpointResponse -> f EndpointResponse
endpointResponse_attributes = (EndpointResponse -> Maybe (HashMap Text [Text]))
-> (EndpointResponse
-> Maybe (HashMap Text [Text]) -> EndpointResponse)
-> Lens
EndpointResponse
EndpointResponse
(Maybe (HashMap Text [Text]))
(Maybe (HashMap Text [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe (HashMap Text [Text])
attributes :: Maybe (HashMap Text [Text])
$sel:attributes:EndpointResponse' :: EndpointResponse -> Maybe (HashMap Text [Text])
attributes} -> Maybe (HashMap Text [Text])
attributes) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe (HashMap Text [Text])
a -> EndpointResponse
s {$sel:attributes:EndpointResponse' :: Maybe (HashMap Text [Text])
attributes = Maybe (HashMap Text [Text])
a} :: EndpointResponse) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> EndpointResponse -> f EndpointResponse)
-> ((Maybe (HashMap Text [Text])
-> f (Maybe (HashMap Text [Text])))
-> Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> EndpointResponse
-> f EndpointResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text [Text])
(HashMap Text [Text])
(HashMap Text [Text])
(HashMap Text [Text])
-> Iso
(Maybe (HashMap Text [Text]))
(Maybe (HashMap Text [Text]))
(Maybe (HashMap Text [Text]))
(Maybe (HashMap Text [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
(HashMap Text [Text])
(HashMap Text [Text])
(HashMap Text [Text])
(HashMap Text [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
endpointResponse_endpointStatus :: Lens.Lens' EndpointResponse (Prelude.Maybe Prelude.Text)
endpointResponse_endpointStatus :: (Maybe Text -> f (Maybe Text))
-> EndpointResponse -> f EndpointResponse
endpointResponse_endpointStatus = (EndpointResponse -> Maybe Text)
-> (EndpointResponse -> Maybe Text -> EndpointResponse)
-> Lens EndpointResponse EndpointResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe Text
endpointStatus :: Maybe Text
$sel:endpointStatus:EndpointResponse' :: EndpointResponse -> Maybe Text
endpointStatus} -> Maybe Text
endpointStatus) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe Text
a -> EndpointResponse
s {$sel:endpointStatus:EndpointResponse' :: Maybe Text
endpointStatus = Maybe Text
a} :: EndpointResponse)
endpointResponse_optOut :: Lens.Lens' EndpointResponse (Prelude.Maybe Prelude.Text)
endpointResponse_optOut :: (Maybe Text -> f (Maybe Text))
-> EndpointResponse -> f EndpointResponse
endpointResponse_optOut = (EndpointResponse -> Maybe Text)
-> (EndpointResponse -> Maybe Text -> EndpointResponse)
-> Lens EndpointResponse EndpointResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe Text
optOut :: Maybe Text
$sel:optOut:EndpointResponse' :: EndpointResponse -> Maybe Text
optOut} -> Maybe Text
optOut) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe Text
a -> EndpointResponse
s {$sel:optOut:EndpointResponse' :: Maybe Text
optOut = Maybe Text
a} :: EndpointResponse)
endpointResponse_id :: Lens.Lens' EndpointResponse (Prelude.Maybe Prelude.Text)
endpointResponse_id :: (Maybe Text -> f (Maybe Text))
-> EndpointResponse -> f EndpointResponse
endpointResponse_id = (EndpointResponse -> Maybe Text)
-> (EndpointResponse -> Maybe Text -> EndpointResponse)
-> Lens EndpointResponse EndpointResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe Text
id :: Maybe Text
$sel:id:EndpointResponse' :: EndpointResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe Text
a -> EndpointResponse
s {$sel:id:EndpointResponse' :: Maybe Text
id = Maybe Text
a} :: EndpointResponse)
endpointResponse_creationDate :: Lens.Lens' EndpointResponse (Prelude.Maybe Prelude.Text)
endpointResponse_creationDate :: (Maybe Text -> f (Maybe Text))
-> EndpointResponse -> f EndpointResponse
endpointResponse_creationDate = (EndpointResponse -> Maybe Text)
-> (EndpointResponse -> Maybe Text -> EndpointResponse)
-> Lens EndpointResponse EndpointResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe Text
creationDate :: Maybe Text
$sel:creationDate:EndpointResponse' :: EndpointResponse -> Maybe Text
creationDate} -> Maybe Text
creationDate) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe Text
a -> EndpointResponse
s {$sel:creationDate:EndpointResponse' :: Maybe Text
creationDate = Maybe Text
a} :: EndpointResponse)
endpointResponse_channelType :: Lens.Lens' EndpointResponse (Prelude.Maybe ChannelType)
endpointResponse_channelType :: (Maybe ChannelType -> f (Maybe ChannelType))
-> EndpointResponse -> f EndpointResponse
endpointResponse_channelType = (EndpointResponse -> Maybe ChannelType)
-> (EndpointResponse -> Maybe ChannelType -> EndpointResponse)
-> Lens
EndpointResponse
EndpointResponse
(Maybe ChannelType)
(Maybe ChannelType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointResponse' {Maybe ChannelType
channelType :: Maybe ChannelType
$sel:channelType:EndpointResponse' :: EndpointResponse -> Maybe ChannelType
channelType} -> Maybe ChannelType
channelType) (\s :: EndpointResponse
s@EndpointResponse' {} Maybe ChannelType
a -> EndpointResponse
s {$sel:channelType:EndpointResponse' :: Maybe ChannelType
channelType = Maybe ChannelType
a} :: EndpointResponse)
instance Core.FromJSON EndpointResponse where
parseJSON :: Value -> Parser EndpointResponse
parseJSON =
String
-> (Object -> Parser EndpointResponse)
-> Value
-> Parser EndpointResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EndpointResponse"
( \Object
x ->
Maybe Text
-> Maybe (HashMap Text Double)
-> Maybe EndpointLocation
-> Maybe EndpointDemographic
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse
EndpointResponse'
(Maybe Text
-> Maybe (HashMap Text Double)
-> Maybe EndpointLocation
-> Maybe EndpointDemographic
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Double)
-> Maybe EndpointLocation
-> Maybe EndpointDemographic
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequestId")
Parser
(Maybe (HashMap Text Double)
-> Maybe EndpointLocation
-> Maybe EndpointDemographic
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe (HashMap Text Double))
-> Parser
(Maybe EndpointLocation
-> Maybe EndpointDemographic
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Double)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Metrics" Parser (Maybe (Maybe (HashMap Text Double)))
-> Maybe (HashMap Text Double)
-> Parser (Maybe (HashMap Text Double))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Double)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe EndpointLocation
-> Maybe EndpointDemographic
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe EndpointLocation)
-> Parser
(Maybe EndpointDemographic
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EndpointLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Location")
Parser
(Maybe EndpointDemographic
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe EndpointDemographic)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EndpointDemographic)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Demographic")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CohortId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Address")
Parser
(Maybe Text
-> Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EffectiveDate")
Parser
(Maybe EndpointUser
-> Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe EndpointUser)
-> Parser
(Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EndpointUser)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"User")
Parser
(Maybe Text
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ApplicationId")
Parser
(Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe (HashMap Text [Text]))
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text [Text])))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Attributes" Parser (Maybe (Maybe (HashMap Text [Text])))
-> Maybe (HashMap Text [Text])
-> Parser (Maybe (HashMap Text [Text]))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text [Text])
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndpointStatus")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> EndpointResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe ChannelType -> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OptOut")
Parser
(Maybe Text -> Maybe Text -> Maybe ChannelType -> EndpointResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe ChannelType -> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Id")
Parser (Maybe Text -> Maybe ChannelType -> EndpointResponse)
-> Parser (Maybe Text)
-> Parser (Maybe ChannelType -> EndpointResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationDate")
Parser (Maybe ChannelType -> EndpointResponse)
-> Parser (Maybe ChannelType) -> Parser EndpointResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ChannelType")
)
instance Prelude.Hashable EndpointResponse
instance Prelude.NFData EndpointResponse