Merge pull request #5 from sanketjpatel/clone/jx

Rename pullRequestId to pullRequestID, add GetUserRepository, and upd…
This commit is contained in:
George Fleury 2018-06-04 19:55:16 +02:00 committed by GitHub
commit 41485eb53d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,7 +241,7 @@ Approve a pull request as the current user. Implicitly adds the user as a partic
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param pullRequestId the id of the pull request within the repository @param pullRequestId the id of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) Approve(pullRequestId int64) (*APIResponse, error) { func (a *DefaultApiService) Approve(pullRequestID int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Post") localVarHTTPMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
@ -251,7 +251,7 @@ func (a *DefaultApiService) Approve(pullRequestId int64) (*APIResponse, error) {
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -297,7 +297,7 @@ Assigns a participant to an explicit role in pull request. Currently only the RE
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param pullRequestId the id of the pull request within the repository @param pullRequestId the id of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) AssignParticipantRole(pullRequestId int64) (*APIResponse, error) { func (a *DefaultApiService) AssignParticipantRole(pullRequestID int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Post") localVarHTTPMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
@ -307,7 +307,7 @@ func (a *DefaultApiService) AssignParticipantRole(pullRequestId int64) (*APIResp
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -353,7 +353,7 @@ Test whether a pull request can be merged. <p> A pull request may not be
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param pullRequestId the ID of the pull request within the repository @param pullRequestId the ID of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) CanMerge(pullRequestId int64) (*APIResponse, error) { func (a *DefaultApiService) CanMerge(pullRequestID int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Get") localVarHTTPMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
@ -363,7 +363,7 @@ func (a *DefaultApiService) CanMerge(pullRequestId int64) (*APIResponse, error)
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -1242,7 +1242,7 @@ Decline a pull request. <p> The authenticated user must have <strong&
@param optional (nil or map[string]interface{}) with one or more of: @param optional (nil or map[string]interface{}) with one or more of:
@param "version" (int32) the current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure. @param "version" (int32) the current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure.
@return */ @return */
func (a *DefaultApiService) Decline(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { func (a *DefaultApiService) Decline(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Post") localVarHTTPMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
@ -1252,7 +1252,7 @@ func (a *DefaultApiService) Decline(pullRequestId int64, localVarOptionals map[s
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/decline" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/decline"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -1305,7 +1305,7 @@ Deletes a pull request. <p> To call this resource, users must be authent
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param pullRequestId the ID of the pull request within the repository @param pullRequestId the ID of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) Delete(pullRequestId int64) (*APIResponse, error) { func (a *DefaultApiService) Delete(pullRequestID int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Delete") localVarHTTPMethod = strings.ToUpper("Delete")
localVarPostBody interface{} localVarPostBody interface{}
@ -1315,7 +1315,7 @@ func (a *DefaultApiService) Delete(pullRequestId int64) (*APIResponse, error) {
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -2657,13 +2657,14 @@ func (a *DefaultApiService) FindWebhooks(localVarOptionals map[string]interface{
Create a new repository forked from an existing repository. <p> The JSON body for this {@code POST} is not required to contain <i>any</i> properties. Even the name may be omitted. The following properties will be used, if provided: <ul> <li>{@code \"name\":\"Fork name\"} - Specifies the forked repository's name <ul> <li>Defaults to the name of the origin repository if not specified</li> </ul> </li> <li>{@code \"project\":{\"key\":\"TARGET_KEY\"}} - Specifies the forked repository's target project by key <ul> <li>Defaults to the current user's personal project if not specified</li> </ul> </li> </ul> <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository and <strong>PROJECT_ADMIN</strong> on the target project to call this resource. Note that users <i>always</i> have <b>PROJECT_ADMIN</b> permission on their personal projects. Create a new repository forked from an existing repository. <p> The JSON body for this {@code POST} is not required to contain <i>any</i> properties. Even the name may be omitted. The following properties will be used, if provided: <ul> <li>{@code \"name\":\"Fork name\"} - Specifies the forked repository's name <ul> <li>Defaults to the name of the origin repository if not specified</li> </ul> </li> <li>{@code \"project\":{\"key\":\"TARGET_KEY\"}} - Specifies the forked repository's target project by key <ul> <li>Defaults to the current user's personal project if not specified</li> </ul> </li> </ul> <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository and <strong>PROJECT_ADMIN</strong> on the target project to call this resource. Note that users <i>always</i> have <b>PROJECT_ADMIN</b> permission on their personal projects.
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param projectKey the parent project key @param projectKey the parent project key
@param projectKey2 the parent project key
@param repositorySlug the repository slug @param repositorySlug the repository slug
@return */ @return */
func (a *DefaultApiService) ForkRepository(projectKey string, projectKey2 string, repositorySlug string) (*APIResponse, error) { func (a *DefaultApiService) ForkRepository(projectKey, repositorySlug string,
localVarPostBody interface{},
localVarHTTPContentTypes []string,
) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Post") localVarHTTPMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
) )
@ -2671,16 +2672,12 @@ func (a *DefaultApiService) ForkRepository(projectKey string, projectKey2 string
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}"
localVarPath = strings.Replace(localVarPath, "{"+"projectKey"+"}", fmt.Sprintf("%v", projectKey), -1) localVarPath = strings.Replace(localVarPath, "{"+"projectKey"+"}", fmt.Sprintf("%v", projectKey), -1)
localVarPath = strings.Replace(localVarPath, "{"+"projectKey"+"}", fmt.Sprintf("%v", projectKey2), -1)
localVarPath = strings.Replace(localVarPath, "{"+"repositorySlug"+"}", fmt.Sprintf("%v", repositorySlug), -1) localVarPath = strings.Replace(localVarPath, "{"+"repositorySlug"+"}", fmt.Sprintf("%v", repositorySlug), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
localVarFormParams := url.Values{} localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header // set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" { if localVarHTTPContentType != "" {
@ -2775,7 +2772,7 @@ Retrieve a page of activity associated with a pull request. <p> Activity
@param "fromId" (int64) (optional) the id of the activity item to use as the first item in the returned page @param "fromId" (int64) (optional) the id of the activity item to use as the first item in the returned page
@param "fromType" (string) (required if <strong>fromId</strong> is present) the type of the activity item specified by <strong>fromId</strong> (either <strong>COMMENT</strong> or <strong>ACTIVITY</strong>) @param "fromType" (string) (required if <strong>fromId</strong> is present) the type of the activity item specified by <strong>fromId</strong> (either <strong>COMMENT</strong> or <strong>ACTIVITY</strong>)
@return */ @return */
func (a *DefaultApiService) GetActivities(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { func (a *DefaultApiService) GetActivities(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Get") localVarHTTPMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
@ -2785,7 +2782,7 @@ func (a *DefaultApiService) GetActivities(pullRequestId int64, localVarOptionals
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/activities" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/activities"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -3738,7 +3735,7 @@ Retrieve commits for the specified pull request. <p> The authenticated u
@param optional (nil or map[string]interface{}) with one or more of: @param optional (nil or map[string]interface{}) with one or more of:
@param "withCounts" (bool) if set to true, the service will add \"authorCount\" and \"totalCount\" at the end of the page. \"authorCount\" is the number of different authors and \"totalCount\" is the total number of commits. @param "withCounts" (bool) if set to true, the service will add \"authorCount\" and \"totalCount\" at the end of the page. \"authorCount\" is the number of different authors and \"totalCount\" is the total number of commits.
@return */ @return */
func (a *DefaultApiService) GetCommits_8(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { func (a *DefaultApiService) GetCommits_8(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Get") localVarHTTPMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
@ -3748,7 +3745,7 @@ func (a *DefaultApiService) GetCommits_8(pullRequestId int64, localVarOptionals
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/commits" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/commits"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -6024,6 +6021,12 @@ func (a *DefaultApiService) GetRepositories_19(localVarOptionals map[string]inte
if err := typeCheckParameter(localVarOptionals["visibility"], "string", "visibility"); err != nil { if err := typeCheckParameter(localVarOptionals["visibility"], "string", "visibility"); err != nil {
return nil, err return nil, err
} }
if err := typeCheckParameter(localVarOptionals["limit"], "int", "limit"); err != nil {
return nil, err
}
if err := typeCheckParameter(localVarOptionals["start"], "int", "start"); err != nil {
return nil, err
}
if localVarTempParam, localVarOk := localVarOptionals["name"].(string); localVarOk { if localVarTempParam, localVarOk := localVarOptionals["name"].(string); localVarOk {
localVarQueryParams.Add("name", parameterToString(localVarTempParam, "")) localVarQueryParams.Add("name", parameterToString(localVarTempParam, ""))
@ -6037,6 +6040,12 @@ func (a *DefaultApiService) GetRepositories_19(localVarOptionals map[string]inte
if localVarTempParam, localVarOk := localVarOptionals["visibility"].(string); localVarOk { if localVarTempParam, localVarOk := localVarOptionals["visibility"].(string); localVarOk {
localVarQueryParams.Add("visibility", parameterToString(localVarTempParam, "")) localVarQueryParams.Add("visibility", parameterToString(localVarTempParam, ""))
} }
if localVarTempParam, localVarOk := localVarOptionals["limit"].(int); localVarOk {
localVarQueryParams.Add("limit", parameterToString(localVarTempParam, ""))
}
if localVarTempParam, localVarOk := localVarOptionals["start"].(int); localVarOk {
localVarQueryParams.Add("start", parameterToString(localVarTempParam, ""))
}
// to determine the Content-Type header // to determine the Content-Type header
localVarHTTPContentTypes := []string{} localVarHTTPContentTypes := []string{}
@ -6079,7 +6088,7 @@ Retrieve the repository matching the supplied <strong>projectKey</stron
@param projectKey2 the parent project key @param projectKey2 the parent project key
@param repositorySlug the repository slug @param repositorySlug the repository slug
@return */ @return */
func (a *DefaultApiService) GetRepository(projectKey string, repositorySlug string) (*APIResponse, error) { func (a *DefaultApiService) GetRepository(projectKey, repositorySlug string) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Get") localVarHTTPMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
@ -6131,6 +6140,65 @@ func (a *DefaultApiService) GetRepository(projectKey string, repositorySlug stri
return NewBitbucketAPIResponse(localVarHTTPResponse) return NewBitbucketAPIResponse(localVarHTTPResponse)
} }
/* DefaultApiService
Retrieve the repository matching the supplied <strong>projectKey</strong> and <strong>repositorySlug</strong>. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository to call this resource.
* @param ctx context.Context for authentication, logging, tracing, etc.
@param projectKey the parent project key
@param projectKey2 the parent project key
@param repositorySlug the repository slug
@return */
func (a *DefaultApiService) GetUserRepository(username, repositorySlug string) (*APIResponse, error) {
var (
localVarHTTPMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/users/{username}/repos/{repositorySlug}"
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", fmt.Sprintf("%v", username), -1)
localVarPath = strings.Replace(localVarPath, "{"+"repositorySlug"+"}", fmt.Sprintf("%v", repositorySlug), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
r, err := a.client.prepareRequest(a.client.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
localVarHTTPResponse, err := a.client.callAPI(r)
if err != nil || localVarHTTPResponse == nil {
return NewBitbucketAPIResponse(localVarHTTPResponse)
}
defer localVarHTTPResponse.Body.Close()
if localVarHTTPResponse.StatusCode >= 300 {
bodyBytes, _ := ioutil.ReadAll(localVarHTTPResponse.Body)
return NewAPIResponseWithError(localVarHTTPResponse, reportError("Status: %v, Body: %s", localVarHTTPResponse.Status, bodyBytes))
}
return NewBitbucketAPIResponse(localVarHTTPResponse)
}
/* DefaultApiService /* DefaultApiService
Retrieve a repository hook for this repository. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository to call this resource. Retrieve a repository hook for this repository. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository to call this resource.
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@ -7689,7 +7757,7 @@ Retrieve a pull request. <p> The authenticated user must have <strong
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param pullRequestId the ID of the pull request within the repository @param pullRequestId the ID of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) Get_27(pullRequestId int64) (*APIResponse, error) { func (a *DefaultApiService) Get_27(pullRequestID int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Get") localVarHTTPMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
@ -7699,7 +7767,7 @@ func (a *DefaultApiService) Get_27(pullRequestId int64) (*APIResponse, error) {
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -7801,7 +7869,7 @@ Retrieves a page of the participants for a given pull request. <p> The a
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param pullRequestId the id of the pull request within the repository @param pullRequestId the id of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) ListParticipants(pullRequestId int64) (*APIResponse, error) { func (a *DefaultApiService) ListParticipants(pullRequestID int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Get") localVarHTTPMethod = strings.ToUpper("Get")
localVarPostBody interface{} localVarPostBody interface{}
@ -7811,7 +7879,7 @@ func (a *DefaultApiService) ListParticipants(pullRequestId int64) (*APIResponse,
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -7859,7 +7927,7 @@ Merge the specified pull request. <p> The authenticated user must have &
@param optional (nil or map[string]interface{}) with one or more of: @param optional (nil or map[string]interface{}) with one or more of:
@param "version" (int32) the current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure. @param "version" (int32) the current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure.
@return */ @return */
func (a *DefaultApiService) Merge(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { func (a *DefaultApiService) Merge(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Post") localVarHTTPMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
@ -7869,7 +7937,7 @@ func (a *DefaultApiService) Merge(pullRequestId int64, localVarOptionals map[str
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -8228,7 +8296,7 @@ Re-open a declined pull request. <p> The authenticated user must have &l
@param optional (nil or map[string]interface{}) with one or more of: @param optional (nil or map[string]interface{}) with one or more of:
@param "version" (int32) the current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure. @param "version" (int32) the current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure.
@return */ @return */
func (a *DefaultApiService) Reopen(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { func (a *DefaultApiService) Reopen(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Post") localVarHTTPMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
@ -8238,7 +8306,7 @@ func (a *DefaultApiService) Reopen(pullRequestId int64, localVarOptionals map[st
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/reopen" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/reopen"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -10924,7 +10992,7 @@ Unassigns a participant from the REVIEWER role they may have been given in a pul
@param optional (nil or map[string]interface{}) with one or more of: @param optional (nil or map[string]interface{}) with one or more of:
@param "username" (string) the participant's user name @param "username" (string) the participant's user name
@return */ @return */
func (a *DefaultApiService) UnassignParticipantRole(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { func (a *DefaultApiService) UnassignParticipantRole(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Delete") localVarHTTPMethod = strings.ToUpper("Delete")
localVarPostBody interface{} localVarPostBody interface{}
@ -10934,7 +11002,7 @@ func (a *DefaultApiService) UnassignParticipantRole(pullRequestId int64, localVa
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -11103,7 +11171,7 @@ Make the authenticated user stop watching the specified pull request. <p>
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param pullRequestId the id of the pull request within the repository @param pullRequestId the id of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) Unwatch_45(pullRequestId int64) (*APIResponse, error) { func (a *DefaultApiService) Unwatch_45(pullRequestID int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Delete") localVarHTTPMethod = strings.ToUpper("Delete")
localVarPostBody interface{} localVarPostBody interface{}
@ -11113,7 +11181,7 @@ func (a *DefaultApiService) Unwatch_45(pullRequestId int64) (*APIResponse, error
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/watch" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/watch"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -11608,7 +11676,7 @@ Change the current user's status for a pull request. Implicitly adds the use
@param userSlug the slug for the user changing their status @param userSlug the slug for the user changing their status
@param pullRequestId2 the id of the pull request within the repository @param pullRequestId2 the id of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) UpdateStatus(pullRequestId int64, userSlug string, pullRequestId2 int64) (*APIResponse, error) { func (a *DefaultApiService) UpdateStatus(pullRequestID int64, userSlug string, pullRequestId2 int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Put") localVarHTTPMethod = strings.ToUpper("Put")
localVarPostBody interface{} localVarPostBody interface{}
@ -11618,7 +11686,7 @@ func (a *DefaultApiService) UpdateStatus(pullRequestId int64, userSlug string, p
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug}" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug}"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarPath = strings.Replace(localVarPath, "{"+"userSlug"+"}", fmt.Sprintf("%v", userSlug), -1) localVarPath = strings.Replace(localVarPath, "{"+"userSlug"+"}", fmt.Sprintf("%v", userSlug), -1)
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId2), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId2), -1)
@ -11994,7 +12062,7 @@ Update the title, description, reviewers or destination branch of an existing pu
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param pullRequestId the ID of the pull request within the repository @param pullRequestId the ID of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) Update_50(pullRequestId int64) (*APIResponse, error) { func (a *DefaultApiService) Update_50(pullRequestID int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Put") localVarHTTPMethod = strings.ToUpper("Put")
localVarPostBody interface{} localVarPostBody interface{}
@ -12004,7 +12072,7 @@ func (a *DefaultApiService) Update_50(pullRequestId int64) (*APIResponse, error)
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -12214,7 +12282,7 @@ Make the authenticated user watch the specified pull request. <p> The au
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param pullRequestId the id of the pull request within the repository @param pullRequestId the id of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) Watch_52(pullRequestId int64) (*APIResponse, error) { func (a *DefaultApiService) Watch_52(pullRequestID int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Post") localVarHTTPMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
@ -12224,7 +12292,7 @@ func (a *DefaultApiService) Watch_52(pullRequestId int64) (*APIResponse, error)
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/watch" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/watch"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}
@ -12270,7 +12338,7 @@ Remove approval from a pull request as the current user. This does not remove th
* @param ctx context.Context for authentication, logging, tracing, etc. * @param ctx context.Context for authentication, logging, tracing, etc.
@param pullRequestId the id of the pull request within the repository @param pullRequestId the id of the pull request within the repository
@return */ @return */
func (a *DefaultApiService) WithdrawApproval(pullRequestId int64) (*APIResponse, error) { func (a *DefaultApiService) WithdrawApproval(pullRequestID int64) (*APIResponse, error) {
var ( var (
localVarHTTPMethod = strings.ToUpper("Delete") localVarHTTPMethod = strings.ToUpper("Delete")
localVarPostBody interface{} localVarPostBody interface{}
@ -12280,7 +12348,7 @@ func (a *DefaultApiService) WithdrawApproval(pullRequestId int64) (*APIResponse,
// create path and map variables // create path and map variables
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve" localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve"
localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestId), -1) localVarPath = strings.Replace(localVarPath, "{"+"pullRequestId"+"}", fmt.Sprintf("%v", pullRequestID), -1)
localVarHeaderParams := make(map[string]string) localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{} localVarQueryParams := url.Values{}