cloud

package
v1.11.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package cloud provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.

Index

Constants

View Source
const (
	// ProviderName is the name used to register the Bitbucket Cloud provider.
	ProviderName = "bitbucket"

	// Host is the hostname of the Bitbucket Cloud instance.
	Host = "bitbucket.org"
)
View Source
const (
	Api_keyScopes = "api_key.Scopes"
	BasicScopes   = "basic.Scopes"
	Oauth2Scopes  = "oauth2.Scopes"
)

Variables

This section is empty.

Functions

func NewGetRepositoriesWorkspaceRepoSlugCommitCommitRequest

func NewGetRepositoriesWorkspaceRepoSlugCommitCommitRequest(server string, workspace string, repoSlug string, commit string) (*http.Request, error)

NewGetRepositoriesWorkspaceRepoSlugCommitCommitRequest generates requests for GetRepositoriesWorkspaceRepoSlugCommitCommit

func NewGetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequest

func NewGetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequest(server string, workspace string, repoSlug string, pullRequestId int) (*http.Request, error)

NewGetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequest generates requests for GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestId

func NewGetRepositoriesWorkspaceRepoSlugPullrequestsRequest

func NewGetRepositoriesWorkspaceRepoSlugPullrequestsRequest(server string, workspace string, repoSlug string, params *GetRepositoriesWorkspaceRepoSlugPullrequestsParams) (*http.Request, error)

NewGetRepositoriesWorkspaceRepoSlugPullrequestsRequest generates requests for GetRepositoriesWorkspaceRepoSlugPullrequests

func NewPostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeRequest

func NewPostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeRequest(server string, workspace string, repoSlug string, pullRequestId int, params *PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams, body PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeJSONRequestBody) (*http.Request, error)

NewPostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeRequest calls the generic PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMerge builder with application/json body

func NewPostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeRequestWithBody

func NewPostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeRequestWithBody(server string, workspace string, repoSlug string, pullRequestId int, params *PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams, contentType string, body io.Reader) (*http.Request, error)

NewPostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeRequestWithBody generates requests for PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMerge with any type of body

func NewPostRepositoriesWorkspaceRepoSlugPullrequestsRequest

func NewPostRepositoriesWorkspaceRepoSlugPullrequestsRequest(server string, workspace string, repoSlug string, body PostRepositoriesWorkspaceRepoSlugPullrequestsJSONRequestBody) (*http.Request, error)

NewPostRepositoriesWorkspaceRepoSlugPullrequestsRequest calls the generic PostRepositoriesWorkspaceRepoSlugPullrequests builder with application/json body

func NewPostRepositoriesWorkspaceRepoSlugPullrequestsRequestWithBody

func NewPostRepositoriesWorkspaceRepoSlugPullrequestsRequestWithBody(server string, workspace string, repoSlug string, contentType string, body io.Reader) (*http.Request, error)

NewPostRepositoriesWorkspaceRepoSlugPullrequestsRequestWithBody generates requests for PostRepositoriesWorkspaceRepoSlugPullrequests with any type of body

func NewProvider

func NewProvider(
	repoURL string,
	opts *gitprovider.Options,
) (gitprovider.Interface, error)

NewProvider returns a Bitbucket Cloud implementation of gitprovider.Interface.

Types

type Account

type Account struct {
	CreatedOn   *time.Time `json:"created_on,omitempty"`
	DisplayName *string    `json:"display_name,omitempty"`

	// Links Links related to an Account.
	Links                *AccountLinks          `json:"links,omitempty"`
	Type                 string                 `json:"type"`
	Uuid                 *string                `json:"uuid,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Account defines model for account.

func (Account) Get

func (a Account) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Account. Returns the specified element and whether it was found

func (Account) MarshalJSON

func (a Account) MarshalJSON() ([]byte, error)

Override default JSON handling for Account to handle AdditionalProperties

func (*Account) Set

func (a *Account) Set(fieldName string, value interface{})

Setter for additional properties for Account

func (*Account) UnmarshalJSON

func (a *Account) UnmarshalJSON(b []byte) error

Override default JSON handling for Account to handle AdditionalProperties

type AccountLinks struct {
	// Avatar A link to a resource related to this object.
	Avatar               *Link                  `json:"avatar,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

AccountLinks Links related to an Account.

func (AccountLinks) Get

func (a AccountLinks) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for AccountLinks. Returns the specified element and whether it was found

func (AccountLinks) MarshalJSON

func (a AccountLinks) MarshalJSON() ([]byte, error)

Override default JSON handling for AccountLinks to handle AdditionalProperties

func (*AccountLinks) Set

func (a *AccountLinks) Set(fieldName string, value interface{})

Setter for additional properties for AccountLinks

func (*AccountLinks) UnmarshalJSON

func (a *AccountLinks) UnmarshalJSON(b []byte) error

Override default JSON handling for AccountLinks to handle AdditionalProperties

type Author

type Author struct {
	// Raw The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.
	Raw                  *string                `json:"raw,omitempty"`
	Type                 string                 `json:"type"`
	User                 *Account               `json:"user,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Author defines model for author.

func (Author) Get

func (a Author) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Author. Returns the specified element and whether it was found

func (Author) MarshalJSON

func (a Author) MarshalJSON() ([]byte, error)

Override default JSON handling for Author to handle AdditionalProperties

func (*Author) Set

func (a *Author) Set(fieldName string, value interface{})

Setter for additional properties for Author

func (*Author) UnmarshalJSON

func (a *Author) UnmarshalJSON(b []byte) error

Override default JSON handling for Author to handle AdditionalProperties

type BaseCommit

type BaseCommit struct {
	Author    *Author       `json:"author,omitempty"`
	Committer *Committer    `json:"committer,omitempty"`
	Date      *time.Time    `json:"date,omitempty"`
	Hash      *string       `json:"hash,omitempty"`
	Message   *string       `json:"message,omitempty"`
	Parents   *[]BaseCommit `json:"parents,omitempty"`
	Summary   *struct {
		// Html The user's content rendered as HTML.
		Html *string `json:"html,omitempty"`

		// Markup The type of markup language the raw content is to be interpreted in.
		Markup *BaseCommitSummaryMarkup `json:"markup,omitempty"`

		// Raw The text as it was typed by a user.
		Raw *string `json:"raw,omitempty"`
	} `json:"summary,omitempty"`
	Type                 string                 `json:"type"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

BaseCommit defines model for base_commit.

func (BaseCommit) Get

func (a BaseCommit) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for BaseCommit. Returns the specified element and whether it was found

func (BaseCommit) MarshalJSON

func (a BaseCommit) MarshalJSON() ([]byte, error)

Override default JSON handling for BaseCommit to handle AdditionalProperties

func (*BaseCommit) Set

func (a *BaseCommit) Set(fieldName string, value interface{})

Setter for additional properties for BaseCommit

func (*BaseCommit) UnmarshalJSON

func (a *BaseCommit) UnmarshalJSON(b []byte) error

Override default JSON handling for BaseCommit to handle AdditionalProperties

type BaseCommitSummaryMarkup

type BaseCommitSummaryMarkup string

BaseCommitSummaryMarkup The type of markup language the raw content is to be interpreted in.

const (
	BaseCommitSummaryMarkupCreole    BaseCommitSummaryMarkup = "creole"
	BaseCommitSummaryMarkupMarkdown  BaseCommitSummaryMarkup = "markdown"
	BaseCommitSummaryMarkupPlaintext BaseCommitSummaryMarkup = "plaintext"
)

Defines values for BaseCommitSummaryMarkup.

func (BaseCommitSummaryMarkup) Valid

func (e BaseCommitSummaryMarkup) Valid() bool

Valid indicates whether the value is a known member of the BaseCommitSummaryMarkup enum.

type Branch

type Branch struct {
	// DefaultMergeStrategy The default merge strategy for pull requests targeting this branch.
	DefaultMergeStrategy *string `json:"default_merge_strategy,omitempty"`
	Links                *struct {
		// Commits A link to a resource related to this object.
		Commits *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"commits,omitempty"`

		// Html A link to a resource related to this object.
		Html *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"html,omitempty"`

		// Self A link to a resource related to this object.
		Self *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"self,omitempty"`
	} `json:"links,omitempty"`

	// MergeStrategies Available merge strategies for pull requests targeting this branch.
	MergeStrategies *[]BranchMergeStrategies `json:"merge_strategies,omitempty"`

	// Name The name of the ref.
	Name                 *string                `json:"name,omitempty"`
	Target               *Commit                `json:"target,omitempty"`
	Type                 string                 `json:"type"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Branch defines model for branch.

func (Branch) Get

func (a Branch) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Branch. Returns the specified element and whether it was found

func (Branch) MarshalJSON

func (a Branch) MarshalJSON() ([]byte, error)

Override default JSON handling for Branch to handle AdditionalProperties

func (*Branch) Set

func (a *Branch) Set(fieldName string, value interface{})

Setter for additional properties for Branch

func (*Branch) UnmarshalJSON

func (a *Branch) UnmarshalJSON(b []byte) error

Override default JSON handling for Branch to handle AdditionalProperties

type BranchMergeStrategies

type BranchMergeStrategies string

BranchMergeStrategies defines model for Branch.MergeStrategies.

const (
	BranchMergeStrategiesFastForward       BranchMergeStrategies = "fast_forward"
	BranchMergeStrategiesMergeCommit       BranchMergeStrategies = "merge_commit"
	BranchMergeStrategiesRebaseFastForward BranchMergeStrategies = "rebase_fast_forward"
	BranchMergeStrategiesRebaseMerge       BranchMergeStrategies = "rebase_merge"
	BranchMergeStrategiesSquash            BranchMergeStrategies = "squash"
	BranchMergeStrategiesSquashFastForward BranchMergeStrategies = "squash_fast_forward"
)

Defines values for BranchMergeStrategies.

func (BranchMergeStrategies) Valid

func (e BranchMergeStrategies) Valid() bool

Valid indicates whether the value is a known member of the BranchMergeStrategies enum.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) GetRepositoriesWorkspaceRepoSlugCommitCommit

func (c *Client) GetRepositoriesWorkspaceRepoSlugCommitCommit(ctx context.Context, workspace string, repoSlug string, commit string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetRepositoriesWorkspaceRepoSlugPullrequests

func (c *Client) GetRepositoriesWorkspaceRepoSlugPullrequests(ctx context.Context, workspace string, repoSlug string, params *GetRepositoriesWorkspaceRepoSlugPullrequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestId

func (c *Client) GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestId(ctx context.Context, workspace string, repoSlug string, pullRequestId int, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostRepositoriesWorkspaceRepoSlugPullrequests

func (c *Client) PostRepositoriesWorkspaceRepoSlugPullrequests(ctx context.Context, workspace string, repoSlug string, body PostRepositoriesWorkspaceRepoSlugPullrequestsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithBody

func (c *Client) PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithBody(ctx context.Context, workspace string, repoSlug string, pullRequestId int, params *PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostRepositoriesWorkspaceRepoSlugPullrequestsWithBody

func (c *Client) PostRepositoriesWorkspaceRepoSlugPullrequestsWithBody(ctx context.Context, workspace string, repoSlug string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetRepositoriesWorkspaceRepoSlugCommitCommit request
	GetRepositoriesWorkspaceRepoSlugCommitCommit(ctx context.Context, workspace string, repoSlug string, commit string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetRepositoriesWorkspaceRepoSlugPullrequests request
	GetRepositoriesWorkspaceRepoSlugPullrequests(ctx context.Context, workspace string, repoSlug string, params *GetRepositoriesWorkspaceRepoSlugPullrequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostRepositoriesWorkspaceRepoSlugPullrequestsWithBody request with any body
	PostRepositoriesWorkspaceRepoSlugPullrequestsWithBody(ctx context.Context, workspace string, repoSlug string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostRepositoriesWorkspaceRepoSlugPullrequests(ctx context.Context, workspace string, repoSlug string, body PostRepositoriesWorkspaceRepoSlugPullrequestsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestId request
	GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestId(ctx context.Context, workspace string, repoSlug string, pullRequestId int, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithBody request with any body
	PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithBody(ctx context.Context, workspace string, repoSlug string, pullRequestId int, params *PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMerge(ctx context.Context, workspace string, repoSlug string, pullRequestId int, params *PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams, body PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) GetRepositoriesWorkspaceRepoSlugCommitCommitWithResponse

func (c *ClientWithResponses) GetRepositoriesWorkspaceRepoSlugCommitCommitWithResponse(ctx context.Context, workspace string, repoSlug string, commit string, reqEditors ...RequestEditorFn) (*GetRepositoriesWorkspaceRepoSlugCommitCommitResponse, error)

GetRepositoriesWorkspaceRepoSlugCommitCommitWithResponse request returning *GetRepositoriesWorkspaceRepoSlugCommitCommitResponse

func (*ClientWithResponses) GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdWithResponse

func (c *ClientWithResponses) GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdWithResponse(ctx context.Context, workspace string, repoSlug string, pullRequestId int, reqEditors ...RequestEditorFn) (*GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse, error)

GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdWithResponse request returning *GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse

func (*ClientWithResponses) GetRepositoriesWorkspaceRepoSlugPullrequestsWithResponse

func (c *ClientWithResponses) GetRepositoriesWorkspaceRepoSlugPullrequestsWithResponse(ctx context.Context, workspace string, repoSlug string, params *GetRepositoriesWorkspaceRepoSlugPullrequestsParams, reqEditors ...RequestEditorFn) (*GetRepositoriesWorkspaceRepoSlugPullrequestsResponse, error)

GetRepositoriesWorkspaceRepoSlugPullrequestsWithResponse request returning *GetRepositoriesWorkspaceRepoSlugPullrequestsResponse

func (*ClientWithResponses) PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithBodyWithResponse

func (c *ClientWithResponses) PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithBodyWithResponse(ctx context.Context, workspace string, repoSlug string, pullRequestId int, params *PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse, error)

PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithBodyWithResponse request with arbitrary body returning *PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse

func (*ClientWithResponses) PostRepositoriesWorkspaceRepoSlugPullrequestsWithBodyWithResponse

func (c *ClientWithResponses) PostRepositoriesWorkspaceRepoSlugPullrequestsWithBodyWithResponse(ctx context.Context, workspace string, repoSlug string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRepositoriesWorkspaceRepoSlugPullrequestsResponse, error)

PostRepositoriesWorkspaceRepoSlugPullrequestsWithBodyWithResponse request with arbitrary body returning *PostRepositoriesWorkspaceRepoSlugPullrequestsResponse

func (*ClientWithResponses) PostRepositoriesWorkspaceRepoSlugPullrequestsWithResponse

func (c *ClientWithResponses) PostRepositoriesWorkspaceRepoSlugPullrequestsWithResponse(ctx context.Context, workspace string, repoSlug string, body PostRepositoriesWorkspaceRepoSlugPullrequestsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRepositoriesWorkspaceRepoSlugPullrequestsResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetRepositoriesWorkspaceRepoSlugCommitCommitWithResponse request
	GetRepositoriesWorkspaceRepoSlugCommitCommitWithResponse(ctx context.Context, workspace string, repoSlug string, commit string, reqEditors ...RequestEditorFn) (*GetRepositoriesWorkspaceRepoSlugCommitCommitResponse, error)

	// GetRepositoriesWorkspaceRepoSlugPullrequestsWithResponse request
	GetRepositoriesWorkspaceRepoSlugPullrequestsWithResponse(ctx context.Context, workspace string, repoSlug string, params *GetRepositoriesWorkspaceRepoSlugPullrequestsParams, reqEditors ...RequestEditorFn) (*GetRepositoriesWorkspaceRepoSlugPullrequestsResponse, error)

	// PostRepositoriesWorkspaceRepoSlugPullrequestsWithBodyWithResponse request with any body
	PostRepositoriesWorkspaceRepoSlugPullrequestsWithBodyWithResponse(ctx context.Context, workspace string, repoSlug string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRepositoriesWorkspaceRepoSlugPullrequestsResponse, error)

	PostRepositoriesWorkspaceRepoSlugPullrequestsWithResponse(ctx context.Context, workspace string, repoSlug string, body PostRepositoriesWorkspaceRepoSlugPullrequestsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRepositoriesWorkspaceRepoSlugPullrequestsResponse, error)

	// GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdWithResponse request
	GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdWithResponse(ctx context.Context, workspace string, repoSlug string, pullRequestId int, reqEditors ...RequestEditorFn) (*GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse, error)

	// PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithBodyWithResponse request with any body
	PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithBodyWithResponse(ctx context.Context, workspace string, repoSlug string, pullRequestId int, params *PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse, error)

	PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithResponse(ctx context.Context, workspace string, repoSlug string, pullRequestId int, params *PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams, body PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Commit

type Commit struct {
	Author       *Author        `json:"author,omitempty"`
	Committer    *Committer     `json:"committer,omitempty"`
	Date         *time.Time     `json:"date,omitempty"`
	Hash         *string        `json:"hash,omitempty"`
	Message      *string        `json:"message,omitempty"`
	Parents      *[]BaseCommit  `json:"parents,omitempty"`
	Participants *[]Participant `json:"participants,omitempty"`
	Repository   *Repository    `json:"repository,omitempty"`
	Summary      *struct {
		// Html The user's content rendered as HTML.
		Html *string `json:"html,omitempty"`

		// Markup The type of markup language the raw content is to be interpreted in.
		Markup *CommitSummaryMarkup `json:"markup,omitempty"`

		// Raw The text as it was typed by a user.
		Raw *string `json:"raw,omitempty"`
	} `json:"summary,omitempty"`
	Type                 string                 `json:"type"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Commit defines model for commit.

func (Commit) Get

func (a Commit) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Commit. Returns the specified element and whether it was found

func (Commit) MarshalJSON

func (a Commit) MarshalJSON() ([]byte, error)

Override default JSON handling for Commit to handle AdditionalProperties

func (*Commit) Set

func (a *Commit) Set(fieldName string, value interface{})

Setter for additional properties for Commit

func (*Commit) UnmarshalJSON

func (a *Commit) UnmarshalJSON(b []byte) error

Override default JSON handling for Commit to handle AdditionalProperties

type CommitSummaryMarkup

type CommitSummaryMarkup string

CommitSummaryMarkup The type of markup language the raw content is to be interpreted in.

const (
	CommitSummaryMarkupCreole    CommitSummaryMarkup = "creole"
	CommitSummaryMarkupMarkdown  CommitSummaryMarkup = "markdown"
	CommitSummaryMarkupPlaintext CommitSummaryMarkup = "plaintext"
)

Defines values for CommitSummaryMarkup.

func (CommitSummaryMarkup) Valid

func (e CommitSummaryMarkup) Valid() bool

Valid indicates whether the value is a known member of the CommitSummaryMarkup enum.

type Committer

type Committer struct {
	// Raw The raw committer value from the repository. This may be the only value available if the committer does not match a user in Bitbucket.
	Raw                  *string                `json:"raw,omitempty"`
	Type                 string                 `json:"type"`
	User                 *Account               `json:"user,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Committer defines model for committer.

func (Committer) Get

func (a Committer) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Committer. Returns the specified element and whether it was found

func (Committer) MarshalJSON

func (a Committer) MarshalJSON() ([]byte, error)

Override default JSON handling for Committer to handle AdditionalProperties

func (*Committer) Set

func (a *Committer) Set(fieldName string, value interface{})

Setter for additional properties for Committer

func (*Committer) UnmarshalJSON

func (a *Committer) UnmarshalJSON(b []byte) error

Override default JSON handling for Committer to handle AdditionalProperties

type Error

type Error struct {
	Error *struct {
		// Data Optional structured data that is endpoint-specific.
		Data    *map[string]interface{} `json:"data,omitempty"`
		Detail  *string                 `json:"detail,omitempty"`
		Message string                  `json:"message"`
	} `json:"error,omitempty"`
	Type                 string                 `json:"type"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Error Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.

func (Error) Get

func (a Error) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Error. Returns the specified element and whether it was found

func (Error) MarshalJSON

func (a Error) MarshalJSON() ([]byte, error)

Override default JSON handling for Error to handle AdditionalProperties

func (*Error) Set

func (a *Error) Set(fieldName string, value interface{})

Setter for additional properties for Error

func (*Error) UnmarshalJSON

func (a *Error) UnmarshalJSON(b []byte) error

Override default JSON handling for Error to handle AdditionalProperties

type GetRepositoriesWorkspaceRepoSlugCommitCommitResponse

type GetRepositoriesWorkspaceRepoSlugCommitCommitResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Commit
	JSON404      *Error
}

func ParseGetRepositoriesWorkspaceRepoSlugCommitCommitResponse

func ParseGetRepositoriesWorkspaceRepoSlugCommitCommitResponse(rsp *http.Response) (*GetRepositoriesWorkspaceRepoSlugCommitCommitResponse, error)

ParseGetRepositoriesWorkspaceRepoSlugCommitCommitResponse parses an HTTP response from a GetRepositoriesWorkspaceRepoSlugCommitCommitWithResponse call

func (GetRepositoriesWorkspaceRepoSlugCommitCommitResponse) Status

Status returns HTTPResponse.Status

func (GetRepositoriesWorkspaceRepoSlugCommitCommitResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetRepositoriesWorkspaceRepoSlugPullrequestsParams

type GetRepositoriesWorkspaceRepoSlugPullrequestsParams struct {
	// State Only return pull requests that are in this state. This parameter can be repeated.
	State *GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState `form:"state,omitempty" json:"state,omitempty"`
}

GetRepositoriesWorkspaceRepoSlugPullrequestsParams defines parameters for GetRepositoriesWorkspaceRepoSlugPullrequests.

type GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState

type GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState string

GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState defines parameters for GetRepositoriesWorkspaceRepoSlugPullrequests.

const (
	GetRepositoriesWorkspaceRepoSlugPullrequestsParamsStateDECLINED   GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState = "DECLINED"
	GetRepositoriesWorkspaceRepoSlugPullrequestsParamsStateMERGED     GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState = "MERGED"
	GetRepositoriesWorkspaceRepoSlugPullrequestsParamsStateOPEN       GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState = "OPEN"
	GetRepositoriesWorkspaceRepoSlugPullrequestsParamsStateSUPERSEDED GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState = "SUPERSEDED"
)

Defines values for GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState.

func (GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState) Valid

Valid indicates whether the value is a known member of the GetRepositoriesWorkspaceRepoSlugPullrequestsParamsState enum.

type GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse

type GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Pullrequest
	JSON404      *Error
}

func ParseGetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse

func ParseGetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse(rsp *http.Response) (*GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse, error)

ParseGetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse parses an HTTP response from a GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdWithResponse call

func (GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse) Status

Status returns HTTPResponse.Status

func (GetRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetRepositoriesWorkspaceRepoSlugPullrequestsResponse

type GetRepositoriesWorkspaceRepoSlugPullrequestsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaginatedPullrequests
	JSON404      *Error
}

func ParseGetRepositoriesWorkspaceRepoSlugPullrequestsResponse

func ParseGetRepositoriesWorkspaceRepoSlugPullrequestsResponse(rsp *http.Response) (*GetRepositoriesWorkspaceRepoSlugPullrequestsResponse, error)

ParseGetRepositoriesWorkspaceRepoSlugPullrequestsResponse parses an HTTP response from a GetRepositoriesWorkspaceRepoSlugPullrequestsWithResponse call

func (GetRepositoriesWorkspaceRepoSlugPullrequestsResponse) Status

Status returns HTTPResponse.Status

func (GetRepositoriesWorkspaceRepoSlugPullrequestsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Link struct {
	Href *string `json:"href,omitempty"`
	Name *string `json:"name,omitempty"`
}

Link A link to a resource related to this object.

type Object

type Object struct {
	Type                 string                 `json:"type"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Object Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.

func (Object) Get

func (a Object) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Object. Returns the specified element and whether it was found

func (Object) MarshalJSON

func (a Object) MarshalJSON() ([]byte, error)

Override default JSON handling for Object to handle AdditionalProperties

func (*Object) Set

func (a *Object) Set(fieldName string, value interface{})

Setter for additional properties for Object

func (*Object) UnmarshalJSON

func (a *Object) UnmarshalJSON(b []byte) error

Override default JSON handling for Object to handle AdditionalProperties

type PaginatedPullrequests

type PaginatedPullrequests struct {
	// Next Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
	Next *string `json:"next,omitempty"`

	// Page Page number of the current results. This is an optional element that is not provided in all responses.
	Page *int `json:"page,omitempty"`

	// Pagelen Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
	Pagelen *int `json:"pagelen,omitempty"`

	// Previous Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.
	Previous *string `json:"previous,omitempty"`

	// Size Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
	Size   *int           `json:"size,omitempty"`
	Values *[]Pullrequest `json:"values,omitempty"`
}

PaginatedPullrequests A paginated list of pullrequests.

type Participant

type Participant struct {
	Approved *bool `json:"approved,omitempty"`

	// ParticipatedOn The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented.
	ParticipatedOn       *time.Time             `json:"participated_on,omitempty"`
	Role                 *ParticipantRole       `json:"role,omitempty"`
	State                *ParticipantState      `json:"state,omitempty"`
	Type                 string                 `json:"type"`
	User                 *Account               `json:"user,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Participant defines model for participant.

func (Participant) Get

func (a Participant) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Participant. Returns the specified element and whether it was found

func (Participant) MarshalJSON

func (a Participant) MarshalJSON() ([]byte, error)

Override default JSON handling for Participant to handle AdditionalProperties

func (*Participant) Set

func (a *Participant) Set(fieldName string, value interface{})

Setter for additional properties for Participant

func (*Participant) UnmarshalJSON

func (a *Participant) UnmarshalJSON(b []byte) error

Override default JSON handling for Participant to handle AdditionalProperties

type ParticipantRole

type ParticipantRole string

ParticipantRole defines model for Participant.Role.

const (
	PARTICIPANT ParticipantRole = "PARTICIPANT"
	REVIEWER    ParticipantRole = "REVIEWER"
)

Defines values for ParticipantRole.

func (ParticipantRole) Valid

func (e ParticipantRole) Valid() bool

Valid indicates whether the value is a known member of the ParticipantRole enum.

type ParticipantState

type ParticipantState string

ParticipantState defines model for Participant.State.

const (
	Approved         ParticipantState = "approved"
	ChangesRequested ParticipantState = "changes_requested"
	LessThannil      ParticipantState = "<nil>"
)

Defines values for ParticipantState.

func (ParticipantState) Valid

func (e ParticipantState) Valid() bool

Valid indicates whether the value is a known member of the ParticipantState enum.

type PostRepositoriesWorkspaceRepoSlugPullrequestsJSONRequestBody

type PostRepositoriesWorkspaceRepoSlugPullrequestsJSONRequestBody = Pullrequest

PostRepositoriesWorkspaceRepoSlugPullrequestsJSONRequestBody defines body for PostRepositoriesWorkspaceRepoSlugPullrequests for application/json ContentType.

type PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeJSONRequestBody

type PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeJSONRequestBody = PullrequestMergeParameters

PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeJSONRequestBody defines body for PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMerge for application/json ContentType.

type PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams

type PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams struct {
	// Async Default value is false.
	//
	//
	// When set to true, runs merge asynchronously and
	// immediately returns a 202 with polling link to
	// the task-status API in the Location header.
	//
	//
	// When set to false, runs merge and waits for it to
	// complete, returning 200 when it succeeds. If the
	// duration of the merge exceeds a timeout threshold,
	// the API returns a 202 with polling link to the
	// task-status API in the Location header.
	Async *bool `form:"async,omitempty" json:"async,omitempty"`
}

PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeParams defines parameters for PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMerge.

type PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse

type PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Pullrequest
	JSON555      *Error
}

func ParsePostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse

func ParsePostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse(rsp *http.Response) (*PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse, error)

ParsePostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse parses an HTTP response from a PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeWithResponse call

func (PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse) Status

Status returns HTTPResponse.Status

func (PostRepositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostRepositoriesWorkspaceRepoSlugPullrequestsResponse

type PostRepositoriesWorkspaceRepoSlugPullrequestsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Pullrequest
	JSON400      *Error
	JSON401      *Error
}

func ParsePostRepositoriesWorkspaceRepoSlugPullrequestsResponse

func ParsePostRepositoriesWorkspaceRepoSlugPullrequestsResponse(rsp *http.Response) (*PostRepositoriesWorkspaceRepoSlugPullrequestsResponse, error)

ParsePostRepositoriesWorkspaceRepoSlugPullrequestsResponse parses an HTTP response from a PostRepositoriesWorkspaceRepoSlugPullrequestsWithResponse call

func (PostRepositoriesWorkspaceRepoSlugPullrequestsResponse) Status

Status returns HTTPResponse.Status

func (PostRepositoriesWorkspaceRepoSlugPullrequestsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type Project

type Project struct {
	CreatedOn   *time.Time `json:"created_on,omitempty"`
	Description *string    `json:"description,omitempty"`

	// HasPubliclyVisibleRepos
	// Indicates whether the project contains publicly visible repositories.
	// Note that private projects cannot contain public repositories.
	HasPubliclyVisibleRepos *bool `json:"has_publicly_visible_repos,omitempty"`

	// IsPrivate
	// Indicates whether the project is publicly accessible, or whether it is
	// private to the team and consequently only visible to team members.
	// Note that private projects cannot contain public repositories.
	IsPrivate *bool `json:"is_private,omitempty"`

	// Key The project's key.
	Key   *string `json:"key,omitempty"`
	Links *struct {
		// Avatar A link to a resource related to this object.
		Avatar *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"avatar,omitempty"`

		// Html A link to a resource related to this object.
		Html *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"html,omitempty"`
	} `json:"links,omitempty"`

	// Name The name of the project.
	Name      *string    `json:"name,omitempty"`
	Owner     *Team      `json:"owner,omitempty"`
	Type      string     `json:"type"`
	UpdatedOn *time.Time `json:"updated_on,omitempty"`

	// Uuid The project's immutable id.
	Uuid                 *string                `json:"uuid,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Project defines model for project.

func (Project) Get

func (a Project) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Project. Returns the specified element and whether it was found

func (Project) MarshalJSON

func (a Project) MarshalJSON() ([]byte, error)

Override default JSON handling for Project to handle AdditionalProperties

func (*Project) Set

func (a *Project) Set(fieldName string, value interface{})

Setter for additional properties for Project

func (*Project) UnmarshalJSON

func (a *Project) UnmarshalJSON(b []byte) error

Override default JSON handling for Project to handle AdditionalProperties

type Pullrequest

type Pullrequest struct {
	Author *Account `json:"author,omitempty"`

	// CloseSourceBranch A boolean flag indicating if merging the pull request closes the source branch.
	CloseSourceBranch *bool    `json:"close_source_branch,omitempty"`
	ClosedBy          *Account `json:"closed_by,omitempty"`

	// CommentCount The number of comments for a specific pull request.
	CommentCount *int `json:"comment_count,omitempty"`

	// CreatedOn The ISO8601 timestamp the request was created.
	CreatedOn   *time.Time           `json:"created_on,omitempty"`
	Destination *PullrequestEndpoint `json:"destination,omitempty"`

	// Draft A boolean flag indicating whether the pull request is a draft.
	Draft *bool `json:"draft,omitempty"`

	// Id The pull request's unique ID. Note that pull request IDs are only unique within their associated repository.
	Id    *int `json:"id,omitempty"`
	Links *struct {
		// Activity A link to a resource related to this object.
		Activity *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"activity,omitempty"`

		// Approve A link to a resource related to this object.
		Approve *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"approve,omitempty"`

		// Comments A link to a resource related to this object.
		Comments *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"comments,omitempty"`

		// Commits A link to a resource related to this object.
		Commits *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"commits,omitempty"`

		// Decline A link to a resource related to this object.
		Decline *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"decline,omitempty"`

		// Diff A link to a resource related to this object.
		Diff *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"diff,omitempty"`

		// Diffstat A link to a resource related to this object.
		Diffstat *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"diffstat,omitempty"`

		// Html A link to a resource related to this object.
		Html *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"html,omitempty"`

		// Merge A link to a resource related to this object.
		Merge *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"merge,omitempty"`

		// Self A link to a resource related to this object.
		Self *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"self,omitempty"`
	} `json:"links,omitempty"`
	MergeCommit *struct {
		Hash *string `json:"hash,omitempty"`
	} `json:"merge_commit,omitempty"`

	// Participants         The list of users that are collaborating on this pull request.
	//         Collaborators are user that:
	//
	//         * are added to the pull request as a reviewer (part of the reviewers
	//           list)
	//         * are not explicit reviewers, but have commented on the pull request
	//         * are not explicit reviewers, but have approved the pull request
	//
	//         Each user is wrapped in an object that indicates the user's role and
	//         whether they have approved the pull request. For performance reasons,
	//         the API only returns this list when an API requests a pull request by
	//         id.
	//
	Participants *[]Participant `json:"participants,omitempty"`

	// Queued A boolean flag indicating whether the pull request is queued
	Queued *bool `json:"queued,omitempty"`

	// Reason Explains why a pull request was declined. This field is only applicable to pull requests in rejected state.
	Reason *string `json:"reason,omitempty"`

	// Rendered User provided pull request text, interpreted in a markup language and rendered in HTML
	Rendered *struct {
		Description *struct {
			// Html The user's content rendered as HTML.
			Html *string `json:"html,omitempty"`

			// Markup The type of markup language the raw content is to be interpreted in.
			Markup *PullrequestRenderedDescriptionMarkup `json:"markup,omitempty"`

			// Raw The text as it was typed by a user.
			Raw *string `json:"raw,omitempty"`
		} `json:"description,omitempty"`
		Reason *struct {
			// Html The user's content rendered as HTML.
			Html *string `json:"html,omitempty"`

			// Markup The type of markup language the raw content is to be interpreted in.
			Markup *PullrequestRenderedReasonMarkup `json:"markup,omitempty"`

			// Raw The text as it was typed by a user.
			Raw *string `json:"raw,omitempty"`
		} `json:"reason,omitempty"`
		Title *struct {
			// Html The user's content rendered as HTML.
			Html *string `json:"html,omitempty"`

			// Markup The type of markup language the raw content is to be interpreted in.
			Markup *PullrequestRenderedTitleMarkup `json:"markup,omitempty"`

			// Raw The text as it was typed by a user.
			Raw *string `json:"raw,omitempty"`
		} `json:"title,omitempty"`
	} `json:"rendered,omitempty"`

	// Reviewers The list of users that were added as reviewers on this pull request when it was created. For performance reasons, the API only includes this list on a pull request's `self` URL.
	Reviewers *[]Account           `json:"reviewers,omitempty"`
	Source    *PullrequestEndpoint `json:"source,omitempty"`

	// State The pull request's current status.
	State   *PullrequestState `json:"state,omitempty"`
	Summary *struct {
		// Html The user's content rendered as HTML.
		Html *string `json:"html,omitempty"`

		// Markup The type of markup language the raw content is to be interpreted in.
		Markup *PullrequestSummaryMarkup `json:"markup,omitempty"`

		// Raw The text as it was typed by a user.
		Raw *string `json:"raw,omitempty"`
	} `json:"summary,omitempty"`

	// TaskCount The number of open tasks for a specific pull request.
	TaskCount *int `json:"task_count,omitempty"`

	// Title Title of the pull request.
	Title *string `json:"title,omitempty"`
	Type  string  `json:"type"`

	// UpdatedOn The ISO8601 timestamp the request was last updated.
	UpdatedOn            *time.Time             `json:"updated_on,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Pullrequest defines model for pullrequest.

func (Pullrequest) Get

func (a Pullrequest) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Pullrequest. Returns the specified element and whether it was found

func (Pullrequest) MarshalJSON

func (a Pullrequest) MarshalJSON() ([]byte, error)

Override default JSON handling for Pullrequest to handle AdditionalProperties

func (*Pullrequest) Set

func (a *Pullrequest) Set(fieldName string, value interface{})

Setter for additional properties for Pullrequest

func (*Pullrequest) UnmarshalJSON

func (a *Pullrequest) UnmarshalJSON(b []byte) error

Override default JSON handling for Pullrequest to handle AdditionalProperties

type PullrequestEndpoint

type PullrequestEndpoint struct {
	Branch *struct {
		// DefaultMergeStrategy The default merge strategy, when this endpoint is the destination of the pull request.
		DefaultMergeStrategy *string `json:"default_merge_strategy,omitempty"`

		// MergeStrategies Available merge strategies, when this endpoint is the destination of the pull request.
		MergeStrategies *[]PullrequestEndpointBranchMergeStrategies `json:"merge_strategies,omitempty"`
		Name            *string                                     `json:"name,omitempty"`
	} `json:"branch,omitempty"`
	Commit *struct {
		Hash *string `json:"hash,omitempty"`
	} `json:"commit,omitempty"`
	Repository *Repository `json:"repository,omitempty"`
}

PullrequestEndpoint defines model for pullrequest_endpoint.

type PullrequestEndpointBranchMergeStrategies

type PullrequestEndpointBranchMergeStrategies string

PullrequestEndpointBranchMergeStrategies defines model for PullrequestEndpoint.Branch.MergeStrategies.

const (
	PullrequestEndpointBranchMergeStrategiesFastForward       PullrequestEndpointBranchMergeStrategies = "fast_forward"
	PullrequestEndpointBranchMergeStrategiesMergeCommit       PullrequestEndpointBranchMergeStrategies = "merge_commit"
	PullrequestEndpointBranchMergeStrategiesRebaseFastForward PullrequestEndpointBranchMergeStrategies = "rebase_fast_forward"
	PullrequestEndpointBranchMergeStrategiesRebaseMerge       PullrequestEndpointBranchMergeStrategies = "rebase_merge"
	PullrequestEndpointBranchMergeStrategiesSquash            PullrequestEndpointBranchMergeStrategies = "squash"
	PullrequestEndpointBranchMergeStrategiesSquashFastForward PullrequestEndpointBranchMergeStrategies = "squash_fast_forward"
)

Defines values for PullrequestEndpointBranchMergeStrategies.

func (PullrequestEndpointBranchMergeStrategies) Valid

Valid indicates whether the value is a known member of the PullrequestEndpointBranchMergeStrategies enum.

type PullrequestMergeParameters

type PullrequestMergeParameters struct {
	// CloseSourceBranch Whether the source branch should be deleted. If this is not provided, we fallback to the value used when the pull request was created, which defaults to False
	CloseSourceBranch *bool `json:"close_source_branch,omitempty"`

	// MergeStrategy The merge strategy that will be used to merge the pull request.
	MergeStrategy *PullrequestMergeParametersMergeStrategy `json:"merge_strategy,omitempty"`

	// Message The commit message that will be used on the resulting commit. Note that the size of the message is limited to 128 KiB.
	Message              *string                `json:"message,omitempty"`
	Type                 string                 `json:"type"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

PullrequestMergeParameters The metadata that describes a pull request merge.

func (PullrequestMergeParameters) Get

func (a PullrequestMergeParameters) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for PullrequestMergeParameters. Returns the specified element and whether it was found

func (PullrequestMergeParameters) MarshalJSON

func (a PullrequestMergeParameters) MarshalJSON() ([]byte, error)

Override default JSON handling for PullrequestMergeParameters to handle AdditionalProperties

func (*PullrequestMergeParameters) Set

func (a *PullrequestMergeParameters) Set(fieldName string, value interface{})

Setter for additional properties for PullrequestMergeParameters

func (*PullrequestMergeParameters) UnmarshalJSON

func (a *PullrequestMergeParameters) UnmarshalJSON(b []byte) error

Override default JSON handling for PullrequestMergeParameters to handle AdditionalProperties

type PullrequestMergeParametersMergeStrategy

type PullrequestMergeParametersMergeStrategy string

PullrequestMergeParametersMergeStrategy The merge strategy that will be used to merge the pull request.

const (
	FastForward       PullrequestMergeParametersMergeStrategy = "fast_forward"
	MergeCommit       PullrequestMergeParametersMergeStrategy = "merge_commit"
	RebaseFastForward PullrequestMergeParametersMergeStrategy = "rebase_fast_forward"
	RebaseMerge       PullrequestMergeParametersMergeStrategy = "rebase_merge"
	Squash            PullrequestMergeParametersMergeStrategy = "squash"
	SquashFastForward PullrequestMergeParametersMergeStrategy = "squash_fast_forward"
)

Defines values for PullrequestMergeParametersMergeStrategy.

func (PullrequestMergeParametersMergeStrategy) Valid

Valid indicates whether the value is a known member of the PullrequestMergeParametersMergeStrategy enum.

type PullrequestRenderedDescriptionMarkup

type PullrequestRenderedDescriptionMarkup string

PullrequestRenderedDescriptionMarkup The type of markup language the raw content is to be interpreted in.

const (
	PullrequestRenderedDescriptionMarkupCreole    PullrequestRenderedDescriptionMarkup = "creole"
	PullrequestRenderedDescriptionMarkupMarkdown  PullrequestRenderedDescriptionMarkup = "markdown"
	PullrequestRenderedDescriptionMarkupPlaintext PullrequestRenderedDescriptionMarkup = "plaintext"
)

Defines values for PullrequestRenderedDescriptionMarkup.

func (PullrequestRenderedDescriptionMarkup) Valid

Valid indicates whether the value is a known member of the PullrequestRenderedDescriptionMarkup enum.

type PullrequestRenderedReasonMarkup

type PullrequestRenderedReasonMarkup string

PullrequestRenderedReasonMarkup The type of markup language the raw content is to be interpreted in.

const (
	PullrequestRenderedReasonMarkupCreole    PullrequestRenderedReasonMarkup = "creole"
	PullrequestRenderedReasonMarkupMarkdown  PullrequestRenderedReasonMarkup = "markdown"
	PullrequestRenderedReasonMarkupPlaintext PullrequestRenderedReasonMarkup = "plaintext"
)

Defines values for PullrequestRenderedReasonMarkup.

func (PullrequestRenderedReasonMarkup) Valid

Valid indicates whether the value is a known member of the PullrequestRenderedReasonMarkup enum.

type PullrequestRenderedTitleMarkup

type PullrequestRenderedTitleMarkup string

PullrequestRenderedTitleMarkup The type of markup language the raw content is to be interpreted in.

const (
	PullrequestRenderedTitleMarkupCreole    PullrequestRenderedTitleMarkup = "creole"
	PullrequestRenderedTitleMarkupMarkdown  PullrequestRenderedTitleMarkup = "markdown"
	PullrequestRenderedTitleMarkupPlaintext PullrequestRenderedTitleMarkup = "plaintext"
)

Defines values for PullrequestRenderedTitleMarkup.

func (PullrequestRenderedTitleMarkup) Valid

Valid indicates whether the value is a known member of the PullrequestRenderedTitleMarkup enum.

type PullrequestState

type PullrequestState string

PullrequestState The pull request's current status.

const (
	PullrequestStateDECLINED   PullrequestState = "DECLINED"
	PullrequestStateDRAFT      PullrequestState = "DRAFT"
	PullrequestStateMERGED     PullrequestState = "MERGED"
	PullrequestStateOPEN       PullrequestState = "OPEN"
	PullrequestStateQUEUED     PullrequestState = "QUEUED"
	PullrequestStateSUPERSEDED PullrequestState = "SUPERSEDED"
)

Defines values for PullrequestState.

func (PullrequestState) Valid

func (e PullrequestState) Valid() bool

Valid indicates whether the value is a known member of the PullrequestState enum.

type PullrequestSummaryMarkup

type PullrequestSummaryMarkup string

PullrequestSummaryMarkup The type of markup language the raw content is to be interpreted in.

const (
	PullrequestSummaryMarkupCreole    PullrequestSummaryMarkup = "creole"
	PullrequestSummaryMarkupMarkdown  PullrequestSummaryMarkup = "markdown"
	PullrequestSummaryMarkupPlaintext PullrequestSummaryMarkup = "plaintext"
)

Defines values for PullrequestSummaryMarkup.

func (PullrequestSummaryMarkup) Valid

func (e PullrequestSummaryMarkup) Valid() bool

Valid indicates whether the value is a known member of the PullrequestSummaryMarkup enum.

type Ref

type Ref struct {
	Links *struct {
		// Commits A link to a resource related to this object.
		Commits *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"commits,omitempty"`

		// Html A link to a resource related to this object.
		Html *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"html,omitempty"`

		// Self A link to a resource related to this object.
		Self *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"self,omitempty"`
	} `json:"links,omitempty"`

	// Name The name of the ref.
	Name                 *string                `json:"name,omitempty"`
	Target               *Commit                `json:"target,omitempty"`
	Type                 string                 `json:"type"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Ref A ref object, representing a branch or tag in a repository.

func (Ref) Get

func (a Ref) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Ref. Returns the specified element and whether it was found

func (Ref) MarshalJSON

func (a Ref) MarshalJSON() ([]byte, error)

Override default JSON handling for Ref to handle AdditionalProperties

func (*Ref) Set

func (a *Ref) Set(fieldName string, value interface{})

Setter for additional properties for Ref

func (*Ref) UnmarshalJSON

func (a *Ref) UnmarshalJSON(b []byte) error

Override default JSON handling for Ref to handle AdditionalProperties

type Repository

type Repository struct {
	CreatedOn   *time.Time `json:"created_on,omitempty"`
	Description *string    `json:"description,omitempty"`

	// ForkPolicy
	// Controls the rules for forking this repository.
	//
	// * **allow_forks**: unrestricted forking
	// * **no_public_forks**: restrict forking to private forks (forks cannot
	//   be made public later)
	// * **no_forks**: deny all forking
	ForkPolicy *RepositoryForkPolicy `json:"fork_policy,omitempty"`

	// FullName The concatenation of the repository owner's username and the slugified name, e.g. "evzijst/interruptingcow". This is the same string used in Bitbucket URLs.
	FullName *string `json:"full_name,omitempty"`

	// HasIssues
	// The issue tracker for this repository is enabled. Issue Tracker
	// features are not supported for repositories in workspaces
	// administered through admin.atlassian.com.
	HasIssues *bool `json:"has_issues,omitempty"`

	// HasWiki
	// The wiki for this repository is enabled. Wiki
	// features are not supported for repositories in workspaces
	// administered through admin.atlassian.com.
	HasWiki   *bool   `json:"has_wiki,omitempty"`
	IsPrivate *bool   `json:"is_private,omitempty"`
	Language  *string `json:"language,omitempty"`
	Links     *struct {
		// Avatar A link to a resource related to this object.
		Avatar *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"avatar,omitempty"`
		Clone *[]struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"clone,omitempty"`

		// Commits A link to a resource related to this object.
		Commits *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"commits,omitempty"`

		// Downloads A link to a resource related to this object.
		Downloads *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"downloads,omitempty"`

		// Forks A link to a resource related to this object.
		Forks *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"forks,omitempty"`

		// Hooks A link to a resource related to this object.
		Hooks *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"hooks,omitempty"`

		// Html A link to a resource related to this object.
		Html *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"html,omitempty"`

		// Pullrequests A link to a resource related to this object.
		Pullrequests *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"pullrequests,omitempty"`

		// Self A link to a resource related to this object.
		Self *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"self,omitempty"`

		// Watchers A link to a resource related to this object.
		Watchers *struct {
			Href *string `json:"href,omitempty"`
			Name *string `json:"name,omitempty"`
		} `json:"watchers,omitempty"`
	} `json:"links,omitempty"`
	Mainbranch *Branch        `json:"mainbranch,omitempty"`
	Name       *string        `json:"name,omitempty"`
	Owner      *Account       `json:"owner,omitempty"`
	Parent     *Repository    `json:"parent,omitempty"`
	Project    *Project       `json:"project,omitempty"`
	Scm        *RepositoryScm `json:"scm,omitempty"`
	Size       *int           `json:"size,omitempty"`
	Type       string         `json:"type"`
	UpdatedOn  *time.Time     `json:"updated_on,omitempty"`

	// Uuid The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.
	Uuid                 *string                `json:"uuid,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Repository defines model for repository.

func (Repository) Get

func (a Repository) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Repository. Returns the specified element and whether it was found

func (Repository) MarshalJSON

func (a Repository) MarshalJSON() ([]byte, error)

Override default JSON handling for Repository to handle AdditionalProperties

func (*Repository) Set

func (a *Repository) Set(fieldName string, value interface{})

Setter for additional properties for Repository

func (*Repository) UnmarshalJSON

func (a *Repository) UnmarshalJSON(b []byte) error

Override default JSON handling for Repository to handle AdditionalProperties

type RepositoryForkPolicy

type RepositoryForkPolicy string

RepositoryForkPolicy Controls the rules for forking this repository.

  • **allow_forks**: unrestricted forking
  • **no_public_forks**: restrict forking to private forks (forks cannot be made public later)
  • **no_forks**: deny all forking
const (
	AllowForks    RepositoryForkPolicy = "allow_forks"
	NoForks       RepositoryForkPolicy = "no_forks"
	NoPublicForks RepositoryForkPolicy = "no_public_forks"
)

Defines values for RepositoryForkPolicy.

func (RepositoryForkPolicy) Valid

func (e RepositoryForkPolicy) Valid() bool

Valid indicates whether the value is a known member of the RepositoryForkPolicy enum.

type RepositoryScm

type RepositoryScm string

RepositoryScm defines model for Repository.Scm.

const (
	Git RepositoryScm = "git"
)

Defines values for RepositoryScm.

func (RepositoryScm) Valid

func (e RepositoryScm) Valid() bool

Valid indicates whether the value is a known member of the RepositoryScm enum.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type Team

type Team struct {
	CreatedOn            *time.Time             `json:"created_on,omitempty"`
	DisplayName          *string                `json:"display_name,omitempty"`
	Links                *TeamLinks             `json:"links,omitempty"`
	Type                 string                 `json:"type"`
	Uuid                 *string                `json:"uuid,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Team defines model for team.

func (Team) Get

func (a Team) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Team. Returns the specified element and whether it was found

func (Team) MarshalJSON

func (a Team) MarshalJSON() ([]byte, error)

Override default JSON handling for Team to handle AdditionalProperties

func (*Team) Set

func (a *Team) Set(fieldName string, value interface{})

Setter for additional properties for Team

func (*Team) UnmarshalJSON

func (a *Team) UnmarshalJSON(b []byte) error

Override default JSON handling for Team to handle AdditionalProperties

type TeamLinks struct {
	// Avatar A link to a resource related to this object.
	Avatar *Link `json:"avatar,omitempty"`

	// Html A link to a resource related to this object.
	Html *Link `json:"html,omitempty"`

	// Members A link to a resource related to this object.
	Members *Link `json:"members,omitempty"`

	// Projects A link to a resource related to this object.
	Projects *Link `json:"projects,omitempty"`

	// Repositories A link to a resource related to this object.
	Repositories *Link `json:"repositories,omitempty"`

	// Self A link to a resource related to this object.
	Self                 *Link                  `json:"self,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

TeamLinks defines model for team_links.

func (TeamLinks) Get

func (a TeamLinks) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for TeamLinks. Returns the specified element and whether it was found

func (TeamLinks) MarshalJSON

func (a TeamLinks) MarshalJSON() ([]byte, error)

Override default JSON handling for TeamLinks to handle AdditionalProperties

func (*TeamLinks) Set

func (a *TeamLinks) Set(fieldName string, value interface{})

Setter for additional properties for TeamLinks

func (*TeamLinks) UnmarshalJSON

func (a *TeamLinks) UnmarshalJSON(b []byte) error

Override default JSON handling for TeamLinks to handle AdditionalProperties

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL