{-# 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.BaiduChannelResponse
-- 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.BaiduChannelResponse 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 Baidu (Baidu
-- Cloud Push) channel for an application.
--
-- /See:/ 'newBaiduChannelResponse' smart constructor.
data BaiduChannelResponse = BaiduChannelResponse'
  { -- | The date and time when the Baidu channel was last modified.
    BaiduChannelResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the Baidu channel is enabled for the application.
    BaiduChannelResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether the Baidu channel is archived.
    BaiduChannelResponse -> Maybe Bool
isArchived :: Prelude.Maybe Prelude.Bool,
    -- | The unique identifier for the application that the Baidu channel applies
    -- to.
    BaiduChannelResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
    -- | The current version of the Baidu channel.
    BaiduChannelResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
    -- | (Deprecated) An identifier for the Baidu channel. This property is
    -- retained only for backward compatibility.
    BaiduChannelResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the Baidu channel was enabled.
    BaiduChannelResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
    -- | The user who last modified the Baidu channel.
    BaiduChannelResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | (Not used) This property is retained only for backward compatibility.
    BaiduChannelResponse -> Maybe Bool
hasCredential :: Prelude.Maybe Prelude.Bool,
    -- | The API key that you received from the Baidu Cloud Push service to
    -- communicate with the service.
    BaiduChannelResponse -> Text
credential :: Prelude.Text,
    -- | The type of messaging or notification platform for the channel. For the
    -- Baidu channel, this value is BAIDU.
    BaiduChannelResponse -> Text
platform :: Prelude.Text
  }
  deriving (BaiduChannelResponse -> BaiduChannelResponse -> Bool
(BaiduChannelResponse -> BaiduChannelResponse -> Bool)
-> (BaiduChannelResponse -> BaiduChannelResponse -> Bool)
-> Eq BaiduChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BaiduChannelResponse -> BaiduChannelResponse -> Bool
$c/= :: BaiduChannelResponse -> BaiduChannelResponse -> Bool
== :: BaiduChannelResponse -> BaiduChannelResponse -> Bool
$c== :: BaiduChannelResponse -> BaiduChannelResponse -> Bool
Prelude.Eq, ReadPrec [BaiduChannelResponse]
ReadPrec BaiduChannelResponse
Int -> ReadS BaiduChannelResponse
ReadS [BaiduChannelResponse]
(Int -> ReadS BaiduChannelResponse)
-> ReadS [BaiduChannelResponse]
-> ReadPrec BaiduChannelResponse
-> ReadPrec [BaiduChannelResponse]
-> Read BaiduChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BaiduChannelResponse]
$creadListPrec :: ReadPrec [BaiduChannelResponse]
readPrec :: ReadPrec BaiduChannelResponse
$creadPrec :: ReadPrec BaiduChannelResponse
readList :: ReadS [BaiduChannelResponse]
$creadList :: ReadS [BaiduChannelResponse]
readsPrec :: Int -> ReadS BaiduChannelResponse
$creadsPrec :: Int -> ReadS BaiduChannelResponse
Prelude.Read, Int -> BaiduChannelResponse -> ShowS
[BaiduChannelResponse] -> ShowS
BaiduChannelResponse -> String
(Int -> BaiduChannelResponse -> ShowS)
-> (BaiduChannelResponse -> String)
-> ([BaiduChannelResponse] -> ShowS)
-> Show BaiduChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BaiduChannelResponse] -> ShowS
$cshowList :: [BaiduChannelResponse] -> ShowS
show :: BaiduChannelResponse -> String
$cshow :: BaiduChannelResponse -> String
showsPrec :: Int -> BaiduChannelResponse -> ShowS
$cshowsPrec :: Int -> BaiduChannelResponse -> ShowS
Prelude.Show, (forall x. BaiduChannelResponse -> Rep BaiduChannelResponse x)
-> (forall x. Rep BaiduChannelResponse x -> BaiduChannelResponse)
-> Generic BaiduChannelResponse
forall x. Rep BaiduChannelResponse x -> BaiduChannelResponse
forall x. BaiduChannelResponse -> Rep BaiduChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BaiduChannelResponse x -> BaiduChannelResponse
$cfrom :: forall x. BaiduChannelResponse -> Rep BaiduChannelResponse x
Prelude.Generic)

-- |
-- Create a value of 'BaiduChannelResponse' 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', 'baiduChannelResponse_lastModifiedDate' - The date and time when the Baidu channel was last modified.
--
-- 'enabled', 'baiduChannelResponse_enabled' - Specifies whether the Baidu channel is enabled for the application.
--
-- 'isArchived', 'baiduChannelResponse_isArchived' - Specifies whether the Baidu channel is archived.
--
-- 'applicationId', 'baiduChannelResponse_applicationId' - The unique identifier for the application that the Baidu channel applies
-- to.
--
-- 'version', 'baiduChannelResponse_version' - The current version of the Baidu channel.
--
-- 'id', 'baiduChannelResponse_id' - (Deprecated) An identifier for the Baidu channel. This property is
-- retained only for backward compatibility.
--
-- 'creationDate', 'baiduChannelResponse_creationDate' - The date and time when the Baidu channel was enabled.
--
-- 'lastModifiedBy', 'baiduChannelResponse_lastModifiedBy' - The user who last modified the Baidu channel.
--
-- 'hasCredential', 'baiduChannelResponse_hasCredential' - (Not used) This property is retained only for backward compatibility.
--
-- 'credential', 'baiduChannelResponse_credential' - The API key that you received from the Baidu Cloud Push service to
-- communicate with the service.
--
-- 'platform', 'baiduChannelResponse_platform' - The type of messaging or notification platform for the channel. For the
-- Baidu channel, this value is BAIDU.
newBaiduChannelResponse ::
  -- | 'credential'
  Prelude.Text ->
  -- | 'platform'
  Prelude.Text ->
  BaiduChannelResponse
newBaiduChannelResponse :: Text -> Text -> BaiduChannelResponse
newBaiduChannelResponse Text
pCredential_ Text
pPlatform_ =
  BaiduChannelResponse' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> Text
-> BaiduChannelResponse
BaiduChannelResponse'
    { $sel:lastModifiedDate:BaiduChannelResponse' :: Maybe Text
lastModifiedDate =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:BaiduChannelResponse' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:isArchived:BaiduChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:BaiduChannelResponse' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:BaiduChannelResponse' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:id:BaiduChannelResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:BaiduChannelResponse' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:BaiduChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hasCredential:BaiduChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:credential:BaiduChannelResponse' :: Text
credential = Text
pCredential_,
      $sel:platform:BaiduChannelResponse' :: Text
platform = Text
pPlatform_
    }

-- | The date and time when the Baidu channel was last modified.
baiduChannelResponse_lastModifiedDate :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Text)
baiduChannelResponse_lastModifiedDate :: (Maybe Text -> f (Maybe Text))
-> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_lastModifiedDate = (BaiduChannelResponse -> Maybe Text)
-> (BaiduChannelResponse -> Maybe Text -> BaiduChannelResponse)
-> Lens
     BaiduChannelResponse BaiduChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Maybe Text
a -> BaiduChannelResponse
s {$sel:lastModifiedDate:BaiduChannelResponse' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: BaiduChannelResponse)

-- | Specifies whether the Baidu channel is enabled for the application.
baiduChannelResponse_enabled :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Bool)
baiduChannelResponse_enabled :: (Maybe Bool -> f (Maybe Bool))
-> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_enabled = (BaiduChannelResponse -> Maybe Bool)
-> (BaiduChannelResponse -> Maybe Bool -> BaiduChannelResponse)
-> Lens
     BaiduChannelResponse BaiduChannelResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Maybe Bool
a -> BaiduChannelResponse
s {$sel:enabled:BaiduChannelResponse' :: Maybe Bool
enabled = Maybe Bool
a} :: BaiduChannelResponse)

-- | Specifies whether the Baidu channel is archived.
baiduChannelResponse_isArchived :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Bool)
baiduChannelResponse_isArchived :: (Maybe Bool -> f (Maybe Bool))
-> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_isArchived = (BaiduChannelResponse -> Maybe Bool)
-> (BaiduChannelResponse -> Maybe Bool -> BaiduChannelResponse)
-> Lens
     BaiduChannelResponse BaiduChannelResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Maybe Bool
isArchived :: Maybe Bool
$sel:isArchived:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Bool
isArchived} -> Maybe Bool
isArchived) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Maybe Bool
a -> BaiduChannelResponse
s {$sel:isArchived:BaiduChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
a} :: BaiduChannelResponse)

-- | The unique identifier for the application that the Baidu channel applies
-- to.
baiduChannelResponse_applicationId :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Text)
baiduChannelResponse_applicationId :: (Maybe Text -> f (Maybe Text))
-> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_applicationId = (BaiduChannelResponse -> Maybe Text)
-> (BaiduChannelResponse -> Maybe Text -> BaiduChannelResponse)
-> Lens
     BaiduChannelResponse BaiduChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Maybe Text
a -> BaiduChannelResponse
s {$sel:applicationId:BaiduChannelResponse' :: Maybe Text
applicationId = Maybe Text
a} :: BaiduChannelResponse)

-- | The current version of the Baidu channel.
baiduChannelResponse_version :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Int)
baiduChannelResponse_version :: (Maybe Int -> f (Maybe Int))
-> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_version = (BaiduChannelResponse -> Maybe Int)
-> (BaiduChannelResponse -> Maybe Int -> BaiduChannelResponse)
-> Lens
     BaiduChannelResponse BaiduChannelResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Maybe Int
version :: Maybe Int
$sel:version:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Int
version} -> Maybe Int
version) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Maybe Int
a -> BaiduChannelResponse
s {$sel:version:BaiduChannelResponse' :: Maybe Int
version = Maybe Int
a} :: BaiduChannelResponse)

-- | (Deprecated) An identifier for the Baidu channel. This property is
-- retained only for backward compatibility.
baiduChannelResponse_id :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Text)
baiduChannelResponse_id :: (Maybe Text -> f (Maybe Text))
-> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_id = (BaiduChannelResponse -> Maybe Text)
-> (BaiduChannelResponse -> Maybe Text -> BaiduChannelResponse)
-> Lens
     BaiduChannelResponse BaiduChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Maybe Text
id :: Maybe Text
$sel:id:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Maybe Text
a -> BaiduChannelResponse
s {$sel:id:BaiduChannelResponse' :: Maybe Text
id = Maybe Text
a} :: BaiduChannelResponse)

-- | The date and time when the Baidu channel was enabled.
baiduChannelResponse_creationDate :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Text)
baiduChannelResponse_creationDate :: (Maybe Text -> f (Maybe Text))
-> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_creationDate = (BaiduChannelResponse -> Maybe Text)
-> (BaiduChannelResponse -> Maybe Text -> BaiduChannelResponse)
-> Lens
     BaiduChannelResponse BaiduChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Maybe Text
creationDate :: Maybe Text
$sel:creationDate:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
creationDate} -> Maybe Text
creationDate) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Maybe Text
a -> BaiduChannelResponse
s {$sel:creationDate:BaiduChannelResponse' :: Maybe Text
creationDate = Maybe Text
a} :: BaiduChannelResponse)

-- | The user who last modified the Baidu channel.
baiduChannelResponse_lastModifiedBy :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Text)
baiduChannelResponse_lastModifiedBy :: (Maybe Text -> f (Maybe Text))
-> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_lastModifiedBy = (BaiduChannelResponse -> Maybe Text)
-> (BaiduChannelResponse -> Maybe Text -> BaiduChannelResponse)
-> Lens
     BaiduChannelResponse BaiduChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Maybe Text
a -> BaiduChannelResponse
s {$sel:lastModifiedBy:BaiduChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: BaiduChannelResponse)

-- | (Not used) This property is retained only for backward compatibility.
baiduChannelResponse_hasCredential :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Bool)
baiduChannelResponse_hasCredential :: (Maybe Bool -> f (Maybe Bool))
-> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_hasCredential = (BaiduChannelResponse -> Maybe Bool)
-> (BaiduChannelResponse -> Maybe Bool -> BaiduChannelResponse)
-> Lens
     BaiduChannelResponse BaiduChannelResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Maybe Bool
hasCredential :: Maybe Bool
$sel:hasCredential:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Bool
hasCredential} -> Maybe Bool
hasCredential) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Maybe Bool
a -> BaiduChannelResponse
s {$sel:hasCredential:BaiduChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
a} :: BaiduChannelResponse)

-- | The API key that you received from the Baidu Cloud Push service to
-- communicate with the service.
baiduChannelResponse_credential :: Lens.Lens' BaiduChannelResponse Prelude.Text
baiduChannelResponse_credential :: (Text -> f Text) -> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_credential = (BaiduChannelResponse -> Text)
-> (BaiduChannelResponse -> Text -> BaiduChannelResponse)
-> Lens BaiduChannelResponse BaiduChannelResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Text
credential :: Text
$sel:credential:BaiduChannelResponse' :: BaiduChannelResponse -> Text
credential} -> Text
credential) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Text
a -> BaiduChannelResponse
s {$sel:credential:BaiduChannelResponse' :: Text
credential = Text
a} :: BaiduChannelResponse)

-- | The type of messaging or notification platform for the channel. For the
-- Baidu channel, this value is BAIDU.
baiduChannelResponse_platform :: Lens.Lens' BaiduChannelResponse Prelude.Text
baiduChannelResponse_platform :: (Text -> f Text) -> BaiduChannelResponse -> f BaiduChannelResponse
baiduChannelResponse_platform = (BaiduChannelResponse -> Text)
-> (BaiduChannelResponse -> Text -> BaiduChannelResponse)
-> Lens BaiduChannelResponse BaiduChannelResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduChannelResponse' {Text
platform :: Text
$sel:platform:BaiduChannelResponse' :: BaiduChannelResponse -> Text
platform} -> Text
platform) (\s :: BaiduChannelResponse
s@BaiduChannelResponse' {} Text
a -> BaiduChannelResponse
s {$sel:platform:BaiduChannelResponse' :: Text
platform = Text
a} :: BaiduChannelResponse)

instance Core.FromJSON BaiduChannelResponse where
  parseJSON :: Value -> Parser BaiduChannelResponse
parseJSON =
    String
-> (Object -> Parser BaiduChannelResponse)
-> Value
-> Parser BaiduChannelResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BaiduChannelResponse"
      ( \Object
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> Text
-> BaiduChannelResponse
BaiduChannelResponse'
            (Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Text
 -> Text
 -> BaiduChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> BaiduChannelResponse)
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
   -> BaiduChannelResponse)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> BaiduChannelResponse)
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
   -> BaiduChannelResponse)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> BaiduChannelResponse)
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
   -> BaiduChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> BaiduChannelResponse)
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
   -> BaiduChannelResponse)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> BaiduChannelResponse)
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
   -> BaiduChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Text
      -> Text
      -> BaiduChannelResponse)
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
   -> BaiduChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Bool -> Text -> Text -> BaiduChannelResponse)
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 -> BaiduChannelResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> Text -> Text -> BaiduChannelResponse)
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 -> BaiduChannelResponse)
-> Parser (Maybe Bool)
-> Parser (Text -> Text -> BaiduChannelResponse)
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 -> BaiduChannelResponse)
-> Parser Text -> Parser (Text -> BaiduChannelResponse)
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 -> BaiduChannelResponse)
-> Parser Text -> Parser BaiduChannelResponse
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 BaiduChannelResponse

instance Prelude.NFData BaiduChannelResponse