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