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