{-# 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.Lens as Lens
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
(GetRoomSkillParameter -> GetRoomSkillParameter -> Bool)
-> (GetRoomSkillParameter -> GetRoomSkillParameter -> Bool)
-> Eq GetRoomSkillParameter
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]
(Int -> ReadS GetRoomSkillParameter)
-> ReadS [GetRoomSkillParameter]
-> ReadPrec GetRoomSkillParameter
-> ReadPrec [GetRoomSkillParameter]
-> Read 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
(Int -> GetRoomSkillParameter -> ShowS)
-> (GetRoomSkillParameter -> String)
-> ([GetRoomSkillParameter] -> ShowS)
-> Show GetRoomSkillParameter
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. GetRoomSkillParameter -> Rep GetRoomSkillParameter x)
-> (forall x. Rep GetRoomSkillParameter x -> GetRoomSkillParameter)
-> Generic GetRoomSkillParameter
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' :: Maybe Text -> Text -> Text -> GetRoomSkillParameter
GetRoomSkillParameter'
{ $sel:roomArn:GetRoomSkillParameter' :: Maybe Text
roomArn = Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> GetRoomSkillParameter -> f GetRoomSkillParameter
getRoomSkillParameter_roomArn = (GetRoomSkillParameter -> Maybe Text)
-> (GetRoomSkillParameter -> Maybe Text -> GetRoomSkillParameter)
-> Lens
GetRoomSkillParameter
GetRoomSkillParameter
(Maybe Text)
(Maybe Text)
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 :: (Text -> f Text)
-> GetRoomSkillParameter -> f GetRoomSkillParameter
getRoomSkillParameter_skillId = (GetRoomSkillParameter -> Text)
-> (GetRoomSkillParameter -> Text -> GetRoomSkillParameter)
-> Lens GetRoomSkillParameter GetRoomSkillParameter Text Text
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 :: (Text -> f Text)
-> GetRoomSkillParameter -> f GetRoomSkillParameter
getRoomSkillParameter_parameterKey = (GetRoomSkillParameter -> Text)
-> (GetRoomSkillParameter -> Text -> GetRoomSkillParameter)
-> Lens GetRoomSkillParameter GetRoomSkillParameter Text Text
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 :: GetRoomSkillParameter -> Request GetRoomSkillParameter
request = Service -> GetRoomSkillParameter -> Request GetRoomSkillParameter
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetRoomSkillParameter
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetRoomSkillParameter)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetRoomSkillParameter))
-> Logger
-> Service
-> Proxy GetRoomSkillParameter
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetRoomSkillParameter)))
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 RoomSkillParameter -> Int -> GetRoomSkillParameterResponse
GetRoomSkillParameterResponse'
(Maybe RoomSkillParameter -> Int -> GetRoomSkillParameterResponse)
-> Either String (Maybe RoomSkillParameter)
-> Either String (Int -> GetRoomSkillParameterResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe RoomSkillParameter)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RoomSkillParameter")
Either String (Int -> GetRoomSkillParameterResponse)
-> Either String Int -> Either String GetRoomSkillParameterResponse
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 GetRoomSkillParameter
instance Prelude.NFData GetRoomSkillParameter
instance Core.ToHeaders GetRoomSkillParameter where
toHeaders :: GetRoomSkillParameter -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetRoomSkillParameter -> 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.GetRoomSkillParameter" ::
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 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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SkillId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
skillId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ParameterKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
parameterKey)
]
)
instance Core.ToPath GetRoomSkillParameter where
toPath :: GetRoomSkillParameter -> ByteString
toPath = ByteString -> GetRoomSkillParameter -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetRoomSkillParameter where
toQuery :: GetRoomSkillParameter -> QueryString
toQuery = QueryString -> GetRoomSkillParameter -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(GetRoomSkillParameterResponse
-> GetRoomSkillParameterResponse -> Bool)
-> (GetRoomSkillParameterResponse
-> GetRoomSkillParameterResponse -> Bool)
-> Eq GetRoomSkillParameterResponse
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]
(Int -> ReadS GetRoomSkillParameterResponse)
-> ReadS [GetRoomSkillParameterResponse]
-> ReadPrec GetRoomSkillParameterResponse
-> ReadPrec [GetRoomSkillParameterResponse]
-> Read 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
(Int -> GetRoomSkillParameterResponse -> ShowS)
-> (GetRoomSkillParameterResponse -> String)
-> ([GetRoomSkillParameterResponse] -> ShowS)
-> Show GetRoomSkillParameterResponse
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.
GetRoomSkillParameterResponse
-> Rep GetRoomSkillParameterResponse x)
-> (forall x.
Rep GetRoomSkillParameterResponse x
-> GetRoomSkillParameterResponse)
-> Generic GetRoomSkillParameterResponse
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' :: Maybe RoomSkillParameter -> Int -> GetRoomSkillParameterResponse
GetRoomSkillParameterResponse'
{ $sel:roomSkillParameter:GetRoomSkillParameterResponse' :: Maybe RoomSkillParameter
roomSkillParameter =
Maybe RoomSkillParameter
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetRoomSkillParameterResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getRoomSkillParameterResponse_roomSkillParameter :: Lens.Lens' GetRoomSkillParameterResponse (Prelude.Maybe RoomSkillParameter)
getRoomSkillParameterResponse_roomSkillParameter :: (Maybe RoomSkillParameter -> f (Maybe RoomSkillParameter))
-> GetRoomSkillParameterResponse -> f GetRoomSkillParameterResponse
getRoomSkillParameterResponse_roomSkillParameter = (GetRoomSkillParameterResponse -> Maybe RoomSkillParameter)
-> (GetRoomSkillParameterResponse
-> Maybe RoomSkillParameter -> GetRoomSkillParameterResponse)
-> Lens
GetRoomSkillParameterResponse
GetRoomSkillParameterResponse
(Maybe RoomSkillParameter)
(Maybe 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 :: (Int -> f Int)
-> GetRoomSkillParameterResponse -> f GetRoomSkillParameterResponse
getRoomSkillParameterResponse_httpStatus = (GetRoomSkillParameterResponse -> Int)
-> (GetRoomSkillParameterResponse
-> Int -> GetRoomSkillParameterResponse)
-> Lens
GetRoomSkillParameterResponse GetRoomSkillParameterResponse Int Int
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