{-# 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.GetRoomSkillParameter
(
GetRoomSkillParameter (..),
newGetRoomSkillParameter,
getRoomSkillParameter_roomArn,
getRoomSkillParameter_skillId,
getRoomSkillParameter_parameterKey,
GetRoomSkillParameterResponse (..),
newGetRoomSkillParameterResponse,
getRoomSkillParameterResponse_roomSkillParameter,
getRoomSkillParameterResponse_httpStatus,
)
where
import Amazonka.AlexaBusiness.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetRoomSkillParameter = GetRoomSkillParameter'
{
GetRoomSkillParameter -> Maybe Text
roomArn :: Prelude.Maybe Prelude.Text,
GetRoomSkillParameter -> Text
skillId :: Prelude.Text,
GetRoomSkillParameter -> Text
parameterKey :: Prelude.Text
}
deriving (GetRoomSkillParameter -> GetRoomSkillParameter -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRoomSkillParameter -> GetRoomSkillParameter -> Bool
$c/= :: GetRoomSkillParameter -> GetRoomSkillParameter -> Bool
== :: GetRoomSkillParameter -> GetRoomSkillParameter -> Bool
$c== :: GetRoomSkillParameter -> GetRoomSkillParameter -> Bool
Prelude.Eq, ReadPrec [GetRoomSkillParameter]
ReadPrec GetRoomSkillParameter
Int -> ReadS GetRoomSkillParameter
ReadS [GetRoomSkillParameter]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRoomSkillParameter]
$creadListPrec :: ReadPrec [GetRoomSkillParameter]
readPrec :: ReadPrec GetRoomSkillParameter
$creadPrec :: ReadPrec GetRoomSkillParameter
readList :: ReadS [GetRoomSkillParameter]
$creadList :: ReadS [GetRoomSkillParameter]
readsPrec :: Int -> ReadS GetRoomSkillParameter
$creadsPrec :: Int -> ReadS GetRoomSkillParameter
Prelude.Read, Int -> GetRoomSkillParameter -> ShowS
[GetRoomSkillParameter] -> ShowS
GetRoomSkillParameter -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRoomSkillParameter] -> ShowS
$cshowList :: [GetRoomSkillParameter] -> ShowS
show :: GetRoomSkillParameter -> String
$cshow :: GetRoomSkillParameter -> String
showsPrec :: Int -> GetRoomSkillParameter -> ShowS
$cshowsPrec :: Int -> GetRoomSkillParameter -> ShowS
Prelude.Show, forall x. Rep GetRoomSkillParameter x -> GetRoomSkillParameter
forall x. GetRoomSkillParameter -> Rep GetRoomSkillParameter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRoomSkillParameter x -> GetRoomSkillParameter
$cfrom :: forall x. GetRoomSkillParameter -> Rep GetRoomSkillParameter x
Prelude.Generic)
newGetRoomSkillParameter ::
Prelude.Text ->
Prelude.Text ->
GetRoomSkillParameter
newGetRoomSkillParameter :: Text -> Text -> GetRoomSkillParameter
newGetRoomSkillParameter Text
pSkillId_ Text
pParameterKey_ =
GetRoomSkillParameter'
{ $sel:roomArn:GetRoomSkillParameter' :: Maybe Text
roomArn = forall a. Maybe a
Prelude.Nothing,
$sel:skillId:GetRoomSkillParameter' :: Text
skillId = Text
pSkillId_,
$sel:parameterKey:GetRoomSkillParameter' :: Text
parameterKey = Text
pParameterKey_
}
getRoomSkillParameter_roomArn :: Lens.Lens' GetRoomSkillParameter (Prelude.Maybe Prelude.Text)
getRoomSkillParameter_roomArn :: Lens' GetRoomSkillParameter (Maybe Text)
getRoomSkillParameter_roomArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomSkillParameter' {Maybe Text
roomArn :: Maybe Text
$sel:roomArn:GetRoomSkillParameter' :: GetRoomSkillParameter -> Maybe Text
roomArn} -> Maybe Text
roomArn) (\s :: GetRoomSkillParameter
s@GetRoomSkillParameter' {} Maybe Text
a -> GetRoomSkillParameter
s {$sel:roomArn:GetRoomSkillParameter' :: Maybe Text
roomArn = Maybe Text
a} :: GetRoomSkillParameter)
getRoomSkillParameter_skillId :: Lens.Lens' GetRoomSkillParameter Prelude.Text
getRoomSkillParameter_skillId :: Lens' GetRoomSkillParameter Text
getRoomSkillParameter_skillId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomSkillParameter' {Text
skillId :: Text
$sel:skillId:GetRoomSkillParameter' :: GetRoomSkillParameter -> Text
skillId} -> Text
skillId) (\s :: GetRoomSkillParameter
s@GetRoomSkillParameter' {} Text
a -> GetRoomSkillParameter
s {$sel:skillId:GetRoomSkillParameter' :: Text
skillId = Text
a} :: GetRoomSkillParameter)
getRoomSkillParameter_parameterKey :: Lens.Lens' GetRoomSkillParameter Prelude.Text
getRoomSkillParameter_parameterKey :: Lens' GetRoomSkillParameter Text
getRoomSkillParameter_parameterKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomSkillParameter' {Text
parameterKey :: Text
$sel:parameterKey:GetRoomSkillParameter' :: GetRoomSkillParameter -> Text
parameterKey} -> Text
parameterKey) (\s :: GetRoomSkillParameter
s@GetRoomSkillParameter' {} Text
a -> GetRoomSkillParameter
s {$sel:parameterKey:GetRoomSkillParameter' :: Text
parameterKey = Text
a} :: GetRoomSkillParameter)
instance Core.AWSRequest GetRoomSkillParameter where
type
AWSResponse GetRoomSkillParameter =
GetRoomSkillParameterResponse
request :: (Service -> Service)
-> GetRoomSkillParameter -> Request GetRoomSkillParameter
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetRoomSkillParameter
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetRoomSkillParameter)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe RoomSkillParameter -> Int -> GetRoomSkillParameterResponse
GetRoomSkillParameterResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RoomSkillParameter")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable GetRoomSkillParameter where
hashWithSalt :: Int -> GetRoomSkillParameter -> Int
hashWithSalt Int
_salt GetRoomSkillParameter' {Maybe Text
Text
parameterKey :: Text
skillId :: Text
roomArn :: Maybe Text
$sel:parameterKey:GetRoomSkillParameter' :: GetRoomSkillParameter -> Text
$sel:skillId:GetRoomSkillParameter' :: GetRoomSkillParameter -> Text
$sel:roomArn:GetRoomSkillParameter' :: GetRoomSkillParameter -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roomArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
skillId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
parameterKey
instance Prelude.NFData GetRoomSkillParameter where
rnf :: GetRoomSkillParameter -> ()
rnf GetRoomSkillParameter' {Maybe Text
Text
parameterKey :: Text
skillId :: Text
roomArn :: Maybe Text
$sel:parameterKey:GetRoomSkillParameter' :: GetRoomSkillParameter -> Text
$sel:skillId:GetRoomSkillParameter' :: GetRoomSkillParameter -> Text
$sel:roomArn:GetRoomSkillParameter' :: GetRoomSkillParameter -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roomArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
skillId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
parameterKey
instance Data.ToHeaders GetRoomSkillParameter where
toHeaders :: GetRoomSkillParameter -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AlexaForBusiness.GetRoomSkillParameter" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON GetRoomSkillParameter where
toJSON :: GetRoomSkillParameter -> Value
toJSON GetRoomSkillParameter' {Maybe Text
Text
parameterKey :: Text
skillId :: Text
roomArn :: Maybe Text
$sel:parameterKey:GetRoomSkillParameter' :: GetRoomSkillParameter -> Text
$sel:skillId:GetRoomSkillParameter' :: GetRoomSkillParameter -> Text
$sel:roomArn:GetRoomSkillParameter' :: GetRoomSkillParameter -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"RoomArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
roomArn,
forall a. a -> Maybe a
Prelude.Just (Key
"SkillId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
skillId),
forall a. a -> Maybe a
Prelude.Just (Key
"ParameterKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
parameterKey)
]
)
instance Data.ToPath GetRoomSkillParameter where
toPath :: GetRoomSkillParameter -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetRoomSkillParameter where
toQuery :: GetRoomSkillParameter -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetRoomSkillParameterResponse = GetRoomSkillParameterResponse'
{
GetRoomSkillParameterResponse -> Maybe RoomSkillParameter
roomSkillParameter :: Prelude.Maybe RoomSkillParameter,
GetRoomSkillParameterResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetRoomSkillParameterResponse
-> GetRoomSkillParameterResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRoomSkillParameterResponse
-> GetRoomSkillParameterResponse -> Bool
$c/= :: GetRoomSkillParameterResponse
-> GetRoomSkillParameterResponse -> Bool
== :: GetRoomSkillParameterResponse
-> GetRoomSkillParameterResponse -> Bool
$c== :: GetRoomSkillParameterResponse
-> GetRoomSkillParameterResponse -> Bool
Prelude.Eq, ReadPrec [GetRoomSkillParameterResponse]
ReadPrec GetRoomSkillParameterResponse
Int -> ReadS GetRoomSkillParameterResponse
ReadS [GetRoomSkillParameterResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRoomSkillParameterResponse]
$creadListPrec :: ReadPrec [GetRoomSkillParameterResponse]
readPrec :: ReadPrec GetRoomSkillParameterResponse
$creadPrec :: ReadPrec GetRoomSkillParameterResponse
readList :: ReadS [GetRoomSkillParameterResponse]
$creadList :: ReadS [GetRoomSkillParameterResponse]
readsPrec :: Int -> ReadS GetRoomSkillParameterResponse
$creadsPrec :: Int -> ReadS GetRoomSkillParameterResponse
Prelude.Read, Int -> GetRoomSkillParameterResponse -> ShowS
[GetRoomSkillParameterResponse] -> ShowS
GetRoomSkillParameterResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRoomSkillParameterResponse] -> ShowS
$cshowList :: [GetRoomSkillParameterResponse] -> ShowS
show :: GetRoomSkillParameterResponse -> String
$cshow :: GetRoomSkillParameterResponse -> String
showsPrec :: Int -> GetRoomSkillParameterResponse -> ShowS
$cshowsPrec :: Int -> GetRoomSkillParameterResponse -> ShowS
Prelude.Show, forall x.
Rep GetRoomSkillParameterResponse x
-> GetRoomSkillParameterResponse
forall x.
GetRoomSkillParameterResponse
-> Rep GetRoomSkillParameterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRoomSkillParameterResponse x
-> GetRoomSkillParameterResponse
$cfrom :: forall x.
GetRoomSkillParameterResponse
-> Rep GetRoomSkillParameterResponse x
Prelude.Generic)
newGetRoomSkillParameterResponse ::
Prelude.Int ->
GetRoomSkillParameterResponse
newGetRoomSkillParameterResponse :: Int -> GetRoomSkillParameterResponse
newGetRoomSkillParameterResponse Int
pHttpStatus_ =
GetRoomSkillParameterResponse'
{ $sel:roomSkillParameter:GetRoomSkillParameterResponse' :: Maybe RoomSkillParameter
roomSkillParameter =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetRoomSkillParameterResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getRoomSkillParameterResponse_roomSkillParameter :: Lens.Lens' GetRoomSkillParameterResponse (Prelude.Maybe RoomSkillParameter)
getRoomSkillParameterResponse_roomSkillParameter :: Lens' GetRoomSkillParameterResponse (Maybe RoomSkillParameter)
getRoomSkillParameterResponse_roomSkillParameter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomSkillParameterResponse' {Maybe RoomSkillParameter
roomSkillParameter :: Maybe RoomSkillParameter
$sel:roomSkillParameter:GetRoomSkillParameterResponse' :: GetRoomSkillParameterResponse -> Maybe RoomSkillParameter
roomSkillParameter} -> Maybe RoomSkillParameter
roomSkillParameter) (\s :: GetRoomSkillParameterResponse
s@GetRoomSkillParameterResponse' {} Maybe RoomSkillParameter
a -> GetRoomSkillParameterResponse
s {$sel:roomSkillParameter:GetRoomSkillParameterResponse' :: Maybe RoomSkillParameter
roomSkillParameter = Maybe RoomSkillParameter
a} :: GetRoomSkillParameterResponse)
getRoomSkillParameterResponse_httpStatus :: Lens.Lens' GetRoomSkillParameterResponse Prelude.Int
getRoomSkillParameterResponse_httpStatus :: Lens' GetRoomSkillParameterResponse Int
getRoomSkillParameterResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomSkillParameterResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetRoomSkillParameterResponse' :: GetRoomSkillParameterResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetRoomSkillParameterResponse
s@GetRoomSkillParameterResponse' {} Int
a -> GetRoomSkillParameterResponse
s {$sel:httpStatus:GetRoomSkillParameterResponse' :: Int
httpStatus = Int
a} :: GetRoomSkillParameterResponse)
instance Prelude.NFData GetRoomSkillParameterResponse where
rnf :: GetRoomSkillParameterResponse -> ()
rnf GetRoomSkillParameterResponse' {Int
Maybe RoomSkillParameter
httpStatus :: Int
roomSkillParameter :: Maybe RoomSkillParameter
$sel:httpStatus:GetRoomSkillParameterResponse' :: GetRoomSkillParameterResponse -> Int
$sel:roomSkillParameter:GetRoomSkillParameterResponse' :: GetRoomSkillParameterResponse -> Maybe RoomSkillParameter
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe RoomSkillParameter
roomSkillParameter
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus