{-# 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.BaiduChannelResponse 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 BaiduChannelResponse = BaiduChannelResponse'
{
BaiduChannelResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
BaiduChannelResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
BaiduChannelResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
BaiduChannelResponse -> Maybe Bool
hasCredential :: Prelude.Maybe Prelude.Bool,
BaiduChannelResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
BaiduChannelResponse -> Maybe Bool
isArchived :: Prelude.Maybe Prelude.Bool,
BaiduChannelResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
BaiduChannelResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
BaiduChannelResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
BaiduChannelResponse -> Text
credential :: Prelude.Text,
BaiduChannelResponse -> Text
platform :: Prelude.Text
}
deriving (BaiduChannelResponse -> BaiduChannelResponse -> Bool
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]
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
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. 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)
newBaiduChannelResponse ::
Prelude.Text ->
Prelude.Text ->
BaiduChannelResponse
newBaiduChannelResponse :: Text -> Text -> BaiduChannelResponse
newBaiduChannelResponse Text
pCredential_ Text
pPlatform_ =
BaiduChannelResponse'
{ $sel:applicationId:BaiduChannelResponse' :: Maybe Text
applicationId =
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:BaiduChannelResponse' :: Maybe Text
creationDate = forall a. Maybe a
Prelude.Nothing,
$sel:enabled:BaiduChannelResponse' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing,
$sel:hasCredential:BaiduChannelResponse' :: Maybe Bool
hasCredential = forall a. Maybe a
Prelude.Nothing,
$sel:id:BaiduChannelResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:isArchived:BaiduChannelResponse' :: Maybe Bool
isArchived = forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedBy:BaiduChannelResponse' :: Maybe Text
lastModifiedBy = forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:BaiduChannelResponse' :: Maybe Text
lastModifiedDate = forall a. Maybe a
Prelude.Nothing,
$sel:version:BaiduChannelResponse' :: Maybe Int
version = forall a. Maybe a
Prelude.Nothing,
$sel:credential:BaiduChannelResponse' :: Text
credential = Text
pCredential_,
$sel:platform:BaiduChannelResponse' :: Text
platform = Text
pPlatform_
}
baiduChannelResponse_applicationId :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Text)
baiduChannelResponse_applicationId :: Lens' BaiduChannelResponse (Maybe Text)
baiduChannelResponse_applicationId = 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)
baiduChannelResponse_creationDate :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Text)
baiduChannelResponse_creationDate :: Lens' BaiduChannelResponse (Maybe Text)
baiduChannelResponse_creationDate = 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)
baiduChannelResponse_enabled :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Bool)
baiduChannelResponse_enabled :: Lens' BaiduChannelResponse (Maybe Bool)
baiduChannelResponse_enabled = 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)
baiduChannelResponse_hasCredential :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Bool)
baiduChannelResponse_hasCredential :: Lens' BaiduChannelResponse (Maybe Bool)
baiduChannelResponse_hasCredential = 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)
baiduChannelResponse_id :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Text)
baiduChannelResponse_id :: Lens' BaiduChannelResponse (Maybe Text)
baiduChannelResponse_id = 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)
baiduChannelResponse_isArchived :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Bool)
baiduChannelResponse_isArchived :: Lens' BaiduChannelResponse (Maybe Bool)
baiduChannelResponse_isArchived = 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)
baiduChannelResponse_lastModifiedBy :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Text)
baiduChannelResponse_lastModifiedBy :: Lens' BaiduChannelResponse (Maybe Text)
baiduChannelResponse_lastModifiedBy = 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)
baiduChannelResponse_lastModifiedDate :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Text)
baiduChannelResponse_lastModifiedDate :: Lens' BaiduChannelResponse (Maybe Text)
baiduChannelResponse_lastModifiedDate = 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)
baiduChannelResponse_version :: Lens.Lens' BaiduChannelResponse (Prelude.Maybe Prelude.Int)
baiduChannelResponse_version :: Lens' BaiduChannelResponse (Maybe Int)
baiduChannelResponse_version = 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)
baiduChannelResponse_credential :: Lens.Lens' BaiduChannelResponse Prelude.Text
baiduChannelResponse_credential :: Lens' BaiduChannelResponse Text
baiduChannelResponse_credential = 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)
baiduChannelResponse_platform :: Lens.Lens' BaiduChannelResponse Prelude.Text
baiduChannelResponse_platform :: Lens' BaiduChannelResponse Text
baiduChannelResponse_platform = 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 Data.FromJSON BaiduChannelResponse where
parseJSON :: Value -> Parser BaiduChannelResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BaiduChannelResponse"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Text
-> Text
-> BaiduChannelResponse
BaiduChannelResponse'
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 BaiduChannelResponse where
hashWithSalt :: Int -> BaiduChannelResponse -> Int
hashWithSalt Int
_salt BaiduChannelResponse' {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:BaiduChannelResponse' :: BaiduChannelResponse -> Text
$sel:credential:BaiduChannelResponse' :: BaiduChannelResponse -> Text
$sel:version:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Int
$sel:lastModifiedDate:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
$sel:lastModifiedBy:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
$sel:isArchived:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Bool
$sel:id:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
$sel:hasCredential:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Bool
$sel:enabled:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Bool
$sel:creationDate:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
$sel:applicationId:BaiduChannelResponse' :: BaiduChannelResponse -> 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 BaiduChannelResponse where
rnf :: BaiduChannelResponse -> ()
rnf BaiduChannelResponse' {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:BaiduChannelResponse' :: BaiduChannelResponse -> Text
$sel:credential:BaiduChannelResponse' :: BaiduChannelResponse -> Text
$sel:version:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Int
$sel:lastModifiedDate:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
$sel:lastModifiedBy:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
$sel:isArchived:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Bool
$sel:id:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
$sel:hasCredential:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Bool
$sel:enabled:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Bool
$sel:creationDate:BaiduChannelResponse' :: BaiduChannelResponse -> Maybe Text
$sel:applicationId:BaiduChannelResponse' :: BaiduChannelResponse -> 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