{-# 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.DeleteRoomSkillParameter
(
DeleteRoomSkillParameter (..),
newDeleteRoomSkillParameter,
deleteRoomSkillParameter_roomArn,
deleteRoomSkillParameter_skillId,
deleteRoomSkillParameter_parameterKey,
DeleteRoomSkillParameterResponse (..),
newDeleteRoomSkillParameterResponse,
deleteRoomSkillParameterResponse_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 DeleteRoomSkillParameter = DeleteRoomSkillParameter'
{
DeleteRoomSkillParameter -> Maybe Text
roomArn :: Prelude.Maybe Prelude.Text,
DeleteRoomSkillParameter -> Text
skillId :: Prelude.Text,
DeleteRoomSkillParameter -> Text
parameterKey :: Prelude.Text
}
deriving (DeleteRoomSkillParameter -> DeleteRoomSkillParameter -> Bool
(DeleteRoomSkillParameter -> DeleteRoomSkillParameter -> Bool)
-> (DeleteRoomSkillParameter -> DeleteRoomSkillParameter -> Bool)
-> Eq DeleteRoomSkillParameter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRoomSkillParameter -> DeleteRoomSkillParameter -> Bool
$c/= :: DeleteRoomSkillParameter -> DeleteRoomSkillParameter -> Bool
== :: DeleteRoomSkillParameter -> DeleteRoomSkillParameter -> Bool
$c== :: DeleteRoomSkillParameter -> DeleteRoomSkillParameter -> Bool
Prelude.Eq, ReadPrec [DeleteRoomSkillParameter]
ReadPrec DeleteRoomSkillParameter
Int -> ReadS DeleteRoomSkillParameter
ReadS [DeleteRoomSkillParameter]
(Int -> ReadS DeleteRoomSkillParameter)
-> ReadS [DeleteRoomSkillParameter]
-> ReadPrec DeleteRoomSkillParameter
-> ReadPrec [DeleteRoomSkillParameter]
-> Read DeleteRoomSkillParameter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRoomSkillParameter]
$creadListPrec :: ReadPrec [DeleteRoomSkillParameter]
readPrec :: ReadPrec DeleteRoomSkillParameter
$creadPrec :: ReadPrec DeleteRoomSkillParameter
readList :: ReadS [DeleteRoomSkillParameter]
$creadList :: ReadS [DeleteRoomSkillParameter]
readsPrec :: Int -> ReadS DeleteRoomSkillParameter
$creadsPrec :: Int -> ReadS DeleteRoomSkillParameter
Prelude.Read, Int -> DeleteRoomSkillParameter -> ShowS
[DeleteRoomSkillParameter] -> ShowS
DeleteRoomSkillParameter -> String
(Int -> DeleteRoomSkillParameter -> ShowS)
-> (DeleteRoomSkillParameter -> String)
-> ([DeleteRoomSkillParameter] -> ShowS)
-> Show DeleteRoomSkillParameter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRoomSkillParameter] -> ShowS
$cshowList :: [DeleteRoomSkillParameter] -> ShowS
show :: DeleteRoomSkillParameter -> String
$cshow :: DeleteRoomSkillParameter -> String
showsPrec :: Int -> DeleteRoomSkillParameter -> ShowS
$cshowsPrec :: Int -> DeleteRoomSkillParameter -> ShowS
Prelude.Show, (forall x.
DeleteRoomSkillParameter -> Rep DeleteRoomSkillParameter x)
-> (forall x.
Rep DeleteRoomSkillParameter x -> DeleteRoomSkillParameter)
-> Generic DeleteRoomSkillParameter
forall x.
Rep DeleteRoomSkillParameter x -> DeleteRoomSkillParameter
forall x.
DeleteRoomSkillParameter -> Rep DeleteRoomSkillParameter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRoomSkillParameter x -> DeleteRoomSkillParameter
$cfrom :: forall x.
DeleteRoomSkillParameter -> Rep DeleteRoomSkillParameter x
Prelude.Generic)
newDeleteRoomSkillParameter ::
Prelude.Text ->
Prelude.Text ->
DeleteRoomSkillParameter
newDeleteRoomSkillParameter :: Text -> Text -> DeleteRoomSkillParameter
newDeleteRoomSkillParameter Text
pSkillId_ Text
pParameterKey_ =
DeleteRoomSkillParameter' :: Maybe Text -> Text -> Text -> DeleteRoomSkillParameter
DeleteRoomSkillParameter'
{ $sel:roomArn:DeleteRoomSkillParameter' :: Maybe Text
roomArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:skillId:DeleteRoomSkillParameter' :: Text
skillId = Text
pSkillId_,
$sel:parameterKey:DeleteRoomSkillParameter' :: Text
parameterKey = Text
pParameterKey_
}
deleteRoomSkillParameter_roomArn :: Lens.Lens' DeleteRoomSkillParameter (Prelude.Maybe Prelude.Text)
deleteRoomSkillParameter_roomArn :: (Maybe Text -> f (Maybe Text))
-> DeleteRoomSkillParameter -> f DeleteRoomSkillParameter
deleteRoomSkillParameter_roomArn = (DeleteRoomSkillParameter -> Maybe Text)
-> (DeleteRoomSkillParameter
-> Maybe Text -> DeleteRoomSkillParameter)
-> Lens
DeleteRoomSkillParameter
DeleteRoomSkillParameter
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRoomSkillParameter' {Maybe Text
roomArn :: Maybe Text
$sel:roomArn:DeleteRoomSkillParameter' :: DeleteRoomSkillParameter -> Maybe Text
roomArn} -> Maybe Text
roomArn) (\s :: DeleteRoomSkillParameter
s@DeleteRoomSkillParameter' {} Maybe Text
a -> DeleteRoomSkillParameter
s {$sel:roomArn:DeleteRoomSkillParameter' :: Maybe Text
roomArn = Maybe Text
a} :: DeleteRoomSkillParameter)
deleteRoomSkillParameter_skillId :: Lens.Lens' DeleteRoomSkillParameter Prelude.Text
deleteRoomSkillParameter_skillId :: (Text -> f Text)
-> DeleteRoomSkillParameter -> f DeleteRoomSkillParameter
deleteRoomSkillParameter_skillId = (DeleteRoomSkillParameter -> Text)
-> (DeleteRoomSkillParameter -> Text -> DeleteRoomSkillParameter)
-> Lens DeleteRoomSkillParameter DeleteRoomSkillParameter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRoomSkillParameter' {Text
skillId :: Text
$sel:skillId:DeleteRoomSkillParameter' :: DeleteRoomSkillParameter -> Text
skillId} -> Text
skillId) (\s :: DeleteRoomSkillParameter
s@DeleteRoomSkillParameter' {} Text
a -> DeleteRoomSkillParameter
s {$sel:skillId:DeleteRoomSkillParameter' :: Text
skillId = Text
a} :: DeleteRoomSkillParameter)
deleteRoomSkillParameter_parameterKey :: Lens.Lens' DeleteRoomSkillParameter Prelude.Text
deleteRoomSkillParameter_parameterKey :: (Text -> f Text)
-> DeleteRoomSkillParameter -> f DeleteRoomSkillParameter
deleteRoomSkillParameter_parameterKey = (DeleteRoomSkillParameter -> Text)
-> (DeleteRoomSkillParameter -> Text -> DeleteRoomSkillParameter)
-> Lens DeleteRoomSkillParameter DeleteRoomSkillParameter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRoomSkillParameter' {Text
parameterKey :: Text
$sel:parameterKey:DeleteRoomSkillParameter' :: DeleteRoomSkillParameter -> Text
parameterKey} -> Text
parameterKey) (\s :: DeleteRoomSkillParameter
s@DeleteRoomSkillParameter' {} Text
a -> DeleteRoomSkillParameter
s {$sel:parameterKey:DeleteRoomSkillParameter' :: Text
parameterKey = Text
a} :: DeleteRoomSkillParameter)
instance Core.AWSRequest DeleteRoomSkillParameter where
type
AWSResponse DeleteRoomSkillParameter =
DeleteRoomSkillParameterResponse
request :: DeleteRoomSkillParameter -> Request DeleteRoomSkillParameter
request = Service
-> DeleteRoomSkillParameter -> Request DeleteRoomSkillParameter
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteRoomSkillParameter
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRoomSkillParameter)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteRoomSkillParameter))
-> Logger
-> Service
-> Proxy DeleteRoomSkillParameter
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRoomSkillParameter)))
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 -> DeleteRoomSkillParameterResponse
DeleteRoomSkillParameterResponse'
(Int -> DeleteRoomSkillParameterResponse)
-> Either String Int
-> Either String DeleteRoomSkillParameterResponse
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 DeleteRoomSkillParameter
instance Prelude.NFData DeleteRoomSkillParameter
instance Core.ToHeaders DeleteRoomSkillParameter where
toHeaders :: DeleteRoomSkillParameter -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteRoomSkillParameter -> 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.DeleteRoomSkillParameter" ::
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 DeleteRoomSkillParameter where
toJSON :: DeleteRoomSkillParameter -> Value
toJSON DeleteRoomSkillParameter' {Maybe Text
Text
parameterKey :: Text
skillId :: Text
roomArn :: Maybe Text
$sel:parameterKey:DeleteRoomSkillParameter' :: DeleteRoomSkillParameter -> Text
$sel:skillId:DeleteRoomSkillParameter' :: DeleteRoomSkillParameter -> Text
$sel:roomArn:DeleteRoomSkillParameter' :: DeleteRoomSkillParameter -> 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 DeleteRoomSkillParameter where
toPath :: DeleteRoomSkillParameter -> ByteString
toPath = ByteString -> DeleteRoomSkillParameter -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteRoomSkillParameter where
toQuery :: DeleteRoomSkillParameter -> QueryString
toQuery = QueryString -> DeleteRoomSkillParameter -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteRoomSkillParameterResponse = DeleteRoomSkillParameterResponse'
{
DeleteRoomSkillParameterResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteRoomSkillParameterResponse
-> DeleteRoomSkillParameterResponse -> Bool
(DeleteRoomSkillParameterResponse
-> DeleteRoomSkillParameterResponse -> Bool)
-> (DeleteRoomSkillParameterResponse
-> DeleteRoomSkillParameterResponse -> Bool)
-> Eq DeleteRoomSkillParameterResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRoomSkillParameterResponse
-> DeleteRoomSkillParameterResponse -> Bool
$c/= :: DeleteRoomSkillParameterResponse
-> DeleteRoomSkillParameterResponse -> Bool
== :: DeleteRoomSkillParameterResponse
-> DeleteRoomSkillParameterResponse -> Bool
$c== :: DeleteRoomSkillParameterResponse
-> DeleteRoomSkillParameterResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRoomSkillParameterResponse]
ReadPrec DeleteRoomSkillParameterResponse
Int -> ReadS DeleteRoomSkillParameterResponse
ReadS [DeleteRoomSkillParameterResponse]
(Int -> ReadS DeleteRoomSkillParameterResponse)
-> ReadS [DeleteRoomSkillParameterResponse]
-> ReadPrec DeleteRoomSkillParameterResponse
-> ReadPrec [DeleteRoomSkillParameterResponse]
-> Read DeleteRoomSkillParameterResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRoomSkillParameterResponse]
$creadListPrec :: ReadPrec [DeleteRoomSkillParameterResponse]
readPrec :: ReadPrec DeleteRoomSkillParameterResponse
$creadPrec :: ReadPrec DeleteRoomSkillParameterResponse
readList :: ReadS [DeleteRoomSkillParameterResponse]
$creadList :: ReadS [DeleteRoomSkillParameterResponse]
readsPrec :: Int -> ReadS DeleteRoomSkillParameterResponse
$creadsPrec :: Int -> ReadS DeleteRoomSkillParameterResponse
Prelude.Read, Int -> DeleteRoomSkillParameterResponse -> ShowS
[DeleteRoomSkillParameterResponse] -> ShowS
DeleteRoomSkillParameterResponse -> String
(Int -> DeleteRoomSkillParameterResponse -> ShowS)
-> (DeleteRoomSkillParameterResponse -> String)
-> ([DeleteRoomSkillParameterResponse] -> ShowS)
-> Show DeleteRoomSkillParameterResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRoomSkillParameterResponse] -> ShowS
$cshowList :: [DeleteRoomSkillParameterResponse] -> ShowS
show :: DeleteRoomSkillParameterResponse -> String
$cshow :: DeleteRoomSkillParameterResponse -> String
showsPrec :: Int -> DeleteRoomSkillParameterResponse -> ShowS
$cshowsPrec :: Int -> DeleteRoomSkillParameterResponse -> ShowS
Prelude.Show, (forall x.
DeleteRoomSkillParameterResponse
-> Rep DeleteRoomSkillParameterResponse x)
-> (forall x.
Rep DeleteRoomSkillParameterResponse x
-> DeleteRoomSkillParameterResponse)
-> Generic DeleteRoomSkillParameterResponse
forall x.
Rep DeleteRoomSkillParameterResponse x
-> DeleteRoomSkillParameterResponse
forall x.
DeleteRoomSkillParameterResponse
-> Rep DeleteRoomSkillParameterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRoomSkillParameterResponse x
-> DeleteRoomSkillParameterResponse
$cfrom :: forall x.
DeleteRoomSkillParameterResponse
-> Rep DeleteRoomSkillParameterResponse x
Prelude.Generic)
newDeleteRoomSkillParameterResponse ::
Prelude.Int ->
DeleteRoomSkillParameterResponse
newDeleteRoomSkillParameterResponse :: Int -> DeleteRoomSkillParameterResponse
newDeleteRoomSkillParameterResponse Int
pHttpStatus_ =
DeleteRoomSkillParameterResponse' :: Int -> DeleteRoomSkillParameterResponse
DeleteRoomSkillParameterResponse'
{ $sel:httpStatus:DeleteRoomSkillParameterResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteRoomSkillParameterResponse_httpStatus :: Lens.Lens' DeleteRoomSkillParameterResponse Prelude.Int
deleteRoomSkillParameterResponse_httpStatus :: (Int -> f Int)
-> DeleteRoomSkillParameterResponse
-> f DeleteRoomSkillParameterResponse
deleteRoomSkillParameterResponse_httpStatus = (DeleteRoomSkillParameterResponse -> Int)
-> (DeleteRoomSkillParameterResponse
-> Int -> DeleteRoomSkillParameterResponse)
-> Lens
DeleteRoomSkillParameterResponse
DeleteRoomSkillParameterResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRoomSkillParameterResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteRoomSkillParameterResponse' :: DeleteRoomSkillParameterResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteRoomSkillParameterResponse
s@DeleteRoomSkillParameterResponse' {} Int
a -> DeleteRoomSkillParameterResponse
s {$sel:httpStatus:DeleteRoomSkillParameterResponse' :: Int
httpStatus = Int
a} :: DeleteRoomSkillParameterResponse)
instance
Prelude.NFData
DeleteRoomSkillParameterResponse