{-# 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.Glue.DeleteDataQualityRuleset
(
DeleteDataQualityRuleset (..),
newDeleteDataQualityRuleset,
deleteDataQualityRuleset_name,
DeleteDataQualityRulesetResponse (..),
newDeleteDataQualityRulesetResponse,
deleteDataQualityRulesetResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteDataQualityRuleset = DeleteDataQualityRuleset'
{
DeleteDataQualityRuleset -> Text
name :: Prelude.Text
}
deriving (DeleteDataQualityRuleset -> DeleteDataQualityRuleset -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDataQualityRuleset -> DeleteDataQualityRuleset -> Bool
$c/= :: DeleteDataQualityRuleset -> DeleteDataQualityRuleset -> Bool
== :: DeleteDataQualityRuleset -> DeleteDataQualityRuleset -> Bool
$c== :: DeleteDataQualityRuleset -> DeleteDataQualityRuleset -> Bool
Prelude.Eq, ReadPrec [DeleteDataQualityRuleset]
ReadPrec DeleteDataQualityRuleset
Int -> ReadS DeleteDataQualityRuleset
ReadS [DeleteDataQualityRuleset]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDataQualityRuleset]
$creadListPrec :: ReadPrec [DeleteDataQualityRuleset]
readPrec :: ReadPrec DeleteDataQualityRuleset
$creadPrec :: ReadPrec DeleteDataQualityRuleset
readList :: ReadS [DeleteDataQualityRuleset]
$creadList :: ReadS [DeleteDataQualityRuleset]
readsPrec :: Int -> ReadS DeleteDataQualityRuleset
$creadsPrec :: Int -> ReadS DeleteDataQualityRuleset
Prelude.Read, Int -> DeleteDataQualityRuleset -> ShowS
[DeleteDataQualityRuleset] -> ShowS
DeleteDataQualityRuleset -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDataQualityRuleset] -> ShowS
$cshowList :: [DeleteDataQualityRuleset] -> ShowS
show :: DeleteDataQualityRuleset -> String
$cshow :: DeleteDataQualityRuleset -> String
showsPrec :: Int -> DeleteDataQualityRuleset -> ShowS
$cshowsPrec :: Int -> DeleteDataQualityRuleset -> ShowS
Prelude.Show, forall x.
Rep DeleteDataQualityRuleset x -> DeleteDataQualityRuleset
forall x.
DeleteDataQualityRuleset -> Rep DeleteDataQualityRuleset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDataQualityRuleset x -> DeleteDataQualityRuleset
$cfrom :: forall x.
DeleteDataQualityRuleset -> Rep DeleteDataQualityRuleset x
Prelude.Generic)
newDeleteDataQualityRuleset ::
Prelude.Text ->
DeleteDataQualityRuleset
newDeleteDataQualityRuleset :: Text -> DeleteDataQualityRuleset
newDeleteDataQualityRuleset Text
pName_ =
DeleteDataQualityRuleset' {$sel:name:DeleteDataQualityRuleset' :: Text
name = Text
pName_}
deleteDataQualityRuleset_name :: Lens.Lens' DeleteDataQualityRuleset Prelude.Text
deleteDataQualityRuleset_name :: Lens' DeleteDataQualityRuleset Text
deleteDataQualityRuleset_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDataQualityRuleset' {Text
name :: Text
$sel:name:DeleteDataQualityRuleset' :: DeleteDataQualityRuleset -> Text
name} -> Text
name) (\s :: DeleteDataQualityRuleset
s@DeleteDataQualityRuleset' {} Text
a -> DeleteDataQualityRuleset
s {$sel:name:DeleteDataQualityRuleset' :: Text
name = Text
a} :: DeleteDataQualityRuleset)
instance Core.AWSRequest DeleteDataQualityRuleset where
type
AWSResponse DeleteDataQualityRuleset =
DeleteDataQualityRulesetResponse
request :: (Service -> Service)
-> DeleteDataQualityRuleset -> Request DeleteDataQualityRuleset
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 DeleteDataQualityRuleset
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteDataQualityRuleset)))
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 -> DeleteDataQualityRulesetResponse
DeleteDataQualityRulesetResponse'
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 DeleteDataQualityRuleset where
hashWithSalt :: Int -> DeleteDataQualityRuleset -> Int
hashWithSalt Int
_salt DeleteDataQualityRuleset' {Text
name :: Text
$sel:name:DeleteDataQualityRuleset' :: DeleteDataQualityRuleset -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData DeleteDataQualityRuleset where
rnf :: DeleteDataQualityRuleset -> ()
rnf DeleteDataQualityRuleset' {Text
name :: Text
$sel:name:DeleteDataQualityRuleset' :: DeleteDataQualityRuleset -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
name
instance Data.ToHeaders DeleteDataQualityRuleset where
toHeaders :: DeleteDataQualityRuleset -> ResponseHeaders
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 -> ResponseHeaders
Data.=# ( ByteString
"AWSGlue.DeleteDataQualityRuleset" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteDataQualityRuleset where
toJSON :: DeleteDataQualityRuleset -> Value
toJSON DeleteDataQualityRuleset' {Text
name :: Text
$sel:name:DeleteDataQualityRuleset' :: DeleteDataQualityRuleset -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)]
)
instance Data.ToPath DeleteDataQualityRuleset where
toPath :: DeleteDataQualityRuleset -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteDataQualityRuleset where
toQuery :: DeleteDataQualityRuleset -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteDataQualityRulesetResponse = DeleteDataQualityRulesetResponse'
{
DeleteDataQualityRulesetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteDataQualityRulesetResponse
-> DeleteDataQualityRulesetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDataQualityRulesetResponse
-> DeleteDataQualityRulesetResponse -> Bool
$c/= :: DeleteDataQualityRulesetResponse
-> DeleteDataQualityRulesetResponse -> Bool
== :: DeleteDataQualityRulesetResponse
-> DeleteDataQualityRulesetResponse -> Bool
$c== :: DeleteDataQualityRulesetResponse
-> DeleteDataQualityRulesetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteDataQualityRulesetResponse]
ReadPrec DeleteDataQualityRulesetResponse
Int -> ReadS DeleteDataQualityRulesetResponse
ReadS [DeleteDataQualityRulesetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDataQualityRulesetResponse]
$creadListPrec :: ReadPrec [DeleteDataQualityRulesetResponse]
readPrec :: ReadPrec DeleteDataQualityRulesetResponse
$creadPrec :: ReadPrec DeleteDataQualityRulesetResponse
readList :: ReadS [DeleteDataQualityRulesetResponse]
$creadList :: ReadS [DeleteDataQualityRulesetResponse]
readsPrec :: Int -> ReadS DeleteDataQualityRulesetResponse
$creadsPrec :: Int -> ReadS DeleteDataQualityRulesetResponse
Prelude.Read, Int -> DeleteDataQualityRulesetResponse -> ShowS
[DeleteDataQualityRulesetResponse] -> ShowS
DeleteDataQualityRulesetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDataQualityRulesetResponse] -> ShowS
$cshowList :: [DeleteDataQualityRulesetResponse] -> ShowS
show :: DeleteDataQualityRulesetResponse -> String
$cshow :: DeleteDataQualityRulesetResponse -> String
showsPrec :: Int -> DeleteDataQualityRulesetResponse -> ShowS
$cshowsPrec :: Int -> DeleteDataQualityRulesetResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteDataQualityRulesetResponse x
-> DeleteDataQualityRulesetResponse
forall x.
DeleteDataQualityRulesetResponse
-> Rep DeleteDataQualityRulesetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDataQualityRulesetResponse x
-> DeleteDataQualityRulesetResponse
$cfrom :: forall x.
DeleteDataQualityRulesetResponse
-> Rep DeleteDataQualityRulesetResponse x
Prelude.Generic)
newDeleteDataQualityRulesetResponse ::
Prelude.Int ->
DeleteDataQualityRulesetResponse
newDeleteDataQualityRulesetResponse :: Int -> DeleteDataQualityRulesetResponse
newDeleteDataQualityRulesetResponse Int
pHttpStatus_ =
DeleteDataQualityRulesetResponse'
{ $sel:httpStatus:DeleteDataQualityRulesetResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteDataQualityRulesetResponse_httpStatus :: Lens.Lens' DeleteDataQualityRulesetResponse Prelude.Int
deleteDataQualityRulesetResponse_httpStatus :: Lens' DeleteDataQualityRulesetResponse Int
deleteDataQualityRulesetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDataQualityRulesetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteDataQualityRulesetResponse' :: DeleteDataQualityRulesetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteDataQualityRulesetResponse
s@DeleteDataQualityRulesetResponse' {} Int
a -> DeleteDataQualityRulesetResponse
s {$sel:httpStatus:DeleteDataQualityRulesetResponse' :: Int
httpStatus = Int
a} :: DeleteDataQualityRulesetResponse)
instance
Prelude.NFData
DeleteDataQualityRulesetResponse
where
rnf :: DeleteDataQualityRulesetResponse -> ()
rnf DeleteDataQualityRulesetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteDataQualityRulesetResponse' :: DeleteDataQualityRulesetResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus