{-# 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.DataExchange.DeleteDataSet
(
DeleteDataSet (..),
newDeleteDataSet,
deleteDataSet_dataSetId,
DeleteDataSetResponse (..),
newDeleteDataSetResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DataExchange.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 DeleteDataSet = DeleteDataSet'
{
DeleteDataSet -> Text
dataSetId :: Prelude.Text
}
deriving (DeleteDataSet -> DeleteDataSet -> Bool
(DeleteDataSet -> DeleteDataSet -> Bool)
-> (DeleteDataSet -> DeleteDataSet -> Bool) -> Eq DeleteDataSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDataSet -> DeleteDataSet -> Bool
$c/= :: DeleteDataSet -> DeleteDataSet -> Bool
== :: DeleteDataSet -> DeleteDataSet -> Bool
$c== :: DeleteDataSet -> DeleteDataSet -> Bool
Prelude.Eq, ReadPrec [DeleteDataSet]
ReadPrec DeleteDataSet
Int -> ReadS DeleteDataSet
ReadS [DeleteDataSet]
(Int -> ReadS DeleteDataSet)
-> ReadS [DeleteDataSet]
-> ReadPrec DeleteDataSet
-> ReadPrec [DeleteDataSet]
-> Read DeleteDataSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDataSet]
$creadListPrec :: ReadPrec [DeleteDataSet]
readPrec :: ReadPrec DeleteDataSet
$creadPrec :: ReadPrec DeleteDataSet
readList :: ReadS [DeleteDataSet]
$creadList :: ReadS [DeleteDataSet]
readsPrec :: Int -> ReadS DeleteDataSet
$creadsPrec :: Int -> ReadS DeleteDataSet
Prelude.Read, Int -> DeleteDataSet -> ShowS
[DeleteDataSet] -> ShowS
DeleteDataSet -> String
(Int -> DeleteDataSet -> ShowS)
-> (DeleteDataSet -> String)
-> ([DeleteDataSet] -> ShowS)
-> Show DeleteDataSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDataSet] -> ShowS
$cshowList :: [DeleteDataSet] -> ShowS
show :: DeleteDataSet -> String
$cshow :: DeleteDataSet -> String
showsPrec :: Int -> DeleteDataSet -> ShowS
$cshowsPrec :: Int -> DeleteDataSet -> ShowS
Prelude.Show, (forall x. DeleteDataSet -> Rep DeleteDataSet x)
-> (forall x. Rep DeleteDataSet x -> DeleteDataSet)
-> Generic DeleteDataSet
forall x. Rep DeleteDataSet x -> DeleteDataSet
forall x. DeleteDataSet -> Rep DeleteDataSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteDataSet x -> DeleteDataSet
$cfrom :: forall x. DeleteDataSet -> Rep DeleteDataSet x
Prelude.Generic)
newDeleteDataSet ::
Prelude.Text ->
DeleteDataSet
newDeleteDataSet :: Text -> DeleteDataSet
newDeleteDataSet Text
pDataSetId_ =
DeleteDataSet' :: Text -> DeleteDataSet
DeleteDataSet' {$sel:dataSetId:DeleteDataSet' :: Text
dataSetId = Text
pDataSetId_}
deleteDataSet_dataSetId :: Lens.Lens' DeleteDataSet Prelude.Text
deleteDataSet_dataSetId :: (Text -> f Text) -> DeleteDataSet -> f DeleteDataSet
deleteDataSet_dataSetId = (DeleteDataSet -> Text)
-> (DeleteDataSet -> Text -> DeleteDataSet)
-> Lens DeleteDataSet DeleteDataSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDataSet' {Text
dataSetId :: Text
$sel:dataSetId:DeleteDataSet' :: DeleteDataSet -> Text
dataSetId} -> Text
dataSetId) (\s :: DeleteDataSet
s@DeleteDataSet' {} Text
a -> DeleteDataSet
s {$sel:dataSetId:DeleteDataSet' :: Text
dataSetId = Text
a} :: DeleteDataSet)
instance Core.AWSRequest DeleteDataSet where
type
AWSResponse DeleteDataSet =
DeleteDataSetResponse
request :: DeleteDataSet -> Request DeleteDataSet
request = Service -> DeleteDataSet -> Request DeleteDataSet
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteDataSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteDataSet)))
response =
AWSResponse DeleteDataSet
-> Logger
-> Service
-> Proxy DeleteDataSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteDataSet)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteDataSet
DeleteDataSetResponse
DeleteDataSetResponse'
instance Prelude.Hashable DeleteDataSet
instance Prelude.NFData DeleteDataSet
instance Core.ToHeaders DeleteDataSet where
toHeaders :: DeleteDataSet -> [Header]
toHeaders =
[Header] -> DeleteDataSet -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DeleteDataSet where
toPath :: DeleteDataSet -> ByteString
toPath DeleteDataSet' {Text
dataSetId :: Text
$sel:dataSetId:DeleteDataSet' :: DeleteDataSet -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/v1/data-sets/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
dataSetId]
instance Core.ToQuery DeleteDataSet where
toQuery :: DeleteDataSet -> QueryString
toQuery = QueryString -> DeleteDataSet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteDataSetResponse = DeleteDataSetResponse'
{
}
deriving (DeleteDataSetResponse -> DeleteDataSetResponse -> Bool
(DeleteDataSetResponse -> DeleteDataSetResponse -> Bool)
-> (DeleteDataSetResponse -> DeleteDataSetResponse -> Bool)
-> Eq DeleteDataSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDataSetResponse -> DeleteDataSetResponse -> Bool
$c/= :: DeleteDataSetResponse -> DeleteDataSetResponse -> Bool
== :: DeleteDataSetResponse -> DeleteDataSetResponse -> Bool
$c== :: DeleteDataSetResponse -> DeleteDataSetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteDataSetResponse]
ReadPrec DeleteDataSetResponse
Int -> ReadS DeleteDataSetResponse
ReadS [DeleteDataSetResponse]
(Int -> ReadS DeleteDataSetResponse)
-> ReadS [DeleteDataSetResponse]
-> ReadPrec DeleteDataSetResponse
-> ReadPrec [DeleteDataSetResponse]
-> Read DeleteDataSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDataSetResponse]
$creadListPrec :: ReadPrec [DeleteDataSetResponse]
readPrec :: ReadPrec DeleteDataSetResponse
$creadPrec :: ReadPrec DeleteDataSetResponse
readList :: ReadS [DeleteDataSetResponse]
$creadList :: ReadS [DeleteDataSetResponse]
readsPrec :: Int -> ReadS DeleteDataSetResponse
$creadsPrec :: Int -> ReadS DeleteDataSetResponse
Prelude.Read, Int -> DeleteDataSetResponse -> ShowS
[DeleteDataSetResponse] -> ShowS
DeleteDataSetResponse -> String
(Int -> DeleteDataSetResponse -> ShowS)
-> (DeleteDataSetResponse -> String)
-> ([DeleteDataSetResponse] -> ShowS)
-> Show DeleteDataSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDataSetResponse] -> ShowS
$cshowList :: [DeleteDataSetResponse] -> ShowS
show :: DeleteDataSetResponse -> String
$cshow :: DeleteDataSetResponse -> String
showsPrec :: Int -> DeleteDataSetResponse -> ShowS
$cshowsPrec :: Int -> DeleteDataSetResponse -> ShowS
Prelude.Show, (forall x. DeleteDataSetResponse -> Rep DeleteDataSetResponse x)
-> (forall x. Rep DeleteDataSetResponse x -> DeleteDataSetResponse)
-> Generic DeleteDataSetResponse
forall x. Rep DeleteDataSetResponse x -> DeleteDataSetResponse
forall x. DeleteDataSetResponse -> Rep DeleteDataSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteDataSetResponse x -> DeleteDataSetResponse
$cfrom :: forall x. DeleteDataSetResponse -> Rep DeleteDataSetResponse x
Prelude.Generic)
newDeleteDataSetResponse ::
DeleteDataSetResponse
newDeleteDataSetResponse :: DeleteDataSetResponse
newDeleteDataSetResponse = DeleteDataSetResponse
DeleteDataSetResponse'
instance Prelude.NFData DeleteDataSetResponse