luci: go.chromium.org/luci/common/api/buildbucket/buildbucket/v1 Index | Files

package buildbucket

import "go.chromium.org/luci/common/api/buildbucket/buildbucket/v1"

Package buildbucket provides access to the Build Bucket Service.

Creating a client

Usage example:

import "go.chromium.org/luci/common/api/buildbucket/buildbucket/v1"
...
ctx := context.Background()
buildbucketService, err := buildbucket.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

buildbucketService, err := buildbucket.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
buildbucketService, err := buildbucket.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Package Files

address.go buildbucket-gen.go const.go search.go timestamp.go

Constants

const (
    // StatusScheduled means a build was created, but did not start or
    // complete.
    // The initial state of a build.
    StatusScheduled = "SCHEDULED"
    // StatusStarted means a build has started.
    StatusStarted = "STARTED"
    // StatusCompleted means a build has completed. See its Result.
    StatusCompleted = "COMPLETED"
)

Build statuses.

const (
    // ResultFailure means a build has failed, with or without an infra-failure.
    ResultFailure = "FAILURE"
    // ResultSuccess means a build has succeeded.
    ResultSuccess = "SUCCESS"
    // ResultCanceled means a build was cancelled or timed out.
    ResultCanceled = "CANCELED"
)
const (
    // TagBuilder is the key of builder name tag.
    TagBuilder = "builder"
    // TagBuildAddress is the key of the build address tag.
    // See also Build.Address().
    TagBuildAddress = "build_address"
    // TagBuildSet is a key of a tag used to group related builds.
    // See also ParseBuildSet.
    // When a build triggers a new build, the buildset tag must be copied.
    TagBuildSet = "buildset"
)
const (
    // ReasonNotFound means the given build ID was not found on the BuildBucket service.
    ReasonNotFound = "BUILD_NOT_FOUND"
)
const (
    // StatusFilterIncomplete matches StatusScheduled or StatusStarted.
    StatusFilterIncomplete = "INCOMPLETE"
)

Build status filters. Can be used only when searching. A build cannot have any of these statuses.

Any build status defined above can be used as a status filter too.

const (
    // https://www.googleapis.com/auth/userinfo.email
    UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
)

OAuth2 scopes used by this API.

func FormatBuildAddress Uses

func FormatBuildAddress(id int64, bucket, builder string, number int) string

FormatBuildAddress returns a value for TagBuildAddress tag. If number is positive, returns "<bucket>/<builder>/<number>", otherwise returns "<id>"

See also ParseBuildAddress.

func FormatTimestamp Uses

func FormatTimestamp(t time.Time) int64

FormatTimestamp converts t to a buildbucket timestamp.

func ParseBuildAddress Uses

func ParseBuildAddress(address string) (id int64, project, bucket, builder string, number int, err error)

ParseBuildAddress parses a value of a TagBuildAddress tag. See also FormatBuildAddress.

If id is non-zero, project, bucket and builder are zero. If bucket is non-zero, id is zero.

func ParseTimestamp Uses

func ParseTimestamp(usec int64) time.Time

ParseTimestamp parses a buildbucket timestamp.

func ProjectFromBucket Uses

func ProjectFromBucket(bucket string) string

ProjectFromBucket tries to retrieve project id from bucket name. Returns "" on failure.

func ValidateBuildAddress Uses

func ValidateBuildAddress(address string) error

ValidateBuildAddress returns an error if the build address is invalid.

type BackfillTagIndexCall Uses

type BackfillTagIndexCall struct {
    // contains filtered or unexported fields
}

func (*BackfillTagIndexCall) Context Uses

func (c *BackfillTagIndexCall) Context(ctx context.Context) *BackfillTagIndexCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*BackfillTagIndexCall) Do Uses

func (c *BackfillTagIndexCall) Do(opts ...googleapi.CallOption) error

Do executes the "buildbucket.backfill_tag_index" call.

func (*BackfillTagIndexCall) Fields Uses

func (c *BackfillTagIndexCall) Fields(s ...googleapi.Field) *BackfillTagIndexCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BackfillTagIndexCall) Header Uses

func (c *BackfillTagIndexCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type CancelBatchCall Uses

type CancelBatchCall struct {
    // contains filtered or unexported fields
}

func (*CancelBatchCall) Context Uses

func (c *CancelBatchCall) Context(ctx context.Context) *CancelBatchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CancelBatchCall) Do Uses

func (c *CancelBatchCall) Do(opts ...googleapi.CallOption) (*LegacyApiCancelBatchResponseMessage, error)

Do executes the "buildbucket.cancel_batch" call. Exactly one of *LegacyApiCancelBatchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiCancelBatchResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CancelBatchCall) Fields Uses

func (c *CancelBatchCall) Fields(s ...googleapi.Field) *CancelBatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CancelBatchCall) Header Uses

func (c *CancelBatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type CancelCall Uses

type CancelCall struct {
    // contains filtered or unexported fields
}

func (*CancelCall) Context Uses

func (c *CancelCall) Context(ctx context.Context) *CancelCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CancelCall) Do Uses

func (c *CancelCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)

Do executes the "buildbucket.cancel" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CancelCall) Fields Uses

func (c *CancelCall) Fields(s ...googleapi.Field) *CancelCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CancelCall) Header Uses

func (c *CancelCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type DeleteManyBuildsCall Uses

type DeleteManyBuildsCall struct {
    // contains filtered or unexported fields
}

func (*DeleteManyBuildsCall) Context Uses

func (c *DeleteManyBuildsCall) Context(ctx context.Context) *DeleteManyBuildsCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DeleteManyBuildsCall) CreatedBy Uses

func (c *DeleteManyBuildsCall) CreatedBy(createdBy string) *DeleteManyBuildsCall

CreatedBy sets the optional parameter "created_by":

func (*DeleteManyBuildsCall) Do Uses

func (c *DeleteManyBuildsCall) Do(opts ...googleapi.CallOption) (*LegacyApiDeleteManyBuildsResponse, error)

Do executes the "buildbucket.delete_many_builds" call. Exactly one of *LegacyApiDeleteManyBuildsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiDeleteManyBuildsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DeleteManyBuildsCall) Fields Uses

func (c *DeleteManyBuildsCall) Fields(s ...googleapi.Field) *DeleteManyBuildsCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DeleteManyBuildsCall) Header Uses

func (c *DeleteManyBuildsCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*DeleteManyBuildsCall) Tag Uses

func (c *DeleteManyBuildsCall) Tag(tag ...string) *DeleteManyBuildsCall

Tag sets the optional parameter "tag":

type FailCall Uses

type FailCall struct {
    // contains filtered or unexported fields
}

func (*FailCall) Context Uses

func (c *FailCall) Context(ctx context.Context) *FailCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FailCall) Do Uses

func (c *FailCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)

Do executes the "buildbucket.fail" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*FailCall) Fields Uses

func (c *FailCall) Fields(s ...googleapi.Field) *FailCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*FailCall) Header Uses

func (c *FailCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type FixBuildsCall Uses

type FixBuildsCall struct {
    // contains filtered or unexported fields
}

func (*FixBuildsCall) Context Uses

func (c *FixBuildsCall) Context(ctx context.Context) *FixBuildsCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FixBuildsCall) Do Uses

func (c *FixBuildsCall) Do(opts ...googleapi.CallOption) error

Do executes the "buildbucket.fix_builds" call.

func (*FixBuildsCall) Fields Uses

func (c *FixBuildsCall) Fields(s ...googleapi.Field) *FixBuildsCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*FixBuildsCall) Header Uses

func (c *FixBuildsCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type GetBucketCall Uses

type GetBucketCall struct {
    // contains filtered or unexported fields
}

func (*GetBucketCall) Context Uses

func (c *GetBucketCall) Context(ctx context.Context) *GetBucketCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*GetBucketCall) Do Uses

func (c *GetBucketCall) Do(opts ...googleapi.CallOption) (*LegacyApiBucketMessage, error)

Do executes the "buildbucket.get_bucket" call. Exactly one of *LegacyApiBucketMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBucketMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*GetBucketCall) Fields Uses

func (c *GetBucketCall) Fields(s ...googleapi.Field) *GetBucketCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*GetBucketCall) Header Uses

func (c *GetBucketCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*GetBucketCall) IfNoneMatch Uses

func (c *GetBucketCall) IfNoneMatch(entityTag string) *GetBucketCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type GetCall Uses

type GetCall struct {
    // contains filtered or unexported fields
}

func (*GetCall) Context Uses

func (c *GetCall) Context(ctx context.Context) *GetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*GetCall) Do Uses

func (c *GetCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)

Do executes the "buildbucket.get" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*GetCall) Fields Uses

func (c *GetCall) Fields(s ...googleapi.Field) *GetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*GetCall) Header Uses

func (c *GetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*GetCall) IfNoneMatch Uses

func (c *GetCall) IfNoneMatch(entityTag string) *GetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type HeartbeatBatchCall Uses

type HeartbeatBatchCall struct {
    // contains filtered or unexported fields
}

func (*HeartbeatBatchCall) Context Uses

func (c *HeartbeatBatchCall) Context(ctx context.Context) *HeartbeatBatchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*HeartbeatBatchCall) Do Uses

func (c *HeartbeatBatchCall) Do(opts ...googleapi.CallOption) (*LegacyApiHeartbeatBatchResponseMessage, error)

Do executes the "buildbucket.heartbeat_batch" call. Exactly one of *LegacyApiHeartbeatBatchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiHeartbeatBatchResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*HeartbeatBatchCall) Fields Uses

func (c *HeartbeatBatchCall) Fields(s ...googleapi.Field) *HeartbeatBatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*HeartbeatBatchCall) Header Uses

func (c *HeartbeatBatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type HeartbeatCall Uses

type HeartbeatCall struct {
    // contains filtered or unexported fields
}

func (*HeartbeatCall) Context Uses

func (c *HeartbeatCall) Context(ctx context.Context) *HeartbeatCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*HeartbeatCall) Do Uses

func (c *HeartbeatCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)

Do executes the "buildbucket.heartbeat" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*HeartbeatCall) Fields Uses

func (c *HeartbeatCall) Fields(s ...googleapi.Field) *HeartbeatCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*HeartbeatCall) Header Uses

func (c *HeartbeatCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type LeaseCall Uses

type LeaseCall struct {
    // contains filtered or unexported fields
}

func (*LeaseCall) Context Uses

func (c *LeaseCall) Context(ctx context.Context) *LeaseCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LeaseCall) Do Uses

func (c *LeaseCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)

Do executes the "buildbucket.lease" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LeaseCall) Fields Uses

func (c *LeaseCall) Fields(s ...googleapi.Field) *LeaseCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LeaseCall) Header Uses

func (c *LeaseCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type LegacyApiBucketMessage Uses

type LegacyApiBucketMessage struct {
    ConfigFileContent string `json:"config_file_content,omitempty"`

    ConfigFileRev string `json:"config_file_rev,omitempty"`

    ConfigFileUrl string `json:"config_file_url,omitempty"`

    Error *LegacyApiErrorMessage `json:"error,omitempty"`

    Name string `json:"name,omitempty"`

    ProjectId string `json:"project_id,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "ConfigFileContent")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "ConfigFileContent") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiBucketMessage) MarshalJSON Uses

func (s *LegacyApiBucketMessage) MarshalJSON() ([]byte, error)

type LegacyApiBuildResponseMessage Uses

type LegacyApiBuildResponseMessage struct {
    // Build: Describes model.Build, see its docstring.
    Build *LegacyApiCommonBuildMessage `json:"build,omitempty"`

    Error *LegacyApiErrorMessage `json:"error,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Build") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Build") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiBuildResponseMessage) MarshalJSON Uses

func (s *LegacyApiBuildResponseMessage) MarshalJSON() ([]byte, error)

type LegacyApiCancelBatchRequestMessage Uses

type LegacyApiCancelBatchRequestMessage struct {
    BuildIds googleapi.Int64s `json:"build_ids,omitempty"`

    ResultDetailsJson string `json:"result_details_json,omitempty"`

    // ForceSendFields is a list of field names (e.g. "BuildIds") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "BuildIds") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiCancelBatchRequestMessage) MarshalJSON Uses

func (s *LegacyApiCancelBatchRequestMessage) MarshalJSON() ([]byte, error)

type LegacyApiCancelBatchResponseMessage Uses

type LegacyApiCancelBatchResponseMessage struct {
    Error *LegacyApiErrorMessage `json:"error,omitempty"`

    Results []*LegacyApiCancelBatchResponseMessageOneResult `json:"results,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Error") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Error") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiCancelBatchResponseMessage) MarshalJSON Uses

func (s *LegacyApiCancelBatchResponseMessage) MarshalJSON() ([]byte, error)

type LegacyApiCancelBatchResponseMessageOneResult Uses

type LegacyApiCancelBatchResponseMessageOneResult struct {
    // Build: Describes model.Build, see its docstring.
    Build *LegacyApiCommonBuildMessage `json:"build,omitempty"`

    BuildId int64 `json:"build_id,omitempty,string"`

    Error *LegacyApiErrorMessage `json:"error,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Build") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Build") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiCancelBatchResponseMessageOneResult) MarshalJSON Uses

func (s *LegacyApiCancelBatchResponseMessageOneResult) MarshalJSON() ([]byte, error)

type LegacyApiCancelRequestBodyMessage Uses

type LegacyApiCancelRequestBodyMessage struct {
    ResultDetailsJson string `json:"result_details_json,omitempty"`

    // ForceSendFields is a list of field names (e.g. "ResultDetailsJson")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "ResultDetailsJson") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiCancelRequestBodyMessage) MarshalJSON Uses

func (s *LegacyApiCancelRequestBodyMessage) MarshalJSON() ([]byte, error)

type LegacyApiCommonBuildMessage Uses

type LegacyApiCommonBuildMessage struct {
    Bucket string `json:"bucket,omitempty"`

    Canary bool `json:"canary,omitempty"`

    // Possible values:
    //   "AUTO"
    //   "CANARY"
    //   "PROD"
    CanaryPreference string `json:"canary_preference,omitempty"`

    // Possible values:
    //   "CANCELED_EXPLICITLY"
    //   "TIMEOUT"
    CancelationReason string `json:"cancelation_reason,omitempty"`

    CompletedTs int64 `json:"completed_ts,omitempty,string"`

    CreatedBy string `json:"created_by,omitempty"`

    CreatedTs int64 `json:"created_ts,omitempty,string"`

    Experimental bool `json:"experimental,omitempty"`

    // Possible values:
    //   "BUILDBUCKET_FAILURE"
    //   "BUILD_FAILURE"
    //   "INFRA_FAILURE"
    //   "INVALID_BUILD_DEFINITION"
    FailureReason string `json:"failure_reason,omitempty"`

    Id  int64 `json:"id,omitempty,string"`

    LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

    LeaseKey int64 `json:"lease_key,omitempty,string"`

    ParametersJson string `json:"parameters_json,omitempty"`

    Project string `json:"project,omitempty"`

    // Possible values:
    //   "CANCELED"
    //   "FAILURE"
    //   "SUCCESS"
    Result string `json:"result,omitempty"`

    ResultDetailsJson string `json:"result_details_json,omitempty"`

    RetryOf int64 `json:"retry_of,omitempty,string"`

    ServiceAccount string `json:"service_account,omitempty"`

    StartedTs int64 `json:"started_ts,omitempty,string"`

    // Possible values:
    //   "COMPLETED"
    //   "SCHEDULED"
    //   "STARTED"
    Status string `json:"status,omitempty"`

    StatusChangedTs int64 `json:"status_changed_ts,omitempty,string"`

    Tags []string `json:"tags,omitempty"`

    UpdatedTs int64 `json:"updated_ts,omitempty,string"`

    Url string `json:"url,omitempty"`

    UtcnowTs int64 `json:"utcnow_ts,omitempty,string"`

    // ForceSendFields is a list of field names (e.g. "Bucket") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Bucket") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

LegacyApiCommonBuildMessage: Describes model.Build, see its docstring.

func GetByAddress Uses

func GetByAddress(c context.Context, client *Service, address string) (*LegacyApiCommonBuildMessage, error)

GetByAddress fetches a build by its address. Returns (nil, nil) if build is not found.

func (*LegacyApiCommonBuildMessage) MarshalJSON Uses

func (s *LegacyApiCommonBuildMessage) MarshalJSON() ([]byte, error)

type LegacyApiDeleteManyBuildsResponse Uses

type LegacyApiDeleteManyBuildsResponse struct {
    Error *LegacyApiErrorMessage `json:"error,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Error") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Error") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiDeleteManyBuildsResponse) MarshalJSON Uses

func (s *LegacyApiDeleteManyBuildsResponse) MarshalJSON() ([]byte, error)

type LegacyApiErrorMessage Uses

type LegacyApiErrorMessage struct {
    Message string `json:"message,omitempty"`

    // Possible values:
    //   "BUILDER_NOT_FOUND"
    //   "BUILD_IS_COMPLETED"
    //   "BUILD_NOT_FOUND"
    //   "CANNOT_LEASE_BUILD"
    //   "INVALID_BUILD_STATE"
    //   "INVALID_INPUT"
    //   "LEASE_EXPIRED"
    Reason string `json:"reason,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Message") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Message") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiErrorMessage) MarshalJSON Uses

func (s *LegacyApiErrorMessage) MarshalJSON() ([]byte, error)

type LegacyApiFailRequestBodyMessage Uses

type LegacyApiFailRequestBodyMessage struct {
    // Possible values:
    //   "BUILDBUCKET_FAILURE"
    //   "BUILD_FAILURE"
    //   "INFRA_FAILURE"
    //   "INVALID_BUILD_DEFINITION"
    FailureReason string `json:"failure_reason,omitempty"`

    LeaseKey int64 `json:"lease_key,omitempty,string"`

    NewTags []string `json:"new_tags,omitempty"`

    ResultDetailsJson string `json:"result_details_json,omitempty"`

    Url string `json:"url,omitempty"`

    // ForceSendFields is a list of field names (e.g. "FailureReason") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "FailureReason") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiFailRequestBodyMessage) MarshalJSON Uses

func (s *LegacyApiFailRequestBodyMessage) MarshalJSON() ([]byte, error)

type LegacyApiHeartbeatBatchRequestMessage Uses

type LegacyApiHeartbeatBatchRequestMessage struct {
    Heartbeats []*LegacyApiHeartbeatBatchRequestMessageOneHeartbeat `json:"heartbeats,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Heartbeats") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Heartbeats") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiHeartbeatBatchRequestMessage) MarshalJSON Uses

func (s *LegacyApiHeartbeatBatchRequestMessage) MarshalJSON() ([]byte, error)

type LegacyApiHeartbeatBatchRequestMessageOneHeartbeat Uses

type LegacyApiHeartbeatBatchRequestMessageOneHeartbeat struct {
    BuildId int64 `json:"build_id,omitempty,string"`

    LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

    LeaseKey int64 `json:"lease_key,omitempty,string"`

    // ForceSendFields is a list of field names (e.g. "BuildId") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "BuildId") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiHeartbeatBatchRequestMessageOneHeartbeat) MarshalJSON Uses

func (s *LegacyApiHeartbeatBatchRequestMessageOneHeartbeat) MarshalJSON() ([]byte, error)

type LegacyApiHeartbeatBatchResponseMessage Uses

type LegacyApiHeartbeatBatchResponseMessage struct {
    Error *LegacyApiErrorMessage `json:"error,omitempty"`

    Results []*LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult `json:"results,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Error") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Error") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiHeartbeatBatchResponseMessage) MarshalJSON Uses

func (s *LegacyApiHeartbeatBatchResponseMessage) MarshalJSON() ([]byte, error)

type LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult Uses

type LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult struct {
    BuildId int64 `json:"build_id,omitempty,string"`

    Error *LegacyApiErrorMessage `json:"error,omitempty"`

    LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

    // ForceSendFields is a list of field names (e.g. "BuildId") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "BuildId") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult) MarshalJSON Uses

func (s *LegacyApiHeartbeatBatchResponseMessageOneHeartbeatResult) MarshalJSON() ([]byte, error)

type LegacyApiHeartbeatRequestBodyMessage Uses

type LegacyApiHeartbeatRequestBodyMessage struct {
    LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

    LeaseKey int64 `json:"lease_key,omitempty,string"`

    // ForceSendFields is a list of field names (e.g. "LeaseExpirationTs")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "LeaseExpirationTs") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiHeartbeatRequestBodyMessage) MarshalJSON Uses

func (s *LegacyApiHeartbeatRequestBodyMessage) MarshalJSON() ([]byte, error)

type LegacyApiLeaseRequestBodyMessage Uses

type LegacyApiLeaseRequestBodyMessage struct {
    LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

    // ForceSendFields is a list of field names (e.g. "LeaseExpirationTs")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "LeaseExpirationTs") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiLeaseRequestBodyMessage) MarshalJSON Uses

func (s *LegacyApiLeaseRequestBodyMessage) MarshalJSON() ([]byte, error)

type LegacyApiPauseResponse Uses

type LegacyApiPauseResponse struct {
    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`
}

type LegacyApiPubSubCallbackMessage Uses

type LegacyApiPubSubCallbackMessage struct {
    AuthToken string `json:"auth_token,omitempty"`

    Topic string `json:"topic,omitempty"`

    UserData string `json:"user_data,omitempty"`

    // ForceSendFields is a list of field names (e.g. "AuthToken") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "AuthToken") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiPubSubCallbackMessage) MarshalJSON Uses

func (s *LegacyApiPubSubCallbackMessage) MarshalJSON() ([]byte, error)

type LegacyApiPutBatchRequestMessage Uses

type LegacyApiPutBatchRequestMessage struct {
    Builds []*LegacyApiPutRequestMessage `json:"builds,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Builds") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Builds") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiPutBatchRequestMessage) MarshalJSON Uses

func (s *LegacyApiPutBatchRequestMessage) MarshalJSON() ([]byte, error)

type LegacyApiPutBatchResponseMessage Uses

type LegacyApiPutBatchResponseMessage struct {
    Error *LegacyApiErrorMessage `json:"error,omitempty"`

    Results []*LegacyApiPutBatchResponseMessageOneResult `json:"results,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Error") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Error") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiPutBatchResponseMessage) MarshalJSON Uses

func (s *LegacyApiPutBatchResponseMessage) MarshalJSON() ([]byte, error)

type LegacyApiPutBatchResponseMessageOneResult Uses

type LegacyApiPutBatchResponseMessageOneResult struct {
    // Build: Describes model.Build, see its docstring.
    Build *LegacyApiCommonBuildMessage `json:"build,omitempty"`

    ClientOperationId string `json:"client_operation_id,omitempty"`

    Error *LegacyApiErrorMessage `json:"error,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Build") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Build") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiPutBatchResponseMessageOneResult) MarshalJSON Uses

func (s *LegacyApiPutBatchResponseMessageOneResult) MarshalJSON() ([]byte, error)

type LegacyApiPutRequestMessage Uses

type LegacyApiPutRequestMessage struct {
    Bucket string `json:"bucket,omitempty"`

    // Possible values:
    //   "AUTO"
    //   "CANARY"
    //   "PROD"
    CanaryPreference string `json:"canary_preference,omitempty"`

    ClientOperationId string `json:"client_operation_id,omitempty"`

    Experimental bool `json:"experimental,omitempty"`

    LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

    ParametersJson string `json:"parameters_json,omitempty"`

    PubsubCallback *LegacyApiPubSubCallbackMessage `json:"pubsub_callback,omitempty"`

    Tags []string `json:"tags,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Bucket") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Bucket") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiPutRequestMessage) MarshalJSON Uses

func (s *LegacyApiPutRequestMessage) MarshalJSON() ([]byte, error)

type LegacyApiRetryRequestMessage Uses

type LegacyApiRetryRequestMessage struct {
    ClientOperationId string `json:"client_operation_id,omitempty"`

    LeaseExpirationTs int64 `json:"lease_expiration_ts,omitempty,string"`

    PubsubCallback *LegacyApiPubSubCallbackMessage `json:"pubsub_callback,omitempty"`

    // ForceSendFields is a list of field names (e.g. "ClientOperationId")
    // to unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "ClientOperationId") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiRetryRequestMessage) MarshalJSON Uses

func (s *LegacyApiRetryRequestMessage) MarshalJSON() ([]byte, error)

type LegacyApiSearchResponseMessage Uses

type LegacyApiSearchResponseMessage struct {
    // Builds: Describes model.Build, see its docstring.
    Builds []*LegacyApiCommonBuildMessage `json:"builds,omitempty"`

    Error *LegacyApiErrorMessage `json:"error,omitempty"`

    NextCursor string `json:"next_cursor,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Builds") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Builds") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiSearchResponseMessage) MarshalJSON Uses

func (s *LegacyApiSearchResponseMessage) MarshalJSON() ([]byte, error)

type LegacyApiStartRequestBodyMessage Uses

type LegacyApiStartRequestBodyMessage struct {
    LeaseKey int64 `json:"lease_key,omitempty,string"`

    Url string `json:"url,omitempty"`

    // ForceSendFields is a list of field names (e.g. "LeaseKey") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "LeaseKey") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiStartRequestBodyMessage) MarshalJSON Uses

func (s *LegacyApiStartRequestBodyMessage) MarshalJSON() ([]byte, error)

type LegacyApiSucceedRequestBodyMessage Uses

type LegacyApiSucceedRequestBodyMessage struct {
    LeaseKey int64 `json:"lease_key,omitempty,string"`

    NewTags []string `json:"new_tags,omitempty"`

    ResultDetailsJson string `json:"result_details_json,omitempty"`

    Url string `json:"url,omitempty"`

    // ForceSendFields is a list of field names (e.g. "LeaseKey") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "LeaseKey") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*LegacyApiSucceedRequestBodyMessage) MarshalJSON Uses

func (s *LegacyApiSucceedRequestBodyMessage) MarshalJSON() ([]byte, error)

type PauseCall Uses

type PauseCall struct {
    // contains filtered or unexported fields
}

func (*PauseCall) Context Uses

func (c *PauseCall) Context(ctx context.Context) *PauseCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PauseCall) Do Uses

func (c *PauseCall) Do(opts ...googleapi.CallOption) (*LegacyApiPauseResponse, error)

Do executes the "buildbucket.pause" call. Exactly one of *LegacyApiPauseResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiPauseResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PauseCall) Fields Uses

func (c *PauseCall) Fields(s ...googleapi.Field) *PauseCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PauseCall) Header Uses

func (c *PauseCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type PeekCall Uses

type PeekCall struct {
    // contains filtered or unexported fields
}

func (*PeekCall) Bucket Uses

func (c *PeekCall) Bucket(bucket ...string) *PeekCall

Bucket sets the optional parameter "bucket":

func (*PeekCall) Context Uses

func (c *PeekCall) Context(ctx context.Context) *PeekCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PeekCall) Do Uses

func (c *PeekCall) Do(opts ...googleapi.CallOption) (*LegacyApiSearchResponseMessage, error)

Do executes the "buildbucket.peek" call. Exactly one of *LegacyApiSearchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiSearchResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeekCall) Fields Uses

func (c *PeekCall) Fields(s ...googleapi.Field) *PeekCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PeekCall) Header Uses

func (c *PeekCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*PeekCall) IfNoneMatch Uses

func (c *PeekCall) IfNoneMatch(entityTag string) *PeekCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*PeekCall) MaxBuilds Uses

func (c *PeekCall) MaxBuilds(maxBuilds int64) *PeekCall

MaxBuilds sets the optional parameter "max_builds":

func (*PeekCall) StartCursor Uses

func (c *PeekCall) StartCursor(startCursor string) *PeekCall

StartCursor sets the optional parameter "start_cursor":

type PutBatchCall Uses

type PutBatchCall struct {
    // contains filtered or unexported fields
}

func (*PutBatchCall) Context Uses

func (c *PutBatchCall) Context(ctx context.Context) *PutBatchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PutBatchCall) Do Uses

func (c *PutBatchCall) Do(opts ...googleapi.CallOption) (*LegacyApiPutBatchResponseMessage, error)

Do executes the "buildbucket.put_batch" call. Exactly one of *LegacyApiPutBatchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiPutBatchResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PutBatchCall) Fields Uses

func (c *PutBatchCall) Fields(s ...googleapi.Field) *PutBatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PutBatchCall) Header Uses

func (c *PutBatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type PutCall Uses

type PutCall struct {
    // contains filtered or unexported fields
}

func (*PutCall) Context Uses

func (c *PutCall) Context(ctx context.Context) *PutCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PutCall) Do Uses

func (c *PutCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)

Do executes the "buildbucket.put" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PutCall) Fields Uses

func (c *PutCall) Fields(s ...googleapi.Field) *PutCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PutCall) Header Uses

func (c *PutCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type ResetCall Uses

type ResetCall struct {
    // contains filtered or unexported fields
}

func (*ResetCall) Context Uses

func (c *ResetCall) Context(ctx context.Context) *ResetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ResetCall) Do Uses

func (c *ResetCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)

Do executes the "buildbucket.reset" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ResetCall) Fields Uses

func (c *ResetCall) Fields(s ...googleapi.Field) *ResetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ResetCall) Header Uses

func (c *ResetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type RetryCall Uses

type RetryCall struct {
    // contains filtered or unexported fields
}

func (*RetryCall) Context Uses

func (c *RetryCall) Context(ctx context.Context) *RetryCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*RetryCall) Do Uses

func (c *RetryCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)

Do executes the "buildbucket.retry" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*RetryCall) Fields Uses

func (c *RetryCall) Fields(s ...googleapi.Field) *RetryCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*RetryCall) Header Uses

func (c *RetryCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SearchCall Uses

type SearchCall struct {
    // contains filtered or unexported fields
}

func (*SearchCall) Bucket Uses

func (c *SearchCall) Bucket(bucket ...string) *SearchCall

Bucket sets the optional parameter "bucket":

func (*SearchCall) Canary Uses

func (c *SearchCall) Canary(canary bool) *SearchCall

Canary sets the optional parameter "canary":

func (*SearchCall) CancelationReason Uses

func (c *SearchCall) CancelationReason(cancelationReason string) *SearchCall

CancelationReason sets the optional parameter "cancelation_reason":

Possible values:

"CANCELED_EXPLICITLY"
"TIMEOUT"

func (*SearchCall) Context Uses

func (c *SearchCall) Context(ctx context.Context) *SearchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SearchCall) CreatedBy Uses

func (c *SearchCall) CreatedBy(createdBy string) *SearchCall

CreatedBy sets the optional parameter "created_by":

func (*SearchCall) CreationTsHigh Uses

func (c *SearchCall) CreationTsHigh(creationTsHigh int64) *SearchCall

CreationTsHigh sets the optional parameter "creation_ts_high":

func (*SearchCall) CreationTsLow Uses

func (c *SearchCall) CreationTsLow(creationTsLow int64) *SearchCall

CreationTsLow sets the optional parameter "creation_ts_low":

func (*SearchCall) Do Uses

func (c *SearchCall) Do(opts ...googleapi.CallOption) (*LegacyApiSearchResponseMessage, error)

Do executes the "buildbucket.search" call. Exactly one of *LegacyApiSearchResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiSearchResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SearchCall) FailureReason Uses

func (c *SearchCall) FailureReason(failureReason string) *SearchCall

FailureReason sets the optional parameter "failure_reason":

Possible values:

"BUILDBUCKET_FAILURE"
"BUILD_FAILURE"
"INFRA_FAILURE"
"INVALID_BUILD_DEFINITION"

func (*SearchCall) Fetch Uses

func (c *SearchCall) Fetch(limit int, ret retry.Factory) ([]*LegacyApiCommonBuildMessage, string, error)

Fetch fetches builds matching the search criteria. It stops when all builds are found or when context is cancelled. The order of returned builds is from most-recently-created to least-recently-created.

c.MaxBuilds value is used as a result page size, defaults to 100. limit, if >0, specifies the maximum number of builds to return.

If ret is nil, retries transient errors with exponential back-off. Logs errors on retries.

Returns nil only if the search results are exhausted. May return context.Canceled.

func (*SearchCall) Fields Uses

func (c *SearchCall) Fields(s ...googleapi.Field) *SearchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SearchCall) Header Uses

func (c *SearchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SearchCall) IfNoneMatch Uses

func (c *SearchCall) IfNoneMatch(entityTag string) *SearchCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*SearchCall) IncludeExperimental Uses

func (c *SearchCall) IncludeExperimental(includeExperimental bool) *SearchCall

IncludeExperimental sets the optional parameter "include_experimental":

func (*SearchCall) MaxBuilds Uses

func (c *SearchCall) MaxBuilds(maxBuilds int64) *SearchCall

MaxBuilds sets the optional parameter "max_builds":

func (*SearchCall) Result Uses

func (c *SearchCall) Result(result string) *SearchCall

Result sets the optional parameter "result":

Possible values:

"CANCELED"
"FAILURE"
"SUCCESS"

func (*SearchCall) RetryOf Uses

func (c *SearchCall) RetryOf(retryOf int64) *SearchCall

RetryOf sets the optional parameter "retry_of":

func (*SearchCall) Run Uses

func (c *SearchCall) Run(builds chan<- *LegacyApiCommonBuildMessage, limit int, ret retry.Factory) (cursor string, err error)

Run is like Fetch, but sends results to a channel and the default page size is defined by the server (10 as of Sep 2017).

Run blocks on sending.

func (*SearchCall) StartCursor Uses

func (c *SearchCall) StartCursor(startCursor string) *SearchCall

StartCursor sets the optional parameter "start_cursor":

func (*SearchCall) Status Uses

func (c *SearchCall) Status(status string) *SearchCall

Status sets the optional parameter "status":

Possible values:

"COMPLETED"
"INCOMPLETE"
"SCHEDULED"
"STARTED"

func (*SearchCall) Tag Uses

func (c *SearchCall) Tag(tag ...string) *SearchCall

Tag sets the optional parameter "tag":

type Service Uses

type Service struct {
    BasePath  string // API endpoint base URL
    UserAgent string // optional additional User-Agent fragment
    // contains filtered or unexported fields
}

func New Uses

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService Uses

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

func (*Service) BackfillTagIndex Uses

func (s *Service) BackfillTagIndex(tagKey string) *BackfillTagIndexCall

BackfillTagIndex: Backfills TagIndex entities from builds.

func (*Service) Cancel Uses

func (s *Service) Cancel(id int64, legacyapicancelrequestbodymessage *LegacyApiCancelRequestBodyMessage) *CancelCall

Cancel: Cancels a build.

func (*Service) CancelBatch Uses

func (s *Service) CancelBatch(legacyapicancelbatchrequestmessage *LegacyApiCancelBatchRequestMessage) *CancelBatchCall

CancelBatch: Cancels builds.

func (*Service) DeleteManyBuilds Uses

func (s *Service) DeleteManyBuilds(bucket string, status string) *DeleteManyBuildsCall

DeleteManyBuilds: Deletes scheduled or started builds in a bucket.

func (*Service) Fail Uses

func (s *Service) Fail(id int64, legacyapifailrequestbodymessage *LegacyApiFailRequestBodyMessage) *FailCall

Fail: Marks a build as failed.

func (*Service) FixBuilds Uses

func (s *Service) FixBuilds() *FixBuildsCall

FixBuilds: Fixes all builds.

func (*Service) Get Uses

func (s *Service) Get(id int64) *GetCall

Get: Returns a build by id.

func (*Service) GetBucket Uses

func (s *Service) GetBucket(bucket string) *GetBucketCall

GetBucket: Returns bucket information.

func (*Service) Heartbeat Uses

func (s *Service) Heartbeat(id int64, legacyapiheartbeatrequestbodymessage *LegacyApiHeartbeatRequestBodyMessage) *HeartbeatCall

Heartbeat: Updates build lease.

func (*Service) HeartbeatBatch Uses

func (s *Service) HeartbeatBatch(legacyapiheartbeatbatchrequestmessage *LegacyApiHeartbeatBatchRequestMessage) *HeartbeatBatchCall

HeartbeatBatch: Updates multiple build leases.

func (*Service) Lease Uses

func (s *Service) Lease(id int64, legacyapileaserequestbodymessage *LegacyApiLeaseRequestBodyMessage) *LeaseCall

Lease: Leases a build. Response may contain an error.

func (*Service) Pause Uses

func (s *Service) Pause(bucket string, isPaused bool) *PauseCall

Pause: Pauses or unpause a bucket.

func (*Service) Peek Uses

func (s *Service) Peek() *PeekCall

Peek: Returns available builds.

func (*Service) Put Uses

func (s *Service) Put(legacyapiputrequestmessage *LegacyApiPutRequestMessage) *PutCall

Put: Creates a new build.

func (*Service) PutBatch Uses

func (s *Service) PutBatch(legacyapiputbatchrequestmessage *LegacyApiPutBatchRequestMessage) *PutBatchCall

PutBatch: Creates builds.

func (*Service) Reset Uses

func (s *Service) Reset(id int64) *ResetCall

Reset: Forcibly unleases a build and resets its state to SCHEDULED.

func (*Service) Retry Uses

func (s *Service) Retry(id int64, legacyapiretryrequestmessage *LegacyApiRetryRequestMessage) *RetryCall

Retry: Retries an existing build.

func (*Service) Search Uses

func (s *Service) Search() *SearchCall

Search: Searches for builds.

func (*Service) Start Uses

func (s *Service) Start(id int64, legacyapistartrequestbodymessage *LegacyApiStartRequestBodyMessage) *StartCall

Start: Marks a build as started.

func (*Service) Succeed Uses

func (s *Service) Succeed(id int64, legacyapisucceedrequestbodymessage *LegacyApiSucceedRequestBodyMessage) *SucceedCall

Succeed: Marks a build as succeeded.

type StartCall Uses

type StartCall struct {
    // contains filtered or unexported fields
}

func (*StartCall) Context Uses

func (c *StartCall) Context(ctx context.Context) *StartCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*StartCall) Do Uses

func (c *StartCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)

Do executes the "buildbucket.start" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*StartCall) Fields Uses

func (c *StartCall) Fields(s ...googleapi.Field) *StartCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*StartCall) Header Uses

func (c *StartCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SucceedCall Uses

type SucceedCall struct {
    // contains filtered or unexported fields
}

func (*SucceedCall) Context Uses

func (c *SucceedCall) Context(ctx context.Context) *SucceedCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SucceedCall) Do Uses

func (c *SucceedCall) Do(opts ...googleapi.CallOption) (*LegacyApiBuildResponseMessage, error)

Do executes the "buildbucket.succeed" call. Exactly one of *LegacyApiBuildResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LegacyApiBuildResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SucceedCall) Fields Uses

func (c *SucceedCall) Fields(s ...googleapi.Field) *SucceedCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SucceedCall) Header Uses

func (c *SucceedCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

Package buildbucket imports 20 packages (graph) and is imported by 20 packages. Updated 2019-10-14. Refresh now. Tools for package owners.