{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Pinpoint.Types.GCMChannelResponse
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Pinpoint.Types.GCMChannelResponse where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides information about the status and settings of the GCM channel
-- for an application. The GCM channel enables Amazon Pinpoint to send push
-- notifications through the Firebase Cloud Messaging (FCM), formerly
-- Google Cloud Messaging (GCM), service.
--
-- /See:/ 'newGCMChannelResponse' smart constructor.
data GCMChannelResponse = GCMChannelResponse'
  { -- | The date and time when the GCM channel was last modified.
    GCMChannelResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the GCM channel is enabled for the application.
    GCMChannelResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether the GCM channel is archived.
    GCMChannelResponse -> Maybe Bool
isArchived :: Prelude.Maybe Prelude.Bool,
    -- | The unique identifier for the application that the GCM channel applies
    -- to.
    GCMChannelResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
    -- | The current version of the GCM channel.
    GCMChannelResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
    -- | (Deprecated) An identifier for the GCM channel. This property is
    -- retained only for backward compatibility.
    GCMChannelResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the GCM channel was enabled.
    GCMChannelResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
    -- | The user who last modified the GCM channel.
    GCMChannelResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | (Not used) This property is retained only for backward compatibility.
    GCMChannelResponse -> Maybe Bool
hasCredential :: Prelude.Maybe Prelude.Bool,
    -- | The Web API Key, also referred to as an /API_KEY/ or /server key/, that
    -- you received from Google to communicate with Google services.
    GCMChannelResponse -> Text
credential :: Prelude.Text,
    -- | The type of messaging or notification platform for the channel. For the
    -- GCM channel, this value is GCM.
    GCMChannelResponse -> Text
platform :: Prelude.Text
  }
  deriving (GCMChannelResponse -> GCMChannelResponse -> Bool
(GCMChannelResponse -> GCMChannelResponse -> Bool)
-> (GCMChannelResponse -> GCMChannelResponse -> Bool)
-> Eq GCMChannelResponse
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]
(Int -> ReadS GCMChannelResponse)
-> ReadS [GCMChannelResponse]
-> ReadPrec GCMChannelResponse
-> ReadPrec [GCMChannelResponse]
-> Read 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
(Int -> GCMChannelResponse -> ShowS)
-> (GCMChannelResponse -> String)
-> ([GCMChannelResponse] -> ShowS)
-> Show GCMChannelResponse
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. GCMChannelResponse -> Rep GCMChannelResponse x)
-> (forall x. Rep GCMChannelResponse x -> GCMChannelResponse)
-> Generic GCMChannelResponse
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)

-- |
-- Create a value of 'GCMChannelResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'lastModifiedDate', 'gCMChannelResponse_lastModifiedDate' - The date and time when the GCM channel was last modified.
--
-- 'enabled', 'gCMChannelResponse_enabled' - Specifies whether the GCM channel is enabled for the application.
--
-- 'isArchived', 'gCMChannelResponse_isArchived' - Specifies whether the GCM channel is archived.
--
-- 'applicationId', 'gCMChannelResponse_applicationId' - The unique identifier for the application that the GCM channel applies
-- to.
--
-- 'version', 'gCMChannelResponse_version' - The current version of the GCM channel.
--
-- 'id', 'gCMChannelResponse_id' - (Deprecated) An identifier for the GCM channel. This property is
-- retained only for backward compatibility.
--
-- 'creationDate', 'gCMChannelResponse_creationDate' - The date and time when the GCM channel was enabled.
--
-- 'lastModifiedBy', 'gCMChannelResponse_lastModifiedBy' - The user who last modified the GCM channel.
--
-- 'hasCredential', 'gCMChannelResponse_hasCredential' - (Not used) This property is retained only for backward compatibility.
--
-- 'credential', 'gCMChannelResponse_credential' - The Web API Key, also referred to as an /API_KEY/ or /server key/, that
-- you received from Google to communicate with Google services.
--
-- 'platform', 'gCMChannelResponse_platform' - The type of messaging or notification platform for the channel. For the
-- GCM channel, this value is GCM.
newGCMChannelResponse ::
  -- | 'credential'
  Prelude.Text ->
  -- | 'platform'
  Prelude.Text ->
  GCMChannelResponse
newGCMChannelResponse :: Text -> Text -> GCMChannelResponse
newGCMChannelResponse Text
pCredential_ Text
pPlatform_ =
  GCMChannelResponse' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> Text
-> GCMChannelResponse
GCMChannelResponse'
    { $sel:lastModifiedDate:GCMChannelResponse' :: Maybe Text
lastModifiedDate =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:GCMChannelResponse' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:isArchived:GCMChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:GCMChannelResponse' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:GCMChannelResponse' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:id:GCMChannelResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:GCMChannelResponse' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:GCMChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hasCredential:GCMChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:credential:GCMChannelResponse' :: Text
credential = Text
pCredential_,
      $sel:platform:GCMChannelResponse' :: Text
platform = Text
pPlatform_
    }

-- | The date and time when the GCM channel was last modified.
gCMChannelResponse_lastModifiedDate :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Text)
gCMChannelResponse_lastModifiedDate :: (Maybe Text -> f (Maybe Text))
-> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_lastModifiedDate = (GCMChannelResponse -> Maybe Text)
-> (GCMChannelResponse -> Maybe Text -> GCMChannelResponse)
-> Lens
     GCMChannelResponse GCMChannelResponse (Maybe Text) (Maybe Text)
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)

-- | Specifies whether the GCM channel is enabled for the application.
gCMChannelResponse_enabled :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Bool)
gCMChannelResponse_enabled :: (Maybe Bool -> f (Maybe Bool))
-> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_enabled = (GCMChannelResponse -> Maybe Bool)
-> (GCMChannelResponse -> Maybe Bool -> GCMChannelResponse)
-> Lens
     GCMChannelResponse GCMChannelResponse (Maybe Bool) (Maybe Bool)
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)

-- | Specifies whether the GCM channel is archived.
gCMChannelResponse_isArchived :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Bool)
gCMChannelResponse_isArchived :: (Maybe Bool -> f (Maybe Bool))
-> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_isArchived = (GCMChannelResponse -> Maybe Bool)
-> (GCMChannelResponse -> Maybe Bool -> GCMChannelResponse)
-> Lens
     GCMChannelResponse GCMChannelResponse (Maybe Bool) (Maybe Bool)
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)

-- | The unique identifier for the application that the GCM channel applies
-- to.
gCMChannelResponse_applicationId :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Text)
gCMChannelResponse_applicationId :: (Maybe Text -> f (Maybe Text))
-> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_applicationId = (GCMChannelResponse -> Maybe Text)
-> (GCMChannelResponse -> Maybe Text -> GCMChannelResponse)
-> Lens
     GCMChannelResponse GCMChannelResponse (Maybe Text) (Maybe Text)
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)

-- | The current version of the GCM channel.
gCMChannelResponse_version :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Int)
gCMChannelResponse_version :: (Maybe Int -> f (Maybe Int))
-> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_version = (GCMChannelResponse -> Maybe Int)
-> (GCMChannelResponse -> Maybe Int -> GCMChannelResponse)
-> Lens
     GCMChannelResponse GCMChannelResponse (Maybe Int) (Maybe Int)
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)

-- | (Deprecated) An identifier for the GCM channel. This property is
-- retained only for backward compatibility.
gCMChannelResponse_id :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Text)
gCMChannelResponse_id :: (Maybe Text -> f (Maybe Text))
-> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_id = (GCMChannelResponse -> Maybe Text)
-> (GCMChannelResponse -> Maybe Text -> GCMChannelResponse)
-> Lens
     GCMChannelResponse GCMChannelResponse (Maybe Text) (Maybe Text)
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)

-- | The date and time when the GCM channel was enabled.
gCMChannelResponse_creationDate :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Text)
gCMChannelResponse_creationDate :: (Maybe Text -> f (Maybe Text))
-> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_creationDate = (GCMChannelResponse -> Maybe Text)
-> (GCMChannelResponse -> Maybe Text -> GCMChannelResponse)
-> Lens
     GCMChannelResponse GCMChannelResponse (Maybe Text) (Maybe Text)
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)

-- | The user who last modified the GCM channel.
gCMChannelResponse_lastModifiedBy :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Text)
gCMChannelResponse_lastModifiedBy :: (Maybe Text -> f (Maybe Text))
-> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_lastModifiedBy = (GCMChannelResponse -> Maybe Text)
-> (GCMChannelResponse -> Maybe Text -> GCMChannelResponse)
-> Lens
     GCMChannelResponse GCMChannelResponse (Maybe Text) (Maybe Text)
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)

-- | (Not used) This property is retained only for backward compatibility.
gCMChannelResponse_hasCredential :: Lens.Lens' GCMChannelResponse (Prelude.Maybe Prelude.Bool)
gCMChannelResponse_hasCredential :: (Maybe Bool -> f (Maybe Bool))
-> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_hasCredential = (GCMChannelResponse -> Maybe Bool)
-> (GCMChannelResponse -> Maybe Bool -> GCMChannelResponse)
-> Lens
     GCMChannelResponse GCMChannelResponse (Maybe Bool) (Maybe Bool)
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)

-- | The Web API Key, also referred to as an /API_KEY/ or /server key/, that
-- you received from Google to communicate with Google services.
gCMChannelResponse_credential :: Lens.Lens' GCMChannelResponse Prelude.Text
gCMChannelResponse_credential :: (Text -> f Text) -> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_credential = (GCMChannelResponse -> Text)
-> (GCMChannelResponse -> Text -> GCMChannelResponse)
-> Lens GCMChannelResponse GCMChannelResponse Text Text
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)

-- | The type of messaging or notification platform for the channel. For the
-- GCM channel, this value is GCM.
gCMChannelResponse_platform :: Lens.Lens' GCMChannelResponse Prelude.Text
gCMChannelResponse_platform :: (Text -> f Text) -> GCMChannelResponse -> f GCMChannelResponse
gCMChannelResponse_platform = (GCMChannelResponse -> Text)
-> (GCMChannelResponse -> Text -> GCMChannelResponse)
-> Lens GCMChannelResponse GCMChannelResponse Text Text
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 Core.FromJSON GCMChannelResponse where
  parseJSON :: Value -> Parser GCMChannelResponse
parseJSON =
    String
-> (Object -> Parser GCMChannelResponse)
-> Value
-> Parser GCMChannelResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"GCMChannelResponse"
      ( \Object
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> Text
-> GCMChannelResponse
GCMChannelResponse'
            (Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Text
 -> Text
 -> GCMChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> GCMChannelResponse)
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
   -> Text
   -> GCMChannelResponse)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> GCMChannelResponse)
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
   -> Text
   -> GCMChannelResponse)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> GCMChannelResponse)
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
   -> Text
   -> GCMChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> GCMChannelResponse)
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
   -> Text
   -> GCMChannelResponse)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> GCMChannelResponse)
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
   -> Text
   -> GCMChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Bool -> Text -> Text -> GCMChannelResponse)
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 -> Text -> GCMChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Bool -> Text -> Text -> GCMChannelResponse)
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 -> Text -> GCMChannelResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> Text -> Text -> GCMChannelResponse)
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 -> Text -> GCMChannelResponse)
-> Parser (Maybe Bool)
-> Parser (Text -> Text -> GCMChannelResponse)
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 -> Text -> GCMChannelResponse)
-> Parser Text -> Parser (Text -> GCMChannelResponse)
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
"Credential")
            Parser (Text -> GCMChannelResponse)
-> Parser Text -> Parser GCMChannelResponse
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 GCMChannelResponse

instance Prelude.NFData GCMChannelResponse