{-# 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.PinpointSmsVoiceV2.PutOptedOutNumber
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an opted out destination phone number in the opt-out list.
--
-- If the destination phone number isn\'t valid or if the specified opt-out
-- list doesn\'t exist, an Error is returned.
module Amazonka.PinpointSmsVoiceV2.PutOptedOutNumber
  ( -- * Creating a Request
    PutOptedOutNumber (..),
    newPutOptedOutNumber,

    -- * Request Lenses
    putOptedOutNumber_optOutListName,
    putOptedOutNumber_optedOutNumber,

    -- * Destructuring the Response
    PutOptedOutNumberResponse (..),
    newPutOptedOutNumberResponse,

    -- * Response Lenses
    putOptedOutNumberResponse_endUserOptedOut,
    putOptedOutNumberResponse_optOutListArn,
    putOptedOutNumberResponse_optOutListName,
    putOptedOutNumberResponse_optedOutNumber,
    putOptedOutNumberResponse_optedOutTimestamp,
    putOptedOutNumberResponse_httpStatus,
  )
where

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

-- | /See:/ 'newPutOptedOutNumber' smart constructor.
data PutOptedOutNumber = PutOptedOutNumber'
  { -- | The OptOutListName or OptOutListArn to add the phone number to.
    PutOptedOutNumber -> Text
optOutListName :: Prelude.Text,
    -- | The phone number to add to the OptOutList in E.164 format.
    PutOptedOutNumber -> Text
optedOutNumber :: Prelude.Text
  }
  deriving (PutOptedOutNumber -> PutOptedOutNumber -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutOptedOutNumber -> PutOptedOutNumber -> Bool
$c/= :: PutOptedOutNumber -> PutOptedOutNumber -> Bool
== :: PutOptedOutNumber -> PutOptedOutNumber -> Bool
$c== :: PutOptedOutNumber -> PutOptedOutNumber -> Bool
Prelude.Eq, ReadPrec [PutOptedOutNumber]
ReadPrec PutOptedOutNumber
Int -> ReadS PutOptedOutNumber
ReadS [PutOptedOutNumber]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutOptedOutNumber]
$creadListPrec :: ReadPrec [PutOptedOutNumber]
readPrec :: ReadPrec PutOptedOutNumber
$creadPrec :: ReadPrec PutOptedOutNumber
readList :: ReadS [PutOptedOutNumber]
$creadList :: ReadS [PutOptedOutNumber]
readsPrec :: Int -> ReadS PutOptedOutNumber
$creadsPrec :: Int -> ReadS PutOptedOutNumber
Prelude.Read, Int -> PutOptedOutNumber -> ShowS
[PutOptedOutNumber] -> ShowS
PutOptedOutNumber -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutOptedOutNumber] -> ShowS
$cshowList :: [PutOptedOutNumber] -> ShowS
show :: PutOptedOutNumber -> String
$cshow :: PutOptedOutNumber -> String
showsPrec :: Int -> PutOptedOutNumber -> ShowS
$cshowsPrec :: Int -> PutOptedOutNumber -> ShowS
Prelude.Show, forall x. Rep PutOptedOutNumber x -> PutOptedOutNumber
forall x. PutOptedOutNumber -> Rep PutOptedOutNumber x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutOptedOutNumber x -> PutOptedOutNumber
$cfrom :: forall x. PutOptedOutNumber -> Rep PutOptedOutNumber x
Prelude.Generic)

-- |
-- Create a value of 'PutOptedOutNumber' 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:
--
-- 'optOutListName', 'putOptedOutNumber_optOutListName' - The OptOutListName or OptOutListArn to add the phone number to.
--
-- 'optedOutNumber', 'putOptedOutNumber_optedOutNumber' - The phone number to add to the OptOutList in E.164 format.
newPutOptedOutNumber ::
  -- | 'optOutListName'
  Prelude.Text ->
  -- | 'optedOutNumber'
  Prelude.Text ->
  PutOptedOutNumber
newPutOptedOutNumber :: Text -> Text -> PutOptedOutNumber
newPutOptedOutNumber
  Text
pOptOutListName_
  Text
pOptedOutNumber_ =
    PutOptedOutNumber'
      { $sel:optOutListName:PutOptedOutNumber' :: Text
optOutListName =
          Text
pOptOutListName_,
        $sel:optedOutNumber:PutOptedOutNumber' :: Text
optedOutNumber = Text
pOptedOutNumber_
      }

-- | The OptOutListName or OptOutListArn to add the phone number to.
putOptedOutNumber_optOutListName :: Lens.Lens' PutOptedOutNumber Prelude.Text
putOptedOutNumber_optOutListName :: Lens' PutOptedOutNumber Text
putOptedOutNumber_optOutListName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutOptedOutNumber' {Text
optOutListName :: Text
$sel:optOutListName:PutOptedOutNumber' :: PutOptedOutNumber -> Text
optOutListName} -> Text
optOutListName) (\s :: PutOptedOutNumber
s@PutOptedOutNumber' {} Text
a -> PutOptedOutNumber
s {$sel:optOutListName:PutOptedOutNumber' :: Text
optOutListName = Text
a} :: PutOptedOutNumber)

-- | The phone number to add to the OptOutList in E.164 format.
putOptedOutNumber_optedOutNumber :: Lens.Lens' PutOptedOutNumber Prelude.Text
putOptedOutNumber_optedOutNumber :: Lens' PutOptedOutNumber Text
putOptedOutNumber_optedOutNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutOptedOutNumber' {Text
optedOutNumber :: Text
$sel:optedOutNumber:PutOptedOutNumber' :: PutOptedOutNumber -> Text
optedOutNumber} -> Text
optedOutNumber) (\s :: PutOptedOutNumber
s@PutOptedOutNumber' {} Text
a -> PutOptedOutNumber
s {$sel:optedOutNumber:PutOptedOutNumber' :: Text
optedOutNumber = Text
a} :: PutOptedOutNumber)

instance Core.AWSRequest PutOptedOutNumber where
  type
    AWSResponse PutOptedOutNumber =
      PutOptedOutNumberResponse
  request :: (Service -> Service)
-> PutOptedOutNumber -> Request PutOptedOutNumber
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 PutOptedOutNumber
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutOptedOutNumber)))
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 Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> PutOptedOutNumberResponse
PutOptedOutNumberResponse'
            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
"EndUserOptedOut")
            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
"OptOutListArn")
            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
"OptOutListName")
            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
"OptedOutNumber")
            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
"OptedOutTimestamp")
            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 PutOptedOutNumber where
  hashWithSalt :: Int -> PutOptedOutNumber -> Int
hashWithSalt Int
_salt PutOptedOutNumber' {Text
optedOutNumber :: Text
optOutListName :: Text
$sel:optedOutNumber:PutOptedOutNumber' :: PutOptedOutNumber -> Text
$sel:optOutListName:PutOptedOutNumber' :: PutOptedOutNumber -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
optOutListName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
optedOutNumber

instance Prelude.NFData PutOptedOutNumber where
  rnf :: PutOptedOutNumber -> ()
rnf PutOptedOutNumber' {Text
optedOutNumber :: Text
optOutListName :: Text
$sel:optedOutNumber:PutOptedOutNumber' :: PutOptedOutNumber -> Text
$sel:optOutListName:PutOptedOutNumber' :: PutOptedOutNumber -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
optOutListName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
optedOutNumber

instance Data.ToHeaders PutOptedOutNumber where
  toHeaders :: PutOptedOutNumber -> 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
"PinpointSMSVoiceV2.PutOptedOutNumber" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

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

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

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

-- | /See:/ 'newPutOptedOutNumberResponse' smart constructor.
data PutOptedOutNumberResponse = PutOptedOutNumberResponse'
  { -- | This is true if it was the end user who requested their phone number be
    -- removed.
    PutOptedOutNumberResponse -> Maybe Bool
endUserOptedOut :: Prelude.Maybe Prelude.Bool,
    -- | The OptOutListArn that the phone number was removed from.
    PutOptedOutNumberResponse -> Maybe Text
optOutListArn :: Prelude.Maybe Prelude.Text,
    -- | The OptOutListName that the phone number was removed from.
    PutOptedOutNumberResponse -> Maybe Text
optOutListName :: Prelude.Maybe Prelude.Text,
    -- | The phone number that was added to the OptOutList.
    PutOptedOutNumberResponse -> Maybe Text
optedOutNumber :: Prelude.Maybe Prelude.Text,
    -- | The time that the phone number was added to the OptOutList, in
    -- <https://www.epochconverter.com/ UNIX epoch time> format.
    PutOptedOutNumberResponse -> Maybe POSIX
optedOutTimestamp :: Prelude.Maybe Data.POSIX,
    -- | The response's http status code.
    PutOptedOutNumberResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutOptedOutNumberResponse -> PutOptedOutNumberResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutOptedOutNumberResponse -> PutOptedOutNumberResponse -> Bool
$c/= :: PutOptedOutNumberResponse -> PutOptedOutNumberResponse -> Bool
== :: PutOptedOutNumberResponse -> PutOptedOutNumberResponse -> Bool
$c== :: PutOptedOutNumberResponse -> PutOptedOutNumberResponse -> Bool
Prelude.Eq, ReadPrec [PutOptedOutNumberResponse]
ReadPrec PutOptedOutNumberResponse
Int -> ReadS PutOptedOutNumberResponse
ReadS [PutOptedOutNumberResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutOptedOutNumberResponse]
$creadListPrec :: ReadPrec [PutOptedOutNumberResponse]
readPrec :: ReadPrec PutOptedOutNumberResponse
$creadPrec :: ReadPrec PutOptedOutNumberResponse
readList :: ReadS [PutOptedOutNumberResponse]
$creadList :: ReadS [PutOptedOutNumberResponse]
readsPrec :: Int -> ReadS PutOptedOutNumberResponse
$creadsPrec :: Int -> ReadS PutOptedOutNumberResponse
Prelude.Read, Int -> PutOptedOutNumberResponse -> ShowS
[PutOptedOutNumberResponse] -> ShowS
PutOptedOutNumberResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutOptedOutNumberResponse] -> ShowS
$cshowList :: [PutOptedOutNumberResponse] -> ShowS
show :: PutOptedOutNumberResponse -> String
$cshow :: PutOptedOutNumberResponse -> String
showsPrec :: Int -> PutOptedOutNumberResponse -> ShowS
$cshowsPrec :: Int -> PutOptedOutNumberResponse -> ShowS
Prelude.Show, forall x.
Rep PutOptedOutNumberResponse x -> PutOptedOutNumberResponse
forall x.
PutOptedOutNumberResponse -> Rep PutOptedOutNumberResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutOptedOutNumberResponse x -> PutOptedOutNumberResponse
$cfrom :: forall x.
PutOptedOutNumberResponse -> Rep PutOptedOutNumberResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutOptedOutNumberResponse' 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:
--
-- 'endUserOptedOut', 'putOptedOutNumberResponse_endUserOptedOut' - This is true if it was the end user who requested their phone number be
-- removed.
--
-- 'optOutListArn', 'putOptedOutNumberResponse_optOutListArn' - The OptOutListArn that the phone number was removed from.
--
-- 'optOutListName', 'putOptedOutNumberResponse_optOutListName' - The OptOutListName that the phone number was removed from.
--
-- 'optedOutNumber', 'putOptedOutNumberResponse_optedOutNumber' - The phone number that was added to the OptOutList.
--
-- 'optedOutTimestamp', 'putOptedOutNumberResponse_optedOutTimestamp' - The time that the phone number was added to the OptOutList, in
-- <https://www.epochconverter.com/ UNIX epoch time> format.
--
-- 'httpStatus', 'putOptedOutNumberResponse_httpStatus' - The response's http status code.
newPutOptedOutNumberResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutOptedOutNumberResponse
newPutOptedOutNumberResponse :: Int -> PutOptedOutNumberResponse
newPutOptedOutNumberResponse Int
pHttpStatus_ =
  PutOptedOutNumberResponse'
    { $sel:endUserOptedOut:PutOptedOutNumberResponse' :: Maybe Bool
endUserOptedOut =
        forall a. Maybe a
Prelude.Nothing,
      $sel:optOutListArn:PutOptedOutNumberResponse' :: Maybe Text
optOutListArn = forall a. Maybe a
Prelude.Nothing,
      $sel:optOutListName:PutOptedOutNumberResponse' :: Maybe Text
optOutListName = forall a. Maybe a
Prelude.Nothing,
      $sel:optedOutNumber:PutOptedOutNumberResponse' :: Maybe Text
optedOutNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:optedOutTimestamp:PutOptedOutNumberResponse' :: Maybe POSIX
optedOutTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutOptedOutNumberResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | This is true if it was the end user who requested their phone number be
-- removed.
putOptedOutNumberResponse_endUserOptedOut :: Lens.Lens' PutOptedOutNumberResponse (Prelude.Maybe Prelude.Bool)
putOptedOutNumberResponse_endUserOptedOut :: Lens' PutOptedOutNumberResponse (Maybe Bool)
putOptedOutNumberResponse_endUserOptedOut = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutOptedOutNumberResponse' {Maybe Bool
endUserOptedOut :: Maybe Bool
$sel:endUserOptedOut:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Maybe Bool
endUserOptedOut} -> Maybe Bool
endUserOptedOut) (\s :: PutOptedOutNumberResponse
s@PutOptedOutNumberResponse' {} Maybe Bool
a -> PutOptedOutNumberResponse
s {$sel:endUserOptedOut:PutOptedOutNumberResponse' :: Maybe Bool
endUserOptedOut = Maybe Bool
a} :: PutOptedOutNumberResponse)

-- | The OptOutListArn that the phone number was removed from.
putOptedOutNumberResponse_optOutListArn :: Lens.Lens' PutOptedOutNumberResponse (Prelude.Maybe Prelude.Text)
putOptedOutNumberResponse_optOutListArn :: Lens' PutOptedOutNumberResponse (Maybe Text)
putOptedOutNumberResponse_optOutListArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutOptedOutNumberResponse' {Maybe Text
optOutListArn :: Maybe Text
$sel:optOutListArn:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Maybe Text
optOutListArn} -> Maybe Text
optOutListArn) (\s :: PutOptedOutNumberResponse
s@PutOptedOutNumberResponse' {} Maybe Text
a -> PutOptedOutNumberResponse
s {$sel:optOutListArn:PutOptedOutNumberResponse' :: Maybe Text
optOutListArn = Maybe Text
a} :: PutOptedOutNumberResponse)

-- | The OptOutListName that the phone number was removed from.
putOptedOutNumberResponse_optOutListName :: Lens.Lens' PutOptedOutNumberResponse (Prelude.Maybe Prelude.Text)
putOptedOutNumberResponse_optOutListName :: Lens' PutOptedOutNumberResponse (Maybe Text)
putOptedOutNumberResponse_optOutListName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutOptedOutNumberResponse' {Maybe Text
optOutListName :: Maybe Text
$sel:optOutListName:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Maybe Text
optOutListName} -> Maybe Text
optOutListName) (\s :: PutOptedOutNumberResponse
s@PutOptedOutNumberResponse' {} Maybe Text
a -> PutOptedOutNumberResponse
s {$sel:optOutListName:PutOptedOutNumberResponse' :: Maybe Text
optOutListName = Maybe Text
a} :: PutOptedOutNumberResponse)

-- | The phone number that was added to the OptOutList.
putOptedOutNumberResponse_optedOutNumber :: Lens.Lens' PutOptedOutNumberResponse (Prelude.Maybe Prelude.Text)
putOptedOutNumberResponse_optedOutNumber :: Lens' PutOptedOutNumberResponse (Maybe Text)
putOptedOutNumberResponse_optedOutNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutOptedOutNumberResponse' {Maybe Text
optedOutNumber :: Maybe Text
$sel:optedOutNumber:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Maybe Text
optedOutNumber} -> Maybe Text
optedOutNumber) (\s :: PutOptedOutNumberResponse
s@PutOptedOutNumberResponse' {} Maybe Text
a -> PutOptedOutNumberResponse
s {$sel:optedOutNumber:PutOptedOutNumberResponse' :: Maybe Text
optedOutNumber = Maybe Text
a} :: PutOptedOutNumberResponse)

-- | The time that the phone number was added to the OptOutList, in
-- <https://www.epochconverter.com/ UNIX epoch time> format.
putOptedOutNumberResponse_optedOutTimestamp :: Lens.Lens' PutOptedOutNumberResponse (Prelude.Maybe Prelude.UTCTime)
putOptedOutNumberResponse_optedOutTimestamp :: Lens' PutOptedOutNumberResponse (Maybe UTCTime)
putOptedOutNumberResponse_optedOutTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutOptedOutNumberResponse' {Maybe POSIX
optedOutTimestamp :: Maybe POSIX
$sel:optedOutTimestamp:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Maybe POSIX
optedOutTimestamp} -> Maybe POSIX
optedOutTimestamp) (\s :: PutOptedOutNumberResponse
s@PutOptedOutNumberResponse' {} Maybe POSIX
a -> PutOptedOutNumberResponse
s {$sel:optedOutTimestamp:PutOptedOutNumberResponse' :: Maybe POSIX
optedOutTimestamp = Maybe POSIX
a} :: PutOptedOutNumberResponse) 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.
putOptedOutNumberResponse_httpStatus :: Lens.Lens' PutOptedOutNumberResponse Prelude.Int
putOptedOutNumberResponse_httpStatus :: Lens' PutOptedOutNumberResponse Int
putOptedOutNumberResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutOptedOutNumberResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutOptedOutNumberResponse
s@PutOptedOutNumberResponse' {} Int
a -> PutOptedOutNumberResponse
s {$sel:httpStatus:PutOptedOutNumberResponse' :: Int
httpStatus = Int
a} :: PutOptedOutNumberResponse)

instance Prelude.NFData PutOptedOutNumberResponse where
  rnf :: PutOptedOutNumberResponse -> ()
rnf PutOptedOutNumberResponse' {Int
Maybe Bool
Maybe Text
Maybe POSIX
httpStatus :: Int
optedOutTimestamp :: Maybe POSIX
optedOutNumber :: Maybe Text
optOutListName :: Maybe Text
optOutListArn :: Maybe Text
endUserOptedOut :: Maybe Bool
$sel:httpStatus:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Int
$sel:optedOutTimestamp:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Maybe POSIX
$sel:optedOutNumber:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Maybe Text
$sel:optOutListName:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Maybe Text
$sel:optOutListArn:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Maybe Text
$sel:endUserOptedOut:PutOptedOutNumberResponse' :: PutOptedOutNumberResponse -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
endUserOptedOut
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
optOutListArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
optOutListName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
optedOutNumber
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
optedOutTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus