{-# 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.SNS.ListSMSSandboxPhoneNumbers
-- 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)
--
-- Lists the calling account\'s current verified and pending destination
-- phone numbers in the SMS sandbox.
--
-- When you start using Amazon SNS to send SMS messages, your account is in
-- the /SMS sandbox/. The SMS sandbox provides a safe environment for you
-- to try Amazon SNS features without risking your reputation as an SMS
-- sender. While your account is in the SMS sandbox, you can use all of the
-- features of Amazon SNS. However, you can send SMS messages only to
-- verified destination phone numbers. For more information, including how
-- to move out of the sandbox to send messages without restrictions, see
-- <https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html SMS sandbox>
-- in the /Amazon SNS Developer Guide/.
--
-- This operation returns paginated results.
module Amazonka.SNS.ListSMSSandboxPhoneNumbers
  ( -- * Creating a Request
    ListSMSSandboxPhoneNumbers (..),
    newListSMSSandboxPhoneNumbers,

    -- * Request Lenses
    listSMSSandboxPhoneNumbers_nextToken,
    listSMSSandboxPhoneNumbers_maxResults,

    -- * Destructuring the Response
    ListSMSSandboxPhoneNumbersResponse (..),
    newListSMSSandboxPhoneNumbersResponse,

    -- * Response Lenses
    listSMSSandboxPhoneNumbersResponse_nextToken,
    listSMSSandboxPhoneNumbersResponse_httpStatus,
    listSMSSandboxPhoneNumbersResponse_phoneNumbers,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SNS.Types

-- | /See:/ 'newListSMSSandboxPhoneNumbers' smart constructor.
data ListSMSSandboxPhoneNumbers = ListSMSSandboxPhoneNumbers'
  { -- | Token that the previous @ListSMSSandboxPhoneNumbersInput@ request
    -- returns.
    ListSMSSandboxPhoneNumbers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of phone numbers to return.
    ListSMSSandboxPhoneNumbers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListSMSSandboxPhoneNumbers -> ListSMSSandboxPhoneNumbers -> Bool
(ListSMSSandboxPhoneNumbers -> ListSMSSandboxPhoneNumbers -> Bool)
-> (ListSMSSandboxPhoneNumbers
    -> ListSMSSandboxPhoneNumbers -> Bool)
-> Eq ListSMSSandboxPhoneNumbers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSMSSandboxPhoneNumbers -> ListSMSSandboxPhoneNumbers -> Bool
$c/= :: ListSMSSandboxPhoneNumbers -> ListSMSSandboxPhoneNumbers -> Bool
== :: ListSMSSandboxPhoneNumbers -> ListSMSSandboxPhoneNumbers -> Bool
$c== :: ListSMSSandboxPhoneNumbers -> ListSMSSandboxPhoneNumbers -> Bool
Prelude.Eq, ReadPrec [ListSMSSandboxPhoneNumbers]
ReadPrec ListSMSSandboxPhoneNumbers
Int -> ReadS ListSMSSandboxPhoneNumbers
ReadS [ListSMSSandboxPhoneNumbers]
(Int -> ReadS ListSMSSandboxPhoneNumbers)
-> ReadS [ListSMSSandboxPhoneNumbers]
-> ReadPrec ListSMSSandboxPhoneNumbers
-> ReadPrec [ListSMSSandboxPhoneNumbers]
-> Read ListSMSSandboxPhoneNumbers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSMSSandboxPhoneNumbers]
$creadListPrec :: ReadPrec [ListSMSSandboxPhoneNumbers]
readPrec :: ReadPrec ListSMSSandboxPhoneNumbers
$creadPrec :: ReadPrec ListSMSSandboxPhoneNumbers
readList :: ReadS [ListSMSSandboxPhoneNumbers]
$creadList :: ReadS [ListSMSSandboxPhoneNumbers]
readsPrec :: Int -> ReadS ListSMSSandboxPhoneNumbers
$creadsPrec :: Int -> ReadS ListSMSSandboxPhoneNumbers
Prelude.Read, Int -> ListSMSSandboxPhoneNumbers -> ShowS
[ListSMSSandboxPhoneNumbers] -> ShowS
ListSMSSandboxPhoneNumbers -> String
(Int -> ListSMSSandboxPhoneNumbers -> ShowS)
-> (ListSMSSandboxPhoneNumbers -> String)
-> ([ListSMSSandboxPhoneNumbers] -> ShowS)
-> Show ListSMSSandboxPhoneNumbers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSMSSandboxPhoneNumbers] -> ShowS
$cshowList :: [ListSMSSandboxPhoneNumbers] -> ShowS
show :: ListSMSSandboxPhoneNumbers -> String
$cshow :: ListSMSSandboxPhoneNumbers -> String
showsPrec :: Int -> ListSMSSandboxPhoneNumbers -> ShowS
$cshowsPrec :: Int -> ListSMSSandboxPhoneNumbers -> ShowS
Prelude.Show, (forall x.
 ListSMSSandboxPhoneNumbers -> Rep ListSMSSandboxPhoneNumbers x)
-> (forall x.
    Rep ListSMSSandboxPhoneNumbers x -> ListSMSSandboxPhoneNumbers)
-> Generic ListSMSSandboxPhoneNumbers
forall x.
Rep ListSMSSandboxPhoneNumbers x -> ListSMSSandboxPhoneNumbers
forall x.
ListSMSSandboxPhoneNumbers -> Rep ListSMSSandboxPhoneNumbers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSMSSandboxPhoneNumbers x -> ListSMSSandboxPhoneNumbers
$cfrom :: forall x.
ListSMSSandboxPhoneNumbers -> Rep ListSMSSandboxPhoneNumbers x
Prelude.Generic)

-- |
-- Create a value of 'ListSMSSandboxPhoneNumbers' 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:
--
-- 'nextToken', 'listSMSSandboxPhoneNumbers_nextToken' - Token that the previous @ListSMSSandboxPhoneNumbersInput@ request
-- returns.
--
-- 'maxResults', 'listSMSSandboxPhoneNumbers_maxResults' - The maximum number of phone numbers to return.
newListSMSSandboxPhoneNumbers ::
  ListSMSSandboxPhoneNumbers
newListSMSSandboxPhoneNumbers :: ListSMSSandboxPhoneNumbers
newListSMSSandboxPhoneNumbers =
  ListSMSSandboxPhoneNumbers' :: Maybe Text -> Maybe Natural -> ListSMSSandboxPhoneNumbers
ListSMSSandboxPhoneNumbers'
    { $sel:nextToken:ListSMSSandboxPhoneNumbers' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListSMSSandboxPhoneNumbers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Token that the previous @ListSMSSandboxPhoneNumbersInput@ request
-- returns.
listSMSSandboxPhoneNumbers_nextToken :: Lens.Lens' ListSMSSandboxPhoneNumbers (Prelude.Maybe Prelude.Text)
listSMSSandboxPhoneNumbers_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSMSSandboxPhoneNumbers -> f ListSMSSandboxPhoneNumbers
listSMSSandboxPhoneNumbers_nextToken = (ListSMSSandboxPhoneNumbers -> Maybe Text)
-> (ListSMSSandboxPhoneNumbers
    -> Maybe Text -> ListSMSSandboxPhoneNumbers)
-> Lens
     ListSMSSandboxPhoneNumbers
     ListSMSSandboxPhoneNumbers
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSMSSandboxPhoneNumbers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSMSSandboxPhoneNumbers' :: ListSMSSandboxPhoneNumbers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSMSSandboxPhoneNumbers
s@ListSMSSandboxPhoneNumbers' {} Maybe Text
a -> ListSMSSandboxPhoneNumbers
s {$sel:nextToken:ListSMSSandboxPhoneNumbers' :: Maybe Text
nextToken = Maybe Text
a} :: ListSMSSandboxPhoneNumbers)

-- | The maximum number of phone numbers to return.
listSMSSandboxPhoneNumbers_maxResults :: Lens.Lens' ListSMSSandboxPhoneNumbers (Prelude.Maybe Prelude.Natural)
listSMSSandboxPhoneNumbers_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListSMSSandboxPhoneNumbers -> f ListSMSSandboxPhoneNumbers
listSMSSandboxPhoneNumbers_maxResults = (ListSMSSandboxPhoneNumbers -> Maybe Natural)
-> (ListSMSSandboxPhoneNumbers
    -> Maybe Natural -> ListSMSSandboxPhoneNumbers)
-> Lens
     ListSMSSandboxPhoneNumbers
     ListSMSSandboxPhoneNumbers
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSMSSandboxPhoneNumbers' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListSMSSandboxPhoneNumbers' :: ListSMSSandboxPhoneNumbers -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListSMSSandboxPhoneNumbers
s@ListSMSSandboxPhoneNumbers' {} Maybe Natural
a -> ListSMSSandboxPhoneNumbers
s {$sel:maxResults:ListSMSSandboxPhoneNumbers' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListSMSSandboxPhoneNumbers)

instance Core.AWSPager ListSMSSandboxPhoneNumbers where
  page :: ListSMSSandboxPhoneNumbers
-> AWSResponse ListSMSSandboxPhoneNumbers
-> Maybe ListSMSSandboxPhoneNumbers
page ListSMSSandboxPhoneNumbers
rq AWSResponse ListSMSSandboxPhoneNumbers
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSMSSandboxPhoneNumbers
ListSMSSandboxPhoneNumbersResponse
rs
            ListSMSSandboxPhoneNumbersResponse
-> Getting (First Text) ListSMSSandboxPhoneNumbersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSMSSandboxPhoneNumbersResponse
-> Const (First Text) ListSMSSandboxPhoneNumbersResponse
Lens' ListSMSSandboxPhoneNumbersResponse (Maybe Text)
listSMSSandboxPhoneNumbersResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListSMSSandboxPhoneNumbersResponse
 -> Const (First Text) ListSMSSandboxPhoneNumbersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSMSSandboxPhoneNumbersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListSMSSandboxPhoneNumbers
forall a. Maybe a
Prelude.Nothing
    | [SMSSandboxPhoneNumber] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSMSSandboxPhoneNumbers
ListSMSSandboxPhoneNumbersResponse
rs
            ListSMSSandboxPhoneNumbersResponse
-> Getting
     [SMSSandboxPhoneNumber]
     ListSMSSandboxPhoneNumbersResponse
     [SMSSandboxPhoneNumber]
-> [SMSSandboxPhoneNumber]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
  [SMSSandboxPhoneNumber]
  ListSMSSandboxPhoneNumbersResponse
  [SMSSandboxPhoneNumber]
Lens' ListSMSSandboxPhoneNumbersResponse [SMSSandboxPhoneNumber]
listSMSSandboxPhoneNumbersResponse_phoneNumbers
        ) =
      Maybe ListSMSSandboxPhoneNumbers
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListSMSSandboxPhoneNumbers -> Maybe ListSMSSandboxPhoneNumbers
forall a. a -> Maybe a
Prelude.Just (ListSMSSandboxPhoneNumbers -> Maybe ListSMSSandboxPhoneNumbers)
-> ListSMSSandboxPhoneNumbers -> Maybe ListSMSSandboxPhoneNumbers
forall a b. (a -> b) -> a -> b
Prelude.$
        ListSMSSandboxPhoneNumbers
rq
          ListSMSSandboxPhoneNumbers
-> (ListSMSSandboxPhoneNumbers -> ListSMSSandboxPhoneNumbers)
-> ListSMSSandboxPhoneNumbers
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListSMSSandboxPhoneNumbers
-> Identity ListSMSSandboxPhoneNumbers
Lens
  ListSMSSandboxPhoneNumbers
  ListSMSSandboxPhoneNumbers
  (Maybe Text)
  (Maybe Text)
listSMSSandboxPhoneNumbers_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListSMSSandboxPhoneNumbers
 -> Identity ListSMSSandboxPhoneNumbers)
-> Maybe Text
-> ListSMSSandboxPhoneNumbers
-> ListSMSSandboxPhoneNumbers
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSMSSandboxPhoneNumbers
ListSMSSandboxPhoneNumbersResponse
rs
          ListSMSSandboxPhoneNumbersResponse
-> Getting (First Text) ListSMSSandboxPhoneNumbersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSMSSandboxPhoneNumbersResponse
-> Const (First Text) ListSMSSandboxPhoneNumbersResponse
Lens' ListSMSSandboxPhoneNumbersResponse (Maybe Text)
listSMSSandboxPhoneNumbersResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListSMSSandboxPhoneNumbersResponse
 -> Const (First Text) ListSMSSandboxPhoneNumbersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSMSSandboxPhoneNumbersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListSMSSandboxPhoneNumbers where
  type
    AWSResponse ListSMSSandboxPhoneNumbers =
      ListSMSSandboxPhoneNumbersResponse
  request :: ListSMSSandboxPhoneNumbers -> Request ListSMSSandboxPhoneNumbers
request = Service
-> ListSMSSandboxPhoneNumbers -> Request ListSMSSandboxPhoneNumbers
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ListSMSSandboxPhoneNumbers
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSMSSandboxPhoneNumbers)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ListSMSSandboxPhoneNumbers))
-> Logger
-> Service
-> Proxy ListSMSSandboxPhoneNumbers
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSMSSandboxPhoneNumbers)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ListSMSSandboxPhoneNumbersResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Int
-> [SMSSandboxPhoneNumber]
-> ListSMSSandboxPhoneNumbersResponse
ListSMSSandboxPhoneNumbersResponse'
            (Maybe Text
 -> Int
 -> [SMSSandboxPhoneNumber]
 -> ListSMSSandboxPhoneNumbersResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> [SMSSandboxPhoneNumber] -> ListSMSSandboxPhoneNumbersResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextToken")
            Either
  String
  (Int
   -> [SMSSandboxPhoneNumber] -> ListSMSSandboxPhoneNumbersResponse)
-> Either String Int
-> Either
     String
     ([SMSSandboxPhoneNumber] -> ListSMSSandboxPhoneNumbersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  ([SMSSandboxPhoneNumber] -> ListSMSSandboxPhoneNumbersResponse)
-> Either String [SMSSandboxPhoneNumber]
-> Either String ListSMSSandboxPhoneNumbersResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PhoneNumbers" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String [SMSSandboxPhoneNumber])
-> Either String [SMSSandboxPhoneNumber]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [SMSSandboxPhoneNumber]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member"
                        )
      )

instance Prelude.Hashable ListSMSSandboxPhoneNumbers

instance Prelude.NFData ListSMSSandboxPhoneNumbers

instance Core.ToHeaders ListSMSSandboxPhoneNumbers where
  toHeaders :: ListSMSSandboxPhoneNumbers -> ResponseHeaders
toHeaders = ResponseHeaders -> ListSMSSandboxPhoneNumbers -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery ListSMSSandboxPhoneNumbers where
  toQuery :: ListSMSSandboxPhoneNumbers -> QueryString
toQuery ListSMSSandboxPhoneNumbers' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListSMSSandboxPhoneNumbers' :: ListSMSSandboxPhoneNumbers -> Maybe Natural
$sel:nextToken:ListSMSSandboxPhoneNumbers' :: ListSMSSandboxPhoneNumbers -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ListSMSSandboxPhoneNumbers" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-03-31" :: Prelude.ByteString),
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"MaxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListSMSSandboxPhoneNumbersResponse' smart constructor.
data ListSMSSandboxPhoneNumbersResponse = ListSMSSandboxPhoneNumbersResponse'
  { -- | A @NextToken@ string is returned when you call the
    -- @ListSMSSandboxPhoneNumbersInput@ operation if additional pages of
    -- records are available.
    ListSMSSandboxPhoneNumbersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListSMSSandboxPhoneNumbersResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of the calling account\'s pending and verified phone numbers.
    ListSMSSandboxPhoneNumbersResponse -> [SMSSandboxPhoneNumber]
phoneNumbers :: [SMSSandboxPhoneNumber]
  }
  deriving (ListSMSSandboxPhoneNumbersResponse
-> ListSMSSandboxPhoneNumbersResponse -> Bool
(ListSMSSandboxPhoneNumbersResponse
 -> ListSMSSandboxPhoneNumbersResponse -> Bool)
-> (ListSMSSandboxPhoneNumbersResponse
    -> ListSMSSandboxPhoneNumbersResponse -> Bool)
-> Eq ListSMSSandboxPhoneNumbersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSMSSandboxPhoneNumbersResponse
-> ListSMSSandboxPhoneNumbersResponse -> Bool
$c/= :: ListSMSSandboxPhoneNumbersResponse
-> ListSMSSandboxPhoneNumbersResponse -> Bool
== :: ListSMSSandboxPhoneNumbersResponse
-> ListSMSSandboxPhoneNumbersResponse -> Bool
$c== :: ListSMSSandboxPhoneNumbersResponse
-> ListSMSSandboxPhoneNumbersResponse -> Bool
Prelude.Eq, ReadPrec [ListSMSSandboxPhoneNumbersResponse]
ReadPrec ListSMSSandboxPhoneNumbersResponse
Int -> ReadS ListSMSSandboxPhoneNumbersResponse
ReadS [ListSMSSandboxPhoneNumbersResponse]
(Int -> ReadS ListSMSSandboxPhoneNumbersResponse)
-> ReadS [ListSMSSandboxPhoneNumbersResponse]
-> ReadPrec ListSMSSandboxPhoneNumbersResponse
-> ReadPrec [ListSMSSandboxPhoneNumbersResponse]
-> Read ListSMSSandboxPhoneNumbersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSMSSandboxPhoneNumbersResponse]
$creadListPrec :: ReadPrec [ListSMSSandboxPhoneNumbersResponse]
readPrec :: ReadPrec ListSMSSandboxPhoneNumbersResponse
$creadPrec :: ReadPrec ListSMSSandboxPhoneNumbersResponse
readList :: ReadS [ListSMSSandboxPhoneNumbersResponse]
$creadList :: ReadS [ListSMSSandboxPhoneNumbersResponse]
readsPrec :: Int -> ReadS ListSMSSandboxPhoneNumbersResponse
$creadsPrec :: Int -> ReadS ListSMSSandboxPhoneNumbersResponse
Prelude.Read, Int -> ListSMSSandboxPhoneNumbersResponse -> ShowS
[ListSMSSandboxPhoneNumbersResponse] -> ShowS
ListSMSSandboxPhoneNumbersResponse -> String
(Int -> ListSMSSandboxPhoneNumbersResponse -> ShowS)
-> (ListSMSSandboxPhoneNumbersResponse -> String)
-> ([ListSMSSandboxPhoneNumbersResponse] -> ShowS)
-> Show ListSMSSandboxPhoneNumbersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSMSSandboxPhoneNumbersResponse] -> ShowS
$cshowList :: [ListSMSSandboxPhoneNumbersResponse] -> ShowS
show :: ListSMSSandboxPhoneNumbersResponse -> String
$cshow :: ListSMSSandboxPhoneNumbersResponse -> String
showsPrec :: Int -> ListSMSSandboxPhoneNumbersResponse -> ShowS
$cshowsPrec :: Int -> ListSMSSandboxPhoneNumbersResponse -> ShowS
Prelude.Show, (forall x.
 ListSMSSandboxPhoneNumbersResponse
 -> Rep ListSMSSandboxPhoneNumbersResponse x)
-> (forall x.
    Rep ListSMSSandboxPhoneNumbersResponse x
    -> ListSMSSandboxPhoneNumbersResponse)
-> Generic ListSMSSandboxPhoneNumbersResponse
forall x.
Rep ListSMSSandboxPhoneNumbersResponse x
-> ListSMSSandboxPhoneNumbersResponse
forall x.
ListSMSSandboxPhoneNumbersResponse
-> Rep ListSMSSandboxPhoneNumbersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSMSSandboxPhoneNumbersResponse x
-> ListSMSSandboxPhoneNumbersResponse
$cfrom :: forall x.
ListSMSSandboxPhoneNumbersResponse
-> Rep ListSMSSandboxPhoneNumbersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSMSSandboxPhoneNumbersResponse' 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:
--
-- 'nextToken', 'listSMSSandboxPhoneNumbersResponse_nextToken' - A @NextToken@ string is returned when you call the
-- @ListSMSSandboxPhoneNumbersInput@ operation if additional pages of
-- records are available.
--
-- 'httpStatus', 'listSMSSandboxPhoneNumbersResponse_httpStatus' - The response's http status code.
--
-- 'phoneNumbers', 'listSMSSandboxPhoneNumbersResponse_phoneNumbers' - A list of the calling account\'s pending and verified phone numbers.
newListSMSSandboxPhoneNumbersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSMSSandboxPhoneNumbersResponse
newListSMSSandboxPhoneNumbersResponse :: Int -> ListSMSSandboxPhoneNumbersResponse
newListSMSSandboxPhoneNumbersResponse Int
pHttpStatus_ =
  ListSMSSandboxPhoneNumbersResponse' :: Maybe Text
-> Int
-> [SMSSandboxPhoneNumber]
-> ListSMSSandboxPhoneNumbersResponse
ListSMSSandboxPhoneNumbersResponse'
    { $sel:nextToken:ListSMSSandboxPhoneNumbersResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSMSSandboxPhoneNumbersResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:phoneNumbers:ListSMSSandboxPhoneNumbersResponse' :: [SMSSandboxPhoneNumber]
phoneNumbers = [SMSSandboxPhoneNumber]
forall a. Monoid a => a
Prelude.mempty
    }

-- | A @NextToken@ string is returned when you call the
-- @ListSMSSandboxPhoneNumbersInput@ operation if additional pages of
-- records are available.
listSMSSandboxPhoneNumbersResponse_nextToken :: Lens.Lens' ListSMSSandboxPhoneNumbersResponse (Prelude.Maybe Prelude.Text)
listSMSSandboxPhoneNumbersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSMSSandboxPhoneNumbersResponse
-> f ListSMSSandboxPhoneNumbersResponse
listSMSSandboxPhoneNumbersResponse_nextToken = (ListSMSSandboxPhoneNumbersResponse -> Maybe Text)
-> (ListSMSSandboxPhoneNumbersResponse
    -> Maybe Text -> ListSMSSandboxPhoneNumbersResponse)
-> Lens' ListSMSSandboxPhoneNumbersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSMSSandboxPhoneNumbersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSMSSandboxPhoneNumbersResponse' :: ListSMSSandboxPhoneNumbersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSMSSandboxPhoneNumbersResponse
s@ListSMSSandboxPhoneNumbersResponse' {} Maybe Text
a -> ListSMSSandboxPhoneNumbersResponse
s {$sel:nextToken:ListSMSSandboxPhoneNumbersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSMSSandboxPhoneNumbersResponse)

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

-- | A list of the calling account\'s pending and verified phone numbers.
listSMSSandboxPhoneNumbersResponse_phoneNumbers :: Lens.Lens' ListSMSSandboxPhoneNumbersResponse [SMSSandboxPhoneNumber]
listSMSSandboxPhoneNumbersResponse_phoneNumbers :: ([SMSSandboxPhoneNumber] -> f [SMSSandboxPhoneNumber])
-> ListSMSSandboxPhoneNumbersResponse
-> f ListSMSSandboxPhoneNumbersResponse
listSMSSandboxPhoneNumbersResponse_phoneNumbers = (ListSMSSandboxPhoneNumbersResponse -> [SMSSandboxPhoneNumber])
-> (ListSMSSandboxPhoneNumbersResponse
    -> [SMSSandboxPhoneNumber] -> ListSMSSandboxPhoneNumbersResponse)
-> Lens' ListSMSSandboxPhoneNumbersResponse [SMSSandboxPhoneNumber]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSMSSandboxPhoneNumbersResponse' {[SMSSandboxPhoneNumber]
phoneNumbers :: [SMSSandboxPhoneNumber]
$sel:phoneNumbers:ListSMSSandboxPhoneNumbersResponse' :: ListSMSSandboxPhoneNumbersResponse -> [SMSSandboxPhoneNumber]
phoneNumbers} -> [SMSSandboxPhoneNumber]
phoneNumbers) (\s :: ListSMSSandboxPhoneNumbersResponse
s@ListSMSSandboxPhoneNumbersResponse' {} [SMSSandboxPhoneNumber]
a -> ListSMSSandboxPhoneNumbersResponse
s {$sel:phoneNumbers:ListSMSSandboxPhoneNumbersResponse' :: [SMSSandboxPhoneNumber]
phoneNumbers = [SMSSandboxPhoneNumber]
a} :: ListSMSSandboxPhoneNumbersResponse) (([SMSSandboxPhoneNumber] -> f [SMSSandboxPhoneNumber])
 -> ListSMSSandboxPhoneNumbersResponse
 -> f ListSMSSandboxPhoneNumbersResponse)
-> (([SMSSandboxPhoneNumber] -> f [SMSSandboxPhoneNumber])
    -> [SMSSandboxPhoneNumber] -> f [SMSSandboxPhoneNumber])
-> ([SMSSandboxPhoneNumber] -> f [SMSSandboxPhoneNumber])
-> ListSMSSandboxPhoneNumbersResponse
-> f ListSMSSandboxPhoneNumbersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([SMSSandboxPhoneNumber] -> f [SMSSandboxPhoneNumber])
-> [SMSSandboxPhoneNumber] -> f [SMSSandboxPhoneNumber]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListSMSSandboxPhoneNumbersResponse