{-# 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.PutConferencePreference
(
PutConferencePreference (..),
newPutConferencePreference,
putConferencePreference_conferencePreference,
PutConferencePreferenceResponse (..),
newPutConferencePreferenceResponse,
putConferencePreferenceResponse_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 PutConferencePreference = PutConferencePreference'
{
PutConferencePreference -> ConferencePreference
conferencePreference :: ConferencePreference
}
deriving (PutConferencePreference -> PutConferencePreference -> Bool
(PutConferencePreference -> PutConferencePreference -> Bool)
-> (PutConferencePreference -> PutConferencePreference -> Bool)
-> Eq PutConferencePreference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutConferencePreference -> PutConferencePreference -> Bool
$c/= :: PutConferencePreference -> PutConferencePreference -> Bool
== :: PutConferencePreference -> PutConferencePreference -> Bool
$c== :: PutConferencePreference -> PutConferencePreference -> Bool
Prelude.Eq, ReadPrec [PutConferencePreference]
ReadPrec PutConferencePreference
Int -> ReadS PutConferencePreference
ReadS [PutConferencePreference]
(Int -> ReadS PutConferencePreference)
-> ReadS [PutConferencePreference]
-> ReadPrec PutConferencePreference
-> ReadPrec [PutConferencePreference]
-> Read PutConferencePreference
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutConferencePreference]
$creadListPrec :: ReadPrec [PutConferencePreference]
readPrec :: ReadPrec PutConferencePreference
$creadPrec :: ReadPrec PutConferencePreference
readList :: ReadS [PutConferencePreference]
$creadList :: ReadS [PutConferencePreference]
readsPrec :: Int -> ReadS PutConferencePreference
$creadsPrec :: Int -> ReadS PutConferencePreference
Prelude.Read, Int -> PutConferencePreference -> ShowS
[PutConferencePreference] -> ShowS
PutConferencePreference -> String
(Int -> PutConferencePreference -> ShowS)
-> (PutConferencePreference -> String)
-> ([PutConferencePreference] -> ShowS)
-> Show PutConferencePreference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutConferencePreference] -> ShowS
$cshowList :: [PutConferencePreference] -> ShowS
show :: PutConferencePreference -> String
$cshow :: PutConferencePreference -> String
showsPrec :: Int -> PutConferencePreference -> ShowS
$cshowsPrec :: Int -> PutConferencePreference -> ShowS
Prelude.Show, (forall x.
PutConferencePreference -> Rep PutConferencePreference x)
-> (forall x.
Rep PutConferencePreference x -> PutConferencePreference)
-> Generic PutConferencePreference
forall x. Rep PutConferencePreference x -> PutConferencePreference
forall x. PutConferencePreference -> Rep PutConferencePreference x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutConferencePreference x -> PutConferencePreference
$cfrom :: forall x. PutConferencePreference -> Rep PutConferencePreference x
Prelude.Generic)
newPutConferencePreference ::
ConferencePreference ->
PutConferencePreference
newPutConferencePreference :: ConferencePreference -> PutConferencePreference
newPutConferencePreference ConferencePreference
pConferencePreference_ =
PutConferencePreference' :: ConferencePreference -> PutConferencePreference
PutConferencePreference'
{ $sel:conferencePreference:PutConferencePreference' :: ConferencePreference
conferencePreference =
ConferencePreference
pConferencePreference_
}
putConferencePreference_conferencePreference :: Lens.Lens' PutConferencePreference ConferencePreference
putConferencePreference_conferencePreference :: (ConferencePreference -> f ConferencePreference)
-> PutConferencePreference -> f PutConferencePreference
putConferencePreference_conferencePreference = (PutConferencePreference -> ConferencePreference)
-> (PutConferencePreference
-> ConferencePreference -> PutConferencePreference)
-> Lens
PutConferencePreference
PutConferencePreference
ConferencePreference
ConferencePreference
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutConferencePreference' {ConferencePreference
conferencePreference :: ConferencePreference
$sel:conferencePreference:PutConferencePreference' :: PutConferencePreference -> ConferencePreference
conferencePreference} -> ConferencePreference
conferencePreference) (\s :: PutConferencePreference
s@PutConferencePreference' {} ConferencePreference
a -> PutConferencePreference
s {$sel:conferencePreference:PutConferencePreference' :: ConferencePreference
conferencePreference = ConferencePreference
a} :: PutConferencePreference)
instance Core.AWSRequest PutConferencePreference where
type
AWSResponse PutConferencePreference =
PutConferencePreferenceResponse
request :: PutConferencePreference -> Request PutConferencePreference
request = Service
-> PutConferencePreference -> Request PutConferencePreference
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PutConferencePreference
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse PutConferencePreference)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse PutConferencePreference))
-> Logger
-> Service
-> Proxy PutConferencePreference
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse PutConferencePreference)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> PutConferencePreferenceResponse
PutConferencePreferenceResponse'
(Int -> PutConferencePreferenceResponse)
-> Either String Int
-> Either String PutConferencePreferenceResponse
forall (f :: * -> *) a b. Functor 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 PutConferencePreference
instance Prelude.NFData PutConferencePreference
instance Core.ToHeaders PutConferencePreference where
toHeaders :: PutConferencePreference -> ResponseHeaders
toHeaders =
ResponseHeaders -> PutConferencePreference -> 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.PutConferencePreference" ::
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 PutConferencePreference where
toJSON :: PutConferencePreference -> Value
toJSON PutConferencePreference' {ConferencePreference
conferencePreference :: ConferencePreference
$sel:conferencePreference:PutConferencePreference' :: PutConferencePreference -> ConferencePreference
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ConferencePreference"
Text -> ConferencePreference -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ConferencePreference
conferencePreference
)
]
)
instance Core.ToPath PutConferencePreference where
toPath :: PutConferencePreference -> ByteString
toPath = ByteString -> PutConferencePreference -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery PutConferencePreference where
toQuery :: PutConferencePreference -> QueryString
toQuery = QueryString -> PutConferencePreference -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data PutConferencePreferenceResponse = PutConferencePreferenceResponse'
{
PutConferencePreferenceResponse -> Int
httpStatus :: Prelude.Int
}
deriving (PutConferencePreferenceResponse
-> PutConferencePreferenceResponse -> Bool
(PutConferencePreferenceResponse
-> PutConferencePreferenceResponse -> Bool)
-> (PutConferencePreferenceResponse
-> PutConferencePreferenceResponse -> Bool)
-> Eq PutConferencePreferenceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutConferencePreferenceResponse
-> PutConferencePreferenceResponse -> Bool
$c/= :: PutConferencePreferenceResponse
-> PutConferencePreferenceResponse -> Bool
== :: PutConferencePreferenceResponse
-> PutConferencePreferenceResponse -> Bool
$c== :: PutConferencePreferenceResponse
-> PutConferencePreferenceResponse -> Bool
Prelude.Eq, ReadPrec [PutConferencePreferenceResponse]
ReadPrec PutConferencePreferenceResponse
Int -> ReadS PutConferencePreferenceResponse
ReadS [PutConferencePreferenceResponse]
(Int -> ReadS PutConferencePreferenceResponse)
-> ReadS [PutConferencePreferenceResponse]
-> ReadPrec PutConferencePreferenceResponse
-> ReadPrec [PutConferencePreferenceResponse]
-> Read PutConferencePreferenceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutConferencePreferenceResponse]
$creadListPrec :: ReadPrec [PutConferencePreferenceResponse]
readPrec :: ReadPrec PutConferencePreferenceResponse
$creadPrec :: ReadPrec PutConferencePreferenceResponse
readList :: ReadS [PutConferencePreferenceResponse]
$creadList :: ReadS [PutConferencePreferenceResponse]
readsPrec :: Int -> ReadS PutConferencePreferenceResponse
$creadsPrec :: Int -> ReadS PutConferencePreferenceResponse
Prelude.Read, Int -> PutConferencePreferenceResponse -> ShowS
[PutConferencePreferenceResponse] -> ShowS
PutConferencePreferenceResponse -> String
(Int -> PutConferencePreferenceResponse -> ShowS)
-> (PutConferencePreferenceResponse -> String)
-> ([PutConferencePreferenceResponse] -> ShowS)
-> Show PutConferencePreferenceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutConferencePreferenceResponse] -> ShowS
$cshowList :: [PutConferencePreferenceResponse] -> ShowS
show :: PutConferencePreferenceResponse -> String
$cshow :: PutConferencePreferenceResponse -> String
showsPrec :: Int -> PutConferencePreferenceResponse -> ShowS
$cshowsPrec :: Int -> PutConferencePreferenceResponse -> ShowS
Prelude.Show, (forall x.
PutConferencePreferenceResponse
-> Rep PutConferencePreferenceResponse x)
-> (forall x.
Rep PutConferencePreferenceResponse x
-> PutConferencePreferenceResponse)
-> Generic PutConferencePreferenceResponse
forall x.
Rep PutConferencePreferenceResponse x
-> PutConferencePreferenceResponse
forall x.
PutConferencePreferenceResponse
-> Rep PutConferencePreferenceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutConferencePreferenceResponse x
-> PutConferencePreferenceResponse
$cfrom :: forall x.
PutConferencePreferenceResponse
-> Rep PutConferencePreferenceResponse x
Prelude.Generic)
newPutConferencePreferenceResponse ::
Prelude.Int ->
PutConferencePreferenceResponse
newPutConferencePreferenceResponse :: Int -> PutConferencePreferenceResponse
newPutConferencePreferenceResponse Int
pHttpStatus_ =
PutConferencePreferenceResponse' :: Int -> PutConferencePreferenceResponse
PutConferencePreferenceResponse'
{ $sel:httpStatus:PutConferencePreferenceResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
putConferencePreferenceResponse_httpStatus :: Lens.Lens' PutConferencePreferenceResponse Prelude.Int
putConferencePreferenceResponse_httpStatus :: (Int -> f Int)
-> PutConferencePreferenceResponse
-> f PutConferencePreferenceResponse
putConferencePreferenceResponse_httpStatus = (PutConferencePreferenceResponse -> Int)
-> (PutConferencePreferenceResponse
-> Int -> PutConferencePreferenceResponse)
-> Lens
PutConferencePreferenceResponse
PutConferencePreferenceResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutConferencePreferenceResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutConferencePreferenceResponse' :: PutConferencePreferenceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutConferencePreferenceResponse
s@PutConferencePreferenceResponse' {} Int
a -> PutConferencePreferenceResponse
s {$sel:httpStatus:PutConferencePreferenceResponse' :: Int
httpStatus = Int
a} :: PutConferencePreferenceResponse)
instance
Prelude.NFData
PutConferencePreferenceResponse