{-# 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.AMP.DeleteRuleGroupsNamespace
(
DeleteRuleGroupsNamespace (..),
newDeleteRuleGroupsNamespace,
deleteRuleGroupsNamespace_clientToken,
deleteRuleGroupsNamespace_name,
deleteRuleGroupsNamespace_workspaceId,
DeleteRuleGroupsNamespaceResponse (..),
newDeleteRuleGroupsNamespaceResponse,
)
where
import Amazonka.AMP.Types
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
data DeleteRuleGroupsNamespace = DeleteRuleGroupsNamespace'
{
DeleteRuleGroupsNamespace -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
DeleteRuleGroupsNamespace -> Text
name :: Prelude.Text,
DeleteRuleGroupsNamespace -> Text
workspaceId :: Prelude.Text
}
deriving (DeleteRuleGroupsNamespace -> DeleteRuleGroupsNamespace -> Bool
(DeleteRuleGroupsNamespace -> DeleteRuleGroupsNamespace -> Bool)
-> (DeleteRuleGroupsNamespace -> DeleteRuleGroupsNamespace -> Bool)
-> Eq DeleteRuleGroupsNamespace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRuleGroupsNamespace -> DeleteRuleGroupsNamespace -> Bool
$c/= :: DeleteRuleGroupsNamespace -> DeleteRuleGroupsNamespace -> Bool
== :: DeleteRuleGroupsNamespace -> DeleteRuleGroupsNamespace -> Bool
$c== :: DeleteRuleGroupsNamespace -> DeleteRuleGroupsNamespace -> Bool
Prelude.Eq, ReadPrec [DeleteRuleGroupsNamespace]
ReadPrec DeleteRuleGroupsNamespace
Int -> ReadS DeleteRuleGroupsNamespace
ReadS [DeleteRuleGroupsNamespace]
(Int -> ReadS DeleteRuleGroupsNamespace)
-> ReadS [DeleteRuleGroupsNamespace]
-> ReadPrec DeleteRuleGroupsNamespace
-> ReadPrec [DeleteRuleGroupsNamespace]
-> Read DeleteRuleGroupsNamespace
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRuleGroupsNamespace]
$creadListPrec :: ReadPrec [DeleteRuleGroupsNamespace]
readPrec :: ReadPrec DeleteRuleGroupsNamespace
$creadPrec :: ReadPrec DeleteRuleGroupsNamespace
readList :: ReadS [DeleteRuleGroupsNamespace]
$creadList :: ReadS [DeleteRuleGroupsNamespace]
readsPrec :: Int -> ReadS DeleteRuleGroupsNamespace
$creadsPrec :: Int -> ReadS DeleteRuleGroupsNamespace
Prelude.Read, Int -> DeleteRuleGroupsNamespace -> ShowS
[DeleteRuleGroupsNamespace] -> ShowS
DeleteRuleGroupsNamespace -> String
(Int -> DeleteRuleGroupsNamespace -> ShowS)
-> (DeleteRuleGroupsNamespace -> String)
-> ([DeleteRuleGroupsNamespace] -> ShowS)
-> Show DeleteRuleGroupsNamespace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRuleGroupsNamespace] -> ShowS
$cshowList :: [DeleteRuleGroupsNamespace] -> ShowS
show :: DeleteRuleGroupsNamespace -> String
$cshow :: DeleteRuleGroupsNamespace -> String
showsPrec :: Int -> DeleteRuleGroupsNamespace -> ShowS
$cshowsPrec :: Int -> DeleteRuleGroupsNamespace -> ShowS
Prelude.Show, (forall x.
DeleteRuleGroupsNamespace -> Rep DeleteRuleGroupsNamespace x)
-> (forall x.
Rep DeleteRuleGroupsNamespace x -> DeleteRuleGroupsNamespace)
-> Generic DeleteRuleGroupsNamespace
forall x.
Rep DeleteRuleGroupsNamespace x -> DeleteRuleGroupsNamespace
forall x.
DeleteRuleGroupsNamespace -> Rep DeleteRuleGroupsNamespace x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRuleGroupsNamespace x -> DeleteRuleGroupsNamespace
$cfrom :: forall x.
DeleteRuleGroupsNamespace -> Rep DeleteRuleGroupsNamespace x
Prelude.Generic)
newDeleteRuleGroupsNamespace ::
Prelude.Text ->
Prelude.Text ->
DeleteRuleGroupsNamespace
newDeleteRuleGroupsNamespace :: Text -> Text -> DeleteRuleGroupsNamespace
newDeleteRuleGroupsNamespace Text
pName_ Text
pWorkspaceId_ =
DeleteRuleGroupsNamespace' :: Maybe Text -> Text -> Text -> DeleteRuleGroupsNamespace
DeleteRuleGroupsNamespace'
{ $sel:clientToken:DeleteRuleGroupsNamespace' :: Maybe Text
clientToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:DeleteRuleGroupsNamespace' :: Text
name = Text
pName_,
$sel:workspaceId:DeleteRuleGroupsNamespace' :: Text
workspaceId = Text
pWorkspaceId_
}
deleteRuleGroupsNamespace_clientToken :: Lens.Lens' DeleteRuleGroupsNamespace (Prelude.Maybe Prelude.Text)
deleteRuleGroupsNamespace_clientToken :: (Maybe Text -> f (Maybe Text))
-> DeleteRuleGroupsNamespace -> f DeleteRuleGroupsNamespace
deleteRuleGroupsNamespace_clientToken = (DeleteRuleGroupsNamespace -> Maybe Text)
-> (DeleteRuleGroupsNamespace
-> Maybe Text -> DeleteRuleGroupsNamespace)
-> Lens
DeleteRuleGroupsNamespace
DeleteRuleGroupsNamespace
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRuleGroupsNamespace' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:DeleteRuleGroupsNamespace' :: DeleteRuleGroupsNamespace -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: DeleteRuleGroupsNamespace
s@DeleteRuleGroupsNamespace' {} Maybe Text
a -> DeleteRuleGroupsNamespace
s {$sel:clientToken:DeleteRuleGroupsNamespace' :: Maybe Text
clientToken = Maybe Text
a} :: DeleteRuleGroupsNamespace)
deleteRuleGroupsNamespace_name :: Lens.Lens' DeleteRuleGroupsNamespace Prelude.Text
deleteRuleGroupsNamespace_name :: (Text -> f Text)
-> DeleteRuleGroupsNamespace -> f DeleteRuleGroupsNamespace
deleteRuleGroupsNamespace_name = (DeleteRuleGroupsNamespace -> Text)
-> (DeleteRuleGroupsNamespace -> Text -> DeleteRuleGroupsNamespace)
-> Lens
DeleteRuleGroupsNamespace DeleteRuleGroupsNamespace Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRuleGroupsNamespace' {Text
name :: Text
$sel:name:DeleteRuleGroupsNamespace' :: DeleteRuleGroupsNamespace -> Text
name} -> Text
name) (\s :: DeleteRuleGroupsNamespace
s@DeleteRuleGroupsNamespace' {} Text
a -> DeleteRuleGroupsNamespace
s {$sel:name:DeleteRuleGroupsNamespace' :: Text
name = Text
a} :: DeleteRuleGroupsNamespace)
deleteRuleGroupsNamespace_workspaceId :: Lens.Lens' DeleteRuleGroupsNamespace Prelude.Text
deleteRuleGroupsNamespace_workspaceId :: (Text -> f Text)
-> DeleteRuleGroupsNamespace -> f DeleteRuleGroupsNamespace
deleteRuleGroupsNamespace_workspaceId = (DeleteRuleGroupsNamespace -> Text)
-> (DeleteRuleGroupsNamespace -> Text -> DeleteRuleGroupsNamespace)
-> Lens
DeleteRuleGroupsNamespace DeleteRuleGroupsNamespace Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRuleGroupsNamespace' {Text
workspaceId :: Text
$sel:workspaceId:DeleteRuleGroupsNamespace' :: DeleteRuleGroupsNamespace -> Text
workspaceId} -> Text
workspaceId) (\s :: DeleteRuleGroupsNamespace
s@DeleteRuleGroupsNamespace' {} Text
a -> DeleteRuleGroupsNamespace
s {$sel:workspaceId:DeleteRuleGroupsNamespace' :: Text
workspaceId = Text
a} :: DeleteRuleGroupsNamespace)
instance Core.AWSRequest DeleteRuleGroupsNamespace where
type
AWSResponse DeleteRuleGroupsNamespace =
DeleteRuleGroupsNamespaceResponse
request :: DeleteRuleGroupsNamespace -> Request DeleteRuleGroupsNamespace
request = Service
-> DeleteRuleGroupsNamespace -> Request DeleteRuleGroupsNamespace
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteRuleGroupsNamespace
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRuleGroupsNamespace)))
response =
AWSResponse DeleteRuleGroupsNamespace
-> Logger
-> Service
-> Proxy DeleteRuleGroupsNamespace
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRuleGroupsNamespace)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteRuleGroupsNamespace
DeleteRuleGroupsNamespaceResponse
DeleteRuleGroupsNamespaceResponse'
instance Prelude.Hashable DeleteRuleGroupsNamespace
instance Prelude.NFData DeleteRuleGroupsNamespace
instance Core.ToHeaders DeleteRuleGroupsNamespace where
toHeaders :: DeleteRuleGroupsNamespace -> [Header]
toHeaders =
[Header] -> DeleteRuleGroupsNamespace -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath DeleteRuleGroupsNamespace where
toPath :: DeleteRuleGroupsNamespace -> ByteString
toPath DeleteRuleGroupsNamespace' {Maybe Text
Text
workspaceId :: Text
name :: Text
clientToken :: Maybe Text
$sel:workspaceId:DeleteRuleGroupsNamespace' :: DeleteRuleGroupsNamespace -> Text
$sel:name:DeleteRuleGroupsNamespace' :: DeleteRuleGroupsNamespace -> Text
$sel:clientToken:DeleteRuleGroupsNamespace' :: DeleteRuleGroupsNamespace -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/workspaces/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
workspaceId,
ByteString
"/rulegroupsnamespaces/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name
]
instance Core.ToQuery DeleteRuleGroupsNamespace where
toQuery :: DeleteRuleGroupsNamespace -> QueryString
toQuery DeleteRuleGroupsNamespace' {Maybe Text
Text
workspaceId :: Text
name :: Text
clientToken :: Maybe Text
$sel:workspaceId:DeleteRuleGroupsNamespace' :: DeleteRuleGroupsNamespace -> Text
$sel:name:DeleteRuleGroupsNamespace' :: DeleteRuleGroupsNamespace -> Text
$sel:clientToken:DeleteRuleGroupsNamespace' :: DeleteRuleGroupsNamespace -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"clientToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clientToken]
data DeleteRuleGroupsNamespaceResponse = DeleteRuleGroupsNamespaceResponse'
{
}
deriving (DeleteRuleGroupsNamespaceResponse
-> DeleteRuleGroupsNamespaceResponse -> Bool
(DeleteRuleGroupsNamespaceResponse
-> DeleteRuleGroupsNamespaceResponse -> Bool)
-> (DeleteRuleGroupsNamespaceResponse
-> DeleteRuleGroupsNamespaceResponse -> Bool)
-> Eq DeleteRuleGroupsNamespaceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRuleGroupsNamespaceResponse
-> DeleteRuleGroupsNamespaceResponse -> Bool
$c/= :: DeleteRuleGroupsNamespaceResponse
-> DeleteRuleGroupsNamespaceResponse -> Bool
== :: DeleteRuleGroupsNamespaceResponse
-> DeleteRuleGroupsNamespaceResponse -> Bool
$c== :: DeleteRuleGroupsNamespaceResponse
-> DeleteRuleGroupsNamespaceResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRuleGroupsNamespaceResponse]
ReadPrec DeleteRuleGroupsNamespaceResponse
Int -> ReadS DeleteRuleGroupsNamespaceResponse
ReadS [DeleteRuleGroupsNamespaceResponse]
(Int -> ReadS DeleteRuleGroupsNamespaceResponse)
-> ReadS [DeleteRuleGroupsNamespaceResponse]
-> ReadPrec DeleteRuleGroupsNamespaceResponse
-> ReadPrec [DeleteRuleGroupsNamespaceResponse]
-> Read DeleteRuleGroupsNamespaceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRuleGroupsNamespaceResponse]
$creadListPrec :: ReadPrec [DeleteRuleGroupsNamespaceResponse]
readPrec :: ReadPrec DeleteRuleGroupsNamespaceResponse
$creadPrec :: ReadPrec DeleteRuleGroupsNamespaceResponse
readList :: ReadS [DeleteRuleGroupsNamespaceResponse]
$creadList :: ReadS [DeleteRuleGroupsNamespaceResponse]
readsPrec :: Int -> ReadS DeleteRuleGroupsNamespaceResponse
$creadsPrec :: Int -> ReadS DeleteRuleGroupsNamespaceResponse
Prelude.Read, Int -> DeleteRuleGroupsNamespaceResponse -> ShowS
[DeleteRuleGroupsNamespaceResponse] -> ShowS
DeleteRuleGroupsNamespaceResponse -> String
(Int -> DeleteRuleGroupsNamespaceResponse -> ShowS)
-> (DeleteRuleGroupsNamespaceResponse -> String)
-> ([DeleteRuleGroupsNamespaceResponse] -> ShowS)
-> Show DeleteRuleGroupsNamespaceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRuleGroupsNamespaceResponse] -> ShowS
$cshowList :: [DeleteRuleGroupsNamespaceResponse] -> ShowS
show :: DeleteRuleGroupsNamespaceResponse -> String
$cshow :: DeleteRuleGroupsNamespaceResponse -> String
showsPrec :: Int -> DeleteRuleGroupsNamespaceResponse -> ShowS
$cshowsPrec :: Int -> DeleteRuleGroupsNamespaceResponse -> ShowS
Prelude.Show, (forall x.
DeleteRuleGroupsNamespaceResponse
-> Rep DeleteRuleGroupsNamespaceResponse x)
-> (forall x.
Rep DeleteRuleGroupsNamespaceResponse x
-> DeleteRuleGroupsNamespaceResponse)
-> Generic DeleteRuleGroupsNamespaceResponse
forall x.
Rep DeleteRuleGroupsNamespaceResponse x
-> DeleteRuleGroupsNamespaceResponse
forall x.
DeleteRuleGroupsNamespaceResponse
-> Rep DeleteRuleGroupsNamespaceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRuleGroupsNamespaceResponse x
-> DeleteRuleGroupsNamespaceResponse
$cfrom :: forall x.
DeleteRuleGroupsNamespaceResponse
-> Rep DeleteRuleGroupsNamespaceResponse x
Prelude.Generic)
newDeleteRuleGroupsNamespaceResponse ::
DeleteRuleGroupsNamespaceResponse
newDeleteRuleGroupsNamespaceResponse :: DeleteRuleGroupsNamespaceResponse
newDeleteRuleGroupsNamespaceResponse =
DeleteRuleGroupsNamespaceResponse
DeleteRuleGroupsNamespaceResponse'
instance
Prelude.NFData
DeleteRuleGroupsNamespaceResponse