{-# 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.GreengrassV2.DeleteCoreDevice
(
DeleteCoreDevice (..),
newDeleteCoreDevice,
deleteCoreDevice_coreDeviceThingName,
DeleteCoreDeviceResponse (..),
newDeleteCoreDeviceResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GreengrassV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteCoreDevice = DeleteCoreDevice'
{
DeleteCoreDevice -> Text
coreDeviceThingName :: Prelude.Text
}
deriving (DeleteCoreDevice -> DeleteCoreDevice -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCoreDevice -> DeleteCoreDevice -> Bool
$c/= :: DeleteCoreDevice -> DeleteCoreDevice -> Bool
== :: DeleteCoreDevice -> DeleteCoreDevice -> Bool
$c== :: DeleteCoreDevice -> DeleteCoreDevice -> Bool
Prelude.Eq, ReadPrec [DeleteCoreDevice]
ReadPrec DeleteCoreDevice
Int -> ReadS DeleteCoreDevice
ReadS [DeleteCoreDevice]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCoreDevice]
$creadListPrec :: ReadPrec [DeleteCoreDevice]
readPrec :: ReadPrec DeleteCoreDevice
$creadPrec :: ReadPrec DeleteCoreDevice
readList :: ReadS [DeleteCoreDevice]
$creadList :: ReadS [DeleteCoreDevice]
readsPrec :: Int -> ReadS DeleteCoreDevice
$creadsPrec :: Int -> ReadS DeleteCoreDevice
Prelude.Read, Int -> DeleteCoreDevice -> ShowS
[DeleteCoreDevice] -> ShowS
DeleteCoreDevice -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCoreDevice] -> ShowS
$cshowList :: [DeleteCoreDevice] -> ShowS
show :: DeleteCoreDevice -> String
$cshow :: DeleteCoreDevice -> String
showsPrec :: Int -> DeleteCoreDevice -> ShowS
$cshowsPrec :: Int -> DeleteCoreDevice -> ShowS
Prelude.Show, forall x. Rep DeleteCoreDevice x -> DeleteCoreDevice
forall x. DeleteCoreDevice -> Rep DeleteCoreDevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteCoreDevice x -> DeleteCoreDevice
$cfrom :: forall x. DeleteCoreDevice -> Rep DeleteCoreDevice x
Prelude.Generic)
newDeleteCoreDevice ::
Prelude.Text ->
DeleteCoreDevice
newDeleteCoreDevice :: Text -> DeleteCoreDevice
newDeleteCoreDevice Text
pCoreDeviceThingName_ =
DeleteCoreDevice'
{ $sel:coreDeviceThingName:DeleteCoreDevice' :: Text
coreDeviceThingName =
Text
pCoreDeviceThingName_
}
deleteCoreDevice_coreDeviceThingName :: Lens.Lens' DeleteCoreDevice Prelude.Text
deleteCoreDevice_coreDeviceThingName :: Lens' DeleteCoreDevice Text
deleteCoreDevice_coreDeviceThingName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCoreDevice' {Text
coreDeviceThingName :: Text
$sel:coreDeviceThingName:DeleteCoreDevice' :: DeleteCoreDevice -> Text
coreDeviceThingName} -> Text
coreDeviceThingName) (\s :: DeleteCoreDevice
s@DeleteCoreDevice' {} Text
a -> DeleteCoreDevice
s {$sel:coreDeviceThingName:DeleteCoreDevice' :: Text
coreDeviceThingName = Text
a} :: DeleteCoreDevice)
instance Core.AWSRequest DeleteCoreDevice where
type
AWSResponse DeleteCoreDevice =
DeleteCoreDeviceResponse
request :: (Service -> Service)
-> DeleteCoreDevice -> Request DeleteCoreDevice
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteCoreDevice
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteCoreDevice)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteCoreDeviceResponse
DeleteCoreDeviceResponse'
instance Prelude.Hashable DeleteCoreDevice where
hashWithSalt :: Int -> DeleteCoreDevice -> Int
hashWithSalt Int
_salt DeleteCoreDevice' {Text
coreDeviceThingName :: Text
$sel:coreDeviceThingName:DeleteCoreDevice' :: DeleteCoreDevice -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
coreDeviceThingName
instance Prelude.NFData DeleteCoreDevice where
rnf :: DeleteCoreDevice -> ()
rnf DeleteCoreDevice' {Text
coreDeviceThingName :: Text
$sel:coreDeviceThingName:DeleteCoreDevice' :: DeleteCoreDevice -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
coreDeviceThingName
instance Data.ToHeaders DeleteCoreDevice where
toHeaders :: DeleteCoreDevice -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeleteCoreDevice where
toPath :: DeleteCoreDevice -> ByteString
toPath DeleteCoreDevice' {Text
coreDeviceThingName :: Text
$sel:coreDeviceThingName:DeleteCoreDevice' :: DeleteCoreDevice -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/greengrass/v2/coreDevices/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
coreDeviceThingName
]
instance Data.ToQuery DeleteCoreDevice where
toQuery :: DeleteCoreDevice -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteCoreDeviceResponse = DeleteCoreDeviceResponse'
{
}
deriving (DeleteCoreDeviceResponse -> DeleteCoreDeviceResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCoreDeviceResponse -> DeleteCoreDeviceResponse -> Bool
$c/= :: DeleteCoreDeviceResponse -> DeleteCoreDeviceResponse -> Bool
== :: DeleteCoreDeviceResponse -> DeleteCoreDeviceResponse -> Bool
$c== :: DeleteCoreDeviceResponse -> DeleteCoreDeviceResponse -> Bool
Prelude.Eq, ReadPrec [DeleteCoreDeviceResponse]
ReadPrec DeleteCoreDeviceResponse
Int -> ReadS DeleteCoreDeviceResponse
ReadS [DeleteCoreDeviceResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCoreDeviceResponse]
$creadListPrec :: ReadPrec [DeleteCoreDeviceResponse]
readPrec :: ReadPrec DeleteCoreDeviceResponse
$creadPrec :: ReadPrec DeleteCoreDeviceResponse
readList :: ReadS [DeleteCoreDeviceResponse]
$creadList :: ReadS [DeleteCoreDeviceResponse]
readsPrec :: Int -> ReadS DeleteCoreDeviceResponse
$creadsPrec :: Int -> ReadS DeleteCoreDeviceResponse
Prelude.Read, Int -> DeleteCoreDeviceResponse -> ShowS
[DeleteCoreDeviceResponse] -> ShowS
DeleteCoreDeviceResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCoreDeviceResponse] -> ShowS
$cshowList :: [DeleteCoreDeviceResponse] -> ShowS
show :: DeleteCoreDeviceResponse -> String
$cshow :: DeleteCoreDeviceResponse -> String
showsPrec :: Int -> DeleteCoreDeviceResponse -> ShowS
$cshowsPrec :: Int -> DeleteCoreDeviceResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteCoreDeviceResponse x -> DeleteCoreDeviceResponse
forall x.
DeleteCoreDeviceResponse -> Rep DeleteCoreDeviceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteCoreDeviceResponse x -> DeleteCoreDeviceResponse
$cfrom :: forall x.
DeleteCoreDeviceResponse -> Rep DeleteCoreDeviceResponse x
Prelude.Generic)
newDeleteCoreDeviceResponse ::
DeleteCoreDeviceResponse
newDeleteCoreDeviceResponse :: DeleteCoreDeviceResponse
newDeleteCoreDeviceResponse =
DeleteCoreDeviceResponse
DeleteCoreDeviceResponse'
instance Prelude.NFData DeleteCoreDeviceResponse where
rnf :: DeleteCoreDeviceResponse -> ()
rnf DeleteCoreDeviceResponse
_ = ()