{-# 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.APNSSandboxChannelResponse
-- 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.APNSSandboxChannelResponse 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 APNs (Apple
-- Push Notification service) sandbox channel for an application.
--
-- /See:/ 'newAPNSSandboxChannelResponse' smart constructor.
data APNSSandboxChannelResponse = APNSSandboxChannelResponse'
  { -- | The date and time when the APNs sandbox channel was last modified.
    APNSSandboxChannelResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the APNs sandbox channel is enabled for the
    -- application.
    APNSSandboxChannelResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether the APNs sandbox channel is configured to communicate
    -- with APNs by using APNs tokens. To provide an authentication key for
    -- APNs tokens, set the TokenKey property of the channel.
    APNSSandboxChannelResponse -> Maybe Bool
hasTokenKey :: Prelude.Maybe Prelude.Bool,
    -- | The default authentication method that Amazon Pinpoint uses to
    -- authenticate with the APNs sandbox environment for this channel, key or
    -- certificate.
    APNSSandboxChannelResponse -> Maybe Text
defaultAuthenticationMethod :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the APNs sandbox channel is archived.
    APNSSandboxChannelResponse -> Maybe Bool
isArchived :: Prelude.Maybe Prelude.Bool,
    -- | The unique identifier for the application that the APNs sandbox channel
    -- applies to.
    APNSSandboxChannelResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
    -- | The current version of the APNs sandbox channel.
    APNSSandboxChannelResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
    -- | (Deprecated) An identifier for the APNs sandbox channel. This property
    -- is retained only for backward compatibility.
    APNSSandboxChannelResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the APNs sandbox channel was enabled.
    APNSSandboxChannelResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
    -- | The user who last modified the APNs sandbox channel.
    APNSSandboxChannelResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | (Not used) This property is retained only for backward compatibility.
    APNSSandboxChannelResponse -> Maybe Bool
hasCredential :: Prelude.Maybe Prelude.Bool,
    -- | The type of messaging or notification platform for the channel. For the
    -- APNs sandbox channel, this value is APNS_SANDBOX.
    APNSSandboxChannelResponse -> Text
platform :: Prelude.Text
  }
  deriving (APNSSandboxChannelResponse -> APNSSandboxChannelResponse -> Bool
(APNSSandboxChannelResponse -> APNSSandboxChannelResponse -> Bool)
-> (APNSSandboxChannelResponse
    -> APNSSandboxChannelResponse -> Bool)
-> Eq APNSSandboxChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: APNSSandboxChannelResponse -> APNSSandboxChannelResponse -> Bool
$c/= :: APNSSandboxChannelResponse -> APNSSandboxChannelResponse -> Bool
== :: APNSSandboxChannelResponse -> APNSSandboxChannelResponse -> Bool
$c== :: APNSSandboxChannelResponse -> APNSSandboxChannelResponse -> Bool
Prelude.Eq, ReadPrec [APNSSandboxChannelResponse]
ReadPrec APNSSandboxChannelResponse
Int -> ReadS APNSSandboxChannelResponse
ReadS [APNSSandboxChannelResponse]
(Int -> ReadS APNSSandboxChannelResponse)
-> ReadS [APNSSandboxChannelResponse]
-> ReadPrec APNSSandboxChannelResponse
-> ReadPrec [APNSSandboxChannelResponse]
-> Read APNSSandboxChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [APNSSandboxChannelResponse]
$creadListPrec :: ReadPrec [APNSSandboxChannelResponse]
readPrec :: ReadPrec APNSSandboxChannelResponse
$creadPrec :: ReadPrec APNSSandboxChannelResponse
readList :: ReadS [APNSSandboxChannelResponse]
$creadList :: ReadS [APNSSandboxChannelResponse]
readsPrec :: Int -> ReadS APNSSandboxChannelResponse
$creadsPrec :: Int -> ReadS APNSSandboxChannelResponse
Prelude.Read, Int -> APNSSandboxChannelResponse -> ShowS
[APNSSandboxChannelResponse] -> ShowS
APNSSandboxChannelResponse -> String
(Int -> APNSSandboxChannelResponse -> ShowS)
-> (APNSSandboxChannelResponse -> String)
-> ([APNSSandboxChannelResponse] -> ShowS)
-> Show APNSSandboxChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [APNSSandboxChannelResponse] -> ShowS
$cshowList :: [APNSSandboxChannelResponse] -> ShowS
show :: APNSSandboxChannelResponse -> String
$cshow :: APNSSandboxChannelResponse -> String
showsPrec :: Int -> APNSSandboxChannelResponse -> ShowS
$cshowsPrec :: Int -> APNSSandboxChannelResponse -> ShowS
Prelude.Show, (forall x.
 APNSSandboxChannelResponse -> Rep APNSSandboxChannelResponse x)
-> (forall x.
    Rep APNSSandboxChannelResponse x -> APNSSandboxChannelResponse)
-> Generic APNSSandboxChannelResponse
forall x.
Rep APNSSandboxChannelResponse x -> APNSSandboxChannelResponse
forall x.
APNSSandboxChannelResponse -> Rep APNSSandboxChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep APNSSandboxChannelResponse x -> APNSSandboxChannelResponse
$cfrom :: forall x.
APNSSandboxChannelResponse -> Rep APNSSandboxChannelResponse x
Prelude.Generic)

-- |
-- Create a value of 'APNSSandboxChannelResponse' 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', 'aPNSSandboxChannelResponse_lastModifiedDate' - The date and time when the APNs sandbox channel was last modified.
--
-- 'enabled', 'aPNSSandboxChannelResponse_enabled' - Specifies whether the APNs sandbox channel is enabled for the
-- application.
--
-- 'hasTokenKey', 'aPNSSandboxChannelResponse_hasTokenKey' - Specifies whether the APNs sandbox channel is configured to communicate
-- with APNs by using APNs tokens. To provide an authentication key for
-- APNs tokens, set the TokenKey property of the channel.
--
-- 'defaultAuthenticationMethod', 'aPNSSandboxChannelResponse_defaultAuthenticationMethod' - The default authentication method that Amazon Pinpoint uses to
-- authenticate with the APNs sandbox environment for this channel, key or
-- certificate.
--
-- 'isArchived', 'aPNSSandboxChannelResponse_isArchived' - Specifies whether the APNs sandbox channel is archived.
--
-- 'applicationId', 'aPNSSandboxChannelResponse_applicationId' - The unique identifier for the application that the APNs sandbox channel
-- applies to.
--
-- 'version', 'aPNSSandboxChannelResponse_version' - The current version of the APNs sandbox channel.
--
-- 'id', 'aPNSSandboxChannelResponse_id' - (Deprecated) An identifier for the APNs sandbox channel. This property
-- is retained only for backward compatibility.
--
-- 'creationDate', 'aPNSSandboxChannelResponse_creationDate' - The date and time when the APNs sandbox channel was enabled.
--
-- 'lastModifiedBy', 'aPNSSandboxChannelResponse_lastModifiedBy' - The user who last modified the APNs sandbox channel.
--
-- 'hasCredential', 'aPNSSandboxChannelResponse_hasCredential' - (Not used) This property is retained only for backward compatibility.
--
-- 'platform', 'aPNSSandboxChannelResponse_platform' - The type of messaging or notification platform for the channel. For the
-- APNs sandbox channel, this value is APNS_SANDBOX.
newAPNSSandboxChannelResponse ::
  -- | 'platform'
  Prelude.Text ->
  APNSSandboxChannelResponse
newAPNSSandboxChannelResponse :: Text -> APNSSandboxChannelResponse
newAPNSSandboxChannelResponse Text
pPlatform_ =
  APNSSandboxChannelResponse' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> APNSSandboxChannelResponse
APNSSandboxChannelResponse'
    { $sel:lastModifiedDate:APNSSandboxChannelResponse' :: Maybe Text
lastModifiedDate =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:APNSSandboxChannelResponse' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:hasTokenKey:APNSSandboxChannelResponse' :: Maybe Bool
hasTokenKey = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultAuthenticationMethod:APNSSandboxChannelResponse' :: Maybe Text
defaultAuthenticationMethod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isArchived:APNSSandboxChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:APNSSandboxChannelResponse' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:APNSSandboxChannelResponse' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:id:APNSSandboxChannelResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:APNSSandboxChannelResponse' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:APNSSandboxChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hasCredential:APNSSandboxChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:APNSSandboxChannelResponse' :: Text
platform = Text
pPlatform_
    }

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

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

-- | Specifies whether the APNs sandbox channel is configured to communicate
-- with APNs by using APNs tokens. To provide an authentication key for
-- APNs tokens, set the TokenKey property of the channel.
aPNSSandboxChannelResponse_hasTokenKey :: Lens.Lens' APNSSandboxChannelResponse (Prelude.Maybe Prelude.Bool)
aPNSSandboxChannelResponse_hasTokenKey :: (Maybe Bool -> f (Maybe Bool))
-> APNSSandboxChannelResponse -> f APNSSandboxChannelResponse
aPNSSandboxChannelResponse_hasTokenKey = (APNSSandboxChannelResponse -> Maybe Bool)
-> (APNSSandboxChannelResponse
    -> Maybe Bool -> APNSSandboxChannelResponse)
-> Lens
     APNSSandboxChannelResponse
     APNSSandboxChannelResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSSandboxChannelResponse' {Maybe Bool
hasTokenKey :: Maybe Bool
$sel:hasTokenKey:APNSSandboxChannelResponse' :: APNSSandboxChannelResponse -> Maybe Bool
hasTokenKey} -> Maybe Bool
hasTokenKey) (\s :: APNSSandboxChannelResponse
s@APNSSandboxChannelResponse' {} Maybe Bool
a -> APNSSandboxChannelResponse
s {$sel:hasTokenKey:APNSSandboxChannelResponse' :: Maybe Bool
hasTokenKey = Maybe Bool
a} :: APNSSandboxChannelResponse)

-- | The default authentication method that Amazon Pinpoint uses to
-- authenticate with the APNs sandbox environment for this channel, key or
-- certificate.
aPNSSandboxChannelResponse_defaultAuthenticationMethod :: Lens.Lens' APNSSandboxChannelResponse (Prelude.Maybe Prelude.Text)
aPNSSandboxChannelResponse_defaultAuthenticationMethod :: (Maybe Text -> f (Maybe Text))
-> APNSSandboxChannelResponse -> f APNSSandboxChannelResponse
aPNSSandboxChannelResponse_defaultAuthenticationMethod = (APNSSandboxChannelResponse -> Maybe Text)
-> (APNSSandboxChannelResponse
    -> Maybe Text -> APNSSandboxChannelResponse)
-> Lens
     APNSSandboxChannelResponse
     APNSSandboxChannelResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSSandboxChannelResponse' {Maybe Text
defaultAuthenticationMethod :: Maybe Text
$sel:defaultAuthenticationMethod:APNSSandboxChannelResponse' :: APNSSandboxChannelResponse -> Maybe Text
defaultAuthenticationMethod} -> Maybe Text
defaultAuthenticationMethod) (\s :: APNSSandboxChannelResponse
s@APNSSandboxChannelResponse' {} Maybe Text
a -> APNSSandboxChannelResponse
s {$sel:defaultAuthenticationMethod:APNSSandboxChannelResponse' :: Maybe Text
defaultAuthenticationMethod = Maybe Text
a} :: APNSSandboxChannelResponse)

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

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

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

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

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

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

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

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

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

instance Prelude.NFData APNSSandboxChannelResponse