{-# 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.CodeCommit.PostCommentForPullRequest
(
PostCommentForPullRequest (..),
newPostCommentForPullRequest,
postCommentForPullRequest_location,
postCommentForPullRequest_clientRequestToken,
postCommentForPullRequest_pullRequestId,
postCommentForPullRequest_repositoryName,
postCommentForPullRequest_beforeCommitId,
postCommentForPullRequest_afterCommitId,
postCommentForPullRequest_content,
PostCommentForPullRequestResponse (..),
newPostCommentForPullRequestResponse,
postCommentForPullRequestResponse_beforeBlobId,
postCommentForPullRequestResponse_location,
postCommentForPullRequestResponse_afterCommitId,
postCommentForPullRequestResponse_pullRequestId,
postCommentForPullRequestResponse_afterBlobId,
postCommentForPullRequestResponse_beforeCommitId,
postCommentForPullRequestResponse_repositoryName,
postCommentForPullRequestResponse_comment,
postCommentForPullRequestResponse_httpStatus,
)
where
import Amazonka.CodeCommit.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 =
{
:: Prelude.Maybe Location,
:: Prelude.Maybe Prelude.Text,
:: Prelude.Text,
:: Prelude.Text,
:: Prelude.Text,
:: Prelude.Text,
:: Prelude.Text
}
deriving (PostCommentForPullRequest -> PostCommentForPullRequest -> Bool
(PostCommentForPullRequest -> PostCommentForPullRequest -> Bool)
-> (PostCommentForPullRequest -> PostCommentForPullRequest -> Bool)
-> Eq PostCommentForPullRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostCommentForPullRequest -> PostCommentForPullRequest -> Bool
$c/= :: PostCommentForPullRequest -> PostCommentForPullRequest -> Bool
== :: PostCommentForPullRequest -> PostCommentForPullRequest -> Bool
$c== :: PostCommentForPullRequest -> PostCommentForPullRequest -> Bool
Prelude.Eq, ReadPrec [PostCommentForPullRequest]
ReadPrec PostCommentForPullRequest
Int -> ReadS PostCommentForPullRequest
ReadS [PostCommentForPullRequest]
(Int -> ReadS PostCommentForPullRequest)
-> ReadS [PostCommentForPullRequest]
-> ReadPrec PostCommentForPullRequest
-> ReadPrec [PostCommentForPullRequest]
-> Read PostCommentForPullRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PostCommentForPullRequest]
$creadListPrec :: ReadPrec [PostCommentForPullRequest]
readPrec :: ReadPrec PostCommentForPullRequest
$creadPrec :: ReadPrec PostCommentForPullRequest
readList :: ReadS [PostCommentForPullRequest]
$creadList :: ReadS [PostCommentForPullRequest]
readsPrec :: Int -> ReadS PostCommentForPullRequest
$creadsPrec :: Int -> ReadS PostCommentForPullRequest
Prelude.Read, Int -> PostCommentForPullRequest -> ShowS
[PostCommentForPullRequest] -> ShowS
PostCommentForPullRequest -> String
(Int -> PostCommentForPullRequest -> ShowS)
-> (PostCommentForPullRequest -> String)
-> ([PostCommentForPullRequest] -> ShowS)
-> Show PostCommentForPullRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PostCommentForPullRequest] -> ShowS
$cshowList :: [PostCommentForPullRequest] -> ShowS
show :: PostCommentForPullRequest -> String
$cshow :: PostCommentForPullRequest -> String
showsPrec :: Int -> PostCommentForPullRequest -> ShowS
$cshowsPrec :: Int -> PostCommentForPullRequest -> ShowS
Prelude.Show, (forall x.
PostCommentForPullRequest -> Rep PostCommentForPullRequest x)
-> (forall x.
Rep PostCommentForPullRequest x -> PostCommentForPullRequest)
-> Generic PostCommentForPullRequest
forall x.
Rep PostCommentForPullRequest x -> PostCommentForPullRequest
forall x.
PostCommentForPullRequest -> Rep PostCommentForPullRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PostCommentForPullRequest x -> PostCommentForPullRequest
$cfrom :: forall x.
PostCommentForPullRequest -> Rep PostCommentForPullRequest x
Prelude.Generic)
newPostCommentForPullRequest ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
PostCommentForPullRequest
Text
pPullRequestId_
Text
pRepositoryName_
Text
pBeforeCommitId_
Text
pAfterCommitId_
Text
pContent_ =
PostCommentForPullRequest' :: Maybe Location
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> PostCommentForPullRequest
PostCommentForPullRequest'
{ $sel:location:PostCommentForPullRequest' :: Maybe Location
location =
Maybe Location
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:PostCommentForPullRequest' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestId:PostCommentForPullRequest' :: Text
pullRequestId = Text
pPullRequestId_,
$sel:repositoryName:PostCommentForPullRequest' :: Text
repositoryName = Text
pRepositoryName_,
$sel:beforeCommitId:PostCommentForPullRequest' :: Text
beforeCommitId = Text
pBeforeCommitId_,
$sel:afterCommitId:PostCommentForPullRequest' :: Text
afterCommitId = Text
pAfterCommitId_,
$sel:content:PostCommentForPullRequest' :: Text
content = Text
pContent_
}
postCommentForPullRequest_location :: Lens.Lens' PostCommentForPullRequest (Prelude.Maybe Location)
= (PostCommentForPullRequest -> Maybe Location)
-> (PostCommentForPullRequest
-> Maybe Location -> PostCommentForPullRequest)
-> Lens
PostCommentForPullRequest
PostCommentForPullRequest
(Maybe Location)
(Maybe Location)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequest' {Maybe Location
location :: Maybe Location
$sel:location:PostCommentForPullRequest' :: PostCommentForPullRequest -> Maybe Location
location} -> Maybe Location
location) (\s :: PostCommentForPullRequest
s@PostCommentForPullRequest' {} Maybe Location
a -> PostCommentForPullRequest
s {$sel:location:PostCommentForPullRequest' :: Maybe Location
location = Maybe Location
a} :: PostCommentForPullRequest)
postCommentForPullRequest_clientRequestToken :: Lens.Lens' PostCommentForPullRequest (Prelude.Maybe Prelude.Text)
= (PostCommentForPullRequest -> Maybe Text)
-> (PostCommentForPullRequest
-> Maybe Text -> PostCommentForPullRequest)
-> Lens
PostCommentForPullRequest
PostCommentForPullRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequest' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:PostCommentForPullRequest' :: PostCommentForPullRequest -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: PostCommentForPullRequest
s@PostCommentForPullRequest' {} Maybe Text
a -> PostCommentForPullRequest
s {$sel:clientRequestToken:PostCommentForPullRequest' :: Maybe Text
clientRequestToken = Maybe Text
a} :: PostCommentForPullRequest)
postCommentForPullRequest_pullRequestId :: Lens.Lens' PostCommentForPullRequest Prelude.Text
= (PostCommentForPullRequest -> Text)
-> (PostCommentForPullRequest -> Text -> PostCommentForPullRequest)
-> Lens
PostCommentForPullRequest PostCommentForPullRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequest' {Text
pullRequestId :: Text
$sel:pullRequestId:PostCommentForPullRequest' :: PostCommentForPullRequest -> Text
pullRequestId} -> Text
pullRequestId) (\s :: PostCommentForPullRequest
s@PostCommentForPullRequest' {} Text
a -> PostCommentForPullRequest
s {$sel:pullRequestId:PostCommentForPullRequest' :: Text
pullRequestId = Text
a} :: PostCommentForPullRequest)
postCommentForPullRequest_repositoryName :: Lens.Lens' PostCommentForPullRequest Prelude.Text
= (PostCommentForPullRequest -> Text)
-> (PostCommentForPullRequest -> Text -> PostCommentForPullRequest)
-> Lens
PostCommentForPullRequest PostCommentForPullRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequest' {Text
repositoryName :: Text
$sel:repositoryName:PostCommentForPullRequest' :: PostCommentForPullRequest -> Text
repositoryName} -> Text
repositoryName) (\s :: PostCommentForPullRequest
s@PostCommentForPullRequest' {} Text
a -> PostCommentForPullRequest
s {$sel:repositoryName:PostCommentForPullRequest' :: Text
repositoryName = Text
a} :: PostCommentForPullRequest)
postCommentForPullRequest_beforeCommitId :: Lens.Lens' PostCommentForPullRequest Prelude.Text
= (PostCommentForPullRequest -> Text)
-> (PostCommentForPullRequest -> Text -> PostCommentForPullRequest)
-> Lens
PostCommentForPullRequest PostCommentForPullRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequest' {Text
beforeCommitId :: Text
$sel:beforeCommitId:PostCommentForPullRequest' :: PostCommentForPullRequest -> Text
beforeCommitId} -> Text
beforeCommitId) (\s :: PostCommentForPullRequest
s@PostCommentForPullRequest' {} Text
a -> PostCommentForPullRequest
s {$sel:beforeCommitId:PostCommentForPullRequest' :: Text
beforeCommitId = Text
a} :: PostCommentForPullRequest)
postCommentForPullRequest_afterCommitId :: Lens.Lens' PostCommentForPullRequest Prelude.Text
= (PostCommentForPullRequest -> Text)
-> (PostCommentForPullRequest -> Text -> PostCommentForPullRequest)
-> Lens
PostCommentForPullRequest PostCommentForPullRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequest' {Text
afterCommitId :: Text
$sel:afterCommitId:PostCommentForPullRequest' :: PostCommentForPullRequest -> Text
afterCommitId} -> Text
afterCommitId) (\s :: PostCommentForPullRequest
s@PostCommentForPullRequest' {} Text
a -> PostCommentForPullRequest
s {$sel:afterCommitId:PostCommentForPullRequest' :: Text
afterCommitId = Text
a} :: PostCommentForPullRequest)
postCommentForPullRequest_content :: Lens.Lens' PostCommentForPullRequest Prelude.Text
= (PostCommentForPullRequest -> Text)
-> (PostCommentForPullRequest -> Text -> PostCommentForPullRequest)
-> Lens
PostCommentForPullRequest PostCommentForPullRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequest' {Text
content :: Text
$sel:content:PostCommentForPullRequest' :: PostCommentForPullRequest -> Text
content} -> Text
content) (\s :: PostCommentForPullRequest
s@PostCommentForPullRequest' {} Text
a -> PostCommentForPullRequest
s {$sel:content:PostCommentForPullRequest' :: Text
content = Text
a} :: PostCommentForPullRequest)
instance Core.AWSRequest PostCommentForPullRequest where
type
AWSResponse PostCommentForPullRequest =
PostCommentForPullRequestResponse
request :: PostCommentForPullRequest -> Request PostCommentForPullRequest
request = Service
-> PostCommentForPullRequest -> Request PostCommentForPullRequest
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PostCommentForPullRequest
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse PostCommentForPullRequest)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse PostCommentForPullRequest))
-> Logger
-> Service
-> Proxy PostCommentForPullRequest
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse PostCommentForPullRequest)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Location
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse
PostCommentForPullRequestResponse'
(Maybe Text
-> Maybe Location
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Location
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"beforeBlobId")
Either
String
(Maybe Location
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
-> Either String (Maybe Location)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Location)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"location")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"afterCommitId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"pullRequestId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"afterBlobId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Comment -> Int -> PostCommentForPullRequestResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"beforeCommitId")
Either
String
(Maybe Text
-> Maybe Comment -> Int -> PostCommentForPullRequestResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Comment -> Int -> PostCommentForPullRequestResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"repositoryName")
Either
String (Maybe Comment -> Int -> PostCommentForPullRequestResponse)
-> Either String (Maybe Comment)
-> Either String (Int -> PostCommentForPullRequestResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Comment)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"comment")
Either String (Int -> PostCommentForPullRequestResponse)
-> Either String Int
-> Either String PostCommentForPullRequestResponse
forall (f :: * -> *) a b. Applicative f => 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 PostCommentForPullRequest
instance Prelude.NFData PostCommentForPullRequest
instance Core.ToHeaders PostCommentForPullRequest where
toHeaders :: PostCommentForPullRequest -> ResponseHeaders
toHeaders =
ResponseHeaders -> PostCommentForPullRequest -> 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
"CodeCommit_20150413.PostCommentForPullRequest" ::
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 PostCommentForPullRequest where
toJSON :: PostCommentForPullRequest -> Value
toJSON PostCommentForPullRequest' {Maybe Text
Maybe Location
Text
content :: Text
afterCommitId :: Text
beforeCommitId :: Text
repositoryName :: Text
pullRequestId :: Text
clientRequestToken :: Maybe Text
location :: Maybe Location
$sel:content:PostCommentForPullRequest' :: PostCommentForPullRequest -> Text
$sel:afterCommitId:PostCommentForPullRequest' :: PostCommentForPullRequest -> Text
$sel:beforeCommitId:PostCommentForPullRequest' :: PostCommentForPullRequest -> Text
$sel:repositoryName:PostCommentForPullRequest' :: PostCommentForPullRequest -> Text
$sel:pullRequestId:PostCommentForPullRequest' :: PostCommentForPullRequest -> Text
$sel:clientRequestToken:PostCommentForPullRequest' :: PostCommentForPullRequest -> Maybe Text
$sel:location:PostCommentForPullRequest' :: PostCommentForPullRequest -> Maybe Location
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"location" Text -> Location -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Location -> Pair) -> Maybe Location -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Location
location,
(Text
"clientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"pullRequestId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pullRequestId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"repositoryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
repositoryName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"beforeCommitId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
beforeCommitId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"afterCommitId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
afterCommitId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"content" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
content)
]
)
instance Core.ToPath PostCommentForPullRequest where
toPath :: PostCommentForPullRequest -> ByteString
toPath = ByteString -> PostCommentForPullRequest -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery PostCommentForPullRequest where
toQuery :: PostCommentForPullRequest -> QueryString
toQuery = QueryString -> PostCommentForPullRequest -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data =
{
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Location,
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Comment,
:: Prelude.Int
}
deriving (PostCommentForPullRequestResponse
-> PostCommentForPullRequestResponse -> Bool
(PostCommentForPullRequestResponse
-> PostCommentForPullRequestResponse -> Bool)
-> (PostCommentForPullRequestResponse
-> PostCommentForPullRequestResponse -> Bool)
-> Eq PostCommentForPullRequestResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostCommentForPullRequestResponse
-> PostCommentForPullRequestResponse -> Bool
$c/= :: PostCommentForPullRequestResponse
-> PostCommentForPullRequestResponse -> Bool
== :: PostCommentForPullRequestResponse
-> PostCommentForPullRequestResponse -> Bool
$c== :: PostCommentForPullRequestResponse
-> PostCommentForPullRequestResponse -> Bool
Prelude.Eq, ReadPrec [PostCommentForPullRequestResponse]
ReadPrec PostCommentForPullRequestResponse
Int -> ReadS PostCommentForPullRequestResponse
ReadS [PostCommentForPullRequestResponse]
(Int -> ReadS PostCommentForPullRequestResponse)
-> ReadS [PostCommentForPullRequestResponse]
-> ReadPrec PostCommentForPullRequestResponse
-> ReadPrec [PostCommentForPullRequestResponse]
-> Read PostCommentForPullRequestResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PostCommentForPullRequestResponse]
$creadListPrec :: ReadPrec [PostCommentForPullRequestResponse]
readPrec :: ReadPrec PostCommentForPullRequestResponse
$creadPrec :: ReadPrec PostCommentForPullRequestResponse
readList :: ReadS [PostCommentForPullRequestResponse]
$creadList :: ReadS [PostCommentForPullRequestResponse]
readsPrec :: Int -> ReadS PostCommentForPullRequestResponse
$creadsPrec :: Int -> ReadS PostCommentForPullRequestResponse
Prelude.Read, Int -> PostCommentForPullRequestResponse -> ShowS
[PostCommentForPullRequestResponse] -> ShowS
PostCommentForPullRequestResponse -> String
(Int -> PostCommentForPullRequestResponse -> ShowS)
-> (PostCommentForPullRequestResponse -> String)
-> ([PostCommentForPullRequestResponse] -> ShowS)
-> Show PostCommentForPullRequestResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PostCommentForPullRequestResponse] -> ShowS
$cshowList :: [PostCommentForPullRequestResponse] -> ShowS
show :: PostCommentForPullRequestResponse -> String
$cshow :: PostCommentForPullRequestResponse -> String
showsPrec :: Int -> PostCommentForPullRequestResponse -> ShowS
$cshowsPrec :: Int -> PostCommentForPullRequestResponse -> ShowS
Prelude.Show, (forall x.
PostCommentForPullRequestResponse
-> Rep PostCommentForPullRequestResponse x)
-> (forall x.
Rep PostCommentForPullRequestResponse x
-> PostCommentForPullRequestResponse)
-> Generic PostCommentForPullRequestResponse
forall x.
Rep PostCommentForPullRequestResponse x
-> PostCommentForPullRequestResponse
forall x.
PostCommentForPullRequestResponse
-> Rep PostCommentForPullRequestResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PostCommentForPullRequestResponse x
-> PostCommentForPullRequestResponse
$cfrom :: forall x.
PostCommentForPullRequestResponse
-> Rep PostCommentForPullRequestResponse x
Prelude.Generic)
newPostCommentForPullRequestResponse ::
Prelude.Int ->
PostCommentForPullRequestResponse
Int
pHttpStatus_ =
PostCommentForPullRequestResponse' :: Maybe Text
-> Maybe Location
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Comment
-> Int
-> PostCommentForPullRequestResponse
PostCommentForPullRequestResponse'
{ $sel:beforeBlobId:PostCommentForPullRequestResponse' :: Maybe Text
beforeBlobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:location:PostCommentForPullRequestResponse' :: Maybe Location
location = Maybe Location
forall a. Maybe a
Prelude.Nothing,
$sel:afterCommitId:PostCommentForPullRequestResponse' :: Maybe Text
afterCommitId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestId:PostCommentForPullRequestResponse' :: Maybe Text
pullRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:afterBlobId:PostCommentForPullRequestResponse' :: Maybe Text
afterBlobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:beforeCommitId:PostCommentForPullRequestResponse' :: Maybe Text
beforeCommitId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:PostCommentForPullRequestResponse' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:comment:PostCommentForPullRequestResponse' :: Maybe Comment
comment = Maybe Comment
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:PostCommentForPullRequestResponse' :: Int
httpStatus = Int
pHttpStatus_
}
postCommentForPullRequestResponse_beforeBlobId :: Lens.Lens' PostCommentForPullRequestResponse (Prelude.Maybe Prelude.Text)
= (PostCommentForPullRequestResponse -> Maybe Text)
-> (PostCommentForPullRequestResponse
-> Maybe Text -> PostCommentForPullRequestResponse)
-> Lens
PostCommentForPullRequestResponse
PostCommentForPullRequestResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequestResponse' {Maybe Text
beforeBlobId :: Maybe Text
$sel:beforeBlobId:PostCommentForPullRequestResponse' :: PostCommentForPullRequestResponse -> Maybe Text
beforeBlobId} -> Maybe Text
beforeBlobId) (\s :: PostCommentForPullRequestResponse
s@PostCommentForPullRequestResponse' {} Maybe Text
a -> PostCommentForPullRequestResponse
s {$sel:beforeBlobId:PostCommentForPullRequestResponse' :: Maybe Text
beforeBlobId = Maybe Text
a} :: PostCommentForPullRequestResponse)
postCommentForPullRequestResponse_location :: Lens.Lens' PostCommentForPullRequestResponse (Prelude.Maybe Location)
= (PostCommentForPullRequestResponse -> Maybe Location)
-> (PostCommentForPullRequestResponse
-> Maybe Location -> PostCommentForPullRequestResponse)
-> Lens
PostCommentForPullRequestResponse
PostCommentForPullRequestResponse
(Maybe Location)
(Maybe Location)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequestResponse' {Maybe Location
location :: Maybe Location
$sel:location:PostCommentForPullRequestResponse' :: PostCommentForPullRequestResponse -> Maybe Location
location} -> Maybe Location
location) (\s :: PostCommentForPullRequestResponse
s@PostCommentForPullRequestResponse' {} Maybe Location
a -> PostCommentForPullRequestResponse
s {$sel:location:PostCommentForPullRequestResponse' :: Maybe Location
location = Maybe Location
a} :: PostCommentForPullRequestResponse)
postCommentForPullRequestResponse_afterCommitId :: Lens.Lens' PostCommentForPullRequestResponse (Prelude.Maybe Prelude.Text)
= (PostCommentForPullRequestResponse -> Maybe Text)
-> (PostCommentForPullRequestResponse
-> Maybe Text -> PostCommentForPullRequestResponse)
-> Lens
PostCommentForPullRequestResponse
PostCommentForPullRequestResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequestResponse' {Maybe Text
afterCommitId :: Maybe Text
$sel:afterCommitId:PostCommentForPullRequestResponse' :: PostCommentForPullRequestResponse -> Maybe Text
afterCommitId} -> Maybe Text
afterCommitId) (\s :: PostCommentForPullRequestResponse
s@PostCommentForPullRequestResponse' {} Maybe Text
a -> PostCommentForPullRequestResponse
s {$sel:afterCommitId:PostCommentForPullRequestResponse' :: Maybe Text
afterCommitId = Maybe Text
a} :: PostCommentForPullRequestResponse)
postCommentForPullRequestResponse_pullRequestId :: Lens.Lens' PostCommentForPullRequestResponse (Prelude.Maybe Prelude.Text)
= (PostCommentForPullRequestResponse -> Maybe Text)
-> (PostCommentForPullRequestResponse
-> Maybe Text -> PostCommentForPullRequestResponse)
-> Lens
PostCommentForPullRequestResponse
PostCommentForPullRequestResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequestResponse' {Maybe Text
pullRequestId :: Maybe Text
$sel:pullRequestId:PostCommentForPullRequestResponse' :: PostCommentForPullRequestResponse -> Maybe Text
pullRequestId} -> Maybe Text
pullRequestId) (\s :: PostCommentForPullRequestResponse
s@PostCommentForPullRequestResponse' {} Maybe Text
a -> PostCommentForPullRequestResponse
s {$sel:pullRequestId:PostCommentForPullRequestResponse' :: Maybe Text
pullRequestId = Maybe Text
a} :: PostCommentForPullRequestResponse)
postCommentForPullRequestResponse_afterBlobId :: Lens.Lens' PostCommentForPullRequestResponse (Prelude.Maybe Prelude.Text)
= (PostCommentForPullRequestResponse -> Maybe Text)
-> (PostCommentForPullRequestResponse
-> Maybe Text -> PostCommentForPullRequestResponse)
-> Lens
PostCommentForPullRequestResponse
PostCommentForPullRequestResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequestResponse' {Maybe Text
afterBlobId :: Maybe Text
$sel:afterBlobId:PostCommentForPullRequestResponse' :: PostCommentForPullRequestResponse -> Maybe Text
afterBlobId} -> Maybe Text
afterBlobId) (\s :: PostCommentForPullRequestResponse
s@PostCommentForPullRequestResponse' {} Maybe Text
a -> PostCommentForPullRequestResponse
s {$sel:afterBlobId:PostCommentForPullRequestResponse' :: Maybe Text
afterBlobId = Maybe Text
a} :: PostCommentForPullRequestResponse)
postCommentForPullRequestResponse_beforeCommitId :: Lens.Lens' PostCommentForPullRequestResponse (Prelude.Maybe Prelude.Text)
= (PostCommentForPullRequestResponse -> Maybe Text)
-> (PostCommentForPullRequestResponse
-> Maybe Text -> PostCommentForPullRequestResponse)
-> Lens
PostCommentForPullRequestResponse
PostCommentForPullRequestResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequestResponse' {Maybe Text
beforeCommitId :: Maybe Text
$sel:beforeCommitId:PostCommentForPullRequestResponse' :: PostCommentForPullRequestResponse -> Maybe Text
beforeCommitId} -> Maybe Text
beforeCommitId) (\s :: PostCommentForPullRequestResponse
s@PostCommentForPullRequestResponse' {} Maybe Text
a -> PostCommentForPullRequestResponse
s {$sel:beforeCommitId:PostCommentForPullRequestResponse' :: Maybe Text
beforeCommitId = Maybe Text
a} :: PostCommentForPullRequestResponse)
postCommentForPullRequestResponse_repositoryName :: Lens.Lens' PostCommentForPullRequestResponse (Prelude.Maybe Prelude.Text)
= (PostCommentForPullRequestResponse -> Maybe Text)
-> (PostCommentForPullRequestResponse
-> Maybe Text -> PostCommentForPullRequestResponse)
-> Lens
PostCommentForPullRequestResponse
PostCommentForPullRequestResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequestResponse' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:PostCommentForPullRequestResponse' :: PostCommentForPullRequestResponse -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: PostCommentForPullRequestResponse
s@PostCommentForPullRequestResponse' {} Maybe Text
a -> PostCommentForPullRequestResponse
s {$sel:repositoryName:PostCommentForPullRequestResponse' :: Maybe Text
repositoryName = Maybe Text
a} :: PostCommentForPullRequestResponse)
postCommentForPullRequestResponse_comment :: Lens.Lens' PostCommentForPullRequestResponse (Prelude.Maybe Comment)
= (PostCommentForPullRequestResponse -> Maybe Comment)
-> (PostCommentForPullRequestResponse
-> Maybe Comment -> PostCommentForPullRequestResponse)
-> Lens
PostCommentForPullRequestResponse
PostCommentForPullRequestResponse
(Maybe Comment)
(Maybe Comment)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequestResponse' {Maybe Comment
comment :: Maybe Comment
$sel:comment:PostCommentForPullRequestResponse' :: PostCommentForPullRequestResponse -> Maybe Comment
comment} -> Maybe Comment
comment) (\s :: PostCommentForPullRequestResponse
s@PostCommentForPullRequestResponse' {} Maybe Comment
a -> PostCommentForPullRequestResponse
s {$sel:comment:PostCommentForPullRequestResponse' :: Maybe Comment
comment = Maybe Comment
a} :: PostCommentForPullRequestResponse)
postCommentForPullRequestResponse_httpStatus :: Lens.Lens' PostCommentForPullRequestResponse Prelude.Int
= (PostCommentForPullRequestResponse -> Int)
-> (PostCommentForPullRequestResponse
-> Int -> PostCommentForPullRequestResponse)
-> Lens
PostCommentForPullRequestResponse
PostCommentForPullRequestResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostCommentForPullRequestResponse' {Int
httpStatus :: Int
$sel:httpStatus:PostCommentForPullRequestResponse' :: PostCommentForPullRequestResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PostCommentForPullRequestResponse
s@PostCommentForPullRequestResponse' {} Int
a -> PostCommentForPullRequestResponse
s {$sel:httpStatus:PostCommentForPullRequestResponse' :: Int
httpStatus = Int
a} :: PostCommentForPullRequestResponse)
instance
Prelude.NFData
PostCommentForPullRequestResponse