{-# 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.IotTwinMaker.DeleteScene
(
DeleteScene (..),
newDeleteScene,
deleteScene_workspaceId,
deleteScene_sceneId,
DeleteSceneResponse (..),
newDeleteSceneResponse,
deleteSceneResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IotTwinMaker.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteScene = DeleteScene'
{
DeleteScene -> Text
workspaceId :: Prelude.Text,
DeleteScene -> Text
sceneId :: Prelude.Text
}
deriving (DeleteScene -> DeleteScene -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteScene -> DeleteScene -> Bool
$c/= :: DeleteScene -> DeleteScene -> Bool
== :: DeleteScene -> DeleteScene -> Bool
$c== :: DeleteScene -> DeleteScene -> Bool
Prelude.Eq, ReadPrec [DeleteScene]
ReadPrec DeleteScene
Int -> ReadS DeleteScene
ReadS [DeleteScene]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteScene]
$creadListPrec :: ReadPrec [DeleteScene]
readPrec :: ReadPrec DeleteScene
$creadPrec :: ReadPrec DeleteScene
readList :: ReadS [DeleteScene]
$creadList :: ReadS [DeleteScene]
readsPrec :: Int -> ReadS DeleteScene
$creadsPrec :: Int -> ReadS DeleteScene
Prelude.Read, Int -> DeleteScene -> ShowS
[DeleteScene] -> ShowS
DeleteScene -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteScene] -> ShowS
$cshowList :: [DeleteScene] -> ShowS
show :: DeleteScene -> String
$cshow :: DeleteScene -> String
showsPrec :: Int -> DeleteScene -> ShowS
$cshowsPrec :: Int -> DeleteScene -> ShowS
Prelude.Show, forall x. Rep DeleteScene x -> DeleteScene
forall x. DeleteScene -> Rep DeleteScene x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteScene x -> DeleteScene
$cfrom :: forall x. DeleteScene -> Rep DeleteScene x
Prelude.Generic)
newDeleteScene ::
Prelude.Text ->
Prelude.Text ->
DeleteScene
newDeleteScene :: Text -> Text -> DeleteScene
newDeleteScene Text
pWorkspaceId_ Text
pSceneId_ =
DeleteScene'
{ $sel:workspaceId:DeleteScene' :: Text
workspaceId = Text
pWorkspaceId_,
$sel:sceneId:DeleteScene' :: Text
sceneId = Text
pSceneId_
}
deleteScene_workspaceId :: Lens.Lens' DeleteScene Prelude.Text
deleteScene_workspaceId :: Lens' DeleteScene Text
deleteScene_workspaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteScene' {Text
workspaceId :: Text
$sel:workspaceId:DeleteScene' :: DeleteScene -> Text
workspaceId} -> Text
workspaceId) (\s :: DeleteScene
s@DeleteScene' {} Text
a -> DeleteScene
s {$sel:workspaceId:DeleteScene' :: Text
workspaceId = Text
a} :: DeleteScene)
deleteScene_sceneId :: Lens.Lens' DeleteScene Prelude.Text
deleteScene_sceneId :: Lens' DeleteScene Text
deleteScene_sceneId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteScene' {Text
sceneId :: Text
$sel:sceneId:DeleteScene' :: DeleteScene -> Text
sceneId} -> Text
sceneId) (\s :: DeleteScene
s@DeleteScene' {} Text
a -> DeleteScene
s {$sel:sceneId:DeleteScene' :: Text
sceneId = Text
a} :: DeleteScene)
instance Core.AWSRequest DeleteScene where
type AWSResponse DeleteScene = DeleteSceneResponse
request :: (Service -> Service) -> DeleteScene -> Request DeleteScene
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteScene
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteScene)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteSceneResponse
DeleteSceneResponse'
forall (f :: * -> *) a b. Functor 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 DeleteScene where
hashWithSalt :: Int -> DeleteScene -> Int
hashWithSalt Int
_salt DeleteScene' {Text
sceneId :: Text
workspaceId :: Text
$sel:sceneId:DeleteScene' :: DeleteScene -> Text
$sel:workspaceId:DeleteScene' :: DeleteScene -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
workspaceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sceneId
instance Prelude.NFData DeleteScene where
rnf :: DeleteScene -> ()
rnf DeleteScene' {Text
sceneId :: Text
workspaceId :: Text
$sel:sceneId:DeleteScene' :: DeleteScene -> Text
$sel:workspaceId:DeleteScene' :: DeleteScene -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
workspaceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sceneId
instance Data.ToHeaders DeleteScene where
toHeaders :: DeleteScene -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DeleteScene where
toPath :: DeleteScene -> ByteString
toPath DeleteScene' {Text
sceneId :: Text
workspaceId :: Text
$sel:sceneId:DeleteScene' :: DeleteScene -> Text
$sel:workspaceId:DeleteScene' :: DeleteScene -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/workspaces/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
workspaceId,
ByteString
"/scenes/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
sceneId
]
instance Data.ToQuery DeleteScene where
toQuery :: DeleteScene -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteSceneResponse = DeleteSceneResponse'
{
DeleteSceneResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteSceneResponse -> DeleteSceneResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSceneResponse -> DeleteSceneResponse -> Bool
$c/= :: DeleteSceneResponse -> DeleteSceneResponse -> Bool
== :: DeleteSceneResponse -> DeleteSceneResponse -> Bool
$c== :: DeleteSceneResponse -> DeleteSceneResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSceneResponse]
ReadPrec DeleteSceneResponse
Int -> ReadS DeleteSceneResponse
ReadS [DeleteSceneResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSceneResponse]
$creadListPrec :: ReadPrec [DeleteSceneResponse]
readPrec :: ReadPrec DeleteSceneResponse
$creadPrec :: ReadPrec DeleteSceneResponse
readList :: ReadS [DeleteSceneResponse]
$creadList :: ReadS [DeleteSceneResponse]
readsPrec :: Int -> ReadS DeleteSceneResponse
$creadsPrec :: Int -> ReadS DeleteSceneResponse
Prelude.Read, Int -> DeleteSceneResponse -> ShowS
[DeleteSceneResponse] -> ShowS
DeleteSceneResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSceneResponse] -> ShowS
$cshowList :: [DeleteSceneResponse] -> ShowS
show :: DeleteSceneResponse -> String
$cshow :: DeleteSceneResponse -> String
showsPrec :: Int -> DeleteSceneResponse -> ShowS
$cshowsPrec :: Int -> DeleteSceneResponse -> ShowS
Prelude.Show, forall x. Rep DeleteSceneResponse x -> DeleteSceneResponse
forall x. DeleteSceneResponse -> Rep DeleteSceneResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteSceneResponse x -> DeleteSceneResponse
$cfrom :: forall x. DeleteSceneResponse -> Rep DeleteSceneResponse x
Prelude.Generic)
newDeleteSceneResponse ::
Prelude.Int ->
DeleteSceneResponse
newDeleteSceneResponse :: Int -> DeleteSceneResponse
newDeleteSceneResponse Int
pHttpStatus_ =
DeleteSceneResponse' {$sel:httpStatus:DeleteSceneResponse' :: Int
httpStatus = Int
pHttpStatus_}
deleteSceneResponse_httpStatus :: Lens.Lens' DeleteSceneResponse Prelude.Int
deleteSceneResponse_httpStatus :: Lens' DeleteSceneResponse Int
deleteSceneResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSceneResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteSceneResponse' :: DeleteSceneResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteSceneResponse
s@DeleteSceneResponse' {} Int
a -> DeleteSceneResponse
s {$sel:httpStatus:DeleteSceneResponse' :: Int
httpStatus = Int
a} :: DeleteSceneResponse)
instance Prelude.NFData DeleteSceneResponse where
rnf :: DeleteSceneResponse -> ()
rnf DeleteSceneResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteSceneResponse' :: DeleteSceneResponse -> Int
..} = forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus