{-# 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.GetVoiceConnectorEmergencyCallingConfiguration
(
GetVoiceConnectorEmergencyCallingConfiguration (..),
newGetVoiceConnectorEmergencyCallingConfiguration,
getVoiceConnectorEmergencyCallingConfiguration_voiceConnectorId,
GetVoiceConnectorEmergencyCallingConfigurationResponse (..),
newGetVoiceConnectorEmergencyCallingConfigurationResponse,
getVoiceConnectorEmergencyCallingConfigurationResponse_emergencyCallingConfiguration,
getVoiceConnectorEmergencyCallingConfigurationResponse_httpStatus,
)
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 GetVoiceConnectorEmergencyCallingConfiguration = GetVoiceConnectorEmergencyCallingConfiguration'
{
GetVoiceConnectorEmergencyCallingConfiguration -> Text
voiceConnectorId :: Prelude.Text
}
deriving (GetVoiceConnectorEmergencyCallingConfiguration
-> GetVoiceConnectorEmergencyCallingConfiguration -> Bool
(GetVoiceConnectorEmergencyCallingConfiguration
-> GetVoiceConnectorEmergencyCallingConfiguration -> Bool)
-> (GetVoiceConnectorEmergencyCallingConfiguration
-> GetVoiceConnectorEmergencyCallingConfiguration -> Bool)
-> Eq GetVoiceConnectorEmergencyCallingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVoiceConnectorEmergencyCallingConfiguration
-> GetVoiceConnectorEmergencyCallingConfiguration -> Bool
$c/= :: GetVoiceConnectorEmergencyCallingConfiguration
-> GetVoiceConnectorEmergencyCallingConfiguration -> Bool
== :: GetVoiceConnectorEmergencyCallingConfiguration
-> GetVoiceConnectorEmergencyCallingConfiguration -> Bool
$c== :: GetVoiceConnectorEmergencyCallingConfiguration
-> GetVoiceConnectorEmergencyCallingConfiguration -> Bool
Prelude.Eq, ReadPrec [GetVoiceConnectorEmergencyCallingConfiguration]
ReadPrec GetVoiceConnectorEmergencyCallingConfiguration
Int -> ReadS GetVoiceConnectorEmergencyCallingConfiguration
ReadS [GetVoiceConnectorEmergencyCallingConfiguration]
(Int -> ReadS GetVoiceConnectorEmergencyCallingConfiguration)
-> ReadS [GetVoiceConnectorEmergencyCallingConfiguration]
-> ReadPrec GetVoiceConnectorEmergencyCallingConfiguration
-> ReadPrec [GetVoiceConnectorEmergencyCallingConfiguration]
-> Read GetVoiceConnectorEmergencyCallingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetVoiceConnectorEmergencyCallingConfiguration]
$creadListPrec :: ReadPrec [GetVoiceConnectorEmergencyCallingConfiguration]
readPrec :: ReadPrec GetVoiceConnectorEmergencyCallingConfiguration
$creadPrec :: ReadPrec GetVoiceConnectorEmergencyCallingConfiguration
readList :: ReadS [GetVoiceConnectorEmergencyCallingConfiguration]
$creadList :: ReadS [GetVoiceConnectorEmergencyCallingConfiguration]
readsPrec :: Int -> ReadS GetVoiceConnectorEmergencyCallingConfiguration
$creadsPrec :: Int -> ReadS GetVoiceConnectorEmergencyCallingConfiguration
Prelude.Read, Int -> GetVoiceConnectorEmergencyCallingConfiguration -> ShowS
[GetVoiceConnectorEmergencyCallingConfiguration] -> ShowS
GetVoiceConnectorEmergencyCallingConfiguration -> String
(Int -> GetVoiceConnectorEmergencyCallingConfiguration -> ShowS)
-> (GetVoiceConnectorEmergencyCallingConfiguration -> String)
-> ([GetVoiceConnectorEmergencyCallingConfiguration] -> ShowS)
-> Show GetVoiceConnectorEmergencyCallingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetVoiceConnectorEmergencyCallingConfiguration] -> ShowS
$cshowList :: [GetVoiceConnectorEmergencyCallingConfiguration] -> ShowS
show :: GetVoiceConnectorEmergencyCallingConfiguration -> String
$cshow :: GetVoiceConnectorEmergencyCallingConfiguration -> String
showsPrec :: Int -> GetVoiceConnectorEmergencyCallingConfiguration -> ShowS
$cshowsPrec :: Int -> GetVoiceConnectorEmergencyCallingConfiguration -> ShowS
Prelude.Show, (forall x.
GetVoiceConnectorEmergencyCallingConfiguration
-> Rep GetVoiceConnectorEmergencyCallingConfiguration x)
-> (forall x.
Rep GetVoiceConnectorEmergencyCallingConfiguration x
-> GetVoiceConnectorEmergencyCallingConfiguration)
-> Generic GetVoiceConnectorEmergencyCallingConfiguration
forall x.
Rep GetVoiceConnectorEmergencyCallingConfiguration x
-> GetVoiceConnectorEmergencyCallingConfiguration
forall x.
GetVoiceConnectorEmergencyCallingConfiguration
-> Rep GetVoiceConnectorEmergencyCallingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetVoiceConnectorEmergencyCallingConfiguration x
-> GetVoiceConnectorEmergencyCallingConfiguration
$cfrom :: forall x.
GetVoiceConnectorEmergencyCallingConfiguration
-> Rep GetVoiceConnectorEmergencyCallingConfiguration x
Prelude.Generic)
newGetVoiceConnectorEmergencyCallingConfiguration ::
Prelude.Text ->
GetVoiceConnectorEmergencyCallingConfiguration
newGetVoiceConnectorEmergencyCallingConfiguration :: Text -> GetVoiceConnectorEmergencyCallingConfiguration
newGetVoiceConnectorEmergencyCallingConfiguration
Text
pVoiceConnectorId_ =
GetVoiceConnectorEmergencyCallingConfiguration' :: Text -> GetVoiceConnectorEmergencyCallingConfiguration
GetVoiceConnectorEmergencyCallingConfiguration'
{ $sel:voiceConnectorId:GetVoiceConnectorEmergencyCallingConfiguration' :: Text
voiceConnectorId =
Text
pVoiceConnectorId_
}
getVoiceConnectorEmergencyCallingConfiguration_voiceConnectorId :: Lens.Lens' GetVoiceConnectorEmergencyCallingConfiguration Prelude.Text
getVoiceConnectorEmergencyCallingConfiguration_voiceConnectorId :: (Text -> f Text)
-> GetVoiceConnectorEmergencyCallingConfiguration
-> f GetVoiceConnectorEmergencyCallingConfiguration
getVoiceConnectorEmergencyCallingConfiguration_voiceConnectorId = (GetVoiceConnectorEmergencyCallingConfiguration -> Text)
-> (GetVoiceConnectorEmergencyCallingConfiguration
-> Text -> GetVoiceConnectorEmergencyCallingConfiguration)
-> Lens
GetVoiceConnectorEmergencyCallingConfiguration
GetVoiceConnectorEmergencyCallingConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVoiceConnectorEmergencyCallingConfiguration' {Text
voiceConnectorId :: Text
$sel:voiceConnectorId:GetVoiceConnectorEmergencyCallingConfiguration' :: GetVoiceConnectorEmergencyCallingConfiguration -> Text
voiceConnectorId} -> Text
voiceConnectorId) (\s :: GetVoiceConnectorEmergencyCallingConfiguration
s@GetVoiceConnectorEmergencyCallingConfiguration' {} Text
a -> GetVoiceConnectorEmergencyCallingConfiguration
s {$sel:voiceConnectorId:GetVoiceConnectorEmergencyCallingConfiguration' :: Text
voiceConnectorId = Text
a} :: GetVoiceConnectorEmergencyCallingConfiguration)
instance
Core.AWSRequest
GetVoiceConnectorEmergencyCallingConfiguration
where
type
AWSResponse
GetVoiceConnectorEmergencyCallingConfiguration =
GetVoiceConnectorEmergencyCallingConfigurationResponse
request :: GetVoiceConnectorEmergencyCallingConfiguration
-> Request GetVoiceConnectorEmergencyCallingConfiguration
request = Service
-> GetVoiceConnectorEmergencyCallingConfiguration
-> Request GetVoiceConnectorEmergencyCallingConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetVoiceConnectorEmergencyCallingConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse GetVoiceConnectorEmergencyCallingConfiguration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String
(AWSResponse GetVoiceConnectorEmergencyCallingConfiguration))
-> Logger
-> Service
-> Proxy GetVoiceConnectorEmergencyCallingConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse GetVoiceConnectorEmergencyCallingConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe EmergencyCallingConfiguration
-> Int -> GetVoiceConnectorEmergencyCallingConfigurationResponse
GetVoiceConnectorEmergencyCallingConfigurationResponse'
(Maybe EmergencyCallingConfiguration
-> Int -> GetVoiceConnectorEmergencyCallingConfigurationResponse)
-> Either String (Maybe EmergencyCallingConfiguration)
-> Either
String
(Int -> GetVoiceConnectorEmergencyCallingConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe EmergencyCallingConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EmergencyCallingConfiguration")
Either
String
(Int -> GetVoiceConnectorEmergencyCallingConfigurationResponse)
-> Either String Int
-> Either
String GetVoiceConnectorEmergencyCallingConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
GetVoiceConnectorEmergencyCallingConfiguration
instance
Prelude.NFData
GetVoiceConnectorEmergencyCallingConfiguration
instance
Core.ToHeaders
GetVoiceConnectorEmergencyCallingConfiguration
where
toHeaders :: GetVoiceConnectorEmergencyCallingConfiguration -> ResponseHeaders
toHeaders = ResponseHeaders
-> GetVoiceConnectorEmergencyCallingConfiguration
-> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
GetVoiceConnectorEmergencyCallingConfiguration
where
toPath :: GetVoiceConnectorEmergencyCallingConfiguration -> ByteString
toPath
GetVoiceConnectorEmergencyCallingConfiguration' {Text
voiceConnectorId :: Text
$sel:voiceConnectorId:GetVoiceConnectorEmergencyCallingConfiguration' :: GetVoiceConnectorEmergencyCallingConfiguration -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/voice-connectors/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
voiceConnectorId,
ByteString
"/emergency-calling-configuration"
]
instance
Core.ToQuery
GetVoiceConnectorEmergencyCallingConfiguration
where
toQuery :: GetVoiceConnectorEmergencyCallingConfiguration -> QueryString
toQuery = QueryString
-> GetVoiceConnectorEmergencyCallingConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetVoiceConnectorEmergencyCallingConfigurationResponse = GetVoiceConnectorEmergencyCallingConfigurationResponse'
{
GetVoiceConnectorEmergencyCallingConfigurationResponse
-> Maybe EmergencyCallingConfiguration
emergencyCallingConfiguration :: Prelude.Maybe EmergencyCallingConfiguration,
GetVoiceConnectorEmergencyCallingConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetVoiceConnectorEmergencyCallingConfigurationResponse
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> Bool
(GetVoiceConnectorEmergencyCallingConfigurationResponse
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> Bool)
-> (GetVoiceConnectorEmergencyCallingConfigurationResponse
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> Bool)
-> Eq GetVoiceConnectorEmergencyCallingConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVoiceConnectorEmergencyCallingConfigurationResponse
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> Bool
$c/= :: GetVoiceConnectorEmergencyCallingConfigurationResponse
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> Bool
== :: GetVoiceConnectorEmergencyCallingConfigurationResponse
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> Bool
$c== :: GetVoiceConnectorEmergencyCallingConfigurationResponse
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> Bool
Prelude.Eq, Int
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> ShowS
[GetVoiceConnectorEmergencyCallingConfigurationResponse] -> ShowS
GetVoiceConnectorEmergencyCallingConfigurationResponse -> String
(Int
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> ShowS)
-> (GetVoiceConnectorEmergencyCallingConfigurationResponse
-> String)
-> ([GetVoiceConnectorEmergencyCallingConfigurationResponse]
-> ShowS)
-> Show GetVoiceConnectorEmergencyCallingConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetVoiceConnectorEmergencyCallingConfigurationResponse] -> ShowS
$cshowList :: [GetVoiceConnectorEmergencyCallingConfigurationResponse] -> ShowS
show :: GetVoiceConnectorEmergencyCallingConfigurationResponse -> String
$cshow :: GetVoiceConnectorEmergencyCallingConfigurationResponse -> String
showsPrec :: Int
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> ShowS
$cshowsPrec :: Int
-> GetVoiceConnectorEmergencyCallingConfigurationResponse -> ShowS
Prelude.Show, (forall x.
GetVoiceConnectorEmergencyCallingConfigurationResponse
-> Rep GetVoiceConnectorEmergencyCallingConfigurationResponse x)
-> (forall x.
Rep GetVoiceConnectorEmergencyCallingConfigurationResponse x
-> GetVoiceConnectorEmergencyCallingConfigurationResponse)
-> Generic GetVoiceConnectorEmergencyCallingConfigurationResponse
forall x.
Rep GetVoiceConnectorEmergencyCallingConfigurationResponse x
-> GetVoiceConnectorEmergencyCallingConfigurationResponse
forall x.
GetVoiceConnectorEmergencyCallingConfigurationResponse
-> Rep GetVoiceConnectorEmergencyCallingConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetVoiceConnectorEmergencyCallingConfigurationResponse x
-> GetVoiceConnectorEmergencyCallingConfigurationResponse
$cfrom :: forall x.
GetVoiceConnectorEmergencyCallingConfigurationResponse
-> Rep GetVoiceConnectorEmergencyCallingConfigurationResponse x
Prelude.Generic)
newGetVoiceConnectorEmergencyCallingConfigurationResponse ::
Prelude.Int ->
GetVoiceConnectorEmergencyCallingConfigurationResponse
newGetVoiceConnectorEmergencyCallingConfigurationResponse :: Int -> GetVoiceConnectorEmergencyCallingConfigurationResponse
newGetVoiceConnectorEmergencyCallingConfigurationResponse
Int
pHttpStatus_ =
GetVoiceConnectorEmergencyCallingConfigurationResponse' :: Maybe EmergencyCallingConfiguration
-> Int -> GetVoiceConnectorEmergencyCallingConfigurationResponse
GetVoiceConnectorEmergencyCallingConfigurationResponse'
{ $sel:emergencyCallingConfiguration:GetVoiceConnectorEmergencyCallingConfigurationResponse' :: Maybe EmergencyCallingConfiguration
emergencyCallingConfiguration =
Maybe EmergencyCallingConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetVoiceConnectorEmergencyCallingConfigurationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
getVoiceConnectorEmergencyCallingConfigurationResponse_emergencyCallingConfiguration :: Lens.Lens' GetVoiceConnectorEmergencyCallingConfigurationResponse (Prelude.Maybe EmergencyCallingConfiguration)
getVoiceConnectorEmergencyCallingConfigurationResponse_emergencyCallingConfiguration :: (Maybe EmergencyCallingConfiguration
-> f (Maybe EmergencyCallingConfiguration))
-> GetVoiceConnectorEmergencyCallingConfigurationResponse
-> f GetVoiceConnectorEmergencyCallingConfigurationResponse
getVoiceConnectorEmergencyCallingConfigurationResponse_emergencyCallingConfiguration = (GetVoiceConnectorEmergencyCallingConfigurationResponse
-> Maybe EmergencyCallingConfiguration)
-> (GetVoiceConnectorEmergencyCallingConfigurationResponse
-> Maybe EmergencyCallingConfiguration
-> GetVoiceConnectorEmergencyCallingConfigurationResponse)
-> Lens
GetVoiceConnectorEmergencyCallingConfigurationResponse
GetVoiceConnectorEmergencyCallingConfigurationResponse
(Maybe EmergencyCallingConfiguration)
(Maybe EmergencyCallingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVoiceConnectorEmergencyCallingConfigurationResponse' {Maybe EmergencyCallingConfiguration
emergencyCallingConfiguration :: Maybe EmergencyCallingConfiguration
$sel:emergencyCallingConfiguration:GetVoiceConnectorEmergencyCallingConfigurationResponse' :: GetVoiceConnectorEmergencyCallingConfigurationResponse
-> Maybe EmergencyCallingConfiguration
emergencyCallingConfiguration} -> Maybe EmergencyCallingConfiguration
emergencyCallingConfiguration) (\s :: GetVoiceConnectorEmergencyCallingConfigurationResponse
s@GetVoiceConnectorEmergencyCallingConfigurationResponse' {} Maybe EmergencyCallingConfiguration
a -> GetVoiceConnectorEmergencyCallingConfigurationResponse
s {$sel:emergencyCallingConfiguration:GetVoiceConnectorEmergencyCallingConfigurationResponse' :: Maybe EmergencyCallingConfiguration
emergencyCallingConfiguration = Maybe EmergencyCallingConfiguration
a} :: GetVoiceConnectorEmergencyCallingConfigurationResponse)
getVoiceConnectorEmergencyCallingConfigurationResponse_httpStatus :: Lens.Lens' GetVoiceConnectorEmergencyCallingConfigurationResponse Prelude.Int
getVoiceConnectorEmergencyCallingConfigurationResponse_httpStatus :: (Int -> f Int)
-> GetVoiceConnectorEmergencyCallingConfigurationResponse
-> f GetVoiceConnectorEmergencyCallingConfigurationResponse
getVoiceConnectorEmergencyCallingConfigurationResponse_httpStatus = (GetVoiceConnectorEmergencyCallingConfigurationResponse -> Int)
-> (GetVoiceConnectorEmergencyCallingConfigurationResponse
-> Int -> GetVoiceConnectorEmergencyCallingConfigurationResponse)
-> Lens
GetVoiceConnectorEmergencyCallingConfigurationResponse
GetVoiceConnectorEmergencyCallingConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVoiceConnectorEmergencyCallingConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetVoiceConnectorEmergencyCallingConfigurationResponse' :: GetVoiceConnectorEmergencyCallingConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetVoiceConnectorEmergencyCallingConfigurationResponse
s@GetVoiceConnectorEmergencyCallingConfigurationResponse' {} Int
a -> GetVoiceConnectorEmergencyCallingConfigurationResponse
s {$sel:httpStatus:GetVoiceConnectorEmergencyCallingConfigurationResponse' :: Int
httpStatus = Int
a} :: GetVoiceConnectorEmergencyCallingConfigurationResponse)
instance
Prelude.NFData
GetVoiceConnectorEmergencyCallingConfigurationResponse