{-# 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.PinpointSmsVoiceV2.Types.SenderIdAndCountry where
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 SenderIdAndCountry = SenderIdAndCountry'
{
SenderIdAndCountry -> Text
senderId :: Prelude.Text,
SenderIdAndCountry -> Text
isoCountryCode :: Prelude.Text
}
deriving (SenderIdAndCountry -> SenderIdAndCountry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SenderIdAndCountry -> SenderIdAndCountry -> Bool
$c/= :: SenderIdAndCountry -> SenderIdAndCountry -> Bool
== :: SenderIdAndCountry -> SenderIdAndCountry -> Bool
$c== :: SenderIdAndCountry -> SenderIdAndCountry -> Bool
Prelude.Eq, ReadPrec [SenderIdAndCountry]
ReadPrec SenderIdAndCountry
Int -> ReadS SenderIdAndCountry
ReadS [SenderIdAndCountry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SenderIdAndCountry]
$creadListPrec :: ReadPrec [SenderIdAndCountry]
readPrec :: ReadPrec SenderIdAndCountry
$creadPrec :: ReadPrec SenderIdAndCountry
readList :: ReadS [SenderIdAndCountry]
$creadList :: ReadS [SenderIdAndCountry]
readsPrec :: Int -> ReadS SenderIdAndCountry
$creadsPrec :: Int -> ReadS SenderIdAndCountry
Prelude.Read, Int -> SenderIdAndCountry -> ShowS
[SenderIdAndCountry] -> ShowS
SenderIdAndCountry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SenderIdAndCountry] -> ShowS
$cshowList :: [SenderIdAndCountry] -> ShowS
show :: SenderIdAndCountry -> String
$cshow :: SenderIdAndCountry -> String
showsPrec :: Int -> SenderIdAndCountry -> ShowS
$cshowsPrec :: Int -> SenderIdAndCountry -> ShowS
Prelude.Show, forall x. Rep SenderIdAndCountry x -> SenderIdAndCountry
forall x. SenderIdAndCountry -> Rep SenderIdAndCountry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SenderIdAndCountry x -> SenderIdAndCountry
$cfrom :: forall x. SenderIdAndCountry -> Rep SenderIdAndCountry x
Prelude.Generic)
newSenderIdAndCountry ::
Prelude.Text ->
Prelude.Text ->
SenderIdAndCountry
newSenderIdAndCountry :: Text -> Text -> SenderIdAndCountry
newSenderIdAndCountry Text
pSenderId_ Text
pIsoCountryCode_ =
SenderIdAndCountry'
{ $sel:senderId:SenderIdAndCountry' :: Text
senderId = Text
pSenderId_,
$sel:isoCountryCode:SenderIdAndCountry' :: Text
isoCountryCode = Text
pIsoCountryCode_
}
senderIdAndCountry_senderId :: Lens.Lens' SenderIdAndCountry Prelude.Text
senderIdAndCountry_senderId :: Lens' SenderIdAndCountry Text
senderIdAndCountry_senderId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SenderIdAndCountry' {Text
senderId :: Text
$sel:senderId:SenderIdAndCountry' :: SenderIdAndCountry -> Text
senderId} -> Text
senderId) (\s :: SenderIdAndCountry
s@SenderIdAndCountry' {} Text
a -> SenderIdAndCountry
s {$sel:senderId:SenderIdAndCountry' :: Text
senderId = Text
a} :: SenderIdAndCountry)
senderIdAndCountry_isoCountryCode :: Lens.Lens' SenderIdAndCountry Prelude.Text
senderIdAndCountry_isoCountryCode :: Lens' SenderIdAndCountry Text
senderIdAndCountry_isoCountryCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SenderIdAndCountry' {Text
isoCountryCode :: Text
$sel:isoCountryCode:SenderIdAndCountry' :: SenderIdAndCountry -> Text
isoCountryCode} -> Text
isoCountryCode) (\s :: SenderIdAndCountry
s@SenderIdAndCountry' {} Text
a -> SenderIdAndCountry
s {$sel:isoCountryCode:SenderIdAndCountry' :: Text
isoCountryCode = Text
a} :: SenderIdAndCountry)
instance Prelude.Hashable SenderIdAndCountry where
hashWithSalt :: Int -> SenderIdAndCountry -> Int
hashWithSalt Int
_salt SenderIdAndCountry' {Text
isoCountryCode :: Text
senderId :: Text
$sel:isoCountryCode:SenderIdAndCountry' :: SenderIdAndCountry -> Text
$sel:senderId:SenderIdAndCountry' :: SenderIdAndCountry -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
senderId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
isoCountryCode
instance Prelude.NFData SenderIdAndCountry where
rnf :: SenderIdAndCountry -> ()
rnf SenderIdAndCountry' {Text
isoCountryCode :: Text
senderId :: Text
$sel:isoCountryCode:SenderIdAndCountry' :: SenderIdAndCountry -> Text
$sel:senderId:SenderIdAndCountry' :: SenderIdAndCountry -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
senderId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
isoCountryCode
instance Data.ToJSON SenderIdAndCountry where
toJSON :: SenderIdAndCountry -> Value
toJSON SenderIdAndCountry' {Text
isoCountryCode :: Text
senderId :: Text
$sel:isoCountryCode:SenderIdAndCountry' :: SenderIdAndCountry -> Text
$sel:senderId:SenderIdAndCountry' :: SenderIdAndCountry -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"SenderId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
senderId),
forall a. a -> Maybe a
Prelude.Just
(Key
"IsoCountryCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
isoCountryCode)
]
)