{-# 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.AlexaBusiness.GetConferencePreference
(
GetConferencePreference (..),
newGetConferencePreference,
GetConferencePreferenceResponse (..),
newGetConferencePreferenceResponse,
getConferencePreferenceResponse_preference,
getConferencePreferenceResponse_httpStatus,
)
where
import Amazonka.AlexaBusiness.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 GetConferencePreference = GetConferencePreference'
{
}
deriving (GetConferencePreference -> GetConferencePreference -> Bool
(GetConferencePreference -> GetConferencePreference -> Bool)
-> (GetConferencePreference -> GetConferencePreference -> Bool)
-> Eq GetConferencePreference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetConferencePreference -> GetConferencePreference -> Bool
$c/= :: GetConferencePreference -> GetConferencePreference -> Bool
== :: GetConferencePreference -> GetConferencePreference -> Bool
$c== :: GetConferencePreference -> GetConferencePreference -> Bool
Prelude.Eq, ReadPrec [GetConferencePreference]
ReadPrec GetConferencePreference
Int -> ReadS GetConferencePreference
ReadS [GetConferencePreference]
(Int -> ReadS GetConferencePreference)
-> ReadS [GetConferencePreference]
-> ReadPrec GetConferencePreference
-> ReadPrec [GetConferencePreference]
-> Read GetConferencePreference
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetConferencePreference]
$creadListPrec :: ReadPrec [GetConferencePreference]
readPrec :: ReadPrec GetConferencePreference
$creadPrec :: ReadPrec GetConferencePreference
readList :: ReadS [GetConferencePreference]
$creadList :: ReadS [GetConferencePreference]
readsPrec :: Int -> ReadS GetConferencePreference
$creadsPrec :: Int -> ReadS GetConferencePreference
Prelude.Read, Int -> GetConferencePreference -> ShowS
[GetConferencePreference] -> ShowS
GetConferencePreference -> String
(Int -> GetConferencePreference -> ShowS)
-> (GetConferencePreference -> String)
-> ([GetConferencePreference] -> ShowS)
-> Show GetConferencePreference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetConferencePreference] -> ShowS
$cshowList :: [GetConferencePreference] -> ShowS
show :: GetConferencePreference -> String
$cshow :: GetConferencePreference -> String
showsPrec :: Int -> GetConferencePreference -> ShowS
$cshowsPrec :: Int -> GetConferencePreference -> ShowS
Prelude.Show, (forall x.
GetConferencePreference -> Rep GetConferencePreference x)
-> (forall x.
Rep GetConferencePreference x -> GetConferencePreference)
-> Generic GetConferencePreference
forall x. Rep GetConferencePreference x -> GetConferencePreference
forall x. GetConferencePreference -> Rep GetConferencePreference x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetConferencePreference x -> GetConferencePreference
$cfrom :: forall x. GetConferencePreference -> Rep GetConferencePreference x
Prelude.Generic)
newGetConferencePreference ::
GetConferencePreference
newGetConferencePreference :: GetConferencePreference
newGetConferencePreference = GetConferencePreference
GetConferencePreference'
instance Core.AWSRequest GetConferencePreference where
type
AWSResponse GetConferencePreference =
GetConferencePreferenceResponse
request :: GetConferencePreference -> Request GetConferencePreference
request = Service
-> GetConferencePreference -> Request GetConferencePreference
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetConferencePreference
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetConferencePreference)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetConferencePreference))
-> Logger
-> Service
-> Proxy GetConferencePreference
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetConferencePreference)))
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 ConferencePreference
-> Int -> GetConferencePreferenceResponse
GetConferencePreferenceResponse'
(Maybe ConferencePreference
-> Int -> GetConferencePreferenceResponse)
-> Either String (Maybe ConferencePreference)
-> Either String (Int -> GetConferencePreferenceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Key -> Either String (Maybe ConferencePreference)
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"Preference")
Either String (Int -> GetConferencePreferenceResponse)
-> Either String Int
-> Either String GetConferencePreferenceResponse
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 GetConferencePreference
instance Prelude.NFData GetConferencePreference
instance Core.ToHeaders GetConferencePreference where
toHeaders :: GetConferencePreference -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetConferencePreference -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AlexaForBusiness.GetConferencePreference" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON GetConferencePreference where
toJSON :: GetConferencePreference -> Value
toJSON = Value -> GetConferencePreference -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance Core.ToPath GetConferencePreference where
toPath :: GetConferencePreference -> ByteString
toPath = ByteString -> GetConferencePreference -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetConferencePreference where
toQuery :: GetConferencePreference -> QueryString
toQuery = QueryString -> GetConferencePreference -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetConferencePreferenceResponse = GetConferencePreferenceResponse'
{
GetConferencePreferenceResponse -> Maybe ConferencePreference
preference :: Prelude.Maybe ConferencePreference,
GetConferencePreferenceResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetConferencePreferenceResponse
-> GetConferencePreferenceResponse -> Bool
(GetConferencePreferenceResponse
-> GetConferencePreferenceResponse -> Bool)
-> (GetConferencePreferenceResponse
-> GetConferencePreferenceResponse -> Bool)
-> Eq GetConferencePreferenceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetConferencePreferenceResponse
-> GetConferencePreferenceResponse -> Bool
$c/= :: GetConferencePreferenceResponse
-> GetConferencePreferenceResponse -> Bool
== :: GetConferencePreferenceResponse
-> GetConferencePreferenceResponse -> Bool
$c== :: GetConferencePreferenceResponse
-> GetConferencePreferenceResponse -> Bool
Prelude.Eq, ReadPrec [GetConferencePreferenceResponse]
ReadPrec GetConferencePreferenceResponse
Int -> ReadS GetConferencePreferenceResponse
ReadS [GetConferencePreferenceResponse]
(Int -> ReadS GetConferencePreferenceResponse)
-> ReadS [GetConferencePreferenceResponse]
-> ReadPrec GetConferencePreferenceResponse
-> ReadPrec [GetConferencePreferenceResponse]
-> Read GetConferencePreferenceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetConferencePreferenceResponse]
$creadListPrec :: ReadPrec [GetConferencePreferenceResponse]
readPrec :: ReadPrec GetConferencePreferenceResponse
$creadPrec :: ReadPrec GetConferencePreferenceResponse
readList :: ReadS [GetConferencePreferenceResponse]
$creadList :: ReadS [GetConferencePreferenceResponse]
readsPrec :: Int -> ReadS GetConferencePreferenceResponse
$creadsPrec :: Int -> ReadS GetConferencePreferenceResponse
Prelude.Read, Int -> GetConferencePreferenceResponse -> ShowS
[GetConferencePreferenceResponse] -> ShowS
GetConferencePreferenceResponse -> String
(Int -> GetConferencePreferenceResponse -> ShowS)
-> (GetConferencePreferenceResponse -> String)
-> ([GetConferencePreferenceResponse] -> ShowS)
-> Show GetConferencePreferenceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetConferencePreferenceResponse] -> ShowS
$cshowList :: [GetConferencePreferenceResponse] -> ShowS
show :: GetConferencePreferenceResponse -> String
$cshow :: GetConferencePreferenceResponse -> String
showsPrec :: Int -> GetConferencePreferenceResponse -> ShowS
$cshowsPrec :: Int -> GetConferencePreferenceResponse -> ShowS
Prelude.Show, (forall x.
GetConferencePreferenceResponse
-> Rep GetConferencePreferenceResponse x)
-> (forall x.
Rep GetConferencePreferenceResponse x
-> GetConferencePreferenceResponse)
-> Generic GetConferencePreferenceResponse
forall x.
Rep GetConferencePreferenceResponse x
-> GetConferencePreferenceResponse
forall x.
GetConferencePreferenceResponse
-> Rep GetConferencePreferenceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetConferencePreferenceResponse x
-> GetConferencePreferenceResponse
$cfrom :: forall x.
GetConferencePreferenceResponse
-> Rep GetConferencePreferenceResponse x
Prelude.Generic)
newGetConferencePreferenceResponse ::
Prelude.Int ->
GetConferencePreferenceResponse
newGetConferencePreferenceResponse :: Int -> GetConferencePreferenceResponse
newGetConferencePreferenceResponse Int
pHttpStatus_ =
GetConferencePreferenceResponse' :: Maybe ConferencePreference
-> Int -> GetConferencePreferenceResponse
GetConferencePreferenceResponse'
{ $sel:preference:GetConferencePreferenceResponse' :: Maybe ConferencePreference
preference =
Maybe ConferencePreference
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetConferencePreferenceResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getConferencePreferenceResponse_preference :: Lens.Lens' GetConferencePreferenceResponse (Prelude.Maybe ConferencePreference)
getConferencePreferenceResponse_preference :: (Maybe ConferencePreference -> f (Maybe ConferencePreference))
-> GetConferencePreferenceResponse
-> f GetConferencePreferenceResponse
getConferencePreferenceResponse_preference = (GetConferencePreferenceResponse -> Maybe ConferencePreference)
-> (GetConferencePreferenceResponse
-> Maybe ConferencePreference -> GetConferencePreferenceResponse)
-> Lens
GetConferencePreferenceResponse
GetConferencePreferenceResponse
(Maybe ConferencePreference)
(Maybe ConferencePreference)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConferencePreferenceResponse' {Maybe ConferencePreference
preference :: Maybe ConferencePreference
$sel:preference:GetConferencePreferenceResponse' :: GetConferencePreferenceResponse -> Maybe ConferencePreference
preference} -> Maybe ConferencePreference
preference) (\s :: GetConferencePreferenceResponse
s@GetConferencePreferenceResponse' {} Maybe ConferencePreference
a -> GetConferencePreferenceResponse
s {$sel:preference:GetConferencePreferenceResponse' :: Maybe ConferencePreference
preference = Maybe ConferencePreference
a} :: GetConferencePreferenceResponse)
getConferencePreferenceResponse_httpStatus :: Lens.Lens' GetConferencePreferenceResponse Prelude.Int
getConferencePreferenceResponse_httpStatus :: (Int -> f Int)
-> GetConferencePreferenceResponse
-> f GetConferencePreferenceResponse
getConferencePreferenceResponse_httpStatus = (GetConferencePreferenceResponse -> Int)
-> (GetConferencePreferenceResponse
-> Int -> GetConferencePreferenceResponse)
-> Lens
GetConferencePreferenceResponse
GetConferencePreferenceResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConferencePreferenceResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetConferencePreferenceResponse' :: GetConferencePreferenceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetConferencePreferenceResponse
s@GetConferencePreferenceResponse' {} Int
a -> GetConferencePreferenceResponse
s {$sel:httpStatus:GetConferencePreferenceResponse' :: Int
httpStatus = Int
a} :: GetConferencePreferenceResponse)
instance
Prelude.NFData
GetConferencePreferenceResponse