{-# 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.Config.DeleteEvaluationResults
(
DeleteEvaluationResults (..),
newDeleteEvaluationResults,
deleteEvaluationResults_configRuleName,
DeleteEvaluationResultsResponse (..),
newDeleteEvaluationResultsResponse,
deleteEvaluationResultsResponse_httpStatus,
)
where
import Amazonka.Config.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 DeleteEvaluationResults = DeleteEvaluationResults'
{
DeleteEvaluationResults -> Text
configRuleName :: Prelude.Text
}
deriving (DeleteEvaluationResults -> DeleteEvaluationResults -> Bool
(DeleteEvaluationResults -> DeleteEvaluationResults -> Bool)
-> (DeleteEvaluationResults -> DeleteEvaluationResults -> Bool)
-> Eq DeleteEvaluationResults
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEvaluationResults -> DeleteEvaluationResults -> Bool
$c/= :: DeleteEvaluationResults -> DeleteEvaluationResults -> Bool
== :: DeleteEvaluationResults -> DeleteEvaluationResults -> Bool
$c== :: DeleteEvaluationResults -> DeleteEvaluationResults -> Bool
Prelude.Eq, ReadPrec [DeleteEvaluationResults]
ReadPrec DeleteEvaluationResults
Int -> ReadS DeleteEvaluationResults
ReadS [DeleteEvaluationResults]
(Int -> ReadS DeleteEvaluationResults)
-> ReadS [DeleteEvaluationResults]
-> ReadPrec DeleteEvaluationResults
-> ReadPrec [DeleteEvaluationResults]
-> Read DeleteEvaluationResults
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEvaluationResults]
$creadListPrec :: ReadPrec [DeleteEvaluationResults]
readPrec :: ReadPrec DeleteEvaluationResults
$creadPrec :: ReadPrec DeleteEvaluationResults
readList :: ReadS [DeleteEvaluationResults]
$creadList :: ReadS [DeleteEvaluationResults]
readsPrec :: Int -> ReadS DeleteEvaluationResults
$creadsPrec :: Int -> ReadS DeleteEvaluationResults
Prelude.Read, Int -> DeleteEvaluationResults -> ShowS
[DeleteEvaluationResults] -> ShowS
DeleteEvaluationResults -> String
(Int -> DeleteEvaluationResults -> ShowS)
-> (DeleteEvaluationResults -> String)
-> ([DeleteEvaluationResults] -> ShowS)
-> Show DeleteEvaluationResults
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEvaluationResults] -> ShowS
$cshowList :: [DeleteEvaluationResults] -> ShowS
show :: DeleteEvaluationResults -> String
$cshow :: DeleteEvaluationResults -> String
showsPrec :: Int -> DeleteEvaluationResults -> ShowS
$cshowsPrec :: Int -> DeleteEvaluationResults -> ShowS
Prelude.Show, (forall x.
DeleteEvaluationResults -> Rep DeleteEvaluationResults x)
-> (forall x.
Rep DeleteEvaluationResults x -> DeleteEvaluationResults)
-> Generic DeleteEvaluationResults
forall x. Rep DeleteEvaluationResults x -> DeleteEvaluationResults
forall x. DeleteEvaluationResults -> Rep DeleteEvaluationResults x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteEvaluationResults x -> DeleteEvaluationResults
$cfrom :: forall x. DeleteEvaluationResults -> Rep DeleteEvaluationResults x
Prelude.Generic)
newDeleteEvaluationResults ::
Prelude.Text ->
DeleteEvaluationResults
newDeleteEvaluationResults :: Text -> DeleteEvaluationResults
newDeleteEvaluationResults Text
pConfigRuleName_ =
DeleteEvaluationResults' :: Text -> DeleteEvaluationResults
DeleteEvaluationResults'
{ $sel:configRuleName:DeleteEvaluationResults' :: Text
configRuleName =
Text
pConfigRuleName_
}
deleteEvaluationResults_configRuleName :: Lens.Lens' DeleteEvaluationResults Prelude.Text
deleteEvaluationResults_configRuleName :: (Text -> f Text)
-> DeleteEvaluationResults -> f DeleteEvaluationResults
deleteEvaluationResults_configRuleName = (DeleteEvaluationResults -> Text)
-> (DeleteEvaluationResults -> Text -> DeleteEvaluationResults)
-> Lens DeleteEvaluationResults DeleteEvaluationResults Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEvaluationResults' {Text
configRuleName :: Text
$sel:configRuleName:DeleteEvaluationResults' :: DeleteEvaluationResults -> Text
configRuleName} -> Text
configRuleName) (\s :: DeleteEvaluationResults
s@DeleteEvaluationResults' {} Text
a -> DeleteEvaluationResults
s {$sel:configRuleName:DeleteEvaluationResults' :: Text
configRuleName = Text
a} :: DeleteEvaluationResults)
instance Core.AWSRequest DeleteEvaluationResults where
type
AWSResponse DeleteEvaluationResults =
DeleteEvaluationResultsResponse
request :: DeleteEvaluationResults -> Request DeleteEvaluationResults
request = Service
-> DeleteEvaluationResults -> Request DeleteEvaluationResults
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteEvaluationResults
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteEvaluationResults)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteEvaluationResults))
-> Logger
-> Service
-> Proxy DeleteEvaluationResults
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteEvaluationResults)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteEvaluationResultsResponse
DeleteEvaluationResultsResponse'
(Int -> DeleteEvaluationResultsResponse)
-> Either String Int
-> Either String DeleteEvaluationResultsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteEvaluationResults
instance Prelude.NFData DeleteEvaluationResults
instance Core.ToHeaders DeleteEvaluationResults where
toHeaders :: DeleteEvaluationResults -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteEvaluationResults -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"StarlingDoveService.DeleteEvaluationResults" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteEvaluationResults where
toJSON :: DeleteEvaluationResults -> Value
toJSON DeleteEvaluationResults' {Text
configRuleName :: Text
$sel:configRuleName:DeleteEvaluationResults' :: DeleteEvaluationResults -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ConfigRuleName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
configRuleName)
]
)
instance Core.ToPath DeleteEvaluationResults where
toPath :: DeleteEvaluationResults -> ByteString
toPath = ByteString -> DeleteEvaluationResults -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteEvaluationResults where
toQuery :: DeleteEvaluationResults -> QueryString
toQuery = QueryString -> DeleteEvaluationResults -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteEvaluationResultsResponse = DeleteEvaluationResultsResponse'
{
DeleteEvaluationResultsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteEvaluationResultsResponse
-> DeleteEvaluationResultsResponse -> Bool
(DeleteEvaluationResultsResponse
-> DeleteEvaluationResultsResponse -> Bool)
-> (DeleteEvaluationResultsResponse
-> DeleteEvaluationResultsResponse -> Bool)
-> Eq DeleteEvaluationResultsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEvaluationResultsResponse
-> DeleteEvaluationResultsResponse -> Bool
$c/= :: DeleteEvaluationResultsResponse
-> DeleteEvaluationResultsResponse -> Bool
== :: DeleteEvaluationResultsResponse
-> DeleteEvaluationResultsResponse -> Bool
$c== :: DeleteEvaluationResultsResponse
-> DeleteEvaluationResultsResponse -> Bool
Prelude.Eq, ReadPrec [DeleteEvaluationResultsResponse]
ReadPrec DeleteEvaluationResultsResponse
Int -> ReadS DeleteEvaluationResultsResponse
ReadS [DeleteEvaluationResultsResponse]
(Int -> ReadS DeleteEvaluationResultsResponse)
-> ReadS [DeleteEvaluationResultsResponse]
-> ReadPrec DeleteEvaluationResultsResponse
-> ReadPrec [DeleteEvaluationResultsResponse]
-> Read DeleteEvaluationResultsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEvaluationResultsResponse]
$creadListPrec :: ReadPrec [DeleteEvaluationResultsResponse]
readPrec :: ReadPrec DeleteEvaluationResultsResponse
$creadPrec :: ReadPrec DeleteEvaluationResultsResponse
readList :: ReadS [DeleteEvaluationResultsResponse]
$creadList :: ReadS [DeleteEvaluationResultsResponse]
readsPrec :: Int -> ReadS DeleteEvaluationResultsResponse
$creadsPrec :: Int -> ReadS DeleteEvaluationResultsResponse
Prelude.Read, Int -> DeleteEvaluationResultsResponse -> ShowS
[DeleteEvaluationResultsResponse] -> ShowS
DeleteEvaluationResultsResponse -> String
(Int -> DeleteEvaluationResultsResponse -> ShowS)
-> (DeleteEvaluationResultsResponse -> String)
-> ([DeleteEvaluationResultsResponse] -> ShowS)
-> Show DeleteEvaluationResultsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEvaluationResultsResponse] -> ShowS
$cshowList :: [DeleteEvaluationResultsResponse] -> ShowS
show :: DeleteEvaluationResultsResponse -> String
$cshow :: DeleteEvaluationResultsResponse -> String
showsPrec :: Int -> DeleteEvaluationResultsResponse -> ShowS
$cshowsPrec :: Int -> DeleteEvaluationResultsResponse -> ShowS
Prelude.Show, (forall x.
DeleteEvaluationResultsResponse
-> Rep DeleteEvaluationResultsResponse x)
-> (forall x.
Rep DeleteEvaluationResultsResponse x
-> DeleteEvaluationResultsResponse)
-> Generic DeleteEvaluationResultsResponse
forall x.
Rep DeleteEvaluationResultsResponse x
-> DeleteEvaluationResultsResponse
forall x.
DeleteEvaluationResultsResponse
-> Rep DeleteEvaluationResultsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteEvaluationResultsResponse x
-> DeleteEvaluationResultsResponse
$cfrom :: forall x.
DeleteEvaluationResultsResponse
-> Rep DeleteEvaluationResultsResponse x
Prelude.Generic)
newDeleteEvaluationResultsResponse ::
Prelude.Int ->
DeleteEvaluationResultsResponse
newDeleteEvaluationResultsResponse :: Int -> DeleteEvaluationResultsResponse
newDeleteEvaluationResultsResponse Int
pHttpStatus_ =
DeleteEvaluationResultsResponse' :: Int -> DeleteEvaluationResultsResponse
DeleteEvaluationResultsResponse'
{ $sel:httpStatus:DeleteEvaluationResultsResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteEvaluationResultsResponse_httpStatus :: Lens.Lens' DeleteEvaluationResultsResponse Prelude.Int
deleteEvaluationResultsResponse_httpStatus :: (Int -> f Int)
-> DeleteEvaluationResultsResponse
-> f DeleteEvaluationResultsResponse
deleteEvaluationResultsResponse_httpStatus = (DeleteEvaluationResultsResponse -> Int)
-> (DeleteEvaluationResultsResponse
-> Int -> DeleteEvaluationResultsResponse)
-> Lens
DeleteEvaluationResultsResponse
DeleteEvaluationResultsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEvaluationResultsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteEvaluationResultsResponse' :: DeleteEvaluationResultsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteEvaluationResultsResponse
s@DeleteEvaluationResultsResponse' {} Int
a -> DeleteEvaluationResultsResponse
s {$sel:httpStatus:DeleteEvaluationResultsResponse' :: Int
httpStatus = Int
a} :: DeleteEvaluationResultsResponse)
instance
Prelude.NFData
DeleteEvaluationResultsResponse