{-# 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.EmailChannelResponse
-- 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.EmailChannelResponse 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 email channel
-- for an application.
--
-- /See:/ 'newEmailChannelResponse' smart constructor.
data EmailChannelResponse = EmailChannelResponse'
  { -- | The maximum number of emails that can be sent through the channel each
    -- second.
    EmailChannelResponse -> Maybe Int
messagesPerSecond :: Prelude.Maybe Prelude.Int,
    -- | The date and time, in ISO 8601 format, when the email channel was last
    -- modified.
    EmailChannelResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the email channel is enabled for the application.
    EmailChannelResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | The verified email address that email is sent from when you send email
    -- through the channel.
    EmailChannelResponse -> Maybe Text
fromAddress :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the email channel is archived.
    EmailChannelResponse -> Maybe Bool
isArchived :: Prelude.Maybe Prelude.Bool,
    -- | The unique identifier for the application that the email channel applies
    -- to.
    EmailChannelResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
    -- | The current version of the email channel.
    EmailChannelResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
    -- | The
    -- <https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html Amazon SES configuration set>
    -- that\'s applied to messages that are sent through the channel.
    EmailChannelResponse -> Maybe Text
configurationSet :: Prelude.Maybe Prelude.Text,
    -- | (Deprecated) An identifier for the email channel. This property is
    -- retained only for backward compatibility.
    EmailChannelResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The date and time, in ISO 8601 format, when the email channel was
    -- enabled.
    EmailChannelResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
    -- | The user who last modified the email channel.
    EmailChannelResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the identity, verified with Amazon
    -- Simple Email Service (Amazon SES), that\'s used when you send email
    -- through the channel.
    EmailChannelResponse -> Maybe Text
identity :: Prelude.Maybe Prelude.Text,
    -- | (Not used) This property is retained only for backward compatibility.
    EmailChannelResponse -> Maybe Bool
hasCredential :: Prelude.Maybe Prelude.Bool,
    -- | The ARN of the AWS Identity and Access Management (IAM) role that Amazon
    -- Pinpoint uses to submit email-related event data for the channel.
    EmailChannelResponse -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The type of messaging or notification platform for the channel. For the
    -- email channel, this value is EMAIL.
    EmailChannelResponse -> Text
platform :: Prelude.Text
  }
  deriving (EmailChannelResponse -> EmailChannelResponse -> Bool
(EmailChannelResponse -> EmailChannelResponse -> Bool)
-> (EmailChannelResponse -> EmailChannelResponse -> Bool)
-> Eq EmailChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EmailChannelResponse -> EmailChannelResponse -> Bool
$c/= :: EmailChannelResponse -> EmailChannelResponse -> Bool
== :: EmailChannelResponse -> EmailChannelResponse -> Bool
$c== :: EmailChannelResponse -> EmailChannelResponse -> Bool
Prelude.Eq, ReadPrec [EmailChannelResponse]
ReadPrec EmailChannelResponse
Int -> ReadS EmailChannelResponse
ReadS [EmailChannelResponse]
(Int -> ReadS EmailChannelResponse)
-> ReadS [EmailChannelResponse]
-> ReadPrec EmailChannelResponse
-> ReadPrec [EmailChannelResponse]
-> Read EmailChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EmailChannelResponse]
$creadListPrec :: ReadPrec [EmailChannelResponse]
readPrec :: ReadPrec EmailChannelResponse
$creadPrec :: ReadPrec EmailChannelResponse
readList :: ReadS [EmailChannelResponse]
$creadList :: ReadS [EmailChannelResponse]
readsPrec :: Int -> ReadS EmailChannelResponse
$creadsPrec :: Int -> ReadS EmailChannelResponse
Prelude.Read, Int -> EmailChannelResponse -> ShowS
[EmailChannelResponse] -> ShowS
EmailChannelResponse -> String
(Int -> EmailChannelResponse -> ShowS)
-> (EmailChannelResponse -> String)
-> ([EmailChannelResponse] -> ShowS)
-> Show EmailChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EmailChannelResponse] -> ShowS
$cshowList :: [EmailChannelResponse] -> ShowS
show :: EmailChannelResponse -> String
$cshow :: EmailChannelResponse -> String
showsPrec :: Int -> EmailChannelResponse -> ShowS
$cshowsPrec :: Int -> EmailChannelResponse -> ShowS
Prelude.Show, (forall x. EmailChannelResponse -> Rep EmailChannelResponse x)
-> (forall x. Rep EmailChannelResponse x -> EmailChannelResponse)
-> Generic EmailChannelResponse
forall x. Rep EmailChannelResponse x -> EmailChannelResponse
forall x. EmailChannelResponse -> Rep EmailChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EmailChannelResponse x -> EmailChannelResponse
$cfrom :: forall x. EmailChannelResponse -> Rep EmailChannelResponse x
Prelude.Generic)

-- |
-- Create a value of 'EmailChannelResponse' 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:
--
-- 'messagesPerSecond', 'emailChannelResponse_messagesPerSecond' - The maximum number of emails that can be sent through the channel each
-- second.
--
-- 'lastModifiedDate', 'emailChannelResponse_lastModifiedDate' - The date and time, in ISO 8601 format, when the email channel was last
-- modified.
--
-- 'enabled', 'emailChannelResponse_enabled' - Specifies whether the email channel is enabled for the application.
--
-- 'fromAddress', 'emailChannelResponse_fromAddress' - The verified email address that email is sent from when you send email
-- through the channel.
--
-- 'isArchived', 'emailChannelResponse_isArchived' - Specifies whether the email channel is archived.
--
-- 'applicationId', 'emailChannelResponse_applicationId' - The unique identifier for the application that the email channel applies
-- to.
--
-- 'version', 'emailChannelResponse_version' - The current version of the email channel.
--
-- 'configurationSet', 'emailChannelResponse_configurationSet' - The
-- <https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html Amazon SES configuration set>
-- that\'s applied to messages that are sent through the channel.
--
-- 'id', 'emailChannelResponse_id' - (Deprecated) An identifier for the email channel. This property is
-- retained only for backward compatibility.
--
-- 'creationDate', 'emailChannelResponse_creationDate' - The date and time, in ISO 8601 format, when the email channel was
-- enabled.
--
-- 'lastModifiedBy', 'emailChannelResponse_lastModifiedBy' - The user who last modified the email channel.
--
-- 'identity', 'emailChannelResponse_identity' - The Amazon Resource Name (ARN) of the identity, verified with Amazon
-- Simple Email Service (Amazon SES), that\'s used when you send email
-- through the channel.
--
-- 'hasCredential', 'emailChannelResponse_hasCredential' - (Not used) This property is retained only for backward compatibility.
--
-- 'roleArn', 'emailChannelResponse_roleArn' - The ARN of the AWS Identity and Access Management (IAM) role that Amazon
-- Pinpoint uses to submit email-related event data for the channel.
--
-- 'platform', 'emailChannelResponse_platform' - The type of messaging or notification platform for the channel. For the
-- email channel, this value is EMAIL.
newEmailChannelResponse ::
  -- | 'platform'
  Prelude.Text ->
  EmailChannelResponse
newEmailChannelResponse :: Text -> EmailChannelResponse
newEmailChannelResponse Text
pPlatform_ =
  EmailChannelResponse' :: Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Text
-> EmailChannelResponse
EmailChannelResponse'
    { $sel:messagesPerSecond:EmailChannelResponse' :: Maybe Int
messagesPerSecond =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:EmailChannelResponse' :: Maybe Text
lastModifiedDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:EmailChannelResponse' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:fromAddress:EmailChannelResponse' :: Maybe Text
fromAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isArchived:EmailChannelResponse' :: Maybe Bool
isArchived = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:EmailChannelResponse' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:EmailChannelResponse' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationSet:EmailChannelResponse' :: Maybe Text
configurationSet = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:EmailChannelResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:EmailChannelResponse' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:EmailChannelResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:identity:EmailChannelResponse' :: Maybe Text
identity = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hasCredential:EmailChannelResponse' :: Maybe Bool
hasCredential = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:EmailChannelResponse' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:EmailChannelResponse' :: Text
platform = Text
pPlatform_
    }

-- | The maximum number of emails that can be sent through the channel each
-- second.
emailChannelResponse_messagesPerSecond :: Lens.Lens' EmailChannelResponse (Prelude.Maybe Prelude.Int)
emailChannelResponse_messagesPerSecond :: (Maybe Int -> f (Maybe Int))
-> EmailChannelResponse -> f EmailChannelResponse
emailChannelResponse_messagesPerSecond = (EmailChannelResponse -> Maybe Int)
-> (EmailChannelResponse -> Maybe Int -> EmailChannelResponse)
-> Lens
     EmailChannelResponse EmailChannelResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EmailChannelResponse' {Maybe Int
messagesPerSecond :: Maybe Int
$sel:messagesPerSecond:EmailChannelResponse' :: EmailChannelResponse -> Maybe Int
messagesPerSecond} -> Maybe Int
messagesPerSecond) (\s :: EmailChannelResponse
s@EmailChannelResponse' {} Maybe Int
a -> EmailChannelResponse
s {$sel:messagesPerSecond:EmailChannelResponse' :: Maybe Int
messagesPerSecond = Maybe Int
a} :: EmailChannelResponse)

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

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

-- | The verified email address that email is sent from when you send email
-- through the channel.
emailChannelResponse_fromAddress :: Lens.Lens' EmailChannelResponse (Prelude.Maybe Prelude.Text)
emailChannelResponse_fromAddress :: (Maybe Text -> f (Maybe Text))
-> EmailChannelResponse -> f EmailChannelResponse
emailChannelResponse_fromAddress = (EmailChannelResponse -> Maybe Text)
-> (EmailChannelResponse -> Maybe Text -> EmailChannelResponse)
-> Lens
     EmailChannelResponse EmailChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EmailChannelResponse' {Maybe Text
fromAddress :: Maybe Text
$sel:fromAddress:EmailChannelResponse' :: EmailChannelResponse -> Maybe Text
fromAddress} -> Maybe Text
fromAddress) (\s :: EmailChannelResponse
s@EmailChannelResponse' {} Maybe Text
a -> EmailChannelResponse
s {$sel:fromAddress:EmailChannelResponse' :: Maybe Text
fromAddress = Maybe Text
a} :: EmailChannelResponse)

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

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

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

-- | The
-- <https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html Amazon SES configuration set>
-- that\'s applied to messages that are sent through the channel.
emailChannelResponse_configurationSet :: Lens.Lens' EmailChannelResponse (Prelude.Maybe Prelude.Text)
emailChannelResponse_configurationSet :: (Maybe Text -> f (Maybe Text))
-> EmailChannelResponse -> f EmailChannelResponse
emailChannelResponse_configurationSet = (EmailChannelResponse -> Maybe Text)
-> (EmailChannelResponse -> Maybe Text -> EmailChannelResponse)
-> Lens
     EmailChannelResponse EmailChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EmailChannelResponse' {Maybe Text
configurationSet :: Maybe Text
$sel:configurationSet:EmailChannelResponse' :: EmailChannelResponse -> Maybe Text
configurationSet} -> Maybe Text
configurationSet) (\s :: EmailChannelResponse
s@EmailChannelResponse' {} Maybe Text
a -> EmailChannelResponse
s {$sel:configurationSet:EmailChannelResponse' :: Maybe Text
configurationSet = Maybe Text
a} :: EmailChannelResponse)

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

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

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

-- | The Amazon Resource Name (ARN) of the identity, verified with Amazon
-- Simple Email Service (Amazon SES), that\'s used when you send email
-- through the channel.
emailChannelResponse_identity :: Lens.Lens' EmailChannelResponse (Prelude.Maybe Prelude.Text)
emailChannelResponse_identity :: (Maybe Text -> f (Maybe Text))
-> EmailChannelResponse -> f EmailChannelResponse
emailChannelResponse_identity = (EmailChannelResponse -> Maybe Text)
-> (EmailChannelResponse -> Maybe Text -> EmailChannelResponse)
-> Lens
     EmailChannelResponse EmailChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EmailChannelResponse' {Maybe Text
identity :: Maybe Text
$sel:identity:EmailChannelResponse' :: EmailChannelResponse -> Maybe Text
identity} -> Maybe Text
identity) (\s :: EmailChannelResponse
s@EmailChannelResponse' {} Maybe Text
a -> EmailChannelResponse
s {$sel:identity:EmailChannelResponse' :: Maybe Text
identity = Maybe Text
a} :: EmailChannelResponse)

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

-- | The ARN of the AWS Identity and Access Management (IAM) role that Amazon
-- Pinpoint uses to submit email-related event data for the channel.
emailChannelResponse_roleArn :: Lens.Lens' EmailChannelResponse (Prelude.Maybe Prelude.Text)
emailChannelResponse_roleArn :: (Maybe Text -> f (Maybe Text))
-> EmailChannelResponse -> f EmailChannelResponse
emailChannelResponse_roleArn = (EmailChannelResponse -> Maybe Text)
-> (EmailChannelResponse -> Maybe Text -> EmailChannelResponse)
-> Lens
     EmailChannelResponse EmailChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EmailChannelResponse' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:EmailChannelResponse' :: EmailChannelResponse -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: EmailChannelResponse
s@EmailChannelResponse' {} Maybe Text
a -> EmailChannelResponse
s {$sel:roleArn:EmailChannelResponse' :: Maybe Text
roleArn = Maybe Text
a} :: EmailChannelResponse)

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

instance Core.FromJSON EmailChannelResponse where
  parseJSON :: Value -> Parser EmailChannelResponse
parseJSON =
    String
-> (Object -> Parser EmailChannelResponse)
-> Value
-> Parser EmailChannelResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EmailChannelResponse"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Text
-> EmailChannelResponse
EmailChannelResponse'
            (Maybe Int
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Text
 -> EmailChannelResponse)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> EmailChannelResponse)
forall (f :: * -> *) a b. Functor 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
"MessagesPerSecond")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> EmailChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> EmailChannelResponse)
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 Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> EmailChannelResponse)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> EmailChannelResponse)
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 Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> EmailChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> EmailChannelResponse)
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
"FromAddress")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> EmailChannelResponse)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> EmailChannelResponse)
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 Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> EmailChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> EmailChannelResponse)
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 Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> EmailChannelResponse)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> EmailChannelResponse)
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 Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> EmailChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> EmailChannelResponse)
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
"ConfigurationSet")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> EmailChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> EmailChannelResponse)
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 Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> EmailChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> EmailChannelResponse)
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 Text
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> EmailChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool -> Maybe Text -> Text -> EmailChannelResponse)
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 Text
   -> Maybe Bool -> Maybe Text -> Text -> EmailChannelResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool -> Maybe Text -> Text -> EmailChannelResponse)
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
"Identity")
            Parser (Maybe Bool -> Maybe Text -> Text -> EmailChannelResponse)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Text -> EmailChannelResponse)
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 (Maybe Text -> Text -> EmailChannelResponse)
-> Parser (Maybe Text) -> Parser (Text -> EmailChannelResponse)
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
"RoleArn")
            Parser (Text -> EmailChannelResponse)
-> Parser Text -> Parser EmailChannelResponse
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 EmailChannelResponse

instance Prelude.NFData EmailChannelResponse