{-# 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.SmsVoice.SendVoiceMessage
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Create a new voice message and send it to a recipient\'s phone number.
module Amazonka.SmsVoice.SendVoiceMessage
  ( -- * Creating a Request
    SendVoiceMessage (..),
    newSendVoiceMessage,

    -- * Request Lenses
    sendVoiceMessage_callerId,
    sendVoiceMessage_configurationSetName,
    sendVoiceMessage_content,
    sendVoiceMessage_destinationPhoneNumber,
    sendVoiceMessage_originationPhoneNumber,

    -- * Destructuring the Response
    SendVoiceMessageResponse (..),
    newSendVoiceMessageResponse,

    -- * Response Lenses
    sendVoiceMessageResponse_messageId,
    sendVoiceMessageResponse_httpStatus,
  )
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.SmsVoice.Types

-- | SendVoiceMessageRequest
--
-- /See:/ 'newSendVoiceMessage' smart constructor.
data SendVoiceMessage = SendVoiceMessage'
  { -- | The phone number that appears on recipients\' devices when they receive
    -- the message.
    SendVoiceMessage -> Maybe Text
callerId :: Prelude.Maybe Prelude.Text,
    -- | The name of the configuration set that you want to use to send the
    -- message.
    SendVoiceMessage -> Maybe Text
configurationSetName :: Prelude.Maybe Prelude.Text,
    SendVoiceMessage -> Maybe VoiceMessageContent
content :: Prelude.Maybe VoiceMessageContent,
    -- | The phone number that you want to send the voice message to.
    SendVoiceMessage -> Maybe Text
destinationPhoneNumber :: Prelude.Maybe Prelude.Text,
    -- | The phone number that Amazon Pinpoint should use to send the voice
    -- message. This isn\'t necessarily the phone number that appears on
    -- recipients\' devices when they receive the message, because you can
    -- specify a CallerId parameter in the request.
    SendVoiceMessage -> Maybe Text
originationPhoneNumber :: Prelude.Maybe Prelude.Text
  }
  deriving (SendVoiceMessage -> SendVoiceMessage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendVoiceMessage -> SendVoiceMessage -> Bool
$c/= :: SendVoiceMessage -> SendVoiceMessage -> Bool
== :: SendVoiceMessage -> SendVoiceMessage -> Bool
$c== :: SendVoiceMessage -> SendVoiceMessage -> Bool
Prelude.Eq, ReadPrec [SendVoiceMessage]
ReadPrec SendVoiceMessage
Int -> ReadS SendVoiceMessage
ReadS [SendVoiceMessage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendVoiceMessage]
$creadListPrec :: ReadPrec [SendVoiceMessage]
readPrec :: ReadPrec SendVoiceMessage
$creadPrec :: ReadPrec SendVoiceMessage
readList :: ReadS [SendVoiceMessage]
$creadList :: ReadS [SendVoiceMessage]
readsPrec :: Int -> ReadS SendVoiceMessage
$creadsPrec :: Int -> ReadS SendVoiceMessage
Prelude.Read, Int -> SendVoiceMessage -> ShowS
[SendVoiceMessage] -> ShowS
SendVoiceMessage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendVoiceMessage] -> ShowS
$cshowList :: [SendVoiceMessage] -> ShowS
show :: SendVoiceMessage -> String
$cshow :: SendVoiceMessage -> String
showsPrec :: Int -> SendVoiceMessage -> ShowS
$cshowsPrec :: Int -> SendVoiceMessage -> ShowS
Prelude.Show, forall x. Rep SendVoiceMessage x -> SendVoiceMessage
forall x. SendVoiceMessage -> Rep SendVoiceMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendVoiceMessage x -> SendVoiceMessage
$cfrom :: forall x. SendVoiceMessage -> Rep SendVoiceMessage x
Prelude.Generic)

-- |
-- Create a value of 'SendVoiceMessage' 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:
--
-- 'callerId', 'sendVoiceMessage_callerId' - The phone number that appears on recipients\' devices when they receive
-- the message.
--
-- 'configurationSetName', 'sendVoiceMessage_configurationSetName' - The name of the configuration set that you want to use to send the
-- message.
--
-- 'content', 'sendVoiceMessage_content' - Undocumented member.
--
-- 'destinationPhoneNumber', 'sendVoiceMessage_destinationPhoneNumber' - The phone number that you want to send the voice message to.
--
-- 'originationPhoneNumber', 'sendVoiceMessage_originationPhoneNumber' - The phone number that Amazon Pinpoint should use to send the voice
-- message. This isn\'t necessarily the phone number that appears on
-- recipients\' devices when they receive the message, because you can
-- specify a CallerId parameter in the request.
newSendVoiceMessage ::
  SendVoiceMessage
newSendVoiceMessage :: SendVoiceMessage
newSendVoiceMessage =
  SendVoiceMessage'
    { $sel:callerId:SendVoiceMessage' :: Maybe Text
callerId = forall a. Maybe a
Prelude.Nothing,
      $sel:configurationSetName:SendVoiceMessage' :: Maybe Text
configurationSetName = forall a. Maybe a
Prelude.Nothing,
      $sel:content:SendVoiceMessage' :: Maybe VoiceMessageContent
content = forall a. Maybe a
Prelude.Nothing,
      $sel:destinationPhoneNumber:SendVoiceMessage' :: Maybe Text
destinationPhoneNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:originationPhoneNumber:SendVoiceMessage' :: Maybe Text
originationPhoneNumber = forall a. Maybe a
Prelude.Nothing
    }

-- | The phone number that appears on recipients\' devices when they receive
-- the message.
sendVoiceMessage_callerId :: Lens.Lens' SendVoiceMessage (Prelude.Maybe Prelude.Text)
sendVoiceMessage_callerId :: Lens' SendVoiceMessage (Maybe Text)
sendVoiceMessage_callerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendVoiceMessage' {Maybe Text
callerId :: Maybe Text
$sel:callerId:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
callerId} -> Maybe Text
callerId) (\s :: SendVoiceMessage
s@SendVoiceMessage' {} Maybe Text
a -> SendVoiceMessage
s {$sel:callerId:SendVoiceMessage' :: Maybe Text
callerId = Maybe Text
a} :: SendVoiceMessage)

-- | The name of the configuration set that you want to use to send the
-- message.
sendVoiceMessage_configurationSetName :: Lens.Lens' SendVoiceMessage (Prelude.Maybe Prelude.Text)
sendVoiceMessage_configurationSetName :: Lens' SendVoiceMessage (Maybe Text)
sendVoiceMessage_configurationSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendVoiceMessage' {Maybe Text
configurationSetName :: Maybe Text
$sel:configurationSetName:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
configurationSetName} -> Maybe Text
configurationSetName) (\s :: SendVoiceMessage
s@SendVoiceMessage' {} Maybe Text
a -> SendVoiceMessage
s {$sel:configurationSetName:SendVoiceMessage' :: Maybe Text
configurationSetName = Maybe Text
a} :: SendVoiceMessage)

-- | Undocumented member.
sendVoiceMessage_content :: Lens.Lens' SendVoiceMessage (Prelude.Maybe VoiceMessageContent)
sendVoiceMessage_content :: Lens' SendVoiceMessage (Maybe VoiceMessageContent)
sendVoiceMessage_content = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendVoiceMessage' {Maybe VoiceMessageContent
content :: Maybe VoiceMessageContent
$sel:content:SendVoiceMessage' :: SendVoiceMessage -> Maybe VoiceMessageContent
content} -> Maybe VoiceMessageContent
content) (\s :: SendVoiceMessage
s@SendVoiceMessage' {} Maybe VoiceMessageContent
a -> SendVoiceMessage
s {$sel:content:SendVoiceMessage' :: Maybe VoiceMessageContent
content = Maybe VoiceMessageContent
a} :: SendVoiceMessage)

-- | The phone number that you want to send the voice message to.
sendVoiceMessage_destinationPhoneNumber :: Lens.Lens' SendVoiceMessage (Prelude.Maybe Prelude.Text)
sendVoiceMessage_destinationPhoneNumber :: Lens' SendVoiceMessage (Maybe Text)
sendVoiceMessage_destinationPhoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendVoiceMessage' {Maybe Text
destinationPhoneNumber :: Maybe Text
$sel:destinationPhoneNumber:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
destinationPhoneNumber} -> Maybe Text
destinationPhoneNumber) (\s :: SendVoiceMessage
s@SendVoiceMessage' {} Maybe Text
a -> SendVoiceMessage
s {$sel:destinationPhoneNumber:SendVoiceMessage' :: Maybe Text
destinationPhoneNumber = Maybe Text
a} :: SendVoiceMessage)

-- | The phone number that Amazon Pinpoint should use to send the voice
-- message. This isn\'t necessarily the phone number that appears on
-- recipients\' devices when they receive the message, because you can
-- specify a CallerId parameter in the request.
sendVoiceMessage_originationPhoneNumber :: Lens.Lens' SendVoiceMessage (Prelude.Maybe Prelude.Text)
sendVoiceMessage_originationPhoneNumber :: Lens' SendVoiceMessage (Maybe Text)
sendVoiceMessage_originationPhoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendVoiceMessage' {Maybe Text
originationPhoneNumber :: Maybe Text
$sel:originationPhoneNumber:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
originationPhoneNumber} -> Maybe Text
originationPhoneNumber) (\s :: SendVoiceMessage
s@SendVoiceMessage' {} Maybe Text
a -> SendVoiceMessage
s {$sel:originationPhoneNumber:SendVoiceMessage' :: Maybe Text
originationPhoneNumber = Maybe Text
a} :: SendVoiceMessage)

instance Core.AWSRequest SendVoiceMessage where
  type
    AWSResponse SendVoiceMessage =
      SendVoiceMessageResponse
  request :: (Service -> Service)
-> SendVoiceMessage -> Request SendVoiceMessage
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 SendVoiceMessage
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SendVoiceMessage)))
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 Text -> Int -> SendVoiceMessageResponse
SendVoiceMessageResponse'
            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
"MessageId")
            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))
      )

instance Prelude.Hashable SendVoiceMessage where
  hashWithSalt :: Int -> SendVoiceMessage -> Int
hashWithSalt Int
_salt SendVoiceMessage' {Maybe Text
Maybe VoiceMessageContent
originationPhoneNumber :: Maybe Text
destinationPhoneNumber :: Maybe Text
content :: Maybe VoiceMessageContent
configurationSetName :: Maybe Text
callerId :: Maybe Text
$sel:originationPhoneNumber:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
$sel:destinationPhoneNumber:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
$sel:content:SendVoiceMessage' :: SendVoiceMessage -> Maybe VoiceMessageContent
$sel:configurationSetName:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
$sel:callerId:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
callerId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configurationSetName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VoiceMessageContent
content
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationPhoneNumber
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
originationPhoneNumber

instance Prelude.NFData SendVoiceMessage where
  rnf :: SendVoiceMessage -> ()
rnf SendVoiceMessage' {Maybe Text
Maybe VoiceMessageContent
originationPhoneNumber :: Maybe Text
destinationPhoneNumber :: Maybe Text
content :: Maybe VoiceMessageContent
configurationSetName :: Maybe Text
callerId :: Maybe Text
$sel:originationPhoneNumber:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
$sel:destinationPhoneNumber:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
$sel:content:SendVoiceMessage' :: SendVoiceMessage -> Maybe VoiceMessageContent
$sel:configurationSetName:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
$sel:callerId:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
callerId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationSetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VoiceMessageContent
content
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationPhoneNumber
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
originationPhoneNumber

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

instance Data.ToJSON SendVoiceMessage where
  toJSON :: SendVoiceMessage -> Value
toJSON SendVoiceMessage' {Maybe Text
Maybe VoiceMessageContent
originationPhoneNumber :: Maybe Text
destinationPhoneNumber :: Maybe Text
content :: Maybe VoiceMessageContent
configurationSetName :: Maybe Text
callerId :: Maybe Text
$sel:originationPhoneNumber:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
$sel:destinationPhoneNumber:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
$sel:content:SendVoiceMessage' :: SendVoiceMessage -> Maybe VoiceMessageContent
$sel:configurationSetName:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
$sel:callerId:SendVoiceMessage' :: SendVoiceMessage -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CallerId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
callerId,
            (Key
"ConfigurationSetName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
configurationSetName,
            (Key
"Content" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VoiceMessageContent
content,
            (Key
"DestinationPhoneNumber" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
destinationPhoneNumber,
            (Key
"OriginationPhoneNumber" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
originationPhoneNumber
          ]
      )

instance Data.ToPath SendVoiceMessage where
  toPath :: SendVoiceMessage -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/v1/sms-voice/voice/message"

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

-- | An object that that contains the Message ID of a Voice message that was
-- sent successfully.
--
-- /See:/ 'newSendVoiceMessageResponse' smart constructor.
data SendVoiceMessageResponse = SendVoiceMessageResponse'
  { -- | A unique identifier for the voice message.
    SendVoiceMessageResponse -> Maybe Text
messageId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    SendVoiceMessageResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (SendVoiceMessageResponse -> SendVoiceMessageResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendVoiceMessageResponse -> SendVoiceMessageResponse -> Bool
$c/= :: SendVoiceMessageResponse -> SendVoiceMessageResponse -> Bool
== :: SendVoiceMessageResponse -> SendVoiceMessageResponse -> Bool
$c== :: SendVoiceMessageResponse -> SendVoiceMessageResponse -> Bool
Prelude.Eq, ReadPrec [SendVoiceMessageResponse]
ReadPrec SendVoiceMessageResponse
Int -> ReadS SendVoiceMessageResponse
ReadS [SendVoiceMessageResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendVoiceMessageResponse]
$creadListPrec :: ReadPrec [SendVoiceMessageResponse]
readPrec :: ReadPrec SendVoiceMessageResponse
$creadPrec :: ReadPrec SendVoiceMessageResponse
readList :: ReadS [SendVoiceMessageResponse]
$creadList :: ReadS [SendVoiceMessageResponse]
readsPrec :: Int -> ReadS SendVoiceMessageResponse
$creadsPrec :: Int -> ReadS SendVoiceMessageResponse
Prelude.Read, Int -> SendVoiceMessageResponse -> ShowS
[SendVoiceMessageResponse] -> ShowS
SendVoiceMessageResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendVoiceMessageResponse] -> ShowS
$cshowList :: [SendVoiceMessageResponse] -> ShowS
show :: SendVoiceMessageResponse -> String
$cshow :: SendVoiceMessageResponse -> String
showsPrec :: Int -> SendVoiceMessageResponse -> ShowS
$cshowsPrec :: Int -> SendVoiceMessageResponse -> ShowS
Prelude.Show, forall x.
Rep SendVoiceMessageResponse x -> SendVoiceMessageResponse
forall x.
SendVoiceMessageResponse -> Rep SendVoiceMessageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SendVoiceMessageResponse x -> SendVoiceMessageResponse
$cfrom :: forall x.
SendVoiceMessageResponse -> Rep SendVoiceMessageResponse x
Prelude.Generic)

-- |
-- Create a value of 'SendVoiceMessageResponse' 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:
--
-- 'messageId', 'sendVoiceMessageResponse_messageId' - A unique identifier for the voice message.
--
-- 'httpStatus', 'sendVoiceMessageResponse_httpStatus' - The response's http status code.
newSendVoiceMessageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SendVoiceMessageResponse
newSendVoiceMessageResponse :: Int -> SendVoiceMessageResponse
newSendVoiceMessageResponse Int
pHttpStatus_ =
  SendVoiceMessageResponse'
    { $sel:messageId:SendVoiceMessageResponse' :: Maybe Text
messageId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:SendVoiceMessageResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A unique identifier for the voice message.
sendVoiceMessageResponse_messageId :: Lens.Lens' SendVoiceMessageResponse (Prelude.Maybe Prelude.Text)
sendVoiceMessageResponse_messageId :: Lens' SendVoiceMessageResponse (Maybe Text)
sendVoiceMessageResponse_messageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendVoiceMessageResponse' {Maybe Text
messageId :: Maybe Text
$sel:messageId:SendVoiceMessageResponse' :: SendVoiceMessageResponse -> Maybe Text
messageId} -> Maybe Text
messageId) (\s :: SendVoiceMessageResponse
s@SendVoiceMessageResponse' {} Maybe Text
a -> SendVoiceMessageResponse
s {$sel:messageId:SendVoiceMessageResponse' :: Maybe Text
messageId = Maybe Text
a} :: SendVoiceMessageResponse)

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

instance Prelude.NFData SendVoiceMessageResponse where
  rnf :: SendVoiceMessageResponse -> ()
rnf SendVoiceMessageResponse' {Int
Maybe Text
httpStatus :: Int
messageId :: Maybe Text
$sel:httpStatus:SendVoiceMessageResponse' :: SendVoiceMessageResponse -> Int
$sel:messageId:SendVoiceMessageResponse' :: SendVoiceMessageResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
messageId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus