{-# 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.GetVoiceConnectorStreamingConfiguration
(
GetVoiceConnectorStreamingConfiguration (..),
newGetVoiceConnectorStreamingConfiguration,
getVoiceConnectorStreamingConfiguration_voiceConnectorId,
GetVoiceConnectorStreamingConfigurationResponse (..),
newGetVoiceConnectorStreamingConfigurationResponse,
getVoiceConnectorStreamingConfigurationResponse_streamingConfiguration,
getVoiceConnectorStreamingConfigurationResponse_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 GetVoiceConnectorStreamingConfiguration = GetVoiceConnectorStreamingConfiguration'
{
GetVoiceConnectorStreamingConfiguration -> Text
voiceConnectorId :: Prelude.Text
}
deriving (GetVoiceConnectorStreamingConfiguration
-> GetVoiceConnectorStreamingConfiguration -> Bool
(GetVoiceConnectorStreamingConfiguration
-> GetVoiceConnectorStreamingConfiguration -> Bool)
-> (GetVoiceConnectorStreamingConfiguration
-> GetVoiceConnectorStreamingConfiguration -> Bool)
-> Eq GetVoiceConnectorStreamingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVoiceConnectorStreamingConfiguration
-> GetVoiceConnectorStreamingConfiguration -> Bool
$c/= :: GetVoiceConnectorStreamingConfiguration
-> GetVoiceConnectorStreamingConfiguration -> Bool
== :: GetVoiceConnectorStreamingConfiguration
-> GetVoiceConnectorStreamingConfiguration -> Bool
$c== :: GetVoiceConnectorStreamingConfiguration
-> GetVoiceConnectorStreamingConfiguration -> Bool
Prelude.Eq, ReadPrec [GetVoiceConnectorStreamingConfiguration]
ReadPrec GetVoiceConnectorStreamingConfiguration
Int -> ReadS GetVoiceConnectorStreamingConfiguration
ReadS [GetVoiceConnectorStreamingConfiguration]
(Int -> ReadS GetVoiceConnectorStreamingConfiguration)
-> ReadS [GetVoiceConnectorStreamingConfiguration]
-> ReadPrec GetVoiceConnectorStreamingConfiguration
-> ReadPrec [GetVoiceConnectorStreamingConfiguration]
-> Read GetVoiceConnectorStreamingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetVoiceConnectorStreamingConfiguration]
$creadListPrec :: ReadPrec [GetVoiceConnectorStreamingConfiguration]
readPrec :: ReadPrec GetVoiceConnectorStreamingConfiguration
$creadPrec :: ReadPrec GetVoiceConnectorStreamingConfiguration
readList :: ReadS [GetVoiceConnectorStreamingConfiguration]
$creadList :: ReadS [GetVoiceConnectorStreamingConfiguration]
readsPrec :: Int -> ReadS GetVoiceConnectorStreamingConfiguration
$creadsPrec :: Int -> ReadS GetVoiceConnectorStreamingConfiguration
Prelude.Read, Int -> GetVoiceConnectorStreamingConfiguration -> ShowS
[GetVoiceConnectorStreamingConfiguration] -> ShowS
GetVoiceConnectorStreamingConfiguration -> String
(Int -> GetVoiceConnectorStreamingConfiguration -> ShowS)
-> (GetVoiceConnectorStreamingConfiguration -> String)
-> ([GetVoiceConnectorStreamingConfiguration] -> ShowS)
-> Show GetVoiceConnectorStreamingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetVoiceConnectorStreamingConfiguration] -> ShowS
$cshowList :: [GetVoiceConnectorStreamingConfiguration] -> ShowS
show :: GetVoiceConnectorStreamingConfiguration -> String
$cshow :: GetVoiceConnectorStreamingConfiguration -> String
showsPrec :: Int -> GetVoiceConnectorStreamingConfiguration -> ShowS
$cshowsPrec :: Int -> GetVoiceConnectorStreamingConfiguration -> ShowS
Prelude.Show, (forall x.
GetVoiceConnectorStreamingConfiguration
-> Rep GetVoiceConnectorStreamingConfiguration x)
-> (forall x.
Rep GetVoiceConnectorStreamingConfiguration x
-> GetVoiceConnectorStreamingConfiguration)
-> Generic GetVoiceConnectorStreamingConfiguration
forall x.
Rep GetVoiceConnectorStreamingConfiguration x
-> GetVoiceConnectorStreamingConfiguration
forall x.
GetVoiceConnectorStreamingConfiguration
-> Rep GetVoiceConnectorStreamingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetVoiceConnectorStreamingConfiguration x
-> GetVoiceConnectorStreamingConfiguration
$cfrom :: forall x.
GetVoiceConnectorStreamingConfiguration
-> Rep GetVoiceConnectorStreamingConfiguration x
Prelude.Generic)
newGetVoiceConnectorStreamingConfiguration ::
Prelude.Text ->
GetVoiceConnectorStreamingConfiguration
newGetVoiceConnectorStreamingConfiguration :: Text -> GetVoiceConnectorStreamingConfiguration
newGetVoiceConnectorStreamingConfiguration
Text
pVoiceConnectorId_ =
GetVoiceConnectorStreamingConfiguration' :: Text -> GetVoiceConnectorStreamingConfiguration
GetVoiceConnectorStreamingConfiguration'
{ $sel:voiceConnectorId:GetVoiceConnectorStreamingConfiguration' :: Text
voiceConnectorId =
Text
pVoiceConnectorId_
}
getVoiceConnectorStreamingConfiguration_voiceConnectorId :: Lens.Lens' GetVoiceConnectorStreamingConfiguration Prelude.Text
getVoiceConnectorStreamingConfiguration_voiceConnectorId :: (Text -> f Text)
-> GetVoiceConnectorStreamingConfiguration
-> f GetVoiceConnectorStreamingConfiguration
getVoiceConnectorStreamingConfiguration_voiceConnectorId = (GetVoiceConnectorStreamingConfiguration -> Text)
-> (GetVoiceConnectorStreamingConfiguration
-> Text -> GetVoiceConnectorStreamingConfiguration)
-> Lens
GetVoiceConnectorStreamingConfiguration
GetVoiceConnectorStreamingConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVoiceConnectorStreamingConfiguration' {Text
voiceConnectorId :: Text
$sel:voiceConnectorId:GetVoiceConnectorStreamingConfiguration' :: GetVoiceConnectorStreamingConfiguration -> Text
voiceConnectorId} -> Text
voiceConnectorId) (\s :: GetVoiceConnectorStreamingConfiguration
s@GetVoiceConnectorStreamingConfiguration' {} Text
a -> GetVoiceConnectorStreamingConfiguration
s {$sel:voiceConnectorId:GetVoiceConnectorStreamingConfiguration' :: Text
voiceConnectorId = Text
a} :: GetVoiceConnectorStreamingConfiguration)
instance
Core.AWSRequest
GetVoiceConnectorStreamingConfiguration
where
type
AWSResponse
GetVoiceConnectorStreamingConfiguration =
GetVoiceConnectorStreamingConfigurationResponse
request :: GetVoiceConnectorStreamingConfiguration
-> Request GetVoiceConnectorStreamingConfiguration
request = Service
-> GetVoiceConnectorStreamingConfiguration
-> Request GetVoiceConnectorStreamingConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetVoiceConnectorStreamingConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse GetVoiceConnectorStreamingConfiguration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse GetVoiceConnectorStreamingConfiguration))
-> Logger
-> Service
-> Proxy GetVoiceConnectorStreamingConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse GetVoiceConnectorStreamingConfiguration)))
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 StreamingConfiguration
-> Int -> GetVoiceConnectorStreamingConfigurationResponse
GetVoiceConnectorStreamingConfigurationResponse'
(Maybe StreamingConfiguration
-> Int -> GetVoiceConnectorStreamingConfigurationResponse)
-> Either String (Maybe StreamingConfiguration)
-> Either
String (Int -> GetVoiceConnectorStreamingConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe StreamingConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StreamingConfiguration")
Either
String (Int -> GetVoiceConnectorStreamingConfigurationResponse)
-> Either String Int
-> Either String GetVoiceConnectorStreamingConfigurationResponse
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
GetVoiceConnectorStreamingConfiguration
instance
Prelude.NFData
GetVoiceConnectorStreamingConfiguration
instance
Core.ToHeaders
GetVoiceConnectorStreamingConfiguration
where
toHeaders :: GetVoiceConnectorStreamingConfiguration -> ResponseHeaders
toHeaders = ResponseHeaders
-> GetVoiceConnectorStreamingConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
GetVoiceConnectorStreamingConfiguration
where
toPath :: GetVoiceConnectorStreamingConfiguration -> ByteString
toPath GetVoiceConnectorStreamingConfiguration' {Text
voiceConnectorId :: Text
$sel:voiceConnectorId:GetVoiceConnectorStreamingConfiguration' :: GetVoiceConnectorStreamingConfiguration -> 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
"/streaming-configuration"
]
instance
Core.ToQuery
GetVoiceConnectorStreamingConfiguration
where
toQuery :: GetVoiceConnectorStreamingConfiguration -> QueryString
toQuery = QueryString
-> GetVoiceConnectorStreamingConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetVoiceConnectorStreamingConfigurationResponse = GetVoiceConnectorStreamingConfigurationResponse'
{
GetVoiceConnectorStreamingConfigurationResponse
-> Maybe StreamingConfiguration
streamingConfiguration :: Prelude.Maybe StreamingConfiguration,
GetVoiceConnectorStreamingConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetVoiceConnectorStreamingConfigurationResponse
-> GetVoiceConnectorStreamingConfigurationResponse -> Bool
(GetVoiceConnectorStreamingConfigurationResponse
-> GetVoiceConnectorStreamingConfigurationResponse -> Bool)
-> (GetVoiceConnectorStreamingConfigurationResponse
-> GetVoiceConnectorStreamingConfigurationResponse -> Bool)
-> Eq GetVoiceConnectorStreamingConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVoiceConnectorStreamingConfigurationResponse
-> GetVoiceConnectorStreamingConfigurationResponse -> Bool
$c/= :: GetVoiceConnectorStreamingConfigurationResponse
-> GetVoiceConnectorStreamingConfigurationResponse -> Bool
== :: GetVoiceConnectorStreamingConfigurationResponse
-> GetVoiceConnectorStreamingConfigurationResponse -> Bool
$c== :: GetVoiceConnectorStreamingConfigurationResponse
-> GetVoiceConnectorStreamingConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetVoiceConnectorStreamingConfigurationResponse]
ReadPrec GetVoiceConnectorStreamingConfigurationResponse
Int -> ReadS GetVoiceConnectorStreamingConfigurationResponse
ReadS [GetVoiceConnectorStreamingConfigurationResponse]
(Int -> ReadS GetVoiceConnectorStreamingConfigurationResponse)
-> ReadS [GetVoiceConnectorStreamingConfigurationResponse]
-> ReadPrec GetVoiceConnectorStreamingConfigurationResponse
-> ReadPrec [GetVoiceConnectorStreamingConfigurationResponse]
-> Read GetVoiceConnectorStreamingConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetVoiceConnectorStreamingConfigurationResponse]
$creadListPrec :: ReadPrec [GetVoiceConnectorStreamingConfigurationResponse]
readPrec :: ReadPrec GetVoiceConnectorStreamingConfigurationResponse
$creadPrec :: ReadPrec GetVoiceConnectorStreamingConfigurationResponse
readList :: ReadS [GetVoiceConnectorStreamingConfigurationResponse]
$creadList :: ReadS [GetVoiceConnectorStreamingConfigurationResponse]
readsPrec :: Int -> ReadS GetVoiceConnectorStreamingConfigurationResponse
$creadsPrec :: Int -> ReadS GetVoiceConnectorStreamingConfigurationResponse
Prelude.Read, Int -> GetVoiceConnectorStreamingConfigurationResponse -> ShowS
[GetVoiceConnectorStreamingConfigurationResponse] -> ShowS
GetVoiceConnectorStreamingConfigurationResponse -> String
(Int -> GetVoiceConnectorStreamingConfigurationResponse -> ShowS)
-> (GetVoiceConnectorStreamingConfigurationResponse -> String)
-> ([GetVoiceConnectorStreamingConfigurationResponse] -> ShowS)
-> Show GetVoiceConnectorStreamingConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetVoiceConnectorStreamingConfigurationResponse] -> ShowS
$cshowList :: [GetVoiceConnectorStreamingConfigurationResponse] -> ShowS
show :: GetVoiceConnectorStreamingConfigurationResponse -> String
$cshow :: GetVoiceConnectorStreamingConfigurationResponse -> String
showsPrec :: Int -> GetVoiceConnectorStreamingConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetVoiceConnectorStreamingConfigurationResponse -> ShowS
Prelude.Show, (forall x.
GetVoiceConnectorStreamingConfigurationResponse
-> Rep GetVoiceConnectorStreamingConfigurationResponse x)
-> (forall x.
Rep GetVoiceConnectorStreamingConfigurationResponse x
-> GetVoiceConnectorStreamingConfigurationResponse)
-> Generic GetVoiceConnectorStreamingConfigurationResponse
forall x.
Rep GetVoiceConnectorStreamingConfigurationResponse x
-> GetVoiceConnectorStreamingConfigurationResponse
forall x.
GetVoiceConnectorStreamingConfigurationResponse
-> Rep GetVoiceConnectorStreamingConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetVoiceConnectorStreamingConfigurationResponse x
-> GetVoiceConnectorStreamingConfigurationResponse
$cfrom :: forall x.
GetVoiceConnectorStreamingConfigurationResponse
-> Rep GetVoiceConnectorStreamingConfigurationResponse x
Prelude.Generic)
newGetVoiceConnectorStreamingConfigurationResponse ::
Prelude.Int ->
GetVoiceConnectorStreamingConfigurationResponse
newGetVoiceConnectorStreamingConfigurationResponse :: Int -> GetVoiceConnectorStreamingConfigurationResponse
newGetVoiceConnectorStreamingConfigurationResponse
Int
pHttpStatus_ =
GetVoiceConnectorStreamingConfigurationResponse' :: Maybe StreamingConfiguration
-> Int -> GetVoiceConnectorStreamingConfigurationResponse
GetVoiceConnectorStreamingConfigurationResponse'
{ $sel:streamingConfiguration:GetVoiceConnectorStreamingConfigurationResponse' :: Maybe StreamingConfiguration
streamingConfiguration =
Maybe StreamingConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetVoiceConnectorStreamingConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getVoiceConnectorStreamingConfigurationResponse_streamingConfiguration :: Lens.Lens' GetVoiceConnectorStreamingConfigurationResponse (Prelude.Maybe StreamingConfiguration)
getVoiceConnectorStreamingConfigurationResponse_streamingConfiguration :: (Maybe StreamingConfiguration -> f (Maybe StreamingConfiguration))
-> GetVoiceConnectorStreamingConfigurationResponse
-> f GetVoiceConnectorStreamingConfigurationResponse
getVoiceConnectorStreamingConfigurationResponse_streamingConfiguration = (GetVoiceConnectorStreamingConfigurationResponse
-> Maybe StreamingConfiguration)
-> (GetVoiceConnectorStreamingConfigurationResponse
-> Maybe StreamingConfiguration
-> GetVoiceConnectorStreamingConfigurationResponse)
-> Lens
GetVoiceConnectorStreamingConfigurationResponse
GetVoiceConnectorStreamingConfigurationResponse
(Maybe StreamingConfiguration)
(Maybe StreamingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVoiceConnectorStreamingConfigurationResponse' {Maybe StreamingConfiguration
streamingConfiguration :: Maybe StreamingConfiguration
$sel:streamingConfiguration:GetVoiceConnectorStreamingConfigurationResponse' :: GetVoiceConnectorStreamingConfigurationResponse
-> Maybe StreamingConfiguration
streamingConfiguration} -> Maybe StreamingConfiguration
streamingConfiguration) (\s :: GetVoiceConnectorStreamingConfigurationResponse
s@GetVoiceConnectorStreamingConfigurationResponse' {} Maybe StreamingConfiguration
a -> GetVoiceConnectorStreamingConfigurationResponse
s {$sel:streamingConfiguration:GetVoiceConnectorStreamingConfigurationResponse' :: Maybe StreamingConfiguration
streamingConfiguration = Maybe StreamingConfiguration
a} :: GetVoiceConnectorStreamingConfigurationResponse)
getVoiceConnectorStreamingConfigurationResponse_httpStatus :: Lens.Lens' GetVoiceConnectorStreamingConfigurationResponse Prelude.Int
getVoiceConnectorStreamingConfigurationResponse_httpStatus :: (Int -> f Int)
-> GetVoiceConnectorStreamingConfigurationResponse
-> f GetVoiceConnectorStreamingConfigurationResponse
getVoiceConnectorStreamingConfigurationResponse_httpStatus = (GetVoiceConnectorStreamingConfigurationResponse -> Int)
-> (GetVoiceConnectorStreamingConfigurationResponse
-> Int -> GetVoiceConnectorStreamingConfigurationResponse)
-> Lens
GetVoiceConnectorStreamingConfigurationResponse
GetVoiceConnectorStreamingConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVoiceConnectorStreamingConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetVoiceConnectorStreamingConfigurationResponse' :: GetVoiceConnectorStreamingConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetVoiceConnectorStreamingConfigurationResponse
s@GetVoiceConnectorStreamingConfigurationResponse' {} Int
a -> GetVoiceConnectorStreamingConfigurationResponse
s {$sel:httpStatus:GetVoiceConnectorStreamingConfigurationResponse' :: Int
httpStatus = Int
a} :: GetVoiceConnectorStreamingConfigurationResponse)
instance
Prelude.NFData
GetVoiceConnectorStreamingConfigurationResponse