{-# 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.ChimeSdkVoice.UpdateGlobalSettings
(
UpdateGlobalSettings (..),
newUpdateGlobalSettings,
updateGlobalSettings_voiceConnector,
UpdateGlobalSettingsResponse (..),
newUpdateGlobalSettingsResponse,
)
where
import Amazonka.ChimeSdkVoice.Types
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateGlobalSettings = UpdateGlobalSettings'
{ UpdateGlobalSettings -> Maybe VoiceConnectorSettings
voiceConnector :: Prelude.Maybe VoiceConnectorSettings
}
deriving (UpdateGlobalSettings -> UpdateGlobalSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGlobalSettings -> UpdateGlobalSettings -> Bool
$c/= :: UpdateGlobalSettings -> UpdateGlobalSettings -> Bool
== :: UpdateGlobalSettings -> UpdateGlobalSettings -> Bool
$c== :: UpdateGlobalSettings -> UpdateGlobalSettings -> Bool
Prelude.Eq, ReadPrec [UpdateGlobalSettings]
ReadPrec UpdateGlobalSettings
Int -> ReadS UpdateGlobalSettings
ReadS [UpdateGlobalSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGlobalSettings]
$creadListPrec :: ReadPrec [UpdateGlobalSettings]
readPrec :: ReadPrec UpdateGlobalSettings
$creadPrec :: ReadPrec UpdateGlobalSettings
readList :: ReadS [UpdateGlobalSettings]
$creadList :: ReadS [UpdateGlobalSettings]
readsPrec :: Int -> ReadS UpdateGlobalSettings
$creadsPrec :: Int -> ReadS UpdateGlobalSettings
Prelude.Read, Int -> UpdateGlobalSettings -> ShowS
[UpdateGlobalSettings] -> ShowS
UpdateGlobalSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGlobalSettings] -> ShowS
$cshowList :: [UpdateGlobalSettings] -> ShowS
show :: UpdateGlobalSettings -> String
$cshow :: UpdateGlobalSettings -> String
showsPrec :: Int -> UpdateGlobalSettings -> ShowS
$cshowsPrec :: Int -> UpdateGlobalSettings -> ShowS
Prelude.Show, forall x. Rep UpdateGlobalSettings x -> UpdateGlobalSettings
forall x. UpdateGlobalSettings -> Rep UpdateGlobalSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateGlobalSettings x -> UpdateGlobalSettings
$cfrom :: forall x. UpdateGlobalSettings -> Rep UpdateGlobalSettings x
Prelude.Generic)
newUpdateGlobalSettings ::
UpdateGlobalSettings
newUpdateGlobalSettings :: UpdateGlobalSettings
newUpdateGlobalSettings =
UpdateGlobalSettings'
{ $sel:voiceConnector:UpdateGlobalSettings' :: Maybe VoiceConnectorSettings
voiceConnector =
forall a. Maybe a
Prelude.Nothing
}
updateGlobalSettings_voiceConnector :: Lens.Lens' UpdateGlobalSettings (Prelude.Maybe VoiceConnectorSettings)
updateGlobalSettings_voiceConnector :: Lens' UpdateGlobalSettings (Maybe VoiceConnectorSettings)
updateGlobalSettings_voiceConnector = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGlobalSettings' {Maybe VoiceConnectorSettings
voiceConnector :: Maybe VoiceConnectorSettings
$sel:voiceConnector:UpdateGlobalSettings' :: UpdateGlobalSettings -> Maybe VoiceConnectorSettings
voiceConnector} -> Maybe VoiceConnectorSettings
voiceConnector) (\s :: UpdateGlobalSettings
s@UpdateGlobalSettings' {} Maybe VoiceConnectorSettings
a -> UpdateGlobalSettings
s {$sel:voiceConnector:UpdateGlobalSettings' :: Maybe VoiceConnectorSettings
voiceConnector = Maybe VoiceConnectorSettings
a} :: UpdateGlobalSettings)
instance Core.AWSRequest UpdateGlobalSettings where
type
AWSResponse UpdateGlobalSettings =
UpdateGlobalSettingsResponse
request :: (Service -> Service)
-> UpdateGlobalSettings -> Request UpdateGlobalSettings
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateGlobalSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateGlobalSettings)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull UpdateGlobalSettingsResponse
UpdateGlobalSettingsResponse'
instance Prelude.Hashable UpdateGlobalSettings where
hashWithSalt :: Int -> UpdateGlobalSettings -> Int
hashWithSalt Int
_salt UpdateGlobalSettings' {Maybe VoiceConnectorSettings
voiceConnector :: Maybe VoiceConnectorSettings
$sel:voiceConnector:UpdateGlobalSettings' :: UpdateGlobalSettings -> Maybe VoiceConnectorSettings
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VoiceConnectorSettings
voiceConnector
instance Prelude.NFData UpdateGlobalSettings where
rnf :: UpdateGlobalSettings -> ()
rnf UpdateGlobalSettings' {Maybe VoiceConnectorSettings
voiceConnector :: Maybe VoiceConnectorSettings
$sel:voiceConnector:UpdateGlobalSettings' :: UpdateGlobalSettings -> Maybe VoiceConnectorSettings
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe VoiceConnectorSettings
voiceConnector
instance Data.ToHeaders UpdateGlobalSettings where
toHeaders :: UpdateGlobalSettings -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToJSON UpdateGlobalSettings where
toJSON :: UpdateGlobalSettings -> Value
toJSON UpdateGlobalSettings' {Maybe VoiceConnectorSettings
voiceConnector :: Maybe VoiceConnectorSettings
$sel:voiceConnector:UpdateGlobalSettings' :: UpdateGlobalSettings -> Maybe VoiceConnectorSettings
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"VoiceConnector" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VoiceConnectorSettings
voiceConnector
]
)
instance Data.ToPath UpdateGlobalSettings where
toPath :: UpdateGlobalSettings -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/settings"
instance Data.ToQuery UpdateGlobalSettings where
toQuery :: UpdateGlobalSettings -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateGlobalSettingsResponse = UpdateGlobalSettingsResponse'
{
}
deriving (UpdateGlobalSettingsResponse
-> UpdateGlobalSettingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGlobalSettingsResponse
-> UpdateGlobalSettingsResponse -> Bool
$c/= :: UpdateGlobalSettingsResponse
-> UpdateGlobalSettingsResponse -> Bool
== :: UpdateGlobalSettingsResponse
-> UpdateGlobalSettingsResponse -> Bool
$c== :: UpdateGlobalSettingsResponse
-> UpdateGlobalSettingsResponse -> Bool
Prelude.Eq, ReadPrec [UpdateGlobalSettingsResponse]
ReadPrec UpdateGlobalSettingsResponse
Int -> ReadS UpdateGlobalSettingsResponse
ReadS [UpdateGlobalSettingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGlobalSettingsResponse]
$creadListPrec :: ReadPrec [UpdateGlobalSettingsResponse]
readPrec :: ReadPrec UpdateGlobalSettingsResponse
$creadPrec :: ReadPrec UpdateGlobalSettingsResponse
readList :: ReadS [UpdateGlobalSettingsResponse]
$creadList :: ReadS [UpdateGlobalSettingsResponse]
readsPrec :: Int -> ReadS UpdateGlobalSettingsResponse
$creadsPrec :: Int -> ReadS UpdateGlobalSettingsResponse
Prelude.Read, Int -> UpdateGlobalSettingsResponse -> ShowS
[UpdateGlobalSettingsResponse] -> ShowS
UpdateGlobalSettingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGlobalSettingsResponse] -> ShowS
$cshowList :: [UpdateGlobalSettingsResponse] -> ShowS
show :: UpdateGlobalSettingsResponse -> String
$cshow :: UpdateGlobalSettingsResponse -> String
showsPrec :: Int -> UpdateGlobalSettingsResponse -> ShowS
$cshowsPrec :: Int -> UpdateGlobalSettingsResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateGlobalSettingsResponse x -> UpdateGlobalSettingsResponse
forall x.
UpdateGlobalSettingsResponse -> Rep UpdateGlobalSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateGlobalSettingsResponse x -> UpdateGlobalSettingsResponse
$cfrom :: forall x.
UpdateGlobalSettingsResponse -> Rep UpdateGlobalSettingsResponse x
Prelude.Generic)
newUpdateGlobalSettingsResponse ::
UpdateGlobalSettingsResponse
newUpdateGlobalSettingsResponse :: UpdateGlobalSettingsResponse
newUpdateGlobalSettingsResponse =
UpdateGlobalSettingsResponse
UpdateGlobalSettingsResponse'
instance Prelude.NFData UpdateGlobalSettingsResponse where
rnf :: UpdateGlobalSettingsResponse -> ()
rnf UpdateGlobalSettingsResponse
_ = ()