{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AlexaBusiness.DeleteRoomSkillParameter
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes room skill parameter details by room, skill, and parameter key
-- ID.
module Amazonka.AlexaBusiness.DeleteRoomSkillParameter
  ( -- * Creating a Request
    DeleteRoomSkillParameter (..),
    newDeleteRoomSkillParameter,

    -- * Request Lenses
    deleteRoomSkillParameter_roomArn,
    deleteRoomSkillParameter_skillId,
    deleteRoomSkillParameter_parameterKey,

    -- * Destructuring the Response
    DeleteRoomSkillParameterResponse (..),
    newDeleteRoomSkillParameterResponse,

    -- * Response Lenses
    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

-- | /See:/ 'newDeleteRoomSkillParameter' smart constructor.
data DeleteRoomSkillParameter = DeleteRoomSkillParameter'
  { -- | The ARN of the room from which to remove the room skill parameter
    -- details.
    DeleteRoomSkillParameter -> Maybe Text
roomArn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the skill from which to remove the room skill parameter
    -- details.
    DeleteRoomSkillParameter -> Text
skillId :: Prelude.Text,
    -- | The room skill parameter key for which to remove details.
    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)

-- |
-- Create a value of 'DeleteRoomSkillParameter' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'roomArn', 'deleteRoomSkillParameter_roomArn' - The ARN of the room from which to remove the room skill parameter
-- details.
--
-- 'skillId', 'deleteRoomSkillParameter_skillId' - The ID of the skill from which to remove the room skill parameter
-- details.
--
-- 'parameterKey', 'deleteRoomSkillParameter_parameterKey' - The room skill parameter key for which to remove details.
newDeleteRoomSkillParameter ::
  -- | 'skillId'
  Prelude.Text ->
  -- | 'parameterKey'
  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_
    }

-- | The ARN of the room from which to remove the room skill parameter
-- details.
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)

-- | The ID of the skill from which to remove the room skill parameter
-- details.
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)

-- | The room skill parameter key for which to remove details.
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

-- | /See:/ 'newDeleteRoomSkillParameterResponse' smart constructor.
data DeleteRoomSkillParameterResponse = DeleteRoomSkillParameterResponse'
  { -- | The response's http status code.
    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)

-- |
-- Create a value of 'DeleteRoomSkillParameterResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'deleteRoomSkillParameterResponse_httpStatus' - The response's http status code.
newDeleteRoomSkillParameterResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteRoomSkillParameterResponse
newDeleteRoomSkillParameterResponse :: Int -> DeleteRoomSkillParameterResponse
newDeleteRoomSkillParameterResponse Int
pHttpStatus_ =
  DeleteRoomSkillParameterResponse' :: Int -> DeleteRoomSkillParameterResponse
DeleteRoomSkillParameterResponse'
    { $sel:httpStatus:DeleteRoomSkillParameterResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

-- | The response's http status code.
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