{-# 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.ADMChannelResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ADMChannelResponse = ADMChannelResponse'
{
ADMChannelResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
ADMChannelResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
ADMChannelResponse -> Maybe Bool
isArchived :: Prelude.Maybe Prelude.Bool,
ADMChannelResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
ADMChannelResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
ADMChannelResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ADMChannelResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
ADMChannelResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
ADMChannelResponse -> Maybe Bool
hasCredential :: Prelude.Maybe Prelude.Bool,
ADMChannelResponse -> Text
platform :: Prelude.Text
}
deriving (ADMChannelResponse -> ADMChannelResponse -> Bool
(ADMChannelResponse -> ADMChannelResponse -> Bool)
-> (ADMChannelResponse -> ADMChannelResponse -> Bool)
-> Eq ADMChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ADMChannelResponse -> ADMChannelResponse -> Bool
$c/= :: ADMChannelResponse -> ADMChannelResponse -> Bool
== :: ADMChannelResponse -> ADMChannelResponse -> Bool
$c== :: ADMChannelResponse -> ADMChannelResponse -> Bool
Prelude.Eq, ReadPrec [ADMChannelResponse]
ReadPrec ADMChannelResponse
Int -> ReadS ADMChannelResponse
ReadS [ADMChannelResponse]
(Int -> ReadS ADMChannelResponse)
-> ReadS [ADMChannelResponse]
-> ReadPrec ADMChannelResponse
-> ReadPrec [ADMChannelResponse]
-> Read ADMChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ADMChannelResponse]
$creadListPrec :: ReadPrec [ADMChannelResponse]
readPrec :: ReadPrec ADMChannelResponse
$creadPrec :: ReadPrec ADMChannelResponse
readList :: ReadS [ADMChannelResponse]
$creadList :: ReadS [ADMChannelResponse]
readsPrec :: Int -> ReadS ADMChannelResponse
$creadsPrec :: Int -> ReadS ADMChannelResponse
Prelude.Read, Int -> ADMChannelResponse -> ShowS
[ADMChannelResponse] -> ShowS
ADMChannelResponse -> String
(Int -> ADMChannelResponse -> ShowS)
-> (ADMChannelResponse -> String)
-> ([ADMChannelResponse] -> ShowS)
-> Show ADMChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ADMChannelResponse] -> ShowS
$cshowList :: [ADMChannelResponse] -> ShowS
show :: ADMChannelResponse -> String
$cshow :: ADMChannelResponse -> String
showsPrec :: Int -> ADMChannelResponse -> ShowS
$cshowsPrec :: Int -> ADMChannelResponse -> ShowS
Prelude.Show, (forall x. ADMChannelResponse -> Rep ADMChannelResponse x)
-> (forall x. Rep ADMChannelResponse x -> ADMChannelResponse)
-> Generic ADMChannelResponse
forall x. Rep ADMChannelResponse x -> ADMChannelResponse
forall x. ADMChannelResponse -> Rep ADMChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ADMChannelResponse x -> ADMChannelResponse
$cfrom :: forall x. ADMChannelResponse -> Rep ADMChannelResponse x
Prelude.Generic)
newADMChannelResponse ::
Prelude.Text ->
ADMChannelResponse
newADMChannelResponse :: Text -> ADMChannelResponse
newADMChannelResponse Text
pPlatform_ =
ADMChannelResponse' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> ADMChannelResponse
ADMChannelResponse'
{ $sel:lastModifiedDate:ADMChannelResponse' :: Maybe Text
lastModifiedDate =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enabled:ADMChannelResponse' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:isArchived:ADMChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:applicationId:ADMChannelResponse' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:ADMChannelResponse' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:id:ADMChannelResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:ADMChannelResponse' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedBy:ADMChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hasCredential:ADMChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:platform:ADMChannelResponse' :: Text
platform = Text
pPlatform_
}
aDMChannelResponse_lastModifiedDate :: Lens.Lens' ADMChannelResponse (Prelude.Maybe Prelude.Text)
aDMChannelResponse_lastModifiedDate :: (Maybe Text -> f (Maybe Text))
-> ADMChannelResponse -> f ADMChannelResponse
aDMChannelResponse_lastModifiedDate = (ADMChannelResponse -> Maybe Text)
-> (ADMChannelResponse -> Maybe Text -> ADMChannelResponse)
-> Lens
ADMChannelResponse ADMChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMChannelResponse' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:ADMChannelResponse' :: ADMChannelResponse -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: ADMChannelResponse
s@ADMChannelResponse' {} Maybe Text
a -> ADMChannelResponse
s {$sel:lastModifiedDate:ADMChannelResponse' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: ADMChannelResponse)
aDMChannelResponse_enabled :: Lens.Lens' ADMChannelResponse (Prelude.Maybe Prelude.Bool)
aDMChannelResponse_enabled :: (Maybe Bool -> f (Maybe Bool))
-> ADMChannelResponse -> f ADMChannelResponse
aDMChannelResponse_enabled = (ADMChannelResponse -> Maybe Bool)
-> (ADMChannelResponse -> Maybe Bool -> ADMChannelResponse)
-> Lens
ADMChannelResponse ADMChannelResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMChannelResponse' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:ADMChannelResponse' :: ADMChannelResponse -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: ADMChannelResponse
s@ADMChannelResponse' {} Maybe Bool
a -> ADMChannelResponse
s {$sel:enabled:ADMChannelResponse' :: Maybe Bool
enabled = Maybe Bool
a} :: ADMChannelResponse)
aDMChannelResponse_isArchived :: Lens.Lens' ADMChannelResponse (Prelude.Maybe Prelude.Bool)
aDMChannelResponse_isArchived :: (Maybe Bool -> f (Maybe Bool))
-> ADMChannelResponse -> f ADMChannelResponse
aDMChannelResponse_isArchived = (ADMChannelResponse -> Maybe Bool)
-> (ADMChannelResponse -> Maybe Bool -> ADMChannelResponse)
-> Lens
ADMChannelResponse ADMChannelResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMChannelResponse' {Maybe Bool
isArchived :: Maybe Bool
$sel:isArchived:ADMChannelResponse' :: ADMChannelResponse -> Maybe Bool
isArchived} -> Maybe Bool
isArchived) (\s :: ADMChannelResponse
s@ADMChannelResponse' {} Maybe Bool
a -> ADMChannelResponse
s {$sel:isArchived:ADMChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
a} :: ADMChannelResponse)
aDMChannelResponse_applicationId :: Lens.Lens' ADMChannelResponse (Prelude.Maybe Prelude.Text)
aDMChannelResponse_applicationId :: (Maybe Text -> f (Maybe Text))
-> ADMChannelResponse -> f ADMChannelResponse
aDMChannelResponse_applicationId = (ADMChannelResponse -> Maybe Text)
-> (ADMChannelResponse -> Maybe Text -> ADMChannelResponse)
-> Lens
ADMChannelResponse ADMChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMChannelResponse' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:ADMChannelResponse' :: ADMChannelResponse -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: ADMChannelResponse
s@ADMChannelResponse' {} Maybe Text
a -> ADMChannelResponse
s {$sel:applicationId:ADMChannelResponse' :: Maybe Text
applicationId = Maybe Text
a} :: ADMChannelResponse)
aDMChannelResponse_version :: Lens.Lens' ADMChannelResponse (Prelude.Maybe Prelude.Int)
aDMChannelResponse_version :: (Maybe Int -> f (Maybe Int))
-> ADMChannelResponse -> f ADMChannelResponse
aDMChannelResponse_version = (ADMChannelResponse -> Maybe Int)
-> (ADMChannelResponse -> Maybe Int -> ADMChannelResponse)
-> Lens
ADMChannelResponse ADMChannelResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMChannelResponse' {Maybe Int
version :: Maybe Int
$sel:version:ADMChannelResponse' :: ADMChannelResponse -> Maybe Int
version} -> Maybe Int
version) (\s :: ADMChannelResponse
s@ADMChannelResponse' {} Maybe Int
a -> ADMChannelResponse
s {$sel:version:ADMChannelResponse' :: Maybe Int
version = Maybe Int
a} :: ADMChannelResponse)
aDMChannelResponse_id :: Lens.Lens' ADMChannelResponse (Prelude.Maybe Prelude.Text)
aDMChannelResponse_id :: (Maybe Text -> f (Maybe Text))
-> ADMChannelResponse -> f ADMChannelResponse
aDMChannelResponse_id = (ADMChannelResponse -> Maybe Text)
-> (ADMChannelResponse -> Maybe Text -> ADMChannelResponse)
-> Lens
ADMChannelResponse ADMChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMChannelResponse' {Maybe Text
id :: Maybe Text
$sel:id:ADMChannelResponse' :: ADMChannelResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: ADMChannelResponse
s@ADMChannelResponse' {} Maybe Text
a -> ADMChannelResponse
s {$sel:id:ADMChannelResponse' :: Maybe Text
id = Maybe Text
a} :: ADMChannelResponse)
aDMChannelResponse_creationDate :: Lens.Lens' ADMChannelResponse (Prelude.Maybe Prelude.Text)
aDMChannelResponse_creationDate :: (Maybe Text -> f (Maybe Text))
-> ADMChannelResponse -> f ADMChannelResponse
aDMChannelResponse_creationDate = (ADMChannelResponse -> Maybe Text)
-> (ADMChannelResponse -> Maybe Text -> ADMChannelResponse)
-> Lens
ADMChannelResponse ADMChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMChannelResponse' {Maybe Text
creationDate :: Maybe Text
$sel:creationDate:ADMChannelResponse' :: ADMChannelResponse -> Maybe Text
creationDate} -> Maybe Text
creationDate) (\s :: ADMChannelResponse
s@ADMChannelResponse' {} Maybe Text
a -> ADMChannelResponse
s {$sel:creationDate:ADMChannelResponse' :: Maybe Text
creationDate = Maybe Text
a} :: ADMChannelResponse)
aDMChannelResponse_lastModifiedBy :: Lens.Lens' ADMChannelResponse (Prelude.Maybe Prelude.Text)
aDMChannelResponse_lastModifiedBy :: (Maybe Text -> f (Maybe Text))
-> ADMChannelResponse -> f ADMChannelResponse
aDMChannelResponse_lastModifiedBy = (ADMChannelResponse -> Maybe Text)
-> (ADMChannelResponse -> Maybe Text -> ADMChannelResponse)
-> Lens
ADMChannelResponse ADMChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMChannelResponse' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:ADMChannelResponse' :: ADMChannelResponse -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: ADMChannelResponse
s@ADMChannelResponse' {} Maybe Text
a -> ADMChannelResponse
s {$sel:lastModifiedBy:ADMChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: ADMChannelResponse)
aDMChannelResponse_hasCredential :: Lens.Lens' ADMChannelResponse (Prelude.Maybe Prelude.Bool)
aDMChannelResponse_hasCredential :: (Maybe Bool -> f (Maybe Bool))
-> ADMChannelResponse -> f ADMChannelResponse
aDMChannelResponse_hasCredential = (ADMChannelResponse -> Maybe Bool)
-> (ADMChannelResponse -> Maybe Bool -> ADMChannelResponse)
-> Lens
ADMChannelResponse ADMChannelResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMChannelResponse' {Maybe Bool
hasCredential :: Maybe Bool
$sel:hasCredential:ADMChannelResponse' :: ADMChannelResponse -> Maybe Bool
hasCredential} -> Maybe Bool
hasCredential) (\s :: ADMChannelResponse
s@ADMChannelResponse' {} Maybe Bool
a -> ADMChannelResponse
s {$sel:hasCredential:ADMChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
a} :: ADMChannelResponse)
aDMChannelResponse_platform :: Lens.Lens' ADMChannelResponse Prelude.Text
aDMChannelResponse_platform :: (Text -> f Text) -> ADMChannelResponse -> f ADMChannelResponse
aDMChannelResponse_platform = (ADMChannelResponse -> Text)
-> (ADMChannelResponse -> Text -> ADMChannelResponse)
-> Lens ADMChannelResponse ADMChannelResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMChannelResponse' {Text
platform :: Text
$sel:platform:ADMChannelResponse' :: ADMChannelResponse -> Text
platform} -> Text
platform) (\s :: ADMChannelResponse
s@ADMChannelResponse' {} Text
a -> ADMChannelResponse
s {$sel:platform:ADMChannelResponse' :: Text
platform = Text
a} :: ADMChannelResponse)
instance Core.FromJSON ADMChannelResponse where
parseJSON :: Value -> Parser ADMChannelResponse
parseJSON =
String
-> (Object -> Parser ADMChannelResponse)
-> Value
-> Parser ADMChannelResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ADMChannelResponse"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> ADMChannelResponse
ADMChannelResponse'
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> ADMChannelResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> ADMChannelResponse)
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
-> Text
-> ADMChannelResponse)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> ADMChannelResponse)
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
-> Text
-> ADMChannelResponse)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> ADMChannelResponse)
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
-> Text
-> ADMChannelResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> ADMChannelResponse)
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
-> Text
-> ADMChannelResponse)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> ADMChannelResponse)
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
-> Text
-> ADMChannelResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Bool -> Text -> ADMChannelResponse)
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 -> Text -> ADMChannelResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Bool -> Text -> ADMChannelResponse)
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 -> Text -> ADMChannelResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> Text -> ADMChannelResponse)
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 -> Text -> ADMChannelResponse)
-> Parser (Maybe Bool) -> Parser (Text -> ADMChannelResponse)
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")
Parser (Text -> ADMChannelResponse)
-> Parser Text -> Parser ADMChannelResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Platform")
)
instance Prelude.Hashable ADMChannelResponse
instance Prelude.NFData ADMChannelResponse