{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SNS.Types.SMSSandboxPhoneNumber where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SNS.Types.SMSSandboxPhoneNumberVerificationStatus
data SMSSandboxPhoneNumber = SMSSandboxPhoneNumber'
{
SMSSandboxPhoneNumber
-> Maybe SMSSandboxPhoneNumberVerificationStatus
status :: Prelude.Maybe SMSSandboxPhoneNumberVerificationStatus,
SMSSandboxPhoneNumber -> Maybe Text
phoneNumber :: Prelude.Maybe Prelude.Text
}
deriving (SMSSandboxPhoneNumber -> SMSSandboxPhoneNumber -> Bool
(SMSSandboxPhoneNumber -> SMSSandboxPhoneNumber -> Bool)
-> (SMSSandboxPhoneNumber -> SMSSandboxPhoneNumber -> Bool)
-> Eq SMSSandboxPhoneNumber
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SMSSandboxPhoneNumber -> SMSSandboxPhoneNumber -> Bool
$c/= :: SMSSandboxPhoneNumber -> SMSSandboxPhoneNumber -> Bool
== :: SMSSandboxPhoneNumber -> SMSSandboxPhoneNumber -> Bool
$c== :: SMSSandboxPhoneNumber -> SMSSandboxPhoneNumber -> Bool
Prelude.Eq, ReadPrec [SMSSandboxPhoneNumber]
ReadPrec SMSSandboxPhoneNumber
Int -> ReadS SMSSandboxPhoneNumber
ReadS [SMSSandboxPhoneNumber]
(Int -> ReadS SMSSandboxPhoneNumber)
-> ReadS [SMSSandboxPhoneNumber]
-> ReadPrec SMSSandboxPhoneNumber
-> ReadPrec [SMSSandboxPhoneNumber]
-> Read SMSSandboxPhoneNumber
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SMSSandboxPhoneNumber]
$creadListPrec :: ReadPrec [SMSSandboxPhoneNumber]
readPrec :: ReadPrec SMSSandboxPhoneNumber
$creadPrec :: ReadPrec SMSSandboxPhoneNumber
readList :: ReadS [SMSSandboxPhoneNumber]
$creadList :: ReadS [SMSSandboxPhoneNumber]
readsPrec :: Int -> ReadS SMSSandboxPhoneNumber
$creadsPrec :: Int -> ReadS SMSSandboxPhoneNumber
Prelude.Read, Int -> SMSSandboxPhoneNumber -> ShowS
[SMSSandboxPhoneNumber] -> ShowS
SMSSandboxPhoneNumber -> String
(Int -> SMSSandboxPhoneNumber -> ShowS)
-> (SMSSandboxPhoneNumber -> String)
-> ([SMSSandboxPhoneNumber] -> ShowS)
-> Show SMSSandboxPhoneNumber
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SMSSandboxPhoneNumber] -> ShowS
$cshowList :: [SMSSandboxPhoneNumber] -> ShowS
show :: SMSSandboxPhoneNumber -> String
$cshow :: SMSSandboxPhoneNumber -> String
showsPrec :: Int -> SMSSandboxPhoneNumber -> ShowS
$cshowsPrec :: Int -> SMSSandboxPhoneNumber -> ShowS
Prelude.Show, (forall x. SMSSandboxPhoneNumber -> Rep SMSSandboxPhoneNumber x)
-> (forall x. Rep SMSSandboxPhoneNumber x -> SMSSandboxPhoneNumber)
-> Generic SMSSandboxPhoneNumber
forall x. Rep SMSSandboxPhoneNumber x -> SMSSandboxPhoneNumber
forall x. SMSSandboxPhoneNumber -> Rep SMSSandboxPhoneNumber x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SMSSandboxPhoneNumber x -> SMSSandboxPhoneNumber
$cfrom :: forall x. SMSSandboxPhoneNumber -> Rep SMSSandboxPhoneNumber x
Prelude.Generic)
newSMSSandboxPhoneNumber ::
SMSSandboxPhoneNumber
newSMSSandboxPhoneNumber :: SMSSandboxPhoneNumber
newSMSSandboxPhoneNumber =
SMSSandboxPhoneNumber' :: Maybe SMSSandboxPhoneNumberVerificationStatus
-> Maybe Text -> SMSSandboxPhoneNumber
SMSSandboxPhoneNumber'
{ $sel:status:SMSSandboxPhoneNumber' :: Maybe SMSSandboxPhoneNumberVerificationStatus
status = Maybe SMSSandboxPhoneNumberVerificationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:phoneNumber:SMSSandboxPhoneNumber' :: Maybe Text
phoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
sMSSandboxPhoneNumber_status :: Lens.Lens' SMSSandboxPhoneNumber (Prelude.Maybe SMSSandboxPhoneNumberVerificationStatus)
sMSSandboxPhoneNumber_status :: (Maybe SMSSandboxPhoneNumberVerificationStatus
-> f (Maybe SMSSandboxPhoneNumberVerificationStatus))
-> SMSSandboxPhoneNumber -> f SMSSandboxPhoneNumber
sMSSandboxPhoneNumber_status = (SMSSandboxPhoneNumber
-> Maybe SMSSandboxPhoneNumberVerificationStatus)
-> (SMSSandboxPhoneNumber
-> Maybe SMSSandboxPhoneNumberVerificationStatus
-> SMSSandboxPhoneNumber)
-> Lens
SMSSandboxPhoneNumber
SMSSandboxPhoneNumber
(Maybe SMSSandboxPhoneNumberVerificationStatus)
(Maybe SMSSandboxPhoneNumberVerificationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSSandboxPhoneNumber' {Maybe SMSSandboxPhoneNumberVerificationStatus
status :: Maybe SMSSandboxPhoneNumberVerificationStatus
$sel:status:SMSSandboxPhoneNumber' :: SMSSandboxPhoneNumber
-> Maybe SMSSandboxPhoneNumberVerificationStatus
status} -> Maybe SMSSandboxPhoneNumberVerificationStatus
status) (\s :: SMSSandboxPhoneNumber
s@SMSSandboxPhoneNumber' {} Maybe SMSSandboxPhoneNumberVerificationStatus
a -> SMSSandboxPhoneNumber
s {$sel:status:SMSSandboxPhoneNumber' :: Maybe SMSSandboxPhoneNumberVerificationStatus
status = Maybe SMSSandboxPhoneNumberVerificationStatus
a} :: SMSSandboxPhoneNumber)
sMSSandboxPhoneNumber_phoneNumber :: Lens.Lens' SMSSandboxPhoneNumber (Prelude.Maybe Prelude.Text)
sMSSandboxPhoneNumber_phoneNumber :: (Maybe Text -> f (Maybe Text))
-> SMSSandboxPhoneNumber -> f SMSSandboxPhoneNumber
sMSSandboxPhoneNumber_phoneNumber = (SMSSandboxPhoneNumber -> Maybe Text)
-> (SMSSandboxPhoneNumber -> Maybe Text -> SMSSandboxPhoneNumber)
-> Lens
SMSSandboxPhoneNumber
SMSSandboxPhoneNumber
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSSandboxPhoneNumber' {Maybe Text
phoneNumber :: Maybe Text
$sel:phoneNumber:SMSSandboxPhoneNumber' :: SMSSandboxPhoneNumber -> Maybe Text
phoneNumber} -> Maybe Text
phoneNumber) (\s :: SMSSandboxPhoneNumber
s@SMSSandboxPhoneNumber' {} Maybe Text
a -> SMSSandboxPhoneNumber
s {$sel:phoneNumber:SMSSandboxPhoneNumber' :: Maybe Text
phoneNumber = Maybe Text
a} :: SMSSandboxPhoneNumber)
instance Core.FromXML SMSSandboxPhoneNumber where
parseXML :: [Node] -> Either String SMSSandboxPhoneNumber
parseXML [Node]
x =
Maybe SMSSandboxPhoneNumberVerificationStatus
-> Maybe Text -> SMSSandboxPhoneNumber
SMSSandboxPhoneNumber'
(Maybe SMSSandboxPhoneNumberVerificationStatus
-> Maybe Text -> SMSSandboxPhoneNumber)
-> Either String (Maybe SMSSandboxPhoneNumberVerificationStatus)
-> Either String (Maybe Text -> SMSSandboxPhoneNumber)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node]
-> Text
-> Either String (Maybe SMSSandboxPhoneNumberVerificationStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
Either String (Maybe Text -> SMSSandboxPhoneNumber)
-> Either String (Maybe Text)
-> Either String SMSSandboxPhoneNumber
forall (f :: * -> *) a b. Applicative f => 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
"PhoneNumber")
instance Prelude.Hashable SMSSandboxPhoneNumber
instance Prelude.NFData SMSSandboxPhoneNumber