diff --git a/default_api.go b/default_api.go index 7f714a2..7212067 100644 --- a/default_api.go +++ b/default_api.go @@ -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 pullRequestId the id of the pull request within the repository @return */ -func (a *DefaultApiService) Approve(pullRequestId int64) (*APIResponse, error) { +func (a *DefaultApiService) Approve(pullRequestID int64) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -251,7 +251,7 @@ func (a *DefaultApiService) Approve(pullRequestId int64) (*APIResponse, error) { // create path and map variables 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) 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 pullRequestId the id of the pull request within the repository @return */ -func (a *DefaultApiService) AssignParticipantRole(pullRequestId int64) (*APIResponse, error) { +func (a *DefaultApiService) AssignParticipantRole(pullRequestID int64) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -307,7 +307,7 @@ func (a *DefaultApiService) AssignParticipantRole(pullRequestId int64) (*APIResp // create path and map variables 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) 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 pullRequestId the ID of the pull request within the repository @return */ -func (a *DefaultApiService) CanMerge(pullRequestId int64) (*APIResponse, error) { +func (a *DefaultApiService) CanMerge(pullRequestID int64) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -363,7 +363,7 @@ func (a *DefaultApiService) CanMerge(pullRequestId int64) (*APIResponse, error) // create path and map variables 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) localVarQueryParams := url.Values{} @@ -459,11 +459,11 @@ func (a *DefaultApiService) ClearSenderAddress(ctx context.Context) (*APIRespons } /* DefaultApiService -Clears any CAPTCHA challenge that may constrain the user with the supplied username when they authenticate. Additionally any counter or metric that contributed towards the user being issued the CAPTCHA challenge (for instance too many consecutive failed logins) will also be reset. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource, and may not clear the CAPTCHA of a user with greater permissions than themselves. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) -@return */ + Clears any CAPTCHA challenge that may constrain the user with the supplied username when they authenticate. Additionally any counter or metric that contributed towards the user being issued the CAPTCHA challenge (for instance too many consecutive failed logins) will also be reset. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource, and may not clear the CAPTCHA of a user with greater permissions than themselves. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) + @return */ func (a *DefaultApiService) ClearUserCaptchaChallenge(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -684,12 +684,12 @@ func (a *DefaultApiService) CreateBranch(ctx context.Context) (*APIResponse, err } /* DefaultApiService -Add a new comment. <p> Comments can be added in a few places by setting different attributes: <p> General commit comment: <pre> { \"text\": \"An insightful general comment on a commit.\" } </pre> Reply to a comment: <pre> { \"text\": \"A measured reply.\", \"parent\": { \"id\": 1 } } </pre> General file comment: <pre> { \"text\": \"An insightful general comment on a file.\", \"anchor\": { \"diffType\": \"COMMIT\", \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \"path\": \"path/to/file\", \"srcPath\": \"path/to/file\", \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" } } </pre> File line comment: <pre> { \"text\": \"A pithy comment on a particular line within a file.\", \"anchor\": { \"diffType\": \"COMMIT\", \"line\": 1, \"lineType\": \"CONTEXT\", \"fileType\": \"FROM\", \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \"path\": \"path/to/file\", \"srcPath\": \"path/to/file\", \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" } } </pre> <strong>Note: general file comments are an experimental feature and may change in the near future!</strong> <p> For file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on. <p> For line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be: <ul> <li>'ADDED' - for an added line;</li> <li>'REMOVED' - for a removed line; or</li> <li>'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff.</li> </ul> 'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are: <ul> <li>'FROM' - the source file of the diff</li> <li>'TO' - the destination file of the diff</li> </ul> If the current user is not a participant the user is added as one and updated to watch the commit. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that the commit is in to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param commitId the commit to which the comments must be anchored -@param optional (nil or map[string]interface{}) with one or more of: - @param "since" (string) For a merge commit, a parent can be provided to specify which diff the comments should be on. For a commit range, a {@code sinceId} can be provided to specify where the comments should be anchored from. -@return */ + Add a new comment. <p> Comments can be added in a few places by setting different attributes: <p> General commit comment: <pre> { \"text\": \"An insightful general comment on a commit.\" } </pre> Reply to a comment: <pre> { \"text\": \"A measured reply.\", \"parent\": { \"id\": 1 } } </pre> General file comment: <pre> { \"text\": \"An insightful general comment on a file.\", \"anchor\": { \"diffType\": \"COMMIT\", \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \"path\": \"path/to/file\", \"srcPath\": \"path/to/file\", \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" } } </pre> File line comment: <pre> { \"text\": \"A pithy comment on a particular line within a file.\", \"anchor\": { \"diffType\": \"COMMIT\", \"line\": 1, \"lineType\": \"CONTEXT\", \"fileType\": \"FROM\", \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \"path\": \"path/to/file\", \"srcPath\": \"path/to/file\", \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" } } </pre> <strong>Note: general file comments are an experimental feature and may change in the near future!</strong> <p> For file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on. <p> For line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be: <ul> <li>'ADDED' - for an added line;</li> <li>'REMOVED' - for a removed line; or</li> <li>'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff.</li> </ul> 'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are: <ul> <li>'FROM' - the source file of the diff</li> <li>'TO' - the destination file of the diff</li> </ul> If the current user is not a participant the user is added as one and updated to watch the commit. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that the commit is in to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param commitId the commit to which the comments must be anchored + @param optional (nil or map[string]interface{}) with one or more of: + @param "since" (string) For a merge commit, a parent can be provided to specify which diff the comments should be on. For a commit range, a {@code sinceId} can be provided to specify where the comments should be anchored from. + @return */ func (a *DefaultApiService) CreateComment(commitId string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") @@ -803,11 +803,11 @@ func (a *DefaultApiService) CreateComment_1(ctx context.Context) (*APIResponse, } /* DefaultApiService -Create a new group. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) Name of the group. -@return */ + Create a new group. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) Name of the group. + @return */ func (a *DefaultApiService) CreateGroup(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") @@ -1084,16 +1084,16 @@ func (a *DefaultApiService) CreateTask(ctx context.Context) (*APIResponse, error } /* DefaultApiService -Creates a new user from the assembled query parameters. <p> The default group can be used to control initial permissions for new users, such as granting users the ability to login or providing read access to certain projects or repositories. If the user is not added to the default group, they may not be able to login after their account is created until explicit permissions are configured. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the username for the new user - @param "password" (string) the password for the new user - @param "displayName" (string) the display name for the new user - @param "emailAddress" (string) the e-mail address for the new user - @param "addToDefaultGroup" (bool) <code>true</code> to add the user to the default group, which can be used to grant them a set of initial permissions; otherwise, <code>false</code> to not add them to a group - @param "notify" (string) if present and not <code>false</code> instead of requiring a password, the create user will be notified via email their account has been created and requires a password to be reset. This option can only be used if a mail server has been configured -@return */ + Creates a new user from the assembled query parameters. <p> The default group can be used to control initial permissions for new users, such as granting users the ability to login or providing read access to certain projects or repositories. If the user is not added to the default group, they may not be able to login after their account is created until explicit permissions are configured. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the username for the new user + @param "password" (string) the password for the new user + @param "displayName" (string) the display name for the new user + @param "emailAddress" (string) the e-mail address for the new user + @param "addToDefaultGroup" (bool) <code>true</code> to add the user to the default group, which can be used to grant them a set of initial permissions; otherwise, <code>false</code> to not add them to a group + @param "notify" (string) if present and not <code>false</code> instead of requiring a password, the create user will be notified via email their account has been created and requires a password to be reset. This option can only be used if a mail server has been configured + @return */ func (a *DefaultApiService) CreateUser(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") @@ -1236,13 +1236,13 @@ func (a *DefaultApiService) CreateWebhook(ctx context.Context) (*APIResponse, er } /* DefaultApiService -Decline a pull request. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param pullRequestId -@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. -@return */ -func (a *DefaultApiService) Decline(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { + Decline a pull request. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param pullRequestId + @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. + @return */ +func (a *DefaultApiService) Decline(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -1252,7 +1252,7 @@ func (a *DefaultApiService) Decline(pullRequestId int64, localVarOptionals map[s // create path and map variables 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) 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 pullRequestId the ID of the pull request within the repository @return */ -func (a *DefaultApiService) Delete(pullRequestId int64) (*APIResponse, error) { +func (a *DefaultApiService) Delete(pullRequestID int64) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") localVarPostBody interface{} @@ -1315,7 +1315,7 @@ func (a *DefaultApiService) Delete(pullRequestId int64) (*APIResponse, error) { // create path and map variables 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) localVarQueryParams := url.Values{} @@ -1411,14 +1411,14 @@ func (a *DefaultApiService) DeleteAvatar(ctx context.Context) (*APIResponse, err } /* DefaultApiService -Delete a commit comment. Anyone can delete their own comment. Only users with <strong>REPO_ADMIN</strong> and above may delete comments created by other users. Comments which have replies <i>may not be deleted</i>, regardless of the user's granted permissions. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that the commit is in to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param commitId the commit to which the comments must be anchored -@param commentId the ID of the comment to retrieve -@param commitId2 the <i>full {@link Commit#getId() ID}</i> of the commit within the repository -@param optional (nil or map[string]interface{}) with one or more of: - @param "version" (int32) The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure. -@return */ + Delete a commit comment. Anyone can delete their own comment. Only users with <strong>REPO_ADMIN</strong> and above may delete comments created by other users. Comments which have replies <i>may not be deleted</i>, regardless of the user's granted permissions. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that the commit is in to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param commitId the commit to which the comments must be anchored + @param commentId the ID of the comment to retrieve + @param commitId2 the <i>full {@link Commit#getId() ID}</i> of the commit within the repository + @param optional (nil or map[string]interface{}) with one or more of: + @param "version" (int32) The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure. + @return */ func (a *DefaultApiService) DeleteComment(commitId string, commentId int64, commitId2 string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -1480,12 +1480,12 @@ func (a *DefaultApiService) DeleteComment(commitId string, commentId int64, comm } /* DefaultApiService -Delete a pull request comment. Anyone can delete their own comment. Only users with <strong>REPO_ADMIN</strong> and above may delete comments created by other users. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param commentId the id of the comment to retrieve -@param optional (nil or map[string]interface{}) with one or more of: - @param "version" (int32) The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure. -@return */ + Delete a pull request comment. Anyone can delete their own comment. Only users with <strong>REPO_ADMIN</strong> and above may delete comments created by other users. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param commentId the id of the comment to retrieve + @param optional (nil or map[string]interface{}) with one or more of: + @param "version" (int32) The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure. + @return */ func (a *DefaultApiService) DeleteComment_2(commentId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -1545,11 +1545,11 @@ func (a *DefaultApiService) DeleteComment_2(commentId int64, localVarOptionals m } /* DefaultApiService -Deletes the specified group, removing them from the system. This also removes any permissions that may have been granted to the group. <p> A user may not delete the last group that is granting them administrative permissions, or a group with greater permissions than themselves. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the name identifying the group to delete -@return */ + Deletes the specified group, removing them from the system. This also removes any permissions that may have been granted to the group. <p> A user may not delete the last group that is granting them administrative permissions, or a group with greater permissions than themselves. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the name identifying the group to delete + @return */ func (a *DefaultApiService) DeleteGroup(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -1887,11 +1887,11 @@ func (a *DefaultApiService) DeleteTask(taskId int64) (*APIResponse, error) { } /* DefaultApiService -Deletes the specified user, removing them from the system. This also removes any permissions that may have been granted to the user. <p> A user may not delete themselves, and a user with <strong>ADMIN</strong> permissions may not delete a user with <strong>SYS_ADMIN</strong>permissions. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the username identifying the user to delete -@return */ + Deletes the specified user, removing them from the system. This also removes any permissions that may have been granted to the user. <p> A user may not delete themselves, and a user with <strong>ADMIN</strong> permissions may not delete a user with <strong>SYS_ADMIN</strong>permissions. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the username identifying the user to delete + @return */ func (a *DefaultApiService) DeleteUser(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -2174,12 +2174,12 @@ func (a *DefaultApiService) EditFile(path string) (*APIResponse, error) { } /* DefaultApiService -Enable a repository hook for this repository and optionally apply new configuration. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. <p> A JSON document may be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param hookKey -@param optional (nil or map[string]interface{}) with one or more of: - @param "contentLength" (int32) -@return */ + Enable a repository hook for this repository and optionally apply new configuration. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. <p> A JSON document may be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param hookKey + @param optional (nil or map[string]interface{}) with one or more of: + @param "contentLength" (int32) + @return */ func (a *DefaultApiService) EnableHook(hookKey string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Put") @@ -2239,12 +2239,12 @@ func (a *DefaultApiService) EnableHook(hookKey string, localVarOptionals map[str } /* DefaultApiService -Enable a repository hook for this project and optionally apply new configuration. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project to call this resource. <p> A JSON document may be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param hookKey -@param optional (nil or map[string]interface{}) with one or more of: - @param "contentLength" (int32) -@return */ + Enable a repository hook for this project and optionally apply new configuration. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project to call this resource. <p> A JSON document may be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param hookKey + @param optional (nil or map[string]interface{}) with one or more of: + @param "contentLength" (int32) + @return */ func (a *DefaultApiService) EnableHook_4(hookKey string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Put") @@ -2304,12 +2304,12 @@ func (a *DefaultApiService) EnableHook_4(hookKey string, localVarOptionals map[s } /* DefaultApiService -Retrieves a list of groups the specified user is a member of. <p> The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "context" (string) the user which should be used to locate groups - @param "filter" (string) if specified only groups with names containing the supplied string will be returned -@return */ + Retrieves a list of groups the specified user is a member of. <p> The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "context" (string) the user which should be used to locate groups + @param "filter" (string) if specified only groups with names containing the supplied string will be returned + @return */ func (a *DefaultApiService) FindGroupsForUser(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -2374,12 +2374,12 @@ func (a *DefaultApiService) FindGroupsForUser(localVarOptionals map[string]inter } /* DefaultApiService -Retrieves a list of groups the specified user is <em>not</em> a member of. <p> The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "context" (string) the user which should be used to locate groups - @param "filter" (string) if specified only groups with names containing the supplied string will be returned -@return */ + Retrieves a list of groups the specified user is <em>not</em> a member of. <p> The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "context" (string) the user which should be used to locate groups + @param "filter" (string) if specified only groups with names containing the supplied string will be returned + @return */ func (a *DefaultApiService) FindOtherGroupsForUser(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -2444,12 +2444,12 @@ func (a *DefaultApiService) FindOtherGroupsForUser(localVarOptionals map[string] } /* DefaultApiService -Retrieves a list of users that are members of a specified group. <p> The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "context" (string) the group which should be used to locate members - @param "filter" (string) if specified only users with usernames, display names or email addresses containing the supplied string will be returned -@return */ + Retrieves a list of users that are members of a specified group. <p> The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "context" (string) the group which should be used to locate members + @param "filter" (string) if specified only users with usernames, display names or email addresses containing the supplied string will be returned + @return */ func (a *DefaultApiService) FindUsersInGroup(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -2514,12 +2514,12 @@ func (a *DefaultApiService) FindUsersInGroup(localVarOptionals map[string]interf } /* DefaultApiService -Retrieves a list of users that are <em>not</em> members of a specified group. <p> The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "context" (string) the group which should be used to locate non-members - @param "filter" (string) if specified only users with usernames, display names or email addresses containing the supplied string will be returned -@return */ + Retrieves a list of users that are <em>not</em> members of a specified group. <p> The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "context" (string) the group which should be used to locate non-members + @param "filter" (string) if specified only users with usernames, display names or email addresses containing the supplied string will be returned + @return */ func (a *DefaultApiService) FindUsersNotInGroup(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -2584,12 +2584,12 @@ func (a *DefaultApiService) FindUsersNotInGroup(localVarOptionals map[string]int } /* DefaultApiService -Find webhooks in this repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "event" (string) list of {@link com.atlassian.webhooks.WebhookEvent} ids to filter for - @param "statistics" (bool) {@code true} if statistics should be provided for all found webhooks -@return */ + Find webhooks in this repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "event" (string) list of {@link com.atlassian.webhooks.WebhookEvent} ids to filter for + @param "statistics" (bool) {@code true} if statistics should be provided for all found webhooks + @return */ func (a *DefaultApiService) FindWebhooks(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -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. * @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) ForkRepository(projectKey string, projectKey2 string, repositorySlug string) (*APIResponse, error) { +func (a *DefaultApiService) ForkRepository(projectKey, repositorySlug string, + localVarPostBody interface{}, + localVarHTTPContentTypes []string, +) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") - localVarPostBody interface{} localVarFileName string localVarFileBytes []byte ) @@ -2671,16 +2672,12 @@ func (a *DefaultApiService) ForkRepository(projectKey string, projectKey2 string // create path and map variables 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", projectKey2), -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 != "" { @@ -2768,14 +2765,14 @@ func (a *DefaultApiService) Get(ctx context.Context) (*APIResponse, error) { } /* DefaultApiService -Retrieve a page of activity associated with a pull request. <p> Activity items include comments, approvals, rescopes (i.e. adding and removing of commits), merges and more. <p> Different types of activity items may be introduced in newer versions of Stash or by user installed plugins, so clients should be flexible enough to handle unexpected entity shapes in the returned page. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param pullRequestId the id of the pull request within the repository -@param optional (nil or map[string]interface{}) with one or more of: - @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>) -@return */ -func (a *DefaultApiService) GetActivities(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { + Retrieve a page of activity associated with a pull request. <p> Activity items include comments, approvals, rescopes (i.e. adding and removing of commits), merges and more. <p> Different types of activity items may be introduced in newer versions of Stash or by user installed plugins, so clients should be flexible enough to handle unexpected entity shapes in the returned page. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param pullRequestId the id of the pull request within the repository + @param optional (nil or map[string]interface{}) with one or more of: + @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>) + @return */ +func (a *DefaultApiService) GetActivities(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -2785,7 +2782,7 @@ func (a *DefaultApiService) GetActivities(pullRequestId int64, localVarOptionals // create path and map variables 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) localVarQueryParams := url.Values{} @@ -2894,15 +2891,15 @@ func (a *DefaultApiService) GetApplicationProperties(ctx context.Context) (*APIR } /* DefaultApiService -Streams an archive of the repository's contents at the requested commit. If no <code>at=</code> commit is requested, an archive of the default branch is streamed. <p> The <code>filename=</code> query parameter may be used to specify the exact filename to include in the <code>\"Content-Disposition\"</code> header. If an explicit filename is not provided, one will be automatically generated based on what is being archived. Its format depends on the <code>at=</code> value: <ul> <li>No <code>at=</code> commit: <code>&lt;slug&gt;-&lt;default-branch-name&gt;@&lt;commit&gt;.&lt;format&gt;</code>; e.g. example-master@43c2f8a0fe8.zip</li> <li><code>at=sha</code>: <code>&lt;slug&gt;-&lt;at&gt;.&lt;format&gt;</code>; e.g. example-09bcbb00100cfbb5310fb6834a1d5ce6cac253e9.tar.gz</li> <li><code>at=branchOrTag</code>: <code>&lt;slug&gt;-&lt;branchOrTag&gt;@&lt;commit&gt;.&lt;format&gt;</code>; e.g. example-feature@bbb225f16e1.tar <ul> <li>If the branch or tag is qualified (e.g. <code>refs/heads/master</code>, the short name (<code>master</code>) will be included in the filename</li> <li>If the branch or tag's <i>short name</i> includes slashes (e.g. <code>release/4.6</code>), they will be converted to hyphens in the filename (<code>release-4.5</code>)</li> </ul> </li> </ul> <p> Archives may be requested in the following formats by adding the <code>format=</code> query parameter: <ul> <li><code>zip</code>: A zip file using standard compression (Default)</li> <li><code>tar</code>: An uncompressed tarball</li> <li><code>tar.gz</code> or <code>tgz</code>: A GZip-compressed tarball</li> </ul> The contents of the archive may be filtered by using the <code>path=</code> query parameter to specify paths to include. <code>path=</code> may be specified multiple times to include multiple paths. <p> The <code>prefix=</code> query parameter may be used to define a directory (or multiple directories) where the archive's contents should be placed. If the prefix does not end with <code>/</code>, one will be added automatically. The prefix is <i>always</i> treated as a directory; it is not possible to use it to prepend characters to the entries in the archive. <p> Archives of public repositories may be streamed by any authenticated or anonymous user. Streaming archives for non-public repositories requires an <i>authenticated user</i> with at least <b>REPO_READ</b> permission. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "at" (string) the commit to stream an archive of; if not supplied, an archive of the default branch is streamed - @param "filename" (string) a filename to include the \"Content-Disposition\" header - @param "format" (string) the format to stream the archive in; must be one of: zip, tar, tar.gz or tgz - @param "path" (string) paths to include in the streamed archive; may be repeated to include multiple paths - @param "prefix" (string) a prefix to apply to all entries in the streamed archive; if the supplied prefix does not end with a trailing <code>/</code>, one will be added automatically -@return */ + Streams an archive of the repository's contents at the requested commit. If no <code>at=</code> commit is requested, an archive of the default branch is streamed. <p> The <code>filename=</code> query parameter may be used to specify the exact filename to include in the <code>\"Content-Disposition\"</code> header. If an explicit filename is not provided, one will be automatically generated based on what is being archived. Its format depends on the <code>at=</code> value: <ul> <li>No <code>at=</code> commit: <code>&lt;slug&gt;-&lt;default-branch-name&gt;@&lt;commit&gt;.&lt;format&gt;</code>; e.g. example-master@43c2f8a0fe8.zip</li> <li><code>at=sha</code>: <code>&lt;slug&gt;-&lt;at&gt;.&lt;format&gt;</code>; e.g. example-09bcbb00100cfbb5310fb6834a1d5ce6cac253e9.tar.gz</li> <li><code>at=branchOrTag</code>: <code>&lt;slug&gt;-&lt;branchOrTag&gt;@&lt;commit&gt;.&lt;format&gt;</code>; e.g. example-feature@bbb225f16e1.tar <ul> <li>If the branch or tag is qualified (e.g. <code>refs/heads/master</code>, the short name (<code>master</code>) will be included in the filename</li> <li>If the branch or tag's <i>short name</i> includes slashes (e.g. <code>release/4.6</code>), they will be converted to hyphens in the filename (<code>release-4.5</code>)</li> </ul> </li> </ul> <p> Archives may be requested in the following formats by adding the <code>format=</code> query parameter: <ul> <li><code>zip</code>: A zip file using standard compression (Default)</li> <li><code>tar</code>: An uncompressed tarball</li> <li><code>tar.gz</code> or <code>tgz</code>: A GZip-compressed tarball</li> </ul> The contents of the archive may be filtered by using the <code>path=</code> query parameter to specify paths to include. <code>path=</code> may be specified multiple times to include multiple paths. <p> The <code>prefix=</code> query parameter may be used to define a directory (or multiple directories) where the archive's contents should be placed. If the prefix does not end with <code>/</code>, one will be added automatically. The prefix is <i>always</i> treated as a directory; it is not possible to use it to prepend characters to the entries in the archive. <p> Archives of public repositories may be streamed by any authenticated or anonymous user. Streaming archives for non-public repositories requires an <i>authenticated user</i> with at least <b>REPO_READ</b> permission. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "at" (string) the commit to stream an archive of; if not supplied, an archive of the default branch is streamed + @param "filename" (string) a filename to include the \"Content-Disposition\" header + @param "format" (string) the format to stream the archive in; must be one of: zip, tar, tar.gz or tgz + @param "path" (string) paths to include in the streamed archive; may be repeated to include multiple paths + @param "prefix" (string) a prefix to apply to all entries in the streamed archive; if the supplied prefix does not end with a trailing <code>/</code>, one will be added automatically + @return */ func (a *DefaultApiService) GetArchive(project, repository string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -2987,12 +2984,12 @@ func (a *DefaultApiService) GetArchive(project, repository string, localVarOptio } /* DefaultApiService -Retrieve the avatar for the project matching the supplied <strong>moduleKey</strong>. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param hookKey the complete module key of the hook module -@param optional (nil or map[string]interface{}) with one or more of: - @param "version" (string) optional version used for HTTP caching only - any non-blank version will result in a large max-age Cache-Control header. Note that this does not affect the Last-Modified header. -@return */ + Retrieve the avatar for the project matching the supplied <strong>moduleKey</strong>. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param hookKey the complete module key of the hook module + @param optional (nil or map[string]interface{}) with one or more of: + @param "version" (string) optional version used for HTTP caching only - any non-blank version will result in a large max-age Cache-Control header. Note that this does not affect the Last-Modified header. + @return */ func (a *DefaultApiService) GetAvatar(hookKey string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -3052,14 +3049,14 @@ func (a *DefaultApiService) GetAvatar(hookKey string, localVarOptionals map[stri } /* DefaultApiService -Retrieve the branches matching the supplied <strong>filterText</strong> param. <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 optional (nil or map[string]interface{}) with one or more of: - @param "base" (string) base branch or tag to compare each branch to (for the metadata providers that uses that information) - @param "details" (bool) whether to retrieve plugin-provided metadata about each branch - @param "filterText" (string) the text to match on - @param "orderBy" (string) ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated) -@return */ + Retrieve the branches matching the supplied <strong>filterText</strong> param. <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 optional (nil or map[string]interface{}) with one or more of: + @param "base" (string) base branch or tag to compare each branch to (for the metadata providers that uses that information) + @param "details" (bool) whether to retrieve plugin-provided metadata about each branch + @param "filterText" (string) the text to match on + @param "orderBy" (string) ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated) + @return */ func (a *DefaultApiService) GetBranches(project, repository string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -3138,12 +3135,12 @@ func (a *DefaultApiService) GetBranches(project, repository string, localVarOpti } /* DefaultApiService -Retrieve a page of changes made in a specified commit. <p> <strong>Note:</strong> The implementation will apply a hard cap ({@code page.max.changes}) and it is not possible to request subsequent content when that cap is exceeded. <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 optional (nil or map[string]interface{}) with one or more of: - @param "since" (string) the commit to which <code>until</code> should be compared to produce a page of changes. If not specified the commit's first parent is assumed (if one exists) - @param "until" (string) the commit to retrieve changes for -@return */ + Retrieve a page of changes made in a specified commit. <p> <strong>Note:</strong> The implementation will apply a hard cap ({@code page.max.changes}) and it is not possible to request subsequent content when that cap is exceeded. <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 optional (nil or map[string]interface{}) with one or more of: + @param "since" (string) the commit to which <code>until</code> should be compared to produce a page of changes. If not specified the commit's first parent is assumed (if one exists) + @param "until" (string) the commit to retrieve changes for + @return */ func (a *DefaultApiService) GetChanges(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -3208,13 +3205,13 @@ func (a *DefaultApiService) GetChanges(localVarOptionals map[string]interface{}) } /* DefaultApiService -Retrieve a page of changes made in a specified commit. <p> <strong>Note:</strong> The implementation will apply a hard cap ({@code page.max.changes}) and it is not possible to request subsequent content when that cap is exceeded. <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 commitId the commit to retrieve changes for -@param optional (nil or map[string]interface{}) with one or more of: - @param "since" (string) the commit to which <code>until</code> should be compared to produce a page of changes. If not specified the commit's first parent is assumed (if one exists) - @param "withComments" (bool) {@code true} to apply comment counts in the changes (the default); otherwise, {@code false} to stream changes without comment counts -@return */ + Retrieve a page of changes made in a specified commit. <p> <strong>Note:</strong> The implementation will apply a hard cap ({@code page.max.changes}) and it is not possible to request subsequent content when that cap is exceeded. <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 commitId the commit to retrieve changes for + @param optional (nil or map[string]interface{}) with one or more of: + @param "since" (string) the commit to which <code>until</code> should be compared to produce a page of changes. If not specified the commit's first parent is assumed (if one exists) + @param "withComments" (bool) {@code true} to apply comment counts in the changes (the default); otherwise, {@code false} to stream changes without comment counts + @return */ func (a *DefaultApiService) GetChanges_5(commitId string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -3396,13 +3393,13 @@ func (a *DefaultApiService) GetComment_6(commentId int64) (*APIResponse, error) } /* DefaultApiService -Retrieves the commit discussion comments that match the specified search criteria. <p> It is possible to retrieve commit discussion comments that are anchored to a range of commits by providing the {@code sinceId} that the comments anchored from. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that the commit is in to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param commitId the commit to which the comments must be anchored -@param optional (nil or map[string]interface{}) with one or more of: - @param "path" (string) the path to the file on which comments were made - @param "since" (string) For a merge commit, a parent can be provided to specify which diff the comments are on. For a commit range, a {@code sinceId} can be provided to specify where the comments are anchored from. -@return */ + Retrieves the commit discussion comments that match the specified search criteria. <p> It is possible to retrieve commit discussion comments that are anchored to a range of commits by providing the {@code sinceId} that the comments anchored from. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that the commit is in to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param commitId the commit to which the comments must be anchored + @param optional (nil or map[string]interface{}) with one or more of: + @param "path" (string) the path to the file on which comments were made + @param "since" (string) For a merge commit, a parent can be provided to specify which diff the comments are on. For a commit range, a {@code sinceId} can be provided to specify where the comments are anchored from. + @return */ func (a *DefaultApiService) GetComments(commitId string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -3468,15 +3465,15 @@ func (a *DefaultApiService) GetComments(commitId string, localVarOptionals map[s } /* DefaultApiService -Gets comments for the specified PullRequest. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "anchorState" (string) {@code ACTIVE} to stream the active comments; {@code ORPHANED} to stream the orphaned comments; {@code ALL} to stream both the active and the orphaned comments; - @param "diffType" (string) {@code EFFECTIVE} to stream the comments related to the effective diff of the pull request; {@code RANGE} to stream comments related to a commit range between two arbitrary commits (requires {@code fromHash} and {@code toHash}); {@code COMMIT} to stream comments related to a commit between two arbitrary commits (requires {@code fromHash} and {@code toHash}) - @param "fromHash" (string) the from commit hash to stream comments for a {@code RANGE} or {@code COMMIT} arbitrary change scope - @param "path" (string) the path to stream comments for a given path - @param "toHash" (string) the to commit hash to stream comments for a {@code RANGE} or {@code COMMIT} arbitrary change scope -@return */ + Gets comments for the specified PullRequest. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "anchorState" (string) {@code ACTIVE} to stream the active comments; {@code ORPHANED} to stream the orphaned comments; {@code ALL} to stream both the active and the orphaned comments; + @param "diffType" (string) {@code EFFECTIVE} to stream the comments related to the effective diff of the pull request; {@code RANGE} to stream comments related to a commit range between two arbitrary commits (requires {@code fromHash} and {@code toHash}); {@code COMMIT} to stream comments related to a commit between two arbitrary commits (requires {@code fromHash} and {@code toHash}) + @param "fromHash" (string) the from commit hash to stream comments for a {@code RANGE} or {@code COMMIT} arbitrary change scope + @param "path" (string) the path to stream comments for a given path + @param "toHash" (string) the to commit hash to stream comments for a {@code RANGE} or {@code COMMIT} arbitrary change scope + @return */ func (a *DefaultApiService) GetComments_7(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -3559,12 +3556,12 @@ func (a *DefaultApiService) GetComments_7(localVarOptionals map[string]interface } /* DefaultApiService -Retrieve a single commit <i>identified by its ID</i>>. In general, that ID is a SHA1. <u>From 2.11, ref names like \"refs/heads/master\" are no longer accepted by this resource.</u> <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 commitId the commit ID to retrieve -@param optional (nil or map[string]interface{}) with one or more of: - @param "path" (string) an optional path to filter the commit by. If supplied the details returned <i>may not</i> be for the specified commit. Instead, starting from the specified commit, they will be the details for the first commit affecting the specified path. -@return */ + Retrieve a single commit <i>identified by its ID</i>>. In general, that ID is a SHA1. <u>From 2.11, ref names like \"refs/heads/master\" are no longer accepted by this resource.</u> <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 commitId the commit ID to retrieve + @param optional (nil or map[string]interface{}) with one or more of: + @param "path" (string) an optional path to filter the commit by. If supplied the details returned <i>may not</i> be for the specified commit. Instead, starting from the specified commit, they will be the details for the first commit affecting the specified path. + @return */ func (a *DefaultApiService) GetCommit(commitId string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -3624,17 +3621,17 @@ func (a *DefaultApiService) GetCommit(commitId string, localVarOptionals map[str } /* DefaultApiService -Retrieve a page of commits from a given starting commit or \"between\" two commits. If no explicit commit is specified, the tip of the repository's default branch is assumed. commits may be identified by branch or tag name or by ID. A path may be supplied to restrict the returned commits to only those which affect that path. <p> The authenticated user must have <b>REPO_READ</b> permission for the specified repository to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "followRenames" (bool) if <code>true</code>, the commit history of the specified file will be followed past renames. Only valid for a path to a single file. - @param "ignoreMissing" (bool) <code>true</code> to ignore missing commits, <code>false</code> otherwise - @param "merges" (string) if present, controls how merge commits should be filtered. Can be either <code>exclude</code>, to exclude merge commits, <code>include</code>, to include both merge commits and non-merge commits or <code>only</code>, to only return merge commits. - @param "path" (string) an optional path to filter commits by - @param "since" (string) the commit ID or ref (exclusively) to retrieve commits after - @param "until" (string) the commit ID (SHA1) or ref (inclusively) to retrieve commits before - @param "withCounts" (bool) optionally include the total number of commits and total number of unique authors -@return */ + Retrieve a page of commits from a given starting commit or \"between\" two commits. If no explicit commit is specified, the tip of the repository's default branch is assumed. commits may be identified by branch or tag name or by ID. A path may be supplied to restrict the returned commits to only those which affect that path. <p> The authenticated user must have <b>REPO_READ</b> permission for the specified repository to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "followRenames" (bool) if <code>true</code>, the commit history of the specified file will be followed past renames. Only valid for a path to a single file. + @param "ignoreMissing" (bool) <code>true</code> to ignore missing commits, <code>false</code> otherwise + @param "merges" (string) if present, controls how merge commits should be filtered. Can be either <code>exclude</code>, to exclude merge commits, <code>include</code>, to include both merge commits and non-merge commits or <code>only</code>, to only return merge commits. + @param "path" (string) an optional path to filter commits by + @param "since" (string) the commit ID or ref (exclusively) to retrieve commits after + @param "until" (string) the commit ID (SHA1) or ref (inclusively) to retrieve commits before + @param "withCounts" (bool) optionally include the total number of commits and total number of unique authors + @return */ func (a *DefaultApiService) GetCommits(project, repository string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -3732,13 +3729,13 @@ func (a *DefaultApiService) GetCommits(project, repository string, localVarOptio } /* DefaultApiService -Retrieve commits for the specified pull request. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param pullRequestId -@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. -@return */ -func (a *DefaultApiService) GetCommits_8(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { + Retrieve commits for the specified pull request. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param pullRequestId + @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. + @return */ +func (a *DefaultApiService) GetCommits_8(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -3748,7 +3745,7 @@ func (a *DefaultApiService) GetCommits_8(pullRequestId int64, localVarOptionals // create path and map variables 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) localVarQueryParams := url.Values{} @@ -3797,14 +3794,14 @@ func (a *DefaultApiService) GetCommits_8(pullRequestId int64, localVarOptionals } /* DefaultApiService -Retrieve a page of content for a file path at a specified revision. <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 optional (nil or map[string]interface{}) with one or more of: - @param "at" (string) the commit ID or ref to retrieve the content for. - @param "type_" (bool) if true only the type will be returned for the file path instead of the contents. - @param "blame" (string) if present the blame will be returned for the file as well. - @param "noContent" (string) if present and used with blame only the blame is retrieved instead of the contents. -@return */ + Retrieve a page of content for a file path at a specified revision. <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 optional (nil or map[string]interface{}) with one or more of: + @param "at" (string) the commit ID or ref to retrieve the content for. + @param "type_" (bool) if true only the type will be returned for the file path instead of the contents. + @param "blame" (string) if present the blame will be returned for the file as well. + @param "noContent" (string) if present and used with blame only the blame is retrieved instead of the contents. + @return */ func (a *DefaultApiService) GetContent(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -3881,15 +3878,15 @@ func (a *DefaultApiService) GetContent(localVarOptionals map[string]interface{}) } /* DefaultApiService -Retrieve a page of content for a file path at a specified revision. <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 path the file path to retrieve content from -@param optional (nil or map[string]interface{}) with one or more of: - @param "at" (string) the commit ID or ref to retrieve the content for. - @param "type_" (bool) if true only the type will be returned for the file path instead of the contents. - @param "blame" (string) if present the blame will be returned for the file as well. - @param "noContent" (string) if present and used with blame only the blame is retrieved instead of the contents. -@return */ + Retrieve a page of content for a file path at a specified revision. <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 path the file path to retrieve content from + @param optional (nil or map[string]interface{}) with one or more of: + @param "at" (string) the commit ID or ref to retrieve the content for. + @param "type_" (bool) if true only the type will be returned for the file path instead of the contents. + @param "blame" (string) if present the blame will be returned for the file as well. + @param "noContent" (string) if present and used with blame only the blame is retrieved instead of the contents. + @return */ func (a *DefaultApiService) GetContent_9(path string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -3967,14 +3964,14 @@ func (a *DefaultApiService) GetContent_9(path string, localVarOptionals map[stri } /* DefaultApiService -Retrieve the raw content for a file path at a specified revision. <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 optional (nil or map[string]interface{}) with one or more of: - @param "at" (string) the commit ID or ref to retrieve the content for. - @param "markup" (string) if present or <code>\"true\"</code>, triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than <code>\"true\"</code>, the content is streamed without markup - @param "hardwrap" (bool) (Optional) Whether the markup implementation should convert newlines to breaks. If not specified, {@link MarkupService} will use the value of the <code>markup.render.hardwrap</code> property, which is <code>true</code> by default - @param "htmlEscape" (bool) (Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, {@link MarkupService} will use the value of the <code>markup.render.html.escape</code> property, which is <code>true</code> by default -@return */ + Retrieve the raw content for a file path at a specified revision. <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 optional (nil or map[string]interface{}) with one or more of: + @param "at" (string) the commit ID or ref to retrieve the content for. + @param "markup" (string) if present or <code>\"true\"</code>, triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than <code>\"true\"</code>, the content is streamed without markup + @param "hardwrap" (bool) (Optional) Whether the markup implementation should convert newlines to breaks. If not specified, {@link MarkupService} will use the value of the <code>markup.render.hardwrap</code> property, which is <code>true</code> by default + @param "htmlEscape" (bool) (Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, {@link MarkupService} will use the value of the <code>markup.render.html.escape</code> property, which is <code>true</code> by default + @return */ func (a *DefaultApiService) GetContent_10(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -4051,15 +4048,15 @@ func (a *DefaultApiService) GetContent_10(localVarOptionals map[string]interface } /* DefaultApiService -Retrieve the raw content for a file path at a specified revision. <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 path the file path to retrieve content from -@param optional (nil or map[string]interface{}) with one or more of: - @param "at" (string) the commit ID or ref to retrieve the content for. - @param "markup" (string) if present or <code>\"true\"</code>, triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than <code>\"true\"</code>, the content is streamed without markup - @param "hardwrap" (bool) (Optional) Whether the markup implementation should convert newlines to breaks. If not specified, {@link MarkupService} will use the value of the <code>markup.render.hardwrap</code> property, which is <code>true</code> by default - @param "htmlEscape" (bool) (Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, {@link MarkupService} will use the value of the <code>markup.render.html.escape</code> property, which is <code>true</code> by default -@return */ + Retrieve the raw content for a file path at a specified revision. <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 path the file path to retrieve content from + @param optional (nil or map[string]interface{}) with one or more of: + @param "at" (string) the commit ID or ref to retrieve the content for. + @param "markup" (string) if present or <code>\"true\"</code>, triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than <code>\"true\"</code>, the content is streamed without markup + @param "hardwrap" (bool) (Optional) Whether the markup implementation should convert newlines to breaks. If not specified, {@link MarkupService} will use the value of the <code>markup.render.hardwrap</code> property, which is <code>true</code> by default + @param "htmlEscape" (bool) (Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, {@link MarkupService} will use the value of the <code>markup.render.html.escape</code> property, which is <code>true</code> by default + @return */ func (a *DefaultApiService) GetContent_11(path string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -4247,11 +4244,11 @@ func (a *DefaultApiService) GetForkedRepositories(projectKey string) (*APIRespon } /* DefaultApiService -Retrieve a page of groups. <p> The authenticated user must have <strong>LICENSED_USER</strong> permission or higher to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of groups. <p> The authenticated user must have <strong>LICENSED_USER</strong> permission or higher to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetGroups(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -4310,11 +4307,11 @@ func (a *DefaultApiService) GetGroups(localVarOptionals map[string]interface{}) } /* DefaultApiService -Retrieve a page of groups that have been granted at least one global permission. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of groups that have been granted at least one global permission. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetGroupsWithAnyPermission(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -4373,11 +4370,11 @@ func (a *DefaultApiService) GetGroupsWithAnyPermission(localVarOptionals map[str } /* DefaultApiService -Retrieve a page of groups that have been granted at least one permission for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of groups that have been granted at least one permission for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetGroupsWithAnyPermission_12(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -4436,11 +4433,11 @@ func (a *DefaultApiService) GetGroupsWithAnyPermission_12(localVarOptionals map[ } /* DefaultApiService -Retrieve a page of groups that have been granted at least one permission for the specified repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of groups that have been granted at least one permission for the specified repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetGroupsWithAnyPermission_13(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -4499,11 +4496,11 @@ func (a *DefaultApiService) GetGroupsWithAnyPermission_13(localVarOptionals map[ } /* DefaultApiService -Retrieve a page of groups that have no granted global permissions. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of groups that have no granted global permissions. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetGroupsWithoutAnyPermission(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -4562,11 +4559,11 @@ func (a *DefaultApiService) GetGroupsWithoutAnyPermission(localVarOptionals map[ } /* DefaultApiService -Retrieve a page of groups that have no granted permissions for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of groups that have no granted permissions for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetGroupsWithoutAnyPermission_14(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -4625,11 +4622,11 @@ func (a *DefaultApiService) GetGroupsWithoutAnyPermission_14(localVarOptionals m } /* DefaultApiService -Retrieve a page of groups that have no granted permissions for the specified repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of groups that have no granted permissions for the specified repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetGroupsWithoutAnyPermission_15(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -4688,11 +4685,11 @@ func (a *DefaultApiService) GetGroupsWithoutAnyPermission_15(localVarOptionals m } /* DefaultApiService -Retrieve a page of group names. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission or higher to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of group names. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission or higher to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetGroups_16(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -4805,13 +4802,13 @@ func (a *DefaultApiService) GetInformation(ctx context.Context) (*APIResponse, e } /* DefaultApiService -Get the latest invocations for a specific webhook. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param webhookId id of the webhook -@param optional (nil or map[string]interface{}) with one or more of: - @param "event" (string) the string id of a specific event to retrieve the last invocation for. - @param "outcome" (string) the outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered -@return */ + Get the latest invocations for a specific webhook. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param webhookId id of the webhook + @param optional (nil or map[string]interface{}) with one or more of: + @param "event" (string) the string id of a specific event to retrieve the last invocation for. + @param "outcome" (string) the outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered + @return */ func (a *DefaultApiService) GetLatestInvocation(webhookId int32, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -5043,16 +5040,16 @@ func (a *DefaultApiService) GetMergeConfig(scmId string) (*APIResponse, error) { } /* DefaultApiService -Retrieve a page of pull requests to or from the specified repository. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository to call this resource. Optionally clients can specify PR participant filters. Each filter has a mandatory {@code username.N} parameter, and the optional {@code role.N} and {@code approved.N} parameters. <ul> <li> {@code username.N} - the \"root\" of a single participant filter, where \"N\" is a natural number starting from 1. This allows clients to specify multiple participant filters, by providing consecutive filters as {@code username.1}, {@code username.2} etc. Note that the filters numbering has to start with 1 and be continuous for all filters to be processed. The total allowed number of participant filters is 10 and all filters exceeding that limit will be dropped. </li> <li> {@code role.N}(optional) the role associated with {@code username.N}. This must be one of {@code AUTHOR}, {@code REVIEWER}, or{@code PARTICIPANT} </li> <li> {@code approved.N}(optional) the approved status associated with {@code username.N}. That is whether {@code username.N} has approved the PR. Either {@code true}, or {@code false} </li> </ul> -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "direction" (string) (optional, defaults to <strong>INCOMING</strong>) the direction relative to the specified repository. Either <strong>INCOMING</strong> or <strong>OUTGOING</strong>. - @param "at" (string) (optional) a <i>fully-qualified</i> branch ID to find pull requests to or from, such as {@code refs/heads/master} - @param "state" (string) (optional, defaults to <strong>OPEN</strong>). Supply <strong>ALL</strong> to return pull request in any state. If a state is supplied only pull requests in the specified state will be returned. Either <strong>OPEN</strong>, <strong>DECLINED</strong> or <strong>MERGED</strong>. - @param "order" (string) (optional, defaults to <strong>NEWEST</strong>) the order to return pull requests in, either <strong>OLDEST</strong> (as in: \"oldest first\") or <strong>NEWEST</strong>. - @param "withAttributes" (bool) (optional) defaults to true, whether to return additional pull request attributes - @param "withProperties" (bool) (optional) defaults to true, whether to return additional pull request properties -@return */ + Retrieve a page of pull requests to or from the specified repository. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository to call this resource. Optionally clients can specify PR participant filters. Each filter has a mandatory {@code username.N} parameter, and the optional {@code role.N} and {@code approved.N} parameters. <ul> <li> {@code username.N} - the \"root\" of a single participant filter, where \"N\" is a natural number starting from 1. This allows clients to specify multiple participant filters, by providing consecutive filters as {@code username.1}, {@code username.2} etc. Note that the filters numbering has to start with 1 and be continuous for all filters to be processed. The total allowed number of participant filters is 10 and all filters exceeding that limit will be dropped. </li> <li> {@code role.N}(optional) the role associated with {@code username.N}. This must be one of {@code AUTHOR}, {@code REVIEWER}, or{@code PARTICIPANT} </li> <li> {@code approved.N}(optional) the approved status associated with {@code username.N}. That is whether {@code username.N} has approved the PR. Either {@code true}, or {@code false} </li> </ul> + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "direction" (string) (optional, defaults to <strong>INCOMING</strong>) the direction relative to the specified repository. Either <strong>INCOMING</strong> or <strong>OUTGOING</strong>. + @param "at" (string) (optional) a <i>fully-qualified</i> branch ID to find pull requests to or from, such as {@code refs/heads/master} + @param "state" (string) (optional, defaults to <strong>OPEN</strong>). Supply <strong>ALL</strong> to return pull request in any state. If a state is supplied only pull requests in the specified state will be returned. Either <strong>OPEN</strong>, <strong>DECLINED</strong> or <strong>MERGED</strong>. + @param "order" (string) (optional, defaults to <strong>NEWEST</strong>) the order to return pull requests in, either <strong>OLDEST</strong> (as in: \"oldest first\") or <strong>NEWEST</strong>. + @param "withAttributes" (bool) (optional) defaults to true, whether to return additional pull request attributes + @param "withProperties" (bool) (optional) defaults to true, whether to return additional pull request properties + @return */ func (a *DefaultApiService) GetPage(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -5195,11 +5192,11 @@ func (a *DefaultApiService) GetProject(ctx context.Context) (*APIResponse, error } /* DefaultApiService -Retrieve the avatar for the project matching the supplied <strong>projectKey</strong>. <p> The authenticated user must have <strong>PROJECT_VIEW</strong> permission for the specified project to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "s" (int32) The desired size of the image. The server will return an image as close as possible to the specified size. -@return */ + Retrieve the avatar for the project matching the supplied <strong>projectKey</strong>. <p> The authenticated user must have <strong>PROJECT_VIEW</strong> permission for the specified project to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "s" (int32) The desired size of the image. The server will return an image as close as possible to the specified size. + @return */ func (a *DefaultApiService) GetProjectAvatar(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -5258,12 +5255,12 @@ func (a *DefaultApiService) GetProjectAvatar(localVarOptionals map[string]interf } /* DefaultApiService -Retrieve a page of projects. <p> Only projects for which the authenticated user has the <strong>PROJECT_VIEW</strong> permission will be returned. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) - @param "permission" (string) -@return */ + Retrieve a page of projects. <p> Only projects for which the authenticated user has the <strong>PROJECT_VIEW</strong> permission will be returned. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) + @param "permission" (string) + @return */ func (a *DefaultApiService) GetProjects(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -5505,12 +5502,12 @@ func (a *DefaultApiService) GetPullRequestSettings_17(scmId string) (*APIRespons } /* DefaultApiService -Retrieves a page of suggestions for pull requests that the currently authenticated user may wish to raise. Such suggestions are based on ref changes occurring and so contain the ref change that prompted the suggestion plus the time the change event occurred. Changes will be returned in descending order based on the time the change that prompted the suggestion occurred. <p> Note that although the response is a page object, the interface does not support paging, however a limit can be applied to the size of the returned page. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "changesSince" (string) restrict pull request suggestions to be based on events that occurred since some time in the past. This is expressed in seconds since \"now\". So to return suggestions based only on activity within the past 48 hours, pass a value of 172800. - @param "limit" (int32) restricts the result set to return at most this many suggestions. -@return */ + Retrieves a page of suggestions for pull requests that the currently authenticated user may wish to raise. Such suggestions are based on ref changes occurring and so contain the ref change that prompted the suggestion plus the time the change event occurred. Changes will be returned in descending order based on the time the change that prompted the suggestion occurred. <p> Note that although the response is a page object, the interface does not support paging, however a limit can be applied to the size of the returned page. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "changesSince" (string) restrict pull request suggestions to be based on events that occurred since some time in the past. This is expressed in seconds since \"now\". So to return suggestions based only on activity within the past 48 hours, pass a value of 172800. + @param "limit" (int32) restricts the result set to return at most this many suggestions. + @return */ func (a *DefaultApiService) GetPullRequestSuggestions(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -5629,15 +5626,15 @@ func (a *DefaultApiService) GetPullRequestTasks(ctx context.Context) (*APIRespon } /* DefaultApiService -Retrieve a page of pull requests where the current authenticated user is involved as either a reviewer, author or a participant. The request may be filtered by pull request state, role or participant status. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "state" (string) (optional, defaults to returning pull requests in any state). If a state is supplied only pull requests in the specified state will be returned. Either <strong>OPEN</strong>, <strong>DECLINED</strong> or <strong>MERGED</strong>. Omit this parameter to return pull request in any state. - @param "role" (string) (optional, defaults to returning pull requests for any role). If a role is supplied only pull requests where the authenticated user is a participant in the given role will be returned. Either <strong>REVIEWER</strong>, <strong>AUTHOR</strong> or <strong>PARTICIPANT</strong>. - @param "participantStatus" (string) (optional, defaults to returning pull requests with any participant status). A comma separated list of participant status. That is, one or more of <strong>UNAPPROVED</strong>, <strong>NEEDS_WORK</strong>, or <strong>APPROVED</strong>. - @param "order" (string) (optional, defaults to <strong>NEWEST</strong>) the order to return pull requests in, either <strong>OLDEST</strong> (as in: \"oldest first\"), <strong>NEWEST</strong>, <strong>PARTICIPANT_STATUS</strong>, or <strong>CLOSED_DATE</strong>. Where <strong>CLOSED_DATE</strong> is specified and the result set includes pull requests that are not in the closed state, these pull requests will appear first in the result set, followed by most recently closed pull requests. - @param "closedSince" (string) (optional, defaults to returning pull requests regardless of closed since date). Permits returning only pull requests with a closed timestamp set more recently that (now - closedSince). Units are in seconds. So for example if closed since 86400 is set only pull requests closed in the previous 24 hours will be returned. -@return */ + Retrieve a page of pull requests where the current authenticated user is involved as either a reviewer, author or a participant. The request may be filtered by pull request state, role or participant status. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "state" (string) (optional, defaults to returning pull requests in any state). If a state is supplied only pull requests in the specified state will be returned. Either <strong>OPEN</strong>, <strong>DECLINED</strong> or <strong>MERGED</strong>. Omit this parameter to return pull request in any state. + @param "role" (string) (optional, defaults to returning pull requests for any role). If a role is supplied only pull requests where the authenticated user is a participant in the given role will be returned. Either <strong>REVIEWER</strong>, <strong>AUTHOR</strong> or <strong>PARTICIPANT</strong>. + @param "participantStatus" (string) (optional, defaults to returning pull requests with any participant status). A comma separated list of participant status. That is, one or more of <strong>UNAPPROVED</strong>, <strong>NEEDS_WORK</strong>, or <strong>APPROVED</strong>. + @param "order" (string) (optional, defaults to <strong>NEWEST</strong>) the order to return pull requests in, either <strong>OLDEST</strong> (as in: \"oldest first\"), <strong>NEWEST</strong>, <strong>PARTICIPANT_STATUS</strong>, or <strong>CLOSED_DATE</strong>. Where <strong>CLOSED_DATE</strong> is specified and the result set includes pull requests that are not in the closed state, these pull requests will appear first in the result set, followed by most recently closed pull requests. + @param "closedSince" (string) (optional, defaults to returning pull requests regardless of closed since date). Permits returning only pull requests with a closed timestamp set more recently that (now - closedSince). Units are in seconds. So for example if closed since 86400 is set only pull requests closed in the previous 24 hours will be returned. + @return */ func (a *DefaultApiService) GetPullRequests(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -5720,12 +5717,12 @@ func (a *DefaultApiService) GetPullRequests(localVarOptionals map[string]interfa } /* DefaultApiService -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "start" (int32) - @param "limit" (int32) - @param "role" (string) -@return */ + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "start" (int32) + @param "limit" (int32) + @param "role" (string) + @return */ func (a *DefaultApiService) GetPullRequests_18(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -5926,11 +5923,11 @@ func (a *DefaultApiService) GetRepositoriesWithOptions(projectKey string, localV } /* DefaultApiService -Retrieve a page of recently accessed repositories for the currently authenticated user. <p> Repositories are ordered from most recently to least recently accessed. <p> Only authenticated users may call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "permission" (string) (optional) if specified, it must be a valid repository permission level name and will limit the resulting repository list to ones that the requesting user has the specified permission level to. If not specified, the default <code>REPO_READ</code> permission level will be assumed. -@return */ + Retrieve a page of recently accessed repositories for the currently authenticated user. <p> Repositories are ordered from most recently to least recently accessed. <p> Only authenticated users may call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "permission" (string) (optional) if specified, it must be a valid repository permission level name and will limit the resulting repository list to ones that the requesting user has the specified permission level to. If not specified, the default <code>REPO_READ</code> permission level will be assumed. + @return */ func (a *DefaultApiService) GetRepositoriesRecentlyAccessed(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -5989,14 +5986,14 @@ func (a *DefaultApiService) GetRepositoriesRecentlyAccessed(localVarOptionals ma } /* DefaultApiService -Retrieve a page of repositories based on query parameters that control the search. See the documentation of the parameters for more details. <p> This resource is anonymously accessible. <p> <b>Note on permissions.</b> In absence of the {@code permission} query parameter the implicit 'read' permission is assumed. Please note that this permission is lower than the REPO_READ permission rather than being equal to it. The implicit 'read' permission for a given repository is assigned to any user that has any of the higher permissions, such as <tt>REPO_READ</tt>, as well as to anonymous users if the repository is marked as public. The important implication of the above is that an anonymous request to this resource with a permission level <tt>REPO_READ</tt> is guaranteed to receive an empty list of repositories as a result. For anonymous requests it is therefore recommended to not specify the <tt>permission</tt> parameter at all. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) (optional) if specified, this will limit the resulting repository list to ones whose name matches this parameter's value. The match will be done case-insensitive and any leading and/or trailing whitespace characters on the <code>name</code> parameter will be stripped. - @param "projectname" (string) (optional) if specified, this will limit the resulting repository list to ones whose project's name matches this parameter's value. The match will be done case-insensitive and any leading and/or trailing whitespace characters on the <code>projectname</code> parameter will be stripped. - @param "permission" (string) (optional) if specified, it must be a valid repository permission level name and will limit the resulting repository list to ones that the requesting user has the specified permission level to. If not specified, the default implicit 'read' permission level will be assumed. The currently supported explicit permission values are <tt>REPO_READ</tt>, <tt>REPO_WRITE</tt> and <tt>REPO_ADMIN</tt>. - @param "visibility" (string) (optional) if specified, this will limit the resulting repository list based on the repositories visibility. Valid values are <em>public</em> or <em>private</em>. -@return */ + Retrieve a page of repositories based on query parameters that control the search. See the documentation of the parameters for more details. <p> This resource is anonymously accessible. <p> <b>Note on permissions.</b> In absence of the {@code permission} query parameter the implicit 'read' permission is assumed. Please note that this permission is lower than the REPO_READ permission rather than being equal to it. The implicit 'read' permission for a given repository is assigned to any user that has any of the higher permissions, such as <tt>REPO_READ</tt>, as well as to anonymous users if the repository is marked as public. The important implication of the above is that an anonymous request to this resource with a permission level <tt>REPO_READ</tt> is guaranteed to receive an empty list of repositories as a result. For anonymous requests it is therefore recommended to not specify the <tt>permission</tt> parameter at all. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) (optional) if specified, this will limit the resulting repository list to ones whose name matches this parameter's value. The match will be done case-insensitive and any leading and/or trailing whitespace characters on the <code>name</code> parameter will be stripped. + @param "projectname" (string) (optional) if specified, this will limit the resulting repository list to ones whose project's name matches this parameter's value. The match will be done case-insensitive and any leading and/or trailing whitespace characters on the <code>projectname</code> parameter will be stripped. + @param "permission" (string) (optional) if specified, it must be a valid repository permission level name and will limit the resulting repository list to ones that the requesting user has the specified permission level to. If not specified, the default implicit 'read' permission level will be assumed. The currently supported explicit permission values are <tt>REPO_READ</tt>, <tt>REPO_WRITE</tt> and <tt>REPO_ADMIN</tt>. + @param "visibility" (string) (optional) if specified, this will limit the resulting repository list based on the repositories visibility. Valid values are <em>public</em> or <em>private</em>. + @return */ func (a *DefaultApiService) GetRepositories_19(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -6024,6 +6021,12 @@ func (a *DefaultApiService) GetRepositories_19(localVarOptionals map[string]inte if err := typeCheckParameter(localVarOptionals["visibility"], "string", "visibility"); err != nil { 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 { 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 { 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 localVarHTTPContentTypes := []string{} @@ -6079,7 +6088,7 @@ Retrieve the repository matching the supplied <strong>projectKey</stron @param projectKey2 the parent project key @param repositorySlug the repository slug @return */ -func (a *DefaultApiService) GetRepository(projectKey string, repositorySlug string) (*APIResponse, error) { +func (a *DefaultApiService) GetRepository(projectKey, repositorySlug string) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -6131,6 +6140,65 @@ func (a *DefaultApiService) GetRepository(projectKey string, repositorySlug stri 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 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. @@ -6244,11 +6312,11 @@ func (a *DefaultApiService) GetRepositoryHook_20(hookKey string) (*APIResponse, } /* DefaultApiService -Retrieve a page of repository hooks 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 optional (nil or map[string]interface{}) with one or more of: - @param "type_" (string) the optional type to filter by. Valid values are <code>PRE_RECEIVE</code> or <code>POST_RECEIVE</code> -@return */ + Retrieve a page of repository hooks 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 optional (nil or map[string]interface{}) with one or more of: + @param "type_" (string) the optional type to filter by. Valid values are <code>PRE_RECEIVE</code> or <code>POST_RECEIVE</code> + @return */ func (a *DefaultApiService) GetRepositoryHooks(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -6307,11 +6375,11 @@ func (a *DefaultApiService) GetRepositoryHooks(localVarOptionals map[string]inte } /* DefaultApiService -Retrieve a page of repository hooks for this project. <p> The authenticated user must have <strong>PROJECT_READ</strong> permission for the specified project to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "type_" (string) the optional type to filter by. Valid values are <code>PRE_RECEIVE</code> or <code>POST_RECEIVE</code> -@return */ + Retrieve a page of repository hooks for this project. <p> The authenticated user must have <strong>PROJECT_READ</strong> permission for the specified project to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "type_" (string) the optional type to filter by. Valid values are <code>PRE_RECEIVE</code> or <code>POST_RECEIVE</code> + @return */ func (a *DefaultApiService) GetRepositoryHooks_21(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -6590,12 +6658,12 @@ func (a *DefaultApiService) GetSettings_22(hookKey string) (*APIResponse, error) } /* DefaultApiService -Get the statistics for a specific webhook. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param webhookId id of the webhook -@param optional (nil or map[string]interface{}) with one or more of: - @param "event" (string) the string id of a specific event to retrieve the last invocation for. May be empty, in which case all events are considered -@return */ + Get the statistics for a specific webhook. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param webhookId id of the webhook + @param optional (nil or map[string]interface{}) with one or more of: + @param "event" (string) the string id of a specific event to retrieve the last invocation for. May be empty, in which case all events are considered + @return */ func (a *DefaultApiService) GetStatistics(webhookId int32, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -6767,12 +6835,12 @@ func (a *DefaultApiService) GetTag(name string) (*APIResponse, error) { } /* DefaultApiService -Retrieve the tags matching the supplied <strong>filterText</strong> param. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the context repository to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filterText" (string) the text to match on - @param "orderBy" (string) ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated) -@return */ + Retrieve the tags matching the supplied <strong>filterText</strong> param. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the context repository to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filterText" (string) the text to match on + @param "orderBy" (string) ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated) + @return */ func (a *DefaultApiService) GetTags(project, repository string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -7125,11 +7193,11 @@ func (a *DefaultApiService) GetUserSettings(ctx context.Context) (*APIResponse, } /* DefaultApiService -Retrieve a page of users. <p> The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only users with usernames, display name or email addresses containing the supplied string will be returned -@return */ + Retrieve a page of users. <p> The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only users with usernames, display name or email addresses containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetUsers(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -7188,11 +7256,11 @@ func (a *DefaultApiService) GetUsers(localVarOptionals map[string]interface{}) ( } /* DefaultApiService -Retrieve a page of users that have been granted at least one global permission. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only user names containing the supplied string will be returned -@return */ + Retrieve a page of users that have been granted at least one global permission. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only user names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetUsersWithAnyPermission(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -7251,11 +7319,11 @@ func (a *DefaultApiService) GetUsersWithAnyPermission(localVarOptionals map[stri } /* DefaultApiService -Retrieve a page of users that have been granted at least one permission for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of users that have been granted at least one permission for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetUsersWithAnyPermission_23(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -7314,11 +7382,11 @@ func (a *DefaultApiService) GetUsersWithAnyPermission_23(localVarOptionals map[s } /* DefaultApiService -Retrieve a page of users that have been granted at least one permission for the specified repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of users that have been granted at least one permission for the specified repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetUsersWithAnyPermission_24(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -7377,11 +7445,11 @@ func (a *DefaultApiService) GetUsersWithAnyPermission_24(localVarOptionals map[s } /* DefaultApiService -Retrieve a page of users that have no granted global permissions. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only user names containing the supplied string will be returned -@return */ + Retrieve a page of users that have no granted global permissions. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only user names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetUsersWithoutAnyPermission(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -7440,11 +7508,11 @@ func (a *DefaultApiService) GetUsersWithoutAnyPermission(localVarOptionals map[s } /* DefaultApiService -Retrieve a page of <i>licensed</i> users that have no granted permissions for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of <i>licensed</i> users that have no granted permissions for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetUsersWithoutPermission(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -7503,11 +7571,11 @@ func (a *DefaultApiService) GetUsersWithoutPermission(localVarOptionals map[stri } /* DefaultApiService -Retrieve a page of <i>licensed</i> users that have no granted permissions for the specified repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "filter" (string) if specified only group names containing the supplied string will be returned -@return */ + Retrieve a page of <i>licensed</i> users that have no granted permissions for the specified repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" (string) if specified only group names containing the supplied string will be returned + @return */ func (a *DefaultApiService) GetUsersWithoutPermission_25(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -7620,12 +7688,12 @@ func (a *DefaultApiService) GetUsers_26(ctx context.Context) (*APIResponse, erro } /* DefaultApiService -Get a webhook by id. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param webhookId the existing webhook id -@param optional (nil or map[string]interface{}) with one or more of: - @param "statistics" (bool) -@return */ + Get a webhook by id. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param webhookId the existing webhook id + @param optional (nil or map[string]interface{}) with one or more of: + @param "statistics" (bool) + @return */ func (a *DefaultApiService) GetWebhook(webhookId int32, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -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 pullRequestId the ID of the pull request within the repository @return */ -func (a *DefaultApiService) Get_27(pullRequestId int64) (*APIResponse, error) { +func (a *DefaultApiService) Get_27(pullRequestID int64) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -7699,7 +7767,7 @@ func (a *DefaultApiService) Get_27(pullRequestId int64) (*APIResponse, error) { // create path and map variables 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) 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 pullRequestId the id of the pull request within the repository @return */ -func (a *DefaultApiService) ListParticipants(pullRequestId int64) (*APIResponse, error) { +func (a *DefaultApiService) ListParticipants(pullRequestID int64) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -7811,7 +7879,7 @@ func (a *DefaultApiService) ListParticipants(pullRequestId int64) (*APIResponse, // create path and map variables 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) localVarQueryParams := url.Values{} @@ -7853,13 +7921,13 @@ func (a *DefaultApiService) ListParticipants(pullRequestId int64) (*APIResponse, } /* DefaultApiService -Merge the specified pull request. <p> The authenticated user must have <strong>REPO_WRITE</strong> permission for the repository that this pull request targets to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param pullRequestId the ID of the pull request within the repository -@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. -@return */ -func (a *DefaultApiService) Merge(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { + Merge the specified pull request. <p> The authenticated user must have <strong>REPO_WRITE</strong> permission for the repository that this pull request targets to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param pullRequestId the ID of the pull request within the repository + @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. + @return */ +func (a *DefaultApiService) Merge(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -7869,7 +7937,7 @@ func (a *DefaultApiService) Merge(pullRequestId int64, localVarOptionals map[str // create path and map variables 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) localVarQueryParams := url.Values{} @@ -7918,12 +7986,12 @@ func (a *DefaultApiService) Merge(pullRequestId int64, localVarOptionals map[str } /* DefaultApiService -Grant or revoke a project permission to all users, i.e. set the default permission. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param permission the permission to grant Available project permissions are: <ul> <li>PROJECT_READ</li> <li>PROJECT_WRITE</li> <li>PROJECT_ADMIN</li> </ul> -@param optional (nil or map[string]interface{}) with one or more of: - @param "allow" (bool) <em>true</em> to grant the specified permission to all users, or <em>false</em> to revoke it -@return */ + Grant or revoke a project permission to all users, i.e. set the default permission. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param permission the permission to grant Available project permissions are: <ul> <li>PROJECT_READ</li> <li>PROJECT_WRITE</li> <li>PROJECT_ADMIN</li> </ul> + @param optional (nil or map[string]interface{}) with one or more of: + @param "allow" (bool) <em>true</em> to grant the specified permission to all users, or <em>false</em> to revoke it + @return */ func (a *DefaultApiService) ModifyAllUserPermission(permission string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") @@ -7983,13 +8051,13 @@ func (a *DefaultApiService) ModifyAllUserPermission(permission string, localVarO } /* DefaultApiService -Preview the generated html for given markdown contents. <p> Only authenticated users may call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "urlMode" (string) (Optional) The UrlMode used when building the url. One of: ABSOLUTE, RELATIVE and CONFIGURED By default this is RELATIVE. - @param "hardwrap" (bool) (Optional) Whether the markup implementation should convert newlines to breaks. By default this is false which reflects the standard markdown specification. - @param "htmlEscape" (bool) (Optional) true if HTML should be escaped in the input markup, false otherwise. -@return */ + Preview the generated html for given markdown contents. <p> Only authenticated users may call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "urlMode" (string) (Optional) The UrlMode used when building the url. One of: ABSOLUTE, RELATIVE and CONFIGURED By default this is RELATIVE. + @param "hardwrap" (bool) (Optional) Whether the markup implementation should convert newlines to breaks. By default this is false which reflects the standard markdown specification. + @param "htmlEscape" (bool) (Optional) true if HTML should be escaped in the input markup, false otherwise. + @return */ func (a *DefaultApiService) Preview(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") @@ -8222,13 +8290,13 @@ func (a *DefaultApiService) RenameUser(ctx context.Context) (*APIResponse, error } /* DefaultApiService -Re-open a declined pull request. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param pullRequestId the id of the pull request within the repository -@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. -@return */ -func (a *DefaultApiService) Reopen(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { + Re-open a declined pull request. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param pullRequestId the id of the pull request within the repository + @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. + @return */ +func (a *DefaultApiService) Reopen(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -8238,7 +8306,7 @@ func (a *DefaultApiService) Reopen(pullRequestId int64, localVarOptionals map[st // create path and map variables 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) localVarQueryParams := url.Values{} @@ -8343,11 +8411,11 @@ func (a *DefaultApiService) RetryCreateRepository(projectKey string) (*APIRespon } /* DefaultApiService -Revoke all global permissions for a group. <p> The authenticated user must have: <ul> <li><strong>ADMIN</strong> permission or higher; and</li> <li>greater or equal permissions than the current permission level of the group (a user may not demote the permission level of a group with higher permissions than them)</li> </ul> to call this resource. In addition, a user may not revoke a group's permissions if their own permission level would be reduced as a result. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the name of the group -@return */ + Revoke all global permissions for a group. <p> The authenticated user must have: <ul> <li><strong>ADMIN</strong> permission or higher; and</li> <li>greater or equal permissions than the current permission level of the group (a user may not demote the permission level of a group with higher permissions than them)</li> </ul> to call this resource. In addition, a user may not revoke a group's permissions if their own permission level would be reduced as a result. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the name of the group + @return */ func (a *DefaultApiService) RevokePermissionsForGroup(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -8406,11 +8474,11 @@ func (a *DefaultApiService) RevokePermissionsForGroup(localVarOptionals map[stri } /* DefaultApiService -Revoke all permissions for the specified project for a group. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. <p> In addition, a user may not revoke a group's permissions if it will reduce their own permission level. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the name of the group -@return */ + Revoke all permissions for the specified project for a group. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. <p> In addition, a user may not revoke a group's permissions if it will reduce their own permission level. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the name of the group + @return */ func (a *DefaultApiService) RevokePermissionsForGroup_28(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -8469,11 +8537,11 @@ func (a *DefaultApiService) RevokePermissionsForGroup_28(localVarOptionals map[s } /* DefaultApiService -Revoke all permissions for the specified repository for a group. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. <p> In addition, a user may not revoke a group's permissions if it will reduce their own permission level. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the name of the group -@return */ + Revoke all permissions for the specified repository for a group. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. <p> In addition, a user may not revoke a group's permissions if it will reduce their own permission level. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the name of the group + @return */ func (a *DefaultApiService) RevokePermissionsForGroup_29(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -8532,11 +8600,11 @@ func (a *DefaultApiService) RevokePermissionsForGroup_29(localVarOptionals map[s } /* DefaultApiService -Revoke all global permissions for a user. <p> The authenticated user must have: <ul> <li><strong>ADMIN</strong> permission or higher; and</li> <li>greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them)</li> </ul> to call this resource. In addition, a user may not demote their own permission level. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the name of the user -@return */ + Revoke all global permissions for a user. <p> The authenticated user must have: <ul> <li><strong>ADMIN</strong> permission or higher; and</li> <li>greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them)</li> </ul> to call this resource. In addition, a user may not demote their own permission level. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the name of the user + @return */ func (a *DefaultApiService) RevokePermissionsForUser(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -8595,11 +8663,11 @@ func (a *DefaultApiService) RevokePermissionsForUser(localVarOptionals map[strin } /* DefaultApiService -Revoke all permissions for the specified project for a user. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. <p> In addition, a user may not revoke their own project permissions if they do not have a higher global permission. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the name of the user -@return */ + Revoke all permissions for the specified project for a user. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. <p> In addition, a user may not revoke their own project permissions if they do not have a higher global permission. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the name of the user + @return */ func (a *DefaultApiService) RevokePermissionsForUser_30(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -8658,11 +8726,11 @@ func (a *DefaultApiService) RevokePermissionsForUser_30(localVarOptionals map[st } /* DefaultApiService -Revoke all permissions for the specified repository for a user. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. <p> In addition, a user may not revoke their own repository permissions if they do not have a higher project or global permission. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the name of the user -@return */ + Revoke all permissions for the specified repository for a user. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. <p> In addition, a user may not revoke their own repository permissions if they do not have a higher project or global permission. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the name of the user + @return */ func (a *DefaultApiService) RevokePermissionsForUser_31(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") @@ -8721,13 +8789,13 @@ func (a *DefaultApiService) RevokePermissionsForUser_31(localVarOptionals map[st } /* DefaultApiService -Retrieve a page of participant users for all the pull requests to or from the specified repository. <p> <p> Optionally clients can specify following filters. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "direction" (string) (optional, defaults to <strong>INCOMING</strong>) the direction relative to the specified repository. Either <strong>INCOMING</strong> or <strong>OUTGOING</strong>. - @param "filter" (string) (optional) return only users, whose username, name or email address <i>contain</i> the {@code filter} value - @param "role" (string) (optional) The role associated with the pull request participant. This must be one of {@code AUTHOR}, {@code REVIEWER}, or{@code PARTICIPANT} -@return */ + Retrieve a page of participant users for all the pull requests to or from the specified repository. <p> <p> Optionally clients can specify following filters. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "direction" (string) (optional, defaults to <strong>INCOMING</strong>) the direction relative to the specified repository. Either <strong>INCOMING</strong> or <strong>OUTGOING</strong>. + @param "filter" (string) (optional) return only users, whose username, name or email address <i>contain</i> the {@code filter} value + @param "role" (string) (optional) The role associated with the pull request participant. This must be one of {@code AUTHOR}, {@code REVIEWER}, or{@code PARTICIPANT} + @return */ func (a *DefaultApiService) Search(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -9020,12 +9088,12 @@ func (a *DefaultApiService) SetMergeConfig(scmId string) (*APIResponse, error) { } /* DefaultApiService -Promote or demote a group's permission level for the specified repository. Available repository permissions are: <ul> <li>REPO_READ</li> <li>REPO_WRITE</li> <li>REPO_ADMIN</li> </ul> See the <a href=\"https://confluence.atlassian.com/display/BitbucketServer/Using+repository+permissions\">Bitbucket Server documentation</a> for a detailed explanation of what each permission entails. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "permission" (string) the permission to grant - @param "name" (string) the names of the groups -@return */ + Promote or demote a group's permission level for the specified repository. Available repository permissions are: <ul> <li>REPO_READ</li> <li>REPO_WRITE</li> <li>REPO_ADMIN</li> </ul> See the <a href=\"https://confluence.atlassian.com/display/BitbucketServer/Using+repository+permissions\">Bitbucket Server documentation</a> for a detailed explanation of what each permission entails. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "permission" (string) the permission to grant + @param "name" (string) the names of the groups + @return */ func (a *DefaultApiService) SetPermissionForGroup(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Put") @@ -9090,12 +9158,12 @@ func (a *DefaultApiService) SetPermissionForGroup(localVarOptionals map[string]i } /* DefaultApiService -Promote or demote a user's global permission level. Available global permissions are: <ul> <li>LICENSED_USER</li> <li>PROJECT_CREATE</li> <li>ADMIN</li> <li>SYS_ADMIN</li> </ul> See the <a href=\"https://confluence.atlassian.com/display/BitbucketServer/Global+permissions\">Bitbucket Server documentation</a> for a detailed explanation of what each permission entails. <p> The authenticated user must have: <ul> <li><strong>ADMIN</strong> permission or higher; and</li> <li>the permission they are attempting to grant or higher; and</li> <li>greater or equal permissions than the current permission level of the group (a user may not demote the permission level of a group with higher permissions than them)</li> </ul> to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "permission" (string) the permission to grant - @param "name" (string) the names of the groups -@return */ + Promote or demote a user's global permission level. Available global permissions are: <ul> <li>LICENSED_USER</li> <li>PROJECT_CREATE</li> <li>ADMIN</li> <li>SYS_ADMIN</li> </ul> See the <a href=\"https://confluence.atlassian.com/display/BitbucketServer/Global+permissions\">Bitbucket Server documentation</a> for a detailed explanation of what each permission entails. <p> The authenticated user must have: <ul> <li><strong>ADMIN</strong> permission or higher; and</li> <li>the permission they are attempting to grant or higher; and</li> <li>greater or equal permissions than the current permission level of the group (a user may not demote the permission level of a group with higher permissions than them)</li> </ul> to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "permission" (string) the permission to grant + @param "name" (string) the names of the groups + @return */ func (a *DefaultApiService) SetPermissionForGroups(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Put") @@ -9160,12 +9228,12 @@ func (a *DefaultApiService) SetPermissionForGroups(localVarOptionals map[string] } /* DefaultApiService -Promote or demote a group's permission level for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "permission" (string) The permission to grant. See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions) for a detailed explanation of what each permission entails. Available project permissions are: <ul> <li>PROJECT_READ</li> <li>PROJECT_WRITE</li> <li>PROJECT_ADMIN</li> </ul> - @param "name" (string) the names of the groups -@return */ + Promote or demote a group's permission level for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "permission" (string) The permission to grant. See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions) for a detailed explanation of what each permission entails. Available project permissions are: <ul> <li>PROJECT_READ</li> <li>PROJECT_WRITE</li> <li>PROJECT_ADMIN</li> </ul> + @param "name" (string) the names of the groups + @return */ func (a *DefaultApiService) SetPermissionForGroups_32(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Put") @@ -9230,12 +9298,12 @@ func (a *DefaultApiService) SetPermissionForGroups_32(localVarOptionals map[stri } /* DefaultApiService -Promote or demote a user's permission level for the specified repository. Available repository permissions are: <ul> <li>REPO_READ</li> <li>REPO_WRITE</li> <li>REPO_ADMIN</li> </ul> See the <a href=\"https://confluence.atlassian.com/display/BitbucketServer/Using+repository+permissions\">Bitbucket Server documentation</a> for a detailed explanation of what each permission entails. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a project or global permission that already implies that permission. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the names of the users - @param "permission" (string) the permission to grant -@return */ + Promote or demote a user's permission level for the specified repository. Available repository permissions are: <ul> <li>REPO_READ</li> <li>REPO_WRITE</li> <li>REPO_ADMIN</li> </ul> See the <a href=\"https://confluence.atlassian.com/display/BitbucketServer/Using+repository+permissions\">Bitbucket Server documentation</a> for a detailed explanation of what each permission entails. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a project or global permission that already implies that permission. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the names of the users + @param "permission" (string) the permission to grant + @return */ func (a *DefaultApiService) SetPermissionForUser(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Put") @@ -9300,12 +9368,12 @@ func (a *DefaultApiService) SetPermissionForUser(localVarOptionals map[string]in } /* DefaultApiService -Promote or demote the global permission level of a user. Available global permissions are: <ul> <li>LICENSED_USER</li> <li>PROJECT_CREATE</li> <li>ADMIN</li> <li>SYS_ADMIN</li> </ul> See the <a href=\"https://confluence.atlassian.com/display/BitbucketServer/Global+permissions\">Bitbucket Server documentation</a> for a detailed explanation of what each permission entails. <p> The authenticated user must have: <ul> <li><strong>ADMIN</strong> permission or higher; and</li> <li>the permission they are attempting to grant; and</li> <li>greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them)</li> </ul> to call this resource. In addition, a user may not demote their own permission level. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the names of the users - @param "permission" (string) the permission to grant -@return */ + Promote or demote the global permission level of a user. Available global permissions are: <ul> <li>LICENSED_USER</li> <li>PROJECT_CREATE</li> <li>ADMIN</li> <li>SYS_ADMIN</li> </ul> See the <a href=\"https://confluence.atlassian.com/display/BitbucketServer/Global+permissions\">Bitbucket Server documentation</a> for a detailed explanation of what each permission entails. <p> The authenticated user must have: <ul> <li><strong>ADMIN</strong> permission or higher; and</li> <li>the permission they are attempting to grant; and</li> <li>greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them)</li> </ul> to call this resource. In addition, a user may not demote their own permission level. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the names of the users + @param "permission" (string) the permission to grant + @return */ func (a *DefaultApiService) SetPermissionForUsers(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Put") @@ -9370,12 +9438,12 @@ func (a *DefaultApiService) SetPermissionForUsers(localVarOptionals map[string]i } /* DefaultApiService -Promote or demote a user's permission level for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a global permission that already implies that permission. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "name" (string) the names of the users - @param "permission" (string) the permission to grant. See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions) for a detailed explanation of what each permission entails. Available project permissions are: <ul> <li>PROJECT_READ</li> <li>PROJECT_WRITE</li> <li>PROJECT_ADMIN</li> </ul> -@return */ + Promote or demote a user's permission level for the specified project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project or a higher global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a global permission that already implies that permission. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "name" (string) the names of the users + @param "permission" (string) the permission to grant. See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions) for a detailed explanation of what each permission entails. Available project permissions are: <ul> <li>PROJECT_READ</li> <li>PROJECT_WRITE</li> <li>PROJECT_ADMIN</li> </ul> + @return */ func (a *DefaultApiService) SetPermissionForUsers_33(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Put") @@ -9662,11 +9730,11 @@ func (a *DefaultApiService) SetSettings_34(hookKey string) (*APIResponse, error) } /* DefaultApiService -Streams files in the requested <code>path</code> with the last commit to modify each file. Commit modifications are traversed starting from the <code>at</code> commit or, if not specified, from the tip of the default branch. <p> Unless the repository is public, the authenticated user must have <b>REPO_READ</b> access to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "at" (string) the commit to use as the starting point when listing files and calculating modifications -@return */ + Streams files in the requested <code>path</code> with the last commit to modify each file. Commit modifications are traversed starting from the <code>at</code> commit or, if not specified, from the tip of the default branch. <p> Unless the repository is public, the authenticated user must have <b>REPO_READ</b> access to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "at" (string) the commit to use as the starting point when listing files and calculating modifications + @return */ func (a *DefaultApiService) Stream(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -9725,13 +9793,13 @@ func (a *DefaultApiService) Stream(localVarOptionals map[string]interface{}) (*A } /* DefaultApiService -Gets the file changes available in the {@code from} commit but not in the {@code to} commit. <p> If either the {@code from} or {@code to} commit are not specified, they will be replaced by the default branch of their containing repository. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "from" (string) the source commit (can be a partial/full commit ID or qualified/unqualified ref name) - @param "to" (string) the target commit (can be a partial/full commit ID or qualified/unqualified ref name) - @param "fromRepo" (string) an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID <em>fromRepo=42</em> or by its project key plus its repo slug separated by a slash: <em>fromRepo=projectKey/repoSlug</em> -@return */ + Gets the file changes available in the {@code from} commit but not in the {@code to} commit. <p> If either the {@code from} or {@code to} commit are not specified, they will be replaced by the default branch of their containing repository. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "from" (string) the source commit (can be a partial/full commit ID or qualified/unqualified ref name) + @param "to" (string) the target commit (can be a partial/full commit ID or qualified/unqualified ref name) + @param "fromRepo" (string) an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID <em>fromRepo=42</em> or by its project key plus its repo slug separated by a slash: <em>fromRepo=projectKey/repoSlug</em> + @return */ func (a *DefaultApiService) StreamChanges(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -9802,14 +9870,14 @@ func (a *DefaultApiService) StreamChanges(localVarOptionals map[string]interface } /* DefaultApiService -Gets changes for the specified PullRequest. <p> If the {@code changeScope} query parameter is set to {@code unreviewed}, the application will attempt to stream unreviewed changes based on the {@code lastReviewedCommit} of the current user, which are the changes between the {@code lastReviewedCommit} and the latest commit of the source branch. The current user is considered to <i>not</i> have any unreviewed changes for the pull request when the {@code lastReviewedCommit} is either {@code null} (everything is unreviewed, so all changes are streamed), equal to the latest commit of the source branch (everything is reviewed), or no longer on the source branch (the source branch has been rebased). In these cases, the application will fall back to streaming all changes (the default), which is the effective diff for the pull request. The type of changes streamed can be determined by the {@code changeScope} parameter included in the properties map of the response. <p> Note: This resource is currently <i>not paged</i>. The server will return at most one page. The server will truncate the number of changes to either the request's page limit or an internal maximum, whichever is smaller. The start parameter of the page request is also ignored. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "changeScope" (string) {@code UNREVIEWED} to stream the unreviewed changes for the current user (if they exist); {@code RANGE} to stream changes between two arbitrary commits (requires {@code sinceId} and {@code untilId}); otherwise {@code ALL} to stream all changes (the default) - @param "sinceId" (string) the since commit hash to stream changes for a {@code RANGE} arbitrary change scope - @param "untilId" (string) the until commit hash to stream changes for a {@code RANGE} arbitrary change scope - @param "withComments" (bool) {@code true} to apply comment counts in the changes (the default); otherwise, {@code false} to stream changes without comment counts -@return */ + Gets changes for the specified PullRequest. <p> If the {@code changeScope} query parameter is set to {@code unreviewed}, the application will attempt to stream unreviewed changes based on the {@code lastReviewedCommit} of the current user, which are the changes between the {@code lastReviewedCommit} and the latest commit of the source branch. The current user is considered to <i>not</i> have any unreviewed changes for the pull request when the {@code lastReviewedCommit} is either {@code null} (everything is unreviewed, so all changes are streamed), equal to the latest commit of the source branch (everything is reviewed), or no longer on the source branch (the source branch has been rebased). In these cases, the application will fall back to streaming all changes (the default), which is the effective diff for the pull request. The type of changes streamed can be determined by the {@code changeScope} parameter included in the properties map of the response. <p> Note: This resource is currently <i>not paged</i>. The server will return at most one page. The server will truncate the number of changes to either the request's page limit or an internal maximum, whichever is smaller. The start parameter of the page request is also ignored. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "changeScope" (string) {@code UNREVIEWED} to stream the unreviewed changes for the current user (if they exist); {@code RANGE} to stream changes between two arbitrary commits (requires {@code sinceId} and {@code untilId}); otherwise {@code ALL} to stream all changes (the default) + @param "sinceId" (string) the since commit hash to stream changes for a {@code RANGE} arbitrary change scope + @param "untilId" (string) the until commit hash to stream changes for a {@code RANGE} arbitrary change scope + @param "withComments" (bool) {@code true} to apply comment counts in the changes (the default); otherwise, {@code false} to stream changes without comment counts + @return */ func (a *DefaultApiService) StreamChanges_35(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -9886,13 +9954,13 @@ func (a *DefaultApiService) StreamChanges_35(localVarOptionals map[string]interf } /* DefaultApiService -Gets the commits accessible from the {@code from} commit but not in the {@code to} commit. <p> If either the {@code from} or {@code to} commit are not specified, they will be replaced by the default branch of their containing repository. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "from" (string) the source commit (can be a partial/full commit ID or qualified/unqualified ref name) - @param "to" (string) the target commit (can be a partial/full commit ID or qualified/unqualified ref name) - @param "fromRepo" (string) an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID <em>fromRepo=42</em> or by its project key plus its repo slug separated by a slash: <em>fromRepo=projectKey/repoSlug</em> -@return */ + Gets the commits accessible from the {@code from} commit but not in the {@code to} commit. <p> If either the {@code from} or {@code to} commit are not specified, they will be replaced by the default branch of their containing repository. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "from" (string) the source commit (can be a partial/full commit ID or qualified/unqualified ref name) + @param "to" (string) the target commit (can be a partial/full commit ID or qualified/unqualified ref name) + @param "fromRepo" (string) an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID <em>fromRepo=42</em> or by its project key plus its repo slug separated by a slash: <em>fromRepo=projectKey/repoSlug</em> + @return */ func (a *DefaultApiService) StreamCommits(project, repository string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -9963,17 +10031,17 @@ func (a *DefaultApiService) StreamCommits(project, repository string, localVarOp } /* DefaultApiService -Retrieve the diff between two provided revisions. <p> <strong>Note:</strong> This resource is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more {@code truncated} flags will be set to {@code true} on the {@code \"segments\"}, {@code \"hunks\"} and {@code \"diffs\"} properties, as well as the top-level object, in the returned JSON response. <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 commitId -@param optional (nil or map[string]interface{}) with one or more of: - @param "autoSrcPath" (bool) {@code true} to automatically try to find the source path when it's not provided, {@code false} otherwise. Requires the {@code path} to be provided. - @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff - @param "since" (string) the base revision to diff from. If omitted the parent revision of the until revision is used - @param "srcPath" (string) the source path for the file, if it was copied, moved or renamed - @param "whitespace" (string) optional whitespace flag which can be set to {@code ignore-all} - @param "withComments" (bool) {@code true} to embed comments in the diff (the default); otherwise {@code false} to stream the diff without comments -@return */ + Retrieve the diff between two provided revisions. <p> <strong>Note:</strong> This resource is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more {@code truncated} flags will be set to {@code true} on the {@code \"segments\"}, {@code \"hunks\"} and {@code \"diffs\"} properties, as well as the top-level object, in the returned JSON response. <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 commitId + @param optional (nil or map[string]interface{}) with one or more of: + @param "autoSrcPath" (bool) {@code true} to automatically try to find the source path when it's not provided, {@code false} otherwise. Requires the {@code path} to be provided. + @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff + @param "since" (string) the base revision to diff from. If omitted the parent revision of the until revision is used + @param "srcPath" (string) the source path for the file, if it was copied, moved or renamed + @param "whitespace" (string) optional whitespace flag which can be set to {@code ignore-all} + @param "withComments" (bool) {@code true} to embed comments in the diff (the default); otherwise {@code false} to stream the diff without comments + @return */ func (a *DefaultApiService) StreamDiff(commitId string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -10063,19 +10131,19 @@ func (a *DefaultApiService) StreamDiff(commitId string, localVarOptionals map[st } /* DefaultApiService -Retrieve the diff between two provided revisions. <p> <strong>Note:</strong> This resource is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more {@code truncated} flags will be set to {@code true} on the {@code \"segments\"}, {@code \"hunks\"} and {@code \"diffs\"} properties, as well as the top-level object, in the returned JSON response. <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 commitId -@param path the path to the file which should be diffed (optional) -@param commitId2 -@param optional (nil or map[string]interface{}) with one or more of: - @param "autoSrcPath" (bool) {@code true} to automatically try to find the source path when it's not provided, {@code false} otherwise. Requires the {@code path} to be provided. - @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff - @param "since" (string) the base revision to diff from. If omitted the parent revision of the until revision is used - @param "srcPath" (string) the source path for the file, if it was copied, moved or renamed - @param "whitespace" (string) optional whitespace flag which can be set to {@code ignore-all} - @param "withComments" (bool) {@code true} to embed comments in the diff (the default); otherwise {@code false} to stream the diff without comments -@return */ + Retrieve the diff between two provided revisions. <p> <strong>Note:</strong> This resource is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more {@code truncated} flags will be set to {@code true} on the {@code \"segments\"}, {@code \"hunks\"} and {@code \"diffs\"} properties, as well as the top-level object, in the returned JSON response. <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 commitId + @param path the path to the file which should be diffed (optional) + @param commitId2 + @param optional (nil or map[string]interface{}) with one or more of: + @param "autoSrcPath" (bool) {@code true} to automatically try to find the source path when it's not provided, {@code false} otherwise. Requires the {@code path} to be provided. + @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff + @param "since" (string) the base revision to diff from. If omitted the parent revision of the until revision is used + @param "srcPath" (string) the source path for the file, if it was copied, moved or renamed + @param "whitespace" (string) optional whitespace flag which can be set to {@code ignore-all} + @param "withComments" (bool) {@code true} to embed comments in the diff (the default); otherwise {@code false} to stream the diff without comments + @return */ func (a *DefaultApiService) StreamDiff_36(commitId string, path string, commitId2 string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -10167,17 +10235,17 @@ func (a *DefaultApiService) StreamDiff_36(commitId string, path string, commitId } /* DefaultApiService -Gets a diff of the changes available in the {@code from} commit but not in the {@code to} commit. <p> If either the {@code from} or {@code to} commit are not specified, they will be replaced by the default branch of their containing repository. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param path the path to the file to diff (optional) -@param optional (nil or map[string]interface{}) with one or more of: - @param "from" (string) the source commit (can be a partial/full commit ID or qualified/unqualified ref name) - @param "to" (string) the target commit (can be a partial/full commit ID or qualified/unqualified ref name) - @param "fromRepo" (string) an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID <em>fromRepo=42</em> or by its project key plus its repo slug separated by a slash: <em>fromRepo=projectKey/repoSlug</em> - @param "srcPath" (string) - @param "contextLines" (int32) an optional number of context lines to include around each added or removed lines in the diff - @param "whitespace" (string) an optional whitespace flag which can be set to <code>ignore-all</code> -@return */ + Gets a diff of the changes available in the {@code from} commit but not in the {@code to} commit. <p> If either the {@code from} or {@code to} commit are not specified, they will be replaced by the default branch of their containing repository. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param path the path to the file to diff (optional) + @param optional (nil or map[string]interface{}) with one or more of: + @param "from" (string) the source commit (can be a partial/full commit ID or qualified/unqualified ref name) + @param "to" (string) the target commit (can be a partial/full commit ID or qualified/unqualified ref name) + @param "fromRepo" (string) an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID <em>fromRepo=42</em> or by its project key plus its repo slug separated by a slash: <em>fromRepo=projectKey/repoSlug</em> + @param "srcPath" (string) + @param "contextLines" (int32) an optional number of context lines to include around each added or removed lines in the diff + @param "whitespace" (string) an optional whitespace flag which can be set to <code>ignore-all</code> + @return */ func (a *DefaultApiService) StreamDiff_37(project, repository, path string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -10266,15 +10334,15 @@ func (a *DefaultApiService) StreamDiff_37(project, repository, path string, loca } /* DefaultApiService -Retrieve the diff for a specified file path between two provided revisions. <p> <strong>Note:</strong> This resource is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more <code>truncated</code> flags will be set to <code>true</code> on the segments, hunks and diffs substructures in the returned JSON response. <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 optional (nil or map[string]interface{}) with one or more of: - @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff - @param "since" (string) the base revision to diff from. If omitted the parent revision of the until revision is used - @param "srcPath" (string) the source path for the file, if it was copied, moved or renamed - @param "until" (string) the target revision to diff to (required) - @param "whitespace" (string) optional whitespace flag which can be set to <code>ignore-all</code> -@return */ + Retrieve the diff for a specified file path between two provided revisions. <p> <strong>Note:</strong> This resource is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more <code>truncated</code> flags will be set to <code>true</code> on the segments, hunks and diffs substructures in the returned JSON response. <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 optional (nil or map[string]interface{}) with one or more of: + @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff + @param "since" (string) the base revision to diff from. If omitted the parent revision of the until revision is used + @param "srcPath" (string) the source path for the file, if it was copied, moved or renamed + @param "until" (string) the target revision to diff to (required) + @param "whitespace" (string) optional whitespace flag which can be set to <code>ignore-all</code> + @return */ func (a *DefaultApiService) StreamDiff_38(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -10357,16 +10425,16 @@ func (a *DefaultApiService) StreamDiff_38(localVarOptionals map[string]interface } /* DefaultApiService -Retrieve the diff for a specified file path between two provided revisions. <p> <strong>Note:</strong> This resource is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more <code>truncated</code> flags will be set to <code>true</code> on the segments, hunks and diffs substructures in the returned JSON response. <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 path the path to the file which should be diffed (required) -@param optional (nil or map[string]interface{}) with one or more of: - @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff - @param "since" (string) the base revision to diff from. If omitted the parent revision of the until revision is used - @param "srcPath" (string) the source path for the file, if it was copied, moved or renamed - @param "until" (string) the target revision to diff to (required) - @param "whitespace" (string) optional whitespace flag which can be set to <code>ignore-all</code> -@return */ + Retrieve the diff for a specified file path between two provided revisions. <p> <strong>Note:</strong> This resource is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more <code>truncated</code> flags will be set to <code>true</code> on the segments, hunks and diffs substructures in the returned JSON response. <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 path the path to the file which should be diffed (required) + @param optional (nil or map[string]interface{}) with one or more of: + @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff + @param "since" (string) the base revision to diff from. If omitted the parent revision of the until revision is used + @param "srcPath" (string) the source path for the file, if it was copied, moved or renamed + @param "until" (string) the target revision to diff to (required) + @param "whitespace" (string) optional whitespace flag which can be set to <code>ignore-all</code> + @return */ func (a *DefaultApiService) StreamDiff_39(path string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -10450,17 +10518,17 @@ func (a *DefaultApiService) StreamDiff_39(path string, localVarOptionals map[str } /* DefaultApiService -Streams a diff within a pull request. <p> If the specified file has been copied, moved or renamed, the <code>srcPath</code> must also be specified to produce the correct diff. <p> Note: This RESTful endpoint is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff - @param "diffType" (string) the type of diff being requested. When {@code withComments} is {@code true} this works as a hint to the system to attach the correct set of comments to the diff - @param "sinceId" (string) the since commit hash to stream a diff between two arbitrary hashes - @param "srcPath" (string) the previous path to the file, if the file has been copied, moved or renamed - @param "untilId" (string) the until commit hash to stream a diff between two arbitrary hashes - @param "whitespace" (string) optional whitespace flag which can be set to <code>ignore-all</code> - @param "withComments" (bool) <code>true</code> to embed comments in the diff (the default); otherwise, <code>false</code> to stream the diff without comments -@return */ + Streams a diff within a pull request. <p> If the specified file has been copied, moved or renamed, the <code>srcPath</code> must also be specified to produce the correct diff. <p> Note: This RESTful endpoint is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff + @param "diffType" (string) the type of diff being requested. When {@code withComments} is {@code true} this works as a hint to the system to attach the correct set of comments to the diff + @param "sinceId" (string) the since commit hash to stream a diff between two arbitrary hashes + @param "srcPath" (string) the previous path to the file, if the file has been copied, moved or renamed + @param "untilId" (string) the until commit hash to stream a diff between two arbitrary hashes + @param "whitespace" (string) optional whitespace flag which can be set to <code>ignore-all</code> + @param "withComments" (bool) <code>true</code> to embed comments in the diff (the default); otherwise, <code>false</code> to stream the diff without comments + @return */ func (a *DefaultApiService) StreamDiff_40(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -10555,18 +10623,18 @@ func (a *DefaultApiService) StreamDiff_40(localVarOptionals map[string]interface } /* DefaultApiService -Streams a diff within a pull request. <p> If the specified file has been copied, moved or renamed, the <code>srcPath</code> must also be specified to produce the correct diff. <p> Note: This RESTful endpoint is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param path the path to the file which should be diffed (optional) -@param optional (nil or map[string]interface{}) with one or more of: - @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff - @param "diffType" (string) the type of diff being requested. When {@code withComments} is {@code true} this works as a hint to the system to attach the correct set of comments to the diff - @param "sinceId" (string) the since commit hash to stream a diff between two arbitrary hashes - @param "srcPath" (string) the previous path to the file, if the file has been copied, moved or renamed - @param "untilId" (string) the until commit hash to stream a diff between two arbitrary hashes - @param "whitespace" (string) optional whitespace flag which can be set to <code>ignore-all</code> - @param "withComments" (bool) <code>true</code> to embed comments in the diff (the default); otherwise, <code>false</code> to stream the diff without comments -@return */ + Streams a diff within a pull request. <p> If the specified file has been copied, moved or renamed, the <code>srcPath</code> must also be specified to produce the correct diff. <p> Note: This RESTful endpoint is currently <i>not paged</i>. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param path the path to the file which should be diffed (optional) + @param optional (nil or map[string]interface{}) with one or more of: + @param "contextLines" (int32) the number of context lines to include around added/removed lines in the diff + @param "diffType" (string) the type of diff being requested. When {@code withComments} is {@code true} this works as a hint to the system to attach the correct set of comments to the diff + @param "sinceId" (string) the since commit hash to stream a diff between two arbitrary hashes + @param "srcPath" (string) the previous path to the file, if the file has been copied, moved or renamed + @param "untilId" (string) the until commit hash to stream a diff between two arbitrary hashes + @param "whitespace" (string) optional whitespace flag which can be set to <code>ignore-all</code> + @param "withComments" (bool) <code>true</code> to embed comments in the diff (the default); otherwise, <code>false</code> to stream the diff without comments + @return */ func (a *DefaultApiService) StreamDiff_41(path string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -10662,11 +10730,11 @@ func (a *DefaultApiService) StreamDiff_41(path string, localVarOptionals map[str } /* DefaultApiService -Retrieve a page of files from particular directory of a repository. The search is done recursively, so all files from any sub-directory of the specified directory will be returned. <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 optional (nil or map[string]interface{}) with one or more of: - @param "at" (string) the commit ID or ref (e.g. a branch or tag) to list the files at. If not specified the default branch will be used instead. -@return */ + Retrieve a page of files from particular directory of a repository. The search is done recursively, so all files from any sub-directory of the specified directory will be returned. <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 optional (nil or map[string]interface{}) with one or more of: + @param "at" (string) the commit ID or ref (e.g. a branch or tag) to list the files at. If not specified the default branch will be used instead. + @return */ func (a *DefaultApiService) StreamFiles(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -10725,12 +10793,12 @@ func (a *DefaultApiService) StreamFiles(localVarOptionals map[string]interface{} } /* DefaultApiService -Retrieve a page of files from particular directory of a repository. The search is done recursively, so all files from any sub-directory of the specified directory will be returned. <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 path the directory to list files for. -@param optional (nil or map[string]interface{}) with one or more of: - @param "at" (string) the commit ID or ref (e.g. a branch or tag) to list the files at. If not specified the default branch will be used instead. -@return */ + Retrieve a page of files from particular directory of a repository. The search is done recursively, so all files from any sub-directory of the specified directory will be returned. <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 path the directory to list files for. + @param optional (nil or map[string]interface{}) with one or more of: + @param "at" (string) the commit ID or ref (e.g. a branch or tag) to list the files at. If not specified the default branch will be used instead. + @return */ func (a *DefaultApiService) StreamFiles_42(path string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -10790,12 +10858,12 @@ func (a *DefaultApiService) StreamFiles_42(path string, localVarOptionals map[st } /* DefaultApiService -Streams files in the requested <code>path</code> with the last commit to modify each file. Commit modifications are traversed starting from the <code>at</code> commit or, if not specified, from the tip of the default branch. <p> Unless the repository is public, the authenticated user must have <b>REPO_READ</b> access to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param path the path within the repository whose files should be streamed -@param optional (nil or map[string]interface{}) with one or more of: - @param "at" (string) the commit to use as the starting point when listing files and calculating modifications -@return */ + Streams files in the requested <code>path</code> with the last commit to modify each file. Commit modifications are traversed starting from the <code>at</code> commit or, if not specified, from the tip of the default branch. <p> Unless the repository is public, the authenticated user must have <b>REPO_READ</b> access to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param path the path within the repository whose files should be streamed + @param optional (nil or map[string]interface{}) with one or more of: + @param "at" (string) the commit to use as the starting point when listing files and calculating modifications + @return */ func (a *DefaultApiService) Stream_43(path string, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Get") @@ -10855,11 +10923,11 @@ func (a *DefaultApiService) Stream_43(path string, localVarOptionals map[string] } /* DefaultApiService -Test connectivity to a specific endpoint. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param optional (nil or map[string]interface{}) with one or more of: - @param "url" (string) the url in which to connect to -@return */ + Test connectivity to a specific endpoint. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param optional (nil or map[string]interface{}) with one or more of: + @param "url" (string) the url in which to connect to + @return */ func (a *DefaultApiService) TestWebhook(localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") @@ -10918,13 +10986,13 @@ func (a *DefaultApiService) TestWebhook(localVarOptionals map[string]interface{} } /* DefaultApiService -Unassigns a participant from the REVIEWER role they may have been given in a pull request. <p> If the participant has no explicit role this method has no effect. <p> Afterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered. <p> The authenticated user must have <strong>REPO_WRITE</strong> permission for the repository that this pull request targets to call this resource. <p> <strong>Deprecated since 4.2</strong>. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead. -* @param ctx context.Context for authentication, logging, tracing, etc. -@param pullRequestId the id of the pull request within the repository -@param optional (nil or map[string]interface{}) with one or more of: - @param "username" (string) the participant's user name -@return */ -func (a *DefaultApiService) UnassignParticipantRole(pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { + Unassigns a participant from the REVIEWER role they may have been given in a pull request. <p> If the participant has no explicit role this method has no effect. <p> Afterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered. <p> The authenticated user must have <strong>REPO_WRITE</strong> permission for the repository that this pull request targets to call this resource. <p> <strong>Deprecated since 4.2</strong>. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param pullRequestId the id of the pull request within the repository + @param optional (nil or map[string]interface{}) with one or more of: + @param "username" (string) the participant's user name + @return */ +func (a *DefaultApiService) UnassignParticipantRole(pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") localVarPostBody interface{} @@ -10934,7 +11002,7 @@ func (a *DefaultApiService) UnassignParticipantRole(pullRequestId int64, localVa // create path and map variables 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) 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 pullRequestId the id of the pull request within the repository @return */ -func (a *DefaultApiService) Unwatch_45(pullRequestId int64) (*APIResponse, error) { +func (a *DefaultApiService) Unwatch_45(pullRequestID int64) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") localVarPostBody interface{} @@ -11113,7 +11181,7 @@ func (a *DefaultApiService) Unwatch_45(pullRequestId int64) (*APIResponse, error // create path and map variables 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) 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 pullRequestId2 the id of the pull request within the repository @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 ( localVarHTTPMethod = strings.ToUpper("Put") localVarPostBody interface{} @@ -11618,7 +11686,7 @@ func (a *DefaultApiService) UpdateStatus(pullRequestId int64, userSlug string, p // create path and map variables 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, "{"+"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 pullRequestId the ID of the pull request within the repository @return */ -func (a *DefaultApiService) Update_50(pullRequestId int64) (*APIResponse, error) { +func (a *DefaultApiService) Update_50(pullRequestID int64) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Put") localVarPostBody interface{} @@ -12004,7 +12072,7 @@ func (a *DefaultApiService) Update_50(pullRequestId int64) (*APIResponse, error) // create path and map variables 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) 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 pullRequestId the id of the pull request within the repository @return */ -func (a *DefaultApiService) Watch_52(pullRequestId int64) (*APIResponse, error) { +func (a *DefaultApiService) Watch_52(pullRequestID int64) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -12224,7 +12292,7 @@ func (a *DefaultApiService) Watch_52(pullRequestId int64) (*APIResponse, error) // create path and map variables 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) 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 pullRequestId the id of the pull request within the repository @return */ -func (a *DefaultApiService) WithdrawApproval(pullRequestId int64) (*APIResponse, error) { +func (a *DefaultApiService) WithdrawApproval(pullRequestID int64) (*APIResponse, error) { var ( localVarHTTPMethod = strings.ToUpper("Delete") localVarPostBody interface{} @@ -12280,7 +12348,7 @@ func (a *DefaultApiService) WithdrawApproval(pullRequestId int64) (*APIResponse, // create path and map variables 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) localVarQueryParams := url.Values{}