{-# 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.IoTDeviceAdvisor.DeleteSuiteDefinition
(
DeleteSuiteDefinition (..),
newDeleteSuiteDefinition,
deleteSuiteDefinition_suiteDefinitionId,
DeleteSuiteDefinitionResponse (..),
newDeleteSuiteDefinitionResponse,
deleteSuiteDefinitionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoTDeviceAdvisor.Types
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 DeleteSuiteDefinition = DeleteSuiteDefinition'
{
DeleteSuiteDefinition -> Text
suiteDefinitionId :: Prelude.Text
}
deriving (DeleteSuiteDefinition -> DeleteSuiteDefinition -> Bool
(DeleteSuiteDefinition -> DeleteSuiteDefinition -> Bool)
-> (DeleteSuiteDefinition -> DeleteSuiteDefinition -> Bool)
-> Eq DeleteSuiteDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSuiteDefinition -> DeleteSuiteDefinition -> Bool
$c/= :: DeleteSuiteDefinition -> DeleteSuiteDefinition -> Bool
== :: DeleteSuiteDefinition -> DeleteSuiteDefinition -> Bool
$c== :: DeleteSuiteDefinition -> DeleteSuiteDefinition -> Bool
Prelude.Eq, ReadPrec [DeleteSuiteDefinition]
ReadPrec DeleteSuiteDefinition
Int -> ReadS DeleteSuiteDefinition
ReadS [DeleteSuiteDefinition]
(Int -> ReadS DeleteSuiteDefinition)
-> ReadS [DeleteSuiteDefinition]
-> ReadPrec DeleteSuiteDefinition
-> ReadPrec [DeleteSuiteDefinition]
-> Read DeleteSuiteDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSuiteDefinition]
$creadListPrec :: ReadPrec [DeleteSuiteDefinition]
readPrec :: ReadPrec DeleteSuiteDefinition
$creadPrec :: ReadPrec DeleteSuiteDefinition
readList :: ReadS [DeleteSuiteDefinition]
$creadList :: ReadS [DeleteSuiteDefinition]
readsPrec :: Int -> ReadS DeleteSuiteDefinition
$creadsPrec :: Int -> ReadS DeleteSuiteDefinition
Prelude.Read, Int -> DeleteSuiteDefinition -> ShowS
[DeleteSuiteDefinition] -> ShowS
DeleteSuiteDefinition -> String
(Int -> DeleteSuiteDefinition -> ShowS)
-> (DeleteSuiteDefinition -> String)
-> ([DeleteSuiteDefinition] -> ShowS)
-> Show DeleteSuiteDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSuiteDefinition] -> ShowS
$cshowList :: [DeleteSuiteDefinition] -> ShowS
show :: DeleteSuiteDefinition -> String
$cshow :: DeleteSuiteDefinition -> String
showsPrec :: Int -> DeleteSuiteDefinition -> ShowS
$cshowsPrec :: Int -> DeleteSuiteDefinition -> ShowS
Prelude.Show, (forall x. DeleteSuiteDefinition -> Rep DeleteSuiteDefinition x)
-> (forall x. Rep DeleteSuiteDefinition x -> DeleteSuiteDefinition)
-> Generic DeleteSuiteDefinition
forall x. Rep DeleteSuiteDefinition x -> DeleteSuiteDefinition
forall x. DeleteSuiteDefinition -> Rep DeleteSuiteDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteSuiteDefinition x -> DeleteSuiteDefinition
$cfrom :: forall x. DeleteSuiteDefinition -> Rep DeleteSuiteDefinition x
Prelude.Generic)
newDeleteSuiteDefinition ::
Prelude.Text ->
DeleteSuiteDefinition
newDeleteSuiteDefinition :: Text -> DeleteSuiteDefinition
newDeleteSuiteDefinition Text
pSuiteDefinitionId_ =
DeleteSuiteDefinition' :: Text -> DeleteSuiteDefinition
DeleteSuiteDefinition'
{ $sel:suiteDefinitionId:DeleteSuiteDefinition' :: Text
suiteDefinitionId =
Text
pSuiteDefinitionId_
}
deleteSuiteDefinition_suiteDefinitionId :: Lens.Lens' DeleteSuiteDefinition Prelude.Text
deleteSuiteDefinition_suiteDefinitionId :: (Text -> f Text)
-> DeleteSuiteDefinition -> f DeleteSuiteDefinition
deleteSuiteDefinition_suiteDefinitionId = (DeleteSuiteDefinition -> Text)
-> (DeleteSuiteDefinition -> Text -> DeleteSuiteDefinition)
-> Lens DeleteSuiteDefinition DeleteSuiteDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSuiteDefinition' {Text
suiteDefinitionId :: Text
$sel:suiteDefinitionId:DeleteSuiteDefinition' :: DeleteSuiteDefinition -> Text
suiteDefinitionId} -> Text
suiteDefinitionId) (\s :: DeleteSuiteDefinition
s@DeleteSuiteDefinition' {} Text
a -> DeleteSuiteDefinition
s {$sel:suiteDefinitionId:DeleteSuiteDefinition' :: Text
suiteDefinitionId = Text
a} :: DeleteSuiteDefinition)
instance Core.AWSRequest DeleteSuiteDefinition where
type
AWSResponse DeleteSuiteDefinition =
DeleteSuiteDefinitionResponse
request :: DeleteSuiteDefinition -> Request DeleteSuiteDefinition
request = Service -> DeleteSuiteDefinition -> Request DeleteSuiteDefinition
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteSuiteDefinition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSuiteDefinition)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteSuiteDefinition))
-> Logger
-> Service
-> Proxy DeleteSuiteDefinition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSuiteDefinition)))
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 -> DeleteSuiteDefinitionResponse
DeleteSuiteDefinitionResponse'
(Int -> DeleteSuiteDefinitionResponse)
-> Either String Int -> Either String DeleteSuiteDefinitionResponse
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 DeleteSuiteDefinition
instance Prelude.NFData DeleteSuiteDefinition
instance Core.ToHeaders DeleteSuiteDefinition where
toHeaders :: DeleteSuiteDefinition -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteSuiteDefinition -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath DeleteSuiteDefinition where
toPath :: DeleteSuiteDefinition -> ByteString
toPath DeleteSuiteDefinition' {Text
suiteDefinitionId :: Text
$sel:suiteDefinitionId:DeleteSuiteDefinition' :: DeleteSuiteDefinition -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/suiteDefinitions/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
suiteDefinitionId]
instance Core.ToQuery DeleteSuiteDefinition where
toQuery :: DeleteSuiteDefinition -> QueryString
toQuery = QueryString -> DeleteSuiteDefinition -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteSuiteDefinitionResponse = DeleteSuiteDefinitionResponse'
{
DeleteSuiteDefinitionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteSuiteDefinitionResponse
-> DeleteSuiteDefinitionResponse -> Bool
(DeleteSuiteDefinitionResponse
-> DeleteSuiteDefinitionResponse -> Bool)
-> (DeleteSuiteDefinitionResponse
-> DeleteSuiteDefinitionResponse -> Bool)
-> Eq DeleteSuiteDefinitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSuiteDefinitionResponse
-> DeleteSuiteDefinitionResponse -> Bool
$c/= :: DeleteSuiteDefinitionResponse
-> DeleteSuiteDefinitionResponse -> Bool
== :: DeleteSuiteDefinitionResponse
-> DeleteSuiteDefinitionResponse -> Bool
$c== :: DeleteSuiteDefinitionResponse
-> DeleteSuiteDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSuiteDefinitionResponse]
ReadPrec DeleteSuiteDefinitionResponse
Int -> ReadS DeleteSuiteDefinitionResponse
ReadS [DeleteSuiteDefinitionResponse]
(Int -> ReadS DeleteSuiteDefinitionResponse)
-> ReadS [DeleteSuiteDefinitionResponse]
-> ReadPrec DeleteSuiteDefinitionResponse
-> ReadPrec [DeleteSuiteDefinitionResponse]
-> Read DeleteSuiteDefinitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSuiteDefinitionResponse]
$creadListPrec :: ReadPrec [DeleteSuiteDefinitionResponse]
readPrec :: ReadPrec DeleteSuiteDefinitionResponse
$creadPrec :: ReadPrec DeleteSuiteDefinitionResponse
readList :: ReadS [DeleteSuiteDefinitionResponse]
$creadList :: ReadS [DeleteSuiteDefinitionResponse]
readsPrec :: Int -> ReadS DeleteSuiteDefinitionResponse
$creadsPrec :: Int -> ReadS DeleteSuiteDefinitionResponse
Prelude.Read, Int -> DeleteSuiteDefinitionResponse -> ShowS
[DeleteSuiteDefinitionResponse] -> ShowS
DeleteSuiteDefinitionResponse -> String
(Int -> DeleteSuiteDefinitionResponse -> ShowS)
-> (DeleteSuiteDefinitionResponse -> String)
-> ([DeleteSuiteDefinitionResponse] -> ShowS)
-> Show DeleteSuiteDefinitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSuiteDefinitionResponse] -> ShowS
$cshowList :: [DeleteSuiteDefinitionResponse] -> ShowS
show :: DeleteSuiteDefinitionResponse -> String
$cshow :: DeleteSuiteDefinitionResponse -> String
showsPrec :: Int -> DeleteSuiteDefinitionResponse -> ShowS
$cshowsPrec :: Int -> DeleteSuiteDefinitionResponse -> ShowS
Prelude.Show, (forall x.
DeleteSuiteDefinitionResponse
-> Rep DeleteSuiteDefinitionResponse x)
-> (forall x.
Rep DeleteSuiteDefinitionResponse x
-> DeleteSuiteDefinitionResponse)
-> Generic DeleteSuiteDefinitionResponse
forall x.
Rep DeleteSuiteDefinitionResponse x
-> DeleteSuiteDefinitionResponse
forall x.
DeleteSuiteDefinitionResponse
-> Rep DeleteSuiteDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSuiteDefinitionResponse x
-> DeleteSuiteDefinitionResponse
$cfrom :: forall x.
DeleteSuiteDefinitionResponse
-> Rep DeleteSuiteDefinitionResponse x
Prelude.Generic)
newDeleteSuiteDefinitionResponse ::
Prelude.Int ->
DeleteSuiteDefinitionResponse
newDeleteSuiteDefinitionResponse :: Int -> DeleteSuiteDefinitionResponse
newDeleteSuiteDefinitionResponse Int
pHttpStatus_ =
DeleteSuiteDefinitionResponse' :: Int -> DeleteSuiteDefinitionResponse
DeleteSuiteDefinitionResponse'
{ $sel:httpStatus:DeleteSuiteDefinitionResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteSuiteDefinitionResponse_httpStatus :: Lens.Lens' DeleteSuiteDefinitionResponse Prelude.Int
deleteSuiteDefinitionResponse_httpStatus :: (Int -> f Int)
-> DeleteSuiteDefinitionResponse -> f DeleteSuiteDefinitionResponse
deleteSuiteDefinitionResponse_httpStatus = (DeleteSuiteDefinitionResponse -> Int)
-> (DeleteSuiteDefinitionResponse
-> Int -> DeleteSuiteDefinitionResponse)
-> Lens
DeleteSuiteDefinitionResponse DeleteSuiteDefinitionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSuiteDefinitionResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteSuiteDefinitionResponse' :: DeleteSuiteDefinitionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteSuiteDefinitionResponse
s@DeleteSuiteDefinitionResponse' {} Int
a -> DeleteSuiteDefinitionResponse
s {$sel:httpStatus:DeleteSuiteDefinitionResponse' :: Int
httpStatus = Int
a} :: DeleteSuiteDefinitionResponse)
instance Prelude.NFData DeleteSuiteDefinitionResponse