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