Back to godoc.org
github.com/gfleury/go-bitbucket-v1

Package bitbucketv1

v0.0.0-...-15f2a16
Latest Go to latest

The latest major version is .

Published: Aug 10, 2020 | License: MIT | Module: github.com/gfleury/go-bitbucket-v1

Index

Variables

var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func HasNextPage

func HasNextPage(response *APIResponse) (isLastPage bool, nextPageStart int)

HasNextPage returns if response is paged and has next page and where it does start

func TriggerRepoPush

func TriggerRepoPush(webHookURL string, webHook WebHookRepoPush) (*http.Response, error)

type APIClient

type APIClient struct {

	// API Services
	DefaultApi *DefaultApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the API v In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(ctx context.Context, cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
	Values  map[string]interface{}
}

APIResponse contains generic data from API Response

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse create new APIResponse from http.Response

func NewAPIResponseWithError

func NewAPIResponseWithError(r *http.Response, bodyBytes []byte, err error) (*APIResponse, error)

NewAPIResponseWithError create new erroneous API response from http.response and error

func NewBitbucketAPIResponse

func NewBitbucketAPIResponse(r *http.Response) (*APIResponse, error)

NewBitbucketAPIResponse create new API response from http.response

func NewRawAPIResponse

func NewRawAPIResponse(r *http.Response) (*APIResponse, error)

NewRawAPIResponse create new API response from http.response with raw data

type Actor

type Actor struct {
	Username    string `json:"username"`
	DisplayName string `json:"displayName"`
}

Actor contains the actor of reported changes from a webhook

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Branch

type Branch struct {
	ID              string `json:"id"`
	DisplayID       string `json:"displayId"`
	Type            string `json:"type"`
	LatestCommit    string `json:"latestCommit"`
	LatestChangeset string `json:"latestChangeset"`
	IsDefault       bool   `json:"isDefault"`
}

Branch contains git Branch information

func GetBranchesResponse

func GetBranchesResponse(r *APIResponse) ([]Branch, error)

GetBranchesResponse cast Tags into structure

type BuildStatus

type BuildStatus struct {
	State       string `json:"state"`
	Key         string `json:"key"`
	Name        string `json:"name"`
	Url         string `json:"url"`
	Description string `json:"description"`
	DateAdded   int64  `json:"dateAdded"`
}

func GetBuildStatusesResponse

func GetBuildStatusesResponse(r *APIResponse) ([]BuildStatus, error)

GetBuildStatusResponse cast BuildStatus into structure

type Change

type Change struct {
	Created bool        `json:"created"`
	Closed  bool        `json:"closed"`
	Old     interface{} `json:"old"`
	New     struct {
		Type   string `json:"type"`
		Name   string `json:"name"`
		Target struct {
			Type string `json:"type"`
			Hash string `json:"hash"`
		} `json:"target"`
	} `json:"new"`
}

Change contains changes reported by webhooks

type CloneLink struct {
	Href string `json:"href"`
	Name string `json:"name"`
}

type Code

type Code struct {
	Category   string `json:"category,omitempty"`
	IsLastPage bool   `json:"isLastPage,omitempty"`
	Count      int    `json:"count,omitempty"`
	Start      int    `json:"start,omitempty"`
	Limit      int    `json:"limit,omitempty"`
	NextStart  int    `json:"nextStart,omitempty"`
	Values     []struct {
		Repository  *Repository `json:"repository,omitempty"`
		File        string      `json:"file"`
		HitContexts [][]struct {
			Line int    `json:"line"`
			Text string `json:"text"`
		} `json:"hitContexts"`
		HitCount int `json:"hitCount"`
	} `json:"values,omitempty"`
}

type Commit

type Commit struct {
	ID                 string `json:"id"`
	DisplayID          string `json:"displayId"`
	Author             User   `json:"author"`
	AuthorTimestamp    int64  `json:"authorTimestamp"`
	Committer          User   `json:"committer"`
	CommitterTimestamp int64  `json:"committerTimestamp"`
	Message            string `json:"message"`
	Parents            []struct {
		ID        string `json:"id"`
		DisplayID string `json:"displayId"`
	} `json:"parents"`
}

Commit contains data from a commit in BitBucket

func GetCommitsResponse

func GetCommitsResponse(r *APIResponse) ([]Commit, error)

GetCommitsResponse cast Commits into structure

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

Configuration provides the configuration to connect

func NewConfiguration

func NewConfiguration(basePath string, options ...func(*Configuration)) *Configuration

NewConfiguration create new configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds defaults headers to requests

type Content

type Content struct {
	Children struct {
		IsLastPage bool `json:"isLastPage"`
		Limit      int  `json:"limit"`
		Size       int  `json:"size"`
		Start      int  `json:"start"`
		Values     []struct {
			ContentID string `json:"contentId,omitempty"`
			Path      struct {
				Components []string `json:"components"`
				Extension  string   `json:"extension"`
				Name       string   `json:"name"`
				Parent     string   `json:"parent"`
				ToString   string   `json:"toString"`
			} `json:"path"`
			Size int    `json:"size,omitempty"`
			Type string `json:"type"`
			Node string `json:"node,omitempty"`
		} `json:"values"`
	} `json:"children"`
	Path struct {
		Components []string `json:"components"`
		Name       string   `json:"name"`
		ToString   string   `json:"toString"`
	} `json:"path"`
	Revision string `json:"revision"`
}

Content contains repository content information (and files content)

func GetContentResponse

func GetContentResponse(r *APIResponse) (Content, error)

GetContentResponse cast Content into structure

type DefaultApiService

type DefaultApiService service

DefaultAPIService default service

func (*DefaultApiService) AddGroupToUser

func (a *DefaultApiService) AddGroupToUser() (*APIResponse, error)

AddGroupToUser <strong>Deprecated since 2.10</strong>. Use /rest/users/add-groups instead. <p> Add a user to a group. This is very similar to <code>groups/add-user</code>, but with the <em>context</em> and <em>itemName</em> attributes of the supplied request entity reversed. On the face of it this may appear redundant, but it facilitates a specific UI component in Stash. <p> In the request entity, the <em>context</em> attribute is the user and the <em>itemName</em> is the group. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) AddUserToGroup

func (a *DefaultApiService) AddUserToGroup() (*APIResponse, error)
AddUserToGroup

<strong>Deprecated since 2.10</strong>. Use /rest/users/add-groups instead. <p> Add a user to a group. <p> In the request entity, the <em>context</em> attribute is the group and the <em>itemName</em> is the user. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) AddUserToGroups

func (a *DefaultApiService) AddUserToGroups(name string, groups []string) (*APIResponse, error)
AddUserToGroups

Add a user to one or more groups. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) AddUsersToGroup

func (a *DefaultApiService) AddUsersToGroup() (*APIResponse, error)
DefaultApiService

Add multiple users to a group. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) Approve

func (a *DefaultApiService) Approve(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Approve a pull request as the current user. Implicitly adds the user as a participant if they are not already. <p> The authenticated user must have <strong>REPO_READ</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 pullRequestId the id of the pull request within the repository @return

func (*DefaultApiService) AssignParticipantRole

func (a *DefaultApiService) AssignParticipantRole(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Assigns a participant to an explicit role in pull request. Currently only the REVIEWER role may be assigned. <p> If the user is not yet a participant in the pull request, they are made one and assigned the supplied role. <p> If the user is already a participant in the pull request, their previous role is replaced with the supplied role unless they are already assigned the AUTHOR role which cannot be changed and will result in a Bad Request (400) response code. <p> The authenticated user must have <strong>REPO_WRITE</strong> permission for the repository that this pull request targets to call this resource.

@param pullRequestId the id of the pull request within the repository @return

func (*DefaultApiService) CanMerge

func (a *DefaultApiService) CanMerge(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Test whether a pull request can be merged. <p> A pull request may not be merged if: <ul> <li>there are conflicts that need to be manually resolved before merging; and/or</li> <li>one or more merge checks have vetoed the merge.</li> </ul> <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource.

@param pullRequestId the ID of the pull request within the repository @return

func (*DefaultApiService) ClearSenderAddress

func (a *DefaultApiService) ClearSenderAddress() (*APIResponse, error)
DefaultApiService

Clears the server email address. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) ClearUserCaptchaChallenge

func (a *DefaultApiService) ClearUserCaptchaChallenge(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string)
 @return

func (*DefaultApiService) CountPullRequestTasks

func (a *DefaultApiService) CountPullRequestTasks(projectKey, repositorySlug string, pullRequestId int64) (*APIResponse, error)
DefaultApiService

Retrieve the total number of {@link TaskState#OPEN open} and {@link TaskState#RESOLVED resolved} tasks associated with a pull request.

@return

func (*DefaultApiService) Create

func (a *DefaultApiService) Create(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
DefaultApiService

Create a new pull request between two branches. The branches may be in the same repository, or different ones. When using different repositories, they must still be in the same {@link Repository#getHierarchyId() hierarchy}. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the \"from\" and \"to\"repositories to call this resource.

@return

func (*DefaultApiService) CreateBranch

func (a *DefaultApiService) CreateBranch(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

Creates a branch using the information provided in the {@link RestCreateBranchRequest request} <p> The authenticated user must have <strong>REPO_WRITE</strong> permission for the context repository to call this resource.

@return

func (*DefaultApiService) CreateComment

func (a *DefaultApiService) CreateComment(projectKey, repositorySlug string, commitId string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) CreateComment_1

func (a *DefaultApiService) CreateComment_1(projectKey, repositorySlug string, pullRequestID int, localVarPostBody interface{}, localVarHTTPContentTypes []string) (*APIResponse, error)
DefaultApiService

Add a new comment. <p> Comments can be added in a few places by setting different attributes: <p> General pull request comment: <pre> { \"text\": \"An insightful general comment on a pull request.\" } </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\": \"RANGE\", \"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> <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. For backwards compatibility purposes if no diffType is provided and no fromHash/toHash pair is provided the diffType will be resolved to 'EFFECTIVE'. In any other cases the diffType is REQUIRED. <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 a watcher of the 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.

@return

func (*DefaultApiService) CreateGroup

func (a *DefaultApiService) CreateGroup(localVarOptionals map[string]interface{}) (*APIResponse, error)
 DefaultApiService
 Create a new group.  <p>  The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource.

 @param optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string) Name of the group.
 @return

func (*DefaultApiService) CreateProject

func (a *DefaultApiService) CreateProject(localVarPostBody Project) (*APIResponse, error)
DefaultApiService

Create a new project. <p> To include a custom avatar for the project, the project definition should contain an additional attribute with the key <code>avatar</code> and the value a data URI containing Base64-encoded image data. The URI should be in the following format: <pre> data:(content type, e.g. image/png);base64,(data) </pre> If the data is not Base64-encoded, or if a character set is defined in the URI, or the URI is otherwise invalid, <em>project creation will fail</em>. <p> The authenticated user must have <strong>PROJECT_CREATE</strong> permission to call this resource.

@return

func (*DefaultApiService) CreatePullRequest

func (a *DefaultApiService) CreatePullRequest(projectKey, repositorySlug string, pullRequest PullRequest) (*APIResponse, error)
DefaultApiService

CreatePullRequest a new pull request between two branches. The branches may be in the same repository, or different ones. When using different repositories, they must still be in the same {@link Repository#getHierarchyId() hierarchy}. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the \"from\" and \"to\"repositories to call this resource.

@return

func (*DefaultApiService) CreatePullRequestWithOptions

func (a *DefaultApiService) CreatePullRequestWithOptions(projectKey, repo string, localVarPostBody interface{}) (*APIResponse, error)

func (*DefaultApiService) CreateRepository

func (a *DefaultApiService) CreateRepository(projectKey string, repository Repository) (*APIResponse, error)
DefaultApiService

Create a new repository. Requires an existing project in which this repository will be created. The only parameters which will be used are name and scmId. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the context project to call this resource.

@param projectKey the parent project key @return

func (*DefaultApiService) CreateRepositoryWithOptions

func (a *DefaultApiService) CreateRepositoryWithOptions(projectKey string, localVarPostBody interface{}, localVarHTTPContentTypes []string) (*APIResponse, error)

func (*DefaultApiService) CreateSSHKey

func (a *DefaultApiService) CreateSSHKey(localVarOptionals map[string]interface{}) (*APIResponse, error)

CreateSSHKey create ssh key for user, params user and text

func (*DefaultApiService) CreateTag

func (a *DefaultApiService) CreateTag(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

Creates a tag using the information provided in the {@link RestCreateTagRequest request} <p> The authenticated user must have <strong>REPO_WRITE</strong> permission for the context repository to call this resource.

@return

func (*DefaultApiService) CreateTask

func (a *DefaultApiService) CreateTask() (*APIResponse, error)
DefaultApiService

Create a new task.

@return

func (*DefaultApiService) CreateUser

func (a *DefaultApiService) CreateUser(localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) CreateWebhook

func (a *DefaultApiService) CreateWebhook(projectKey, repositorySlug string, localVarPostBody interface{}, localVarHTTPContentTypes []string) (*APIResponse, error)
DefaultApiService

Create a webhook for the repository specified via the URL. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource.

@return

func (*DefaultApiService) Decline

func (a *DefaultApiService) Decline(projectKey, repositorySlug string, pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) Delete

func (a *DefaultApiService) Delete(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Deletes a pull request. <p> To call this resource, users must be authenticated and have permission to view the pull request. Additionally, they must: <ul> <li> be the pull request author, if the system is configured to allow authors to delete their own pull requests (this is the default) OR </li> <li>have repository administrator permission for the repository the pull request is targeting</li> </ul> A body containing the version of the pull request must be provided with this request. <pre><code>{ \"version\": 1 }</code></pre>

@param pullRequestId the ID of the pull request within the repository @return

func (*DefaultApiService) DeleteAvatar

func (a *DefaultApiService) DeleteAvatar(userSlug string) (*APIResponse, error)
DefaultApiService

Delete the avatar associated to a user. <p> Users are always allowed to delete their own avatar. To delete someone else's avatar the authenticated user must have global <strong>ADMIN</strong> permission, or global <strong>SYS_ADMIN</strong> permission to update a <strong>SYS_ADMIN</strong> user's avatar.

@return

func (*DefaultApiService) DeleteComment

func (a *DefaultApiService) DeleteComment(projectKey, repositorySlug string, commitId string, commentId int64, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) DeleteComment_2

func (a *DefaultApiService) DeleteComment_2(projectKey, repositorySlug string, pullRequestId, commentId int64, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) DeleteGroup

func (a *DefaultApiService) DeleteGroup(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string) the name identifying the group to delete
 @return

func (*DefaultApiService) DeleteMailConfig

func (a *DefaultApiService) DeleteMailConfig() (*APIResponse, error)
DefaultApiService

Deletes the current mail configuration. <p> The authenticated user must have the <strong>SYS_ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) DeleteProject

func (a *DefaultApiService) DeleteProject(projectKey string) (*APIResponse, error)
DefaultApiService

Delete the project matching the supplied <strong>projectKey</strong>. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project to call this resource.

@return

func (*DefaultApiService) DeletePullRequest

func (a *DefaultApiService) DeletePullRequest(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Deletes a pull request. <p> To call this resource, users must be authenticated and have permission to view the pull request. Additionally, they must: <ul> <li> be the pull request author, if the system is configured to allow authors to delete their own pull requests (this is the default) OR </li> <li>have repository administrator permission for the repository the pull request is targeting</li> </ul> A body containing the version of the pull request must be provided with this request. <pre><code>{ \"version\": 1 }</code></pre>

@param pullRequestId the ID of the pull request within the repository @return

func (*DefaultApiService) DeleteRepository

func (a *DefaultApiService) DeleteRepository(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

Schedule the repository matching the supplied <strong>projectKey</strong> and <strong>repositorySlug</strong> to be deleted. If the request repository is not present <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource.

@param projectKey the parent project key @param projectKey2 the parent project key @param repositorySlug the repository slug @return

func (*DefaultApiService) DeleteRepositoryHook

func (a *DefaultApiService) DeleteRepositoryHook(projectKey, repositorySlug string, hookKey string) (*APIResponse, error)
DefaultApiService

Delete repository hook configuration for the supplied <strong>hookKey</strong> and <strong>repositorySlug</strong> <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource.

@param hookKey @return

func (*DefaultApiService) DeleteTask

func (a *DefaultApiService) DeleteTask(taskId int64) (*APIResponse, error)
DefaultApiService

Delete a task. <p> Note that only the task's creator, the context's author or an admin of the context's repository can delete a task. (For a pull request task, those are the task's creator, the pull request's author or an admin on the repository containing the pull request). Additionally a task cannot be deleted if it has already been resolved.

@param taskId the id identifying the task to delete @return

func (*DefaultApiService) DeleteUser

func (a *DefaultApiService) DeleteUser(localVarOptionals map[string]interface{}) (*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 optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string) the username identifying the user to delete
 @return

func (*DefaultApiService) DeleteWebhook

func (a *DefaultApiService) DeleteWebhook(projectKey, repositorySlug string, webhookId int32) (*APIResponse, error)
DefaultApiService

Delete a webhook for the repository specified via the URL. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource.

@param webhookId the existing webhook id @return

func (*DefaultApiService) DeleteWithVersion

func (a *DefaultApiService) DeleteWithVersion(projectKey, repositorySlug string, pullRequestID, version int64) (*APIResponse, error)
DefaultApiService

Deletes a pull request. <p> To call this resource, users must be authenticated and have permission to view the pull request. Additionally, they must: <ul> <li> be the pull request author, if the system is configured to allow authors to delete their own pull requests (this is the default) OR </li> <li>have repository administrator permission for the repository the pull request is targeting</li> </ul> A body containing the version of the pull request must be provided with this request. <pre><code>{ \"version\": 1 }</code></pre>

@param pullRequestId the ID of the pull request within the repository @return

func (*DefaultApiService) DisableHook

func (a *DefaultApiService) DisableHook(projectKey, repositorySlug string, hookKey string) (*APIResponse, error)
DefaultApiService

Disable a repository hook for this repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource.

@param hookKey @return

func (*DefaultApiService) DisableHook_3

func (a *DefaultApiService) DisableHook_3(projectKey, hookKey string) (*APIResponse, error)
DefaultApiService

Disable a repository hook for this project. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project to call this resource.

@param hookKey @return

func (*DefaultApiService) EditFile

func (a *DefaultApiService) EditFile(projectKey, repositorySlug, path string) (*APIResponse, error)
DefaultApiService

Update the content of <code>path</code>, on the given <code>repository</code> and <code>branch</code>. <p> This resource accepts PUT multipart form data, containing the file in a form-field named <code>content</code>. <p> An example <a href=\"http://curl.haxx.se/\">curl</a> request to update 'README.md' would be: <pre> curl -X PUT -u username:password -F content=@README.md -F 'message=Updated using file-edit REST API' -F branch=master -F sourceCommitId=5636641a50b http://example.com/rest/api/latest/projects/PROJECT_1/repos/repo_1/browse/README.md </pre> <p> <ui> <li>branch: the branch on which the <code>path</code> should be modified or created</li> <li>content: the full content of the file at <code>path</code> </li> <li>message: the message associated with this change, to be used as the commit message. Or null if the default message should be used.</li> <li>sourceCommitId: the commit ID of the file before it was edited, used to identify if content has changed. Or null if this is a new file</li> </ui> <p> The file can be updated or created on a new branch. In this case, the <code>sourceBranch</code> parameter should be provided to identify the starting point for the new branch and the <code>branch</code> parameter identifies the branch to create the new commit on.

@param path the file path to retrieve content from @return

func (*DefaultApiService) EnableHook

func (a *DefaultApiService) EnableHook(projectKey, repositorySlug, hookKey string, localVarOptionals map[string]interface{}) (*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 hookKey
 @param optional (nil or map[string]interface{}) with one or more of:
	 @param "contentLength" (int32)
 @return

func (*DefaultApiService) EnableHook_4

func (a *DefaultApiService) EnableHook_4(projectKey, repositorySlug, hookKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 hookKey
 @param optional (nil or map[string]interface{}) with one or more of:
	 @param "contentLength" (int32)
 @return

func (*DefaultApiService) FindGroupsForUser

func (a *DefaultApiService) FindGroupsForUser(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) FindOtherGroupsForUser

func (a *DefaultApiService) FindOtherGroupsForUser(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) FindUsersInGroup

func (a *DefaultApiService) FindUsersInGroup(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) FindUsersNotInGroup

func (a *DefaultApiService) FindUsersNotInGroup(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) FindWebhooks

func (a *DefaultApiService) FindWebhooks(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) ForkRepository

func (a *DefaultApiService) ForkRepository(projectKey, repositorySlug string,
	localVarPostBody interface{},
	localVarHTTPContentTypes []string,
) (*APIResponse, error)
DefaultApiService

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 projectKey the parent project key @param repositorySlug the repository slug @return

func (*DefaultApiService) GetActivities

func (a *DefaultApiService) GetActivities(projectKey, repositorySlug string, pullRequestID int64, localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) GetApplicationProperties

func (a *DefaultApiService) GetApplicationProperties() (*APIResponse, error)
DefaultApiService

Retrieve version information and other application properties. <p> No authentication is required to call this resource.

@return

func (*DefaultApiService) GetArchive

func (a *DefaultApiService) GetArchive(project, repository string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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><slug>-<default-branch-name>@<commit>.<format></code>;      e.g. example-master@43c2f8a0fe8.zip</li>      <li><code>at=sha</code>: <code><slug>-<at>.<format></code>; e.g.      example-09bcbb00100cfbb5310fb6834a1d5ce6cac253e9.tar.gz</li>      <li><code>at=branchOrTag</code>: <code><slug>-<branchOrTag>@<commit>.<format></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 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 (*DefaultApiService) GetAvatar

func (a *DefaultApiService) GetAvatar(hookKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 DefaultApiService
 Retrieve the avatar for the project matching the supplied <strong>moduleKey</strong>.

 @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 (*DefaultApiService) GetBranches

func (a *DefaultApiService) GetBranches(project, repository string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetChanges

func (a *DefaultApiService) GetChanges(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetChanges_5

func (a *DefaultApiService) GetChanges_5(projectKey, repositorySlug, commitId string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetComment

func (a *DefaultApiService) GetComment(projectKey, repositorySlug, commitId string, commentId int64) (*APIResponse, error)
DefaultApiService

Retrieves a commit discussion comment. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that the commit is in to call this resource.

@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 @return

func (*DefaultApiService) GetComment_6

func (a *DefaultApiService) GetComment_6(projectKey, repositorySlug string, pullRequestId, commentId int64) (*APIResponse, error)
DefaultApiService

Retrieves a pull request comment. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource.

@param commentId the id of the comment to retrieve @return

func (*DefaultApiService) GetComments

func (a *DefaultApiService) GetComments(projectKey, repositorySlug, commitId string, localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) GetComments_7

func (a *DefaultApiService) GetComments_7(projectKey, repositorySlug string, pullRequestId int64, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetCommit

func (a *DefaultApiService) GetCommit(projectKey, repositorySlug, commitId string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetCommitBuildStatuses

func (a *DefaultApiService) GetCommitBuildStatuses(commitSHA string) (*APIResponse, error)

func (*DefaultApiService) GetCommitStats

func (a *DefaultApiService) GetCommitStats(commitId string) (*APIResponse, error)

DefaultApiService Gets statistics regarding the builds associated with a commit.

* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param commitId the commit Id

func (*DefaultApiService) GetCommitStatus

func (a *DefaultApiService) GetCommitStatus(commitId string) (*APIResponse, error)

DefaultApiService Gets the build statuses associated with a commit.

* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param commitId the commit Id

func (*DefaultApiService) GetCommits

func (a *DefaultApiService) GetCommits(project, repository string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetCommitsStats

func (a *DefaultApiService) GetCommitsStats(commits []string) (*APIResponse, error)

DefaultApiService Produces a list of the build statistics for multiple commits. Commits without any builds associated with them will not be returned. For example if the commit e00cf62997a027bbf785614a93e2e55bb331d268 does not have any build statuses associated with it, it will not be present in the response.

* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param commits Array of commits.

func (*DefaultApiService) GetCommits_8

func (a *DefaultApiService) GetCommits_8(projectKey, repositorySlug string, pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetContent

func (a *DefaultApiService) GetContent(projectKey string, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetContent_0

func (a *DefaultApiService) GetContent_0(projectKey string, repositorySlug string, path string, localVarOptionals map[string]interface{}) (*APIResponse, error)

func (*DefaultApiService) GetContent_10

func (a *DefaultApiService) GetContent_10(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetContent_11

func (a *DefaultApiService) GetContent_11(projectKey, repositorySlug, path string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetContent_9

func (a *DefaultApiService) GetContent_9(projectKey, repositorySlug, path string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetDefaultBranch

func (a *DefaultApiService) GetDefaultBranch(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

Get the default branch of the repository. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository to call this resource.

@return

func (*DefaultApiService) GetForkedRepositories

func (a *DefaultApiService) GetForkedRepositories(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

Retrieve repositories which have been forked from this one. Unlike {@link #getRelatedRepositories(Repository, PageRequest) related repositories}, this only looks at a given repository's direct forks. If those forks have themselves been the origin of more forks, such \"grandchildren\" repositories will not be retrieved. <p> Only repositories to which the authenticated user has <b>REPO_READ</b> permission will be included, even if other repositories have been forked from this one.

@param projectKey the parent project key @return

func (*DefaultApiService) GetGroups

func (a *DefaultApiService) GetGroups(localVarOptionals map[string]interface{}) (*APIResponse, error)
 DefaultApiService
 Retrieve a page of groups.  <p>  The authenticated user must have <strong>LICENSED_USER</strong> permission or higher to call this resource.

 @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 (*DefaultApiService) GetGroupsWithAnyPermission

func (a *DefaultApiService) GetGroupsWithAnyPermission(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetGroupsWithAnyPermission_12

func (a *DefaultApiService) GetGroupsWithAnyPermission_12(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetGroupsWithAnyPermission_13

func (a *DefaultApiService) GetGroupsWithAnyPermission_13(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetGroupsWithoutAnyPermission

func (a *DefaultApiService) GetGroupsWithoutAnyPermission(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetGroupsWithoutAnyPermission_14

func (a *DefaultApiService) GetGroupsWithoutAnyPermission_14(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetGroupsWithoutAnyPermission_15

func (a *DefaultApiService) GetGroupsWithoutAnyPermission_15(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetGroups_16

func (a *DefaultApiService) GetGroups_16(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetInformation

func (a *DefaultApiService) GetInformation() (*APIResponse, error)
DefaultApiService

Gets information about the nodes that currently make up the stash cluster. <p> The authenticated user must have the <strong>SYS_ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) GetLatestInvocation

func (a *DefaultApiService) GetLatestInvocation(projectKey, repositorySlug string, webhookId int32, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetLevel

func (a *DefaultApiService) GetLevel(loggerName string) (*APIResponse, error)
DefaultApiService

Retrieve the current log level for a given logger. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource.

@param loggerName the name of the logger. @return

func (*DefaultApiService) GetLicense

func (a *DefaultApiService) GetLicense() (*APIResponse, error)
DefaultApiService

Retrieves details about the current license, as well as the current status of the system with regards to the installed license. The status includes the current number of users applied toward the license limit, as well as any status messages about the license (warnings about expiry or user counts exceeding license limits). <p> The authenticated user must have <b>ADMIN</b> permission. Unauthenticated users, and non-administrators, are not permitted to access license details.

@return

func (*DefaultApiService) GetMailConfig

func (a *DefaultApiService) GetMailConfig() (*APIResponse, error)
DefaultApiService

Retrieves the current mail configuration. The authenticated user must have the <strong>SYS_ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) GetMergeConfig

func (a *DefaultApiService) GetMergeConfig(scmId string) (*APIResponse, error)
DefaultApiService

Retrieve the merge strategies available for this instance. <p> The user must be authenticated to call this resource.

@param scmId the id of the scm to get strategies for @return

func (*DefaultApiService) GetProject

func (a *DefaultApiService) GetProject(projectKey string) (*APIResponse, error)
DefaultApiService

Retrieve 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.

@return

func (*DefaultApiService) GetProjectAvatar

func (a *DefaultApiService) GetProjectAvatar(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) GetProjects

func (a *DefaultApiService) GetProjects(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string)
	 @param "permission" (string)
 @return

func (*DefaultApiService) GetPullRequest

func (a *DefaultApiService) GetPullRequest(projectKey, repositorySlug string, pullRequestID int) (*APIResponse, error)
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 projectKey the parent project key @param repositorySlug the repository slug @return

func (*DefaultApiService) GetPullRequestActivity

func (a *DefaultApiService) GetPullRequestActivity(projectKey, repositorySlug string, pullRequestID int) (*APIResponse, error)
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 projectKey the parent project key @param repositorySlug the repository slug @return

func (*DefaultApiService) GetPullRequestActivityWithOptions

func (a *DefaultApiService) GetPullRequestActivityWithOptions(projectKey, repositorySlug string, pullRequestID int, localVarOptionals map[string]interface{}) (*APIResponse, error)
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 projectKey the parent project key @param repositorySlug the repository slug @return

func (*DefaultApiService) GetPullRequestCommits

func (a *DefaultApiService) GetPullRequestCommits(projectKey, repositorySlug string, pullRequestID int) (*APIResponse, error)
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 projectKey the parent project key @param repositorySlug the repository slug @return

func (*DefaultApiService) GetPullRequestCommitsWithOptions

func (a *DefaultApiService) GetPullRequestCommitsWithOptions(projectKey, repositorySlug string, pullRequestID int, localVarOptionals map[string]interface{}) (*APIResponse, error)

func (*DefaultApiService) GetPullRequestCount

func (a *DefaultApiService) GetPullRequestCount() (*APIResponse, error)
DefaultApiService

@return

func (*DefaultApiService) GetPullRequestDiff

func (a *DefaultApiService) GetPullRequestDiff(projectKey, repositorySlug string, pullRequestID int, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetPullRequestDiffRaw

func (a *DefaultApiService) GetPullRequestDiffRaw(projectKey, repositorySlug string, pullRequestID int, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetPullRequestSettings

func (a *DefaultApiService) GetPullRequestSettings(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

Retrieve the pull request settings for the context repository. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the context repository to call this resource. <p> This resource will call all RestFragments that are registered with the key <strong>bitbucket.repository.settings.pullRequests</strong>. If any fragment fails validations by returning a non-empty Map of errors, then no fragments will execute. <p> The property keys for the settings that are bundled with the application are <ul> <li>mergeConfig - the merge strategy configuration for pull requests</li> <li>requiredApprovers - (Deprecated, please use com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook instead) the number of approvals required on a pull request for it to be mergeable, or 0 if the merge check is disabled</li> <li>com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook - the merge check configuration for required approvers</li> <li>requiredAllApprovers - whether or not all approvers must approve a pull request for it to be mergeable</li> <li>requiredAllTasksComplete - whether or not all tasks on a pull request need to be completed for it to be mergeable</li> <li>requiredSuccessfulBuilds - (Deprecated, please use com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck instead) the number of successful builds on a pull request for it to be mergeable, or 0 if the merge check is disabled</li> <li>com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck - the merge check configuration for required builds</li> </ul>

@return

func (*DefaultApiService) GetPullRequestSettings_17

func (a *DefaultApiService) GetPullRequestSettings_17(projectKey, repositorySlug string, scmId string) (*APIResponse, error)
DefaultApiService

Retrieve the merge strategy configuration for this project and SCM. <p> The authenticated user must have <strong>PROJECT_READ</strong> permission for the context repository to call this resource.

@param scmId the SCM to get strategies for @return

func (*DefaultApiService) GetPullRequestSuggestions

func (a *DefaultApiService) GetPullRequestSuggestions(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetPullRequestTasks

func (a *DefaultApiService) GetPullRequestTasks(projectKey, repositorySlug string, pullRequestId int64) (*APIResponse, error)
DefaultApiService

Retrieve the tasks associated with a pull request.

@return

func (*DefaultApiService) GetPullRequests

func (a *DefaultApiService) GetPullRequests(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetPullRequestsPage

func (a *DefaultApiService) GetPullRequestsPage(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) GetPullRequests_18

func (a *DefaultApiService) GetPullRequests_18(localVarOptionals map[string]interface{}) (*APIResponse, error)
 DefaultApiService

 @param optional (nil or map[string]interface{}) with one or more of:
	 @param "start" (int32)
	 @param "limit" (int32)
	 @param "role" (string)
 @return

func (*DefaultApiService) GetRelatedRepositories

func (a *DefaultApiService) GetRelatedRepositories(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

Retrieve repositories which are related to this one. Related repositories are from the same {@link Repository#getHierarchyId() hierarchy} as this repository. <p> Only repositories to which the authenticated user has <b>REPO_READ</b> permission will be included, even if more repositories are part of this repository's hierarchy.

@param projectKey the parent project key @return

func (*DefaultApiService) GetRepositories

func (a *DefaultApiService) GetRepositories(projectKey string) (*APIResponse, error)
DefaultApiService

Retrieve repositories from the project corresponding to the supplied <strong>projectKey</strong>. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the specified project to call this resource.

@param projectKey the parent project key @return

func (*DefaultApiService) GetRepositoriesRecentlyAccessed

func (a *DefaultApiService) GetRepositoriesRecentlyAccessed(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetRepositoriesWithOptions

func (a *DefaultApiService) GetRepositoriesWithOptions(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)

func (*DefaultApiService) GetRepositories_19

func (a *DefaultApiService) GetRepositories_19(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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  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 (*DefaultApiService) GetRepository

func (a *DefaultApiService) GetRepository(projectKey, repositorySlug string) (*APIResponse, error)
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 projectKey the parent project key @param projectKey2 the parent project key @param repositorySlug the repository slug @return

func (*DefaultApiService) GetRepositoryHook

func (a *DefaultApiService) GetRepositoryHook(projectKey, repositorySlug string, hookKey string) (*APIResponse, error)
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 hookKey @return

func (*DefaultApiService) GetRepositoryHook_20

func (a *DefaultApiService) GetRepositoryHook_20(projectKey, repositorySlug string, hookKey string) (*APIResponse, error)
DefaultApiService

Retrieve a repository hook for this project. <p> The authenticated user must have <strong>PROJECT_READ</strong> permission for the specified project to call this resource.

@param hookKey @return

func (*DefaultApiService) GetRepositoryHooks

func (a *DefaultApiService) GetRepositoryHooks(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetRepositoryHooks_21

func (a *DefaultApiService) GetRepositoryHooks_21(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetRootLevel

func (a *DefaultApiService) GetRootLevel() (*APIResponse, error)
DefaultApiService

Retrieve the current log level for the root logger. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource.

@return

func (*DefaultApiService) GetSSHKeys

func (a *DefaultApiService) GetSSHKeys(user string) (*APIResponse, error)

GetSSHKeys retrieve ssh keys per user, param

func (*DefaultApiService) GetSenderAddress

func (a *DefaultApiService) GetSenderAddress() (*APIResponse, error)
DefaultApiService

Retrieves the server email address

@return

func (*DefaultApiService) GetSettings

func (a *DefaultApiService) GetSettings(projectKey, repositorySlug string, hookKey string) (*APIResponse, error)
DefaultApiService

Retrieve the settings for 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 hookKey @return

func (*DefaultApiService) GetSettings_22

func (a *DefaultApiService) GetSettings_22(projectKey, repositorySlug string, hookKey string) (*APIResponse, error)
DefaultApiService

Retrieve the settings for a repository hook for this project. <p> The authenticated user must have <strong>PROJECT_READ</strong> permission for the specified project to call this resource.

@param hookKey @return

func (*DefaultApiService) GetStatistics

func (a *DefaultApiService) GetStatistics(projectKey, repositorySlug string, webhookId int32, localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) GetStatisticsSummary

func (a *DefaultApiService) GetStatisticsSummary(projectKey, repositorySlug string, webhookId int32) (*APIResponse, error)
DefaultApiService

Get the statistics summary for a specific webhook. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource.

@param webhookId id of the webhook @return

func (*DefaultApiService) GetTag

func (a *DefaultApiService) GetTag(projectKey, repositorySlug string, name string) (*APIResponse, error)
DefaultApiService

Retrieve a tag in the specified repository. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the context repository to call this resource.

@param name the name of the tag to be retrieved @return

func (*DefaultApiService) GetTags

func (a *DefaultApiService) GetTags(project, repository string, localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) GetTask

func (a *DefaultApiService) GetTask(taskId int64) (*APIResponse, error)
DefaultApiService

Retrieve a existing task.

@param taskId the id identifying the task to delete @return

func (*DefaultApiService) GetUser

func (a *DefaultApiService) GetUser(username string) (*APIResponse, error)
DefaultApiService

Retrieve the user matching the supplied <strong>userSlug</strong>. <p>

@return

func (*DefaultApiService) GetUserRepository

func (a *DefaultApiService) GetUserRepository(username, repositorySlug string) (*APIResponse, error)
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 projectKey the parent project key @param projectKey2 the parent project key @param repositorySlug the repository slug @return

func (*DefaultApiService) GetUserSettings

func (a *DefaultApiService) GetUserSettings(userSlug string) (*APIResponse, error)
DefaultApiService

Retrieve a map of user setting key values for a specific user identified by the user slug. <p>

@return

func (*DefaultApiService) GetUsers

func (a *DefaultApiService) GetUsers(localVarOptionals map[string]interface{}) (*APIResponse, error)
 DefaultApiService
 Retrieve a page of users.  <p>  The authenticated user must have the <strong>LICENSED_USER</strong> permission to call this resource.

 @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 (*DefaultApiService) GetUsersWithAnyPermission

func (a *DefaultApiService) GetUsersWithAnyPermission(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetUsersWithAnyPermission_23

func (a *DefaultApiService) GetUsersWithAnyPermission_23(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetUsersWithAnyPermission_24

func (a *DefaultApiService) GetUsersWithAnyPermission_24(projectKey string, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetUsersWithoutAnyPermission

func (a *DefaultApiService) GetUsersWithoutAnyPermission(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetUsersWithoutPermission

func (a *DefaultApiService) GetUsersWithoutPermission(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetUsersWithoutPermission_25

func (a *DefaultApiService) GetUsersWithoutPermission_25(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) GetUsers_26

func (a *DefaultApiService) GetUsers_26(localVarOptionals map[string]interface{}) (*APIResponse, error)
DefaultApiService

Retrieve a page of users, optionally run through provided filters. <p> Only authenticated users may call this resource. <h3>Supported Filters</h3> <p> Filters are provided in query parameters in a standard <code>name=value</code> fashion. The following filters are currently supported: <ul> <li> {@code filter} - return only users, whose username, name or email address <i>contain</i> the {@code filter} value </li> <li> {@code group} - return only users who are members of the given group </li> <li> {@code permission} - the \"root\" of a permission filter, whose value must be a valid global, project, or repository permission. Additional filter parameters referring to this filter that specify the resource (project or repository) to apply the filter to must be prefixed with <code>permission.</code>. See the section \"Permission Filters\" below for more details. </li> <li> {@code permission.N} - the \"root\" of a single permission filter, similar to the {@code permission} parameter, where \"N\" is a natural number starting from 1. This allows clients to specify multiple permission filters, by providing consecutive filters as {@code permission.1}, {@code permission.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 permission filters is 50 and all filters exceeding that limit will be dropped. See the section \"Permission Filters\" below for more details on how the permission filters are processed. </li> </ul> <h3>Permission Filters</h3> <p> The following three sub-sections list parameters supported for permission filters (where <code>[root]</code> is the root permission filter name, e.g. {@code permission}, {@code permission.1} etc.) depending on the permission resource. The system determines which filter to apply (Global, Project or Repository permission) based on the <code>[root]</code> permission value. E.g. {@code ADMIN} is a global permission, {@code PROJECT_ADMIN} is a project permission and {@code REPO_ADMIN} is a repository permission. Note that the parameters for a given resource will be looked up in the order as they are listed below, that is e.g. for a project resource, if both {@code projectId} and {@code projectKey} are provided, the system will use {@code projectId} for the lookup. <h4>Global permissions</h4> <p> The permission value under <code>[root]</code> is the only required and recognized parameter, as global permissions do not apply to a specific resource. <p> Example valid filter: <code>permission=ADMIN</code>. <h4>Project permissions</h4> <ul> <li><code>[root]</code>- specifies the project permission</li> <li><code>[root].projectId</code> - specifies the project ID to lookup the project by</li> <li><code>[root].projectKey</code> - specifies the project key to lookup the project by</li> </ul> <p> Example valid filter: <code>permission.1=PROJECT_ADMIN&permission.1.projectKey=TEST_PROJECT</code>. <h4>Repository permissions</h4> <ul> <li><code>[root]</code>- specifies the repository permission</li> <li><code>[root].projectId</code> - specifies the repository ID to lookup the repository by</li> <li><code>[root].projectKey</code> and <code>[root].repositorySlug</code>- specifies the project key and repository slug to lookup the repository by; both values <i>need to</i> be provided for this look up to be triggered</li> </ul> Example valid filter: <code>permission.2=REPO_ADMIN&permission.2.projectKey=TEST_PROJECT&permission.2.repositorySlug=test_repo</code>.

@return

func (*DefaultApiService) GetWebhook

func (a *DefaultApiService) GetWebhook(projectKey, repositorySlug string, webhookId int32, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 webhookId the existing webhook id
 @param optional (nil or map[string]interface{}) with one or more of:
	 @param "statistics" (bool)
 @return

func (*DefaultApiService) Get_27

func (a *DefaultApiService) Get_27(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Retrieve 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 pullRequestId the ID of the pull request within the repository @return

func (*DefaultApiService) HasAllUserPermission

func (a *DefaultApiService) HasAllUserPermission(projectKey, permission string) (*APIResponse, error)
DefaultApiService

Check whether the specified permission is the default permission (granted to all users) for a 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 permission the permission to grant Available project permissions are: <ul> <li>PROJECT_READ</li> <li>PROJECT_WRITE</li> <li>PROJECT_ADMIN</li> </ul> @return

func (*DefaultApiService) ListParticipants

func (a *DefaultApiService) ListParticipants(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Retrieves a page of the participants for a given 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 pullRequestId the id of the pull request within the repository @return

func (*DefaultApiService) Merge

func (a *DefaultApiService) Merge(projectKey, repositorySlug string, pullRequestID int, localVarOptionals map[string]interface{}, localVarPostBody interface{}, localVarHTTPContentTypes []string) (*APIResponse, error)
 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 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 (*DefaultApiService) ModifyAllUserPermission

func (a *DefaultApiService) ModifyAllUserPermission(projectKey, repositorySlug string, permission string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) Preview

func (a *DefaultApiService) Preview(localVarOptionals map[string]interface{}) (*APIResponse, error)
 DefaultApiService
 Preview the generated html for given markdown contents.  <p>  Only authenticated users may call this resource.

 @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 (*DefaultApiService) RemoveGroupFromUser

func (a *DefaultApiService) RemoveGroupFromUser() (*APIResponse, error)
DefaultApiService

Remove a user from a group. This is very similar to <code>groups/remove-user</code>, but with the <em>context</em> and <em>itemName</em> attributes of the supplied request entity reversed. On the face of it this may appear redundant, but it facilitates a specific UI component in Stash. <p> In the request entity, the <em>context</em> attribute is the user and the <em>itemName</em> is the group. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) RemoveUserFromGroup

func (a *DefaultApiService) RemoveUserFromGroup() (*APIResponse, error)
DefaultApiService

<strong>Deprecated since 2.10</strong>. Use /rest/users/remove-groups instead. <p> Remove a user from a group. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource. <p> In the request entity, the <em>context</em> attribute is the group and the <em>itemName</em> is the user.

@return

func (*DefaultApiService) RenameUser

func (a *DefaultApiService) RenameUser() (*APIResponse, error)
DefaultApiService

Rename a user. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) Reopen

func (a *DefaultApiService) Reopen(projectKey, repositorySlug string, pullRequestID int64, localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) RetryCreateRepository

func (a *DefaultApiService) RetryCreateRepository(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

If a create or fork operation fails, calling this method will clean up the broken repository and try again. The repository must be in an INITIALISATION_FAILED state. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project to call this resource.

@param projectKey the parent project key @return

func (*DefaultApiService) RevokePermissionsForGroup

func (a *DefaultApiService) RevokePermissionsForGroup(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string) the name of the group
 @return

func (*DefaultApiService) RevokePermissionsForGroup_28

func (a *DefaultApiService) RevokePermissionsForGroup_28(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string) the name of the group
 @return

func (*DefaultApiService) RevokePermissionsForGroup_29

func (a *DefaultApiService) RevokePermissionsForGroup_29(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string) the name of the group
 @return

func (*DefaultApiService) RevokePermissionsForUser

func (a *DefaultApiService) RevokePermissionsForUser(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string) the name of the user
 @return

func (*DefaultApiService) RevokePermissionsForUser_30

func (a *DefaultApiService) RevokePermissionsForUser_30(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string) the name of the user
 @return

func (*DefaultApiService) RevokePermissionsForUser_31

func (a *DefaultApiService) RevokePermissionsForUser_31(projectKey string, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 optional (nil or map[string]interface{}) with one or more of:
	 @param "name" (string) the name of the user
 @return

func (*DefaultApiService) Search

func (a *DefaultApiService) Search(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) SearchCode

func (a *DefaultApiService) SearchCode(query SearchQuery) (*APIResponse, error)

SearchCode

* @param searchString Search string

func (*DefaultApiService) SetCommitStatus

func (a *DefaultApiService) SetCommitStatus(commitId string, buildStatus BuildStatus) (*APIResponse, error)

DefaultApiService Associates a build status with a commit. The state, the key and the url are mandatory. The name and description fields are optional. All fields (mandatory or optional) are limited to 255 characters, except for the url, which is limited to 450 characters. Supported values for the state are SUCCESSFUL, FAILED and INPROGRESS. The authenticated user must have LICENSED permission or higher to call this resource.

* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param commitId the commit Id
* @param buildStatus Array of commits.

func (*DefaultApiService) SetDefaultBranch

func (a *DefaultApiService) SetDefaultBranch(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

Update the default branch of a repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource.

@return

func (*DefaultApiService) SetLevel

func (a *DefaultApiService) SetLevel(levelName string, loggerName string) (*APIResponse, error)
DefaultApiService

Set the current log level for a given logger. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource.

@param levelName the level to set the logger to. Either TRACE, DEBUG, INFO, WARN or ERROR @param loggerName the name of the logger. @return

func (*DefaultApiService) SetMailConfig

func (a *DefaultApiService) SetMailConfig() (*APIResponse, error)
DefaultApiService

Updates the mail configuration The authenticated user must have the <strong>SYS_ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) SetMergeConfig

func (a *DefaultApiService) SetMergeConfig(scmId string) (*APIResponse, error)
DefaultApiService

Update the pull request merge strategies for the context repository. <p> The authenticated user must have <strong>ADMIN</strong> permission for the context repository to call this resource. <p> Only the strategies provided will be enabled, only one may be set to default <p> An explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty \"mergeConfig\" attribute. i.e: <pre> { \"mergeConfig\": { } } </pre> Upon completion of this request, the effective configuration will be the default configuration.

@param scmId the id of the scm to get strategies for @return

func (*DefaultApiService) SetPermissionForGroup

func (a *DefaultApiService) SetPermissionForGroup(projectKey string, repositorySlug string, localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) SetPermissionForGroups

func (a *DefaultApiService) SetPermissionForGroups(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) SetPermissionForGroups_32

func (a *DefaultApiService) SetPermissionForGroups_32(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) SetPermissionForUser

func (a *DefaultApiService) SetPermissionForUser(projectKey string, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 "projectKey" (string) name of the project to grant permission to
 @param "repositorySlug" (string) repository slug
 @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 (*DefaultApiService) SetPermissionForUsers

func (a *DefaultApiService) SetPermissionForUsers(localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) SetPermissionForUsers_33

func (a *DefaultApiService) SetPermissionForUsers_33(projectKey string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) SetRootLevel

func (a *DefaultApiService) SetRootLevel(levelName string) (*APIResponse, error)
DefaultApiService

Set the current log level for the root logger. <p> The authenticated user must have <strong>ADMIN</strong> permission or higher to call this resource.

@param levelName the level to set the logger to. Either TRACE, DEBUG, INFO, WARN or ERROR @return

func (*DefaultApiService) SetSenderAddress

func (a *DefaultApiService) SetSenderAddress() (*APIResponse, error)
DefaultApiService

Updates the server email address The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) SetSettings

func (a *DefaultApiService) SetSettings(projectKey, repositorySlug string, hookKey string) (*APIResponse, error)
DefaultApiService

Modify the settings for a repository hook for this repository. <p> The service will reject any settings which are too large, the current limit is 32KB once serialized. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource. <p> A JSON document can 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 hookKey @return

func (*DefaultApiService) SetSettings_34

func (a *DefaultApiService) SetSettings_34(projectKey, repositorySlug string, hookKey string) (*APIResponse, error)
DefaultApiService

Modify the settings for a repository hook for this project. <p> The service will reject any settings which are too large, the current limit is 32KB once serialized. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project to call this resource. <p> A JSON document can 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 hookKey @return

func (*DefaultApiService) Stream

func (a *DefaultApiService) Stream(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) StreamChanges

func (a *DefaultApiService) StreamChanges(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) StreamChanges_35

func (a *DefaultApiService) StreamChanges_35(projectKey, repositorySlug string, pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) StreamCommits

func (a *DefaultApiService) StreamCommits(project, repository string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) StreamDiff

func (a *DefaultApiService) StreamDiff(projectKey, repositorySlug string, commitId string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) StreamDiff_36

func (a *DefaultApiService) StreamDiff_36(projectKey, repositorySlug string, commitId string, path string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) StreamDiff_37

func (a *DefaultApiService) StreamDiff_37(project, repository, path string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) StreamDiff_38

func (a *DefaultApiService) StreamDiff_38(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) StreamDiff_39

func (a *DefaultApiService) StreamDiff_39(projectKey, repositorySlug string, path string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) StreamDiff_41

func (a *DefaultApiService) StreamDiff_41(projectKey, repositorySlug string, pullRequestID int64, path string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) StreamFiles

func (a *DefaultApiService) StreamFiles(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) StreamFiles_42

func (a *DefaultApiService) StreamFiles_42(projectKey, repositorySlug string, path string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) Stream_43

func (a *DefaultApiService) Stream_43(projectKey, repositorySlug string, path string, localVarOptionals map[string]interface{}) (*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 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 (*DefaultApiService) TestWebhook

func (a *DefaultApiService) TestWebhook(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 optional (nil or map[string]interface{}) with one or more of:
	 @param "url" (string) the url in which to connect to
 @return

func (*DefaultApiService) UnassignParticipantRole

func (a *DefaultApiService) UnassignParticipantRole(projectKey, repositorySlug string, pullRequestID int64, localVarOptionals map[string]interface{}) (*APIResponse, error)
 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 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 (*DefaultApiService) UnassignParticipantRole_44

func (a *DefaultApiService) UnassignParticipantRole_44(projectKey, repositorySlug string, pullRequestID int64, userSlug string) (*APIResponse, error)
UnassignParticipantRole_44

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 pullRequestId the id of the pull request within the repository
@param userSlug the slug for the user changing their status
@param pullRequestId2 the id of the pull request within the repository
@return

func (*DefaultApiService) Unwatch

func (a *DefaultApiService) Unwatch(projectKey, repositorySlug string, commitId string) (*APIResponse, error)
DefaultApiService

Removes the authenticated user as a watcher for the specified commit. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository containing the commit to call this resource.

@param commitId the <i>full {@link Commit#getId() ID}</i> of the commit within the repository @return

func (*DefaultApiService) Unwatch_45

func (a *DefaultApiService) Unwatch_45(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Make the authenticated user stop watching 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 pullRequestId the id of the pull request within the repository @return

func (*DefaultApiService) Update

func (a *DefaultApiService) Update() (*APIResponse, error)
DefaultApiService

Decodes the provided encoded license and sets it as the active license. If no license was provided, a 400 is returned. If the license cannot be decoded, or cannot be applied, a 409 is returned. Some possible reasons a license may not be applied include: <ul> <li>It is for a different product</li> <li>It is already expired</li> </ul> Otherwise, if the license is updated successfully, details for the new license are returned with a 200 response. <p> <b>Warning</b>: It is possible to downgrade the license during update, applying a license with a lower number of permitted users. If the number of currently-licensed users exceeds the limits of the new license, pushing will be disabled until the licensed user count is brought into compliance with the new license. <p> The authenticated user must have <b>SYS_ADMIN</b> permission. <b>ADMIN</b> users may <i>view</i> the current license details, but they may not <i>update</i> the license.

@return

func (*DefaultApiService) UpdateComment

func (a *DefaultApiService) UpdateComment(projectKey, repositorySlug string, commitId string, commentId int64) (*APIResponse, error)
DefaultApiService

Update the text of a comment. Only the user who created a comment may update it. <p> <strong>Note:</strong> the supplied supplied JSON object must contain a <code>version</code> that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that the commit is in to call this resource.

@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 @return

func (*DefaultApiService) UpdateComment_46

func (a *DefaultApiService) UpdateComment_46(projectKey, repositorySlug string, pullRequestID, commentId int64) (*APIResponse, error)
DefaultApiService

Update the text of a comment. Only the user who created a comment may update it. <p> <strong>Note:</strong> the supplied supplied JSON object must contain a <code>version</code> that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource.

@param commentId the id of the comment to retrieve @return

func (*DefaultApiService) UpdateProject

func (a *DefaultApiService) UpdateProject(projectKey string) (*APIResponse, error)
DefaultApiService

Update the project matching the <strong>projectKey</strong> supplied in the resource path. <p> To include a custom avatar for the updated project, the project definition should contain an additional attribute with the key <code>avatar</code> and the value a data URI containing Base64-encoded image data. The URI should be in the following format: <code> data:(content type, e.g. image/png);base64,(data) </code> If the data is not Base64-encoded, or if a character set is defined in the URI, or the URI is otherwise invalid, <em>project creation will fail</em>. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project to call this resource.

@return

func (*DefaultApiService) UpdatePullRequestSettings

func (a *DefaultApiService) UpdatePullRequestSettings(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

Update the pull request settings for the context repository. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the context repository to call this resource. <p> This resource will call all RestFragments that are registered with the key <strong>bitbucket.repository.settings.pullRequests</strong>. If any fragment fails validations by returning a non-empty Map of errors, then no fragments will execute. <p> Only the settings that should be updated need to be included in the request. <p> The property keys for the settings that are bundled with the application are <ul> <li>mergeConfig - the merge strategy configuration for pull requests</li> <li>requiredApprovers - (Deprecated, please use com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook instead) the number of approvals required on a pull request for it to be mergeable, or 0 to disable the merge check</li> <li>com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook - a json map containing the keys 'enabled' (a boolean to enable or disable this merge check) and 'count' (an integer to set the number of required approvals)</li> <li>requiredAllApprovers - whether or not all approvers must approve a pull request for it to be mergeable</li> <li>requiredAllTasksComplete - whether or not all tasks on a pull request need to be completed for it to be mergeable</li> <li>requiredSuccessfulBuilds - (Deprecated, please use com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck instead) the number of successful s on a pull request for it to be mergeable, or 0 to disable the merge check</li> <li>com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck - a json map containing the keys 'enabled' (a boolean to enable or disable this merge check) and 'count' (an integer to set the number of required builds)</li> </ul> <strong>Merge strategy configuration deletion:</strong> <p> An explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty \"mergeConfig\" attribute. i.e: <pre> { \"mergeConfig\": { } } </pre> Upon completion of this request, the effective configuration will be: <ul> <li>The configuration set for this repository's SCM type as set at the project level, if present, otherwise</li> <li>the configuration set for this repository's SCM type as set at the instance level, if present, otherwise</li> <li>the default configuration for this repository's SCM type</li> <ul>

@return

func (*DefaultApiService) UpdatePullRequestSettings_47

func (a *DefaultApiService) UpdatePullRequestSettings_47(projectKey, repositorySlug string, scmId string) (*APIResponse, error)
DefaultApiService

Update the pull request merge strategy configuration for this project and SCM. <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the context repository to call this resource. <p> Only the strategies provided will be enabled, the default must be set and included in the set of strategies. <p> An explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty \"mergeConfig\" attribute. i.e: <pre> { \"mergeConfig\": { } } </pre> Upon completion of this request, the effective configuration will be the configuration explicitly set for the SCM, or if no such explicit configuration is set then the default configuration will be used.

@param scmId the SCM to get strategies for @return

func (*DefaultApiService) UpdateRepository

func (a *DefaultApiService) UpdateRepository(projectKey, repositorySlug string) (*APIResponse, error)
DefaultApiService

Update the repository matching the <strong>repositorySlug</strong> supplied in the resource path. <p> The repository's slug is derived from its name. If the name changes the slug may also change. <p> This API can be used to move the repository to a different project by setting the new project in the request, example: {@code {\"project\":{\"key\":\"NEW_KEY\"}}} . <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource.

@param projectKey the parent project key @param projectKey2 the parent project key @param repositorySlug the repository slug @return

func (*DefaultApiService) UpdateRepositoryWithOptions

func (a *DefaultApiService) UpdateRepositoryWithOptions(projectKey, repositorySlug string, localVarPostBody interface{}, localVarHTTPContentTypes []string) (*APIResponse, error)

func (*DefaultApiService) UpdateSettings

func (a *DefaultApiService) UpdateSettings(userSlug string) (*APIResponse, error)
DefaultApiService

Update the entries of a map of user setting key/values for a specific user identified by the user slug. <p>

@return

func (*DefaultApiService) UpdateStatus

func (a *DefaultApiService) UpdateStatus(projectKey, repositorySlug string, pullRequestID int64, userSlug string, participant UserWithMetadata) (*APIResponse, error)
DefaultApiService

Change the current user's status for a pull request. Implicitly adds the user as a participant if they are not already. If the current user is the author, this method will fail. <p> The possible values for {@code status} are <strong>UNAPPROVED</strong>, <strong>NEEDS_WORK</strong>, or <strong>APPROVED</strong>. <p> If the new {@code status} is <strong>NEEDS_WORK</strong> or <strong>APPROVED</strong> then the {@code lastReviewedCommit} for the participant will be updated to the latest commit of the source branch of the 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 pullRequestId the id of the pull request within the repository @param userSlug the slug for the user changing their status @param pullRequestId2 the id of the pull request within the repository @return

func (*DefaultApiService) UpdateTask

func (a *DefaultApiService) UpdateTask(taskId int64) (*APIResponse, error)
DefaultApiService

Update a existing task. <p> As of Stash 3.3, only the state and text of a task can be updated. <p> Updating the state of a task is allowed for any user having <em>READ</em> access to the repository. However only the task's creator, the context's author or an admin of the context's repository can update the task's text. (For a pull request task, those are the task's creator, the pull request's author or an admin on the repository containing the pull request). Additionally the task's text cannot be updated if it has been resolved.

@param taskId the id identifying the task to delete @return

func (*DefaultApiService) UpdateUserDetails

func (a *DefaultApiService) UpdateUserDetails() (*APIResponse, error)
DefaultApiService

Update a user's details. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.

@return

func (*DefaultApiService) UpdateUserDetails_48

func (a *DefaultApiService) UpdateUserDetails_48() (*APIResponse, error)
DefaultApiService

Update the currently authenticated user's details. The update will always be applied to the currently authenticated user.

@return

func (*DefaultApiService) UpdateUserPassword

func (a *DefaultApiService) UpdateUserPassword() (*APIResponse, error)
DefaultApiService

Update a user's password. <p> The authenticated user must have the <strong>ADMIN</strong> permission to call this resource, and may not update the password of a user with greater permissions than themselves.

@return

func (*DefaultApiService) UpdateUserPassword_49

func (a *DefaultApiService) UpdateUserPassword_49() (*APIResponse, error)
DefaultApiService

Update the currently authenticated user's password.

@return

func (*DefaultApiService) UpdateWebhook

func (a *DefaultApiService) UpdateWebhook(projectKey, repositorySlug string, webhookId int32, localVarPostBody interface{}, localVarHTTPContentTypes []string) (*APIResponse, error)
DefaultApiService

Update an existing webhook. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource.

@param webhookId the existing webhook id @return

func (*DefaultApiService) Update_50

func (a *DefaultApiService) Update_50(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Update the title, description, reviewers or destination branch of an existing pull request. <p> <strong>Note:</strong> the <em>reviewers</em> list may be updated using this resource. However the <em>author</em> and <em>participants</em> list may not. <p> The authenticated user must either: <ul> <li>be the author of the pull request and have the <strong>REPO_READ</strong> permission for the repository that this pull request targets; or</li> <li>have the <strong>REPO_WRITE</strong> permission for the repository that this pull request targets</li> </ul> to call this resource.

@param pullRequestId the ID of the pull request within the repository @return

func (*DefaultApiService) UploadAvatar

func (a *DefaultApiService) UploadAvatar(projectKey string) (*APIResponse, error)
DefaultApiService

Update the avatar for the project matching the supplied <strong>projectKey</strong>. <p> This resource accepts POST multipart form data, containing a single image in a form-field named 'avatar'. <p> There are configurable server limits on both the dimensions (1024x1024 pixels by default) and uploaded file size (1MB by default). Several different image formats are supported, but <strong>PNG</strong> and <strong>JPEG</strong> are preferred due to the file size limit. <p> This resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to pass the XSRF check the caller needs to send an <code>X-Atlassian-Token</code> HTTP header with the value <code>no-check</code>. <p> An example <a href=\"http://curl.haxx.se/\">curl</a> request to upload an image name 'avatar.png' would be: <pre> curl -X POST -u username:password -H \"X-Atlassian-Token: no-check\" http://example.com/rest/api/1.0/projects/STASH/avatar.png -F avatar=@avatar.png </pre> <p> The authenticated user must have <strong>PROJECT_ADMIN</strong> permission for the specified project to call this resource.

@return

func (*DefaultApiService) UploadAvatar_51

func (a *DefaultApiService) UploadAvatar_51(userSlug string) (*APIResponse, error)
DefaultApiService

Update the avatar for the user with the supplied <strong>slug</strong>. <p> This resource accepts POST multipart form data, containing a single image in a form-field named 'avatar'. <p> There are configurable server limits on both the dimensions (1024x1024 pixels by default) and uploaded file size (1MB by default). Several different image formats are supported, but <strong>PNG</strong> and <strong>JPEG</strong> are preferred due to the file size limit. <p> This resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to pass the XSRF check the caller needs to send an <code>X-Atlassian-Token</code> HTTP header with the value <code>no-check</code>. <p> An example <a href=\"http://curl.haxx.se/\">curl</a> request to upload an image name 'avatar.png' would be: <pre> curl -X POST -u username:password -H \"X-Atlassian-Token: no-check\" http://example.com/rest/api/latest/users/jdoe/avatar.png -F avatar=@avatar.png </pre> <p> Users are always allowed to update their own avatar. To update someone else's avatar the authenticated user must have global <strong>ADMIN</strong> permission, or global <strong>SYS_ADMIN</strong> permission to update a <strong>SYS_ADMIN</strong> user's avatar.

@return

func (*DefaultApiService) Watch

func (a *DefaultApiService) Watch(projectKey, repositorySlug string, commitId string) (*APIResponse, error)
DefaultApiService

Adds the authenticated user as a watcher for the specified commit. <p> The authenticated user must have <strong>REPO_READ</strong> permission for the repository containing the commit to call this resource.

@param commitId the <i>full {@link Commit#getId() ID}</i> of the commit within the repository @return

func (*DefaultApiService) Watch_52

func (a *DefaultApiService) Watch_52(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Make the authenticated user watch 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 pullRequestId the id of the pull request within the repository @return

func (*DefaultApiService) WithdrawApproval

func (a *DefaultApiService) WithdrawApproval(projectKey, repositorySlug string, pullRequestID int64) (*APIResponse, error)
DefaultApiService

Remove approval from a pull request as the current user. This does not remove the user as a participant. <p> The authenticated user must have <strong>REPO_READ</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 pullRequestId the id of the pull request within the repository @return

type Diff

type Diff struct {
	Diffs []struct {
		Source struct {
			Components []string `json:"components"`
			Parent     string   `json:"parent"`
			Name       string   `json:"name"`
			Extension  string   `json:"extension"`
			ToString   string   `json:"toString"`
		} `json:"source"`
		Destination struct {
			Components []string `json:"components"`
			Parent     string   `json:"parent"`
			Name       string   `json:"name"`
			Extension  string   `json:"extension"`
			ToString   string   `json:"toString"`
		} `json:"destination"`
		Hunks []struct {
			SourceLine      int `json:"sourceLine"`
			SourceSpan      int `json:"sourceSpan"`
			DestinationLine int `json:"destinationLine"`
			DestinationSpan int `json:"destinationSpan"`
			Segments        []struct {
				Type  string `json:"type"`
				Lines []struct {
					Destination int    `json:"destination"`
					Source      int    `json:"source"`
					Line        string `json:"line"`
					Truncated   bool   `json:"truncated"`
				} `json:"lines"`
				Truncated bool `json:"truncated"`
			} `json:"segments"`
			Truncated bool `json:"truncated"`
		} `json:"hunks"`
		Truncated    bool    `json:"truncated"`
		ContextLines float64 `json:"contextLines"`
		FromHash     string  `json:"fromHash"`
		ToHash       string  `json:"toHash"`
		WhiteSpace   string  `json:"whiteSpace"`
	} `json:"diffs"`
	Truncated    bool    `json:"truncated"`
	ContextLines float64 `json:"contextLines"`
	FromHash     string  `json:"fromHash"`
	ToHash       string  `json:"toHash"`
	WhiteSpace   string  `json:"whiteSpace"`
}

func GetDiffResponse

func GetDiffResponse(r *APIResponse) (Diff, error)

GetDiffResponse cast Diff into structure

type Group

type Group struct {
	Name string `json:"name"`
}

Group represents a user group

type GroupPermission

type GroupPermission struct {
	Group      Group  `json:"group"`
	Permission string `json:"permission"`
}

GroupPermission contains a group with its permission

func GetGroupsPermissionResponse

func GetGroupsPermissionResponse(r *APIResponse) ([]GroupPermission, error)

GetGroupsPermissionResponse casts group permissions into structure

type Limits

type Limits struct {
	Primary   int `json:"primary"`
	Secondary int `json:"secondary"`
}
type Links struct {
	Self []SelfLink `json:"self,omitempty"`
}

type MergeGetResponse

type MergeGetResponse struct {
	CanMerge   bool                     `json:"canMerge"`
	Conflicted bool                     `json:"conflicted"`
	Outcome    string                   `json:"outcome"`
	Vetoes     []map[string]interface{} `json:"vetoes"`
}

type MergeResult

type MergeResult struct {
	Outcome string `json:"outcome"`
	Current bool   `json:"current"`
}

type PermissionGlobal

type PermissionGlobal string

PermissionGlobal are global permissions

const (
	// PermissionGlobalLicensedUser represents the ability to log into the system
	PermissionGlobalLicensedUser PermissionGlobal = "LICENSED_USER"
	// PermissionGlobalProjectCreate allows project creation
	PermissionGlobalProjectCreate PermissionGlobal = "PROJECT_CREATE"
	// PermissionGlobalAdmin represents an administrator
	PermissionGlobalAdmin PermissionGlobal = "ADMIN"
	// PermissionGlobalSysAdmin represents a system administrator
	PermissionGlobalSysAdmin PermissionGlobal = "SYS_ADMIN"
)

func (PermissionGlobal) String

func (p PermissionGlobal) String() string

String converts global permission to its string representation

type PermissionProject

type PermissionProject string

PermissionProject are project level permissions

const (
	// PermissionProjectAdmin grants admin priviledges
	PermissionProjectAdmin PermissionProject = "PROJECT_ADMIN"
	// PermissionProjectRead grants read priviledges
	PermissionProjectRead PermissionProject = "PROJECT_READ"
	// PermissionProjectWrite grants write priviledges
	PermissionProjectWrite PermissionProject = "PROJECT_WRITE"
)

func (PermissionProject) String

func (p PermissionProject) String() string

String converts project permission to its string representation

type PermissionRepository

type PermissionRepository string

PermissionRepository are repository level permissions

const (
	// PermissionRepositoryAdmin grants admin priviledges
	PermissionRepositoryAdmin PermissionRepository = "REPO_ADMIN"
	// PermissionRepositoryRead grants read priviledges
	PermissionRepositoryRead PermissionRepository = "REPO_READ"
	// PermissionRepositoryWrite grants write priviledges
	PermissionRepositoryWrite PermissionRepository = "REPO_WRITE"
)

func (PermissionRepository) String

func (p PermissionRepository) String() string

String converts repository permission to its string representation

type Project

type Project struct {
	Key         string `json:"key"`
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Public      bool   `json:"public"`
	Type        string `json:"type"`
	Links       Links  `json:"links"`
}

type PullRequest

type PullRequest struct {
	ID           int                `json:"id"`
	Version      int32              `json:"version"`
	Title        string             `json:"title"`
	Description  string             `json:"description"`
	State        string             `json:"state"`
	Open         bool               `json:"open"`
	Closed       bool               `json:"closed"`
	CreatedDate  int64              `json:"createdDate"`
	UpdatedDate  int64              `json:"updatedDate"`
	FromRef      PullRequestRef     `json:"fromRef"`
	ToRef        PullRequestRef     `json:"toRef"`
	Locked       bool               `json:"locked"`
	Author       *UserWithMetadata  `json:"author,omitempty"`
	Reviewers    []UserWithMetadata `json:"reviewers"`
	Participants []UserWithMetadata `json:"participants,omitempty"`
	Properties   struct {
		MergeResult       MergeResult `json:"mergeResult"`
		ResolvedTaskCount int         `json:"resolvedTaskCount"`
		OpenTaskCount     int         `json:"openTaskCount"`
	} `json:"properties"`
	Links Links `json:"links"`
}

func GetPullRequestResponse

func GetPullRequestResponse(r *APIResponse) (PullRequest, error)

GetPullRequestResponse cast PullRequest into structure

func GetPullRequestsResponse

func GetPullRequestsResponse(r *APIResponse) ([]PullRequest, error)

GetPullRequestResponse PullRequests into structure

type PullRequestRef

type PullRequestRef struct {
	ID           string     `json:"id"`
	DisplayID    string     `json:"displayId"`
	LatestCommit string     `json:"latestCommit"`
	Repository   Repository `json:"repository"`
}

type Query

type Query struct {
	Substituted bool `json:"substituted"`
}

type Repository

type Repository struct {
	Slug          string   `json:"slug,omitempty"`
	ID            int      `json:"id,omitempty"`
	Name          string   `json:"name,omitempty"`
	ScmID         string   `json:"scmId,omitempty"`
	State         string   `json:"state,omitempty"`
	StatusMessage string   `json:"statusMessage,omitempty"`
	Forkable      bool     `json:"forkable,omitempty"`
	Project       *Project `json:"project,omitempty"`
	Public        bool     `json:"public,omitempty"`
	Links         *struct {
		Clone []CloneLink `json:"clone,omitempty"`
		Self  []SelfLink  `json:"self,omitempty"`
	} `json:"links,omitempty"`
	Owner *struct {
		Name         string `json:"name"`
		EmailAddress string `json:"emailAddress"`
		ID           int    `json:"id"`
		DisplayName  string `json:"displayName"`
		Active       bool   `json:"active"`
		Slug         string `json:"slug"`
		Type         string `json:"type"`
		AvatarURL    string `json:"avatarUrl"`
	} `json:"owner,omitempty"`
	Origin *Repository `json:"origin,omitempty"`
}

Repository contains data from a BitBucket Repository

func GetRepositoriesResponse

func GetRepositoriesResponse(r *APIResponse) ([]Repository, error)

GetRepositoriesResponse cast Repositories into structure

func GetRepositoryResponse

func GetRepositoryResponse(r *APIResponse) (Repository, error)

GetRepositoryResponse cast Repositories into structure

type SSHKey

type SSHKey struct {
	ID    int    `json:"id"`
	Text  string `json:"text"`
	Label string `json:"label"`
}

SSHKey contains data from a SSHKey in the BitBucket Server

func GetSSHKeysResponse

func GetSSHKeysResponse(r *APIResponse) ([]SSHKey, error)

GetSSHKeysResponse cast SSHKeys into structure

func (*SSHKey) String

func (k *SSHKey) String() string

type Scope

type Scope struct {
	Type string `json:"type"`
}

type SearchQuery

type SearchQuery struct {
	Query    string `json:"query"`
	Entities struct {
		Code Code `json:"code"`
	} `json:"entities"`
	Limits Limits `json:"limits"`
}

type SearchResult

type SearchResult struct {
	Scope        Scope `json:"scope"`
	Code         *Code `json:"code,omitempty"`
	Repositories *Code `json:"repositories,omitempty"`
	Query        Query `json:"query"`
}

func GetSearchResultResponse

func GetSearchResultResponse(r *APIResponse) (SearchResult, error)

GetSearchResultResponse cast Search results into structure

type SelfLink struct {
	Href string `json:"href"`
}

type Tag

type Tag struct {
	ID              string `json:"id"`
	DisplayID       string `json:"displayId"`
	Type            string `json:"type"`
	LatestCommit    string `json:"latestCommit"`
	LatestChangeset string `json:"latestChangeset"`
	Hash            string `json:"hash"`
}

Tag contaings git Tag information

func GetTagsResponse

func GetTagsResponse(r *APIResponse) ([]Tag, error)

GetTagsResponse cast Tags into structure

type User

type User struct {
	Name                        string `json:"name"`
	EmailAddress                string `json:"emailAddress"`
	ID                          int    `json:"id"`
	DisplayName                 string `json:"displayName"`
	Active                      bool   `json:"active"`
	Slug                        string `json:"slug"`
	Type                        string `json:"type"`
	DirectoryName               string `json:"directoryName"`
	Deletable                   bool   `json:"deletable"`
	LastAuthenticationTimestamp int64  `json:"lastAuthenticationTimestamp"`
	MutableDetails              bool   `json:"mutableDetails"`
	MutableGroups               bool   `json:"mutableGroups"`
}

func GetUsersResponse

func GetUsersResponse(r *APIResponse) ([]User, error)

GetUsersResponse casts users into structure

type UserPermission

type UserPermission struct {
	User       User   `json:"user"`
	Permission string `json:"permission"`
}

UserPermission contains a user with its permission

func GetUsersPermissionResponse

func GetUsersPermissionResponse(r *APIResponse) ([]UserPermission, error)

GetUsersPermissionResponse casts user permissions into structure

type UserWithLinks struct {
	Name         string `json:"name,omitempty"`
	EmailAddress string `json:"emailAddress,omitempty"`
	ID           int    `json:"id,omitempty"`
	DisplayName  string `json:"displayName,omitempty"`
	Active       bool   `json:"active,omitempty"`
	Slug         string `json:"slug,omitempty"`
	Type         string `json:"type,omitempty"`
	Links        Links  `json:"links,omitempty"`
}

type UserWithMetadata

type UserWithMetadata struct {
	User               UserWithLinks `json:"user,omitempty"`
	Role               string        `json:"role,omitempty"`
	Approved           bool          `json:"approved,omitempty"`
	Status             string        `json:"status,omitempty"`
	LastReviewedCommit string        `json:"lastReviewedCommit,omitempty"`
}

func GetUserWithMetadataResponse

func GetUserWithMetadataResponse(r *APIResponse) (UserWithMetadata, error)

GetUserWithMetadataResponse casts users into structure

type UserWithNameEmail

type UserWithNameEmail struct {
	Name         string `json:"name"`
	EmailAddress string `json:"emailAddress"`
}

type WebHookRepoPush

type WebHookRepoPush struct {
	Actor      Actor      `json:"actor"`
	Repository Repository `json:"repository"`
	Push       struct {
		Changes []Change `json:"changes"`
	} `json:"push"`
}

WebHookRepoPush contains payload to use while reading handling webhooks from bitbucket

type Webhook

type Webhook struct {
	ID            int                  `json:"id"`
	Name          string               `json:"name"`
	Events        []string             `json:"events"`
	Url           string               `json:"url"`
	Active        bool                 `json:"active"`
	Configuration WebhookConfiguration `json:"configuration"`
}

func GetWebhooksResponse

func GetWebhooksResponse(r *APIResponse) ([]Webhook, error)

GetWebhooksResponse cast Webhooks into structure

type WebhookConfiguration

type WebhookConfiguration struct {
	Secret string `json:"secret"`
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier