{-# 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.GCMChannelResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data GCMChannelResponse = GCMChannelResponse'
{
GCMChannelResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
GCMChannelResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
GCMChannelResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
GCMChannelResponse -> Maybe Bool
hasCredential :: Prelude.Maybe Prelude.Bool,
GCMChannelResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
GCMChannelResponse -> Maybe Bool
isArchived :: Prelude.Maybe Prelude.Bool,
GCMChannelResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
GCMChannelResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
GCMChannelResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
GCMChannelResponse -> Text
credential :: Prelude.Text,
GCMChannelResponse -> Text
platform :: Prelude.Text
}
deriving (GCMChannelResponse -> GCMChannelResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GCMChannelResponse -> GCMChannelResponse -> Bool
$c/= :: GCMChannelResponse -> GCMChannelResponse -> Bool
== :: GCMChannelResponse -> GCMChannelResponse -> Bool
$c== :: GCMChannelResponse -> GCMChannelResponse -> Bool
Prelude.Eq, ReadPrec [GCMChannelResponse]
ReadPrec GCMChannelResponse
Int -> ReadS GCMChannelResponse
ReadS [GCMChannelResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GCMChannelResponse]
$creadListPrec :: ReadPrec [GCMChannelResponse]
readPrec :: ReadPrec GCMChannelResponse
$creadPrec :: ReadPrec GCMChannelResponse
readList :: ReadS [GCMChannelResponse]
$creadList :: ReadS [GCMChannelResponse]
readsPrec :: Int -> ReadS GCMChannelResponse
$creadsPrec :: Int -> ReadS GCMChannelResponse
Prelude.Read, Int -> GCMChannelResponse -> ShowS
[GCMChannelResponse] -> ShowS
GCMChannelResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GCMChannelResponse] -> ShowS
$cshowList :: [GCMChannelResponse] -> ShowS
show :: GCMChannelResponse -> String
$cshow :: GCMChannelResponse -> String
showsPrec :: Int -> GCMChannelResponse -> ShowS
$cshowsPrec :: Int -> GCMChannelResponse -> ShowS
Prelude.Show, forall x. Rep GCMChannelResponse x -> GCMChannelResponse
forall x. GCMChannelResponse -> Rep GCMChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GCMChannelResponse x -> GCMChannelResponse
$cfrom :: forall x. GCMChannelResponse -> Rep GCMChannelResponse x
Prelude.Generic)
newGCMChannelResponse ::
Prelude.Text ->
Prelude.Text ->
GCMChannelResponse
newGCMChannelResponse :: Text -> Text -> GCMChannelResponse
newGCMChannelResponse Text
pCredential_ Text
pPlatform_ =
GCMChannelResponse'
{ $sel:applicationId:GCMChannelResponse' :: Maybe Text
applicationId =
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:GCMChannelResponse' :: Maybe Text
creationDate = forall a. Maybe a
Prelude.Nothing,
$sel:enabled:GCMChannelResponse' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing,
$sel:hasCredential:GCMChannelResponse' :: Maybe Bool
hasCredential = forall a. Maybe a
Prelude.Nothing,
$sel:id:GCMChannelResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:isArchived:GCMChannelResponse' :: Maybe Bool
isArchived = forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedBy:GCMChannelResponse' :: Maybe Text
lastModifiedBy = forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:GCMChannelResponse' :: Maybe Text
lastModifiedDate = forall a. Maybe a
Prelude.Nothing,
$sel:version:GCMChannelResponse' :: Maybe Int
version = forall a. Maybe a
Prelude.Nothing,
$sel:credential:GCMChannelResponse' :: Text
credential = Text
pCredential_,
$sel:platform:GCMChannelResponse' :: Text
platform = Text
pPlatform_
}
gCMChannelResponse_applicationId :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Text)
gCMChannelResponse_applicationId :: Lens' GCMChannelResponse (Maybe Text)
gCMChannelResponse_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Maybe Text
a -> GCMChannelResponse
s {$sel:applicationId:GCMChannelResponse' :: Maybe Text
applicationId = Maybe Text
a} :: GCMChannelResponse)
gCMChannelResponse_creationDate :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Text)
gCMChannelResponse_creationDate :: Lens' GCMChannelResponse (Maybe Text)
gCMChannelResponse_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Maybe Text
creationDate :: Maybe Text
$sel:creationDate:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
creationDate} -> Maybe Text
creationDate) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Maybe Text
a -> GCMChannelResponse
s {$sel:creationDate:GCMChannelResponse' :: Maybe Text
creationDate = Maybe Text
a} :: GCMChannelResponse)
gCMChannelResponse_enabled :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Bool)
gCMChannelResponse_enabled :: Lens' GCMChannelResponse (Maybe Bool)
gCMChannelResponse_enabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:GCMChannelResponse' :: GCMChannelResponse -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Maybe Bool
a -> GCMChannelResponse
s {$sel:enabled:GCMChannelResponse' :: Maybe Bool
enabled = Maybe Bool
a} :: GCMChannelResponse)
gCMChannelResponse_hasCredential :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Bool)
gCMChannelResponse_hasCredential :: Lens' GCMChannelResponse (Maybe Bool)
gCMChannelResponse_hasCredential = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Maybe Bool
hasCredential :: Maybe Bool
$sel:hasCredential:GCMChannelResponse' :: GCMChannelResponse -> Maybe Bool
hasCredential} -> Maybe Bool
hasCredential) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Maybe Bool
a -> GCMChannelResponse
s {$sel:hasCredential:GCMChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
a} :: GCMChannelResponse)
gCMChannelResponse_id :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Text)
gCMChannelResponse_id :: Lens' GCMChannelResponse (Maybe Text)
gCMChannelResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Maybe Text
id :: Maybe Text
$sel:id:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Maybe Text
a -> GCMChannelResponse
s {$sel:id:GCMChannelResponse' :: Maybe Text
id = Maybe Text
a} :: GCMChannelResponse)
gCMChannelResponse_isArchived :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Bool)
gCMChannelResponse_isArchived :: Lens' GCMChannelResponse (Maybe Bool)
gCMChannelResponse_isArchived = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Maybe Bool
isArchived :: Maybe Bool
$sel:isArchived:GCMChannelResponse' :: GCMChannelResponse -> Maybe Bool
isArchived} -> Maybe Bool
isArchived) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Maybe Bool
a -> GCMChannelResponse
s {$sel:isArchived:GCMChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
a} :: GCMChannelResponse)
gCMChannelResponse_lastModifiedBy :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Text)
gCMChannelResponse_lastModifiedBy :: Lens' GCMChannelResponse (Maybe Text)
gCMChannelResponse_lastModifiedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Maybe Text
a -> GCMChannelResponse
s {$sel:lastModifiedBy:GCMChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: GCMChannelResponse)
gCMChannelResponse_lastModifiedDate :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Text)
gCMChannelResponse_lastModifiedDate :: Lens' GCMChannelResponse (Maybe Text)
gCMChannelResponse_lastModifiedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Maybe Text
a -> GCMChannelResponse
s {$sel:lastModifiedDate:GCMChannelResponse' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: GCMChannelResponse)
gCMChannelResponse_version :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Int)
gCMChannelResponse_version :: Lens' GCMChannelResponse (Maybe Int)
gCMChannelResponse_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Maybe Int
version :: Maybe Int
$sel:version:GCMChannelResponse' :: GCMChannelResponse -> Maybe Int
version} -> Maybe Int
version) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Maybe Int
a -> GCMChannelResponse
s {$sel:version:GCMChannelResponse' :: Maybe Int
version = Maybe Int
a} :: GCMChannelResponse)
gCMChannelResponse_credential :: Lens.Lens' GCMChannelResponse Prelude.Text
gCMChannelResponse_credential :: Lens' GCMChannelResponse Text
gCMChannelResponse_credential = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Text
credential :: Text
$sel:credential:GCMChannelResponse' :: GCMChannelResponse -> Text
credential} -> Text
credential) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Text
a -> GCMChannelResponse
s {$sel:credential:GCMChannelResponse' :: Text
credential = Text
a} :: GCMChannelResponse)
gCMChannelResponse_platform :: Lens.Lens' GCMChannelResponse Prelude.Text
gCMChannelResponse_platform :: Lens' GCMChannelResponse Text
gCMChannelResponse_platform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMChannelResponse' {Text
platform :: Text
$sel:platform:GCMChannelResponse' :: GCMChannelResponse -> Text
platform} -> Text
platform) (\s :: GCMChannelResponse
s@GCMChannelResponse' {} Text
a -> GCMChannelResponse
s {$sel:platform:GCMChannelResponse' :: Text
platform = Text
a} :: GCMChannelResponse)
instance Data.FromJSON GCMChannelResponse where
parseJSON :: Value -> Parser GCMChannelResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"GCMChannelResponse"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Text
-> Text
-> GCMChannelResponse
GCMChannelResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ApplicationId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Enabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"HasCredential")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IsArchived")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedBy")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Version")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Credential")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Platform")
)
instance Prelude.Hashable GCMChannelResponse where
hashWithSalt :: Int -> GCMChannelResponse -> Int
hashWithSalt Int
_salt GCMChannelResponse' {Maybe Bool
Maybe Int
Maybe Text
Text
platform :: Text
credential :: Text
version :: Maybe Int
lastModifiedDate :: Maybe Text
lastModifiedBy :: Maybe Text
isArchived :: Maybe Bool
id :: Maybe Text
hasCredential :: Maybe Bool
enabled :: Maybe Bool
creationDate :: Maybe Text
applicationId :: Maybe Text
$sel:platform:GCMChannelResponse' :: GCMChannelResponse -> Text
$sel:credential:GCMChannelResponse' :: GCMChannelResponse -> Text
$sel:version:GCMChannelResponse' :: GCMChannelResponse -> Maybe Int
$sel:lastModifiedDate:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
$sel:lastModifiedBy:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
$sel:isArchived:GCMChannelResponse' :: GCMChannelResponse -> Maybe Bool
$sel:id:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
$sel:hasCredential:GCMChannelResponse' :: GCMChannelResponse -> Maybe Bool
$sel:enabled:GCMChannelResponse' :: GCMChannelResponse -> Maybe Bool
$sel:creationDate:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
$sel:applicationId:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
applicationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
creationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
hasCredential
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isArchived
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastModifiedBy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastModifiedDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
version
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
credential
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
platform
instance Prelude.NFData GCMChannelResponse where
rnf :: GCMChannelResponse -> ()
rnf GCMChannelResponse' {Maybe Bool
Maybe Int
Maybe Text
Text
platform :: Text
credential :: Text
version :: Maybe Int
lastModifiedDate :: Maybe Text
lastModifiedBy :: Maybe Text
isArchived :: Maybe Bool
id :: Maybe Text
hasCredential :: Maybe Bool
enabled :: Maybe Bool
creationDate :: Maybe Text
applicationId :: Maybe Text
$sel:platform:GCMChannelResponse' :: GCMChannelResponse -> Text
$sel:credential:GCMChannelResponse' :: GCMChannelResponse -> Text
$sel:version:GCMChannelResponse' :: GCMChannelResponse -> Maybe Int
$sel:lastModifiedDate:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
$sel:lastModifiedBy:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
$sel:isArchived:GCMChannelResponse' :: GCMChannelResponse -> Maybe Bool
$sel:id:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
$sel:hasCredential:GCMChannelResponse' :: GCMChannelResponse -> Maybe Bool
$sel:enabled:GCMChannelResponse' :: GCMChannelResponse -> Maybe Bool
$sel:creationDate:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
$sel:applicationId:GCMChannelResponse' :: GCMChannelResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
creationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
hasCredential
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isArchived
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastModifiedBy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastModifiedDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
version
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
credential
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
platform