Class BuildTrigger.Builder (3.34.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
TypeDescription
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
NameDescription
valuesIterable<String>

The ignoredFiles to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The includedFiles to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The tags to add.

Returns
TypeDescription
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
NameDescription
valueString

The ignoredFiles to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the ignoredFiles to add.

Returns
TypeDescription
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
NameDescription
valueString

The includedFiles to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the includedFiles to add.

Returns
TypeDescription
BuildTrigger.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BuildTrigger.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BuildTrigger.Builder
Overrides

addTags(String value)

public BuildTrigger.Builder addTags(String value)

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Parameter
NameDescription
valueString

The tags to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the tags to add.

Returns
TypeDescription
BuildTrigger.Builder

This builder for chaining.

build()

public BuildTrigger build()
Returns
TypeDescription
BuildTrigger

buildPartial()

public BuildTrigger buildPartial()
Returns
TypeDescription
BuildTrigger

clear()

public BuildTrigger.Builder clear()
Returns
TypeDescription
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
TypeDescription
BuildTrigger.Builder

This builder for chaining.

clearBuild()

public BuildTrigger.Builder clearBuild()

Contents of the build template.

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

Returns
TypeDescription
BuildTrigger.Builder

clearBuildTemplate()

public BuildTrigger.Builder clearBuildTemplate()
Returns
TypeDescription
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
TypeDescription
BuildTrigger.Builder

clearDescription()

public BuildTrigger.Builder clearDescription()

Human-readable description of this trigger.

string description = 10;

Returns
TypeDescription
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
TypeDescription
BuildTrigger.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BuildTrigger.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
BuildTrigger.Builder

clearId()

public BuildTrigger.Builder clearId()

Output only. Unique identifier of the trigger.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
BuildTrigger.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public BuildTrigger.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
BuildTrigger.Builder

clearSubstitutions()

public BuildTrigger.Builder clearSubstitutions()
Returns
TypeDescription
BuildTrigger.Builder

clearTags()

public BuildTrigger.Builder clearTags()

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
BuildTrigger.Builder

clone()

public BuildTrigger.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
boolean

The autodetect.

getBuild()

public Build getBuild()

Contents of the build template.

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

Returns
TypeDescription
Build

The build.

getBuildBuilder()

public Build.Builder getBuildBuilder()

Contents of the build template.

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

Returns
TypeDescription
Build.Builder

getBuildOrBuilder()

public BuildOrBuilder getBuildOrBuilder()

Contents of the build template.

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

Returns
TypeDescription
BuildOrBuilder

getBuildTemplateCase()

public BuildTrigger.BuildTemplateCase getBuildTemplateCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public BuildTrigger getDefaultInstanceForType()
Returns
TypeDescription
BuildTrigger

getDescription()

public String getDescription()

Human-readable description of this trigger.

string description = 10;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Human-readable description of this trigger.

string description = 10;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisabled()

public boolean getDisabled()

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

bool disabled = 9;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for filename.

getFilter()

public String getFilter()

Optional. A Common Expression Language string.

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

Returns
TypeDescription
String

The filter.

getFilterBytes()

public ByteString getFilterBytes()

Optional. A Common Expression Language string.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
GitHubEventsConfigOrBuilder

getId()

public String getId()

Output only. Unique identifier of the trigger.

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

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Output only. Unique identifier of the trigger.

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

Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the includedFiles.

getMutableSubstitutions() (deprecated)

public Map<String,String> getMutableSubstitutions()

Use alternate mutation accessors instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
GitRepoSourceOrBuilder

getSubstitutions() (deprecated)

public Map<String,String> getSubstitutions()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
String

getTags(int index)

public String getTags(int index)

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
int

The count of tags.

getTagsList()

public ProtocolStringList getTagsList()

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the autodetect field is set.

hasBuild()

public boolean hasBuild()

Contents of the build template.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the webhookConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeBuild(Build value)

public BuildTrigger.Builder mergeBuild(Build value)

Contents of the build template.

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

Parameter
NameDescription
valueBuild
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
BuildTrigger.Builder

mergeFrom(BuildTrigger other)

public BuildTrigger.Builder mergeFrom(BuildTrigger other)
Parameter
NameDescription
otherBuildTrigger
Returns
TypeDescription
BuildTrigger.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BuildTrigger.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildTrigger.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public BuildTrigger.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueGitFileSource
Returns
TypeDescription
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
NameDescription
valueGitHubEventsConfig
Returns
TypeDescription
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
NameDescription
valuePubsubConfig
Returns
TypeDescription
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
NameDescription
valueRepositoryEventConfig
Returns
TypeDescription
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
NameDescription
valueGitRepoSource
Returns
TypeDescription
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
NameDescription
valueRepoSource
Returns
TypeDescription
BuildTrigger.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BuildTrigger.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueWebhookConfig
Returns
TypeDescription
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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
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
NameDescription
keyString
valueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
valueboolean

The autodetect to set.

Returns
TypeDescription
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
NameDescription
valueBuild
Returns
TypeDescription
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
NameDescription
builderForValueBuild.Builder
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
BuildTrigger.Builder

setDescription(String value)

public BuildTrigger.Builder setDescription(String value)

Human-readable description of this trigger.

string description = 10;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The disabled to set.

Returns
TypeDescription
BuildTrigger.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BuildTrigger.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The filename to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for filename to set.

Returns
TypeDescription
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
NameDescription
valueString

The filter to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for filter to set.

Returns
TypeDescription
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
NameDescription
valueGitFileSource
Returns
TypeDescription
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
NameDescription
builderForValueGitFileSource.Builder
Returns
TypeDescription
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
NameDescription
valueGitHubEventsConfig
Returns
TypeDescription
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
NameDescription
builderForValueGitHubEventsConfig.Builder
Returns
TypeDescription
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
NameDescription
valueString

The id to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The ignoredFiles to set.

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The includedFiles to set.

Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
valuePubsubConfig
Returns
TypeDescription
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
NameDescription
builderForValuePubsubConfig.Builder
Returns
TypeDescription
BuildTrigger.Builder

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

public BuildTrigger.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueRepositoryEventConfig
Returns
TypeDescription
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
NameDescription
builderForValueRepositoryEventConfig.Builder
Returns
TypeDescription
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
NameDescription
valueString

The resourceName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for resourceName to set.

Returns
TypeDescription
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
NameDescription
valueString

The serviceAccount to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for serviceAccount to set.

Returns
TypeDescription
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
NameDescription
valueGitRepoSource
Returns
TypeDescription
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
NameDescription
builderForValueGitRepoSource.Builder
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The tags to set.

Returns
TypeDescription
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
NameDescription
valueRepoSource
Returns
TypeDescription
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
NameDescription
builderForValueRepoSource.Builder
Returns
TypeDescription
BuildTrigger.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final BuildTrigger.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueWebhookConfig
Returns
TypeDescription
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
NameDescription
builderForValueWebhookConfig.Builder
Returns
TypeDescription
BuildTrigger.Builder