{-# 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.DeleteAsset
(
DeleteAsset (..),
newDeleteAsset,
deleteAsset_revisionId,
deleteAsset_assetId,
deleteAsset_dataSetId,
DeleteAssetResponse (..),
newDeleteAssetResponse,
)
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 DeleteAsset = DeleteAsset'
{
DeleteAsset -> Text
revisionId :: Prelude.Text,
DeleteAsset -> Text
assetId :: Prelude.Text,
DeleteAsset -> Text
dataSetId :: Prelude.Text
}
deriving (DeleteAsset -> DeleteAsset -> Bool
(DeleteAsset -> DeleteAsset -> Bool)
-> (DeleteAsset -> DeleteAsset -> Bool) -> Eq DeleteAsset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAsset -> DeleteAsset -> Bool
$c/= :: DeleteAsset -> DeleteAsset -> Bool
== :: DeleteAsset -> DeleteAsset -> Bool
$c== :: DeleteAsset -> DeleteAsset -> Bool
Prelude.Eq, ReadPrec [DeleteAsset]
ReadPrec DeleteAsset
Int -> ReadS DeleteAsset
ReadS [DeleteAsset]
(Int -> ReadS DeleteAsset)
-> ReadS [DeleteAsset]
-> ReadPrec DeleteAsset
-> ReadPrec [DeleteAsset]
-> Read DeleteAsset
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAsset]
$creadListPrec :: ReadPrec [DeleteAsset]
readPrec :: ReadPrec DeleteAsset
$creadPrec :: ReadPrec DeleteAsset
readList :: ReadS [DeleteAsset]
$creadList :: ReadS [DeleteAsset]
readsPrec :: Int -> ReadS DeleteAsset
$creadsPrec :: Int -> ReadS DeleteAsset
Prelude.Read, Int -> DeleteAsset -> ShowS
[DeleteAsset] -> ShowS
DeleteAsset -> String
(Int -> DeleteAsset -> ShowS)
-> (DeleteAsset -> String)
-> ([DeleteAsset] -> ShowS)
-> Show DeleteAsset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAsset] -> ShowS
$cshowList :: [DeleteAsset] -> ShowS
show :: DeleteAsset -> String
$cshow :: DeleteAsset -> String
showsPrec :: Int -> DeleteAsset -> ShowS
$cshowsPrec :: Int -> DeleteAsset -> ShowS
Prelude.Show, (forall x. DeleteAsset -> Rep DeleteAsset x)
-> (forall x. Rep DeleteAsset x -> DeleteAsset)
-> Generic DeleteAsset
forall x. Rep DeleteAsset x -> DeleteAsset
forall x. DeleteAsset -> Rep DeleteAsset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAsset x -> DeleteAsset
$cfrom :: forall x. DeleteAsset -> Rep DeleteAsset x
Prelude.Generic)
newDeleteAsset ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteAsset
newDeleteAsset :: Text -> Text -> Text -> DeleteAsset
newDeleteAsset Text
pRevisionId_ Text
pAssetId_ Text
pDataSetId_ =
DeleteAsset' :: Text -> Text -> Text -> DeleteAsset
DeleteAsset'
{ $sel:revisionId:DeleteAsset' :: Text
revisionId = Text
pRevisionId_,
$sel:assetId:DeleteAsset' :: Text
assetId = Text
pAssetId_,
$sel:dataSetId:DeleteAsset' :: Text
dataSetId = Text
pDataSetId_
}
deleteAsset_revisionId :: Lens.Lens' DeleteAsset Prelude.Text
deleteAsset_revisionId :: (Text -> f Text) -> DeleteAsset -> f DeleteAsset
deleteAsset_revisionId = (DeleteAsset -> Text)
-> (DeleteAsset -> Text -> DeleteAsset)
-> Lens DeleteAsset DeleteAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAsset' {Text
revisionId :: Text
$sel:revisionId:DeleteAsset' :: DeleteAsset -> Text
revisionId} -> Text
revisionId) (\s :: DeleteAsset
s@DeleteAsset' {} Text
a -> DeleteAsset
s {$sel:revisionId:DeleteAsset' :: Text
revisionId = Text
a} :: DeleteAsset)
deleteAsset_assetId :: Lens.Lens' DeleteAsset Prelude.Text
deleteAsset_assetId :: (Text -> f Text) -> DeleteAsset -> f DeleteAsset
deleteAsset_assetId = (DeleteAsset -> Text)
-> (DeleteAsset -> Text -> DeleteAsset)
-> Lens DeleteAsset DeleteAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAsset' {Text
assetId :: Text
$sel:assetId:DeleteAsset' :: DeleteAsset -> Text
assetId} -> Text
assetId) (\s :: DeleteAsset
s@DeleteAsset' {} Text
a -> DeleteAsset
s {$sel:assetId:DeleteAsset' :: Text
assetId = Text
a} :: DeleteAsset)
deleteAsset_dataSetId :: Lens.Lens' DeleteAsset Prelude.Text
deleteAsset_dataSetId :: (Text -> f Text) -> DeleteAsset -> f DeleteAsset
deleteAsset_dataSetId = (DeleteAsset -> Text)
-> (DeleteAsset -> Text -> DeleteAsset)
-> Lens DeleteAsset DeleteAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAsset' {Text
dataSetId :: Text
$sel:dataSetId:DeleteAsset' :: DeleteAsset -> Text
dataSetId} -> Text
dataSetId) (\s :: DeleteAsset
s@DeleteAsset' {} Text
a -> DeleteAsset
s {$sel:dataSetId:DeleteAsset' :: Text
dataSetId = Text
a} :: DeleteAsset)
instance Core.AWSRequest DeleteAsset where
type AWSResponse DeleteAsset = DeleteAssetResponse
request :: DeleteAsset -> Request DeleteAsset
request = Service -> DeleteAsset -> Request DeleteAsset
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteAsset
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteAsset)))
response = AWSResponse DeleteAsset
-> Logger
-> Service
-> Proxy DeleteAsset
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteAsset)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteAsset
DeleteAssetResponse
DeleteAssetResponse'
instance Prelude.Hashable DeleteAsset
instance Prelude.NFData DeleteAsset
instance Core.ToHeaders DeleteAsset where
toHeaders :: DeleteAsset -> [Header]
toHeaders =
[Header] -> DeleteAsset -> [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 DeleteAsset where
toPath :: DeleteAsset -> ByteString
toPath DeleteAsset' {Text
dataSetId :: Text
assetId :: Text
revisionId :: Text
$sel:dataSetId:DeleteAsset' :: DeleteAsset -> Text
$sel:assetId:DeleteAsset' :: DeleteAsset -> Text
$sel:revisionId:DeleteAsset' :: DeleteAsset -> 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,
ByteString
"/revisions/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
revisionId,
ByteString
"/assets/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
assetId
]
instance Core.ToQuery DeleteAsset where
toQuery :: DeleteAsset -> QueryString
toQuery = QueryString -> DeleteAsset -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteAssetResponse = DeleteAssetResponse'
{
}
deriving (DeleteAssetResponse -> DeleteAssetResponse -> Bool
(DeleteAssetResponse -> DeleteAssetResponse -> Bool)
-> (DeleteAssetResponse -> DeleteAssetResponse -> Bool)
-> Eq DeleteAssetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAssetResponse -> DeleteAssetResponse -> Bool
$c/= :: DeleteAssetResponse -> DeleteAssetResponse -> Bool
== :: DeleteAssetResponse -> DeleteAssetResponse -> Bool
$c== :: DeleteAssetResponse -> DeleteAssetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAssetResponse]
ReadPrec DeleteAssetResponse
Int -> ReadS DeleteAssetResponse
ReadS [DeleteAssetResponse]
(Int -> ReadS DeleteAssetResponse)
-> ReadS [DeleteAssetResponse]
-> ReadPrec DeleteAssetResponse
-> ReadPrec [DeleteAssetResponse]
-> Read DeleteAssetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAssetResponse]
$creadListPrec :: ReadPrec [DeleteAssetResponse]
readPrec :: ReadPrec DeleteAssetResponse
$creadPrec :: ReadPrec DeleteAssetResponse
readList :: ReadS [DeleteAssetResponse]
$creadList :: ReadS [DeleteAssetResponse]
readsPrec :: Int -> ReadS DeleteAssetResponse
$creadsPrec :: Int -> ReadS DeleteAssetResponse
Prelude.Read, Int -> DeleteAssetResponse -> ShowS
[DeleteAssetResponse] -> ShowS
DeleteAssetResponse -> String
(Int -> DeleteAssetResponse -> ShowS)
-> (DeleteAssetResponse -> String)
-> ([DeleteAssetResponse] -> ShowS)
-> Show DeleteAssetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAssetResponse] -> ShowS
$cshowList :: [DeleteAssetResponse] -> ShowS
show :: DeleteAssetResponse -> String
$cshow :: DeleteAssetResponse -> String
showsPrec :: Int -> DeleteAssetResponse -> ShowS
$cshowsPrec :: Int -> DeleteAssetResponse -> ShowS
Prelude.Show, (forall x. DeleteAssetResponse -> Rep DeleteAssetResponse x)
-> (forall x. Rep DeleteAssetResponse x -> DeleteAssetResponse)
-> Generic DeleteAssetResponse
forall x. Rep DeleteAssetResponse x -> DeleteAssetResponse
forall x. DeleteAssetResponse -> Rep DeleteAssetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAssetResponse x -> DeleteAssetResponse
$cfrom :: forall x. DeleteAssetResponse -> Rep DeleteAssetResponse x
Prelude.Generic)
newDeleteAssetResponse ::
DeleteAssetResponse
newDeleteAssetResponse :: DeleteAssetResponse
newDeleteAssetResponse = DeleteAssetResponse
DeleteAssetResponse'
instance Prelude.NFData DeleteAssetResponse