{-# 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.Forecast.DeleteDatasetImportJob
(
DeleteDatasetImportJob (..),
newDeleteDatasetImportJob,
deleteDatasetImportJob_datasetImportJobArn,
DeleteDatasetImportJobResponse (..),
newDeleteDatasetImportJobResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Forecast.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 DeleteDatasetImportJob = DeleteDatasetImportJob'
{
DeleteDatasetImportJob -> Text
datasetImportJobArn :: Prelude.Text
}
deriving (DeleteDatasetImportJob -> DeleteDatasetImportJob -> Bool
(DeleteDatasetImportJob -> DeleteDatasetImportJob -> Bool)
-> (DeleteDatasetImportJob -> DeleteDatasetImportJob -> Bool)
-> Eq DeleteDatasetImportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDatasetImportJob -> DeleteDatasetImportJob -> Bool
$c/= :: DeleteDatasetImportJob -> DeleteDatasetImportJob -> Bool
== :: DeleteDatasetImportJob -> DeleteDatasetImportJob -> Bool
$c== :: DeleteDatasetImportJob -> DeleteDatasetImportJob -> Bool
Prelude.Eq, ReadPrec [DeleteDatasetImportJob]
ReadPrec DeleteDatasetImportJob
Int -> ReadS DeleteDatasetImportJob
ReadS [DeleteDatasetImportJob]
(Int -> ReadS DeleteDatasetImportJob)
-> ReadS [DeleteDatasetImportJob]
-> ReadPrec DeleteDatasetImportJob
-> ReadPrec [DeleteDatasetImportJob]
-> Read DeleteDatasetImportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDatasetImportJob]
$creadListPrec :: ReadPrec [DeleteDatasetImportJob]
readPrec :: ReadPrec DeleteDatasetImportJob
$creadPrec :: ReadPrec DeleteDatasetImportJob
readList :: ReadS [DeleteDatasetImportJob]
$creadList :: ReadS [DeleteDatasetImportJob]
readsPrec :: Int -> ReadS DeleteDatasetImportJob
$creadsPrec :: Int -> ReadS DeleteDatasetImportJob
Prelude.Read, Int -> DeleteDatasetImportJob -> ShowS
[DeleteDatasetImportJob] -> ShowS
DeleteDatasetImportJob -> String
(Int -> DeleteDatasetImportJob -> ShowS)
-> (DeleteDatasetImportJob -> String)
-> ([DeleteDatasetImportJob] -> ShowS)
-> Show DeleteDatasetImportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDatasetImportJob] -> ShowS
$cshowList :: [DeleteDatasetImportJob] -> ShowS
show :: DeleteDatasetImportJob -> String
$cshow :: DeleteDatasetImportJob -> String
showsPrec :: Int -> DeleteDatasetImportJob -> ShowS
$cshowsPrec :: Int -> DeleteDatasetImportJob -> ShowS
Prelude.Show, (forall x. DeleteDatasetImportJob -> Rep DeleteDatasetImportJob x)
-> (forall x.
Rep DeleteDatasetImportJob x -> DeleteDatasetImportJob)
-> Generic DeleteDatasetImportJob
forall x. Rep DeleteDatasetImportJob x -> DeleteDatasetImportJob
forall x. DeleteDatasetImportJob -> Rep DeleteDatasetImportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteDatasetImportJob x -> DeleteDatasetImportJob
$cfrom :: forall x. DeleteDatasetImportJob -> Rep DeleteDatasetImportJob x
Prelude.Generic)
newDeleteDatasetImportJob ::
Prelude.Text ->
DeleteDatasetImportJob
newDeleteDatasetImportJob :: Text -> DeleteDatasetImportJob
newDeleteDatasetImportJob Text
pDatasetImportJobArn_ =
DeleteDatasetImportJob' :: Text -> DeleteDatasetImportJob
DeleteDatasetImportJob'
{ $sel:datasetImportJobArn:DeleteDatasetImportJob' :: Text
datasetImportJobArn =
Text
pDatasetImportJobArn_
}
deleteDatasetImportJob_datasetImportJobArn :: Lens.Lens' DeleteDatasetImportJob Prelude.Text
deleteDatasetImportJob_datasetImportJobArn :: (Text -> f Text)
-> DeleteDatasetImportJob -> f DeleteDatasetImportJob
deleteDatasetImportJob_datasetImportJobArn = (DeleteDatasetImportJob -> Text)
-> (DeleteDatasetImportJob -> Text -> DeleteDatasetImportJob)
-> Lens DeleteDatasetImportJob DeleteDatasetImportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDatasetImportJob' {Text
datasetImportJobArn :: Text
$sel:datasetImportJobArn:DeleteDatasetImportJob' :: DeleteDatasetImportJob -> Text
datasetImportJobArn} -> Text
datasetImportJobArn) (\s :: DeleteDatasetImportJob
s@DeleteDatasetImportJob' {} Text
a -> DeleteDatasetImportJob
s {$sel:datasetImportJobArn:DeleteDatasetImportJob' :: Text
datasetImportJobArn = Text
a} :: DeleteDatasetImportJob)
instance Core.AWSRequest DeleteDatasetImportJob where
type
AWSResponse DeleteDatasetImportJob =
DeleteDatasetImportJobResponse
request :: DeleteDatasetImportJob -> Request DeleteDatasetImportJob
request = Service -> DeleteDatasetImportJob -> Request DeleteDatasetImportJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteDatasetImportJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDatasetImportJob)))
response =
AWSResponse DeleteDatasetImportJob
-> Logger
-> Service
-> Proxy DeleteDatasetImportJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDatasetImportJob)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteDatasetImportJob
DeleteDatasetImportJobResponse
DeleteDatasetImportJobResponse'
instance Prelude.Hashable DeleteDatasetImportJob
instance Prelude.NFData DeleteDatasetImportJob
instance Core.ToHeaders DeleteDatasetImportJob where
toHeaders :: DeleteDatasetImportJob -> [Header]
toHeaders =
[Header] -> DeleteDatasetImportJob -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"AmazonForecast.DeleteDatasetImportJob" ::
Prelude.ByteString
),
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.ToJSON DeleteDatasetImportJob where
toJSON :: DeleteDatasetImportJob -> Value
toJSON DeleteDatasetImportJob' {Text
datasetImportJobArn :: Text
$sel:datasetImportJobArn:DeleteDatasetImportJob' :: DeleteDatasetImportJob -> 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
"DatasetImportJobArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
datasetImportJobArn)
]
)
instance Core.ToPath DeleteDatasetImportJob where
toPath :: DeleteDatasetImportJob -> ByteString
toPath = ByteString -> DeleteDatasetImportJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteDatasetImportJob where
toQuery :: DeleteDatasetImportJob -> QueryString
toQuery = QueryString -> DeleteDatasetImportJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteDatasetImportJobResponse = DeleteDatasetImportJobResponse'
{
}
deriving (DeleteDatasetImportJobResponse
-> DeleteDatasetImportJobResponse -> Bool
(DeleteDatasetImportJobResponse
-> DeleteDatasetImportJobResponse -> Bool)
-> (DeleteDatasetImportJobResponse
-> DeleteDatasetImportJobResponse -> Bool)
-> Eq DeleteDatasetImportJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDatasetImportJobResponse
-> DeleteDatasetImportJobResponse -> Bool
$c/= :: DeleteDatasetImportJobResponse
-> DeleteDatasetImportJobResponse -> Bool
== :: DeleteDatasetImportJobResponse
-> DeleteDatasetImportJobResponse -> Bool
$c== :: DeleteDatasetImportJobResponse
-> DeleteDatasetImportJobResponse -> Bool
Prelude.Eq, ReadPrec [DeleteDatasetImportJobResponse]
ReadPrec DeleteDatasetImportJobResponse
Int -> ReadS DeleteDatasetImportJobResponse
ReadS [DeleteDatasetImportJobResponse]
(Int -> ReadS DeleteDatasetImportJobResponse)
-> ReadS [DeleteDatasetImportJobResponse]
-> ReadPrec DeleteDatasetImportJobResponse
-> ReadPrec [DeleteDatasetImportJobResponse]
-> Read DeleteDatasetImportJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDatasetImportJobResponse]
$creadListPrec :: ReadPrec [DeleteDatasetImportJobResponse]
readPrec :: ReadPrec DeleteDatasetImportJobResponse
$creadPrec :: ReadPrec DeleteDatasetImportJobResponse
readList :: ReadS [DeleteDatasetImportJobResponse]
$creadList :: ReadS [DeleteDatasetImportJobResponse]
readsPrec :: Int -> ReadS DeleteDatasetImportJobResponse
$creadsPrec :: Int -> ReadS DeleteDatasetImportJobResponse
Prelude.Read, Int -> DeleteDatasetImportJobResponse -> ShowS
[DeleteDatasetImportJobResponse] -> ShowS
DeleteDatasetImportJobResponse -> String
(Int -> DeleteDatasetImportJobResponse -> ShowS)
-> (DeleteDatasetImportJobResponse -> String)
-> ([DeleteDatasetImportJobResponse] -> ShowS)
-> Show DeleteDatasetImportJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDatasetImportJobResponse] -> ShowS
$cshowList :: [DeleteDatasetImportJobResponse] -> ShowS
show :: DeleteDatasetImportJobResponse -> String
$cshow :: DeleteDatasetImportJobResponse -> String
showsPrec :: Int -> DeleteDatasetImportJobResponse -> ShowS
$cshowsPrec :: Int -> DeleteDatasetImportJobResponse -> ShowS
Prelude.Show, (forall x.
DeleteDatasetImportJobResponse
-> Rep DeleteDatasetImportJobResponse x)
-> (forall x.
Rep DeleteDatasetImportJobResponse x
-> DeleteDatasetImportJobResponse)
-> Generic DeleteDatasetImportJobResponse
forall x.
Rep DeleteDatasetImportJobResponse x
-> DeleteDatasetImportJobResponse
forall x.
DeleteDatasetImportJobResponse
-> Rep DeleteDatasetImportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDatasetImportJobResponse x
-> DeleteDatasetImportJobResponse
$cfrom :: forall x.
DeleteDatasetImportJobResponse
-> Rep DeleteDatasetImportJobResponse x
Prelude.Generic)
newDeleteDatasetImportJobResponse ::
DeleteDatasetImportJobResponse
newDeleteDatasetImportJobResponse :: DeleteDatasetImportJobResponse
newDeleteDatasetImportJobResponse =
DeleteDatasetImportJobResponse
DeleteDatasetImportJobResponse'
instance
Prelude.NFData
DeleteDatasetImportJobResponse