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