{-# 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.Connect.Types.PhoneNumberStatus where
import Amazonka.Connect.Types.PhoneNumberWorkflowStatus
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
data PhoneNumberStatus = PhoneNumberStatus'
{
PhoneNumberStatus -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
PhoneNumberStatus -> Maybe PhoneNumberWorkflowStatus
status :: Prelude.Maybe PhoneNumberWorkflowStatus
}
deriving (PhoneNumberStatus -> PhoneNumberStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhoneNumberStatus -> PhoneNumberStatus -> Bool
$c/= :: PhoneNumberStatus -> PhoneNumberStatus -> Bool
== :: PhoneNumberStatus -> PhoneNumberStatus -> Bool
$c== :: PhoneNumberStatus -> PhoneNumberStatus -> Bool
Prelude.Eq, ReadPrec [PhoneNumberStatus]
ReadPrec PhoneNumberStatus
Int -> ReadS PhoneNumberStatus
ReadS [PhoneNumberStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PhoneNumberStatus]
$creadListPrec :: ReadPrec [PhoneNumberStatus]
readPrec :: ReadPrec PhoneNumberStatus
$creadPrec :: ReadPrec PhoneNumberStatus
readList :: ReadS [PhoneNumberStatus]
$creadList :: ReadS [PhoneNumberStatus]
readsPrec :: Int -> ReadS PhoneNumberStatus
$creadsPrec :: Int -> ReadS PhoneNumberStatus
Prelude.Read, Int -> PhoneNumberStatus -> ShowS
[PhoneNumberStatus] -> ShowS
PhoneNumberStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PhoneNumberStatus] -> ShowS
$cshowList :: [PhoneNumberStatus] -> ShowS
show :: PhoneNumberStatus -> String
$cshow :: PhoneNumberStatus -> String
showsPrec :: Int -> PhoneNumberStatus -> ShowS
$cshowsPrec :: Int -> PhoneNumberStatus -> ShowS
Prelude.Show, forall x. Rep PhoneNumberStatus x -> PhoneNumberStatus
forall x. PhoneNumberStatus -> Rep PhoneNumberStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PhoneNumberStatus x -> PhoneNumberStatus
$cfrom :: forall x. PhoneNumberStatus -> Rep PhoneNumberStatus x
Prelude.Generic)
newPhoneNumberStatus ::
PhoneNumberStatus
newPhoneNumberStatus :: PhoneNumberStatus
newPhoneNumberStatus =
PhoneNumberStatus'
{ $sel:message:PhoneNumberStatus' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing,
$sel:status:PhoneNumberStatus' :: Maybe PhoneNumberWorkflowStatus
status = forall a. Maybe a
Prelude.Nothing
}
phoneNumberStatus_message :: Lens.Lens' PhoneNumberStatus (Prelude.Maybe Prelude.Text)
phoneNumberStatus_message :: Lens' PhoneNumberStatus (Maybe Text)
phoneNumberStatus_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhoneNumberStatus' {Maybe Text
message :: Maybe Text
$sel:message:PhoneNumberStatus' :: PhoneNumberStatus -> Maybe Text
message} -> Maybe Text
message) (\s :: PhoneNumberStatus
s@PhoneNumberStatus' {} Maybe Text
a -> PhoneNumberStatus
s {$sel:message:PhoneNumberStatus' :: Maybe Text
message = Maybe Text
a} :: PhoneNumberStatus)
phoneNumberStatus_status :: Lens.Lens' PhoneNumberStatus (Prelude.Maybe PhoneNumberWorkflowStatus)
phoneNumberStatus_status :: Lens' PhoneNumberStatus (Maybe PhoneNumberWorkflowStatus)
phoneNumberStatus_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhoneNumberStatus' {Maybe PhoneNumberWorkflowStatus
status :: Maybe PhoneNumberWorkflowStatus
$sel:status:PhoneNumberStatus' :: PhoneNumberStatus -> Maybe PhoneNumberWorkflowStatus
status} -> Maybe PhoneNumberWorkflowStatus
status) (\s :: PhoneNumberStatus
s@PhoneNumberStatus' {} Maybe PhoneNumberWorkflowStatus
a -> PhoneNumberStatus
s {$sel:status:PhoneNumberStatus' :: Maybe PhoneNumberWorkflowStatus
status = Maybe PhoneNumberWorkflowStatus
a} :: PhoneNumberStatus)
instance Data.FromJSON PhoneNumberStatus where
parseJSON :: Value -> Parser PhoneNumberStatus
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PhoneNumberStatus"
( \Object
x ->
Maybe Text -> Maybe PhoneNumberWorkflowStatus -> PhoneNumberStatus
PhoneNumberStatus'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Message")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
)
instance Prelude.Hashable PhoneNumberStatus where
hashWithSalt :: Int -> PhoneNumberStatus -> Int
hashWithSalt Int
_salt PhoneNumberStatus' {Maybe Text
Maybe PhoneNumberWorkflowStatus
status :: Maybe PhoneNumberWorkflowStatus
message :: Maybe Text
$sel:status:PhoneNumberStatus' :: PhoneNumberStatus -> Maybe PhoneNumberWorkflowStatus
$sel:message:PhoneNumberStatus' :: PhoneNumberStatus -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PhoneNumberWorkflowStatus
status
instance Prelude.NFData PhoneNumberStatus where
rnf :: PhoneNumberStatus -> ()
rnf PhoneNumberStatus' {Maybe Text
Maybe PhoneNumberWorkflowStatus
status :: Maybe PhoneNumberWorkflowStatus
message :: Maybe Text
$sel:status:PhoneNumberStatus' :: PhoneNumberStatus -> Maybe PhoneNumberWorkflowStatus
$sel:message:PhoneNumberStatus' :: PhoneNumberStatus -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PhoneNumberWorkflowStatus
status