Interface BuildTriggerOrBuilder (3.34.0)

public interface BuildTriggerOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsSubstitutions(String key)

public abstract 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 abstract 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 abstract Build getBuild()

Contents of the build template.

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

Returns
TypeDescription
Build

The build.

getBuildOrBuilder()

public abstract BuildOrBuilder getBuildOrBuilder()

Contents of the build template.

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

Returns
TypeDescription
BuildOrBuilder

getBuildTemplateCase()

public abstract BuildTrigger.BuildTemplateCase getBuildTemplateCase()
Returns
TypeDescription
BuildTrigger.BuildTemplateCase

getCreateTime()

public abstract 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.

getCreateTimeOrBuilder()

public abstract 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

getDescription()

public abstract String getDescription()

Human-readable description of this trigger.

string description = 10;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public abstract ByteString getDescriptionBytes()

Human-readable description of this trigger.

string description = 10;

Returns
TypeDescription
ByteString

The bytes for description.

getDisabled()

public abstract boolean getDisabled()

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

bool disabled = 9;

Returns
TypeDescription
boolean

The disabled.

getFilename()

public abstract 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 abstract 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 abstract String getFilter()

Optional. A Common Expression Language string.

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

Returns
TypeDescription
String

The filter.

getFilterBytes()

public abstract 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 abstract 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.

getGitFileSourceOrBuilder()

public abstract 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 abstract 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.

getGithubOrBuilder()

public abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract List<String> 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
List<String>

A list containing the ignoredFiles.

getIncludedFiles(int index)

public abstract 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 abstract 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 abstract 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 abstract List<String> 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
List<String>

A list containing the includedFiles.

getName()

public abstract 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 abstract 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 abstract 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.

getPubsubConfigOrBuilder()

public abstract 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 abstract 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.

getRepositoryEventConfigOrBuilder()

public abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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.

getSourceToBuildOrBuilder()

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

getSubstitutionsCount()

public abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract int getTagsCount()

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Returns
TypeDescription
int

The count of tags.

getTagsList()

public abstract List<String> getTagsList()

Tags for annotation of a BuildTrigger

repeated string tags = 19;

Returns
TypeDescription
List<String>

A list containing the tags.

getTriggerTemplate()

public abstract 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.

getTriggerTemplateOrBuilder()

public abstract 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 abstract 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.

getWebhookConfigOrBuilder()

public abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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.