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