{-# 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.GetCommentsForComparedCommit
(
GetCommentsForComparedCommit (..),
newGetCommentsForComparedCommit,
getCommentsForComparedCommit_nextToken,
getCommentsForComparedCommit_beforeCommitId,
getCommentsForComparedCommit_maxResults,
getCommentsForComparedCommit_repositoryName,
getCommentsForComparedCommit_afterCommitId,
GetCommentsForComparedCommitResponse (..),
newGetCommentsForComparedCommitResponse,
getCommentsForComparedCommitResponse_commentsForComparedCommitData,
getCommentsForComparedCommitResponse_nextToken,
getCommentsForComparedCommitResponse_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 Prelude.Text,
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Int,
:: Prelude.Text,
:: Prelude.Text
}
deriving (GetCommentsForComparedCommit
-> GetCommentsForComparedCommit -> Bool
(GetCommentsForComparedCommit
-> GetCommentsForComparedCommit -> Bool)
-> (GetCommentsForComparedCommit
-> GetCommentsForComparedCommit -> Bool)
-> Eq GetCommentsForComparedCommit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCommentsForComparedCommit
-> GetCommentsForComparedCommit -> Bool
$c/= :: GetCommentsForComparedCommit
-> GetCommentsForComparedCommit -> Bool
== :: GetCommentsForComparedCommit
-> GetCommentsForComparedCommit -> Bool
$c== :: GetCommentsForComparedCommit
-> GetCommentsForComparedCommit -> Bool
Prelude.Eq, ReadPrec [GetCommentsForComparedCommit]
ReadPrec GetCommentsForComparedCommit
Int -> ReadS GetCommentsForComparedCommit
ReadS [GetCommentsForComparedCommit]
(Int -> ReadS GetCommentsForComparedCommit)
-> ReadS [GetCommentsForComparedCommit]
-> ReadPrec GetCommentsForComparedCommit
-> ReadPrec [GetCommentsForComparedCommit]
-> Read GetCommentsForComparedCommit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCommentsForComparedCommit]
$creadListPrec :: ReadPrec [GetCommentsForComparedCommit]
readPrec :: ReadPrec GetCommentsForComparedCommit
$creadPrec :: ReadPrec GetCommentsForComparedCommit
readList :: ReadS [GetCommentsForComparedCommit]
$creadList :: ReadS [GetCommentsForComparedCommit]
readsPrec :: Int -> ReadS GetCommentsForComparedCommit
$creadsPrec :: Int -> ReadS GetCommentsForComparedCommit
Prelude.Read, Int -> GetCommentsForComparedCommit -> ShowS
[GetCommentsForComparedCommit] -> ShowS
GetCommentsForComparedCommit -> String
(Int -> GetCommentsForComparedCommit -> ShowS)
-> (GetCommentsForComparedCommit -> String)
-> ([GetCommentsForComparedCommit] -> ShowS)
-> Show GetCommentsForComparedCommit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCommentsForComparedCommit] -> ShowS
$cshowList :: [GetCommentsForComparedCommit] -> ShowS
show :: GetCommentsForComparedCommit -> String
$cshow :: GetCommentsForComparedCommit -> String
showsPrec :: Int -> GetCommentsForComparedCommit -> ShowS
$cshowsPrec :: Int -> GetCommentsForComparedCommit -> ShowS
Prelude.Show, (forall x.
GetCommentsForComparedCommit -> Rep GetCommentsForComparedCommit x)
-> (forall x.
Rep GetCommentsForComparedCommit x -> GetCommentsForComparedCommit)
-> Generic GetCommentsForComparedCommit
forall x.
Rep GetCommentsForComparedCommit x -> GetCommentsForComparedCommit
forall x.
GetCommentsForComparedCommit -> Rep GetCommentsForComparedCommit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCommentsForComparedCommit x -> GetCommentsForComparedCommit
$cfrom :: forall x.
GetCommentsForComparedCommit -> Rep GetCommentsForComparedCommit x
Prelude.Generic)
newGetCommentsForComparedCommit ::
Prelude.Text ->
Prelude.Text ->
GetCommentsForComparedCommit
Text
pRepositoryName_
Text
pAfterCommitId_ =
GetCommentsForComparedCommit' :: Maybe Text
-> Maybe Text
-> Maybe Int
-> Text
-> Text
-> GetCommentsForComparedCommit
GetCommentsForComparedCommit'
{ $sel:nextToken:GetCommentsForComparedCommit' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:beforeCommitId:GetCommentsForComparedCommit' :: Maybe Text
beforeCommitId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetCommentsForComparedCommit' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:GetCommentsForComparedCommit' :: Text
repositoryName = Text
pRepositoryName_,
$sel:afterCommitId:GetCommentsForComparedCommit' :: Text
afterCommitId = Text
pAfterCommitId_
}
getCommentsForComparedCommit_nextToken :: Lens.Lens' GetCommentsForComparedCommit (Prelude.Maybe Prelude.Text)
= (GetCommentsForComparedCommit -> Maybe Text)
-> (GetCommentsForComparedCommit
-> Maybe Text -> GetCommentsForComparedCommit)
-> Lens
GetCommentsForComparedCommit
GetCommentsForComparedCommit
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentsForComparedCommit' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetCommentsForComparedCommit' :: GetCommentsForComparedCommit -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetCommentsForComparedCommit
s@GetCommentsForComparedCommit' {} Maybe Text
a -> GetCommentsForComparedCommit
s {$sel:nextToken:GetCommentsForComparedCommit' :: Maybe Text
nextToken = Maybe Text
a} :: GetCommentsForComparedCommit)
getCommentsForComparedCommit_beforeCommitId :: Lens.Lens' GetCommentsForComparedCommit (Prelude.Maybe Prelude.Text)
= (GetCommentsForComparedCommit -> Maybe Text)
-> (GetCommentsForComparedCommit
-> Maybe Text -> GetCommentsForComparedCommit)
-> Lens
GetCommentsForComparedCommit
GetCommentsForComparedCommit
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentsForComparedCommit' {Maybe Text
beforeCommitId :: Maybe Text
$sel:beforeCommitId:GetCommentsForComparedCommit' :: GetCommentsForComparedCommit -> Maybe Text
beforeCommitId} -> Maybe Text
beforeCommitId) (\s :: GetCommentsForComparedCommit
s@GetCommentsForComparedCommit' {} Maybe Text
a -> GetCommentsForComparedCommit
s {$sel:beforeCommitId:GetCommentsForComparedCommit' :: Maybe Text
beforeCommitId = Maybe Text
a} :: GetCommentsForComparedCommit)
getCommentsForComparedCommit_maxResults :: Lens.Lens' GetCommentsForComparedCommit (Prelude.Maybe Prelude.Int)
= (GetCommentsForComparedCommit -> Maybe Int)
-> (GetCommentsForComparedCommit
-> Maybe Int -> GetCommentsForComparedCommit)
-> Lens
GetCommentsForComparedCommit
GetCommentsForComparedCommit
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentsForComparedCommit' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:GetCommentsForComparedCommit' :: GetCommentsForComparedCommit -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: GetCommentsForComparedCommit
s@GetCommentsForComparedCommit' {} Maybe Int
a -> GetCommentsForComparedCommit
s {$sel:maxResults:GetCommentsForComparedCommit' :: Maybe Int
maxResults = Maybe Int
a} :: GetCommentsForComparedCommit)
getCommentsForComparedCommit_repositoryName :: Lens.Lens' GetCommentsForComparedCommit Prelude.Text
= (GetCommentsForComparedCommit -> Text)
-> (GetCommentsForComparedCommit
-> Text -> GetCommentsForComparedCommit)
-> Lens
GetCommentsForComparedCommit GetCommentsForComparedCommit Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentsForComparedCommit' {Text
repositoryName :: Text
$sel:repositoryName:GetCommentsForComparedCommit' :: GetCommentsForComparedCommit -> Text
repositoryName} -> Text
repositoryName) (\s :: GetCommentsForComparedCommit
s@GetCommentsForComparedCommit' {} Text
a -> GetCommentsForComparedCommit
s {$sel:repositoryName:GetCommentsForComparedCommit' :: Text
repositoryName = Text
a} :: GetCommentsForComparedCommit)
getCommentsForComparedCommit_afterCommitId :: Lens.Lens' GetCommentsForComparedCommit Prelude.Text
= (GetCommentsForComparedCommit -> Text)
-> (GetCommentsForComparedCommit
-> Text -> GetCommentsForComparedCommit)
-> Lens
GetCommentsForComparedCommit GetCommentsForComparedCommit Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentsForComparedCommit' {Text
afterCommitId :: Text
$sel:afterCommitId:GetCommentsForComparedCommit' :: GetCommentsForComparedCommit -> Text
afterCommitId} -> Text
afterCommitId) (\s :: GetCommentsForComparedCommit
s@GetCommentsForComparedCommit' {} Text
a -> GetCommentsForComparedCommit
s {$sel:afterCommitId:GetCommentsForComparedCommit' :: Text
afterCommitId = Text
a} :: GetCommentsForComparedCommit)
instance Core.AWSPager GetCommentsForComparedCommit where
page :: GetCommentsForComparedCommit
-> AWSResponse GetCommentsForComparedCommit
-> Maybe GetCommentsForComparedCommit
page GetCommentsForComparedCommit
rq AWSResponse GetCommentsForComparedCommit
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetCommentsForComparedCommit
GetCommentsForComparedCommitResponse
rs
GetCommentsForComparedCommitResponse
-> Getting (First Text) GetCommentsForComparedCommitResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetCommentsForComparedCommitResponse
-> Const (First Text) GetCommentsForComparedCommitResponse
Lens' GetCommentsForComparedCommitResponse (Maybe Text)
getCommentsForComparedCommitResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetCommentsForComparedCommitResponse
-> Const (First Text) GetCommentsForComparedCommitResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetCommentsForComparedCommitResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetCommentsForComparedCommit
forall a. Maybe a
Prelude.Nothing
| Maybe [CommentsForComparedCommit] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetCommentsForComparedCommit
GetCommentsForComparedCommitResponse
rs
GetCommentsForComparedCommitResponse
-> Getting
(First [CommentsForComparedCommit])
GetCommentsForComparedCommitResponse
[CommentsForComparedCommit]
-> Maybe [CommentsForComparedCommit]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [CommentsForComparedCommit]
-> Const
(First [CommentsForComparedCommit])
(Maybe [CommentsForComparedCommit]))
-> GetCommentsForComparedCommitResponse
-> Const
(First [CommentsForComparedCommit])
GetCommentsForComparedCommitResponse
Lens'
GetCommentsForComparedCommitResponse
(Maybe [CommentsForComparedCommit])
getCommentsForComparedCommitResponse_commentsForComparedCommitData
((Maybe [CommentsForComparedCommit]
-> Const
(First [CommentsForComparedCommit])
(Maybe [CommentsForComparedCommit]))
-> GetCommentsForComparedCommitResponse
-> Const
(First [CommentsForComparedCommit])
GetCommentsForComparedCommitResponse)
-> (([CommentsForComparedCommit]
-> Const
(First [CommentsForComparedCommit]) [CommentsForComparedCommit])
-> Maybe [CommentsForComparedCommit]
-> Const
(First [CommentsForComparedCommit])
(Maybe [CommentsForComparedCommit]))
-> Getting
(First [CommentsForComparedCommit])
GetCommentsForComparedCommitResponse
[CommentsForComparedCommit]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([CommentsForComparedCommit]
-> Const
(First [CommentsForComparedCommit]) [CommentsForComparedCommit])
-> Maybe [CommentsForComparedCommit]
-> Const
(First [CommentsForComparedCommit])
(Maybe [CommentsForComparedCommit])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetCommentsForComparedCommit
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetCommentsForComparedCommit -> Maybe GetCommentsForComparedCommit
forall a. a -> Maybe a
Prelude.Just (GetCommentsForComparedCommit
-> Maybe GetCommentsForComparedCommit)
-> GetCommentsForComparedCommit
-> Maybe GetCommentsForComparedCommit
forall a b. (a -> b) -> a -> b
Prelude.$
GetCommentsForComparedCommit
rq
GetCommentsForComparedCommit
-> (GetCommentsForComparedCommit -> GetCommentsForComparedCommit)
-> GetCommentsForComparedCommit
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetCommentsForComparedCommit
-> Identity GetCommentsForComparedCommit
Lens
GetCommentsForComparedCommit
GetCommentsForComparedCommit
(Maybe Text)
(Maybe Text)
getCommentsForComparedCommit_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetCommentsForComparedCommit
-> Identity GetCommentsForComparedCommit)
-> Maybe Text
-> GetCommentsForComparedCommit
-> GetCommentsForComparedCommit
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetCommentsForComparedCommit
GetCommentsForComparedCommitResponse
rs
GetCommentsForComparedCommitResponse
-> Getting (First Text) GetCommentsForComparedCommitResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetCommentsForComparedCommitResponse
-> Const (First Text) GetCommentsForComparedCommitResponse
Lens' GetCommentsForComparedCommitResponse (Maybe Text)
getCommentsForComparedCommitResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetCommentsForComparedCommitResponse
-> Const (First Text) GetCommentsForComparedCommitResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetCommentsForComparedCommitResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest GetCommentsForComparedCommit where
type
AWSResponse GetCommentsForComparedCommit =
GetCommentsForComparedCommitResponse
request :: GetCommentsForComparedCommit
-> Request GetCommentsForComparedCommit
request = Service
-> GetCommentsForComparedCommit
-> Request GetCommentsForComparedCommit
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetCommentsForComparedCommit
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetCommentsForComparedCommit)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetCommentsForComparedCommit))
-> Logger
-> Service
-> Proxy GetCommentsForComparedCommit
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetCommentsForComparedCommit)))
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 [CommentsForComparedCommit]
-> Maybe Text -> Int -> GetCommentsForComparedCommitResponse
GetCommentsForComparedCommitResponse'
(Maybe [CommentsForComparedCommit]
-> Maybe Text -> Int -> GetCommentsForComparedCommitResponse)
-> Either String (Maybe [CommentsForComparedCommit])
-> Either
String (Maybe Text -> Int -> GetCommentsForComparedCommitResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [CommentsForComparedCommit]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"commentsForComparedCommitData"
Either String (Maybe (Maybe [CommentsForComparedCommit]))
-> Maybe [CommentsForComparedCommit]
-> Either String (Maybe [CommentsForComparedCommit])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [CommentsForComparedCommit]
forall a. Monoid a => a
Prelude.mempty
)
Either
String (Maybe Text -> Int -> GetCommentsForComparedCommitResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetCommentsForComparedCommitResponse)
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
"nextToken")
Either String (Int -> GetCommentsForComparedCommitResponse)
-> Either String Int
-> Either String GetCommentsForComparedCommitResponse
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
GetCommentsForComparedCommit
instance Prelude.NFData GetCommentsForComparedCommit
instance Core.ToHeaders GetCommentsForComparedCommit where
toHeaders :: GetCommentsForComparedCommit -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetCommentsForComparedCommit -> 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.GetCommentsForComparedCommit" ::
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 GetCommentsForComparedCommit where
toJSON :: GetCommentsForComparedCommit -> Value
toJSON GetCommentsForComparedCommit' {Maybe Int
Maybe Text
Text
afterCommitId :: Text
repositoryName :: Text
maxResults :: Maybe Int
beforeCommitId :: Maybe Text
nextToken :: Maybe Text
$sel:afterCommitId:GetCommentsForComparedCommit' :: GetCommentsForComparedCommit -> Text
$sel:repositoryName:GetCommentsForComparedCommit' :: GetCommentsForComparedCommit -> Text
$sel:maxResults:GetCommentsForComparedCommit' :: GetCommentsForComparedCommit -> Maybe Int
$sel:beforeCommitId:GetCommentsForComparedCommit' :: GetCommentsForComparedCommit -> Maybe Text
$sel:nextToken:GetCommentsForComparedCommit' :: GetCommentsForComparedCommit -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"nextToken" 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
nextToken,
(Text
"beforeCommitId" 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
beforeCommitId,
(Text
"maxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults,
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
"afterCommitId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
afterCommitId)
]
)
instance Core.ToPath GetCommentsForComparedCommit where
toPath :: GetCommentsForComparedCommit -> ByteString
toPath = ByteString -> GetCommentsForComparedCommit -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetCommentsForComparedCommit where
toQuery :: GetCommentsForComparedCommit -> QueryString
toQuery = QueryString -> GetCommentsForComparedCommit -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data =
{
:: Prelude.Maybe [CommentsForComparedCommit],
:: Prelude.Maybe Prelude.Text,
:: Prelude.Int
}
deriving (GetCommentsForComparedCommitResponse
-> GetCommentsForComparedCommitResponse -> Bool
(GetCommentsForComparedCommitResponse
-> GetCommentsForComparedCommitResponse -> Bool)
-> (GetCommentsForComparedCommitResponse
-> GetCommentsForComparedCommitResponse -> Bool)
-> Eq GetCommentsForComparedCommitResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCommentsForComparedCommitResponse
-> GetCommentsForComparedCommitResponse -> Bool
$c/= :: GetCommentsForComparedCommitResponse
-> GetCommentsForComparedCommitResponse -> Bool
== :: GetCommentsForComparedCommitResponse
-> GetCommentsForComparedCommitResponse -> Bool
$c== :: GetCommentsForComparedCommitResponse
-> GetCommentsForComparedCommitResponse -> Bool
Prelude.Eq, ReadPrec [GetCommentsForComparedCommitResponse]
ReadPrec GetCommentsForComparedCommitResponse
Int -> ReadS GetCommentsForComparedCommitResponse
ReadS [GetCommentsForComparedCommitResponse]
(Int -> ReadS GetCommentsForComparedCommitResponse)
-> ReadS [GetCommentsForComparedCommitResponse]
-> ReadPrec GetCommentsForComparedCommitResponse
-> ReadPrec [GetCommentsForComparedCommitResponse]
-> Read GetCommentsForComparedCommitResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCommentsForComparedCommitResponse]
$creadListPrec :: ReadPrec [GetCommentsForComparedCommitResponse]
readPrec :: ReadPrec GetCommentsForComparedCommitResponse
$creadPrec :: ReadPrec GetCommentsForComparedCommitResponse
readList :: ReadS [GetCommentsForComparedCommitResponse]
$creadList :: ReadS [GetCommentsForComparedCommitResponse]
readsPrec :: Int -> ReadS GetCommentsForComparedCommitResponse
$creadsPrec :: Int -> ReadS GetCommentsForComparedCommitResponse
Prelude.Read, Int -> GetCommentsForComparedCommitResponse -> ShowS
[GetCommentsForComparedCommitResponse] -> ShowS
GetCommentsForComparedCommitResponse -> String
(Int -> GetCommentsForComparedCommitResponse -> ShowS)
-> (GetCommentsForComparedCommitResponse -> String)
-> ([GetCommentsForComparedCommitResponse] -> ShowS)
-> Show GetCommentsForComparedCommitResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCommentsForComparedCommitResponse] -> ShowS
$cshowList :: [GetCommentsForComparedCommitResponse] -> ShowS
show :: GetCommentsForComparedCommitResponse -> String
$cshow :: GetCommentsForComparedCommitResponse -> String
showsPrec :: Int -> GetCommentsForComparedCommitResponse -> ShowS
$cshowsPrec :: Int -> GetCommentsForComparedCommitResponse -> ShowS
Prelude.Show, (forall x.
GetCommentsForComparedCommitResponse
-> Rep GetCommentsForComparedCommitResponse x)
-> (forall x.
Rep GetCommentsForComparedCommitResponse x
-> GetCommentsForComparedCommitResponse)
-> Generic GetCommentsForComparedCommitResponse
forall x.
Rep GetCommentsForComparedCommitResponse x
-> GetCommentsForComparedCommitResponse
forall x.
GetCommentsForComparedCommitResponse
-> Rep GetCommentsForComparedCommitResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCommentsForComparedCommitResponse x
-> GetCommentsForComparedCommitResponse
$cfrom :: forall x.
GetCommentsForComparedCommitResponse
-> Rep GetCommentsForComparedCommitResponse x
Prelude.Generic)
newGetCommentsForComparedCommitResponse ::
Prelude.Int ->
GetCommentsForComparedCommitResponse
Int
pHttpStatus_ =
GetCommentsForComparedCommitResponse' :: Maybe [CommentsForComparedCommit]
-> Maybe Text -> Int -> GetCommentsForComparedCommitResponse
GetCommentsForComparedCommitResponse'
{ $sel:commentsForComparedCommitData:GetCommentsForComparedCommitResponse' :: Maybe [CommentsForComparedCommit]
commentsForComparedCommitData =
Maybe [CommentsForComparedCommit]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetCommentsForComparedCommitResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetCommentsForComparedCommitResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getCommentsForComparedCommitResponse_commentsForComparedCommitData :: Lens.Lens' GetCommentsForComparedCommitResponse (Prelude.Maybe [CommentsForComparedCommit])
= (GetCommentsForComparedCommitResponse
-> Maybe [CommentsForComparedCommit])
-> (GetCommentsForComparedCommitResponse
-> Maybe [CommentsForComparedCommit]
-> GetCommentsForComparedCommitResponse)
-> Lens'
GetCommentsForComparedCommitResponse
(Maybe [CommentsForComparedCommit])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentsForComparedCommitResponse' {Maybe [CommentsForComparedCommit]
commentsForComparedCommitData :: Maybe [CommentsForComparedCommit]
$sel:commentsForComparedCommitData:GetCommentsForComparedCommitResponse' :: GetCommentsForComparedCommitResponse
-> Maybe [CommentsForComparedCommit]
commentsForComparedCommitData} -> Maybe [CommentsForComparedCommit]
commentsForComparedCommitData) (\s :: GetCommentsForComparedCommitResponse
s@GetCommentsForComparedCommitResponse' {} Maybe [CommentsForComparedCommit]
a -> GetCommentsForComparedCommitResponse
s {$sel:commentsForComparedCommitData:GetCommentsForComparedCommitResponse' :: Maybe [CommentsForComparedCommit]
commentsForComparedCommitData = Maybe [CommentsForComparedCommit]
a} :: GetCommentsForComparedCommitResponse) ((Maybe [CommentsForComparedCommit]
-> f (Maybe [CommentsForComparedCommit]))
-> GetCommentsForComparedCommitResponse
-> f GetCommentsForComparedCommitResponse)
-> ((Maybe [CommentsForComparedCommit]
-> f (Maybe [CommentsForComparedCommit]))
-> Maybe [CommentsForComparedCommit]
-> f (Maybe [CommentsForComparedCommit]))
-> (Maybe [CommentsForComparedCommit]
-> f (Maybe [CommentsForComparedCommit]))
-> GetCommentsForComparedCommitResponse
-> f GetCommentsForComparedCommitResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[CommentsForComparedCommit]
[CommentsForComparedCommit]
[CommentsForComparedCommit]
[CommentsForComparedCommit]
-> Iso
(Maybe [CommentsForComparedCommit])
(Maybe [CommentsForComparedCommit])
(Maybe [CommentsForComparedCommit])
(Maybe [CommentsForComparedCommit])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[CommentsForComparedCommit]
[CommentsForComparedCommit]
[CommentsForComparedCommit]
[CommentsForComparedCommit]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getCommentsForComparedCommitResponse_nextToken :: Lens.Lens' GetCommentsForComparedCommitResponse (Prelude.Maybe Prelude.Text)
= (GetCommentsForComparedCommitResponse -> Maybe Text)
-> (GetCommentsForComparedCommitResponse
-> Maybe Text -> GetCommentsForComparedCommitResponse)
-> Lens' GetCommentsForComparedCommitResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentsForComparedCommitResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetCommentsForComparedCommitResponse' :: GetCommentsForComparedCommitResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetCommentsForComparedCommitResponse
s@GetCommentsForComparedCommitResponse' {} Maybe Text
a -> GetCommentsForComparedCommitResponse
s {$sel:nextToken:GetCommentsForComparedCommitResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetCommentsForComparedCommitResponse)
getCommentsForComparedCommitResponse_httpStatus :: Lens.Lens' GetCommentsForComparedCommitResponse Prelude.Int
= (GetCommentsForComparedCommitResponse -> Int)
-> (GetCommentsForComparedCommitResponse
-> Int -> GetCommentsForComparedCommitResponse)
-> Lens
GetCommentsForComparedCommitResponse
GetCommentsForComparedCommitResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentsForComparedCommitResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetCommentsForComparedCommitResponse' :: GetCommentsForComparedCommitResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetCommentsForComparedCommitResponse
s@GetCommentsForComparedCommitResponse' {} Int
a -> GetCommentsForComparedCommitResponse
s {$sel:httpStatus:GetCommentsForComparedCommitResponse' :: Int
httpStatus = Int
a} :: GetCommentsForComparedCommitResponse)
instance
Prelude.NFData
GetCommentsForComparedCommitResponse