{-# 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.Chime.Types.PhoneNumberCapabilities where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PhoneNumberCapabilities = PhoneNumberCapabilities'
{
PhoneNumberCapabilities -> Maybe Bool
outboundMMS :: Prelude.Maybe Prelude.Bool,
PhoneNumberCapabilities -> Maybe Bool
inboundCall :: Prelude.Maybe Prelude.Bool,
PhoneNumberCapabilities -> Maybe Bool
inboundSMS :: Prelude.Maybe Prelude.Bool,
PhoneNumberCapabilities -> Maybe Bool
inboundMMS :: Prelude.Maybe Prelude.Bool,
PhoneNumberCapabilities -> Maybe Bool
outboundCall :: Prelude.Maybe Prelude.Bool,
PhoneNumberCapabilities -> Maybe Bool
outboundSMS :: Prelude.Maybe Prelude.Bool
}
deriving (PhoneNumberCapabilities -> PhoneNumberCapabilities -> Bool
(PhoneNumberCapabilities -> PhoneNumberCapabilities -> Bool)
-> (PhoneNumberCapabilities -> PhoneNumberCapabilities -> Bool)
-> Eq PhoneNumberCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhoneNumberCapabilities -> PhoneNumberCapabilities -> Bool
$c/= :: PhoneNumberCapabilities -> PhoneNumberCapabilities -> Bool
== :: PhoneNumberCapabilities -> PhoneNumberCapabilities -> Bool
$c== :: PhoneNumberCapabilities -> PhoneNumberCapabilities -> Bool
Prelude.Eq, ReadPrec [PhoneNumberCapabilities]
ReadPrec PhoneNumberCapabilities
Int -> ReadS PhoneNumberCapabilities
ReadS [PhoneNumberCapabilities]
(Int -> ReadS PhoneNumberCapabilities)
-> ReadS [PhoneNumberCapabilities]
-> ReadPrec PhoneNumberCapabilities
-> ReadPrec [PhoneNumberCapabilities]
-> Read PhoneNumberCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PhoneNumberCapabilities]
$creadListPrec :: ReadPrec [PhoneNumberCapabilities]
readPrec :: ReadPrec PhoneNumberCapabilities
$creadPrec :: ReadPrec PhoneNumberCapabilities
readList :: ReadS [PhoneNumberCapabilities]
$creadList :: ReadS [PhoneNumberCapabilities]
readsPrec :: Int -> ReadS PhoneNumberCapabilities
$creadsPrec :: Int -> ReadS PhoneNumberCapabilities
Prelude.Read, Int -> PhoneNumberCapabilities -> ShowS
[PhoneNumberCapabilities] -> ShowS
PhoneNumberCapabilities -> String
(Int -> PhoneNumberCapabilities -> ShowS)
-> (PhoneNumberCapabilities -> String)
-> ([PhoneNumberCapabilities] -> ShowS)
-> Show PhoneNumberCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PhoneNumberCapabilities] -> ShowS
$cshowList :: [PhoneNumberCapabilities] -> ShowS
show :: PhoneNumberCapabilities -> String
$cshow :: PhoneNumberCapabilities -> String
showsPrec :: Int -> PhoneNumberCapabilities -> ShowS
$cshowsPrec :: Int -> PhoneNumberCapabilities -> ShowS
Prelude.Show, (forall x.
PhoneNumberCapabilities -> Rep PhoneNumberCapabilities x)
-> (forall x.
Rep PhoneNumberCapabilities x -> PhoneNumberCapabilities)
-> Generic PhoneNumberCapabilities
forall x. Rep PhoneNumberCapabilities x -> PhoneNumberCapabilities
forall x. PhoneNumberCapabilities -> Rep PhoneNumberCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PhoneNumberCapabilities x -> PhoneNumberCapabilities
$cfrom :: forall x. PhoneNumberCapabilities -> Rep PhoneNumberCapabilities x
Prelude.Generic)
newPhoneNumberCapabilities ::
PhoneNumberCapabilities
newPhoneNumberCapabilities :: PhoneNumberCapabilities
newPhoneNumberCapabilities =
PhoneNumberCapabilities' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> PhoneNumberCapabilities
PhoneNumberCapabilities'
{ $sel:outboundMMS:PhoneNumberCapabilities' :: Maybe Bool
outboundMMS =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:inboundCall:PhoneNumberCapabilities' :: Maybe Bool
inboundCall = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:inboundSMS:PhoneNumberCapabilities' :: Maybe Bool
inboundSMS = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:inboundMMS:PhoneNumberCapabilities' :: Maybe Bool
inboundMMS = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:outboundCall:PhoneNumberCapabilities' :: Maybe Bool
outboundCall = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:outboundSMS:PhoneNumberCapabilities' :: Maybe Bool
outboundSMS = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
phoneNumberCapabilities_outboundMMS :: Lens.Lens' PhoneNumberCapabilities (Prelude.Maybe Prelude.Bool)
phoneNumberCapabilities_outboundMMS :: (Maybe Bool -> f (Maybe Bool))
-> PhoneNumberCapabilities -> f PhoneNumberCapabilities
phoneNumberCapabilities_outboundMMS = (PhoneNumberCapabilities -> Maybe Bool)
-> (PhoneNumberCapabilities
-> Maybe Bool -> PhoneNumberCapabilities)
-> Lens
PhoneNumberCapabilities
PhoneNumberCapabilities
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhoneNumberCapabilities' {Maybe Bool
outboundMMS :: Maybe Bool
$sel:outboundMMS:PhoneNumberCapabilities' :: PhoneNumberCapabilities -> Maybe Bool
outboundMMS} -> Maybe Bool
outboundMMS) (\s :: PhoneNumberCapabilities
s@PhoneNumberCapabilities' {} Maybe Bool
a -> PhoneNumberCapabilities
s {$sel:outboundMMS:PhoneNumberCapabilities' :: Maybe Bool
outboundMMS = Maybe Bool
a} :: PhoneNumberCapabilities)
phoneNumberCapabilities_inboundCall :: Lens.Lens' PhoneNumberCapabilities (Prelude.Maybe Prelude.Bool)
phoneNumberCapabilities_inboundCall :: (Maybe Bool -> f (Maybe Bool))
-> PhoneNumberCapabilities -> f PhoneNumberCapabilities
phoneNumberCapabilities_inboundCall = (PhoneNumberCapabilities -> Maybe Bool)
-> (PhoneNumberCapabilities
-> Maybe Bool -> PhoneNumberCapabilities)
-> Lens
PhoneNumberCapabilities
PhoneNumberCapabilities
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhoneNumberCapabilities' {Maybe Bool
inboundCall :: Maybe Bool
$sel:inboundCall:PhoneNumberCapabilities' :: PhoneNumberCapabilities -> Maybe Bool
inboundCall} -> Maybe Bool
inboundCall) (\s :: PhoneNumberCapabilities
s@PhoneNumberCapabilities' {} Maybe Bool
a -> PhoneNumberCapabilities
s {$sel:inboundCall:PhoneNumberCapabilities' :: Maybe Bool
inboundCall = Maybe Bool
a} :: PhoneNumberCapabilities)
phoneNumberCapabilities_inboundSMS :: Lens.Lens' PhoneNumberCapabilities (Prelude.Maybe Prelude.Bool)
phoneNumberCapabilities_inboundSMS :: (Maybe Bool -> f (Maybe Bool))
-> PhoneNumberCapabilities -> f PhoneNumberCapabilities
phoneNumberCapabilities_inboundSMS = (PhoneNumberCapabilities -> Maybe Bool)
-> (PhoneNumberCapabilities
-> Maybe Bool -> PhoneNumberCapabilities)
-> Lens
PhoneNumberCapabilities
PhoneNumberCapabilities
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhoneNumberCapabilities' {Maybe Bool
inboundSMS :: Maybe Bool
$sel:inboundSMS:PhoneNumberCapabilities' :: PhoneNumberCapabilities -> Maybe Bool
inboundSMS} -> Maybe Bool
inboundSMS) (\s :: PhoneNumberCapabilities
s@PhoneNumberCapabilities' {} Maybe Bool
a -> PhoneNumberCapabilities
s {$sel:inboundSMS:PhoneNumberCapabilities' :: Maybe Bool
inboundSMS = Maybe Bool
a} :: PhoneNumberCapabilities)
phoneNumberCapabilities_inboundMMS :: Lens.Lens' PhoneNumberCapabilities (Prelude.Maybe Prelude.Bool)
phoneNumberCapabilities_inboundMMS :: (Maybe Bool -> f (Maybe Bool))
-> PhoneNumberCapabilities -> f PhoneNumberCapabilities
phoneNumberCapabilities_inboundMMS = (PhoneNumberCapabilities -> Maybe Bool)
-> (PhoneNumberCapabilities
-> Maybe Bool -> PhoneNumberCapabilities)
-> Lens
PhoneNumberCapabilities
PhoneNumberCapabilities
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhoneNumberCapabilities' {Maybe Bool
inboundMMS :: Maybe Bool
$sel:inboundMMS:PhoneNumberCapabilities' :: PhoneNumberCapabilities -> Maybe Bool
inboundMMS} -> Maybe Bool
inboundMMS) (\s :: PhoneNumberCapabilities
s@PhoneNumberCapabilities' {} Maybe Bool
a -> PhoneNumberCapabilities
s {$sel:inboundMMS:PhoneNumberCapabilities' :: Maybe Bool
inboundMMS = Maybe Bool
a} :: PhoneNumberCapabilities)
phoneNumberCapabilities_outboundCall :: Lens.Lens' PhoneNumberCapabilities (Prelude.Maybe Prelude.Bool)
phoneNumberCapabilities_outboundCall :: (Maybe Bool -> f (Maybe Bool))
-> PhoneNumberCapabilities -> f PhoneNumberCapabilities
phoneNumberCapabilities_outboundCall = (PhoneNumberCapabilities -> Maybe Bool)
-> (PhoneNumberCapabilities
-> Maybe Bool -> PhoneNumberCapabilities)
-> Lens
PhoneNumberCapabilities
PhoneNumberCapabilities
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhoneNumberCapabilities' {Maybe Bool
outboundCall :: Maybe Bool
$sel:outboundCall:PhoneNumberCapabilities' :: PhoneNumberCapabilities -> Maybe Bool
outboundCall} -> Maybe Bool
outboundCall) (\s :: PhoneNumberCapabilities
s@PhoneNumberCapabilities' {} Maybe Bool
a -> PhoneNumberCapabilities
s {$sel:outboundCall:PhoneNumberCapabilities' :: Maybe Bool
outboundCall = Maybe Bool
a} :: PhoneNumberCapabilities)
phoneNumberCapabilities_outboundSMS :: Lens.Lens' PhoneNumberCapabilities (Prelude.Maybe Prelude.Bool)
phoneNumberCapabilities_outboundSMS :: (Maybe Bool -> f (Maybe Bool))
-> PhoneNumberCapabilities -> f PhoneNumberCapabilities
phoneNumberCapabilities_outboundSMS = (PhoneNumberCapabilities -> Maybe Bool)
-> (PhoneNumberCapabilities
-> Maybe Bool -> PhoneNumberCapabilities)
-> Lens
PhoneNumberCapabilities
PhoneNumberCapabilities
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhoneNumberCapabilities' {Maybe Bool
outboundSMS :: Maybe Bool
$sel:outboundSMS:PhoneNumberCapabilities' :: PhoneNumberCapabilities -> Maybe Bool
outboundSMS} -> Maybe Bool
outboundSMS) (\s :: PhoneNumberCapabilities
s@PhoneNumberCapabilities' {} Maybe Bool
a -> PhoneNumberCapabilities
s {$sel:outboundSMS:PhoneNumberCapabilities' :: Maybe Bool
outboundSMS = Maybe Bool
a} :: PhoneNumberCapabilities)
instance Core.FromJSON PhoneNumberCapabilities where
parseJSON :: Value -> Parser PhoneNumberCapabilities
parseJSON =
String
-> (Object -> Parser PhoneNumberCapabilities)
-> Value
-> Parser PhoneNumberCapabilities
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PhoneNumberCapabilities"
( \Object
x ->
Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> PhoneNumberCapabilities
PhoneNumberCapabilities'
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> PhoneNumberCapabilities)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> PhoneNumberCapabilities)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutboundMMS")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> PhoneNumberCapabilities)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> PhoneNumberCapabilities)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InboundCall")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> PhoneNumberCapabilities)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool -> Maybe Bool -> Maybe Bool -> PhoneNumberCapabilities)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InboundSMS")
Parser
(Maybe Bool -> Maybe Bool -> Maybe Bool -> PhoneNumberCapabilities)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> Maybe Bool -> PhoneNumberCapabilities)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InboundMMS")
Parser (Maybe Bool -> Maybe Bool -> PhoneNumberCapabilities)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> PhoneNumberCapabilities)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutboundCall")
Parser (Maybe Bool -> PhoneNumberCapabilities)
-> Parser (Maybe Bool) -> Parser PhoneNumberCapabilities
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutboundSMS")
)
instance Prelude.Hashable PhoneNumberCapabilities
instance Prelude.NFData PhoneNumberCapabilities