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

-- |
-- Create a value of 'APNSVoipChannelResponse' 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', 'aPNSVoipChannelResponse_lastModifiedDate' - The date and time when the APNs VoIP channel was last modified.
--
-- 'enabled', 'aPNSVoipChannelResponse_enabled' - Specifies whether the APNs VoIP channel is enabled for the application.
--
-- 'hasTokenKey', 'aPNSVoipChannelResponse_hasTokenKey' - Specifies whether the APNs VoIP 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', 'aPNSVoipChannelResponse_defaultAuthenticationMethod' - The default authentication method that Amazon Pinpoint uses to
-- authenticate with APNs for this channel, key or certificate.
--
-- 'isArchived', 'aPNSVoipChannelResponse_isArchived' - Specifies whether the APNs VoIP channel is archived.
--
-- 'applicationId', 'aPNSVoipChannelResponse_applicationId' - The unique identifier for the application that the APNs VoIP channel
-- applies to.
--
-- 'version', 'aPNSVoipChannelResponse_version' - The current version of the APNs VoIP channel.
--
-- 'id', 'aPNSVoipChannelResponse_id' - (Deprecated) An identifier for the APNs VoIP channel. This property is
-- retained only for backward compatibility.
--
-- 'creationDate', 'aPNSVoipChannelResponse_creationDate' - The date and time when the APNs VoIP channel was enabled.
--
-- 'lastModifiedBy', 'aPNSVoipChannelResponse_lastModifiedBy' - The user who last modified the APNs VoIP channel.
--
-- 'hasCredential', 'aPNSVoipChannelResponse_hasCredential' - (Not used) This property is retained only for backward compatibility.
--
-- 'platform', 'aPNSVoipChannelResponse_platform' - The type of messaging or notification platform for the channel. For the
-- APNs VoIP channel, this value is APNS_VOIP.
newAPNSVoipChannelResponse ::
  -- | 'platform'
  Prelude.Text ->
  APNSVoipChannelResponse
newAPNSVoipChannelResponse :: Text -> APNSVoipChannelResponse
newAPNSVoipChannelResponse Text
pPlatform_ =
  APNSVoipChannelResponse' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> APNSVoipChannelResponse
APNSVoipChannelResponse'
    { $sel:lastModifiedDate:APNSVoipChannelResponse' :: Maybe Text
lastModifiedDate =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:APNSVoipChannelResponse' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:hasTokenKey:APNSVoipChannelResponse' :: Maybe Bool
hasTokenKey = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultAuthenticationMethod:APNSVoipChannelResponse' :: Maybe Text
defaultAuthenticationMethod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isArchived:APNSVoipChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:APNSVoipChannelResponse' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:APNSVoipChannelResponse' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:id:APNSVoipChannelResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:APNSVoipChannelResponse' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:APNSVoipChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hasCredential:APNSVoipChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:APNSVoipChannelResponse' :: Text
platform = Text
pPlatform_
    }

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

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

-- | Specifies whether the APNs VoIP 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.
aPNSVoipChannelResponse_hasTokenKey :: Lens.Lens' APNSVoipChannelResponse (Prelude.Maybe Prelude.Bool)
aPNSVoipChannelResponse_hasTokenKey :: (Maybe Bool -> f (Maybe Bool))
-> APNSVoipChannelResponse -> f APNSVoipChannelResponse
aPNSVoipChannelResponse_hasTokenKey = (APNSVoipChannelResponse -> Maybe Bool)
-> (APNSVoipChannelResponse
    -> Maybe Bool -> APNSVoipChannelResponse)
-> Lens
     APNSVoipChannelResponse
     APNSVoipChannelResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipChannelResponse' {Maybe Bool
hasTokenKey :: Maybe Bool
$sel:hasTokenKey:APNSVoipChannelResponse' :: APNSVoipChannelResponse -> Maybe Bool
hasTokenKey} -> Maybe Bool
hasTokenKey) (\s :: APNSVoipChannelResponse
s@APNSVoipChannelResponse' {} Maybe Bool
a -> APNSVoipChannelResponse
s {$sel:hasTokenKey:APNSVoipChannelResponse' :: Maybe Bool
hasTokenKey = Maybe Bool
a} :: APNSVoipChannelResponse)

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

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

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

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

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

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

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

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

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

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

instance Prelude.NFData APNSVoipChannelResponse