{-# 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.SMSChannelResponse
-- 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.SMSChannelResponse 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 SMS channel
-- for an application.
--
-- /See:/ 'newSMSChannelResponse' smart constructor.
data SMSChannelResponse = SMSChannelResponse'
  { -- | The registered short code to use when you send messages through the SMS
    -- channel.
    SMSChannelResponse -> Maybe Text
shortCode :: Prelude.Maybe Prelude.Text,
    -- | The date and time, in ISO 8601 format, when the SMS channel was last
    -- modified.
    SMSChannelResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the SMS channel is enabled for the application.
    SMSChannelResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | The identity that displays on recipients\' devices when they receive
    -- messages from the SMS channel.
    SMSChannelResponse -> Maybe Text
senderId :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of transactional messages that you can send through
    -- the SMS channel each second.
    SMSChannelResponse -> Maybe Int
transactionalMessagesPerSecond :: Prelude.Maybe Prelude.Int,
    -- | The maximum number of promotional messages that you can send through the
    -- SMS channel each second.
    SMSChannelResponse -> Maybe Int
promotionalMessagesPerSecond :: Prelude.Maybe Prelude.Int,
    -- | Specifies whether the SMS channel is archived.
    SMSChannelResponse -> Maybe Bool
isArchived :: Prelude.Maybe Prelude.Bool,
    -- | The unique identifier for the application that the SMS channel applies
    -- to.
    SMSChannelResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
    -- | The current version of the SMS channel.
    SMSChannelResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
    -- | (Deprecated) An identifier for the SMS channel. This property is
    -- retained only for backward compatibility.
    SMSChannelResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The date and time, in ISO 8601 format, when the SMS channel was enabled.
    SMSChannelResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
    -- | The user who last modified the SMS channel.
    SMSChannelResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | (Not used) This property is retained only for backward compatibility.
    SMSChannelResponse -> Maybe Bool
hasCredential :: Prelude.Maybe Prelude.Bool,
    -- | The type of messaging or notification platform for the channel. For the
    -- SMS channel, this value is SMS.
    SMSChannelResponse -> Text
platform :: Prelude.Text
  }
  deriving (SMSChannelResponse -> SMSChannelResponse -> Bool
(SMSChannelResponse -> SMSChannelResponse -> Bool)
-> (SMSChannelResponse -> SMSChannelResponse -> Bool)
-> Eq SMSChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SMSChannelResponse -> SMSChannelResponse -> Bool
$c/= :: SMSChannelResponse -> SMSChannelResponse -> Bool
== :: SMSChannelResponse -> SMSChannelResponse -> Bool
$c== :: SMSChannelResponse -> SMSChannelResponse -> Bool
Prelude.Eq, ReadPrec [SMSChannelResponse]
ReadPrec SMSChannelResponse
Int -> ReadS SMSChannelResponse
ReadS [SMSChannelResponse]
(Int -> ReadS SMSChannelResponse)
-> ReadS [SMSChannelResponse]
-> ReadPrec SMSChannelResponse
-> ReadPrec [SMSChannelResponse]
-> Read SMSChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SMSChannelResponse]
$creadListPrec :: ReadPrec [SMSChannelResponse]
readPrec :: ReadPrec SMSChannelResponse
$creadPrec :: ReadPrec SMSChannelResponse
readList :: ReadS [SMSChannelResponse]
$creadList :: ReadS [SMSChannelResponse]
readsPrec :: Int -> ReadS SMSChannelResponse
$creadsPrec :: Int -> ReadS SMSChannelResponse
Prelude.Read, Int -> SMSChannelResponse -> ShowS
[SMSChannelResponse] -> ShowS
SMSChannelResponse -> String
(Int -> SMSChannelResponse -> ShowS)
-> (SMSChannelResponse -> String)
-> ([SMSChannelResponse] -> ShowS)
-> Show SMSChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SMSChannelResponse] -> ShowS
$cshowList :: [SMSChannelResponse] -> ShowS
show :: SMSChannelResponse -> String
$cshow :: SMSChannelResponse -> String
showsPrec :: Int -> SMSChannelResponse -> ShowS
$cshowsPrec :: Int -> SMSChannelResponse -> ShowS
Prelude.Show, (forall x. SMSChannelResponse -> Rep SMSChannelResponse x)
-> (forall x. Rep SMSChannelResponse x -> SMSChannelResponse)
-> Generic SMSChannelResponse
forall x. Rep SMSChannelResponse x -> SMSChannelResponse
forall x. SMSChannelResponse -> Rep SMSChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SMSChannelResponse x -> SMSChannelResponse
$cfrom :: forall x. SMSChannelResponse -> Rep SMSChannelResponse x
Prelude.Generic)

-- |
-- Create a value of 'SMSChannelResponse' 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:
--
-- 'shortCode', 'sMSChannelResponse_shortCode' - The registered short code to use when you send messages through the SMS
-- channel.
--
-- 'lastModifiedDate', 'sMSChannelResponse_lastModifiedDate' - The date and time, in ISO 8601 format, when the SMS channel was last
-- modified.
--
-- 'enabled', 'sMSChannelResponse_enabled' - Specifies whether the SMS channel is enabled for the application.
--
-- 'senderId', 'sMSChannelResponse_senderId' - The identity that displays on recipients\' devices when they receive
-- messages from the SMS channel.
--
-- 'transactionalMessagesPerSecond', 'sMSChannelResponse_transactionalMessagesPerSecond' - The maximum number of transactional messages that you can send through
-- the SMS channel each second.
--
-- 'promotionalMessagesPerSecond', 'sMSChannelResponse_promotionalMessagesPerSecond' - The maximum number of promotional messages that you can send through the
-- SMS channel each second.
--
-- 'isArchived', 'sMSChannelResponse_isArchived' - Specifies whether the SMS channel is archived.
--
-- 'applicationId', 'sMSChannelResponse_applicationId' - The unique identifier for the application that the SMS channel applies
-- to.
--
-- 'version', 'sMSChannelResponse_version' - The current version of the SMS channel.
--
-- 'id', 'sMSChannelResponse_id' - (Deprecated) An identifier for the SMS channel. This property is
-- retained only for backward compatibility.
--
-- 'creationDate', 'sMSChannelResponse_creationDate' - The date and time, in ISO 8601 format, when the SMS channel was enabled.
--
-- 'lastModifiedBy', 'sMSChannelResponse_lastModifiedBy' - The user who last modified the SMS channel.
--
-- 'hasCredential', 'sMSChannelResponse_hasCredential' - (Not used) This property is retained only for backward compatibility.
--
-- 'platform', 'sMSChannelResponse_platform' - The type of messaging or notification platform for the channel. For the
-- SMS channel, this value is SMS.
newSMSChannelResponse ::
  -- | 'platform'
  Prelude.Text ->
  SMSChannelResponse
newSMSChannelResponse :: Text -> SMSChannelResponse
newSMSChannelResponse Text
pPlatform_ =
  SMSChannelResponse' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> SMSChannelResponse
SMSChannelResponse'
    { $sel:shortCode:SMSChannelResponse' :: Maybe Text
shortCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:SMSChannelResponse' :: Maybe Text
lastModifiedDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:SMSChannelResponse' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:senderId:SMSChannelResponse' :: Maybe Text
senderId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:transactionalMessagesPerSecond:SMSChannelResponse' :: Maybe Int
transactionalMessagesPerSecond = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:promotionalMessagesPerSecond:SMSChannelResponse' :: Maybe Int
promotionalMessagesPerSecond = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:isArchived:SMSChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:SMSChannelResponse' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:SMSChannelResponse' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:id:SMSChannelResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:SMSChannelResponse' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:SMSChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hasCredential:SMSChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:SMSChannelResponse' :: Text
platform = Text
pPlatform_
    }

-- | The registered short code to use when you send messages through the SMS
-- channel.
sMSChannelResponse_shortCode :: Lens.Lens' SMSChannelResponse (Prelude.Maybe Prelude.Text)
sMSChannelResponse_shortCode :: (Maybe Text -> f (Maybe Text))
-> SMSChannelResponse -> f SMSChannelResponse
sMSChannelResponse_shortCode = (SMSChannelResponse -> Maybe Text)
-> (SMSChannelResponse -> Maybe Text -> SMSChannelResponse)
-> Lens
     SMSChannelResponse SMSChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSChannelResponse' {Maybe Text
shortCode :: Maybe Text
$sel:shortCode:SMSChannelResponse' :: SMSChannelResponse -> Maybe Text
shortCode} -> Maybe Text
shortCode) (\s :: SMSChannelResponse
s@SMSChannelResponse' {} Maybe Text
a -> SMSChannelResponse
s {$sel:shortCode:SMSChannelResponse' :: Maybe Text
shortCode = Maybe Text
a} :: SMSChannelResponse)

-- | The date and time, in ISO 8601 format, when the SMS channel was last
-- modified.
sMSChannelResponse_lastModifiedDate :: Lens.Lens' SMSChannelResponse (Prelude.Maybe Prelude.Text)
sMSChannelResponse_lastModifiedDate :: (Maybe Text -> f (Maybe Text))
-> SMSChannelResponse -> f SMSChannelResponse
sMSChannelResponse_lastModifiedDate = (SMSChannelResponse -> Maybe Text)
-> (SMSChannelResponse -> Maybe Text -> SMSChannelResponse)
-> Lens
     SMSChannelResponse SMSChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSChannelResponse' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:SMSChannelResponse' :: SMSChannelResponse -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: SMSChannelResponse
s@SMSChannelResponse' {} Maybe Text
a -> SMSChannelResponse
s {$sel:lastModifiedDate:SMSChannelResponse' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: SMSChannelResponse)

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

-- | The identity that displays on recipients\' devices when they receive
-- messages from the SMS channel.
sMSChannelResponse_senderId :: Lens.Lens' SMSChannelResponse (Prelude.Maybe Prelude.Text)
sMSChannelResponse_senderId :: (Maybe Text -> f (Maybe Text))
-> SMSChannelResponse -> f SMSChannelResponse
sMSChannelResponse_senderId = (SMSChannelResponse -> Maybe Text)
-> (SMSChannelResponse -> Maybe Text -> SMSChannelResponse)
-> Lens
     SMSChannelResponse SMSChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSChannelResponse' {Maybe Text
senderId :: Maybe Text
$sel:senderId:SMSChannelResponse' :: SMSChannelResponse -> Maybe Text
senderId} -> Maybe Text
senderId) (\s :: SMSChannelResponse
s@SMSChannelResponse' {} Maybe Text
a -> SMSChannelResponse
s {$sel:senderId:SMSChannelResponse' :: Maybe Text
senderId = Maybe Text
a} :: SMSChannelResponse)

-- | The maximum number of transactional messages that you can send through
-- the SMS channel each second.
sMSChannelResponse_transactionalMessagesPerSecond :: Lens.Lens' SMSChannelResponse (Prelude.Maybe Prelude.Int)
sMSChannelResponse_transactionalMessagesPerSecond :: (Maybe Int -> f (Maybe Int))
-> SMSChannelResponse -> f SMSChannelResponse
sMSChannelResponse_transactionalMessagesPerSecond = (SMSChannelResponse -> Maybe Int)
-> (SMSChannelResponse -> Maybe Int -> SMSChannelResponse)
-> Lens
     SMSChannelResponse SMSChannelResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSChannelResponse' {Maybe Int
transactionalMessagesPerSecond :: Maybe Int
$sel:transactionalMessagesPerSecond:SMSChannelResponse' :: SMSChannelResponse -> Maybe Int
transactionalMessagesPerSecond} -> Maybe Int
transactionalMessagesPerSecond) (\s :: SMSChannelResponse
s@SMSChannelResponse' {} Maybe Int
a -> SMSChannelResponse
s {$sel:transactionalMessagesPerSecond:SMSChannelResponse' :: Maybe Int
transactionalMessagesPerSecond = Maybe Int
a} :: SMSChannelResponse)

-- | The maximum number of promotional messages that you can send through the
-- SMS channel each second.
sMSChannelResponse_promotionalMessagesPerSecond :: Lens.Lens' SMSChannelResponse (Prelude.Maybe Prelude.Int)
sMSChannelResponse_promotionalMessagesPerSecond :: (Maybe Int -> f (Maybe Int))
-> SMSChannelResponse -> f SMSChannelResponse
sMSChannelResponse_promotionalMessagesPerSecond = (SMSChannelResponse -> Maybe Int)
-> (SMSChannelResponse -> Maybe Int -> SMSChannelResponse)
-> Lens
     SMSChannelResponse SMSChannelResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSChannelResponse' {Maybe Int
promotionalMessagesPerSecond :: Maybe Int
$sel:promotionalMessagesPerSecond:SMSChannelResponse' :: SMSChannelResponse -> Maybe Int
promotionalMessagesPerSecond} -> Maybe Int
promotionalMessagesPerSecond) (\s :: SMSChannelResponse
s@SMSChannelResponse' {} Maybe Int
a -> SMSChannelResponse
s {$sel:promotionalMessagesPerSecond:SMSChannelResponse' :: Maybe Int
promotionalMessagesPerSecond = Maybe Int
a} :: SMSChannelResponse)

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

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

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

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

-- | The date and time, in ISO 8601 format, when the SMS channel was enabled.
sMSChannelResponse_creationDate :: Lens.Lens' SMSChannelResponse (Prelude.Maybe Prelude.Text)
sMSChannelResponse_creationDate :: (Maybe Text -> f (Maybe Text))
-> SMSChannelResponse -> f SMSChannelResponse
sMSChannelResponse_creationDate = (SMSChannelResponse -> Maybe Text)
-> (SMSChannelResponse -> Maybe Text -> SMSChannelResponse)
-> Lens
     SMSChannelResponse SMSChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSChannelResponse' {Maybe Text
creationDate :: Maybe Text
$sel:creationDate:SMSChannelResponse' :: SMSChannelResponse -> Maybe Text
creationDate} -> Maybe Text
creationDate) (\s :: SMSChannelResponse
s@SMSChannelResponse' {} Maybe Text
a -> SMSChannelResponse
s {$sel:creationDate:SMSChannelResponse' :: Maybe Text
creationDate = Maybe Text
a} :: SMSChannelResponse)

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

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

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

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

instance Prelude.NFData SMSChannelResponse