{-# 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.ChannelResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ChannelResponse = ChannelResponse'
{
ChannelResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
ChannelResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
ChannelResponse -> Maybe Bool
isArchived :: Prelude.Maybe Prelude.Bool,
ChannelResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
ChannelResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
ChannelResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ChannelResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
ChannelResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
ChannelResponse -> Maybe Bool
hasCredential :: Prelude.Maybe Prelude.Bool
}
deriving (ChannelResponse -> ChannelResponse -> Bool
(ChannelResponse -> ChannelResponse -> Bool)
-> (ChannelResponse -> ChannelResponse -> Bool)
-> Eq ChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelResponse -> ChannelResponse -> Bool
$c/= :: ChannelResponse -> ChannelResponse -> Bool
== :: ChannelResponse -> ChannelResponse -> Bool
$c== :: ChannelResponse -> ChannelResponse -> Bool
Prelude.Eq, ReadPrec [ChannelResponse]
ReadPrec ChannelResponse
Int -> ReadS ChannelResponse
ReadS [ChannelResponse]
(Int -> ReadS ChannelResponse)
-> ReadS [ChannelResponse]
-> ReadPrec ChannelResponse
-> ReadPrec [ChannelResponse]
-> Read ChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChannelResponse]
$creadListPrec :: ReadPrec [ChannelResponse]
readPrec :: ReadPrec ChannelResponse
$creadPrec :: ReadPrec ChannelResponse
readList :: ReadS [ChannelResponse]
$creadList :: ReadS [ChannelResponse]
readsPrec :: Int -> ReadS ChannelResponse
$creadsPrec :: Int -> ReadS ChannelResponse
Prelude.Read, Int -> ChannelResponse -> ShowS
[ChannelResponse] -> ShowS
ChannelResponse -> String
(Int -> ChannelResponse -> ShowS)
-> (ChannelResponse -> String)
-> ([ChannelResponse] -> ShowS)
-> Show ChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelResponse] -> ShowS
$cshowList :: [ChannelResponse] -> ShowS
show :: ChannelResponse -> String
$cshow :: ChannelResponse -> String
showsPrec :: Int -> ChannelResponse -> ShowS
$cshowsPrec :: Int -> ChannelResponse -> ShowS
Prelude.Show, (forall x. ChannelResponse -> Rep ChannelResponse x)
-> (forall x. Rep ChannelResponse x -> ChannelResponse)
-> Generic ChannelResponse
forall x. Rep ChannelResponse x -> ChannelResponse
forall x. ChannelResponse -> Rep ChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelResponse x -> ChannelResponse
$cfrom :: forall x. ChannelResponse -> Rep ChannelResponse x
Prelude.Generic)
newChannelResponse ::
ChannelResponse
newChannelResponse :: ChannelResponse
newChannelResponse =
ChannelResponse' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse
ChannelResponse'
{ $sel:lastModifiedDate:ChannelResponse' :: Maybe Text
lastModifiedDate =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enabled:ChannelResponse' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:isArchived:ChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:applicationId:ChannelResponse' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:ChannelResponse' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:id:ChannelResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:ChannelResponse' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedBy:ChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hasCredential:ChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
channelResponse_lastModifiedDate :: Lens.Lens' ChannelResponse (Prelude.Maybe Prelude.Text)
channelResponse_lastModifiedDate :: (Maybe Text -> f (Maybe Text))
-> ChannelResponse -> f ChannelResponse
channelResponse_lastModifiedDate = (ChannelResponse -> Maybe Text)
-> (ChannelResponse -> Maybe Text -> ChannelResponse)
-> Lens ChannelResponse ChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelResponse' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:ChannelResponse' :: ChannelResponse -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: ChannelResponse
s@ChannelResponse' {} Maybe Text
a -> ChannelResponse
s {$sel:lastModifiedDate:ChannelResponse' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: ChannelResponse)
channelResponse_enabled :: Lens.Lens' ChannelResponse (Prelude.Maybe Prelude.Bool)
channelResponse_enabled :: (Maybe Bool -> f (Maybe Bool))
-> ChannelResponse -> f ChannelResponse
channelResponse_enabled = (ChannelResponse -> Maybe Bool)
-> (ChannelResponse -> Maybe Bool -> ChannelResponse)
-> Lens ChannelResponse ChannelResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelResponse' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:ChannelResponse' :: ChannelResponse -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: ChannelResponse
s@ChannelResponse' {} Maybe Bool
a -> ChannelResponse
s {$sel:enabled:ChannelResponse' :: Maybe Bool
enabled = Maybe Bool
a} :: ChannelResponse)
channelResponse_isArchived :: Lens.Lens' ChannelResponse (Prelude.Maybe Prelude.Bool)
channelResponse_isArchived :: (Maybe Bool -> f (Maybe Bool))
-> ChannelResponse -> f ChannelResponse
channelResponse_isArchived = (ChannelResponse -> Maybe Bool)
-> (ChannelResponse -> Maybe Bool -> ChannelResponse)
-> Lens ChannelResponse ChannelResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelResponse' {Maybe Bool
isArchived :: Maybe Bool
$sel:isArchived:ChannelResponse' :: ChannelResponse -> Maybe Bool
isArchived} -> Maybe Bool
isArchived) (\s :: ChannelResponse
s@ChannelResponse' {} Maybe Bool
a -> ChannelResponse
s {$sel:isArchived:ChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
a} :: ChannelResponse)
channelResponse_applicationId :: Lens.Lens' ChannelResponse (Prelude.Maybe Prelude.Text)
channelResponse_applicationId :: (Maybe Text -> f (Maybe Text))
-> ChannelResponse -> f ChannelResponse
channelResponse_applicationId = (ChannelResponse -> Maybe Text)
-> (ChannelResponse -> Maybe Text -> ChannelResponse)
-> Lens ChannelResponse ChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelResponse' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:ChannelResponse' :: ChannelResponse -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: ChannelResponse
s@ChannelResponse' {} Maybe Text
a -> ChannelResponse
s {$sel:applicationId:ChannelResponse' :: Maybe Text
applicationId = Maybe Text
a} :: ChannelResponse)
channelResponse_version :: Lens.Lens' ChannelResponse (Prelude.Maybe Prelude.Int)
channelResponse_version :: (Maybe Int -> f (Maybe Int))
-> ChannelResponse -> f ChannelResponse
channelResponse_version = (ChannelResponse -> Maybe Int)
-> (ChannelResponse -> Maybe Int -> ChannelResponse)
-> Lens ChannelResponse ChannelResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelResponse' {Maybe Int
version :: Maybe Int
$sel:version:ChannelResponse' :: ChannelResponse -> Maybe Int
version} -> Maybe Int
version) (\s :: ChannelResponse
s@ChannelResponse' {} Maybe Int
a -> ChannelResponse
s {$sel:version:ChannelResponse' :: Maybe Int
version = Maybe Int
a} :: ChannelResponse)
channelResponse_id :: Lens.Lens' ChannelResponse (Prelude.Maybe Prelude.Text)
channelResponse_id :: (Maybe Text -> f (Maybe Text))
-> ChannelResponse -> f ChannelResponse
channelResponse_id = (ChannelResponse -> Maybe Text)
-> (ChannelResponse -> Maybe Text -> ChannelResponse)
-> Lens ChannelResponse ChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelResponse' {Maybe Text
id :: Maybe Text
$sel:id:ChannelResponse' :: ChannelResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: ChannelResponse
s@ChannelResponse' {} Maybe Text
a -> ChannelResponse
s {$sel:id:ChannelResponse' :: Maybe Text
id = Maybe Text
a} :: ChannelResponse)
channelResponse_creationDate :: Lens.Lens' ChannelResponse (Prelude.Maybe Prelude.Text)
channelResponse_creationDate :: (Maybe Text -> f (Maybe Text))
-> ChannelResponse -> f ChannelResponse
channelResponse_creationDate = (ChannelResponse -> Maybe Text)
-> (ChannelResponse -> Maybe Text -> ChannelResponse)
-> Lens ChannelResponse ChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelResponse' {Maybe Text
creationDate :: Maybe Text
$sel:creationDate:ChannelResponse' :: ChannelResponse -> Maybe Text
creationDate} -> Maybe Text
creationDate) (\s :: ChannelResponse
s@ChannelResponse' {} Maybe Text
a -> ChannelResponse
s {$sel:creationDate:ChannelResponse' :: Maybe Text
creationDate = Maybe Text
a} :: ChannelResponse)
channelResponse_lastModifiedBy :: Lens.Lens' ChannelResponse (Prelude.Maybe Prelude.Text)
channelResponse_lastModifiedBy :: (Maybe Text -> f (Maybe Text))
-> ChannelResponse -> f ChannelResponse
channelResponse_lastModifiedBy = (ChannelResponse -> Maybe Text)
-> (ChannelResponse -> Maybe Text -> ChannelResponse)
-> Lens ChannelResponse ChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelResponse' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:ChannelResponse' :: ChannelResponse -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: ChannelResponse
s@ChannelResponse' {} Maybe Text
a -> ChannelResponse
s {$sel:lastModifiedBy:ChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: ChannelResponse)
channelResponse_hasCredential :: Lens.Lens' ChannelResponse (Prelude.Maybe Prelude.Bool)
channelResponse_hasCredential :: (Maybe Bool -> f (Maybe Bool))
-> ChannelResponse -> f ChannelResponse
channelResponse_hasCredential = (ChannelResponse -> Maybe Bool)
-> (ChannelResponse -> Maybe Bool -> ChannelResponse)
-> Lens ChannelResponse ChannelResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelResponse' {Maybe Bool
hasCredential :: Maybe Bool
$sel:hasCredential:ChannelResponse' :: ChannelResponse -> Maybe Bool
hasCredential} -> Maybe Bool
hasCredential) (\s :: ChannelResponse
s@ChannelResponse' {} Maybe Bool
a -> ChannelResponse
s {$sel:hasCredential:ChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
a} :: ChannelResponse)
instance Core.FromJSON ChannelResponse where
parseJSON :: Value -> Parser ChannelResponse
parseJSON =
String
-> (Object -> Parser ChannelResponse)
-> Value
-> Parser ChannelResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ChannelResponse"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse
ChannelResponse'
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse)
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
"LastModifiedDate")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Enabled")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IsArchived")
Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse)
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 Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> ChannelResponse)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Bool -> ChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Bool -> ChannelResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Bool -> ChannelResponse)
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 Text -> Maybe Bool -> ChannelResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Bool -> ChannelResponse)
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 Text -> Maybe Bool -> ChannelResponse)
-> Parser (Maybe Text) -> Parser (Maybe Bool -> ChannelResponse)
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
"LastModifiedBy")
Parser (Maybe Bool -> ChannelResponse)
-> Parser (Maybe Bool) -> Parser ChannelResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HasCredential")
)
instance Prelude.Hashable ChannelResponse
instance Prelude.NFData ChannelResponse