{-# 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.DeletePredictor
(
DeletePredictor (..),
newDeletePredictor,
deletePredictor_predictorArn,
DeletePredictorResponse (..),
newDeletePredictorResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Forecast.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeletePredictor = DeletePredictor'
{
DeletePredictor -> Text
predictorArn :: Prelude.Text
}
deriving (DeletePredictor -> DeletePredictor -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePredictor -> DeletePredictor -> Bool
$c/= :: DeletePredictor -> DeletePredictor -> Bool
== :: DeletePredictor -> DeletePredictor -> Bool
$c== :: DeletePredictor -> DeletePredictor -> Bool
Prelude.Eq, ReadPrec [DeletePredictor]
ReadPrec DeletePredictor
Int -> ReadS DeletePredictor
ReadS [DeletePredictor]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePredictor]
$creadListPrec :: ReadPrec [DeletePredictor]
readPrec :: ReadPrec DeletePredictor
$creadPrec :: ReadPrec DeletePredictor
readList :: ReadS [DeletePredictor]
$creadList :: ReadS [DeletePredictor]
readsPrec :: Int -> ReadS DeletePredictor
$creadsPrec :: Int -> ReadS DeletePredictor
Prelude.Read, Int -> DeletePredictor -> ShowS
[DeletePredictor] -> ShowS
DeletePredictor -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePredictor] -> ShowS
$cshowList :: [DeletePredictor] -> ShowS
show :: DeletePredictor -> String
$cshow :: DeletePredictor -> String
showsPrec :: Int -> DeletePredictor -> ShowS
$cshowsPrec :: Int -> DeletePredictor -> ShowS
Prelude.Show, forall x. Rep DeletePredictor x -> DeletePredictor
forall x. DeletePredictor -> Rep DeletePredictor x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeletePredictor x -> DeletePredictor
$cfrom :: forall x. DeletePredictor -> Rep DeletePredictor x
Prelude.Generic)
newDeletePredictor ::
Prelude.Text ->
DeletePredictor
newDeletePredictor :: Text -> DeletePredictor
newDeletePredictor Text
pPredictorArn_ =
DeletePredictor' {$sel:predictorArn:DeletePredictor' :: Text
predictorArn = Text
pPredictorArn_}
deletePredictor_predictorArn :: Lens.Lens' DeletePredictor Prelude.Text
deletePredictor_predictorArn :: Lens' DeletePredictor Text
deletePredictor_predictorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePredictor' {Text
predictorArn :: Text
$sel:predictorArn:DeletePredictor' :: DeletePredictor -> Text
predictorArn} -> Text
predictorArn) (\s :: DeletePredictor
s@DeletePredictor' {} Text
a -> DeletePredictor
s {$sel:predictorArn:DeletePredictor' :: Text
predictorArn = Text
a} :: DeletePredictor)
instance Core.AWSRequest DeletePredictor where
type
AWSResponse DeletePredictor =
DeletePredictorResponse
request :: (Service -> Service) -> DeletePredictor -> Request DeletePredictor
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeletePredictor
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeletePredictor)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeletePredictorResponse
DeletePredictorResponse'
instance Prelude.Hashable DeletePredictor where
hashWithSalt :: Int -> DeletePredictor -> Int
hashWithSalt Int
_salt DeletePredictor' {Text
predictorArn :: Text
$sel:predictorArn:DeletePredictor' :: DeletePredictor -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
predictorArn
instance Prelude.NFData DeletePredictor where
rnf :: DeletePredictor -> ()
rnf DeletePredictor' {Text
predictorArn :: Text
$sel:predictorArn:DeletePredictor' :: DeletePredictor -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
predictorArn
instance Data.ToHeaders DeletePredictor where
toHeaders :: DeletePredictor -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"AmazonForecast.DeletePredictor" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeletePredictor where
toJSON :: DeletePredictor -> Value
toJSON DeletePredictor' {Text
predictorArn :: Text
$sel:predictorArn:DeletePredictor' :: DeletePredictor -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"PredictorArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
predictorArn)]
)
instance Data.ToPath DeletePredictor where
toPath :: DeletePredictor -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeletePredictor where
toQuery :: DeletePredictor -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeletePredictorResponse = DeletePredictorResponse'
{
}
deriving (DeletePredictorResponse -> DeletePredictorResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePredictorResponse -> DeletePredictorResponse -> Bool
$c/= :: DeletePredictorResponse -> DeletePredictorResponse -> Bool
== :: DeletePredictorResponse -> DeletePredictorResponse -> Bool
$c== :: DeletePredictorResponse -> DeletePredictorResponse -> Bool
Prelude.Eq, ReadPrec [DeletePredictorResponse]
ReadPrec DeletePredictorResponse
Int -> ReadS DeletePredictorResponse
ReadS [DeletePredictorResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePredictorResponse]
$creadListPrec :: ReadPrec [DeletePredictorResponse]
readPrec :: ReadPrec DeletePredictorResponse
$creadPrec :: ReadPrec DeletePredictorResponse
readList :: ReadS [DeletePredictorResponse]
$creadList :: ReadS [DeletePredictorResponse]
readsPrec :: Int -> ReadS DeletePredictorResponse
$creadsPrec :: Int -> ReadS DeletePredictorResponse
Prelude.Read, Int -> DeletePredictorResponse -> ShowS
[DeletePredictorResponse] -> ShowS
DeletePredictorResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePredictorResponse] -> ShowS
$cshowList :: [DeletePredictorResponse] -> ShowS
show :: DeletePredictorResponse -> String
$cshow :: DeletePredictorResponse -> String
showsPrec :: Int -> DeletePredictorResponse -> ShowS
$cshowsPrec :: Int -> DeletePredictorResponse -> ShowS
Prelude.Show, forall x. Rep DeletePredictorResponse x -> DeletePredictorResponse
forall x. DeletePredictorResponse -> Rep DeletePredictorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeletePredictorResponse x -> DeletePredictorResponse
$cfrom :: forall x. DeletePredictorResponse -> Rep DeletePredictorResponse x
Prelude.Generic)
newDeletePredictorResponse ::
DeletePredictorResponse
newDeletePredictorResponse :: DeletePredictorResponse
newDeletePredictorResponse = DeletePredictorResponse
DeletePredictorResponse'
instance Prelude.NFData DeletePredictorResponse where
rnf :: DeletePredictorResponse -> ()
rnf DeletePredictorResponse
_ = ()