Class BuildTrigger.Builder (3.55.0)

public static final class BuildTrigger.Builder extends GeneratedMessageV3.Builder<BuildTrigger.Builder> implements BuildTriggerOrBuilder

Configuration for an automated build in response to source repository changes.

Protobuf type google.devtools.cloudbuild.v1.BuildTrigger

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllIgnoredFiles(Iterable<String> values)

public BuildTrigger.Builder addAllIgnoredFiles(Iterable<String> values)

ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**".

If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build.

If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.

repeated string ignored_files = 15;

Parameter
Name Description
values Iterable<String>

The ignoredFiles to add.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

addAllIncludedFiles(Iterable<String> values)

public BuildTrigger.Builder addAllIncludedFiles(Iterable<String> values)

If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build.

If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.

repeated string included_files = 16;

Parameter
Name Description
values Iterable<String>

The includedFiles to add.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

addAllTags(Iterable<String> values)

public BuildTrigger.Builder addAllTags(Iterable<String> values)

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Parameter
Name Description
values Iterable<String>

The tags to add.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

addIgnoredFiles(String value)

public BuildTrigger.Builder addIgnoredFiles(String value)

ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**".

If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build.

If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.

repeated string ignored_files = 15;

Parameter
Name Description
value String

The ignoredFiles to add.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

addIgnoredFilesBytes(ByteString value)

public BuildTrigger.Builder addIgnoredFilesBytes(ByteString value)

ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**".

If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build.

If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.

repeated string ignored_files = 15;

Parameter
Name Description
value ByteString

The bytes of the ignoredFiles to add.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

addIncludedFiles(String value)

public BuildTrigger.Builder addIncludedFiles(String value)

If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build.

If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.

repeated string included_files = 16;

Parameter
Name Description
value String

The includedFiles to add.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

addIncludedFilesBytes(ByteString value)

public BuildTrigger.Builder addIncludedFilesBytes(ByteString value)

If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build.

If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.

repeated string included_files = 16;

Parameter
Name Description
value ByteString

The bytes of the includedFiles to add.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BuildTrigger.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BuildTrigger.Builder
Overrides

addTags(String value)

public BuildTrigger.Builder addTags(String value)

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Parameter
Name Description
value String

The tags to add.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

addTagsBytes(ByteString value)

public BuildTrigger.Builder addTagsBytes(ByteString value)

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Parameter
Name Description
value ByteString

The bytes of the tags to add.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

build()

public BuildTrigger build()
Returns
Type Description
BuildTrigger

buildPartial()

public BuildTrigger buildPartial()
Returns
Type Description
BuildTrigger

clear()

public BuildTrigger.Builder clear()
Returns
Type Description
BuildTrigger.Builder
Overrides

clearAutodetect()

public BuildTrigger.Builder clearAutodetect()

Autodetect build configuration. The following precedence is used (case insensitive):

  1. cloudbuild.yaml
  2. cloudbuild.yml
  3. cloudbuild.json
  4. Dockerfile

    Currently only available for GitHub App Triggers.

bool autodetect = 18;

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearBuild()

public BuildTrigger.Builder clearBuild()

Contents of the build template.

.google.devtools.cloudbuild.v1.Build build = 4;

Returns
Type Description
BuildTrigger.Builder

clearBuildTemplate()

public BuildTrigger.Builder clearBuildTemplate()
Returns
Type Description
BuildTrigger.Builder

clearCreateTime()

public BuildTrigger.Builder clearCreateTime()

Output only. Time when the trigger was created.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BuildTrigger.Builder

clearDescription()

public BuildTrigger.Builder clearDescription()

Human-readable description of this trigger.

string description = 10;

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearDisabled()

public BuildTrigger.Builder clearDisabled()

If true, the trigger will never automatically execute a build.

bool disabled = 9;

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BuildTrigger.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BuildTrigger.Builder
Overrides

clearFilename()

public BuildTrigger.Builder clearFilename()

Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

string filename = 8;

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearFilter()

public BuildTrigger.Builder clearFilter()

Optional. A Common Expression Language string.

string filter = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearGitFileSource()

public BuildTrigger.Builder clearGitFileSource()

The file source describing the local or remote Build template.

.google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24;

Returns
Type Description
BuildTrigger.Builder

clearGithub()

public BuildTrigger.Builder clearGithub()

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.

Mutually exclusive with trigger_template.

.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;

Returns
Type Description
BuildTrigger.Builder

clearId()

public BuildTrigger.Builder clearId()

Output only. Unique identifier of the trigger.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearIgnoredFiles()

public BuildTrigger.Builder clearIgnoredFiles()

ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**".

If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build.

If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.

repeated string ignored_files = 15;

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearIncludedFiles()

public BuildTrigger.Builder clearIncludedFiles()

If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build.

If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.

repeated string included_files = 16;

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearName()

public BuildTrigger.Builder clearName()

User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements:

  • They must contain only alphanumeric characters and dashes.
  • They can be 1-64 characters long.
  • They must begin and end with an alphanumeric character.

string name = 21;

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public BuildTrigger.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BuildTrigger.Builder
Overrides

clearPubsubConfig()

public BuildTrigger.Builder clearPubsubConfig()

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;

Returns
Type Description
BuildTrigger.Builder

clearRepositoryEventConfig()

public BuildTrigger.Builder clearRepositoryEventConfig()

The configuration of a trigger that creates a build whenever an event from Repo API is received.

.google.devtools.cloudbuild.v1.RepositoryEventConfig repository_event_config = 39;

Returns
Type Description
BuildTrigger.Builder

clearResourceName()

public BuildTrigger.Builder clearResourceName()

The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.

string resource_name = 34;

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearServiceAccount()

public BuildTrigger.Builder clearServiceAccount()

The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}

string service_account = 33 [(.google.api.resource_reference) = { ... }

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearSourceToBuild()

public BuildTrigger.Builder clearSourceToBuild()

The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.

.google.devtools.cloudbuild.v1.GitRepoSource source_to_build = 26;

Returns
Type Description
BuildTrigger.Builder

clearSubstitutions()

public BuildTrigger.Builder clearSubstitutions()
Returns
Type Description
BuildTrigger.Builder

clearTags()

public BuildTrigger.Builder clearTags()

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

clearTriggerTemplate()

public BuildTrigger.Builder clearTriggerTemplate()

Template describing the types of source changes to trigger a build.

Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build.

Mutually exclusive with github.

.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;

Returns
Type Description
BuildTrigger.Builder

clearWebhookConfig()

public BuildTrigger.Builder clearWebhookConfig()

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.

.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;

Returns
Type Description
BuildTrigger.Builder

clone()

public BuildTrigger.Builder clone()
Returns
Type Description
BuildTrigger.Builder
Overrides

containsSubstitutions(String key)

public boolean containsSubstitutions(String key)

Substitutions for Build resource. The keys must match the following regular expression: ^[A-Z0-9]+$.

map<string, string> substitutions = 11;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAutodetect()

public boolean getAutodetect()

Autodetect build configuration. The following precedence is used (case insensitive):

  1. cloudbuild.yaml
  2. cloudbuild.yml
  3. cloudbuild.json
  4. Dockerfile

    Currently only available for GitHub App Triggers.

bool autodetect = 18;

Returns
Type Description
boolean

The autodetect.

getBuild()

public Build getBuild()

Contents of the build template.

.google.devtools.cloudbuild.v1.Build build = 4;

Returns
Type Description
Build

The build.

getBuildBuilder()

public Build.Builder getBuildBuilder()

Contents of the build template.

.google.devtools.cloudbuild.v1.Build build = 4;

Returns
Type Description
Build.Builder

getBuildOrBuilder()

public BuildOrBuilder getBuildOrBuilder()

Contents of the build template.

.google.devtools.cloudbuild.v1.Build build = 4;

Returns
Type Description
BuildOrBuilder

getBuildTemplateCase()

public BuildTrigger.BuildTemplateCase getBuildTemplateCase()
Returns
Type Description
BuildTrigger.BuildTemplateCase

getCreateTime()

public Timestamp getCreateTime()

Output only. Time when the trigger was created.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time when the trigger was created.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time when the trigger was created.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public BuildTrigger getDefaultInstanceForType()
Returns
Type Description
BuildTrigger

getDescription()

public String getDescription()

Human-readable description of this trigger.

string description = 10;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Human-readable description of this trigger.

string description = 10;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisabled()

public boolean getDisabled()

If true, the trigger will never automatically execute a build.

bool disabled = 9;

Returns
Type Description
boolean

The disabled.

getFilename()

public String getFilename()

Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

string filename = 8;

Returns
Type Description
String

The filename.

getFilenameBytes()

public ByteString getFilenameBytes()

Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

string filename = 8;

Returns
Type Description
ByteString

The bytes for filename.

getFilter()

public String getFilter()

Optional. A Common Expression Language string.

string filter = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The filter.

getFilterBytes()

public ByteString getFilterBytes()

Optional. A Common Expression Language string.

string filter = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for filter.

getGitFileSource()

public GitFileSource getGitFileSource()

The file source describing the local or remote Build template.

.google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24;

Returns
Type Description
GitFileSource

The gitFileSource.

getGitFileSourceBuilder()

public GitFileSource.Builder getGitFileSourceBuilder()

The file source describing the local or remote Build template.

.google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24;

Returns
Type Description
GitFileSource.Builder

getGitFileSourceOrBuilder()

public GitFileSourceOrBuilder getGitFileSourceOrBuilder()

The file source describing the local or remote Build template.

.google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24;

Returns
Type Description
GitFileSourceOrBuilder

getGithub()

public GitHubEventsConfig getGithub()

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.

Mutually exclusive with trigger_template.

.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;

Returns
Type Description
GitHubEventsConfig

The github.

getGithubBuilder()

public GitHubEventsConfig.Builder getGithubBuilder()

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.

Mutually exclusive with trigger_template.

.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;

Returns
Type Description
GitHubEventsConfig.Builder

getGithubOrBuilder()

public GitHubEventsConfigOrBuilder getGithubOrBuilder()

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.

Mutually exclusive with trigger_template.

.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;

Returns
Type Description
GitHubEventsConfigOrBuilder

getId()

public String getId()

Output only. Unique identifier of the trigger.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

Output only. Unique identifier of the trigger.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for id.

getIgnoredFiles(int index)

public String getIgnoredFiles(int index)

ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**".

If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build.

If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.

repeated string ignored_files = 15;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The ignoredFiles at the given index.

getIgnoredFilesBytes(int index)

public ByteString getIgnoredFilesBytes(int index)

ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**".

If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build.

If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.

repeated string ignored_files = 15;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the ignoredFiles at the given index.

getIgnoredFilesCount()

public int getIgnoredFilesCount()

ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**".

If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build.

If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.

repeated string ignored_files = 15;

Returns
Type Description
int

The count of ignoredFiles.

getIgnoredFilesList()

public ProtocolStringList getIgnoredFilesList()

ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**".

If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build.

If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.

repeated string ignored_files = 15;

Returns
Type Description
ProtocolStringList

A list containing the ignoredFiles.

getIncludedFiles(int index)

public String getIncludedFiles(int index)

If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build.

If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.

repeated string included_files = 16;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The includedFiles at the given index.

getIncludedFilesBytes(int index)

public ByteString getIncludedFilesBytes(int index)

If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build.

If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.

repeated string included_files = 16;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the includedFiles at the given index.

getIncludedFilesCount()

public int getIncludedFilesCount()

If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build.

If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.

repeated string included_files = 16;

Returns
Type Description
int

The count of includedFiles.

getIncludedFilesList()

public ProtocolStringList getIncludedFilesList()

If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build.

If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.

repeated string included_files = 16;

Returns
Type Description
ProtocolStringList

A list containing the includedFiles.

getMutableSubstitutions() (deprecated)

public Map<String,String> getMutableSubstitutions()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements:

  • They must contain only alphanumeric characters and dashes.
  • They can be 1-64 characters long.
  • They must begin and end with an alphanumeric character.

string name = 21;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements:

  • They must contain only alphanumeric characters and dashes.
  • They can be 1-64 characters long.
  • They must begin and end with an alphanumeric character.

string name = 21;

Returns
Type Description
ByteString

The bytes for name.

getPubsubConfig()

public PubsubConfig getPubsubConfig()

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;

Returns
Type Description
PubsubConfig

The pubsubConfig.

getPubsubConfigBuilder()

public PubsubConfig.Builder getPubsubConfigBuilder()

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;

Returns
Type Description
PubsubConfig.Builder

getPubsubConfigOrBuilder()

public PubsubConfigOrBuilder getPubsubConfigOrBuilder()

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;

Returns
Type Description
PubsubConfigOrBuilder

getRepositoryEventConfig()

public RepositoryEventConfig getRepositoryEventConfig()

The configuration of a trigger that creates a build whenever an event from Repo API is received.

.google.devtools.cloudbuild.v1.RepositoryEventConfig repository_event_config = 39;

Returns
Type Description
RepositoryEventConfig

The repositoryEventConfig.

getRepositoryEventConfigBuilder()

public RepositoryEventConfig.Builder getRepositoryEventConfigBuilder()

The configuration of a trigger that creates a build whenever an event from Repo API is received.

.google.devtools.cloudbuild.v1.RepositoryEventConfig repository_event_config = 39;

Returns
Type Description
RepositoryEventConfig.Builder

getRepositoryEventConfigOrBuilder()

public RepositoryEventConfigOrBuilder getRepositoryEventConfigOrBuilder()

The configuration of a trigger that creates a build whenever an event from Repo API is received.

.google.devtools.cloudbuild.v1.RepositoryEventConfig repository_event_config = 39;

Returns
Type Description
RepositoryEventConfigOrBuilder

getResourceName()

public String getResourceName()

The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.

string resource_name = 34;

Returns
Type Description
String

The resourceName.

getResourceNameBytes()

public ByteString getResourceNameBytes()

The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.

string resource_name = 34;

Returns
Type Description
ByteString

The bytes for resourceName.

getServiceAccount()

public String getServiceAccount()

The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}

string service_account = 33 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The serviceAccount.

getServiceAccountBytes()

public ByteString getServiceAccountBytes()

The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}

string service_account = 33 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for serviceAccount.

getSourceToBuild()

public GitRepoSource getSourceToBuild()

The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.

.google.devtools.cloudbuild.v1.GitRepoSource source_to_build = 26;

Returns
Type Description
GitRepoSource

The sourceToBuild.

getSourceToBuildBuilder()

public GitRepoSource.Builder getSourceToBuildBuilder()

The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.

.google.devtools.cloudbuild.v1.GitRepoSource source_to_build = 26;

Returns
Type Description
GitRepoSource.Builder

getSourceToBuildOrBuilder()

public GitRepoSourceOrBuilder getSourceToBuildOrBuilder()

The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.

.google.devtools.cloudbuild.v1.GitRepoSource source_to_build = 26;

Returns
Type Description
GitRepoSourceOrBuilder

getSubstitutions() (deprecated)

public Map<String,String> getSubstitutions()
Returns
Type Description
Map<String,String>

getSubstitutionsCount()

public int getSubstitutionsCount()

Substitutions for Build resource. The keys must match the following regular expression: ^[A-Z0-9]+$.

map<string, string> substitutions = 11;

Returns
Type Description
int

getSubstitutionsMap()

public Map<String,String> getSubstitutionsMap()

Substitutions for Build resource. The keys must match the following regular expression: ^[A-Z0-9]+$.

map<string, string> substitutions = 11;

Returns
Type Description
Map<String,String>

getSubstitutionsOrDefault(String key, String defaultValue)

public String getSubstitutionsOrDefault(String key, String defaultValue)

Substitutions for Build resource. The keys must match the following regular expression: ^[A-Z0-9]+$.

map<string, string> substitutions = 11;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getSubstitutionsOrThrow(String key)

public String getSubstitutionsOrThrow(String key)

Substitutions for Build resource. The keys must match the following regular expression: ^[A-Z0-9]+$.

map<string, string> substitutions = 11;

Parameter
Name Description
key String
Returns
Type Description
String

getTags(int index)

public String getTags(int index)

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The tags at the given index.

getTagsBytes(int index)

public ByteString getTagsBytes(int index)

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the tags at the given index.

getTagsCount()

public int getTagsCount()

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Returns
Type Description
int

The count of tags.

getTagsList()

public ProtocolStringList getTagsList()

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Returns
Type Description
ProtocolStringList

A list containing the tags.

getTriggerTemplate()

public RepoSource getTriggerTemplate()

Template describing the types of source changes to trigger a build.

Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build.

Mutually exclusive with github.

.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;

Returns
Type Description
RepoSource

The triggerTemplate.

getTriggerTemplateBuilder()

public RepoSource.Builder getTriggerTemplateBuilder()

Template describing the types of source changes to trigger a build.

Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build.

Mutually exclusive with github.

.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;

Returns
Type Description
RepoSource.Builder

getTriggerTemplateOrBuilder()

public RepoSourceOrBuilder getTriggerTemplateOrBuilder()

Template describing the types of source changes to trigger a build.

Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build.

Mutually exclusive with github.

.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;

Returns
Type Description
RepoSourceOrBuilder

getWebhookConfig()

public WebhookConfig getWebhookConfig()

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.

.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;

Returns
Type Description
WebhookConfig

The webhookConfig.

getWebhookConfigBuilder()

public WebhookConfig.Builder getWebhookConfigBuilder()

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.

.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;

Returns
Type Description
WebhookConfig.Builder

getWebhookConfigOrBuilder()

public WebhookConfigOrBuilder getWebhookConfigOrBuilder()

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.

.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;

Returns
Type Description
WebhookConfigOrBuilder

hasAutodetect()

public boolean hasAutodetect()

Autodetect build configuration. The following precedence is used (case insensitive):

  1. cloudbuild.yaml
  2. cloudbuild.yml
  3. cloudbuild.json
  4. Dockerfile

    Currently only available for GitHub App Triggers.

bool autodetect = 18;

Returns
Type Description
boolean

Whether the autodetect field is set.

hasBuild()

public boolean hasBuild()

Contents of the build template.

.google.devtools.cloudbuild.v1.Build build = 4;

Returns
Type Description
boolean

Whether the build field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. Time when the trigger was created.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasFilename()

public boolean hasFilename()

Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

string filename = 8;

Returns
Type Description
boolean

Whether the filename field is set.

hasGitFileSource()

public boolean hasGitFileSource()

The file source describing the local or remote Build template.

.google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24;

Returns
Type Description
boolean

Whether the gitFileSource field is set.

hasGithub()

public boolean hasGithub()

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.

Mutually exclusive with trigger_template.

.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;

Returns
Type Description
boolean

Whether the github field is set.

hasPubsubConfig()

public boolean hasPubsubConfig()

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;

Returns
Type Description
boolean

Whether the pubsubConfig field is set.

hasRepositoryEventConfig()

public boolean hasRepositoryEventConfig()

The configuration of a trigger that creates a build whenever an event from Repo API is received.

.google.devtools.cloudbuild.v1.RepositoryEventConfig repository_event_config = 39;

Returns
Type Description
boolean

Whether the repositoryEventConfig field is set.

hasSourceToBuild()

public boolean hasSourceToBuild()

The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.

.google.devtools.cloudbuild.v1.GitRepoSource source_to_build = 26;

Returns
Type Description
boolean

Whether the sourceToBuild field is set.

hasTriggerTemplate()

public boolean hasTriggerTemplate()

Template describing the types of source changes to trigger a build.

Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build.

Mutually exclusive with github.

.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;

Returns
Type Description
boolean

Whether the triggerTemplate field is set.

hasWebhookConfig()

public boolean hasWebhookConfig()

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.

.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;

Returns
Type Description
boolean

Whether the webhookConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBuild(Build value)

public BuildTrigger.Builder mergeBuild(Build value)

Contents of the build template.

.google.devtools.cloudbuild.v1.Build build = 4;

Parameter
Name Description
value Build
Returns
Type Description
BuildTrigger.Builder

mergeCreateTime(Timestamp value)

public BuildTrigger.Builder mergeCreateTime(Timestamp value)

Output only. Time when the trigger was created.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
BuildTrigger.Builder

mergeFrom(BuildTrigger other)

public BuildTrigger.Builder mergeFrom(BuildTrigger other)
Parameter
Name Description
other BuildTrigger
Returns
Type Description
BuildTrigger.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BuildTrigger.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BuildTrigger.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BuildTrigger.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BuildTrigger.Builder
Overrides

mergeGitFileSource(GitFileSource value)

public BuildTrigger.Builder mergeGitFileSource(GitFileSource value)

The file source describing the local or remote Build template.

.google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24;

Parameter
Name Description
value GitFileSource
Returns
Type Description
BuildTrigger.Builder

mergeGithub(GitHubEventsConfig value)

public BuildTrigger.Builder mergeGithub(GitHubEventsConfig value)

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.

Mutually exclusive with trigger_template.

.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;

Parameter
Name Description
value GitHubEventsConfig
Returns
Type Description
BuildTrigger.Builder

mergePubsubConfig(PubsubConfig value)

public BuildTrigger.Builder mergePubsubConfig(PubsubConfig value)

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;

Parameter
Name Description
value PubsubConfig
Returns
Type Description
BuildTrigger.Builder

mergeRepositoryEventConfig(RepositoryEventConfig value)

public BuildTrigger.Builder mergeRepositoryEventConfig(RepositoryEventConfig value)

The configuration of a trigger that creates a build whenever an event from Repo API is received.

.google.devtools.cloudbuild.v1.RepositoryEventConfig repository_event_config = 39;

Parameter
Name Description
value RepositoryEventConfig
Returns
Type Description
BuildTrigger.Builder

mergeSourceToBuild(GitRepoSource value)

public BuildTrigger.Builder mergeSourceToBuild(GitRepoSource value)

The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.

.google.devtools.cloudbuild.v1.GitRepoSource source_to_build = 26;

Parameter
Name Description
value GitRepoSource
Returns
Type Description
BuildTrigger.Builder

mergeTriggerTemplate(RepoSource value)

public BuildTrigger.Builder mergeTriggerTemplate(RepoSource value)

Template describing the types of source changes to trigger a build.

Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build.

Mutually exclusive with github.

.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;

Parameter
Name Description
value RepoSource
Returns
Type Description
BuildTrigger.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BuildTrigger.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BuildTrigger.Builder
Overrides

mergeWebhookConfig(WebhookConfig value)

public BuildTrigger.Builder mergeWebhookConfig(WebhookConfig value)

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.

.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;

Parameter
Name Description
value WebhookConfig
Returns
Type Description
BuildTrigger.Builder

putAllSubstitutions(Map<String,String> values)

public BuildTrigger.Builder putAllSubstitutions(Map<String,String> values)

Substitutions for Build resource. The keys must match the following regular expression: ^[A-Z0-9]+$.

map<string, string> substitutions = 11;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
BuildTrigger.Builder

putSubstitutions(String key, String value)

public BuildTrigger.Builder putSubstitutions(String key, String value)

Substitutions for Build resource. The keys must match the following regular expression: ^[A-Z0-9]+$.

map<string, string> substitutions = 11;

Parameters
Name Description
key String
value String
Returns
Type Description
BuildTrigger.Builder

removeSubstitutions(String key)

public BuildTrigger.Builder removeSubstitutions(String key)

Substitutions for Build resource. The keys must match the following regular expression: ^[A-Z0-9]+$.

map<string, string> substitutions = 11;

Parameter
Name Description
key String
Returns
Type Description
BuildTrigger.Builder

setAutodetect(boolean value)

public BuildTrigger.Builder setAutodetect(boolean value)

Autodetect build configuration. The following precedence is used (case insensitive):

  1. cloudbuild.yaml
  2. cloudbuild.yml
  3. cloudbuild.json
  4. Dockerfile

    Currently only available for GitHub App Triggers.

bool autodetect = 18;

Parameter
Name Description
value boolean

The autodetect to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setBuild(Build value)

public BuildTrigger.Builder setBuild(Build value)

Contents of the build template.

.google.devtools.cloudbuild.v1.Build build = 4;

Parameter
Name Description
value Build
Returns
Type Description
BuildTrigger.Builder

setBuild(Build.Builder builderForValue)

public BuildTrigger.Builder setBuild(Build.Builder builderForValue)

Contents of the build template.

.google.devtools.cloudbuild.v1.Build build = 4;

Parameter
Name Description
builderForValue Build.Builder
Returns
Type Description
BuildTrigger.Builder

setCreateTime(Timestamp value)

public BuildTrigger.Builder setCreateTime(Timestamp value)

Output only. Time when the trigger was created.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
BuildTrigger.Builder

setCreateTime(Timestamp.Builder builderForValue)

public BuildTrigger.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Time when the trigger was created.

.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
BuildTrigger.Builder

setDescription(String value)

public BuildTrigger.Builder setDescription(String value)

Human-readable description of this trigger.

string description = 10;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public BuildTrigger.Builder setDescriptionBytes(ByteString value)

Human-readable description of this trigger.

string description = 10;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setDisabled(boolean value)

public BuildTrigger.Builder setDisabled(boolean value)

If true, the trigger will never automatically execute a build.

bool disabled = 9;

Parameter
Name Description
value boolean

The disabled to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BuildTrigger.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BuildTrigger.Builder
Overrides

setFilename(String value)

public BuildTrigger.Builder setFilename(String value)

Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

string filename = 8;

Parameter
Name Description
value String

The filename to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setFilenameBytes(ByteString value)

public BuildTrigger.Builder setFilenameBytes(ByteString value)

Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

string filename = 8;

Parameter
Name Description
value ByteString

The bytes for filename to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setFilter(String value)

public BuildTrigger.Builder setFilter(String value)

Optional. A Common Expression Language string.

string filter = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The filter to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setFilterBytes(ByteString value)

public BuildTrigger.Builder setFilterBytes(ByteString value)

Optional. A Common Expression Language string.

string filter = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for filter to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setGitFileSource(GitFileSource value)

public BuildTrigger.Builder setGitFileSource(GitFileSource value)

The file source describing the local or remote Build template.

.google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24;

Parameter
Name Description
value GitFileSource
Returns
Type Description
BuildTrigger.Builder

setGitFileSource(GitFileSource.Builder builderForValue)

public BuildTrigger.Builder setGitFileSource(GitFileSource.Builder builderForValue)

The file source describing the local or remote Build template.

.google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24;

Parameter
Name Description
builderForValue GitFileSource.Builder
Returns
Type Description
BuildTrigger.Builder

setGithub(GitHubEventsConfig value)

public BuildTrigger.Builder setGithub(GitHubEventsConfig value)

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.

Mutually exclusive with trigger_template.

.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;

Parameter
Name Description
value GitHubEventsConfig
Returns
Type Description
BuildTrigger.Builder

setGithub(GitHubEventsConfig.Builder builderForValue)

public BuildTrigger.Builder setGithub(GitHubEventsConfig.Builder builderForValue)

GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.

Mutually exclusive with trigger_template.

.google.devtools.cloudbuild.v1.GitHubEventsConfig github = 13;

Parameter
Name Description
builderForValue GitHubEventsConfig.Builder
Returns
Type Description
BuildTrigger.Builder

setId(String value)

public BuildTrigger.Builder setId(String value)

Output only. Unique identifier of the trigger.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The id to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setIdBytes(ByteString value)

public BuildTrigger.Builder setIdBytes(ByteString value)

Output only. Unique identifier of the trigger.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setIgnoredFiles(int index, String value)

public BuildTrigger.Builder setIgnoredFiles(int index, String value)

ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**".

If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build.

If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.

repeated string ignored_files = 15;

Parameters
Name Description
index int

The index to set the value at.

value String

The ignoredFiles to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setIncludedFiles(int index, String value)

public BuildTrigger.Builder setIncludedFiles(int index, String value)

If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build.

If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.

repeated string included_files = 16;

Parameters
Name Description
index int

The index to set the value at.

value String

The includedFiles to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setName(String value)

public BuildTrigger.Builder setName(String value)

User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements:

  • They must contain only alphanumeric characters and dashes.
  • They can be 1-64 characters long.
  • They must begin and end with an alphanumeric character.

string name = 21;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setNameBytes(ByteString value)

public BuildTrigger.Builder setNameBytes(ByteString value)

User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements:

  • They must contain only alphanumeric characters and dashes.
  • They can be 1-64 characters long.
  • They must begin and end with an alphanumeric character.

string name = 21;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setPubsubConfig(PubsubConfig value)

public BuildTrigger.Builder setPubsubConfig(PubsubConfig value)

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;

Parameter
Name Description
value PubsubConfig
Returns
Type Description
BuildTrigger.Builder

setPubsubConfig(PubsubConfig.Builder builderForValue)

public BuildTrigger.Builder setPubsubConfig(PubsubConfig.Builder builderForValue)

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

.google.devtools.cloudbuild.v1.PubsubConfig pubsub_config = 29;

Parameter
Name Description
builderForValue PubsubConfig.Builder
Returns
Type Description
BuildTrigger.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BuildTrigger.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BuildTrigger.Builder
Overrides

setRepositoryEventConfig(RepositoryEventConfig value)

public BuildTrigger.Builder setRepositoryEventConfig(RepositoryEventConfig value)

The configuration of a trigger that creates a build whenever an event from Repo API is received.

.google.devtools.cloudbuild.v1.RepositoryEventConfig repository_event_config = 39;

Parameter
Name Description
value RepositoryEventConfig
Returns
Type Description
BuildTrigger.Builder

setRepositoryEventConfig(RepositoryEventConfig.Builder builderForValue)

public BuildTrigger.Builder setRepositoryEventConfig(RepositoryEventConfig.Builder builderForValue)

The configuration of a trigger that creates a build whenever an event from Repo API is received.

.google.devtools.cloudbuild.v1.RepositoryEventConfig repository_event_config = 39;

Parameter
Name Description
builderForValue RepositoryEventConfig.Builder
Returns
Type Description
BuildTrigger.Builder

setResourceName(String value)

public BuildTrigger.Builder setResourceName(String value)

The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.

string resource_name = 34;

Parameter
Name Description
value String

The resourceName to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setResourceNameBytes(ByteString value)

public BuildTrigger.Builder setResourceNameBytes(ByteString value)

The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.

string resource_name = 34;

Parameter
Name Description
value ByteString

The bytes for resourceName to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setServiceAccount(String value)

public BuildTrigger.Builder setServiceAccount(String value)

The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}

string service_account = 33 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The serviceAccount to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setServiceAccountBytes(ByteString value)

public BuildTrigger.Builder setServiceAccountBytes(ByteString value)

The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}

string service_account = 33 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for serviceAccount to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setSourceToBuild(GitRepoSource value)

public BuildTrigger.Builder setSourceToBuild(GitRepoSource value)

The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.

.google.devtools.cloudbuild.v1.GitRepoSource source_to_build = 26;

Parameter
Name Description
value GitRepoSource
Returns
Type Description
BuildTrigger.Builder

setSourceToBuild(GitRepoSource.Builder builderForValue)

public BuildTrigger.Builder setSourceToBuild(GitRepoSource.Builder builderForValue)

The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.

.google.devtools.cloudbuild.v1.GitRepoSource source_to_build = 26;

Parameter
Name Description
builderForValue GitRepoSource.Builder
Returns
Type Description
BuildTrigger.Builder

setTags(int index, String value)

public BuildTrigger.Builder setTags(int index, String value)

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Parameters
Name Description
index int

The index to set the value at.

value String

The tags to set.

Returns
Type Description
BuildTrigger.Builder

This builder for chaining.

setTriggerTemplate(RepoSource value)

public BuildTrigger.Builder setTriggerTemplate(RepoSource value)

Template describing the types of source changes to trigger a build.

Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build.

Mutually exclusive with github.

.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;

Parameter
Name Description
value RepoSource
Returns
Type Description
BuildTrigger.Builder

setTriggerTemplate(RepoSource.Builder builderForValue)

public BuildTrigger.Builder setTriggerTemplate(RepoSource.Builder builderForValue)

Template describing the types of source changes to trigger a build.

Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build.

Mutually exclusive with github.

.google.devtools.cloudbuild.v1.RepoSource trigger_template = 7;

Parameter
Name Description
builderForValue RepoSource.Builder
Returns
Type Description
BuildTrigger.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final BuildTrigger.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BuildTrigger.Builder
Overrides

setWebhookConfig(WebhookConfig value)

public BuildTrigger.Builder setWebhookConfig(WebhookConfig value)

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.

.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;

Parameter
Name Description
value WebhookConfig
Returns
Type Description
BuildTrigger.Builder

setWebhookConfig(WebhookConfig.Builder builderForValue)

public BuildTrigger.Builder setWebhookConfig(WebhookConfig.Builder builderForValue)

WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL.

.google.devtools.cloudbuild.v1.WebhookConfig webhook_config = 31;

Parameter
Name Description
builderForValue WebhookConfig.Builder
Returns
Type Description
BuildTrigger.Builder