{-# 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.GetGlobalSettings
(
GetGlobalSettings (..),
newGetGlobalSettings,
GetGlobalSettingsResponse (..),
newGetGlobalSettingsResponse,
getGlobalSettingsResponse_businessCalling,
getGlobalSettingsResponse_voiceConnector,
getGlobalSettingsResponse_httpStatus,
)
where
import Amazonka.Chime.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 GetGlobalSettings = GetGlobalSettings'
{
}
deriving (GetGlobalSettings -> GetGlobalSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetGlobalSettings -> GetGlobalSettings -> Bool
$c/= :: GetGlobalSettings -> GetGlobalSettings -> Bool
== :: GetGlobalSettings -> GetGlobalSettings -> Bool
$c== :: GetGlobalSettings -> GetGlobalSettings -> Bool
Prelude.Eq, ReadPrec [GetGlobalSettings]
ReadPrec GetGlobalSettings
Int -> ReadS GetGlobalSettings
ReadS [GetGlobalSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetGlobalSettings]
$creadListPrec :: ReadPrec [GetGlobalSettings]
readPrec :: ReadPrec GetGlobalSettings
$creadPrec :: ReadPrec GetGlobalSettings
readList :: ReadS [GetGlobalSettings]
$creadList :: ReadS [GetGlobalSettings]
readsPrec :: Int -> ReadS GetGlobalSettings
$creadsPrec :: Int -> ReadS GetGlobalSettings
Prelude.Read, Int -> GetGlobalSettings -> ShowS
[GetGlobalSettings] -> ShowS
GetGlobalSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetGlobalSettings] -> ShowS
$cshowList :: [GetGlobalSettings] -> ShowS
show :: GetGlobalSettings -> String
$cshow :: GetGlobalSettings -> String
showsPrec :: Int -> GetGlobalSettings -> ShowS
$cshowsPrec :: Int -> GetGlobalSettings -> ShowS
Prelude.Show, forall x. Rep GetGlobalSettings x -> GetGlobalSettings
forall x. GetGlobalSettings -> Rep GetGlobalSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetGlobalSettings x -> GetGlobalSettings
$cfrom :: forall x. GetGlobalSettings -> Rep GetGlobalSettings x
Prelude.Generic)
newGetGlobalSettings ::
GetGlobalSettings
newGetGlobalSettings :: GetGlobalSettings
newGetGlobalSettings = GetGlobalSettings
GetGlobalSettings'
instance Core.AWSRequest GetGlobalSettings where
type
AWSResponse GetGlobalSettings =
GetGlobalSettingsResponse
request :: (Service -> Service)
-> GetGlobalSettings -> Request GetGlobalSettings
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetGlobalSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetGlobalSettings)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe BusinessCallingSettings
-> Maybe VoiceConnectorSettings -> Int -> GetGlobalSettingsResponse
GetGlobalSettingsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"BusinessCalling")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VoiceConnector")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable GetGlobalSettings where
hashWithSalt :: Int -> GetGlobalSettings -> Int
hashWithSalt Int
_salt GetGlobalSettings
_ =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance Prelude.NFData GetGlobalSettings where
rnf :: GetGlobalSettings -> ()
rnf GetGlobalSettings
_ = ()
instance Data.ToHeaders GetGlobalSettings where
toHeaders :: GetGlobalSettings -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath GetGlobalSettings where
toPath :: GetGlobalSettings -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/settings"
instance Data.ToQuery GetGlobalSettings where
toQuery :: GetGlobalSettings -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetGlobalSettingsResponse = GetGlobalSettingsResponse'
{
GetGlobalSettingsResponse -> Maybe BusinessCallingSettings
businessCalling :: Prelude.Maybe BusinessCallingSettings,
GetGlobalSettingsResponse -> Maybe VoiceConnectorSettings
voiceConnector :: Prelude.Maybe VoiceConnectorSettings,
GetGlobalSettingsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetGlobalSettingsResponse -> GetGlobalSettingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetGlobalSettingsResponse -> GetGlobalSettingsResponse -> Bool
$c/= :: GetGlobalSettingsResponse -> GetGlobalSettingsResponse -> Bool
== :: GetGlobalSettingsResponse -> GetGlobalSettingsResponse -> Bool
$c== :: GetGlobalSettingsResponse -> GetGlobalSettingsResponse -> Bool
Prelude.Eq, ReadPrec [GetGlobalSettingsResponse]
ReadPrec GetGlobalSettingsResponse
Int -> ReadS GetGlobalSettingsResponse
ReadS [GetGlobalSettingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetGlobalSettingsResponse]
$creadListPrec :: ReadPrec [GetGlobalSettingsResponse]
readPrec :: ReadPrec GetGlobalSettingsResponse
$creadPrec :: ReadPrec GetGlobalSettingsResponse
readList :: ReadS [GetGlobalSettingsResponse]
$creadList :: ReadS [GetGlobalSettingsResponse]
readsPrec :: Int -> ReadS GetGlobalSettingsResponse
$creadsPrec :: Int -> ReadS GetGlobalSettingsResponse
Prelude.Read, Int -> GetGlobalSettingsResponse -> ShowS
[GetGlobalSettingsResponse] -> ShowS
GetGlobalSettingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetGlobalSettingsResponse] -> ShowS
$cshowList :: [GetGlobalSettingsResponse] -> ShowS
show :: GetGlobalSettingsResponse -> String
$cshow :: GetGlobalSettingsResponse -> String
showsPrec :: Int -> GetGlobalSettingsResponse -> ShowS
$cshowsPrec :: Int -> GetGlobalSettingsResponse -> ShowS
Prelude.Show, forall x.
Rep GetGlobalSettingsResponse x -> GetGlobalSettingsResponse
forall x.
GetGlobalSettingsResponse -> Rep GetGlobalSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetGlobalSettingsResponse x -> GetGlobalSettingsResponse
$cfrom :: forall x.
GetGlobalSettingsResponse -> Rep GetGlobalSettingsResponse x
Prelude.Generic)
newGetGlobalSettingsResponse ::
Prelude.Int ->
GetGlobalSettingsResponse
newGetGlobalSettingsResponse :: Int -> GetGlobalSettingsResponse
newGetGlobalSettingsResponse Int
pHttpStatus_ =
GetGlobalSettingsResponse'
{ $sel:businessCalling:GetGlobalSettingsResponse' :: Maybe BusinessCallingSettings
businessCalling =
forall a. Maybe a
Prelude.Nothing,
$sel:voiceConnector:GetGlobalSettingsResponse' :: Maybe VoiceConnectorSettings
voiceConnector = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetGlobalSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getGlobalSettingsResponse_businessCalling :: Lens.Lens' GetGlobalSettingsResponse (Prelude.Maybe BusinessCallingSettings)
getGlobalSettingsResponse_businessCalling :: Lens' GetGlobalSettingsResponse (Maybe BusinessCallingSettings)
getGlobalSettingsResponse_businessCalling = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGlobalSettingsResponse' {Maybe BusinessCallingSettings
businessCalling :: Maybe BusinessCallingSettings
$sel:businessCalling:GetGlobalSettingsResponse' :: GetGlobalSettingsResponse -> Maybe BusinessCallingSettings
businessCalling} -> Maybe BusinessCallingSettings
businessCalling) (\s :: GetGlobalSettingsResponse
s@GetGlobalSettingsResponse' {} Maybe BusinessCallingSettings
a -> GetGlobalSettingsResponse
s {$sel:businessCalling:GetGlobalSettingsResponse' :: Maybe BusinessCallingSettings
businessCalling = Maybe BusinessCallingSettings
a} :: GetGlobalSettingsResponse)
getGlobalSettingsResponse_voiceConnector :: Lens.Lens' GetGlobalSettingsResponse (Prelude.Maybe VoiceConnectorSettings)
getGlobalSettingsResponse_voiceConnector :: Lens' GetGlobalSettingsResponse (Maybe VoiceConnectorSettings)
getGlobalSettingsResponse_voiceConnector = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGlobalSettingsResponse' {Maybe VoiceConnectorSettings
voiceConnector :: Maybe VoiceConnectorSettings
$sel:voiceConnector:GetGlobalSettingsResponse' :: GetGlobalSettingsResponse -> Maybe VoiceConnectorSettings
voiceConnector} -> Maybe VoiceConnectorSettings
voiceConnector) (\s :: GetGlobalSettingsResponse
s@GetGlobalSettingsResponse' {} Maybe VoiceConnectorSettings
a -> GetGlobalSettingsResponse
s {$sel:voiceConnector:GetGlobalSettingsResponse' :: Maybe VoiceConnectorSettings
voiceConnector = Maybe VoiceConnectorSettings
a} :: GetGlobalSettingsResponse)
getGlobalSettingsResponse_httpStatus :: Lens.Lens' GetGlobalSettingsResponse Prelude.Int
getGlobalSettingsResponse_httpStatus :: Lens' GetGlobalSettingsResponse Int
getGlobalSettingsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGlobalSettingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetGlobalSettingsResponse' :: GetGlobalSettingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetGlobalSettingsResponse
s@GetGlobalSettingsResponse' {} Int
a -> GetGlobalSettingsResponse
s {$sel:httpStatus:GetGlobalSettingsResponse' :: Int
httpStatus = Int
a} :: GetGlobalSettingsResponse)
instance Prelude.NFData GetGlobalSettingsResponse where
rnf :: GetGlobalSettingsResponse -> ()
rnf GetGlobalSettingsResponse' {Int
Maybe BusinessCallingSettings
Maybe VoiceConnectorSettings
httpStatus :: Int
voiceConnector :: Maybe VoiceConnectorSettings
businessCalling :: Maybe BusinessCallingSettings
$sel:httpStatus:GetGlobalSettingsResponse' :: GetGlobalSettingsResponse -> Int
$sel:voiceConnector:GetGlobalSettingsResponse' :: GetGlobalSettingsResponse -> Maybe VoiceConnectorSettings
$sel:businessCalling:GetGlobalSettingsResponse' :: GetGlobalSettingsResponse -> Maybe BusinessCallingSettings
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe BusinessCallingSettings
businessCalling
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VoiceConnectorSettings
voiceConnector
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus