{-# 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.CodeBuild.DeleteReport
(
DeleteReport (..),
newDeleteReport,
deleteReport_arn,
DeleteReportResponse (..),
newDeleteReportResponse,
deleteReportResponse_httpStatus,
)
where
import Amazonka.CodeBuild.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 DeleteReport = DeleteReport'
{
DeleteReport -> Text
arn :: Prelude.Text
}
deriving (DeleteReport -> DeleteReport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReport -> DeleteReport -> Bool
$c/= :: DeleteReport -> DeleteReport -> Bool
== :: DeleteReport -> DeleteReport -> Bool
$c== :: DeleteReport -> DeleteReport -> Bool
Prelude.Eq, ReadPrec [DeleteReport]
ReadPrec DeleteReport
Int -> ReadS DeleteReport
ReadS [DeleteReport]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReport]
$creadListPrec :: ReadPrec [DeleteReport]
readPrec :: ReadPrec DeleteReport
$creadPrec :: ReadPrec DeleteReport
readList :: ReadS [DeleteReport]
$creadList :: ReadS [DeleteReport]
readsPrec :: Int -> ReadS DeleteReport
$creadsPrec :: Int -> ReadS DeleteReport
Prelude.Read, Int -> DeleteReport -> ShowS
[DeleteReport] -> ShowS
DeleteReport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReport] -> ShowS
$cshowList :: [DeleteReport] -> ShowS
show :: DeleteReport -> String
$cshow :: DeleteReport -> String
showsPrec :: Int -> DeleteReport -> ShowS
$cshowsPrec :: Int -> DeleteReport -> ShowS
Prelude.Show, forall x. Rep DeleteReport x -> DeleteReport
forall x. DeleteReport -> Rep DeleteReport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteReport x -> DeleteReport
$cfrom :: forall x. DeleteReport -> Rep DeleteReport x
Prelude.Generic)
newDeleteReport ::
Prelude.Text ->
DeleteReport
newDeleteReport :: Text -> DeleteReport
newDeleteReport Text
pArn_ = DeleteReport' {$sel:arn:DeleteReport' :: Text
arn = Text
pArn_}
deleteReport_arn :: Lens.Lens' DeleteReport Prelude.Text
deleteReport_arn :: Lens' DeleteReport Text
deleteReport_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReport' {Text
arn :: Text
$sel:arn:DeleteReport' :: DeleteReport -> Text
arn} -> Text
arn) (\s :: DeleteReport
s@DeleteReport' {} Text
a -> DeleteReport
s {$sel:arn:DeleteReport' :: Text
arn = Text
a} :: DeleteReport)
instance Core.AWSRequest DeleteReport where
type AWSResponse DeleteReport = DeleteReportResponse
request :: (Service -> Service) -> DeleteReport -> Request DeleteReport
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 DeleteReport
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteReport)))
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 -> DeleteReportResponse
DeleteReportResponse'
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 DeleteReport where
hashWithSalt :: Int -> DeleteReport -> Int
hashWithSalt Int
_salt DeleteReport' {Text
arn :: Text
$sel:arn:DeleteReport' :: DeleteReport -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData DeleteReport where
rnf :: DeleteReport -> ()
rnf DeleteReport' {Text
arn :: Text
$sel:arn:DeleteReport' :: DeleteReport -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
arn
instance Data.ToHeaders DeleteReport where
toHeaders :: DeleteReport -> 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
"CodeBuild_20161006.DeleteReport" ::
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 DeleteReport where
toJSON :: DeleteReport -> Value
toJSON DeleteReport' {Text
arn :: Text
$sel:arn:DeleteReport' :: DeleteReport -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"arn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
arn)]
)
instance Data.ToPath DeleteReport where
toPath :: DeleteReport -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteReport where
toQuery :: DeleteReport -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteReportResponse = DeleteReportResponse'
{
DeleteReportResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteReportResponse -> DeleteReportResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReportResponse -> DeleteReportResponse -> Bool
$c/= :: DeleteReportResponse -> DeleteReportResponse -> Bool
== :: DeleteReportResponse -> DeleteReportResponse -> Bool
$c== :: DeleteReportResponse -> DeleteReportResponse -> Bool
Prelude.Eq, ReadPrec [DeleteReportResponse]
ReadPrec DeleteReportResponse
Int -> ReadS DeleteReportResponse
ReadS [DeleteReportResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReportResponse]
$creadListPrec :: ReadPrec [DeleteReportResponse]
readPrec :: ReadPrec DeleteReportResponse
$creadPrec :: ReadPrec DeleteReportResponse
readList :: ReadS [DeleteReportResponse]
$creadList :: ReadS [DeleteReportResponse]
readsPrec :: Int -> ReadS DeleteReportResponse
$creadsPrec :: Int -> ReadS DeleteReportResponse
Prelude.Read, Int -> DeleteReportResponse -> ShowS
[DeleteReportResponse] -> ShowS
DeleteReportResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReportResponse] -> ShowS
$cshowList :: [DeleteReportResponse] -> ShowS
show :: DeleteReportResponse -> String
$cshow :: DeleteReportResponse -> String
showsPrec :: Int -> DeleteReportResponse -> ShowS
$cshowsPrec :: Int -> DeleteReportResponse -> ShowS
Prelude.Show, forall x. Rep DeleteReportResponse x -> DeleteReportResponse
forall x. DeleteReportResponse -> Rep DeleteReportResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteReportResponse x -> DeleteReportResponse
$cfrom :: forall x. DeleteReportResponse -> Rep DeleteReportResponse x
Prelude.Generic)
newDeleteReportResponse ::
Prelude.Int ->
DeleteReportResponse
newDeleteReportResponse :: Int -> DeleteReportResponse
newDeleteReportResponse Int
pHttpStatus_ =
DeleteReportResponse' {$sel:httpStatus:DeleteReportResponse' :: Int
httpStatus = Int
pHttpStatus_}
deleteReportResponse_httpStatus :: Lens.Lens' DeleteReportResponse Prelude.Int
deleteReportResponse_httpStatus :: Lens' DeleteReportResponse Int
deleteReportResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReportResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReportResponse' :: DeleteReportResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteReportResponse
s@DeleteReportResponse' {} Int
a -> DeleteReportResponse
s {$sel:httpStatus:DeleteReportResponse' :: Int
httpStatus = Int
a} :: DeleteReportResponse)
instance Prelude.NFData DeleteReportResponse where
rnf :: DeleteReportResponse -> ()
rnf DeleteReportResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReportResponse' :: DeleteReportResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus