{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SSMContacts.DescribePage
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists details of the engagement to a contact channel.
module Amazonka.SSMContacts.DescribePage
  ( -- * Creating a Request
    DescribePage (..),
    newDescribePage,

    -- * Request Lenses
    describePage_pageId,

    -- * Destructuring the Response
    DescribePageResponse (..),
    newDescribePageResponse,

    -- * Response Lenses
    describePageResponse_deliveryTime,
    describePageResponse_incidentId,
    describePageResponse_publicContent,
    describePageResponse_publicSubject,
    describePageResponse_readTime,
    describePageResponse_sentTime,
    describePageResponse_httpStatus,
    describePageResponse_pageArn,
    describePageResponse_engagementArn,
    describePageResponse_contactArn,
    describePageResponse_sender,
    describePageResponse_subject,
    describePageResponse_content,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SSMContacts.Types

-- | /See:/ 'newDescribePage' smart constructor.
data DescribePage = DescribePage'
  { -- | The ID of the engagement to a contact channel.
    DescribePage -> Text
pageId :: Prelude.Text
  }
  deriving (DescribePage -> DescribePage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePage -> DescribePage -> Bool
$c/= :: DescribePage -> DescribePage -> Bool
== :: DescribePage -> DescribePage -> Bool
$c== :: DescribePage -> DescribePage -> Bool
Prelude.Eq, ReadPrec [DescribePage]
ReadPrec DescribePage
Int -> ReadS DescribePage
ReadS [DescribePage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePage]
$creadListPrec :: ReadPrec [DescribePage]
readPrec :: ReadPrec DescribePage
$creadPrec :: ReadPrec DescribePage
readList :: ReadS [DescribePage]
$creadList :: ReadS [DescribePage]
readsPrec :: Int -> ReadS DescribePage
$creadsPrec :: Int -> ReadS DescribePage
Prelude.Read, Int -> DescribePage -> ShowS
[DescribePage] -> ShowS
DescribePage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePage] -> ShowS
$cshowList :: [DescribePage] -> ShowS
show :: DescribePage -> String
$cshow :: DescribePage -> String
showsPrec :: Int -> DescribePage -> ShowS
$cshowsPrec :: Int -> DescribePage -> ShowS
Prelude.Show, forall x. Rep DescribePage x -> DescribePage
forall x. DescribePage -> Rep DescribePage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribePage x -> DescribePage
$cfrom :: forall x. DescribePage -> Rep DescribePage x
Prelude.Generic)

-- |
-- Create a value of 'DescribePage' 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:
--
-- 'pageId', 'describePage_pageId' - The ID of the engagement to a contact channel.
newDescribePage ::
  -- | 'pageId'
  Prelude.Text ->
  DescribePage
newDescribePage :: Text -> DescribePage
newDescribePage Text
pPageId_ =
  DescribePage' {$sel:pageId:DescribePage' :: Text
pageId = Text
pPageId_}

-- | The ID of the engagement to a contact channel.
describePage_pageId :: Lens.Lens' DescribePage Prelude.Text
describePage_pageId :: Lens' DescribePage Text
describePage_pageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePage' {Text
pageId :: Text
$sel:pageId:DescribePage' :: DescribePage -> Text
pageId} -> Text
pageId) (\s :: DescribePage
s@DescribePage' {} Text
a -> DescribePage
s {$sel:pageId:DescribePage' :: Text
pageId = Text
a} :: DescribePage)

instance Core.AWSRequest DescribePage where
  type AWSResponse DescribePage = DescribePageResponse
  request :: (Service -> Service) -> DescribePage -> Request DescribePage
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribePage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribePage)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Int
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> DescribePageResponse
DescribePageResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"DeliveryTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"IncidentId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PublicContent")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PublicSubject")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ReadTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SentTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"PageArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"EngagementArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"ContactArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"Sender")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"Subject")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"Content")
      )

instance Prelude.Hashable DescribePage where
  hashWithSalt :: Int -> DescribePage -> Int
hashWithSalt Int
_salt DescribePage' {Text
pageId :: Text
$sel:pageId:DescribePage' :: DescribePage -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
pageId

instance Prelude.NFData DescribePage where
  rnf :: DescribePage -> ()
rnf DescribePage' {Text
pageId :: Text
$sel:pageId:DescribePage' :: DescribePage -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
pageId

instance Data.ToHeaders DescribePage where
  toHeaders :: DescribePage -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"SSMContacts.DescribePage" :: Prelude.ByteString),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON DescribePage where
  toJSON :: DescribePage -> Value
toJSON DescribePage' {Text
pageId :: Text
$sel:pageId:DescribePage' :: DescribePage -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"PageId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
pageId)]
      )

instance Data.ToPath DescribePage where
  toPath :: DescribePage -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery DescribePage where
  toQuery :: DescribePage -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribePageResponse' smart constructor.
data DescribePageResponse = DescribePageResponse'
  { -- | The time that the contact channel received the engagement.
    DescribePageResponse -> Maybe POSIX
deliveryTime :: Prelude.Maybe Data.POSIX,
    -- | The ARN of the incident that engaged the contact channel.
    DescribePageResponse -> Maybe Text
incidentId :: Prelude.Maybe Prelude.Text,
    -- | The insecure content of the message that was sent to the contact. Use
    -- this field for engagements to @SMS@.
    DescribePageResponse -> Maybe Text
publicContent :: Prelude.Maybe Prelude.Text,
    -- | The insecure subject of the message that was sent to the contact. Use
    -- this field for engagements to @SMS@.
    DescribePageResponse -> Maybe Text
publicSubject :: Prelude.Maybe Prelude.Text,
    -- | The time that the contact channel acknowledged the engagement.
    DescribePageResponse -> Maybe POSIX
readTime :: Prelude.Maybe Data.POSIX,
    -- | The time the engagement was sent to the contact channel.
    DescribePageResponse -> Maybe POSIX
sentTime :: Prelude.Maybe Data.POSIX,
    -- | The response's http status code.
    DescribePageResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the engagement to a contact channel.
    DescribePageResponse -> Text
pageArn :: Prelude.Text,
    -- | The ARN of the engagement that engaged the contact channel.
    DescribePageResponse -> Text
engagementArn :: Prelude.Text,
    -- | The ARN of the contact that was engaged.
    DescribePageResponse -> Text
contactArn :: Prelude.Text,
    -- | The user that started the engagement.
    DescribePageResponse -> Text
sender :: Prelude.Text,
    -- | The secure subject of the message that was sent to the contact. Use this
    -- field for engagements to @VOICE@ and @EMAIL@.
    DescribePageResponse -> Text
subject :: Prelude.Text,
    -- | The secure content of the message that was sent to the contact. Use this
    -- field for engagements to @VOICE@ and @EMAIL@.
    DescribePageResponse -> Text
content :: Prelude.Text
  }
  deriving (DescribePageResponse -> DescribePageResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePageResponse -> DescribePageResponse -> Bool
$c/= :: DescribePageResponse -> DescribePageResponse -> Bool
== :: DescribePageResponse -> DescribePageResponse -> Bool
$c== :: DescribePageResponse -> DescribePageResponse -> Bool
Prelude.Eq, ReadPrec [DescribePageResponse]
ReadPrec DescribePageResponse
Int -> ReadS DescribePageResponse
ReadS [DescribePageResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePageResponse]
$creadListPrec :: ReadPrec [DescribePageResponse]
readPrec :: ReadPrec DescribePageResponse
$creadPrec :: ReadPrec DescribePageResponse
readList :: ReadS [DescribePageResponse]
$creadList :: ReadS [DescribePageResponse]
readsPrec :: Int -> ReadS DescribePageResponse
$creadsPrec :: Int -> ReadS DescribePageResponse
Prelude.Read, Int -> DescribePageResponse -> ShowS
[DescribePageResponse] -> ShowS
DescribePageResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePageResponse] -> ShowS
$cshowList :: [DescribePageResponse] -> ShowS
show :: DescribePageResponse -> String
$cshow :: DescribePageResponse -> String
showsPrec :: Int -> DescribePageResponse -> ShowS
$cshowsPrec :: Int -> DescribePageResponse -> ShowS
Prelude.Show, forall x. Rep DescribePageResponse x -> DescribePageResponse
forall x. DescribePageResponse -> Rep DescribePageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribePageResponse x -> DescribePageResponse
$cfrom :: forall x. DescribePageResponse -> Rep DescribePageResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribePageResponse' 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:
--
-- 'deliveryTime', 'describePageResponse_deliveryTime' - The time that the contact channel received the engagement.
--
-- 'incidentId', 'describePageResponse_incidentId' - The ARN of the incident that engaged the contact channel.
--
-- 'publicContent', 'describePageResponse_publicContent' - The insecure content of the message that was sent to the contact. Use
-- this field for engagements to @SMS@.
--
-- 'publicSubject', 'describePageResponse_publicSubject' - The insecure subject of the message that was sent to the contact. Use
-- this field for engagements to @SMS@.
--
-- 'readTime', 'describePageResponse_readTime' - The time that the contact channel acknowledged the engagement.
--
-- 'sentTime', 'describePageResponse_sentTime' - The time the engagement was sent to the contact channel.
--
-- 'httpStatus', 'describePageResponse_httpStatus' - The response's http status code.
--
-- 'pageArn', 'describePageResponse_pageArn' - The Amazon Resource Name (ARN) of the engagement to a contact channel.
--
-- 'engagementArn', 'describePageResponse_engagementArn' - The ARN of the engagement that engaged the contact channel.
--
-- 'contactArn', 'describePageResponse_contactArn' - The ARN of the contact that was engaged.
--
-- 'sender', 'describePageResponse_sender' - The user that started the engagement.
--
-- 'subject', 'describePageResponse_subject' - The secure subject of the message that was sent to the contact. Use this
-- field for engagements to @VOICE@ and @EMAIL@.
--
-- 'content', 'describePageResponse_content' - The secure content of the message that was sent to the contact. Use this
-- field for engagements to @VOICE@ and @EMAIL@.
newDescribePageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'pageArn'
  Prelude.Text ->
  -- | 'engagementArn'
  Prelude.Text ->
  -- | 'contactArn'
  Prelude.Text ->
  -- | 'sender'
  Prelude.Text ->
  -- | 'subject'
  Prelude.Text ->
  -- | 'content'
  Prelude.Text ->
  DescribePageResponse
newDescribePageResponse :: Int
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> DescribePageResponse
newDescribePageResponse
  Int
pHttpStatus_
  Text
pPageArn_
  Text
pEngagementArn_
  Text
pContactArn_
  Text
pSender_
  Text
pSubject_
  Text
pContent_ =
    DescribePageResponse'
      { $sel:deliveryTime:DescribePageResponse' :: Maybe POSIX
deliveryTime =
          forall a. Maybe a
Prelude.Nothing,
        $sel:incidentId:DescribePageResponse' :: Maybe Text
incidentId = forall a. Maybe a
Prelude.Nothing,
        $sel:publicContent:DescribePageResponse' :: Maybe Text
publicContent = forall a. Maybe a
Prelude.Nothing,
        $sel:publicSubject:DescribePageResponse' :: Maybe Text
publicSubject = forall a. Maybe a
Prelude.Nothing,
        $sel:readTime:DescribePageResponse' :: Maybe POSIX
readTime = forall a. Maybe a
Prelude.Nothing,
        $sel:sentTime:DescribePageResponse' :: Maybe POSIX
sentTime = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribePageResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:pageArn:DescribePageResponse' :: Text
pageArn = Text
pPageArn_,
        $sel:engagementArn:DescribePageResponse' :: Text
engagementArn = Text
pEngagementArn_,
        $sel:contactArn:DescribePageResponse' :: Text
contactArn = Text
pContactArn_,
        $sel:sender:DescribePageResponse' :: Text
sender = Text
pSender_,
        $sel:subject:DescribePageResponse' :: Text
subject = Text
pSubject_,
        $sel:content:DescribePageResponse' :: Text
content = Text
pContent_
      }

-- | The time that the contact channel received the engagement.
describePageResponse_deliveryTime :: Lens.Lens' DescribePageResponse (Prelude.Maybe Prelude.UTCTime)
describePageResponse_deliveryTime :: Lens' DescribePageResponse (Maybe UTCTime)
describePageResponse_deliveryTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Maybe POSIX
deliveryTime :: Maybe POSIX
$sel:deliveryTime:DescribePageResponse' :: DescribePageResponse -> Maybe POSIX
deliveryTime} -> Maybe POSIX
deliveryTime) (\s :: DescribePageResponse
s@DescribePageResponse' {} Maybe POSIX
a -> DescribePageResponse
s {$sel:deliveryTime:DescribePageResponse' :: Maybe POSIX
deliveryTime = Maybe POSIX
a} :: DescribePageResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The ARN of the incident that engaged the contact channel.
describePageResponse_incidentId :: Lens.Lens' DescribePageResponse (Prelude.Maybe Prelude.Text)
describePageResponse_incidentId :: Lens' DescribePageResponse (Maybe Text)
describePageResponse_incidentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Maybe Text
incidentId :: Maybe Text
$sel:incidentId:DescribePageResponse' :: DescribePageResponse -> Maybe Text
incidentId} -> Maybe Text
incidentId) (\s :: DescribePageResponse
s@DescribePageResponse' {} Maybe Text
a -> DescribePageResponse
s {$sel:incidentId:DescribePageResponse' :: Maybe Text
incidentId = Maybe Text
a} :: DescribePageResponse)

-- | The insecure content of the message that was sent to the contact. Use
-- this field for engagements to @SMS@.
describePageResponse_publicContent :: Lens.Lens' DescribePageResponse (Prelude.Maybe Prelude.Text)
describePageResponse_publicContent :: Lens' DescribePageResponse (Maybe Text)
describePageResponse_publicContent = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Maybe Text
publicContent :: Maybe Text
$sel:publicContent:DescribePageResponse' :: DescribePageResponse -> Maybe Text
publicContent} -> Maybe Text
publicContent) (\s :: DescribePageResponse
s@DescribePageResponse' {} Maybe Text
a -> DescribePageResponse
s {$sel:publicContent:DescribePageResponse' :: Maybe Text
publicContent = Maybe Text
a} :: DescribePageResponse)

-- | The insecure subject of the message that was sent to the contact. Use
-- this field for engagements to @SMS@.
describePageResponse_publicSubject :: Lens.Lens' DescribePageResponse (Prelude.Maybe Prelude.Text)
describePageResponse_publicSubject :: Lens' DescribePageResponse (Maybe Text)
describePageResponse_publicSubject = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Maybe Text
publicSubject :: Maybe Text
$sel:publicSubject:DescribePageResponse' :: DescribePageResponse -> Maybe Text
publicSubject} -> Maybe Text
publicSubject) (\s :: DescribePageResponse
s@DescribePageResponse' {} Maybe Text
a -> DescribePageResponse
s {$sel:publicSubject:DescribePageResponse' :: Maybe Text
publicSubject = Maybe Text
a} :: DescribePageResponse)

-- | The time that the contact channel acknowledged the engagement.
describePageResponse_readTime :: Lens.Lens' DescribePageResponse (Prelude.Maybe Prelude.UTCTime)
describePageResponse_readTime :: Lens' DescribePageResponse (Maybe UTCTime)
describePageResponse_readTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Maybe POSIX
readTime :: Maybe POSIX
$sel:readTime:DescribePageResponse' :: DescribePageResponse -> Maybe POSIX
readTime} -> Maybe POSIX
readTime) (\s :: DescribePageResponse
s@DescribePageResponse' {} Maybe POSIX
a -> DescribePageResponse
s {$sel:readTime:DescribePageResponse' :: Maybe POSIX
readTime = Maybe POSIX
a} :: DescribePageResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The time the engagement was sent to the contact channel.
describePageResponse_sentTime :: Lens.Lens' DescribePageResponse (Prelude.Maybe Prelude.UTCTime)
describePageResponse_sentTime :: Lens' DescribePageResponse (Maybe UTCTime)
describePageResponse_sentTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Maybe POSIX
sentTime :: Maybe POSIX
$sel:sentTime:DescribePageResponse' :: DescribePageResponse -> Maybe POSIX
sentTime} -> Maybe POSIX
sentTime) (\s :: DescribePageResponse
s@DescribePageResponse' {} Maybe POSIX
a -> DescribePageResponse
s {$sel:sentTime:DescribePageResponse' :: Maybe POSIX
sentTime = Maybe POSIX
a} :: DescribePageResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The response's http status code.
describePageResponse_httpStatus :: Lens.Lens' DescribePageResponse Prelude.Int
describePageResponse_httpStatus :: Lens' DescribePageResponse Int
describePageResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribePageResponse' :: DescribePageResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribePageResponse
s@DescribePageResponse' {} Int
a -> DescribePageResponse
s {$sel:httpStatus:DescribePageResponse' :: Int
httpStatus = Int
a} :: DescribePageResponse)

-- | The Amazon Resource Name (ARN) of the engagement to a contact channel.
describePageResponse_pageArn :: Lens.Lens' DescribePageResponse Prelude.Text
describePageResponse_pageArn :: Lens' DescribePageResponse Text
describePageResponse_pageArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Text
pageArn :: Text
$sel:pageArn:DescribePageResponse' :: DescribePageResponse -> Text
pageArn} -> Text
pageArn) (\s :: DescribePageResponse
s@DescribePageResponse' {} Text
a -> DescribePageResponse
s {$sel:pageArn:DescribePageResponse' :: Text
pageArn = Text
a} :: DescribePageResponse)

-- | The ARN of the engagement that engaged the contact channel.
describePageResponse_engagementArn :: Lens.Lens' DescribePageResponse Prelude.Text
describePageResponse_engagementArn :: Lens' DescribePageResponse Text
describePageResponse_engagementArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Text
engagementArn :: Text
$sel:engagementArn:DescribePageResponse' :: DescribePageResponse -> Text
engagementArn} -> Text
engagementArn) (\s :: DescribePageResponse
s@DescribePageResponse' {} Text
a -> DescribePageResponse
s {$sel:engagementArn:DescribePageResponse' :: Text
engagementArn = Text
a} :: DescribePageResponse)

-- | The ARN of the contact that was engaged.
describePageResponse_contactArn :: Lens.Lens' DescribePageResponse Prelude.Text
describePageResponse_contactArn :: Lens' DescribePageResponse Text
describePageResponse_contactArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Text
contactArn :: Text
$sel:contactArn:DescribePageResponse' :: DescribePageResponse -> Text
contactArn} -> Text
contactArn) (\s :: DescribePageResponse
s@DescribePageResponse' {} Text
a -> DescribePageResponse
s {$sel:contactArn:DescribePageResponse' :: Text
contactArn = Text
a} :: DescribePageResponse)

-- | The user that started the engagement.
describePageResponse_sender :: Lens.Lens' DescribePageResponse Prelude.Text
describePageResponse_sender :: Lens' DescribePageResponse Text
describePageResponse_sender = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Text
sender :: Text
$sel:sender:DescribePageResponse' :: DescribePageResponse -> Text
sender} -> Text
sender) (\s :: DescribePageResponse
s@DescribePageResponse' {} Text
a -> DescribePageResponse
s {$sel:sender:DescribePageResponse' :: Text
sender = Text
a} :: DescribePageResponse)

-- | The secure subject of the message that was sent to the contact. Use this
-- field for engagements to @VOICE@ and @EMAIL@.
describePageResponse_subject :: Lens.Lens' DescribePageResponse Prelude.Text
describePageResponse_subject :: Lens' DescribePageResponse Text
describePageResponse_subject = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Text
subject :: Text
$sel:subject:DescribePageResponse' :: DescribePageResponse -> Text
subject} -> Text
subject) (\s :: DescribePageResponse
s@DescribePageResponse' {} Text
a -> DescribePageResponse
s {$sel:subject:DescribePageResponse' :: Text
subject = Text
a} :: DescribePageResponse)

-- | The secure content of the message that was sent to the contact. Use this
-- field for engagements to @VOICE@ and @EMAIL@.
describePageResponse_content :: Lens.Lens' DescribePageResponse Prelude.Text
describePageResponse_content :: Lens' DescribePageResponse Text
describePageResponse_content = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePageResponse' {Text
content :: Text
$sel:content:DescribePageResponse' :: DescribePageResponse -> Text
content} -> Text
content) (\s :: DescribePageResponse
s@DescribePageResponse' {} Text
a -> DescribePageResponse
s {$sel:content:DescribePageResponse' :: Text
content = Text
a} :: DescribePageResponse)

instance Prelude.NFData DescribePageResponse where
  rnf :: DescribePageResponse -> ()
rnf DescribePageResponse' {Int
Maybe Text
Maybe POSIX
Text
content :: Text
subject :: Text
sender :: Text
contactArn :: Text
engagementArn :: Text
pageArn :: Text
httpStatus :: Int
sentTime :: Maybe POSIX
readTime :: Maybe POSIX
publicSubject :: Maybe Text
publicContent :: Maybe Text
incidentId :: Maybe Text
deliveryTime :: Maybe POSIX
$sel:content:DescribePageResponse' :: DescribePageResponse -> Text
$sel:subject:DescribePageResponse' :: DescribePageResponse -> Text
$sel:sender:DescribePageResponse' :: DescribePageResponse -> Text
$sel:contactArn:DescribePageResponse' :: DescribePageResponse -> Text
$sel:engagementArn:DescribePageResponse' :: DescribePageResponse -> Text
$sel:pageArn:DescribePageResponse' :: DescribePageResponse -> Text
$sel:httpStatus:DescribePageResponse' :: DescribePageResponse -> Int
$sel:sentTime:DescribePageResponse' :: DescribePageResponse -> Maybe POSIX
$sel:readTime:DescribePageResponse' :: DescribePageResponse -> Maybe POSIX
$sel:publicSubject:DescribePageResponse' :: DescribePageResponse -> Maybe Text
$sel:publicContent:DescribePageResponse' :: DescribePageResponse -> Maybe Text
$sel:incidentId:DescribePageResponse' :: DescribePageResponse -> Maybe Text
$sel:deliveryTime:DescribePageResponse' :: DescribePageResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
deliveryTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
incidentId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publicContent
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publicSubject
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
readTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
sentTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
pageArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
engagementArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
contactArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sender
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
subject
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
content