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