{-# 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.CodeGuruProfiler.DeleteProfilingGroup
(
DeleteProfilingGroup (..),
newDeleteProfilingGroup,
deleteProfilingGroup_profilingGroupName,
DeleteProfilingGroupResponse (..),
newDeleteProfilingGroupResponse,
deleteProfilingGroupResponse_httpStatus,
)
where
import Amazonka.CodeGuruProfiler.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteProfilingGroup = DeleteProfilingGroup'
{
DeleteProfilingGroup -> Text
profilingGroupName :: Prelude.Text
}
deriving (DeleteProfilingGroup -> DeleteProfilingGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteProfilingGroup -> DeleteProfilingGroup -> Bool
$c/= :: DeleteProfilingGroup -> DeleteProfilingGroup -> Bool
== :: DeleteProfilingGroup -> DeleteProfilingGroup -> Bool
$c== :: DeleteProfilingGroup -> DeleteProfilingGroup -> Bool
Prelude.Eq, ReadPrec [DeleteProfilingGroup]
ReadPrec DeleteProfilingGroup
Int -> ReadS DeleteProfilingGroup
ReadS [DeleteProfilingGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteProfilingGroup]
$creadListPrec :: ReadPrec [DeleteProfilingGroup]
readPrec :: ReadPrec DeleteProfilingGroup
$creadPrec :: ReadPrec DeleteProfilingGroup
readList :: ReadS [DeleteProfilingGroup]
$creadList :: ReadS [DeleteProfilingGroup]
readsPrec :: Int -> ReadS DeleteProfilingGroup
$creadsPrec :: Int -> ReadS DeleteProfilingGroup
Prelude.Read, Int -> DeleteProfilingGroup -> ShowS
[DeleteProfilingGroup] -> ShowS
DeleteProfilingGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteProfilingGroup] -> ShowS
$cshowList :: [DeleteProfilingGroup] -> ShowS
show :: DeleteProfilingGroup -> String
$cshow :: DeleteProfilingGroup -> String
showsPrec :: Int -> DeleteProfilingGroup -> ShowS
$cshowsPrec :: Int -> DeleteProfilingGroup -> ShowS
Prelude.Show, forall x. Rep DeleteProfilingGroup x -> DeleteProfilingGroup
forall x. DeleteProfilingGroup -> Rep DeleteProfilingGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteProfilingGroup x -> DeleteProfilingGroup
$cfrom :: forall x. DeleteProfilingGroup -> Rep DeleteProfilingGroup x
Prelude.Generic)
newDeleteProfilingGroup ::
Prelude.Text ->
DeleteProfilingGroup
newDeleteProfilingGroup :: Text -> DeleteProfilingGroup
newDeleteProfilingGroup Text
pProfilingGroupName_ =
DeleteProfilingGroup'
{ $sel:profilingGroupName:DeleteProfilingGroup' :: Text
profilingGroupName =
Text
pProfilingGroupName_
}
deleteProfilingGroup_profilingGroupName :: Lens.Lens' DeleteProfilingGroup Prelude.Text
deleteProfilingGroup_profilingGroupName :: Lens' DeleteProfilingGroup Text
deleteProfilingGroup_profilingGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteProfilingGroup' {Text
profilingGroupName :: Text
$sel:profilingGroupName:DeleteProfilingGroup' :: DeleteProfilingGroup -> Text
profilingGroupName} -> Text
profilingGroupName) (\s :: DeleteProfilingGroup
s@DeleteProfilingGroup' {} Text
a -> DeleteProfilingGroup
s {$sel:profilingGroupName:DeleteProfilingGroup' :: Text
profilingGroupName = Text
a} :: DeleteProfilingGroup)
instance Core.AWSRequest DeleteProfilingGroup where
type
AWSResponse DeleteProfilingGroup =
DeleteProfilingGroupResponse
request :: (Service -> Service)
-> DeleteProfilingGroup -> Request DeleteProfilingGroup
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 DeleteProfilingGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteProfilingGroup)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteProfilingGroupResponse
DeleteProfilingGroupResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteProfilingGroup where
hashWithSalt :: Int -> DeleteProfilingGroup -> Int
hashWithSalt Int
_salt DeleteProfilingGroup' {Text
profilingGroupName :: Text
$sel:profilingGroupName:DeleteProfilingGroup' :: DeleteProfilingGroup -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
profilingGroupName
instance Prelude.NFData DeleteProfilingGroup where
rnf :: DeleteProfilingGroup -> ()
rnf DeleteProfilingGroup' {Text
profilingGroupName :: Text
$sel:profilingGroupName:DeleteProfilingGroup' :: DeleteProfilingGroup -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
profilingGroupName
instance Data.ToHeaders DeleteProfilingGroup where
toHeaders :: DeleteProfilingGroup -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DeleteProfilingGroup where
toPath :: DeleteProfilingGroup -> ByteString
toPath DeleteProfilingGroup' {Text
profilingGroupName :: Text
$sel:profilingGroupName:DeleteProfilingGroup' :: DeleteProfilingGroup -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/profilingGroups/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
profilingGroupName]
instance Data.ToQuery DeleteProfilingGroup where
toQuery :: DeleteProfilingGroup -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteProfilingGroupResponse = DeleteProfilingGroupResponse'
{
DeleteProfilingGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteProfilingGroupResponse
-> DeleteProfilingGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteProfilingGroupResponse
-> DeleteProfilingGroupResponse -> Bool
$c/= :: DeleteProfilingGroupResponse
-> DeleteProfilingGroupResponse -> Bool
== :: DeleteProfilingGroupResponse
-> DeleteProfilingGroupResponse -> Bool
$c== :: DeleteProfilingGroupResponse
-> DeleteProfilingGroupResponse -> Bool
Prelude.Eq, ReadPrec [DeleteProfilingGroupResponse]
ReadPrec DeleteProfilingGroupResponse
Int -> ReadS DeleteProfilingGroupResponse
ReadS [DeleteProfilingGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteProfilingGroupResponse]
$creadListPrec :: ReadPrec [DeleteProfilingGroupResponse]
readPrec :: ReadPrec DeleteProfilingGroupResponse
$creadPrec :: ReadPrec DeleteProfilingGroupResponse
readList :: ReadS [DeleteProfilingGroupResponse]
$creadList :: ReadS [DeleteProfilingGroupResponse]
readsPrec :: Int -> ReadS DeleteProfilingGroupResponse
$creadsPrec :: Int -> ReadS DeleteProfilingGroupResponse
Prelude.Read, Int -> DeleteProfilingGroupResponse -> ShowS
[DeleteProfilingGroupResponse] -> ShowS
DeleteProfilingGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteProfilingGroupResponse] -> ShowS
$cshowList :: [DeleteProfilingGroupResponse] -> ShowS
show :: DeleteProfilingGroupResponse -> String
$cshow :: DeleteProfilingGroupResponse -> String
showsPrec :: Int -> DeleteProfilingGroupResponse -> ShowS
$cshowsPrec :: Int -> DeleteProfilingGroupResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteProfilingGroupResponse x -> DeleteProfilingGroupResponse
forall x.
DeleteProfilingGroupResponse -> Rep DeleteProfilingGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteProfilingGroupResponse x -> DeleteProfilingGroupResponse
$cfrom :: forall x.
DeleteProfilingGroupResponse -> Rep DeleteProfilingGroupResponse x
Prelude.Generic)
newDeleteProfilingGroupResponse ::
Prelude.Int ->
DeleteProfilingGroupResponse
newDeleteProfilingGroupResponse :: Int -> DeleteProfilingGroupResponse
newDeleteProfilingGroupResponse Int
pHttpStatus_ =
DeleteProfilingGroupResponse'
{ $sel:httpStatus:DeleteProfilingGroupResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteProfilingGroupResponse_httpStatus :: Lens.Lens' DeleteProfilingGroupResponse Prelude.Int
deleteProfilingGroupResponse_httpStatus :: Lens' DeleteProfilingGroupResponse Int
deleteProfilingGroupResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteProfilingGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteProfilingGroupResponse' :: DeleteProfilingGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteProfilingGroupResponse
s@DeleteProfilingGroupResponse' {} Int
a -> DeleteProfilingGroupResponse
s {$sel:httpStatus:DeleteProfilingGroupResponse' :: Int
httpStatus = Int
a} :: DeleteProfilingGroupResponse)
instance Prelude.NFData DeleteProfilingGroupResponse where
rnf :: DeleteProfilingGroupResponse -> ()
rnf DeleteProfilingGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteProfilingGroupResponse' :: DeleteProfilingGroupResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus