{-# 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 #-}
module Amazonka.Chime.UpdatePhoneNumberSettings
(
UpdatePhoneNumberSettings (..),
newUpdatePhoneNumberSettings,
updatePhoneNumberSettings_callingName,
UpdatePhoneNumberSettingsResponse (..),
newUpdatePhoneNumberSettingsResponse,
)
where
import Amazonka.Chime.Types
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
data UpdatePhoneNumberSettings = UpdatePhoneNumberSettings'
{
UpdatePhoneNumberSettings -> Sensitive Text
callingName :: Core.Sensitive Prelude.Text
}
deriving (UpdatePhoneNumberSettings -> UpdatePhoneNumberSettings -> Bool
(UpdatePhoneNumberSettings -> UpdatePhoneNumberSettings -> Bool)
-> (UpdatePhoneNumberSettings -> UpdatePhoneNumberSettings -> Bool)
-> Eq UpdatePhoneNumberSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePhoneNumberSettings -> UpdatePhoneNumberSettings -> Bool
$c/= :: UpdatePhoneNumberSettings -> UpdatePhoneNumberSettings -> Bool
== :: UpdatePhoneNumberSettings -> UpdatePhoneNumberSettings -> Bool
$c== :: UpdatePhoneNumberSettings -> UpdatePhoneNumberSettings -> Bool
Prelude.Eq, Int -> UpdatePhoneNumberSettings -> ShowS
[UpdatePhoneNumberSettings] -> ShowS
UpdatePhoneNumberSettings -> String
(Int -> UpdatePhoneNumberSettings -> ShowS)
-> (UpdatePhoneNumberSettings -> String)
-> ([UpdatePhoneNumberSettings] -> ShowS)
-> Show UpdatePhoneNumberSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePhoneNumberSettings] -> ShowS
$cshowList :: [UpdatePhoneNumberSettings] -> ShowS
show :: UpdatePhoneNumberSettings -> String
$cshow :: UpdatePhoneNumberSettings -> String
showsPrec :: Int -> UpdatePhoneNumberSettings -> ShowS
$cshowsPrec :: Int -> UpdatePhoneNumberSettings -> ShowS
Prelude.Show, (forall x.
UpdatePhoneNumberSettings -> Rep UpdatePhoneNumberSettings x)
-> (forall x.
Rep UpdatePhoneNumberSettings x -> UpdatePhoneNumberSettings)
-> Generic UpdatePhoneNumberSettings
forall x.
Rep UpdatePhoneNumberSettings x -> UpdatePhoneNumberSettings
forall x.
UpdatePhoneNumberSettings -> Rep UpdatePhoneNumberSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePhoneNumberSettings x -> UpdatePhoneNumberSettings
$cfrom :: forall x.
UpdatePhoneNumberSettings -> Rep UpdatePhoneNumberSettings x
Prelude.Generic)
newUpdatePhoneNumberSettings ::
Prelude.Text ->
UpdatePhoneNumberSettings
newUpdatePhoneNumberSettings :: Text -> UpdatePhoneNumberSettings
newUpdatePhoneNumberSettings Text
pCallingName_ =
UpdatePhoneNumberSettings' :: Sensitive Text -> UpdatePhoneNumberSettings
UpdatePhoneNumberSettings'
{ $sel:callingName:UpdatePhoneNumberSettings' :: Sensitive Text
callingName =
Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pCallingName_
}
updatePhoneNumberSettings_callingName :: Lens.Lens' UpdatePhoneNumberSettings Prelude.Text
updatePhoneNumberSettings_callingName :: (Text -> f Text)
-> UpdatePhoneNumberSettings -> f UpdatePhoneNumberSettings
updatePhoneNumberSettings_callingName = (UpdatePhoneNumberSettings -> Sensitive Text)
-> (UpdatePhoneNumberSettings
-> Sensitive Text -> UpdatePhoneNumberSettings)
-> Lens
UpdatePhoneNumberSettings
UpdatePhoneNumberSettings
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePhoneNumberSettings' {Sensitive Text
callingName :: Sensitive Text
$sel:callingName:UpdatePhoneNumberSettings' :: UpdatePhoneNumberSettings -> Sensitive Text
callingName} -> Sensitive Text
callingName) (\s :: UpdatePhoneNumberSettings
s@UpdatePhoneNumberSettings' {} Sensitive Text
a -> UpdatePhoneNumberSettings
s {$sel:callingName:UpdatePhoneNumberSettings' :: Sensitive Text
callingName = Sensitive Text
a} :: UpdatePhoneNumberSettings) ((Sensitive Text -> f (Sensitive Text))
-> UpdatePhoneNumberSettings -> f UpdatePhoneNumberSettings)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> UpdatePhoneNumberSettings
-> f UpdatePhoneNumberSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.AWSRequest UpdatePhoneNumberSettings where
type
AWSResponse UpdatePhoneNumberSettings =
UpdatePhoneNumberSettingsResponse
request :: UpdatePhoneNumberSettings -> Request UpdatePhoneNumberSettings
request = Service
-> UpdatePhoneNumberSettings -> Request UpdatePhoneNumberSettings
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdatePhoneNumberSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdatePhoneNumberSettings)))
response =
AWSResponse UpdatePhoneNumberSettings
-> Logger
-> Service
-> Proxy UpdatePhoneNumberSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdatePhoneNumberSettings)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse UpdatePhoneNumberSettings
UpdatePhoneNumberSettingsResponse
UpdatePhoneNumberSettingsResponse'
instance Prelude.Hashable UpdatePhoneNumberSettings
instance Prelude.NFData UpdatePhoneNumberSettings
instance Core.ToHeaders UpdatePhoneNumberSettings where
toHeaders :: UpdatePhoneNumberSettings -> [Header]
toHeaders = [Header] -> UpdatePhoneNumberSettings -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON UpdatePhoneNumberSettings where
toJSON :: UpdatePhoneNumberSettings -> Value
toJSON UpdatePhoneNumberSettings' {Sensitive Text
callingName :: Sensitive Text
$sel:callingName:UpdatePhoneNumberSettings' :: UpdatePhoneNumberSettings -> Sensitive Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"CallingName" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
callingName)]
)
instance Core.ToPath UpdatePhoneNumberSettings where
toPath :: UpdatePhoneNumberSettings -> ByteString
toPath = ByteString -> UpdatePhoneNumberSettings -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/settings/phone-number"
instance Core.ToQuery UpdatePhoneNumberSettings where
toQuery :: UpdatePhoneNumberSettings -> QueryString
toQuery = QueryString -> UpdatePhoneNumberSettings -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdatePhoneNumberSettingsResponse = UpdatePhoneNumberSettingsResponse'
{
}
deriving (UpdatePhoneNumberSettingsResponse
-> UpdatePhoneNumberSettingsResponse -> Bool
(UpdatePhoneNumberSettingsResponse
-> UpdatePhoneNumberSettingsResponse -> Bool)
-> (UpdatePhoneNumberSettingsResponse
-> UpdatePhoneNumberSettingsResponse -> Bool)
-> Eq UpdatePhoneNumberSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePhoneNumberSettingsResponse
-> UpdatePhoneNumberSettingsResponse -> Bool
$c/= :: UpdatePhoneNumberSettingsResponse
-> UpdatePhoneNumberSettingsResponse -> Bool
== :: UpdatePhoneNumberSettingsResponse
-> UpdatePhoneNumberSettingsResponse -> Bool
$c== :: UpdatePhoneNumberSettingsResponse
-> UpdatePhoneNumberSettingsResponse -> Bool
Prelude.Eq, ReadPrec [UpdatePhoneNumberSettingsResponse]
ReadPrec UpdatePhoneNumberSettingsResponse
Int -> ReadS UpdatePhoneNumberSettingsResponse
ReadS [UpdatePhoneNumberSettingsResponse]
(Int -> ReadS UpdatePhoneNumberSettingsResponse)
-> ReadS [UpdatePhoneNumberSettingsResponse]
-> ReadPrec UpdatePhoneNumberSettingsResponse
-> ReadPrec [UpdatePhoneNumberSettingsResponse]
-> Read UpdatePhoneNumberSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePhoneNumberSettingsResponse]
$creadListPrec :: ReadPrec [UpdatePhoneNumberSettingsResponse]
readPrec :: ReadPrec UpdatePhoneNumberSettingsResponse
$creadPrec :: ReadPrec UpdatePhoneNumberSettingsResponse
readList :: ReadS [UpdatePhoneNumberSettingsResponse]
$creadList :: ReadS [UpdatePhoneNumberSettingsResponse]
readsPrec :: Int -> ReadS UpdatePhoneNumberSettingsResponse
$creadsPrec :: Int -> ReadS UpdatePhoneNumberSettingsResponse
Prelude.Read, Int -> UpdatePhoneNumberSettingsResponse -> ShowS
[UpdatePhoneNumberSettingsResponse] -> ShowS
UpdatePhoneNumberSettingsResponse -> String
(Int -> UpdatePhoneNumberSettingsResponse -> ShowS)
-> (UpdatePhoneNumberSettingsResponse -> String)
-> ([UpdatePhoneNumberSettingsResponse] -> ShowS)
-> Show UpdatePhoneNumberSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePhoneNumberSettingsResponse] -> ShowS
$cshowList :: [UpdatePhoneNumberSettingsResponse] -> ShowS
show :: UpdatePhoneNumberSettingsResponse -> String
$cshow :: UpdatePhoneNumberSettingsResponse -> String
showsPrec :: Int -> UpdatePhoneNumberSettingsResponse -> ShowS
$cshowsPrec :: Int -> UpdatePhoneNumberSettingsResponse -> ShowS
Prelude.Show, (forall x.
UpdatePhoneNumberSettingsResponse
-> Rep UpdatePhoneNumberSettingsResponse x)
-> (forall x.
Rep UpdatePhoneNumberSettingsResponse x
-> UpdatePhoneNumberSettingsResponse)
-> Generic UpdatePhoneNumberSettingsResponse
forall x.
Rep UpdatePhoneNumberSettingsResponse x
-> UpdatePhoneNumberSettingsResponse
forall x.
UpdatePhoneNumberSettingsResponse
-> Rep UpdatePhoneNumberSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePhoneNumberSettingsResponse x
-> UpdatePhoneNumberSettingsResponse
$cfrom :: forall x.
UpdatePhoneNumberSettingsResponse
-> Rep UpdatePhoneNumberSettingsResponse x
Prelude.Generic)
newUpdatePhoneNumberSettingsResponse ::
UpdatePhoneNumberSettingsResponse
newUpdatePhoneNumberSettingsResponse :: UpdatePhoneNumberSettingsResponse
newUpdatePhoneNumberSettingsResponse =
UpdatePhoneNumberSettingsResponse
UpdatePhoneNumberSettingsResponse'
instance
Prelude.NFData
UpdatePhoneNumberSettingsResponse