From 6f96d9c155fac34deecef125490430a7bc73fbe1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 21:32:12 +0000 Subject: [PATCH] feat: [cloudbuild] add git_file_source and git_repo_source to build_trigger (#9673) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 550012872 Source-Link: https://togithub.com/googleapis/googleapis/commit/f90d153e275bb611d3c4948a3434a92593fb4589 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/7682e231b6058aa439b4b4f6df236240bf88b3e2 Copy-Tag: eyJwIjoiamF2YS1jbG91ZGJ1aWxkLy5Pd2xCb3QueWFtbCIsImgiOiI3NjgyZTIzMWI2MDU4YWE0MzliNGI0ZjZkZjIzNjI0MGJmODhiM2UyIn0= --- .../reflect-config.json | 81 + .../v1/CloudBuildClientHttpJsonTest.java | 6 + .../cloudbuild/v1/CloudBuildClientTest.java | 4 + .../google/cloudbuild/v1/BuildOptions.java | 14 +- .../cloudbuild/v1/BuildOptionsOrBuilder.java | 4 +- .../google/cloudbuild/v1/BuildTrigger.java | 737 +++++- .../cloudbuild/v1/BuildTriggerOrBuilder.java | 85 + .../com/google/cloudbuild/v1/Cloudbuild.java | 906 ++++--- .../google/cloudbuild/v1/GitFileSource.java | 2074 +++++++++++++++ .../cloudbuild/v1/GitFileSourceOrBuilder.java | 237 ++ .../cloudbuild/v1/GitHubEnterpriseConfig.java | 2259 +++++++++++++++++ .../v1/GitHubEnterpriseConfigOrBuilder.java | 290 +++ .../v1/GitHubEnterpriseSecrets.java | 1188 +++++++++ .../v1/GitHubEnterpriseSecretsOrBuilder.java | 127 + .../cloudbuild/v1/GitHubEventsConfig.java | 8 +- .../v1/GitHubEventsConfigOrBuilder.java | 2 +- .../google/cloudbuild/v1/GitRepoSource.java | 1628 ++++++++++++ .../cloudbuild/v1/GitRepoSourceOrBuilder.java | 195 ++ .../devtools/cloudbuild/v1/cloudbuild.proto | 190 ++ 19 files changed, 9569 insertions(+), 466 deletions(-) create mode 100644 java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitFileSource.java create mode 100644 java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitFileSourceOrBuilder.java create mode 100644 java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseConfig.java create mode 100644 java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseConfigOrBuilder.java create mode 100644 java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseSecrets.java create mode 100644 java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseSecretsOrBuilder.java create mode 100644 java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitRepoSource.java create mode 100644 java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitRepoSourceOrBuilder.java diff --git a/java-cloudbuild/google-cloud-build/src/main/resources/META-INF/native-image/com.google.cloud.devtools.cloudbuild.v1/reflect-config.json b/java-cloudbuild/google-cloud-build/src/main/resources/META-INF/native-image/com.google.cloud.devtools.cloudbuild.v1/reflect-config.json index accf18706d6d..3e05ac4e016e 100644 --- a/java-cloudbuild/google-cloud-build/src/main/resources/META-INF/native-image/com.google.cloud.devtools.cloudbuild.v1/reflect-config.json +++ b/java-cloudbuild/google-cloud-build/src/main/resources/META-INF/native-image/com.google.cloud.devtools.cloudbuild.v1/reflect-config.json @@ -1088,6 +1088,69 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloudbuild.v1.GitFileSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloudbuild.v1.GitFileSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloudbuild.v1.GitFileSource$RepoType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloudbuild.v1.GitHubEnterpriseConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloudbuild.v1.GitHubEnterpriseConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloudbuild.v1.GitHubEnterpriseSecrets", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloudbuild.v1.GitHubEnterpriseSecrets$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloudbuild.v1.GitHubEventsConfig", "queryAllDeclaredConstructors": true, @@ -1106,6 +1169,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloudbuild.v1.GitRepoSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloudbuild.v1.GitRepoSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloudbuild.v1.GitSource", "queryAllDeclaredConstructors": true, diff --git a/java-cloudbuild/google-cloud-build/src/test/java/com/google/cloud/devtools/cloudbuild/v1/CloudBuildClientHttpJsonTest.java b/java-cloudbuild/google-cloud-build/src/test/java/com/google/cloud/devtools/cloudbuild/v1/CloudBuildClientHttpJsonTest.java index c3bf4fb5d270..0e971bcfccea 100644 --- a/java-cloudbuild/google-cloud-build/src/test/java/com/google/cloud/devtools/cloudbuild/v1/CloudBuildClientHttpJsonTest.java +++ b/java-cloudbuild/google-cloud-build/src/test/java/com/google/cloud/devtools/cloudbuild/v1/CloudBuildClientHttpJsonTest.java @@ -41,6 +41,7 @@ import com.google.cloudbuild.v1.BuildTrigger; import com.google.cloudbuild.v1.BuildTriggerName; import com.google.cloudbuild.v1.GitHubEventsConfig; +import com.google.cloudbuild.v1.GitRepoSource; import com.google.cloudbuild.v1.ListBuildTriggersResponse; import com.google.cloudbuild.v1.ListBuildsResponse; import com.google.cloudbuild.v1.ListWorkerPoolsResponse; @@ -565,6 +566,7 @@ public void createBuildTriggerTest() throws Exception { .addAllIgnoredFiles(new ArrayList()) .addAllIncludedFiles(new ArrayList()) .setFilter("filter-1274492040") + .setSourceToBuild(GitRepoSource.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") .setRepositoryEventConfig(RepositoryEventConfig.newBuilder().build()) .build(); @@ -627,6 +629,7 @@ public void getBuildTriggerTest() throws Exception { .addAllIgnoredFiles(new ArrayList()) .addAllIncludedFiles(new ArrayList()) .setFilter("filter-1274492040") + .setSourceToBuild(GitRepoSource.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") .setRepositoryEventConfig(RepositoryEventConfig.newBuilder().build()) .build(); @@ -781,6 +784,7 @@ public void updateBuildTriggerTest() throws Exception { .addAllIgnoredFiles(new ArrayList()) .addAllIncludedFiles(new ArrayList()) .setFilter("filter-1274492040") + .setSourceToBuild(GitRepoSource.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") .setRepositoryEventConfig(RepositoryEventConfig.newBuilder().build()) .build(); @@ -805,6 +809,7 @@ public void updateBuildTriggerTest() throws Exception { .addAllIgnoredFiles(new ArrayList()) .addAllIncludedFiles(new ArrayList()) .setFilter("filter-1274492040") + .setSourceToBuild(GitRepoSource.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") .setRepositoryEventConfig(RepositoryEventConfig.newBuilder().build()) .build(); @@ -854,6 +859,7 @@ public void updateBuildTriggerExceptionTest() throws Exception { .addAllIgnoredFiles(new ArrayList()) .addAllIncludedFiles(new ArrayList()) .setFilter("filter-1274492040") + .setSourceToBuild(GitRepoSource.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") .setRepositoryEventConfig(RepositoryEventConfig.newBuilder().build()) .build(); diff --git a/java-cloudbuild/google-cloud-build/src/test/java/com/google/cloud/devtools/cloudbuild/v1/CloudBuildClientTest.java b/java-cloudbuild/google-cloud-build/src/test/java/com/google/cloud/devtools/cloudbuild/v1/CloudBuildClientTest.java index f18a092bfbe8..5a3f55fed2fd 100644 --- a/java-cloudbuild/google-cloud-build/src/test/java/com/google/cloud/devtools/cloudbuild/v1/CloudBuildClientTest.java +++ b/java-cloudbuild/google-cloud-build/src/test/java/com/google/cloud/devtools/cloudbuild/v1/CloudBuildClientTest.java @@ -49,6 +49,7 @@ import com.google.cloudbuild.v1.GetBuildTriggerRequest; import com.google.cloudbuild.v1.GetWorkerPoolRequest; import com.google.cloudbuild.v1.GitHubEventsConfig; +import com.google.cloudbuild.v1.GitRepoSource; import com.google.cloudbuild.v1.ListBuildTriggersRequest; import com.google.cloudbuild.v1.ListBuildTriggersResponse; import com.google.cloudbuild.v1.ListBuildsRequest; @@ -566,6 +567,7 @@ public void createBuildTriggerTest() throws Exception { .addAllIgnoredFiles(new ArrayList()) .addAllIncludedFiles(new ArrayList()) .setFilter("filter-1274492040") + .setSourceToBuild(GitRepoSource.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") .setRepositoryEventConfig(RepositoryEventConfig.newBuilder().build()) .build(); @@ -623,6 +625,7 @@ public void getBuildTriggerTest() throws Exception { .addAllIgnoredFiles(new ArrayList()) .addAllIncludedFiles(new ArrayList()) .setFilter("filter-1274492040") + .setSourceToBuild(GitRepoSource.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") .setRepositoryEventConfig(RepositoryEventConfig.newBuilder().build()) .build(); @@ -761,6 +764,7 @@ public void updateBuildTriggerTest() throws Exception { .addAllIgnoredFiles(new ArrayList()) .addAllIncludedFiles(new ArrayList()) .setFilter("filter-1274492040") + .setSourceToBuild(GitRepoSource.newBuilder().build()) .setServiceAccount("serviceAccount1079137720") .setRepositoryEventConfig(RepositoryEventConfig.newBuilder().build()) .build(); diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildOptions.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildOptions.java index 09cee79a2b95..50d868109aa3 100644 --- a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildOptions.java +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildOptions.java @@ -2119,7 +2119,7 @@ public com.google.cloudbuild.v1.BuildOptions.LogStreamingOption getLogStreamingO * string worker_pool = 7 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2139 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2252 * @return The workerPool. */ @java.lang.Override @@ -2145,7 +2145,7 @@ public java.lang.String getWorkerPool() { * string worker_pool = 7 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2139 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2252 * @return The bytes for workerPool. */ @java.lang.Override @@ -4145,7 +4145,7 @@ public Builder clearLogStreamingOption() { * string worker_pool = 7 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2139 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2252 * @return The workerPool. */ @java.lang.Deprecated @@ -4170,7 +4170,7 @@ public java.lang.String getWorkerPool() { * string worker_pool = 7 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2139 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2252 * @return The bytes for workerPool. */ @java.lang.Deprecated @@ -4195,7 +4195,7 @@ public com.google.protobuf.ByteString getWorkerPoolBytes() { * string worker_pool = 7 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2139 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2252 * @param value The workerPool to set. * @return This builder for chaining. */ @@ -4219,7 +4219,7 @@ public Builder setWorkerPool(java.lang.String value) { * string worker_pool = 7 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2139 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2252 * @return This builder for chaining. */ @java.lang.Deprecated @@ -4239,7 +4239,7 @@ public Builder clearWorkerPool() { * string worker_pool = 7 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2139 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2252 * @param value The bytes for workerPool to set. * @return This builder for chaining. */ diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildOptionsOrBuilder.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildOptionsOrBuilder.java index b6fa1320d3e2..de6ded8bb260 100644 --- a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildOptionsOrBuilder.java +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildOptionsOrBuilder.java @@ -247,7 +247,7 @@ public interface BuildOptionsOrBuilder * string worker_pool = 7 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2139 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2252 * @return The workerPool. */ @java.lang.Deprecated @@ -262,7 +262,7 @@ public interface BuildOptionsOrBuilder * string worker_pool = 7 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2139 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=2252 * @return The bytes for workerPool. */ @java.lang.Deprecated diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildTrigger.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildTrigger.java index 911b7091fad8..7878e7e847d6 100644 --- a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildTrigger.java +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildTrigger.java @@ -94,6 +94,7 @@ public enum BuildTemplateCase AUTODETECT(18), BUILD(4), FILENAME(8), + GIT_FILE_SOURCE(24), BUILDTEMPLATE_NOT_SET(0); private final int value; @@ -118,6 +119,8 @@ public static BuildTemplateCase forNumber(int value) { return BUILD; case 8: return FILENAME; + case 24: + return GIT_FILE_SOURCE; case 0: return BUILDTEMPLATE_NOT_SET; default: @@ -824,6 +827,57 @@ public com.google.protobuf.ByteString getFilenameBytes() { } } + public static final int GIT_FILE_SOURCE_FIELD_NUMBER = 24; + /** + * + * + *
+   * The file source describing the local or remote Build template.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + * + * @return Whether the gitFileSource field is set. + */ + @java.lang.Override + public boolean hasGitFileSource() { + return buildTemplateCase_ == 24; + } + /** + * + * + *
+   * The file source describing the local or remote Build template.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + * + * @return The gitFileSource. + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSource getGitFileSource() { + if (buildTemplateCase_ == 24) { + return (com.google.cloudbuild.v1.GitFileSource) buildTemplate_; + } + return com.google.cloudbuild.v1.GitFileSource.getDefaultInstance(); + } + /** + * + * + *
+   * The file source describing the local or remote Build template.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSourceOrBuilder getGitFileSourceOrBuilder() { + if (buildTemplateCase_ == 24) { + return (com.google.cloudbuild.v1.GitFileSource) buildTemplate_; + } + return com.google.cloudbuild.v1.GitFileSource.getDefaultInstance(); + } + public static final int CREATE_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp createTime_; /** @@ -1238,6 +1292,71 @@ public com.google.protobuf.ByteString getFilterBytes() { } } + public static final int SOURCE_TO_BUILD_FIELD_NUMBER = 26; + private com.google.cloudbuild.v1.GitRepoSource sourceToBuild_; + /** + * + * + *
+   * 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; + * + * @return Whether the sourceToBuild field is set. + */ + @java.lang.Override + public boolean hasSourceToBuild() { + return sourceToBuild_ != null; + } + /** + * + * + *
+   * 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; + * + * @return The sourceToBuild. + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitRepoSource getSourceToBuild() { + return sourceToBuild_ == null + ? com.google.cloudbuild.v1.GitRepoSource.getDefaultInstance() + : sourceToBuild_; + } + /** + * + * + *
+   * 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; + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitRepoSourceOrBuilder getSourceToBuildOrBuilder() { + return sourceToBuild_ == null + ? com.google.cloudbuild.v1.GitRepoSource.getDefaultInstance() + : sourceToBuild_; + } + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 33; @SuppressWarnings("serial") @@ -1406,6 +1525,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 21, name_); } + if (buildTemplateCase_ == 24) { + output.writeMessage(24, (com.google.cloudbuild.v1.GitFileSource) buildTemplate_); + } + if (sourceToBuild_ != null) { + output.writeMessage(26, getSourceToBuild()); + } if (pubsubConfig_ != null) { output.writeMessage(29, getPubsubConfig()); } @@ -1501,6 +1626,14 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, name_); } + if (buildTemplateCase_ == 24) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, (com.google.cloudbuild.v1.GitFileSource) buildTemplate_); + } + if (sourceToBuild_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getSourceToBuild()); + } if (pubsubConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, getPubsubConfig()); } @@ -1565,6 +1698,10 @@ public boolean equals(final java.lang.Object obj) { if (!getIgnoredFilesList().equals(other.getIgnoredFilesList())) return false; if (!getIncludedFilesList().equals(other.getIncludedFilesList())) return false; if (!getFilter().equals(other.getFilter())) return false; + if (hasSourceToBuild() != other.hasSourceToBuild()) return false; + if (hasSourceToBuild()) { + if (!getSourceToBuild().equals(other.getSourceToBuild())) return false; + } if (!getServiceAccount().equals(other.getServiceAccount())) return false; if (hasRepositoryEventConfig() != other.hasRepositoryEventConfig()) return false; if (hasRepositoryEventConfig()) { @@ -1581,6 +1718,9 @@ public boolean equals(final java.lang.Object obj) { case 8: if (!getFilename().equals(other.getFilename())) return false; break; + case 24: + if (!getGitFileSource().equals(other.getGitFileSource())) return false; + break; case 0: default: } @@ -1643,6 +1783,10 @@ public int hashCode() { } hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); + if (hasSourceToBuild()) { + hash = (37 * hash) + SOURCE_TO_BUILD_FIELD_NUMBER; + hash = (53 * hash) + getSourceToBuild().hashCode(); + } hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; hash = (53 * hash) + getServiceAccount().hashCode(); if (hasRepositoryEventConfig()) { @@ -1662,6 +1806,10 @@ public int hashCode() { hash = (37 * hash) + FILENAME_FIELD_NUMBER; hash = (53 * hash) + getFilename().hashCode(); break; + case 24: + hash = (37 * hash) + GIT_FILE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGitFileSource().hashCode(); + break; case 0: default: } @@ -1852,6 +2000,9 @@ public Builder clear() { if (buildBuilder_ != null) { buildBuilder_.clear(); } + if (gitFileSourceBuilder_ != null) { + gitFileSourceBuilder_.clear(); + } createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); @@ -1862,6 +2013,11 @@ public Builder clear() { ignoredFiles_ = com.google.protobuf.LazyStringArrayList.emptyList(); includedFiles_ = com.google.protobuf.LazyStringArrayList.emptyList(); filter_ = ""; + sourceToBuild_ = null; + if (sourceToBuildBuilder_ != null) { + sourceToBuildBuilder_.dispose(); + sourceToBuildBuilder_ = null; + } serviceAccount_ = ""; repositoryEventConfig_ = null; if (repositoryEventConfigBuilder_ != null) { @@ -1938,31 +2094,35 @@ private void buildPartial0(com.google.cloudbuild.v1.BuildTrigger result) { result.webhookConfig_ = webhookConfigBuilder_ == null ? webhookConfig_ : webhookConfigBuilder_.build(); } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.disabled_ = disabled_; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.substitutions_ = internalGetSubstitutions(); result.substitutions_.makeImmutable(); } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { ignoredFiles_.makeImmutable(); result.ignoredFiles_ = ignoredFiles_; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { includedFiles_.makeImmutable(); result.includedFiles_ = includedFiles_; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.filter_ = filter_; } - if (((from_bitField0_ & 0x00040000) != 0)) { + if (((from_bitField0_ & 0x00080000) != 0)) { + result.sourceToBuild_ = + sourceToBuildBuilder_ == null ? sourceToBuild_ : sourceToBuildBuilder_.build(); + } + if (((from_bitField0_ & 0x00100000) != 0)) { result.serviceAccount_ = serviceAccount_; } - if (((from_bitField0_ & 0x00080000) != 0)) { + if (((from_bitField0_ & 0x00200000) != 0)) { result.repositoryEventConfig_ = repositoryEventConfigBuilder_ == null ? repositoryEventConfig_ @@ -1976,6 +2136,9 @@ private void buildPartialOneofs(com.google.cloudbuild.v1.BuildTrigger result) { if (buildTemplateCase_ == 4 && buildBuilder_ != null) { result.buildTemplate_ = buildBuilder_.build(); } + if (buildTemplateCase_ == 24 && gitFileSourceBuilder_ != null) { + result.buildTemplate_ = gitFileSourceBuilder_.build(); + } } @java.lang.Override @@ -2072,11 +2235,11 @@ public Builder mergeFrom(com.google.cloudbuild.v1.BuildTrigger other) { setDisabled(other.getDisabled()); } internalGetMutableSubstitutions().mergeFrom(other.internalGetSubstitutions()); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; if (!other.ignoredFiles_.isEmpty()) { if (ignoredFiles_.isEmpty()) { ignoredFiles_ = other.ignoredFiles_; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; } else { ensureIgnoredFilesIsMutable(); ignoredFiles_.addAll(other.ignoredFiles_); @@ -2086,7 +2249,7 @@ public Builder mergeFrom(com.google.cloudbuild.v1.BuildTrigger other) { if (!other.includedFiles_.isEmpty()) { if (includedFiles_.isEmpty()) { includedFiles_ = other.includedFiles_; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; } else { ensureIncludedFilesIsMutable(); includedFiles_.addAll(other.includedFiles_); @@ -2095,12 +2258,15 @@ public Builder mergeFrom(com.google.cloudbuild.v1.BuildTrigger other) { } if (!other.getFilter().isEmpty()) { filter_ = other.filter_; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); } + if (other.hasSourceToBuild()) { + mergeSourceToBuild(other.getSourceToBuild()); + } if (!other.getServiceAccount().isEmpty()) { serviceAccount_ = other.serviceAccount_; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00100000; onChanged(); } if (other.hasRepositoryEventConfig()) { @@ -2124,6 +2290,11 @@ public Builder mergeFrom(com.google.cloudbuild.v1.BuildTrigger other) { onChanged(); break; } + case GIT_FILE_SOURCE: + { + mergeGitFileSource(other.getGitFileSource()); + break; + } case BUILDTEMPLATE_NOT_SET: { break; @@ -2170,7 +2341,7 @@ public Builder mergeFrom( case 42: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 42 case 58: @@ -2189,7 +2360,7 @@ public Builder mergeFrom( case 72: { disabled_ = input.readBool(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 72 case 82: @@ -2207,7 +2378,7 @@ public Builder mergeFrom( internalGetMutableSubstitutions() .getMutableMap() .put(substitutions__.getKey(), substitutions__.getValue()); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 90 case 106: @@ -2249,6 +2420,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 170 + case 194: + { + input.readMessage(getGitFileSourceFieldBuilder().getBuilder(), extensionRegistry); + buildTemplateCase_ = 24; + break; + } // case 194 + case 210: + { + input.readMessage(getSourceToBuildFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 210 case 234: { input.readMessage(getPubsubConfigFieldBuilder().getBuilder(), extensionRegistry); @@ -2258,7 +2441,7 @@ public Builder mergeFrom( case 242: { filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 242 case 250: @@ -2270,7 +2453,7 @@ public Builder mergeFrom( case 266: { serviceAccount_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00100000; break; } // case 266 case 274: @@ -2283,7 +2466,7 @@ public Builder mergeFrom( { input.readMessage( getRepositoryEventConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00200000; break; } // case 314 default: @@ -4232,6 +4415,215 @@ public Builder setFilenameBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloudbuild.v1.GitFileSource, + com.google.cloudbuild.v1.GitFileSource.Builder, + com.google.cloudbuild.v1.GitFileSourceOrBuilder> + gitFileSourceBuilder_; + /** + * + * + *
+     * The file source describing the local or remote Build template.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + * + * @return Whether the gitFileSource field is set. + */ + @java.lang.Override + public boolean hasGitFileSource() { + return buildTemplateCase_ == 24; + } + /** + * + * + *
+     * The file source describing the local or remote Build template.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + * + * @return The gitFileSource. + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSource getGitFileSource() { + if (gitFileSourceBuilder_ == null) { + if (buildTemplateCase_ == 24) { + return (com.google.cloudbuild.v1.GitFileSource) buildTemplate_; + } + return com.google.cloudbuild.v1.GitFileSource.getDefaultInstance(); + } else { + if (buildTemplateCase_ == 24) { + return gitFileSourceBuilder_.getMessage(); + } + return com.google.cloudbuild.v1.GitFileSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * The file source describing the local or remote Build template.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + */ + public Builder setGitFileSource(com.google.cloudbuild.v1.GitFileSource value) { + if (gitFileSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + buildTemplate_ = value; + onChanged(); + } else { + gitFileSourceBuilder_.setMessage(value); + } + buildTemplateCase_ = 24; + return this; + } + /** + * + * + *
+     * The file source describing the local or remote Build template.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + */ + public Builder setGitFileSource( + com.google.cloudbuild.v1.GitFileSource.Builder builderForValue) { + if (gitFileSourceBuilder_ == null) { + buildTemplate_ = builderForValue.build(); + onChanged(); + } else { + gitFileSourceBuilder_.setMessage(builderForValue.build()); + } + buildTemplateCase_ = 24; + return this; + } + /** + * + * + *
+     * The file source describing the local or remote Build template.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + */ + public Builder mergeGitFileSource(com.google.cloudbuild.v1.GitFileSource value) { + if (gitFileSourceBuilder_ == null) { + if (buildTemplateCase_ == 24 + && buildTemplate_ != com.google.cloudbuild.v1.GitFileSource.getDefaultInstance()) { + buildTemplate_ = + com.google.cloudbuild.v1.GitFileSource.newBuilder( + (com.google.cloudbuild.v1.GitFileSource) buildTemplate_) + .mergeFrom(value) + .buildPartial(); + } else { + buildTemplate_ = value; + } + onChanged(); + } else { + if (buildTemplateCase_ == 24) { + gitFileSourceBuilder_.mergeFrom(value); + } else { + gitFileSourceBuilder_.setMessage(value); + } + } + buildTemplateCase_ = 24; + return this; + } + /** + * + * + *
+     * The file source describing the local or remote Build template.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + */ + public Builder clearGitFileSource() { + if (gitFileSourceBuilder_ == null) { + if (buildTemplateCase_ == 24) { + buildTemplateCase_ = 0; + buildTemplate_ = null; + onChanged(); + } + } else { + if (buildTemplateCase_ == 24) { + buildTemplateCase_ = 0; + buildTemplate_ = null; + } + gitFileSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The file source describing the local or remote Build template.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + */ + public com.google.cloudbuild.v1.GitFileSource.Builder getGitFileSourceBuilder() { + return getGitFileSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The file source describing the local or remote Build template.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSourceOrBuilder getGitFileSourceOrBuilder() { + if ((buildTemplateCase_ == 24) && (gitFileSourceBuilder_ != null)) { + return gitFileSourceBuilder_.getMessageOrBuilder(); + } else { + if (buildTemplateCase_ == 24) { + return (com.google.cloudbuild.v1.GitFileSource) buildTemplate_; + } + return com.google.cloudbuild.v1.GitFileSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * The file source describing the local or remote Build template.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloudbuild.v1.GitFileSource, + com.google.cloudbuild.v1.GitFileSource.Builder, + com.google.cloudbuild.v1.GitFileSourceOrBuilder> + getGitFileSourceFieldBuilder() { + if (gitFileSourceBuilder_ == null) { + if (!(buildTemplateCase_ == 24)) { + buildTemplate_ = com.google.cloudbuild.v1.GitFileSource.getDefaultInstance(); + } + gitFileSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloudbuild.v1.GitFileSource, + com.google.cloudbuild.v1.GitFileSource.Builder, + com.google.cloudbuild.v1.GitFileSourceOrBuilder>( + (com.google.cloudbuild.v1.GitFileSource) buildTemplate_, + getParentForChildren(), + isClean()); + buildTemplate_ = null; + } + buildTemplateCase_ = 24; + onChanged(); + return gitFileSourceBuilder_; + } + private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -4252,7 +4644,7 @@ public Builder setFilenameBytes(com.google.protobuf.ByteString value) { * @return Whether the createTime field is set. */ public boolean hasCreateTime() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** * @@ -4296,7 +4688,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4317,7 +4709,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { createTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4334,7 +4726,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) + if (((bitField0_ & 0x00002000) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); @@ -4344,7 +4736,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4360,7 +4752,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * */ public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); @@ -4381,7 +4773,7 @@ public Builder clearCreateTime() { * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } @@ -4464,7 +4856,7 @@ public boolean getDisabled() { public Builder setDisabled(boolean value) { disabled_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4480,7 +4872,7 @@ public Builder setDisabled(boolean value) { * @return This builder for chaining. */ public Builder clearDisabled() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); disabled_ = false; onChanged(); return this; @@ -4506,7 +4898,7 @@ public Builder clearDisabled() { if (!substitutions_.isMutable()) { substitutions_ = substitutions_.copy(); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return substitutions_; } @@ -4595,7 +4987,7 @@ public java.lang.String getSubstitutionsOrThrow(java.lang.String key) { } public Builder clearSubstitutions() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); internalGetMutableSubstitutions().getMutableMap().clear(); return this; } @@ -4619,7 +5011,7 @@ public Builder removeSubstitutions(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableSubstitutions() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; return internalGetMutableSubstitutions().getMutableMap(); } /** @@ -4640,7 +5032,7 @@ public Builder putSubstitutions(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableSubstitutions().getMutableMap().put(key, value); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; return this; } /** @@ -4655,7 +5047,7 @@ public Builder putSubstitutions(java.lang.String key, java.lang.String value) { */ public Builder putAllSubstitutions(java.util.Map values) { internalGetMutableSubstitutions().getMutableMap().putAll(values); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; return this; } @@ -4666,7 +5058,7 @@ private void ensureIgnoredFilesIsMutable() { if (!ignoredFiles_.isModifiable()) { ignoredFiles_ = new com.google.protobuf.LazyStringArrayList(ignoredFiles_); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; } /** * @@ -4786,7 +5178,7 @@ public Builder setIgnoredFiles(int index, java.lang.String value) { } ensureIgnoredFilesIsMutable(); ignoredFiles_.set(index, value); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4816,7 +5208,7 @@ public Builder addIgnoredFiles(java.lang.String value) { } ensureIgnoredFilesIsMutable(); ignoredFiles_.add(value); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4843,7 +5235,7 @@ public Builder addIgnoredFiles(java.lang.String value) { public Builder addAllIgnoredFiles(java.lang.Iterable values) { ensureIgnoredFilesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ignoredFiles_); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4868,7 +5260,7 @@ public Builder addAllIgnoredFiles(java.lang.Iterable values) { */ public Builder clearIgnoredFiles() { ignoredFiles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); ; onChanged(); return this; @@ -4900,7 +5292,7 @@ public Builder addIgnoredFilesBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureIgnoredFilesIsMutable(); ignoredFiles_.add(value); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4912,7 +5304,7 @@ private void ensureIncludedFilesIsMutable() { if (!includedFiles_.isModifiable()) { includedFiles_ = new com.google.protobuf.LazyStringArrayList(includedFiles_); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; } /** * @@ -5027,7 +5419,7 @@ public Builder setIncludedFiles(int index, java.lang.String value) { } ensureIncludedFilesIsMutable(); includedFiles_.set(index, value); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5056,7 +5448,7 @@ public Builder addIncludedFiles(java.lang.String value) { } ensureIncludedFilesIsMutable(); includedFiles_.add(value); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5082,7 +5474,7 @@ public Builder addIncludedFiles(java.lang.String value) { public Builder addAllIncludedFiles(java.lang.Iterable values) { ensureIncludedFilesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includedFiles_); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5106,7 +5498,7 @@ public Builder addAllIncludedFiles(java.lang.Iterable values) */ public Builder clearIncludedFiles() { includedFiles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); ; onChanged(); return this; @@ -5137,7 +5529,7 @@ public Builder addIncludedFilesBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureIncludedFilesIsMutable(); includedFiles_.add(value); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5204,7 +5596,7 @@ public Builder setFilter(java.lang.String value) { throw new NullPointerException(); } filter_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -5221,7 +5613,7 @@ public Builder setFilter(java.lang.String value) { */ public Builder clearFilter() { filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); onChanged(); return this; } @@ -5243,10 +5635,239 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); filter_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + private com.google.cloudbuild.v1.GitRepoSource sourceToBuild_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloudbuild.v1.GitRepoSource, + com.google.cloudbuild.v1.GitRepoSource.Builder, + com.google.cloudbuild.v1.GitRepoSourceOrBuilder> + sourceToBuildBuilder_; + /** + * + * + *
+     * 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; + * + * @return Whether the sourceToBuild field is set. + */ + public boolean hasSourceToBuild() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * + * + *
+     * 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; + * + * @return The sourceToBuild. + */ + public com.google.cloudbuild.v1.GitRepoSource getSourceToBuild() { + if (sourceToBuildBuilder_ == null) { + return sourceToBuild_ == null + ? com.google.cloudbuild.v1.GitRepoSource.getDefaultInstance() + : sourceToBuild_; + } else { + return sourceToBuildBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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; + */ + public Builder setSourceToBuild(com.google.cloudbuild.v1.GitRepoSource value) { + if (sourceToBuildBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceToBuild_ = value; + } else { + sourceToBuildBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + */ + public Builder setSourceToBuild( + com.google.cloudbuild.v1.GitRepoSource.Builder builderForValue) { + if (sourceToBuildBuilder_ == null) { + sourceToBuild_ = builderForValue.build(); + } else { + sourceToBuildBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + */ + public Builder mergeSourceToBuild(com.google.cloudbuild.v1.GitRepoSource value) { + if (sourceToBuildBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) + && sourceToBuild_ != null + && sourceToBuild_ != com.google.cloudbuild.v1.GitRepoSource.getDefaultInstance()) { + getSourceToBuildBuilder().mergeFrom(value); + } else { + sourceToBuild_ = value; + } + } else { + sourceToBuildBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + */ + public Builder clearSourceToBuild() { + bitField0_ = (bitField0_ & ~0x00080000); + sourceToBuild_ = null; + if (sourceToBuildBuilder_ != null) { + sourceToBuildBuilder_.dispose(); + sourceToBuildBuilder_ = null; + } onChanged(); return this; } + /** + * + * + *
+     * 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; + */ + public com.google.cloudbuild.v1.GitRepoSource.Builder getSourceToBuildBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getSourceToBuildFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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; + */ + public com.google.cloudbuild.v1.GitRepoSourceOrBuilder getSourceToBuildOrBuilder() { + if (sourceToBuildBuilder_ != null) { + return sourceToBuildBuilder_.getMessageOrBuilder(); + } else { + return sourceToBuild_ == null + ? com.google.cloudbuild.v1.GitRepoSource.getDefaultInstance() + : sourceToBuild_; + } + } + /** + * + * + *
+     * 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; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloudbuild.v1.GitRepoSource, + com.google.cloudbuild.v1.GitRepoSource.Builder, + com.google.cloudbuild.v1.GitRepoSourceOrBuilder> + getSourceToBuildFieldBuilder() { + if (sourceToBuildBuilder_ == null) { + sourceToBuildBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloudbuild.v1.GitRepoSource, + com.google.cloudbuild.v1.GitRepoSource.Builder, + com.google.cloudbuild.v1.GitRepoSourceOrBuilder>( + getSourceToBuild(), getParentForChildren(), isClean()); + sourceToBuild_ = null; + } + return sourceToBuildBuilder_; + } private java.lang.Object serviceAccount_ = ""; /** @@ -5322,7 +5943,7 @@ public Builder setServiceAccount(java.lang.String value) { throw new NullPointerException(); } serviceAccount_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -5343,7 +5964,7 @@ public Builder setServiceAccount(java.lang.String value) { */ public Builder clearServiceAccount() { serviceAccount_ = getDefaultInstance().getServiceAccount(); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00100000); onChanged(); return this; } @@ -5369,7 +5990,7 @@ public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); serviceAccount_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -5394,7 +6015,7 @@ public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { * @return Whether the repositoryEventConfig field is set. */ public boolean hasRepositoryEventConfig() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00200000) != 0); } /** * @@ -5438,7 +6059,7 @@ public Builder setRepositoryEventConfig(com.google.cloudbuild.v1.RepositoryEvent } else { repositoryEventConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -5460,7 +6081,7 @@ public Builder setRepositoryEventConfig( } else { repositoryEventConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -5478,7 +6099,7 @@ public Builder setRepositoryEventConfig( public Builder mergeRepositoryEventConfig( com.google.cloudbuild.v1.RepositoryEventConfig value) { if (repositoryEventConfigBuilder_ == null) { - if (((bitField0_ & 0x00080000) != 0) + if (((bitField0_ & 0x00200000) != 0) && repositoryEventConfig_ != null && repositoryEventConfig_ != com.google.cloudbuild.v1.RepositoryEventConfig.getDefaultInstance()) { @@ -5489,7 +6110,7 @@ public Builder mergeRepositoryEventConfig( } else { repositoryEventConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -5505,7 +6126,7 @@ public Builder mergeRepositoryEventConfig( * */ public Builder clearRepositoryEventConfig() { - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00200000); repositoryEventConfig_ = null; if (repositoryEventConfigBuilder_ != null) { repositoryEventConfigBuilder_.dispose(); @@ -5527,7 +6148,7 @@ public Builder clearRepositoryEventConfig() { */ public com.google.cloudbuild.v1.RepositoryEventConfig.Builder getRepositoryEventConfigBuilder() { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00200000; onChanged(); return getRepositoryEventConfigFieldBuilder().getBuilder(); } diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildTriggerOrBuilder.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildTriggerOrBuilder.java index 83be475e06d3..15c532a33201 100644 --- a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildTriggerOrBuilder.java +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/BuildTriggerOrBuilder.java @@ -477,6 +477,41 @@ public interface BuildTriggerOrBuilder */ com.google.protobuf.ByteString getFilenameBytes(); + /** + * + * + *
+   * The file source describing the local or remote Build template.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + * + * @return Whether the gitFileSource field is set. + */ + boolean hasGitFileSource(); + /** + * + * + *
+   * The file source describing the local or remote Build template.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + * + * @return The gitFileSource. + */ + com.google.cloudbuild.v1.GitFileSource getGitFileSource(); + /** + * + * + *
+   * The file source describing the local or remote Build template.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource git_file_source = 24; + */ + com.google.cloudbuild.v1.GitFileSourceOrBuilder getGitFileSourceOrBuilder(); + /** * * @@ -778,6 +813,56 @@ java.lang.String getSubstitutionsOrDefault( */ com.google.protobuf.ByteString getFilterBytes(); + /** + * + * + *
+   * 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; + * + * @return Whether the sourceToBuild field is set. + */ + 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; + * + * @return The sourceToBuild. + */ + com.google.cloudbuild.v1.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; + */ + com.google.cloudbuild.v1.GitRepoSourceOrBuilder getSourceToBuildOrBuilder(); + /** * * diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/Cloudbuild.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/Cloudbuild.java index 527061fcfb77..5a20d845c763 100644 --- a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/Cloudbuild.java +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/Cloudbuild.java @@ -215,6 +215,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_devtools_cloudbuild_v1_ApprovalResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_devtools_cloudbuild_v1_ApprovalResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_cloudbuild_v1_GitRepoSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_cloudbuild_v1_GitRepoSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_cloudbuild_v1_GitFileSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_cloudbuild_v1_GitFileSource_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_devtools_cloudbuild_v1_BuildTrigger_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -287,6 +295,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_devtools_cloudbuild_v1_ReceiveTriggerWebhookResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_devtools_cloudbuild_v1_ReceiveTriggerWebhookResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseSecrets_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseSecrets_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_devtools_cloudbuild_v1_WorkerPool_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -582,375 +598,419 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".ApprovalResult.DecisionB\004\342A\001\002\022\025\n\007commen" + "t\030\005 \001(\tB\004\342A\001\001\022\021\n\003url\030\006 \001(\tB\004\342A\001\001\"@\n\010Deci" + "sion\022\030\n\024DECISION_UNSPECIFIED\020\000\022\014\n\010APPROV" - + "ED\020\001\022\014\n\010REJECTED\020\002\"\305\010\n\014BuildTrigger\022\025\n\rr" - + "esource_name\030\" \001(\t\022\020\n\002id\030\001 \001(\tB\004\342A\001\003\022\023\n\013" - + "description\030\n \001(\t\022\014\n\004name\030\025 \001(\t\022\014\n\004tags\030" - + "\023 \003(\t\022C\n\020trigger_template\030\007 \001(\0132).google" - + ".devtools.cloudbuild.v1.RepoSource\022A\n\006gi" - + "thub\030\r \001(\01321.google.devtools.cloudbuild." - + "v1.GitHubEventsConfig\022B\n\rpubsub_config\030\035" - + " \001(\0132+.google.devtools.cloudbuild.v1.Pub" - + "subConfig\022D\n\016webhook_config\030\037 \001(\0132,.goog" - + "le.devtools.cloudbuild.v1.WebhookConfig\022" - + "\024\n\nautodetect\030\022 \001(\010H\000\0225\n\005build\030\004 \001(\0132$.g" - + "oogle.devtools.cloudbuild.v1.BuildH\000\022\022\n\010" - + "filename\030\010 \001(\tH\000\0225\n\013create_time\030\005 \001(\0132\032." - + "google.protobuf.TimestampB\004\342A\001\003\022\020\n\010disab" - + "led\030\t \001(\010\022U\n\rsubstitutions\030\013 \003(\0132>.googl" - + "e.devtools.cloudbuild.v1.BuildTrigger.Su" - + "bstitutionsEntry\022\025\n\rignored_files\030\017 \003(\t\022" - + "\026\n\016included_files\030\020 \003(\t\022\024\n\006filter\030\036 \001(\tB" - + "\004\342A\001\001\022?\n\017service_account\030! \001(\tB&\372A#\n!iam" - + ".googleapis.com/ServiceAccount\022U\n\027reposi" - + "tory_event_config\030\' \001(\01324.google.devtool" - + "s.cloudbuild.v1.RepositoryEventConfig\0324\n" - + "\022SubstitutionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001:\242\001\352A\236\001\n&cloudbuild.googleapi" - + "s.com/BuildTrigger\022%projects/{project}/t" - + "riggers/{trigger}\022:projects/{project}/lo" - + "cations/{location}/triggers/{trigger}*\010t" - + "riggers2\007triggerB\020\n\016build_template\"\266\003\n\025R" - + "epositoryEventConfig\022=\n\nrepository\030\001 \001(\t" - + "B)\372A&\n$cloudbuild.googleapis.com/Reposit" - + "ory\022b\n\017repository_type\030\002 \001(\0162C.google.de" - + "vtools.cloudbuild.v1.RepositoryEventConf" - + "ig.RepositoryTypeB\004\342A\001\003\022H\n\014pull_request\030" - + "\003 \001(\01320.google.devtools.cloudbuild.v1.Pu" - + "llRequestFilterH\000\0229\n\004push\030\004 \001(\0132).google" - + ".devtools.cloudbuild.v1.PushFilterH\000\"k\n\016" - + "RepositoryType\022\037\n\033REPOSITORY_TYPE_UNSPEC" - + "IFIED\020\000\022\n\n\006GITHUB\020\001\022\025\n\021GITHUB_ENTERPRISE" - + "\020\002\022\025\n\021GITLAB_ENTERPRISE\020\003B\010\n\006filter\"\334\001\n\022" - + "GitHubEventsConfig\022\033\n\017installation_id\030\001 " - + "\001(\003B\002\030\001\022\r\n\005owner\030\006 \001(\t\022\014\n\004name\030\007 \001(\t\022H\n\014" - + "pull_request\030\004 \001(\01320.google.devtools.clo" - + "udbuild.v1.PullRequestFilterH\000\0229\n\004push\030\005" - + " \001(\0132).google.devtools.cloudbuild.v1.Pus" - + "hFilterH\000B\007\n\005event\"\200\003\n\014PubsubConfig\022A\n\014s" - + "ubscription\030\001 \001(\tB+\342A\001\003\372A$\n\"pubsub.googl" - + "eapis.com/Subscription\022/\n\005topic\030\002 \001(\tB \372" - + "A\035\n\033pubsub.googleapis.com/Topic\022E\n\025servi" - + "ce_account_email\030\003 \001(\tB&\372A#\n!iam.googlea" - + "pis.com/ServiceAccount\022@\n\005state\030\004 \001(\01621." - + "google.devtools.cloudbuild.v1.PubsubConf" - + "ig.State\"s\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000" - + "\022\006\n\002OK\020\001\022\030\n\024SUBSCRIPTION_DELETED\020\002\022\021\n\rTO" - + "PIC_DELETED\020\003\022\036\n\032SUBSCRIPTION_MISCONFIGU" - + "RED\020\004\"\344\001\n\rWebhookConfig\022E\n\006secret\030\003 \001(\tB" - + "3\342A\001\002\372A,\n*secretmanager.googleapis.com/S" - + "ecretVersionH\000\022A\n\005state\030\004 \001(\01622.google.d" - + "evtools.cloudbuild.v1.WebhookConfig.Stat" - + "e\":\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\006\n\002OK\020" - + "\001\022\022\n\016SECRET_DELETED\020\002B\r\n\013auth_method\"\224\002\n" - + "\021PullRequestFilter\022\020\n\006branch\030\002 \001(\tH\000\022X\n\017" - + "comment_control\030\005 \001(\0162?.google.devtools." - + "cloudbuild.v1.PullRequestFilter.CommentC" - + "ontrol\022\024\n\014invert_regex\030\006 \001(\010\"r\n\016CommentC" - + "ontrol\022\025\n\021COMMENTS_DISABLED\020\000\022\024\n\020COMMENT" - + "S_ENABLED\020\001\0223\n/COMMENTS_ENABLED_FOR_EXTE" - + "RNAL_CONTRIBUTORS_ONLY\020\002B\t\n\007git_ref\"N\n\nP" - + "ushFilter\022\020\n\006branch\030\002 \001(\tH\000\022\r\n\003tag\030\003 \001(\t" - + "H\000\022\024\n\014invert_regex\030\004 \001(\010B\t\n\007git_ref\"\266\001\n\031" - + "CreateBuildTriggerRequest\022;\n\006parent\030\003 \001(" - + "\tB+\372A(\022&cloudbuild.googleapis.com/BuildT" - + "rigger\022\030\n\nproject_id\030\001 \001(\tB\004\342A\001\002\022B\n\007trig" - + "ger\030\002 \001(\0132+.google.devtools.cloudbuild.v" - + "1.BuildTriggerB\004\342A\001\002\"\207\001\n\026GetBuildTrigger" - + "Request\0229\n\004name\030\003 \001(\tB+\372A(\n&cloudbuild.g" - + "oogleapis.com/BuildTrigger\022\030\n\nproject_id" - + "\030\001 \001(\tB\004\342A\001\002\022\030\n\ntrigger_id\030\002 \001(\tB\004\342A\001\002\"\230" - + "\001\n\030ListBuildTriggersRequest\022;\n\006parent\030\004 " - + "\001(\tB+\372A(\022&cloudbuild.googleapis.com/Buil" - + "dTrigger\022\030\n\nproject_id\030\001 \001(\tB\004\342A\001\002\022\021\n\tpa" - + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"s\n\031Lis" - + "tBuildTriggersResponse\022=\n\010triggers\030\001 \003(\013" - + "2+.google.devtools.cloudbuild.v1.BuildTr" - + "igger\022\027\n\017next_page_token\030\002 \001(\t\"\212\001\n\031Delet" - + "eBuildTriggerRequest\0229\n\004name\030\003 \001(\tB+\372A(\n" - + "&cloudbuild.googleapis.com/BuildTrigger\022" - + "\030\n\nproject_id\030\001 \001(\tB\004\342A\001\002\022\030\n\ntrigger_id\030" - + "\002 \001(\tB\004\342A\001\002\"\223\001\n\031UpdateBuildTriggerReques" - + "t\022\030\n\nproject_id\030\001 \001(\tB\004\342A\001\002\022\030\n\ntrigger_i" - + "d\030\002 \001(\tB\004\342A\001\002\022B\n\007trigger\030\003 \001(\0132+.google." - + "devtools.cloudbuild.v1.BuildTriggerB\004\342A\001" - + "\002\"\312\013\n\014BuildOptions\022L\n\026source_provenance_" - + "hash\030\001 \003(\0162,.google.devtools.cloudbuild." - + "v1.Hash.HashType\022Y\n\027requested_verify_opt" - + "ion\030\002 \001(\01628.google.devtools.cloudbuild.v" - + "1.BuildOptions.VerifyOption\022M\n\014machine_t" - + "ype\030\003 \001(\01627.google.devtools.cloudbuild.v" - + "1.BuildOptions.MachineType\022\024\n\014disk_size_" - + "gb\030\006 \001(\003\022[\n\023substitution_option\030\004 \001(\0162>." + + "ED\020\001\022\014\n\010REJECTED\020\002\"\256\002\n\rGitRepoSource\022\013\n\003" + + "uri\030\001 \001(\t\022?\n\nrepository\030\006 \001(\tB)\372A&\n$clou" + + "dbuild.googleapis.com/RepositoryH\000\022\013\n\003re" + + "f\030\002 \001(\t\022H\n\trepo_type\030\003 \001(\01625.google.devt" + + "ools.cloudbuild.v1.GitFileSource.RepoTyp" + + "e\022Y\n\030github_enterprise_config\030\004 \001(\tB5\372A2" + + "\n0cloudbuild.googleapis.com/GithubEnterp" + + "riseConfigH\001B\010\n\006sourceB\023\n\021enterprise_con" + + "fig\"\247\003\n\rGitFileSource\022\014\n\004path\030\001 \001(\t\022\013\n\003u" + + "ri\030\002 \001(\t\022?\n\nrepository\030\007 \001(\tB)\372A&\n$cloud" + + "build.googleapis.com/RepositoryH\000\022H\n\trep" + + "o_type\030\003 \001(\01625.google.devtools.cloudbuil" + + "d.v1.GitFileSource.RepoType\022\020\n\010revision\030" + + "\004 \001(\t\022Y\n\030github_enterprise_config\030\005 \001(\tB" + + "5\372A2\n0cloudbuild.googleapis.com/GithubEn" + + "terpriseConfigH\001\"d\n\010RepoType\022\013\n\007UNKNOWN\020" + + "\000\022\035\n\031CLOUD_SOURCE_REPOSITORIES\020\001\022\n\n\006GITH" + + "UB\020\002\022\024\n\020BITBUCKET_SERVER\020\003\022\n\n\006GITLAB\020\004B\010" + + "\n\006sourceB\023\n\021enterprise_config\"\325\t\n\014BuildT" + + "rigger\022\025\n\rresource_name\030\" \001(\t\022\020\n\002id\030\001 \001(" + + "\tB\004\342A\001\003\022\023\n\013description\030\n \001(\t\022\014\n\004name\030\025 \001" + + "(\t\022\014\n\004tags\030\023 \003(\t\022C\n\020trigger_template\030\007 \001" + + "(\0132).google.devtools.cloudbuild.v1.RepoS" + + "ource\022A\n\006github\030\r \001(\01321.google.devtools." + + "cloudbuild.v1.GitHubEventsConfig\022B\n\rpubs" + + "ub_config\030\035 \001(\0132+.google.devtools.cloudb" + + "uild.v1.PubsubConfig\022D\n\016webhook_config\030\037" + + " \001(\0132,.google.devtools.cloudbuild.v1.Web" + + "hookConfig\022\024\n\nautodetect\030\022 \001(\010H\000\0225\n\005buil" + + "d\030\004 \001(\0132$.google.devtools.cloudbuild.v1." + + "BuildH\000\022\022\n\010filename\030\010 \001(\tH\000\022G\n\017git_file_" + + "source\030\030 \001(\0132,.google.devtools.cloudbuil" + + "d.v1.GitFileSourceH\000\0225\n\013create_time\030\005 \001(" + + "\0132\032.google.protobuf.TimestampB\004\342A\001\003\022\020\n\010d" + + "isabled\030\t \001(\010\022U\n\rsubstitutions\030\013 \003(\0132>.g" + + "oogle.devtools.cloudbuild.v1.BuildTrigge" + + "r.SubstitutionsEntry\022\025\n\rignored_files\030\017 " + + "\003(\t\022\026\n\016included_files\030\020 \003(\t\022\024\n\006filter\030\036 " + + "\001(\tB\004\342A\001\001\022E\n\017source_to_build\030\032 \001(\0132,.goo" + + "gle.devtools.cloudbuild.v1.GitRepoSource" + + "\022?\n\017service_account\030! \001(\tB&\372A#\n!iam.goog" + + "leapis.com/ServiceAccount\022U\n\027repository_" + + "event_config\030\' \001(\01324.google.devtools.clo" + + "udbuild.v1.RepositoryEventConfig\0324\n\022Subs" + + "titutionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001:\242\001\352A\236\001\n&cloudbuild.googleapis.com" + + "/BuildTrigger\022%projects/{project}/trigge" + + "rs/{trigger}\022:projects/{project}/locatio" + + "ns/{location}/triggers/{trigger}*\010trigge" + + "rs2\007triggerB\020\n\016build_template\"\266\003\n\025Reposi" + + "toryEventConfig\022=\n\nrepository\030\001 \001(\tB)\372A&" + + "\n$cloudbuild.googleapis.com/Repository\022b" + + "\n\017repository_type\030\002 \001(\0162C.google.devtool" + + "s.cloudbuild.v1.RepositoryEventConfig.Re" + + "positoryTypeB\004\342A\001\003\022H\n\014pull_request\030\003 \001(\013" + + "20.google.devtools.cloudbuild.v1.PullReq" + + "uestFilterH\000\0229\n\004push\030\004 \001(\0132).google.devt" + + "ools.cloudbuild.v1.PushFilterH\000\"k\n\016Repos" + + "itoryType\022\037\n\033REPOSITORY_TYPE_UNSPECIFIED" + + "\020\000\022\n\n\006GITHUB\020\001\022\025\n\021GITHUB_ENTERPRISE\020\002\022\025\n" + + "\021GITLAB_ENTERPRISE\020\003B\010\n\006filter\"\334\001\n\022GitHu" + + "bEventsConfig\022\033\n\017installation_id\030\001 \001(\003B\002" + + "\030\001\022\r\n\005owner\030\006 \001(\t\022\014\n\004name\030\007 \001(\t\022H\n\014pull_" + + "request\030\004 \001(\01320.google.devtools.cloudbui" + + "ld.v1.PullRequestFilterH\000\0229\n\004push\030\005 \001(\0132" + + ").google.devtools.cloudbuild.v1.PushFilt" + + "erH\000B\007\n\005event\"\200\003\n\014PubsubConfig\022A\n\014subscr" + + "iption\030\001 \001(\tB+\342A\001\003\372A$\n\"pubsub.googleapis" + + ".com/Subscription\022/\n\005topic\030\002 \001(\tB \372A\035\n\033p" + + "ubsub.googleapis.com/Topic\022E\n\025service_ac" + + "count_email\030\003 \001(\tB&\372A#\n!iam.googleapis.c" + + "om/ServiceAccount\022@\n\005state\030\004 \001(\01621.googl" + + "e.devtools.cloudbuild.v1.PubsubConfig.St" + + "ate\"s\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\006\n\002O" + + "K\020\001\022\030\n\024SUBSCRIPTION_DELETED\020\002\022\021\n\rTOPIC_D" + + "ELETED\020\003\022\036\n\032SUBSCRIPTION_MISCONFIGURED\020\004" + + "\"\344\001\n\rWebhookConfig\022E\n\006secret\030\003 \001(\tB3\342A\001\002" + + "\372A,\n*secretmanager.googleapis.com/Secret" + + "VersionH\000\022A\n\005state\030\004 \001(\01622.google.devtoo" + + "ls.cloudbuild.v1.WebhookConfig.State\":\n\005" + + "State\022\025\n\021STATE_UNSPECIFIED\020\000\022\006\n\002OK\020\001\022\022\n\016" + + "SECRET_DELETED\020\002B\r\n\013auth_method\"\224\002\n\021Pull" + + "RequestFilter\022\020\n\006branch\030\002 \001(\tH\000\022X\n\017comme" + + "nt_control\030\005 \001(\0162?.google.devtools.cloud" + + "build.v1.PullRequestFilter.CommentContro" + + "l\022\024\n\014invert_regex\030\006 \001(\010\"r\n\016CommentContro" + + "l\022\025\n\021COMMENTS_DISABLED\020\000\022\024\n\020COMMENTS_ENA" + + "BLED\020\001\0223\n/COMMENTS_ENABLED_FOR_EXTERNAL_" + + "CONTRIBUTORS_ONLY\020\002B\t\n\007git_ref\"N\n\nPushFi" + + "lter\022\020\n\006branch\030\002 \001(\tH\000\022\r\n\003tag\030\003 \001(\tH\000\022\024\n" + + "\014invert_regex\030\004 \001(\010B\t\n\007git_ref\"\266\001\n\031Creat" + + "eBuildTriggerRequest\022;\n\006parent\030\003 \001(\tB+\372A" + + "(\022&cloudbuild.googleapis.com/BuildTrigge" + + "r\022\030\n\nproject_id\030\001 \001(\tB\004\342A\001\002\022B\n\007trigger\030\002" + + " \001(\0132+.google.devtools.cloudbuild.v1.Bui" + + "ldTriggerB\004\342A\001\002\"\207\001\n\026GetBuildTriggerReque" + + "st\0229\n\004name\030\003 \001(\tB+\372A(\n&cloudbuild.google" + + "apis.com/BuildTrigger\022\030\n\nproject_id\030\001 \001(" + + "\tB\004\342A\001\002\022\030\n\ntrigger_id\030\002 \001(\tB\004\342A\001\002\"\230\001\n\030Li" + + "stBuildTriggersRequest\022;\n\006parent\030\004 \001(\tB+" + + "\372A(\022&cloudbuild.googleapis.com/BuildTrig" + + "ger\022\030\n\nproject_id\030\001 \001(\tB\004\342A\001\002\022\021\n\tpage_si" + + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"s\n\031ListBuil" + + "dTriggersResponse\022=\n\010triggers\030\001 \003(\0132+.go" + + "ogle.devtools.cloudbuild.v1.BuildTrigger" + + "\022\027\n\017next_page_token\030\002 \001(\t\"\212\001\n\031DeleteBuil" + + "dTriggerRequest\0229\n\004name\030\003 \001(\tB+\372A(\n&clou" + + "dbuild.googleapis.com/BuildTrigger\022\030\n\npr" + + "oject_id\030\001 \001(\tB\004\342A\001\002\022\030\n\ntrigger_id\030\002 \001(\t" + + "B\004\342A\001\002\"\223\001\n\031UpdateBuildTriggerRequest\022\030\n\n" + + "project_id\030\001 \001(\tB\004\342A\001\002\022\030\n\ntrigger_id\030\002 \001" + + "(\tB\004\342A\001\002\022B\n\007trigger\030\003 \001(\0132+.google.devto" + + "ols.cloudbuild.v1.BuildTriggerB\004\342A\001\002\"\312\013\n" + + "\014BuildOptions\022L\n\026source_provenance_hash\030" + + "\001 \003(\0162,.google.devtools.cloudbuild.v1.Ha" + + "sh.HashType\022Y\n\027requested_verify_option\030\002" + + " \001(\01628.google.devtools.cloudbuild.v1.Bui" + + "ldOptions.VerifyOption\022M\n\014machine_type\030\003" + + " \001(\01627.google.devtools.cloudbuild.v1.Bui" + + "ldOptions.MachineType\022\024\n\014disk_size_gb\030\006 " + + "\001(\003\022[\n\023substitution_option\030\004 \001(\0162>.googl" + + "e.devtools.cloudbuild.v1.BuildOptions.Su" + + "bstitutionOption\022\035\n\025dynamic_substitution" + + "s\030\021 \001(\010\022\\\n\024log_streaming_option\030\005 \001(\0162>." + "google.devtools.cloudbuild.v1.BuildOptio" - + "ns.SubstitutionOption\022\035\n\025dynamic_substit" - + "utions\030\021 \001(\010\022\\\n\024log_streaming_option\030\005 \001" - + "(\0162>.google.devtools.cloudbuild.v1.Build" - + "Options.LogStreamingOption\022\027\n\013worker_poo" - + "l\030\007 \001(\tB\002\030\001\022J\n\004pool\030\023 \001(\01326.google.devto" - + "ols.cloudbuild.v1.BuildOptions.PoolOptio" - + "nB\004\342A\001\001\022H\n\007logging\030\013 \001(\01627.google.devtoo" - + "ls.cloudbuild.v1.BuildOptions.LoggingMod" - + "e\022\013\n\003env\030\014 \003(\t\022\022\n\nsecret_env\030\r \003(\t\0226\n\007vo" - + "lumes\030\016 \003(\0132%.google.devtools.cloudbuild" - + ".v1.Volume\022q\n\034default_logs_bucket_behavi" - + "or\030\025 \001(\0162E.google.devtools.cloudbuild.v1" - + ".BuildOptions.DefaultLogsBucketBehaviorB" - + "\004\342A\001\001\032E\n\nPoolOption\0227\n\004name\030\001 \001(\tB)\372A&\n$" - + "cloudbuild.googleapis.com/WorkerPool\".\n\014" - + "VerifyOption\022\020\n\014NOT_VERIFIED\020\000\022\014\n\010VERIFI" - + "ED\020\001\"w\n\013MachineType\022\017\n\013UNSPECIFIED\020\000\022\020\n\014" - + "N1_HIGHCPU_8\020\001\022\021\n\rN1_HIGHCPU_32\020\002\022\020\n\014E2_" - + "HIGHCPU_8\020\005\022\021\n\rE2_HIGHCPU_32\020\006\022\r\n\tE2_MED" - + "IUM\020\007\"5\n\022SubstitutionOption\022\016\n\nMUST_MATC" - + "H\020\000\022\017\n\013ALLOW_LOOSE\020\001\"G\n\022LogStreamingOpti" - + "on\022\022\n\016STREAM_DEFAULT\020\000\022\r\n\tSTREAM_ON\020\001\022\016\n" - + "\nSTREAM_OFF\020\002\"|\n\013LoggingMode\022\027\n\023LOGGING_" - + "UNSPECIFIED\020\000\022\n\n\006LEGACY\020\001\022\014\n\010GCS_ONLY\020\002\022" - + "\030\n\020STACKDRIVER_ONLY\020\003\032\002\010\001\022\026\n\022CLOUD_LOGGI" - + "NG_ONLY\020\005\022\010\n\004NONE\020\004\"i\n\031DefaultLogsBucket" - + "Behavior\022,\n(DEFAULT_LOGS_BUCKET_BEHAVIOR" - + "_UNSPECIFIED\020\000\022\036\n\032REGIONAL_USER_OWNED_BU" - + "CKET\020\001\"\205\001\n\034ReceiveTriggerWebhookRequest\022" - + "\014\n\004name\030\005 \001(\t\022\"\n\004body\030\001 \001(\0132\024.google.api" - + ".HttpBody\022\022\n\nproject_id\030\002 \001(\t\022\017\n\007trigger" - + "\030\003 \001(\t\022\016\n\006secret\030\004 \001(\t\"\037\n\035ReceiveTrigger" - + "WebhookResponse\"\235\006\n\nWorkerPool\022\022\n\004name\030\001" - + " \001(\tB\004\342A\001\003\022\024\n\014display_name\030\002 \001(\t\022\021\n\003uid\030" - + "\003 \001(\tB\004\342A\001\003\022O\n\013annotations\030\004 \003(\0132:.googl" - + "e.devtools.cloudbuild.v1.WorkerPool.Anno" - + "tationsEntry\0225\n\013create_time\030\005 \001(\0132\032.goog" - + "le.protobuf.TimestampB\004\342A\001\003\0225\n\013update_ti" - + "me\030\006 \001(\0132\032.google.protobuf.TimestampB\004\342A" - + "\001\003\0225\n\013delete_time\030\007 \001(\0132\032.google.protobu" - + "f.TimestampB\004\342A\001\003\022D\n\005state\030\010 \001(\0162/.googl" - + "e.devtools.cloudbuild.v1.WorkerPool.Stat" - + "eB\004\342A\001\003\022T\n\026private_pool_v1_config\030\014 \001(\0132" - + "2.google.devtools.cloudbuild.v1.PrivateP" - + "oolV1ConfigH\000\022\022\n\004etag\030\013 \001(\tB\004\342A\001\003\0322\n\020Ann" - + "otationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001\"b\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n" - + "\010CREATING\020\001\022\013\n\007RUNNING\020\002\022\014\n\010DELETING\020\003\022\013" - + "\n\007DELETED\020\004\022\014\n\010UPDATING\020\005:\211\001\352A\205\001\n$cloudb" - + "uild.googleapis.com/WorkerPool\022Aprojects" - + "/{project}/locations/{location}/workerPo" - + "ols/{worker_pool}*\013workerPools2\nworkerPo" - + "olR\001\001B\010\n\006config\"\274\004\n\023PrivatePoolV1Config\022" - + "V\n\rworker_config\030\001 \001(\0132?.google.devtools" - + ".cloudbuild.v1.PrivatePoolV1Config.Worke" - + "rConfig\022X\n\016network_config\030\002 \001(\0132@.google" - + ".devtools.cloudbuild.v1.PrivatePoolV1Con" - + "fig.NetworkConfig\032:\n\014WorkerConfig\022\024\n\014mac" - + "hine_type\030\001 \001(\t\022\024\n\014disk_size_gb\030\002 \001(\003\032\266\002" - + "\n\rNetworkConfig\022@\n\016peered_network\030\001 \001(\tB" - + "(\342A\002\005\002\372A \n\036compute.googleapis.com/Networ" - + "k\022d\n\regress_option\030\002 \001(\0162M.google.devtoo" - + "ls.cloudbuild.v1.PrivatePoolV1Config.Net" - + "workConfig.EgressOption\022%\n\027peered_networ" - + "k_ip_range\030\003 \001(\tB\004\342A\001\005\"V\n\014EgressOption\022\035" - + "\n\031EGRESS_OPTION_UNSPECIFIED\020\000\022\024\n\020NO_PUBL" - + "IC_EGRESS\020\001\022\021\n\rPUBLIC_EGRESS\020\002\"\321\001\n\027Creat" - + "eWorkerPoolRequest\022:\n\006parent\030\001 \001(\tB*\342A\001\002" - + "\372A#\n!locations.googleapis.com/Location\022D" - + "\n\013worker_pool\030\002 \001(\0132).google.devtools.cl", - "oudbuild.v1.WorkerPoolB\004\342A\001\002\022\035\n\016worker_p" - + "ool_id\030\003 \001(\tB\005\342A\002\005\002\022\025\n\rvalidate_only\030\004 \001" - + "(\010\"S\n\024GetWorkerPoolRequest\022;\n\004name\030\001 \001(\t" - + "B-\342A\001\002\372A&\n$cloudbuild.googleapis.com/Wor" - + "kerPool\"\230\001\n\027DeleteWorkerPoolRequest\022;\n\004n" - + "ame\030\001 \001(\tB-\342A\001\002\372A&\n$cloudbuild.googleapi" - + "s.com/WorkerPool\022\022\n\004etag\030\002 \001(\tB\004\342A\001\001\022\025\n\r" - + "allow_missing\030\003 \001(\010\022\025\n\rvalidate_only\030\004 \001" - + "(\010\"\247\001\n\027UpdateWorkerPoolRequest\022D\n\013worker" - + "_pool\030\001 \001(\0132).google.devtools.cloudbuild" - + ".v1.WorkerPoolB\004\342A\001\002\022/\n\013update_mask\030\002 \001(" - + "\0132\032.google.protobuf.FieldMask\022\025\n\rvalidat" - + "e_only\030\004 \001(\010\"{\n\026ListWorkerPoolsRequest\022:" - + "\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\n!locations.googl" - + "eapis.com/Location\022\021\n\tpage_size\030\002 \001(\005\022\022\n" - + "\npage_token\030\003 \001(\t\"s\n\027ListWorkerPoolsResp" - + "onse\022?\n\014worker_pools\030\001 \003(\0132).google.devt" - + "ools.cloudbuild.v1.WorkerPool\022\027\n\017next_pa" - + "ge_token\030\002 \001(\t\"\307\001\n!CreateWorkerPoolOpera" - + "tionMetadata\022>\n\013worker_pool\030\001 \001(\tB)\372A&\n$" - + "cloudbuild.googleapis.com/WorkerPool\022/\n\013" - + "create_time\030\002 \001(\0132\032.google.protobuf.Time" - + "stamp\0221\n\rcomplete_time\030\003 \001(\0132\032.google.pr" - + "otobuf.Timestamp\"\307\001\n!UpdateWorkerPoolOpe" - + "rationMetadata\022>\n\013worker_pool\030\001 \001(\tB)\372A&" - + "\n$cloudbuild.googleapis.com/WorkerPool\022/" - + "\n\013create_time\030\002 \001(\0132\032.google.protobuf.Ti" - + "mestamp\0221\n\rcomplete_time\030\003 \001(\0132\032.google." - + "protobuf.Timestamp\"\307\001\n!DeleteWorkerPoolO" - + "perationMetadata\022>\n\013worker_pool\030\001 \001(\tB)\372" - + "A&\n$cloudbuild.googleapis.com/WorkerPool" - + "\022/\n\013create_time\030\002 \001(\0132\032.google.protobuf." - + "Timestamp\0221\n\rcomplete_time\030\003 \001(\0132\032.googl" - + "e.protobuf.Timestamp2\241+\n\nCloudBuild\022\256\002\n\013" - + "CreateBuild\0221.google.devtools.cloudbuild" - + ".v1.CreateBuildRequest\032\035.google.longrunn" - + "ing.Operation\"\314\001\312A\037\n\005Build\022\026BuildOperati" - + "onMetadata\332A\020project_id,build\202\323\344\223\002^\" /v1" - + "/projects/{project_id}/builds:\005buildZ3\"*" - + "/v1/{parent=projects/*/locations/*}/buil" - + "ds:\005build\212\323\344\223\002-\022+\n\006parent\022!projects/*/lo" - + "cations/{location=*}\022\210\002\n\010GetBuild\022..goog" - + "le.devtools.cloudbuild.v1.GetBuildReques" - + "t\032$.google.devtools.cloudbuild.v1.Build\"" - + "\245\001\332A\rproject_id,id\202\323\344\223\002U\022%/v1/projects/{" - + "project_id}/builds/{id}Z,\022*/v1/{name=pro" - + "jects/*/locations/*/builds/*}\212\323\344\223\0024\0222\n\004n" - + "ame\022*projects/*/locations/{location=*}/b" - + "uilds/*\022\221\002\n\nListBuilds\0220.google.devtools" - + ".cloudbuild.v1.ListBuildsRequest\0321.googl" - + "e.devtools.cloudbuild.v1.ListBuildsRespo" - + "nse\"\235\001\332A\021project_id,filter\202\323\344\223\002P\022 /v1/pr" - + "ojects/{project_id}/buildsZ,\022*/v1/{paren" - + "t=projects/*/locations/*}/builds\212\323\344\223\002-\022+" - + "\n\006parent\022!projects/*/locations/{location" - + "=*}\022\242\002\n\013CancelBuild\0221.google.devtools.cl" - + "oudbuild.v1.CancelBuildRequest\032$.google." - + "devtools.cloudbuild.v1.Build\"\271\001\332A\rprojec" - + "t_id,id\202\323\344\223\002i\",/v1/projects/{project_id}" - + "/builds/{id}:cancel:\001*Z6\"1/v1/{name=proj" - + "ects/*/locations/*/builds/*}:cancel:\001*\212\323" - + "\344\223\0024\0222\n\004name\022*projects/*/locations/{loca" - + "tion=*}/builds/*\022\271\002\n\nRetryBuild\0220.google" - + ".devtools.cloudbuild.v1.RetryBuildReques" - + "t\032\035.google.longrunning.Operation\"\331\001\312A\037\n\005" - + "Build\022\026BuildOperationMetadata\332A\rproject_" - + "id,id\202\323\344\223\002g\"+/v1/projects/{project_id}/b" - + "uilds/{id}:retry:\001*Z5\"0/v1/{name=project" - + "s/*/locations/*/builds/*}:retry:\001*\212\323\344\223\0024" - + "\0222\n\004name\022*projects/*/locations/{location" - + "=*}/builds/*\022\301\002\n\014ApproveBuild\0222.google.d" - + "evtools.cloudbuild.v1.ApproveBuildReques" - + "t\032\035.google.longrunning.Operation\"\335\001\312A\037\n\005" - + "Build\022\026BuildOperationMetadata\332A\024name,app" - + "roval_result\202\323\344\223\002d\"&/v1/{name=projects/*" - + "/builds/*}:approve:\001*Z7\"2/v1/{name=proje" - + "cts/*/locations/*/builds/*}:approve:\001*\212\323" - + "\344\223\0024\0222\n\004name\022*projects/*/locations/{loca" - + "tion=*}/builds/*\022\262\002\n\022CreateBuildTrigger\022" - + "8.google.devtools.cloudbuild.v1.CreateBu" - + "ildTriggerRequest\032+.google.devtools.clou" - + "dbuild.v1.BuildTrigger\"\264\001\332A\022project_id,t" - + "rigger\202\323\344\223\002f\"\"/v1/projects/{project_id}/" - + "triggers:\007triggerZ7\",/v1/{parent=project" - + "s/*/locations/*}/triggers:\007trigger\212\323\344\223\002-" + + "ns.LogStreamingOption\022\027\n\013worker_pool\030\007 \001" + + "(\tB\002\030\001\022J\n\004pool\030\023 \001(\01326.google.devtools.c" + + "loudbuild.v1.BuildOptions.PoolOptionB\004\342A" + + "\001\001\022H\n\007logging\030\013 \001(\01627.google.devtools.cl" + + "oudbuild.v1.BuildOptions.LoggingMode\022\013\n\003" + + "env\030\014 \003(\t\022\022\n\nsecret_env\030\r \003(\t\0226\n\007volumes" + + "\030\016 \003(\0132%.google.devtools.cloudbuild.v1.V" + + "olume\022q\n\034default_logs_bucket_behavior\030\025 " + + "\001(\0162E.google.devtools.cloudbuild.v1.Buil" + + "dOptions.DefaultLogsBucketBehaviorB\004\342A\001\001" + + "\032E\n\nPoolOption\0227\n\004name\030\001 \001(\tB)\372A&\n$cloud" + + "build.googleapis.com/WorkerPool\".\n\014Verif" + + "yOption\022\020\n\014NOT_VERIFIED\020\000\022\014\n\010VERIFIED\020\001\"" + + "w\n\013MachineType\022\017\n\013UNSPECIFIED\020\000\022\020\n\014N1_HI" + + "GHCPU_8\020\001\022\021\n\rN1_HIGHCPU_32\020\002\022\020\n\014E2_HIGHC" + + "PU_8\020\005\022\021\n\rE2_HIGHCPU_32\020\006\022\r\n\tE2_MEDIUM\020\007" + + "\"5\n\022SubstitutionOption\022\016\n\nMUST_MATCH\020\000\022\017" + + "\n\013ALLOW_LOOSE\020\001\"G\n\022LogStreamingOption\022\022\n" + + "\016STREAM_DEFAULT\020\000\022\r\n\tSTREAM_ON\020\001\022\016\n\nSTRE" + + "AM_OFF\020\002\"|\n\013LoggingMode\022\027\n\023LOGGING_UNSPE" + + "CIFIED\020\000\022\n\n\006LEGACY\020\001\022\014\n\010GCS_ONLY\020\002\022\030\n\020ST" + + "ACKDRIVER_ONLY\020\003\032\002\010\001\022\026\n\022CLOUD_LOGGING_ON" + + "LY\020\005\022\010\n\004NONE\020\004\"i\n\031DefaultLogsBucketBehav" + + "ior\022,\n(DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSP" + + "ECIFIED\020\000\022\036\n\032REGIONAL_USER_OWNED_BUCKET\020" + + "\001\"\205\001\n\034ReceiveTriggerWebhookRequest\022\014\n\004na" + + "me\030\005 \001(\t\022\"\n\004body\030\001 \001(\0132\024.google.api.Http" + + "Body\022\022\n\nproject_id\030\002 \001(\t\022\017\n\007trigger\030\003 \001(" + + "\t\022\016\n\006secret\030\004 \001(\t\"\037\n\035ReceiveTriggerWebho" + + "okResponse\"\216\004\n\026GitHubEnterpriseConfig\022\022\n" + + "\004name\030\007 \001(\tB\004\342A\001\001\022\020\n\010host_url\030\003 \001(\t\022\024\n\006a" + + "pp_id\030\004 \001(\003B\004\342A\001\002\0225\n\013create_time\030\006 \001(\0132\032" + + ".google.protobuf.TimestampB\004\342A\001\003\022\023\n\013webh" + + "ook_key\030\010 \001(\t\022?\n\016peered_network\030\t \001(\tB\'\342" + + "A\001\001\372A \n\036compute.googleapis.com/Network\022G" + + "\n\007secrets\030\n \001(\01326.google.devtools.cloudb" + + "uild.v1.GitHubEnterpriseSecrets\022\024\n\014displ" + + "ay_name\030\013 \001(\t\022\024\n\006ssl_ca\030\014 \001(\tB\004\342A\001\001:\265\001\352A" + + "\261\001\n0cloudbuild.googleapis.com/GithubEnte" + + "rpriseConfig\0223projects/{project}/githubE" + + "nterpriseConfigs/{config}\022Hprojects/{pro" + + "ject}/locations/{location}/githubEnterpr" + + "iseConfigs/{config}\"\355\002\n\027GitHubEnterprise" + + "Secrets\022Q\n\030private_key_version_name\030\005 \001(" + + "\tB/\372A,\n*secretmanager.googleapis.com/Sec", + "retVersion\022T\n\033webhook_secret_version_nam" + + "e\030\006 \001(\tB/\372A,\n*secretmanager.googleapis.c" + + "om/SecretVersion\022R\n\031oauth_secret_version" + + "_name\030\007 \001(\tB/\372A,\n*secretmanager.googleap" + + "is.com/SecretVersion\022U\n\034oauth_client_id_" + + "version_name\030\010 \001(\tB/\372A,\n*secretmanager.g" + + "oogleapis.com/SecretVersion\"\235\006\n\nWorkerPo" + + "ol\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\024\n\014display_name\030\002" + + " \001(\t\022\021\n\003uid\030\003 \001(\tB\004\342A\001\003\022O\n\013annotations\030\004" + + " \003(\0132:.google.devtools.cloudbuild.v1.Wor" + + "kerPool.AnnotationsEntry\0225\n\013create_time\030" + + "\005 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022" + + "5\n\013update_time\030\006 \001(\0132\032.google.protobuf.T" + + "imestampB\004\342A\001\003\0225\n\013delete_time\030\007 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\004\342A\001\003\022D\n\005state\030\010" + + " \001(\0162/.google.devtools.cloudbuild.v1.Wor" + + "kerPool.StateB\004\342A\001\003\022T\n\026private_pool_v1_c" + + "onfig\030\014 \001(\01322.google.devtools.cloudbuild" + + ".v1.PrivatePoolV1ConfigH\000\022\022\n\004etag\030\013 \001(\tB" + + "\004\342A\001\003\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001\"b\n\005State\022\025\n\021STATE_UNSP" + + "ECIFIED\020\000\022\014\n\010CREATING\020\001\022\013\n\007RUNNING\020\002\022\014\n\010" + + "DELETING\020\003\022\013\n\007DELETED\020\004\022\014\n\010UPDATING\020\005:\211\001" + + "\352A\205\001\n$cloudbuild.googleapis.com/WorkerPo" + + "ol\022Aprojects/{project}/locations/{locati" + + "on}/workerPools/{worker_pool}*\013workerPoo" + + "ls2\nworkerPoolR\001\001B\010\n\006config\"\274\004\n\023PrivateP" + + "oolV1Config\022V\n\rworker_config\030\001 \001(\0132?.goo" + + "gle.devtools.cloudbuild.v1.PrivatePoolV1" + + "Config.WorkerConfig\022X\n\016network_config\030\002 " + + "\001(\0132@.google.devtools.cloudbuild.v1.Priv" + + "atePoolV1Config.NetworkConfig\032:\n\014WorkerC" + + "onfig\022\024\n\014machine_type\030\001 \001(\t\022\024\n\014disk_size" + + "_gb\030\002 \001(\003\032\266\002\n\rNetworkConfig\022@\n\016peered_ne" + + "twork\030\001 \001(\tB(\342A\002\005\002\372A \n\036compute.googleapi" + + "s.com/Network\022d\n\regress_option\030\002 \001(\0162M.g" + + "oogle.devtools.cloudbuild.v1.PrivatePool" + + "V1Config.NetworkConfig.EgressOption\022%\n\027p" + + "eered_network_ip_range\030\003 \001(\tB\004\342A\001\005\"V\n\014Eg" + + "ressOption\022\035\n\031EGRESS_OPTION_UNSPECIFIED\020" + + "\000\022\024\n\020NO_PUBLIC_EGRESS\020\001\022\021\n\rPUBLIC_EGRESS" + + "\020\002\"\321\001\n\027CreateWorkerPoolRequest\022:\n\006parent" + + "\030\001 \001(\tB*\342A\001\002\372A#\n!locations.googleapis.co" + + "m/Location\022D\n\013worker_pool\030\002 \001(\0132).google" + + ".devtools.cloudbuild.v1.WorkerPoolB\004\342A\001\002" + + "\022\035\n\016worker_pool_id\030\003 \001(\tB\005\342A\002\005\002\022\025\n\rvalid" + + "ate_only\030\004 \001(\010\"S\n\024GetWorkerPoolRequest\022;" + + "\n\004name\030\001 \001(\tB-\342A\001\002\372A&\n$cloudbuild.google" + + "apis.com/WorkerPool\"\230\001\n\027DeleteWorkerPool" + + "Request\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&\n$cloudbui" + + "ld.googleapis.com/WorkerPool\022\022\n\004etag\030\002 \001" + + "(\tB\004\342A\001\001\022\025\n\rallow_missing\030\003 \001(\010\022\025\n\rvalid" + + "ate_only\030\004 \001(\010\"\247\001\n\027UpdateWorkerPoolReque" + + "st\022D\n\013worker_pool\030\001 \001(\0132).google.devtool" + + "s.cloudbuild.v1.WorkerPoolB\004\342A\001\002\022/\n\013upda" + + "te_mask\030\002 \001(\0132\032.google.protobuf.FieldMas" + + "k\022\025\n\rvalidate_only\030\004 \001(\010\"{\n\026ListWorkerPo" + + "olsRequest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\n!loc" + + "ations.googleapis.com/Location\022\021\n\tpage_s" + + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"s\n\027ListWor" + + "kerPoolsResponse\022?\n\014worker_pools\030\001 \003(\0132)" + + ".google.devtools.cloudbuild.v1.WorkerPoo" + + "l\022\027\n\017next_page_token\030\002 \001(\t\"\307\001\n!CreateWor" + + "kerPoolOperationMetadata\022>\n\013worker_pool\030" + + "\001 \001(\tB)\372A&\n$cloudbuild.googleapis.com/Wo" + + "rkerPool\022/\n\013create_time\030\002 \001(\0132\032.google.p" + + "rotobuf.Timestamp\0221\n\rcomplete_time\030\003 \001(\013" + + "2\032.google.protobuf.Timestamp\"\307\001\n!UpdateW" + + "orkerPoolOperationMetadata\022>\n\013worker_poo" + + "l\030\001 \001(\tB)\372A&\n$cloudbuild.googleapis.com/" + + "WorkerPool\022/\n\013create_time\030\002 \001(\0132\032.google" + + ".protobuf.Timestamp\0221\n\rcomplete_time\030\003 \001" + + "(\0132\032.google.protobuf.Timestamp\"\307\001\n!Delet" + + "eWorkerPoolOperationMetadata\022>\n\013worker_p" + + "ool\030\001 \001(\tB)\372A&\n$cloudbuild.googleapis.co" + + "m/WorkerPool\022/\n\013create_time\030\002 \001(\0132\032.goog" + + "le.protobuf.Timestamp\0221\n\rcomplete_time\030\003" + + " \001(\0132\032.google.protobuf.Timestamp2\241+\n\nClo" + + "udBuild\022\256\002\n\013CreateBuild\0221.google.devtool" + + "s.cloudbuild.v1.CreateBuildRequest\032\035.goo" + + "gle.longrunning.Operation\"\314\001\312A\037\n\005Build\022\026" + + "BuildOperationMetadata\332A\020project_id,buil" + + "d\202\323\344\223\002^\" /v1/projects/{project_id}/build" + + "s:\005buildZ3\"*/v1/{parent=projects/*/locat" + + "ions/*}/builds:\005build\212\323\344\223\002-\022+\n\006parent\022!p" + + "rojects/*/locations/{location=*}\022\210\002\n\010Get" + + "Build\022..google.devtools.cloudbuild.v1.Ge" + + "tBuildRequest\032$.google.devtools.cloudbui" + + "ld.v1.Build\"\245\001\332A\rproject_id,id\202\323\344\223\002U\022%/v" + + "1/projects/{project_id}/builds/{id}Z,\022*/" + + "v1/{name=projects/*/locations/*/builds/*" + + "}\212\323\344\223\0024\0222\n\004name\022*projects/*/locations/{l" + + "ocation=*}/builds/*\022\221\002\n\nListBuilds\0220.goo" + + "gle.devtools.cloudbuild.v1.ListBuildsReq" + + "uest\0321.google.devtools.cloudbuild.v1.Lis" + + "tBuildsResponse\"\235\001\332A\021project_id,filter\202\323" + + "\344\223\002P\022 /v1/projects/{project_id}/buildsZ," + + "\022*/v1/{parent=projects/*/locations/*}/bu" + + "ilds\212\323\344\223\002-\022+\n\006parent\022!projects/*/locatio" + + "ns/{location=*}\022\242\002\n\013CancelBuild\0221.google" + + ".devtools.cloudbuild.v1.CancelBuildReque" + + "st\032$.google.devtools.cloudbuild.v1.Build" + + "\"\271\001\332A\rproject_id,id\202\323\344\223\002i\",/v1/projects/" + + "{project_id}/builds/{id}:cancel:\001*Z6\"1/v" + + "1/{name=projects/*/locations/*/builds/*}" + + ":cancel:\001*\212\323\344\223\0024\0222\n\004name\022*projects/*/loc" + + "ations/{location=*}/builds/*\022\271\002\n\nRetryBu" + + "ild\0220.google.devtools.cloudbuild.v1.Retr" + + "yBuildRequest\032\035.google.longrunning.Opera" + + "tion\"\331\001\312A\037\n\005Build\022\026BuildOperationMetadat" + + "a\332A\rproject_id,id\202\323\344\223\002g\"+/v1/projects/{p" + + "roject_id}/builds/{id}:retry:\001*Z5\"0/v1/{" + + "name=projects/*/locations/*/builds/*}:re" + + "try:\001*\212\323\344\223\0024\0222\n\004name\022*projects/*/locatio" + + "ns/{location=*}/builds/*\022\301\002\n\014ApproveBuil" + + "d\0222.google.devtools.cloudbuild.v1.Approv" + + "eBuildRequest\032\035.google.longrunning.Opera" + + "tion\"\335\001\312A\037\n\005Build\022\026BuildOperationMetadat" + + "a\332A\024name,approval_result\202\323\344\223\002d\"&/v1/{nam" + + "e=projects/*/builds/*}:approve:\001*Z7\"2/v1" + + "/{name=projects/*/locations/*/builds/*}:" + + "approve:\001*\212\323\344\223\0024\0222\n\004name\022*projects/*/loc" + + "ations/{location=*}/builds/*\022\262\002\n\022CreateB" + + "uildTrigger\0228.google.devtools.cloudbuild" + + ".v1.CreateBuildTriggerRequest\032+.google.d" + + "evtools.cloudbuild.v1.BuildTrigger\"\264\001\332A\022" + + "project_id,trigger\202\323\344\223\002f\"\"/v1/projects/{" + + "project_id}/triggers:\007triggerZ7\",/v1/{pa" + + "rent=projects/*/locations/*}/triggers:\007t" + + "rigger\212\323\344\223\002-\022+\n\006parent\022!projects/*/locat" + + "ions/{location=*}\022\263\002\n\017GetBuildTrigger\0225." + + "google.devtools.cloudbuild.v1.GetBuildTr" + + "iggerRequest\032+.google.devtools.cloudbuil" + + "d.v1.BuildTrigger\"\273\001\332A\025project_id,trigge" + + "r_id\202\323\344\223\002a\022//v1/projects/{project_id}/tr" + + "iggers/{trigger_id}Z.\022,/v1/{name=project" + + "s/*/locations/*/triggers/*}\212\323\344\223\0026\0224\n\004nam" + + "e\022,projects/*/locations/{location=*}/tri" + + "ggers/*\022\243\002\n\021ListBuildTriggers\0227.google.d" + + "evtools.cloudbuild.v1.ListBuildTriggersR" + + "equest\0328.google.devtools.cloudbuild.v1.L" + + "istBuildTriggersResponse\"\232\001\332A\nproject_id" + + "\202\323\344\223\002T\022\"/v1/projects/{project_id}/trigge" + + "rsZ.\022,/v1/{parent=projects/*/locations/*" + + "}/triggers\212\323\344\223\002-\022+\n\006parent\022!projects/*/l" + + "ocations/{location=*}\022\244\002\n\022DeleteBuildTri" + + "gger\0228.google.devtools.cloudbuild.v1.Del" + + "eteBuildTriggerRequest\032\026.google.protobuf" + + ".Empty\"\273\001\332A\025project_id,trigger_id\202\323\344\223\002a*" + + "//v1/projects/{project_id}/triggers/{tri" + + "gger_id}Z.*,/v1/{name=projects/*/locatio" + + "ns/*/triggers/*}\212\323\344\223\0026\0224\n\004name\022,projects" + + "/*/locations/{location=*}/triggers/*\022\366\002\n" + + "\022UpdateBuildTrigger\0228.google.devtools.cl" + + "oudbuild.v1.UpdateBuildTriggerRequest\032+." + + "google.devtools.cloudbuild.v1.BuildTrigg" + + "er\"\370\001\332A\035project_id,trigger_id,trigger\202\323\344" + + "\223\002\204\0012//v1/projects/{project_id}/triggers" + + "/{trigger_id}:\007triggerZH2=/v1/{trigger.r" + + "esource_name=projects/*/locations/*/trig" + + "gers/*}:\007trigger\212\323\344\223\002G\022E\n\025trigger.resour" + + "ce_name\022,projects/*/locations/{location=" + + "*}/triggers/*\022\341\002\n\017RunBuildTrigger\0225.goog" + + "le.devtools.cloudbuild.v1.RunBuildTrigge" + + "rRequest\032\035.google.longrunning.Operation\"" + + "\367\001\312A\037\n\005Build\022\026BuildOperationMetadata\332A\034p" + + "roject_id,trigger_id,source\202\323\344\223\002t\"3/v1/p" + + "rojects/{project_id}/triggers/{trigger_i" + + "d}:run:\006sourceZ5\"0/v1/{name=projects/*/l" + + "ocations/*/triggers/*}:run:\001*\212\323\344\223\0026\0224\n\004n" + + "ame\022,projects/*/locations/{location=*}/t" + + "riggers/*\022\225\002\n\025ReceiveTriggerWebhook\022;.go" + + "ogle.devtools.cloudbuild.v1.ReceiveTrigg" + + "erWebhookRequest\032<.google.devtools.cloud" + + "build.v1.ReceiveTriggerWebhookResponse\"\200" + + "\001\202\323\344\223\002z\"4/v1/projects/{project_id}/trigg" + + "ers/{trigger}:webhook:\004bodyZ<\"4/v1/{name" + + "=projects/*/locations/*/triggers/*}:webh" + + "ook:\004body\022\271\002\n\020CreateWorkerPool\0226.google." + + "devtools.cloudbuild.v1.CreateWorkerPoolR" + + "equest\032\035.google.longrunning.Operation\"\315\001" + + "\312A/\n\nWorkerPool\022!CreateWorkerPoolOperati" + + "onMetadata\332A!parent,worker_pool,worker_p" + + "ool_id\202\323\344\223\002>\"//v1/{parent=projects/*/loc" + + "ations/*}/workerPools:\013worker_pool\212\323\344\223\002-" + "\022+\n\006parent\022!projects/*/locations/{locati" - + "on=*}\022\263\002\n\017GetBuildTrigger\0225.google.devto" - + "ols.cloudbuild.v1.GetBuildTriggerRequest" - + "\032+.google.devtools.cloudbuild.v1.BuildTr" - + "igger\"\273\001\332A\025project_id,trigger_id\202\323\344\223\002a\022/" - + "/v1/projects/{project_id}/triggers/{trig" - + "ger_id}Z.\022,/v1/{name=projects/*/location" - + "s/*/triggers/*}\212\323\344\223\0026\0224\n\004name\022,projects/" - + "*/locations/{location=*}/triggers/*\022\243\002\n\021" - + "ListBuildTriggers\0227.google.devtools.clou" - + "dbuild.v1.ListBuildTriggersRequest\0328.goo" - + "gle.devtools.cloudbuild.v1.ListBuildTrig" - + "gersResponse\"\232\001\332A\nproject_id\202\323\344\223\002T\022\"/v1/" - + "projects/{project_id}/triggersZ.\022,/v1/{p" - + "arent=projects/*/locations/*}/triggers\212\323" - + "\344\223\002-\022+\n\006parent\022!projects/*/locations/{lo" - + "cation=*}\022\244\002\n\022DeleteBuildTrigger\0228.googl" - + "e.devtools.cloudbuild.v1.DeleteBuildTrig" - + "gerRequest\032\026.google.protobuf.Empty\"\273\001\332A\025" - + "project_id,trigger_id\202\323\344\223\002a*//v1/project" - + "s/{project_id}/triggers/{trigger_id}Z.*," - + "/v1/{name=projects/*/locations/*/trigger" - + "s/*}\212\323\344\223\0026\0224\n\004name\022,projects/*/locations" - + "/{location=*}/triggers/*\022\366\002\n\022UpdateBuild" - + "Trigger\0228.google.devtools.cloudbuild.v1." - + "UpdateBuildTriggerRequest\032+.google.devto" - + "ols.cloudbuild.v1.BuildTrigger\"\370\001\332A\035proj" - + "ect_id,trigger_id,trigger\202\323\344\223\002\204\0012//v1/pr" - + "ojects/{project_id}/triggers/{trigger_id" - + "}:\007triggerZH2=/v1/{trigger.resource_name" - + "=projects/*/locations/*/triggers/*}:\007tri" - + "gger\212\323\344\223\002G\022E\n\025trigger.resource_name\022,pro" - + "jects/*/locations/{location=*}/triggers/" - + "*\022\341\002\n\017RunBuildTrigger\0225.google.devtools." - + "cloudbuild.v1.RunBuildTriggerRequest\032\035.g" - + "oogle.longrunning.Operation\"\367\001\312A\037\n\005Build" - + "\022\026BuildOperationMetadata\332A\034project_id,tr" - + "igger_id,source\202\323\344\223\002t\"3/v1/projects/{pro" - + "ject_id}/triggers/{trigger_id}:run:\006sour" - + "ceZ5\"0/v1/{name=projects/*/locations/*/t" - + "riggers/*}:run:\001*\212\323\344\223\0026\0224\n\004name\022,project" - + "s/*/locations/{location=*}/triggers/*\022\225\002" - + "\n\025ReceiveTriggerWebhook\022;.google.devtool" - + "s.cloudbuild.v1.ReceiveTriggerWebhookReq" - + "uest\032<.google.devtools.cloudbuild.v1.Rec" - + "eiveTriggerWebhookResponse\"\200\001\202\323\344\223\002z\"4/v1" - + "/projects/{project_id}/triggers/{trigger" - + "}:webhook:\004bodyZ<\"4/v1/{name=projects/*/" - + "locations/*/triggers/*}:webhook:\004body\022\271\002" - + "\n\020CreateWorkerPool\0226.google.devtools.clo" - + "udbuild.v1.CreateWorkerPoolRequest\032\035.goo" - + "gle.longrunning.Operation\"\315\001\312A/\n\nWorkerP" - + "ool\022!CreateWorkerPoolOperationMetadata\332A" - + "!parent,worker_pool,worker_pool_id\202\323\344\223\002>" - + "\"//v1/{parent=projects/*/locations/*}/wo" - + "rkerPools:\013worker_pool\212\323\344\223\002-\022+\n\006parent\022!" - + "projects/*/locations/{location=*}\022\356\001\n\rGe" - + "tWorkerPool\0223.google.devtools.cloudbuild" - + ".v1.GetWorkerPoolRequest\032).google.devtoo" - + "ls.cloudbuild.v1.WorkerPool\"}\332A\004name\202\323\344\223" - + "\0021\022//v1/{name=projects/*/locations/*/wor" - + "kerPools/*}\212\323\344\223\0029\0227\n\004name\022/projects/*/lo" - + "cations/{location=*}/workerPools/*\022\246\002\n\020D" - + "eleteWorkerPool\0226.google.devtools.cloudb" - + "uild.v1.DeleteWorkerPoolRequest\032\035.google" - + ".longrunning.Operation\"\272\001\312A:\n\025google.pro" - + "tobuf.Empty\022!DeleteWorkerPoolOperationMe" - + "tadata\332A\004name\202\323\344\223\0021*//v1/{name=projects/" - + "*/locations/*/workerPools/*}\212\323\344\223\0029\0227\n\004na" - + "me\022/projects/*/locations/{location=*}/wo" - + "rkerPools/*\022\323\002\n\020UpdateWorkerPool\0226.googl" - + "e.devtools.cloudbuild.v1.UpdateWorkerPoo" - + "lRequest\032\035.google.longrunning.Operation\"" - + "\347\001\312A/\n\nWorkerPool\022!UpdateWorkerPoolOpera" - + "tionMetadata\332A\027worker_pool,update_mask\202\323" - + "\344\223\002J2;/v1/{worker_pool.name=projects/*/l" - + "ocations/*/workerPools/*}:\013worker_pool\212\323" - + "\344\223\002E\022C\n\020worker_pool.name\022/projects/*/loc" - + "ations/{location=*}/workerPools/*\022\365\001\n\017Li" - + "stWorkerPools\0225.google.devtools.cloudbui" - + "ld.v1.ListWorkerPoolsRequest\0326.google.de" - + "vtools.cloudbuild.v1.ListWorkerPoolsResp" - + "onse\"s\332A\006parent\202\323\344\223\0021\022//v1/{parent=proje" - + "cts/*/locations/*}/workerPools\212\323\344\223\002-\022+\n\006" - + "parent\022!projects/*/locations/{location=*" - + "}\032M\312A\031cloudbuild.googleapis.com\322A.https:" - + "//www.googleapis.com/auth/cloud-platform" - + "B\223\010\n\030com.google.cloudbuild.v1P\001ZAcloud.g" - + "oogle.com/go/cloudbuild/apiv1/v2/cloudbu" - + "ildpb;cloudbuildpb\242\002\003GCB\252\002\032Google.Cloud." - + "CloudBuild.V1\312\002\025Google\\Cloud\\Build\\V1\352\002\030" - + "Google::Cloud::Build::V1\352AN\n\036compute.goo" - + "gleapis.com/Network\022,projects/{project}/" - + "global/networks/{network}\352AY\n!iam.google" - + "apis.com/ServiceAccount\0224projects/{proje" - + "ct}/serviceAccounts/{service_account}\352AJ" - + "\n#secretmanager.googleapis.com/Secret\022#p" - + "rojects/{project}/secrets/{secret}\352Ad\n*s" - + "ecretmanager.googleapis.com/SecretVersio" - + "n\0226projects/{project}/secrets/{secret}/v" - + "ersions/{version}\352Af\n gkehub.googleapis." - + "com/Membership\022Bprojects/{project}/locat" - + "ions/{location}/memberships/{cluster_nam" - + "e}\352Ap\n!cloudkms.googleapis.com/CryptoKey" - + "\022Kprojects/{project}/locations/{location" - + "}/keyRings/{keyring}/cryptoKeys/{key}\352AU" - + "\n\"pubsub.googleapis.com/Subscription\022/pr" - + "ojects/{project}/subscriptions/{subscrip" - + "tion}\352A@\n\033pubsub.googleapis.com/Topic\022!p" - + "rojects/{project}/topics/{topic}\352A\202\001\n$cl" - + "oudbuild.googleapis.com/Repository\022Zproj" - + "ects/{project}/locations/{location}/conn" - + "ections/{connection}/repositories/{repos" - + "itory}b\006proto3" + + "on=*}\022\356\001\n\rGetWorkerPool\0223.google.devtool" + + "s.cloudbuild.v1.GetWorkerPoolRequest\032).g" + + "oogle.devtools.cloudbuild.v1.WorkerPool\"" + + "}\332A\004name\202\323\344\223\0021\022//v1/{name=projects/*/loc" + + "ations/*/workerPools/*}\212\323\344\223\0029\0227\n\004name\022/p" + + "rojects/*/locations/{location=*}/workerP" + + "ools/*\022\246\002\n\020DeleteWorkerPool\0226.google.dev" + + "tools.cloudbuild.v1.DeleteWorkerPoolRequ" + + "est\032\035.google.longrunning.Operation\"\272\001\312A:" + + "\n\025google.protobuf.Empty\022!DeleteWorkerPoo" + + "lOperationMetadata\332A\004name\202\323\344\223\0021*//v1/{na" + + "me=projects/*/locations/*/workerPools/*}" + + "\212\323\344\223\0029\0227\n\004name\022/projects/*/locations/{lo" + + "cation=*}/workerPools/*\022\323\002\n\020UpdateWorker" + + "Pool\0226.google.devtools.cloudbuild.v1.Upd" + + "ateWorkerPoolRequest\032\035.google.longrunnin" + + "g.Operation\"\347\001\312A/\n\nWorkerPool\022!UpdateWor" + + "kerPoolOperationMetadata\332A\027worker_pool,u" + + "pdate_mask\202\323\344\223\002J2;/v1/{worker_pool.name=" + + "projects/*/locations/*/workerPools/*}:\013w" + + "orker_pool\212\323\344\223\002E\022C\n\020worker_pool.name\022/pr" + + "ojects/*/locations/{location=*}/workerPo" + + "ols/*\022\365\001\n\017ListWorkerPools\0225.google.devto" + + "ols.cloudbuild.v1.ListWorkerPoolsRequest" + + "\0326.google.devtools.cloudbuild.v1.ListWor" + + "kerPoolsResponse\"s\332A\006parent\202\323\344\223\0021\022//v1/{" + + "parent=projects/*/locations/*}/workerPoo" + + "ls\212\323\344\223\002-\022+\n\006parent\022!projects/*/locations" + + "/{location=*}\032M\312A\031cloudbuild.googleapis." + + "com\322A.https://www.googleapis.com/auth/cl" + + "oud-platformB\223\010\n\030com.google.cloudbuild.v" + + "1P\001ZAcloud.google.com/go/cloudbuild/apiv" + + "1/v2/cloudbuildpb;cloudbuildpb\242\002\003GCB\252\002\032G" + + "oogle.Cloud.CloudBuild.V1\312\002\025Google\\Cloud" + + "\\Build\\V1\352\002\030Google::Cloud::Build::V1\352AN\n" + + "\036compute.googleapis.com/Network\022,project" + + "s/{project}/global/networks/{network}\352AY" + + "\n!iam.googleapis.com/ServiceAccount\0224pro" + + "jects/{project}/serviceAccounts/{service" + + "_account}\352AJ\n#secretmanager.googleapis.c" + + "om/Secret\022#projects/{project}/secrets/{s" + + "ecret}\352Ad\n*secretmanager.googleapis.com/" + + "SecretVersion\0226projects/{project}/secret" + + "s/{secret}/versions/{version}\352Af\n gkehub" + + ".googleapis.com/Membership\022Bprojects/{pr" + + "oject}/locations/{location}/memberships/" + + "{cluster_name}\352Ap\n!cloudkms.googleapis.c" + + "om/CryptoKey\022Kprojects/{project}/locatio" + + "ns/{location}/keyRings/{keyring}/cryptoK" + + "eys/{key}\352AU\n\"pubsub.googleapis.com/Subs" + + "cription\022/projects/{project}/subscriptio" + + "ns/{subscription}\352A@\n\033pubsub.googleapis." + + "com/Topic\022!projects/{project}/topics/{to" + + "pic}\352A\202\001\n$cloudbuild.googleapis.com/Repo" + + "sitory\022Zprojects/{project}/locations/{lo" + + "cation}/connections/{connection}/reposit" + + "ories/{repository}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1411,8 +1471,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ApproverAccount", "ApprovalTime", "Decision", "Comment", "Url", }); - internal_static_google_devtools_cloudbuild_v1_BuildTrigger_descriptor = + internal_static_google_devtools_cloudbuild_v1_GitRepoSource_descriptor = getDescriptor().getMessageTypes().get(35); + internal_static_google_devtools_cloudbuild_v1_GitRepoSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_cloudbuild_v1_GitRepoSource_descriptor, + new java.lang.String[] { + "Uri", + "Repository", + "Ref", + "RepoType", + "GithubEnterpriseConfig", + "Source", + "EnterpriseConfig", + }); + internal_static_google_devtools_cloudbuild_v1_GitFileSource_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_devtools_cloudbuild_v1_GitFileSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_cloudbuild_v1_GitFileSource_descriptor, + new java.lang.String[] { + "Path", + "Uri", + "Repository", + "RepoType", + "Revision", + "GithubEnterpriseConfig", + "Source", + "EnterpriseConfig", + }); + internal_static_google_devtools_cloudbuild_v1_BuildTrigger_descriptor = + getDescriptor().getMessageTypes().get(37); internal_static_google_devtools_cloudbuild_v1_BuildTrigger_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_BuildTrigger_descriptor, @@ -1429,12 +1518,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Autodetect", "Build", "Filename", + "GitFileSource", "CreateTime", "Disabled", "Substitutions", "IgnoredFiles", "IncludedFiles", "Filter", + "SourceToBuild", "ServiceAccount", "RepositoryEventConfig", "BuildTemplate", @@ -1450,7 +1541,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_devtools_cloudbuild_v1_RepositoryEventConfig_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(38); internal_static_google_devtools_cloudbuild_v1_RepositoryEventConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_RepositoryEventConfig_descriptor, @@ -1458,7 +1549,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Repository", "RepositoryType", "PullRequest", "Push", "Filter", }); internal_static_google_devtools_cloudbuild_v1_GitHubEventsConfig_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(39); internal_static_google_devtools_cloudbuild_v1_GitHubEventsConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_GitHubEventsConfig_descriptor, @@ -1466,7 +1557,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstallationId", "Owner", "Name", "PullRequest", "Push", "Event", }); internal_static_google_devtools_cloudbuild_v1_PubsubConfig_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(40); internal_static_google_devtools_cloudbuild_v1_PubsubConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_PubsubConfig_descriptor, @@ -1474,7 +1565,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "Topic", "ServiceAccountEmail", "State", }); internal_static_google_devtools_cloudbuild_v1_WebhookConfig_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(41); internal_static_google_devtools_cloudbuild_v1_WebhookConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_WebhookConfig_descriptor, @@ -1482,7 +1573,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Secret", "State", "AuthMethod", }); internal_static_google_devtools_cloudbuild_v1_PullRequestFilter_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(42); internal_static_google_devtools_cloudbuild_v1_PullRequestFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_PullRequestFilter_descriptor, @@ -1490,7 +1581,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Branch", "CommentControl", "InvertRegex", "GitRef", }); internal_static_google_devtools_cloudbuild_v1_PushFilter_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(43); internal_static_google_devtools_cloudbuild_v1_PushFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_PushFilter_descriptor, @@ -1498,7 +1589,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Branch", "Tag", "InvertRegex", "GitRef", }); internal_static_google_devtools_cloudbuild_v1_CreateBuildTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(44); internal_static_google_devtools_cloudbuild_v1_CreateBuildTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_CreateBuildTriggerRequest_descriptor, @@ -1506,7 +1597,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ProjectId", "Trigger", }); internal_static_google_devtools_cloudbuild_v1_GetBuildTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(45); internal_static_google_devtools_cloudbuild_v1_GetBuildTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_GetBuildTriggerRequest_descriptor, @@ -1514,7 +1605,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ProjectId", "TriggerId", }); internal_static_google_devtools_cloudbuild_v1_ListBuildTriggersRequest_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(46); internal_static_google_devtools_cloudbuild_v1_ListBuildTriggersRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_ListBuildTriggersRequest_descriptor, @@ -1522,7 +1613,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ProjectId", "PageSize", "PageToken", }); internal_static_google_devtools_cloudbuild_v1_ListBuildTriggersResponse_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageTypes().get(47); internal_static_google_devtools_cloudbuild_v1_ListBuildTriggersResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_ListBuildTriggersResponse_descriptor, @@ -1530,7 +1621,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Triggers", "NextPageToken", }); internal_static_google_devtools_cloudbuild_v1_DeleteBuildTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(48); internal_static_google_devtools_cloudbuild_v1_DeleteBuildTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_DeleteBuildTriggerRequest_descriptor, @@ -1538,7 +1629,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ProjectId", "TriggerId", }); internal_static_google_devtools_cloudbuild_v1_UpdateBuildTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(49); internal_static_google_devtools_cloudbuild_v1_UpdateBuildTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_UpdateBuildTriggerRequest_descriptor, @@ -1546,7 +1637,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "TriggerId", "Trigger", }); internal_static_google_devtools_cloudbuild_v1_BuildOptions_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(50); internal_static_google_devtools_cloudbuild_v1_BuildOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_BuildOptions_descriptor, @@ -1577,7 +1668,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_devtools_cloudbuild_v1_ReceiveTriggerWebhookRequest_descriptor = - getDescriptor().getMessageTypes().get(49); + getDescriptor().getMessageTypes().get(51); internal_static_google_devtools_cloudbuild_v1_ReceiveTriggerWebhookRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_ReceiveTriggerWebhookRequest_descriptor, @@ -1585,13 +1676,40 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Body", "ProjectId", "Trigger", "Secret", }); internal_static_google_devtools_cloudbuild_v1_ReceiveTriggerWebhookResponse_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(52); internal_static_google_devtools_cloudbuild_v1_ReceiveTriggerWebhookResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_ReceiveTriggerWebhookResponse_descriptor, new java.lang.String[] {}); + internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseConfig_descriptor = + getDescriptor().getMessageTypes().get(53); + internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseConfig_descriptor, + new java.lang.String[] { + "Name", + "HostUrl", + "AppId", + "CreateTime", + "WebhookKey", + "PeeredNetwork", + "Secrets", + "DisplayName", + "SslCa", + }); + internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseSecrets_descriptor = + getDescriptor().getMessageTypes().get(54); + internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseSecrets_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseSecrets_descriptor, + new java.lang.String[] { + "PrivateKeyVersionName", + "WebhookSecretVersionName", + "OauthSecretVersionName", + "OauthClientIdVersionName", + }); internal_static_google_devtools_cloudbuild_v1_WorkerPool_descriptor = - getDescriptor().getMessageTypes().get(51); + getDescriptor().getMessageTypes().get(55); internal_static_google_devtools_cloudbuild_v1_WorkerPool_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_WorkerPool_descriptor, @@ -1617,7 +1735,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_devtools_cloudbuild_v1_PrivatePoolV1Config_descriptor = - getDescriptor().getMessageTypes().get(52); + getDescriptor().getMessageTypes().get(56); internal_static_google_devtools_cloudbuild_v1_PrivatePoolV1Config_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_PrivatePoolV1Config_descriptor, @@ -1645,7 +1763,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PeeredNetwork", "EgressOption", "PeeredNetworkIpRange", }); internal_static_google_devtools_cloudbuild_v1_CreateWorkerPoolRequest_descriptor = - getDescriptor().getMessageTypes().get(53); + getDescriptor().getMessageTypes().get(57); internal_static_google_devtools_cloudbuild_v1_CreateWorkerPoolRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_CreateWorkerPoolRequest_descriptor, @@ -1653,7 +1771,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "WorkerPool", "WorkerPoolId", "ValidateOnly", }); internal_static_google_devtools_cloudbuild_v1_GetWorkerPoolRequest_descriptor = - getDescriptor().getMessageTypes().get(54); + getDescriptor().getMessageTypes().get(58); internal_static_google_devtools_cloudbuild_v1_GetWorkerPoolRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_GetWorkerPoolRequest_descriptor, @@ -1661,7 +1779,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_devtools_cloudbuild_v1_DeleteWorkerPoolRequest_descriptor = - getDescriptor().getMessageTypes().get(55); + getDescriptor().getMessageTypes().get(59); internal_static_google_devtools_cloudbuild_v1_DeleteWorkerPoolRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_DeleteWorkerPoolRequest_descriptor, @@ -1669,7 +1787,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Etag", "AllowMissing", "ValidateOnly", }); internal_static_google_devtools_cloudbuild_v1_UpdateWorkerPoolRequest_descriptor = - getDescriptor().getMessageTypes().get(56); + getDescriptor().getMessageTypes().get(60); internal_static_google_devtools_cloudbuild_v1_UpdateWorkerPoolRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_UpdateWorkerPoolRequest_descriptor, @@ -1677,7 +1795,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WorkerPool", "UpdateMask", "ValidateOnly", }); internal_static_google_devtools_cloudbuild_v1_ListWorkerPoolsRequest_descriptor = - getDescriptor().getMessageTypes().get(57); + getDescriptor().getMessageTypes().get(61); internal_static_google_devtools_cloudbuild_v1_ListWorkerPoolsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_ListWorkerPoolsRequest_descriptor, @@ -1685,7 +1803,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_devtools_cloudbuild_v1_ListWorkerPoolsResponse_descriptor = - getDescriptor().getMessageTypes().get(58); + getDescriptor().getMessageTypes().get(62); internal_static_google_devtools_cloudbuild_v1_ListWorkerPoolsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_ListWorkerPoolsResponse_descriptor, @@ -1693,7 +1811,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WorkerPools", "NextPageToken", }); internal_static_google_devtools_cloudbuild_v1_CreateWorkerPoolOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(59); + getDescriptor().getMessageTypes().get(63); internal_static_google_devtools_cloudbuild_v1_CreateWorkerPoolOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_CreateWorkerPoolOperationMetadata_descriptor, @@ -1701,7 +1819,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WorkerPool", "CreateTime", "CompleteTime", }); internal_static_google_devtools_cloudbuild_v1_UpdateWorkerPoolOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(60); + getDescriptor().getMessageTypes().get(64); internal_static_google_devtools_cloudbuild_v1_UpdateWorkerPoolOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_UpdateWorkerPoolOperationMetadata_descriptor, @@ -1709,7 +1827,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WorkerPool", "CreateTime", "CompleteTime", }); internal_static_google_devtools_cloudbuild_v1_DeleteWorkerPoolOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(61); + getDescriptor().getMessageTypes().get(65); internal_static_google_devtools_cloudbuild_v1_DeleteWorkerPoolOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_cloudbuild_v1_DeleteWorkerPoolOperationMetadata_descriptor, diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitFileSource.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitFileSource.java new file mode 100644 index 000000000000..99a995f2714a --- /dev/null +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitFileSource.java @@ -0,0 +1,2074 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/cloudbuild/v1/cloudbuild.proto + +package com.google.cloudbuild.v1; + +/** + * + * + *
+ * GitFileSource describes a file within a (possibly remote) code repository.
+ * 
+ * + * Protobuf type {@code google.devtools.cloudbuild.v1.GitFileSource} + */ +public final class GitFileSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.GitFileSource) + GitFileSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GitFileSource.newBuilder() to construct. + private GitFileSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GitFileSource() { + path_ = ""; + uri_ = ""; + repoType_ = 0; + revision_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GitFileSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitFileSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitFileSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloudbuild.v1.GitFileSource.class, + com.google.cloudbuild.v1.GitFileSource.Builder.class); + } + + /** + * + * + *
+   * The type of the repo, since it may not be explicit from the `repo` field
+   * (e.g from a URL).
+   * 
+ * + * Protobuf enum {@code google.devtools.cloudbuild.v1.GitFileSource.RepoType} + */ + public enum RepoType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default, unknown repo type. Don't use it, instead use one of
+     * the other repo types.
+     * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * + * + *
+     * A Google Cloud Source Repositories-hosted repo.
+     * 
+ * + * CLOUD_SOURCE_REPOSITORIES = 1; + */ + CLOUD_SOURCE_REPOSITORIES(1), + /** + * + * + *
+     * A GitHub-hosted repo not necessarily on "github.com" (i.e. GitHub
+     * Enterprise).
+     * 
+ * + * GITHUB = 2; + */ + GITHUB(2), + /** + * + * + *
+     * A Bitbucket Server-hosted repo.
+     * 
+ * + * BITBUCKET_SERVER = 3; + */ + BITBUCKET_SERVER(3), + /** + * + * + *
+     * A GitLab-hosted repo.
+     * 
+ * + * GITLAB = 4; + */ + GITLAB(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default, unknown repo type. Don't use it, instead use one of
+     * the other repo types.
+     * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * + * + *
+     * A Google Cloud Source Repositories-hosted repo.
+     * 
+ * + * CLOUD_SOURCE_REPOSITORIES = 1; + */ + public static final int CLOUD_SOURCE_REPOSITORIES_VALUE = 1; + /** + * + * + *
+     * A GitHub-hosted repo not necessarily on "github.com" (i.e. GitHub
+     * Enterprise).
+     * 
+ * + * GITHUB = 2; + */ + public static final int GITHUB_VALUE = 2; + /** + * + * + *
+     * A Bitbucket Server-hosted repo.
+     * 
+ * + * BITBUCKET_SERVER = 3; + */ + public static final int BITBUCKET_SERVER_VALUE = 3; + /** + * + * + *
+     * A GitLab-hosted repo.
+     * 
+ * + * GITLAB = 4; + */ + public static final int GITLAB_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RepoType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RepoType forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN; + case 1: + return CLOUD_SOURCE_REPOSITORIES; + case 2: + return GITHUB; + case 3: + return BITBUCKET_SERVER; + case 4: + return GITLAB; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RepoType findValueByNumber(int number) { + return RepoType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloudbuild.v1.GitFileSource.getDescriptor().getEnumTypes().get(0); + } + + private static final RepoType[] VALUES = values(); + + public static RepoType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RepoType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.GitFileSource.RepoType) + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REPOSITORY(7), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 7: + return REPOSITORY; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + private int enterpriseConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object enterpriseConfig_; + + public enum EnterpriseConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GITHUB_ENTERPRISE_CONFIG(5), + ENTERPRISECONFIG_NOT_SET(0); + private final int value; + + private EnterpriseConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EnterpriseConfigCase valueOf(int value) { + return forNumber(value); + } + + public static EnterpriseConfigCase forNumber(int value) { + switch (value) { + case 5: + return GITHUB_ENTERPRISE_CONFIG; + case 0: + return ENTERPRISECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EnterpriseConfigCase getEnterpriseConfigCase() { + return EnterpriseConfigCase.forNumber(enterpriseConfigCase_); + } + + public static final int PATH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + * + * + *
+   * The path of the file, with the repo root as the root of the path.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * The path of the file, with the repo root as the root of the path.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * The URI of the repo.
+   * Either uri or repository can be specified.
+   * If unspecified, the repo from which the trigger invocation originated is
+   * assumed to be the repo from which to read the specified path.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the repo.
+   * Either uri or repository can be specified.
+   * If unspecified, the repo from which the trigger invocation originated is
+   * assumed to be the repo from which to read the specified path.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPOSITORY_FIELD_NUMBER = 7; + /** + * + * + *
+   * The fully qualified resource name of the Repos API repository.
+   * Either URI or repository can be specified.
+   * If unspecified, the repo from which the trigger invocation originated is
+   * assumed to be the repo from which to read the specified path.
+   * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @return Whether the repository field is set. + */ + public boolean hasRepository() { + return sourceCase_ == 7; + } + /** + * + * + *
+   * The fully qualified resource name of the Repos API repository.
+   * Either URI or repository can be specified.
+   * If unspecified, the repo from which the trigger invocation originated is
+   * assumed to be the repo from which to read the specified path.
+   * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @return The repository. + */ + public java.lang.String getRepository() { + java.lang.Object ref = ""; + if (sourceCase_ == 7) { + ref = source_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 7) { + source_ = s; + } + return s; + } + } + /** + * + * + *
+   * The fully qualified resource name of the Repos API repository.
+   * Either URI or repository can be specified.
+   * If unspecified, the repo from which the trigger invocation originated is
+   * assumed to be the repo from which to read the specified path.
+   * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for repository. + */ + public com.google.protobuf.ByteString getRepositoryBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 7) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 7) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPO_TYPE_FIELD_NUMBER = 3; + private int repoType_ = 0; + /** + * + * + *
+   * See RepoType above.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The enum numeric value on the wire for repoType. + */ + @java.lang.Override + public int getRepoTypeValue() { + return repoType_; + } + /** + * + * + *
+   * See RepoType above.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The repoType. + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSource.RepoType getRepoType() { + com.google.cloudbuild.v1.GitFileSource.RepoType result = + com.google.cloudbuild.v1.GitFileSource.RepoType.forNumber(repoType_); + return result == null ? com.google.cloudbuild.v1.GitFileSource.RepoType.UNRECOGNIZED : result; + } + + public static final int REVISION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object revision_ = ""; + /** + * + * + *
+   * The branch, tag, arbitrary ref, or SHA version of the repo to use when
+   * resolving the filename (optional).
+   * This field respects the same syntax/resolution as described here:
+   * https://git-scm.com/docs/gitrevisions
+   * If unspecified, the revision from which the trigger invocation originated
+   * is assumed to be the revision from which to read the specified path.
+   * 
+ * + * string revision = 4; + * + * @return The revision. + */ + @java.lang.Override + public java.lang.String getRevision() { + java.lang.Object ref = revision_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revision_ = s; + return s; + } + } + /** + * + * + *
+   * The branch, tag, arbitrary ref, or SHA version of the repo to use when
+   * resolving the filename (optional).
+   * This field respects the same syntax/resolution as described here:
+   * https://git-scm.com/docs/gitrevisions
+   * If unspecified, the revision from which the trigger invocation originated
+   * is assumed to be the revision from which to read the specified path.
+   * 
+ * + * string revision = 4; + * + * @return The bytes for revision. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRevisionBytes() { + java.lang.Object ref = revision_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GITHUB_ENTERPRISE_CONFIG_FIELD_NUMBER = 5; + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the githubEnterpriseConfig field is set. + */ + public boolean hasGithubEnterpriseConfig() { + return enterpriseConfigCase_ == 5; + } + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @return The githubEnterpriseConfig. + */ + public java.lang.String getGithubEnterpriseConfig() { + java.lang.Object ref = ""; + if (enterpriseConfigCase_ == 5) { + ref = enterpriseConfig_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (enterpriseConfigCase_ == 5) { + enterpriseConfig_ = s; + } + return s; + } + } + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for githubEnterpriseConfig. + */ + public com.google.protobuf.ByteString getGithubEnterpriseConfigBytes() { + java.lang.Object ref = ""; + if (enterpriseConfigCase_ == 5) { + ref = enterpriseConfig_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (enterpriseConfigCase_ == 5) { + enterpriseConfig_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (repoType_ != com.google.cloudbuild.v1.GitFileSource.RepoType.UNKNOWN.getNumber()) { + output.writeEnum(3, repoType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, revision_); + } + if (enterpriseConfigCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, enterpriseConfig_); + } + if (sourceCase_ == 7) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, source_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (repoType_ != com.google.cloudbuild.v1.GitFileSource.RepoType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, repoType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, revision_); + } + if (enterpriseConfigCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, enterpriseConfig_); + } + if (sourceCase_ == 7) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, source_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloudbuild.v1.GitFileSource)) { + return super.equals(obj); + } + com.google.cloudbuild.v1.GitFileSource other = (com.google.cloudbuild.v1.GitFileSource) obj; + + if (!getPath().equals(other.getPath())) return false; + if (!getUri().equals(other.getUri())) return false; + if (repoType_ != other.repoType_) return false; + if (!getRevision().equals(other.getRevision())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 7: + if (!getRepository().equals(other.getRepository())) return false; + break; + case 0: + default: + } + if (!getEnterpriseConfigCase().equals(other.getEnterpriseConfigCase())) return false; + switch (enterpriseConfigCase_) { + case 5: + if (!getGithubEnterpriseConfig().equals(other.getGithubEnterpriseConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + REPO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + repoType_; + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + getRevision().hashCode(); + switch (sourceCase_) { + case 7: + hash = (37 * hash) + REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getRepository().hashCode(); + break; + case 0: + default: + } + switch (enterpriseConfigCase_) { + case 5: + hash = (37 * hash) + GITHUB_ENTERPRISE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGithubEnterpriseConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloudbuild.v1.GitFileSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitFileSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitFileSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitFileSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitFileSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitFileSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitFileSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitFileSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitFileSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitFileSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitFileSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitFileSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloudbuild.v1.GitFileSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * GitFileSource describes a file within a (possibly remote) code repository.
+   * 
+ * + * Protobuf type {@code google.devtools.cloudbuild.v1.GitFileSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.GitFileSource) + com.google.cloudbuild.v1.GitFileSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitFileSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitFileSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloudbuild.v1.GitFileSource.class, + com.google.cloudbuild.v1.GitFileSource.Builder.class); + } + + // Construct using com.google.cloudbuild.v1.GitFileSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + path_ = ""; + uri_ = ""; + repoType_ = 0; + revision_ = ""; + sourceCase_ = 0; + source_ = null; + enterpriseConfigCase_ = 0; + enterpriseConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitFileSource_descriptor; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSource getDefaultInstanceForType() { + return com.google.cloudbuild.v1.GitFileSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSource build() { + com.google.cloudbuild.v1.GitFileSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSource buildPartial() { + com.google.cloudbuild.v1.GitFileSource result = + new com.google.cloudbuild.v1.GitFileSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloudbuild.v1.GitFileSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.path_ = path_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.repoType_ = repoType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.revision_ = revision_; + } + } + + private void buildPartialOneofs(com.google.cloudbuild.v1.GitFileSource result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + result.enterpriseConfigCase_ = enterpriseConfigCase_; + result.enterpriseConfig_ = this.enterpriseConfig_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloudbuild.v1.GitFileSource) { + return mergeFrom((com.google.cloudbuild.v1.GitFileSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloudbuild.v1.GitFileSource other) { + if (other == com.google.cloudbuild.v1.GitFileSource.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.repoType_ != 0) { + setRepoTypeValue(other.getRepoTypeValue()); + } + if (!other.getRevision().isEmpty()) { + revision_ = other.revision_; + bitField0_ |= 0x00000010; + onChanged(); + } + switch (other.getSourceCase()) { + case REPOSITORY: + { + sourceCase_ = 7; + source_ = other.source_; + onChanged(); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + switch (other.getEnterpriseConfigCase()) { + case GITHUB_ENTERPRISE_CONFIG: + { + enterpriseConfigCase_ = 5; + enterpriseConfig_ = other.enterpriseConfig_; + onChanged(); + break; + } + case ENTERPRISECONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + repoType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: + { + revision_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + enterpriseConfigCase_ = 5; + enterpriseConfig_ = s; + break; + } // case 42 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 7; + source_ = s; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int enterpriseConfigCase_ = 0; + private java.lang.Object enterpriseConfig_; + + public EnterpriseConfigCase getEnterpriseConfigCase() { + return EnterpriseConfigCase.forNumber(enterpriseConfigCase_); + } + + public Builder clearEnterpriseConfig() { + enterpriseConfigCase_ = 0; + enterpriseConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * The path of the file, with the repo root as the root of the path.
+     * 
+ * + * string path = 1; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The path of the file, with the repo root as the root of the path.
+     * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The path of the file, with the repo root as the root of the path.
+     * 
+ * + * string path = 1; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The path of the file, with the repo root as the root of the path.
+     * 
+ * + * string path = 1; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The path of the file, with the repo root as the root of the path.
+     * 
+ * + * string path = 1; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URI of the repo.
+     * Either uri or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the repo.
+     * Either uri or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the repo.
+     * Either uri or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the repo.
+     * Either uri or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the repo.
+     * Either uri or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The fully qualified resource name of the Repos API repository.
+     * Either URI or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @return Whether the repository field is set. + */ + @java.lang.Override + public boolean hasRepository() { + return sourceCase_ == 7; + } + /** + * + * + *
+     * The fully qualified resource name of the Repos API repository.
+     * Either URI or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @return The repository. + */ + @java.lang.Override + public java.lang.String getRepository() { + java.lang.Object ref = ""; + if (sourceCase_ == 7) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 7) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The fully qualified resource name of the Repos API repository.
+     * Either URI or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for repository. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRepositoryBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 7) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 7) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The fully qualified resource name of the Repos API repository.
+     * Either URI or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @param value The repository to set. + * @return This builder for chaining. + */ + public Builder setRepository(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 7; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The fully qualified resource name of the Repos API repository.
+     * Either URI or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearRepository() { + if (sourceCase_ == 7) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The fully qualified resource name of the Repos API repository.
+     * Either URI or repository can be specified.
+     * If unspecified, the repo from which the trigger invocation originated is
+     * assumed to be the repo from which to read the specified path.
+     * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for repository to set. + * @return This builder for chaining. + */ + public Builder setRepositoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 7; + source_ = value; + onChanged(); + return this; + } + + private int repoType_ = 0; + /** + * + * + *
+     * See RepoType above.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The enum numeric value on the wire for repoType. + */ + @java.lang.Override + public int getRepoTypeValue() { + return repoType_; + } + /** + * + * + *
+     * See RepoType above.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @param value The enum numeric value on the wire for repoType to set. + * @return This builder for chaining. + */ + public Builder setRepoTypeValue(int value) { + repoType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * See RepoType above.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The repoType. + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSource.RepoType getRepoType() { + com.google.cloudbuild.v1.GitFileSource.RepoType result = + com.google.cloudbuild.v1.GitFileSource.RepoType.forNumber(repoType_); + return result == null ? com.google.cloudbuild.v1.GitFileSource.RepoType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * See RepoType above.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @param value The repoType to set. + * @return This builder for chaining. + */ + public Builder setRepoType(com.google.cloudbuild.v1.GitFileSource.RepoType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + repoType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * See RepoType above.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearRepoType() { + bitField0_ = (bitField0_ & ~0x00000008); + repoType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object revision_ = ""; + /** + * + * + *
+     * The branch, tag, arbitrary ref, or SHA version of the repo to use when
+     * resolving the filename (optional).
+     * This field respects the same syntax/resolution as described here:
+     * https://git-scm.com/docs/gitrevisions
+     * If unspecified, the revision from which the trigger invocation originated
+     * is assumed to be the revision from which to read the specified path.
+     * 
+ * + * string revision = 4; + * + * @return The revision. + */ + public java.lang.String getRevision() { + java.lang.Object ref = revision_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revision_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The branch, tag, arbitrary ref, or SHA version of the repo to use when
+     * resolving the filename (optional).
+     * This field respects the same syntax/resolution as described here:
+     * https://git-scm.com/docs/gitrevisions
+     * If unspecified, the revision from which the trigger invocation originated
+     * is assumed to be the revision from which to read the specified path.
+     * 
+ * + * string revision = 4; + * + * @return The bytes for revision. + */ + public com.google.protobuf.ByteString getRevisionBytes() { + java.lang.Object ref = revision_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The branch, tag, arbitrary ref, or SHA version of the repo to use when
+     * resolving the filename (optional).
+     * This field respects the same syntax/resolution as described here:
+     * https://git-scm.com/docs/gitrevisions
+     * If unspecified, the revision from which the trigger invocation originated
+     * is assumed to be the revision from which to read the specified path.
+     * 
+ * + * string revision = 4; + * + * @param value The revision to set. + * @return This builder for chaining. + */ + public Builder setRevision(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + revision_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The branch, tag, arbitrary ref, or SHA version of the repo to use when
+     * resolving the filename (optional).
+     * This field respects the same syntax/resolution as described here:
+     * https://git-scm.com/docs/gitrevisions
+     * If unspecified, the revision from which the trigger invocation originated
+     * is assumed to be the revision from which to read the specified path.
+     * 
+ * + * string revision = 4; + * + * @return This builder for chaining. + */ + public Builder clearRevision() { + revision_ = getDefaultInstance().getRevision(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The branch, tag, arbitrary ref, or SHA version of the repo to use when
+     * resolving the filename (optional).
+     * This field respects the same syntax/resolution as described here:
+     * https://git-scm.com/docs/gitrevisions
+     * If unspecified, the revision from which the trigger invocation originated
+     * is assumed to be the revision from which to read the specified path.
+     * 
+ * + * string revision = 4; + * + * @param value The bytes for revision to set. + * @return This builder for chaining. + */ + public Builder setRevisionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + revision_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the githubEnterpriseConfig field is set. + */ + @java.lang.Override + public boolean hasGithubEnterpriseConfig() { + return enterpriseConfigCase_ == 5; + } + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @return The githubEnterpriseConfig. + */ + @java.lang.Override + public java.lang.String getGithubEnterpriseConfig() { + java.lang.Object ref = ""; + if (enterpriseConfigCase_ == 5) { + ref = enterpriseConfig_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (enterpriseConfigCase_ == 5) { + enterpriseConfig_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for githubEnterpriseConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGithubEnterpriseConfigBytes() { + java.lang.Object ref = ""; + if (enterpriseConfigCase_ == 5) { + ref = enterpriseConfig_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (enterpriseConfigCase_ == 5) { + enterpriseConfig_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The githubEnterpriseConfig to set. + * @return This builder for chaining. + */ + public Builder setGithubEnterpriseConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + enterpriseConfigCase_ = 5; + enterpriseConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearGithubEnterpriseConfig() { + if (enterpriseConfigCase_ == 5) { + enterpriseConfigCase_ = 0; + enterpriseConfig_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for githubEnterpriseConfig to set. + * @return This builder for chaining. + */ + public Builder setGithubEnterpriseConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + enterpriseConfigCase_ = 5; + enterpriseConfig_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.GitFileSource) + } + + // @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.GitFileSource) + private static final com.google.cloudbuild.v1.GitFileSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloudbuild.v1.GitFileSource(); + } + + public static com.google.cloudbuild.v1.GitFileSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GitFileSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitFileSourceOrBuilder.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitFileSourceOrBuilder.java new file mode 100644 index 000000000000..0830712a416b --- /dev/null +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitFileSourceOrBuilder.java @@ -0,0 +1,237 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/cloudbuild/v1/cloudbuild.proto + +package com.google.cloudbuild.v1; + +public interface GitFileSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.cloudbuild.v1.GitFileSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The path of the file, with the repo root as the root of the path.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * The path of the file, with the repo root as the root of the path.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+   * The URI of the repo.
+   * Either uri or repository can be specified.
+   * If unspecified, the repo from which the trigger invocation originated is
+   * assumed to be the repo from which to read the specified path.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The URI of the repo.
+   * Either uri or repository can be specified.
+   * If unspecified, the repo from which the trigger invocation originated is
+   * assumed to be the repo from which to read the specified path.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The fully qualified resource name of the Repos API repository.
+   * Either URI or repository can be specified.
+   * If unspecified, the repo from which the trigger invocation originated is
+   * assumed to be the repo from which to read the specified path.
+   * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @return Whether the repository field is set. + */ + boolean hasRepository(); + /** + * + * + *
+   * The fully qualified resource name of the Repos API repository.
+   * Either URI or repository can be specified.
+   * If unspecified, the repo from which the trigger invocation originated is
+   * assumed to be the repo from which to read the specified path.
+   * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @return The repository. + */ + java.lang.String getRepository(); + /** + * + * + *
+   * The fully qualified resource name of the Repos API repository.
+   * Either URI or repository can be specified.
+   * If unspecified, the repo from which the trigger invocation originated is
+   * assumed to be the repo from which to read the specified path.
+   * 
+ * + * string repository = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for repository. + */ + com.google.protobuf.ByteString getRepositoryBytes(); + + /** + * + * + *
+   * See RepoType above.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The enum numeric value on the wire for repoType. + */ + int getRepoTypeValue(); + /** + * + * + *
+   * See RepoType above.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The repoType. + */ + com.google.cloudbuild.v1.GitFileSource.RepoType getRepoType(); + + /** + * + * + *
+   * The branch, tag, arbitrary ref, or SHA version of the repo to use when
+   * resolving the filename (optional).
+   * This field respects the same syntax/resolution as described here:
+   * https://git-scm.com/docs/gitrevisions
+   * If unspecified, the revision from which the trigger invocation originated
+   * is assumed to be the revision from which to read the specified path.
+   * 
+ * + * string revision = 4; + * + * @return The revision. + */ + java.lang.String getRevision(); + /** + * + * + *
+   * The branch, tag, arbitrary ref, or SHA version of the repo to use when
+   * resolving the filename (optional).
+   * This field respects the same syntax/resolution as described here:
+   * https://git-scm.com/docs/gitrevisions
+   * If unspecified, the revision from which the trigger invocation originated
+   * is assumed to be the revision from which to read the specified path.
+   * 
+ * + * string revision = 4; + * + * @return The bytes for revision. + */ + com.google.protobuf.ByteString getRevisionBytes(); + + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the githubEnterpriseConfig field is set. + */ + boolean hasGithubEnterpriseConfig(); + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @return The githubEnterpriseConfig. + */ + java.lang.String getGithubEnterpriseConfig(); + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for githubEnterpriseConfig. + */ + com.google.protobuf.ByteString getGithubEnterpriseConfigBytes(); + + com.google.cloudbuild.v1.GitFileSource.SourceCase getSourceCase(); + + com.google.cloudbuild.v1.GitFileSource.EnterpriseConfigCase getEnterpriseConfigCase(); +} diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseConfig.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseConfig.java new file mode 100644 index 000000000000..9e6d96da5932 --- /dev/null +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseConfig.java @@ -0,0 +1,2259 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/cloudbuild/v1/cloudbuild.proto + +package com.google.cloudbuild.v1; + +/** Protobuf type {@code google.devtools.cloudbuild.v1.GitHubEnterpriseConfig} */ +public final class GitHubEnterpriseConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.GitHubEnterpriseConfig) + GitHubEnterpriseConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use GitHubEnterpriseConfig.newBuilder() to construct. + private GitHubEnterpriseConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GitHubEnterpriseConfig() { + name_ = ""; + hostUrl_ = ""; + webhookKey_ = ""; + peeredNetwork_ = ""; + displayName_ = ""; + sslCa_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GitHubEnterpriseConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloudbuild.v1.GitHubEnterpriseConfig.class, + com.google.cloudbuild.v1.GitHubEnterpriseConfig.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Optional. The full resource name for the GitHubEnterpriseConfig
+   * For example:
+   * "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
+   * 
+ * + * string name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The full resource name for the GitHubEnterpriseConfig
+   * For example:
+   * "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
+   * 
+ * + * string name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOST_URL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object hostUrl_ = ""; + /** + * + * + *
+   * The URL of the github enterprise host the configuration is for.
+   * 
+ * + * string host_url = 3; + * + * @return The hostUrl. + */ + @java.lang.Override + public java.lang.String getHostUrl() { + java.lang.Object ref = hostUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostUrl_ = s; + return s; + } + } + /** + * + * + *
+   * The URL of the github enterprise host the configuration is for.
+   * 
+ * + * string host_url = 3; + * + * @return The bytes for hostUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostUrlBytes() { + java.lang.Object ref = hostUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APP_ID_FIELD_NUMBER = 4; + private long appId_ = 0L; + /** + * + * + *
+   * Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise
+   * server.
+   * 
+ * + * int64 app_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The appId. + */ + @java.lang.Override + public long getAppId() { + return appId_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the installation was associated with the project.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the installation was associated with the project.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the installation was associated with the project.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int WEBHOOK_KEY_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object webhookKey_ = ""; + /** + * + * + *
+   * The key that should be attached to webhook calls to the ReceiveWebhook
+   * endpoint.
+   * 
+ * + * string webhook_key = 8; + * + * @return The webhookKey. + */ + @java.lang.Override + public java.lang.String getWebhookKey() { + java.lang.Object ref = webhookKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webhookKey_ = s; + return s; + } + } + /** + * + * + *
+   * The key that should be attached to webhook calls to the ReceiveWebhook
+   * endpoint.
+   * 
+ * + * string webhook_key = 8; + * + * @return The bytes for webhookKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebhookKeyBytes() { + java.lang.Object ref = webhookKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webhookKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEERED_NETWORK_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object peeredNetwork_ = ""; + /** + * + * + *
+   * Optional. The network to be used when reaching out to the GitHub
+   * Enterprise server. The VPC network must be enabled for private
+   * service connection. This should be set if the GitHub Enterprise server is
+   * hosted on-premises and not reachable by public internet.
+   * If this field is left empty, no network peering will occur and calls to
+   * the GitHub Enterprise server will be made over the public internet.
+   * Must be in the format
+   * `projects/{project}/global/networks/{network}`, where {project}
+   * is a project number or id and {network} is the name of a
+   * VPC network in the project.
+   * 
+ * + * + * string peered_network = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The peeredNetwork. + */ + @java.lang.Override + public java.lang.String getPeeredNetwork() { + java.lang.Object ref = peeredNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peeredNetwork_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The network to be used when reaching out to the GitHub
+   * Enterprise server. The VPC network must be enabled for private
+   * service connection. This should be set if the GitHub Enterprise server is
+   * hosted on-premises and not reachable by public internet.
+   * If this field is left empty, no network peering will occur and calls to
+   * the GitHub Enterprise server will be made over the public internet.
+   * Must be in the format
+   * `projects/{project}/global/networks/{network}`, where {project}
+   * is a project number or id and {network} is the name of a
+   * VPC network in the project.
+   * 
+ * + * + * string peered_network = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for peeredNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeeredNetworkBytes() { + java.lang.Object ref = peeredNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peeredNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRETS_FIELD_NUMBER = 10; + private com.google.cloudbuild.v1.GitHubEnterpriseSecrets secrets_; + /** + * + * + *
+   * Names of secrets in Secret Manager.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + * + * @return Whether the secrets field is set. + */ + @java.lang.Override + public boolean hasSecrets() { + return secrets_ != null; + } + /** + * + * + *
+   * Names of secrets in Secret Manager.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + * + * @return The secrets. + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitHubEnterpriseSecrets getSecrets() { + return secrets_ == null + ? com.google.cloudbuild.v1.GitHubEnterpriseSecrets.getDefaultInstance() + : secrets_; + } + /** + * + * + *
+   * Names of secrets in Secret Manager.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitHubEnterpriseSecretsOrBuilder getSecretsOrBuilder() { + return secrets_ == null + ? com.google.cloudbuild.v1.GitHubEnterpriseSecrets.getDefaultInstance() + : secrets_; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Name to display for this config.
+   * 
+ * + * string display_name = 11; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Name to display for this config.
+   * 
+ * + * string display_name = 11; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SSL_CA_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object sslCa_ = ""; + /** + * + * + *
+   * Optional. SSL certificate to use for requests to GitHub Enterprise.
+   * 
+ * + * string ssl_ca = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sslCa. + */ + @java.lang.Override + public java.lang.String getSslCa() { + java.lang.Object ref = sslCa_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sslCa_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. SSL certificate to use for requests to GitHub Enterprise.
+   * 
+ * + * string ssl_ca = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sslCa. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSslCaBytes() { + java.lang.Object ref = sslCa_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sslCa_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, hostUrl_); + } + if (appId_ != 0L) { + output.writeInt64(4, appId_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, webhookKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peeredNetwork_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, peeredNetwork_); + } + if (secrets_ != null) { + output.writeMessage(10, getSecrets()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslCa_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, sslCa_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, hostUrl_); + } + if (appId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, appId_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, webhookKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peeredNetwork_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, peeredNetwork_); + } + if (secrets_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getSecrets()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslCa_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, sslCa_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloudbuild.v1.GitHubEnterpriseConfig)) { + return super.equals(obj); + } + com.google.cloudbuild.v1.GitHubEnterpriseConfig other = + (com.google.cloudbuild.v1.GitHubEnterpriseConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (!getHostUrl().equals(other.getHostUrl())) return false; + if (getAppId() != other.getAppId()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getWebhookKey().equals(other.getWebhookKey())) return false; + if (!getPeeredNetwork().equals(other.getPeeredNetwork())) return false; + if (hasSecrets() != other.hasSecrets()) return false; + if (hasSecrets()) { + if (!getSecrets().equals(other.getSecrets())) return false; + } + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getSslCa().equals(other.getSslCa())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + HOST_URL_FIELD_NUMBER; + hash = (53 * hash) + getHostUrl().hashCode(); + hash = (37 * hash) + APP_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAppId()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + WEBHOOK_KEY_FIELD_NUMBER; + hash = (53 * hash) + getWebhookKey().hashCode(); + hash = (37 * hash) + PEERED_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getPeeredNetwork().hashCode(); + if (hasSecrets()) { + hash = (37 * hash) + SECRETS_FIELD_NUMBER; + hash = (53 * hash) + getSecrets().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + SSL_CA_FIELD_NUMBER; + hash = (53 * hash) + getSslCa().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloudbuild.v1.GitHubEnterpriseConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.devtools.cloudbuild.v1.GitHubEnterpriseConfig} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.GitHubEnterpriseConfig) + com.google.cloudbuild.v1.GitHubEnterpriseConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloudbuild.v1.GitHubEnterpriseConfig.class, + com.google.cloudbuild.v1.GitHubEnterpriseConfig.Builder.class); + } + + // Construct using com.google.cloudbuild.v1.GitHubEnterpriseConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + hostUrl_ = ""; + appId_ = 0L; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + webhookKey_ = ""; + peeredNetwork_ = ""; + secrets_ = null; + if (secretsBuilder_ != null) { + secretsBuilder_.dispose(); + secretsBuilder_ = null; + } + displayName_ = ""; + sslCa_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseConfig_descriptor; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitHubEnterpriseConfig getDefaultInstanceForType() { + return com.google.cloudbuild.v1.GitHubEnterpriseConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitHubEnterpriseConfig build() { + com.google.cloudbuild.v1.GitHubEnterpriseConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitHubEnterpriseConfig buildPartial() { + com.google.cloudbuild.v1.GitHubEnterpriseConfig result = + new com.google.cloudbuild.v1.GitHubEnterpriseConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloudbuild.v1.GitHubEnterpriseConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hostUrl_ = hostUrl_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.appId_ = appId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.webhookKey_ = webhookKey_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.peeredNetwork_ = peeredNetwork_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.secrets_ = secretsBuilder_ == null ? secrets_ : secretsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.sslCa_ = sslCa_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloudbuild.v1.GitHubEnterpriseConfig) { + return mergeFrom((com.google.cloudbuild.v1.GitHubEnterpriseConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloudbuild.v1.GitHubEnterpriseConfig other) { + if (other == com.google.cloudbuild.v1.GitHubEnterpriseConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getHostUrl().isEmpty()) { + hostUrl_ = other.hostUrl_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getAppId() != 0L) { + setAppId(other.getAppId()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.getWebhookKey().isEmpty()) { + webhookKey_ = other.webhookKey_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getPeeredNetwork().isEmpty()) { + peeredNetwork_ = other.peeredNetwork_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasSecrets()) { + mergeSecrets(other.getSecrets()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getSslCa().isEmpty()) { + sslCa_ = other.sslCa_; + bitField0_ |= 0x00000100; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + hostUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 32: + { + appId_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 + case 58: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 58 + case 66: + { + webhookKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 66 + case 74: + { + peeredNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 74 + case 82: + { + input.readMessage(getSecretsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 82 + case 90: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 90 + case 98: + { + sslCa_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 98 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Optional. The full resource name for the GitHubEnterpriseConfig
+     * For example:
+     * "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
+     * 
+ * + * string name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The full resource name for the GitHubEnterpriseConfig
+     * For example:
+     * "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
+     * 
+ * + * string name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The full resource name for the GitHubEnterpriseConfig
+     * For example:
+     * "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
+     * 
+ * + * string name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The full resource name for the GitHubEnterpriseConfig
+     * For example:
+     * "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
+     * 
+ * + * string name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The full resource name for the GitHubEnterpriseConfig
+     * For example:
+     * "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
+     * 
+ * + * string name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object hostUrl_ = ""; + /** + * + * + *
+     * The URL of the github enterprise host the configuration is for.
+     * 
+ * + * string host_url = 3; + * + * @return The hostUrl. + */ + public java.lang.String getHostUrl() { + java.lang.Object ref = hostUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URL of the github enterprise host the configuration is for.
+     * 
+ * + * string host_url = 3; + * + * @return The bytes for hostUrl. + */ + public com.google.protobuf.ByteString getHostUrlBytes() { + java.lang.Object ref = hostUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URL of the github enterprise host the configuration is for.
+     * 
+ * + * string host_url = 3; + * + * @param value The hostUrl to set. + * @return This builder for chaining. + */ + public Builder setHostUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hostUrl_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The URL of the github enterprise host the configuration is for.
+     * 
+ * + * string host_url = 3; + * + * @return This builder for chaining. + */ + public Builder clearHostUrl() { + hostUrl_ = getDefaultInstance().getHostUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The URL of the github enterprise host the configuration is for.
+     * 
+ * + * string host_url = 3; + * + * @param value The bytes for hostUrl to set. + * @return This builder for chaining. + */ + public Builder setHostUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hostUrl_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long appId_; + /** + * + * + *
+     * Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise
+     * server.
+     * 
+ * + * int64 app_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The appId. + */ + @java.lang.Override + public long getAppId() { + return appId_; + } + /** + * + * + *
+     * Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise
+     * server.
+     * 
+ * + * int64 app_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The appId to set. + * @return This builder for chaining. + */ + public Builder setAppId(long value) { + + appId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise
+     * server.
+     * 
+ * + * int64 app_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAppId() { + bitField0_ = (bitField0_ & ~0x00000004); + appId_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the installation was associated with the project.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Time when the installation was associated with the project.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the installation was associated with the project.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the installation was associated with the project.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the installation was associated with the project.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the installation was associated with the project.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the installation was associated with the project.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the installation was associated with the project.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the installation was associated with the project.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private java.lang.Object webhookKey_ = ""; + /** + * + * + *
+     * The key that should be attached to webhook calls to the ReceiveWebhook
+     * endpoint.
+     * 
+ * + * string webhook_key = 8; + * + * @return The webhookKey. + */ + public java.lang.String getWebhookKey() { + java.lang.Object ref = webhookKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webhookKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The key that should be attached to webhook calls to the ReceiveWebhook
+     * endpoint.
+     * 
+ * + * string webhook_key = 8; + * + * @return The bytes for webhookKey. + */ + public com.google.protobuf.ByteString getWebhookKeyBytes() { + java.lang.Object ref = webhookKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webhookKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The key that should be attached to webhook calls to the ReceiveWebhook
+     * endpoint.
+     * 
+ * + * string webhook_key = 8; + * + * @param value The webhookKey to set. + * @return This builder for chaining. + */ + public Builder setWebhookKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + webhookKey_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The key that should be attached to webhook calls to the ReceiveWebhook
+     * endpoint.
+     * 
+ * + * string webhook_key = 8; + * + * @return This builder for chaining. + */ + public Builder clearWebhookKey() { + webhookKey_ = getDefaultInstance().getWebhookKey(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The key that should be attached to webhook calls to the ReceiveWebhook
+     * endpoint.
+     * 
+ * + * string webhook_key = 8; + * + * @param value The bytes for webhookKey to set. + * @return This builder for chaining. + */ + public Builder setWebhookKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + webhookKey_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object peeredNetwork_ = ""; + /** + * + * + *
+     * Optional. The network to be used when reaching out to the GitHub
+     * Enterprise server. The VPC network must be enabled for private
+     * service connection. This should be set if the GitHub Enterprise server is
+     * hosted on-premises and not reachable by public internet.
+     * If this field is left empty, no network peering will occur and calls to
+     * the GitHub Enterprise server will be made over the public internet.
+     * Must be in the format
+     * `projects/{project}/global/networks/{network}`, where {project}
+     * is a project number or id and {network} is the name of a
+     * VPC network in the project.
+     * 
+ * + * + * string peered_network = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The peeredNetwork. + */ + public java.lang.String getPeeredNetwork() { + java.lang.Object ref = peeredNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peeredNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The network to be used when reaching out to the GitHub
+     * Enterprise server. The VPC network must be enabled for private
+     * service connection. This should be set if the GitHub Enterprise server is
+     * hosted on-premises and not reachable by public internet.
+     * If this field is left empty, no network peering will occur and calls to
+     * the GitHub Enterprise server will be made over the public internet.
+     * Must be in the format
+     * `projects/{project}/global/networks/{network}`, where {project}
+     * is a project number or id and {network} is the name of a
+     * VPC network in the project.
+     * 
+ * + * + * string peered_network = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for peeredNetwork. + */ + public com.google.protobuf.ByteString getPeeredNetworkBytes() { + java.lang.Object ref = peeredNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peeredNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The network to be used when reaching out to the GitHub
+     * Enterprise server. The VPC network must be enabled for private
+     * service connection. This should be set if the GitHub Enterprise server is
+     * hosted on-premises and not reachable by public internet.
+     * If this field is left empty, no network peering will occur and calls to
+     * the GitHub Enterprise server will be made over the public internet.
+     * Must be in the format
+     * `projects/{project}/global/networks/{network}`, where {project}
+     * is a project number or id and {network} is the name of a
+     * VPC network in the project.
+     * 
+ * + * + * string peered_network = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The peeredNetwork to set. + * @return This builder for chaining. + */ + public Builder setPeeredNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peeredNetwork_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The network to be used when reaching out to the GitHub
+     * Enterprise server. The VPC network must be enabled for private
+     * service connection. This should be set if the GitHub Enterprise server is
+     * hosted on-premises and not reachable by public internet.
+     * If this field is left empty, no network peering will occur and calls to
+     * the GitHub Enterprise server will be made over the public internet.
+     * Must be in the format
+     * `projects/{project}/global/networks/{network}`, where {project}
+     * is a project number or id and {network} is the name of a
+     * VPC network in the project.
+     * 
+ * + * + * string peered_network = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPeeredNetwork() { + peeredNetwork_ = getDefaultInstance().getPeeredNetwork(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The network to be used when reaching out to the GitHub
+     * Enterprise server. The VPC network must be enabled for private
+     * service connection. This should be set if the GitHub Enterprise server is
+     * hosted on-premises and not reachable by public internet.
+     * If this field is left empty, no network peering will occur and calls to
+     * the GitHub Enterprise server will be made over the public internet.
+     * Must be in the format
+     * `projects/{project}/global/networks/{network}`, where {project}
+     * is a project number or id and {network} is the name of a
+     * VPC network in the project.
+     * 
+ * + * + * string peered_network = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for peeredNetwork to set. + * @return This builder for chaining. + */ + public Builder setPeeredNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peeredNetwork_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.cloudbuild.v1.GitHubEnterpriseSecrets secrets_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloudbuild.v1.GitHubEnterpriseSecrets, + com.google.cloudbuild.v1.GitHubEnterpriseSecrets.Builder, + com.google.cloudbuild.v1.GitHubEnterpriseSecretsOrBuilder> + secretsBuilder_; + /** + * + * + *
+     * Names of secrets in Secret Manager.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + * + * @return Whether the secrets field is set. + */ + public boolean hasSecrets() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Names of secrets in Secret Manager.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + * + * @return The secrets. + */ + public com.google.cloudbuild.v1.GitHubEnterpriseSecrets getSecrets() { + if (secretsBuilder_ == null) { + return secrets_ == null + ? com.google.cloudbuild.v1.GitHubEnterpriseSecrets.getDefaultInstance() + : secrets_; + } else { + return secretsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Names of secrets in Secret Manager.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + */ + public Builder setSecrets(com.google.cloudbuild.v1.GitHubEnterpriseSecrets value) { + if (secretsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + secrets_ = value; + } else { + secretsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Names of secrets in Secret Manager.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + */ + public Builder setSecrets( + com.google.cloudbuild.v1.GitHubEnterpriseSecrets.Builder builderForValue) { + if (secretsBuilder_ == null) { + secrets_ = builderForValue.build(); + } else { + secretsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Names of secrets in Secret Manager.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + */ + public Builder mergeSecrets(com.google.cloudbuild.v1.GitHubEnterpriseSecrets value) { + if (secretsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && secrets_ != null + && secrets_ != com.google.cloudbuild.v1.GitHubEnterpriseSecrets.getDefaultInstance()) { + getSecretsBuilder().mergeFrom(value); + } else { + secrets_ = value; + } + } else { + secretsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Names of secrets in Secret Manager.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + */ + public Builder clearSecrets() { + bitField0_ = (bitField0_ & ~0x00000040); + secrets_ = null; + if (secretsBuilder_ != null) { + secretsBuilder_.dispose(); + secretsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Names of secrets in Secret Manager.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + */ + public com.google.cloudbuild.v1.GitHubEnterpriseSecrets.Builder getSecretsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getSecretsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Names of secrets in Secret Manager.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + */ + public com.google.cloudbuild.v1.GitHubEnterpriseSecretsOrBuilder getSecretsOrBuilder() { + if (secretsBuilder_ != null) { + return secretsBuilder_.getMessageOrBuilder(); + } else { + return secrets_ == null + ? com.google.cloudbuild.v1.GitHubEnterpriseSecrets.getDefaultInstance() + : secrets_; + } + } + /** + * + * + *
+     * Names of secrets in Secret Manager.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloudbuild.v1.GitHubEnterpriseSecrets, + com.google.cloudbuild.v1.GitHubEnterpriseSecrets.Builder, + com.google.cloudbuild.v1.GitHubEnterpriseSecretsOrBuilder> + getSecretsFieldBuilder() { + if (secretsBuilder_ == null) { + secretsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloudbuild.v1.GitHubEnterpriseSecrets, + com.google.cloudbuild.v1.GitHubEnterpriseSecrets.Builder, + com.google.cloudbuild.v1.GitHubEnterpriseSecretsOrBuilder>( + getSecrets(), getParentForChildren(), isClean()); + secrets_ = null; + } + return secretsBuilder_; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Name to display for this config.
+     * 
+ * + * string display_name = 11; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name to display for this config.
+     * 
+ * + * string display_name = 11; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name to display for this config.
+     * 
+ * + * string display_name = 11; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Name to display for this config.
+     * 
+ * + * string display_name = 11; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Name to display for this config.
+     * 
+ * + * string display_name = 11; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object sslCa_ = ""; + /** + * + * + *
+     * Optional. SSL certificate to use for requests to GitHub Enterprise.
+     * 
+ * + * string ssl_ca = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sslCa. + */ + public java.lang.String getSslCa() { + java.lang.Object ref = sslCa_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sslCa_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. SSL certificate to use for requests to GitHub Enterprise.
+     * 
+ * + * string ssl_ca = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sslCa. + */ + public com.google.protobuf.ByteString getSslCaBytes() { + java.lang.Object ref = sslCa_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sslCa_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. SSL certificate to use for requests to GitHub Enterprise.
+     * 
+ * + * string ssl_ca = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sslCa to set. + * @return This builder for chaining. + */ + public Builder setSslCa(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sslCa_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. SSL certificate to use for requests to GitHub Enterprise.
+     * 
+ * + * string ssl_ca = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSslCa() { + sslCa_ = getDefaultInstance().getSslCa(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. SSL certificate to use for requests to GitHub Enterprise.
+     * 
+ * + * string ssl_ca = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for sslCa to set. + * @return This builder for chaining. + */ + public Builder setSslCaBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sslCa_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.GitHubEnterpriseConfig) + } + + // @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.GitHubEnterpriseConfig) + private static final com.google.cloudbuild.v1.GitHubEnterpriseConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloudbuild.v1.GitHubEnterpriseConfig(); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GitHubEnterpriseConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitHubEnterpriseConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseConfigOrBuilder.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseConfigOrBuilder.java new file mode 100644 index 000000000000..7227ea1f46ea --- /dev/null +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseConfigOrBuilder.java @@ -0,0 +1,290 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/cloudbuild/v1/cloudbuild.proto + +package com.google.cloudbuild.v1; + +public interface GitHubEnterpriseConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.cloudbuild.v1.GitHubEnterpriseConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The full resource name for the GitHubEnterpriseConfig
+   * For example:
+   * "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
+   * 
+ * + * string name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Optional. The full resource name for the GitHubEnterpriseConfig
+   * For example:
+   * "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
+   * 
+ * + * string name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The URL of the github enterprise host the configuration is for.
+   * 
+ * + * string host_url = 3; + * + * @return The hostUrl. + */ + java.lang.String getHostUrl(); + /** + * + * + *
+   * The URL of the github enterprise host the configuration is for.
+   * 
+ * + * string host_url = 3; + * + * @return The bytes for hostUrl. + */ + com.google.protobuf.ByteString getHostUrlBytes(); + + /** + * + * + *
+   * Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise
+   * server.
+   * 
+ * + * int64 app_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The appId. + */ + long getAppId(); + + /** + * + * + *
+   * Output only. Time when the installation was associated with the project.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the installation was associated with the project.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the installation was associated with the project.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The key that should be attached to webhook calls to the ReceiveWebhook
+   * endpoint.
+   * 
+ * + * string webhook_key = 8; + * + * @return The webhookKey. + */ + java.lang.String getWebhookKey(); + /** + * + * + *
+   * The key that should be attached to webhook calls to the ReceiveWebhook
+   * endpoint.
+   * 
+ * + * string webhook_key = 8; + * + * @return The bytes for webhookKey. + */ + com.google.protobuf.ByteString getWebhookKeyBytes(); + + /** + * + * + *
+   * Optional. The network to be used when reaching out to the GitHub
+   * Enterprise server. The VPC network must be enabled for private
+   * service connection. This should be set if the GitHub Enterprise server is
+   * hosted on-premises and not reachable by public internet.
+   * If this field is left empty, no network peering will occur and calls to
+   * the GitHub Enterprise server will be made over the public internet.
+   * Must be in the format
+   * `projects/{project}/global/networks/{network}`, where {project}
+   * is a project number or id and {network} is the name of a
+   * VPC network in the project.
+   * 
+ * + * + * string peered_network = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The peeredNetwork. + */ + java.lang.String getPeeredNetwork(); + /** + * + * + *
+   * Optional. The network to be used when reaching out to the GitHub
+   * Enterprise server. The VPC network must be enabled for private
+   * service connection. This should be set if the GitHub Enterprise server is
+   * hosted on-premises and not reachable by public internet.
+   * If this field is left empty, no network peering will occur and calls to
+   * the GitHub Enterprise server will be made over the public internet.
+   * Must be in the format
+   * `projects/{project}/global/networks/{network}`, where {project}
+   * is a project number or id and {network} is the name of a
+   * VPC network in the project.
+   * 
+ * + * + * string peered_network = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for peeredNetwork. + */ + com.google.protobuf.ByteString getPeeredNetworkBytes(); + + /** + * + * + *
+   * Names of secrets in Secret Manager.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + * + * @return Whether the secrets field is set. + */ + boolean hasSecrets(); + /** + * + * + *
+   * Names of secrets in Secret Manager.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + * + * @return The secrets. + */ + com.google.cloudbuild.v1.GitHubEnterpriseSecrets getSecrets(); + /** + * + * + *
+   * Names of secrets in Secret Manager.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets secrets = 10; + */ + com.google.cloudbuild.v1.GitHubEnterpriseSecretsOrBuilder getSecretsOrBuilder(); + + /** + * + * + *
+   * Name to display for this config.
+   * 
+ * + * string display_name = 11; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Name to display for this config.
+   * 
+ * + * string display_name = 11; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. SSL certificate to use for requests to GitHub Enterprise.
+   * 
+ * + * string ssl_ca = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sslCa. + */ + java.lang.String getSslCa(); + /** + * + * + *
+   * Optional. SSL certificate to use for requests to GitHub Enterprise.
+   * 
+ * + * string ssl_ca = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sslCa. + */ + com.google.protobuf.ByteString getSslCaBytes(); +} diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseSecrets.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseSecrets.java new file mode 100644 index 000000000000..e55f52e3c432 --- /dev/null +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseSecrets.java @@ -0,0 +1,1188 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/cloudbuild/v1/cloudbuild.proto + +package com.google.cloudbuild.v1; + +/** + * + * + *
+ * GitHubEnterpriseSecrets represents the names of all necessary secrets in
+ * Secret Manager for a GitHub Enterprise server.
+ * Format is: projects/<project number>/secrets/<secret name>.
+ * 
+ * + * Protobuf type {@code google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets} + */ +public final class GitHubEnterpriseSecrets extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets) + GitHubEnterpriseSecretsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GitHubEnterpriseSecrets.newBuilder() to construct. + private GitHubEnterpriseSecrets(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GitHubEnterpriseSecrets() { + privateKeyVersionName_ = ""; + webhookSecretVersionName_ = ""; + oauthSecretVersionName_ = ""; + oauthClientIdVersionName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GitHubEnterpriseSecrets(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseSecrets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseSecrets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloudbuild.v1.GitHubEnterpriseSecrets.class, + com.google.cloudbuild.v1.GitHubEnterpriseSecrets.Builder.class); + } + + public static final int PRIVATE_KEY_VERSION_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object privateKeyVersionName_ = ""; + /** + * + * + *
+   * The resource name for the private key secret version.
+   * 
+ * + * string private_key_version_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The privateKeyVersionName. + */ + @java.lang.Override + public java.lang.String getPrivateKeyVersionName() { + java.lang.Object ref = privateKeyVersionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + privateKeyVersionName_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name for the private key secret version.
+   * 
+ * + * string private_key_version_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for privateKeyVersionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrivateKeyVersionNameBytes() { + java.lang.Object ref = privateKeyVersionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + privateKeyVersionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEBHOOK_SECRET_VERSION_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object webhookSecretVersionName_ = ""; + /** + * + * + *
+   * The resource name for the webhook secret secret version in Secret Manager.
+   * 
+ * + * string webhook_secret_version_name = 6 [(.google.api.resource_reference) = { ... } + * + * @return The webhookSecretVersionName. + */ + @java.lang.Override + public java.lang.String getWebhookSecretVersionName() { + java.lang.Object ref = webhookSecretVersionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webhookSecretVersionName_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name for the webhook secret secret version in Secret Manager.
+   * 
+ * + * string webhook_secret_version_name = 6 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for webhookSecretVersionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebhookSecretVersionNameBytes() { + java.lang.Object ref = webhookSecretVersionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webhookSecretVersionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OAUTH_SECRET_VERSION_NAME_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object oauthSecretVersionName_ = ""; + /** + * + * + *
+   * The resource name for the OAuth secret secret version in Secret Manager.
+   * 
+ * + * string oauth_secret_version_name = 7 [(.google.api.resource_reference) = { ... } + * + * @return The oauthSecretVersionName. + */ + @java.lang.Override + public java.lang.String getOauthSecretVersionName() { + java.lang.Object ref = oauthSecretVersionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauthSecretVersionName_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name for the OAuth secret secret version in Secret Manager.
+   * 
+ * + * string oauth_secret_version_name = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for oauthSecretVersionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOauthSecretVersionNameBytes() { + java.lang.Object ref = oauthSecretVersionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauthSecretVersionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OAUTH_CLIENT_ID_VERSION_NAME_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object oauthClientIdVersionName_ = ""; + /** + * + * + *
+   * The resource name for the OAuth client ID secret version in Secret Manager.
+   * 
+ * + * string oauth_client_id_version_name = 8 [(.google.api.resource_reference) = { ... } + * + * + * @return The oauthClientIdVersionName. + */ + @java.lang.Override + public java.lang.String getOauthClientIdVersionName() { + java.lang.Object ref = oauthClientIdVersionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauthClientIdVersionName_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name for the OAuth client ID secret version in Secret Manager.
+   * 
+ * + * string oauth_client_id_version_name = 8 [(.google.api.resource_reference) = { ... } + * + * + * @return The bytes for oauthClientIdVersionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOauthClientIdVersionNameBytes() { + java.lang.Object ref = oauthClientIdVersionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauthClientIdVersionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(privateKeyVersionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, privateKeyVersionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookSecretVersionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, webhookSecretVersionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oauthSecretVersionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, oauthSecretVersionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oauthClientIdVersionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, oauthClientIdVersionName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(privateKeyVersionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, privateKeyVersionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookSecretVersionName_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(6, webhookSecretVersionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oauthSecretVersionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, oauthSecretVersionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oauthClientIdVersionName_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(8, oauthClientIdVersionName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloudbuild.v1.GitHubEnterpriseSecrets)) { + return super.equals(obj); + } + com.google.cloudbuild.v1.GitHubEnterpriseSecrets other = + (com.google.cloudbuild.v1.GitHubEnterpriseSecrets) obj; + + if (!getPrivateKeyVersionName().equals(other.getPrivateKeyVersionName())) return false; + if (!getWebhookSecretVersionName().equals(other.getWebhookSecretVersionName())) return false; + if (!getOauthSecretVersionName().equals(other.getOauthSecretVersionName())) return false; + if (!getOauthClientIdVersionName().equals(other.getOauthClientIdVersionName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRIVATE_KEY_VERSION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPrivateKeyVersionName().hashCode(); + hash = (37 * hash) + WEBHOOK_SECRET_VERSION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWebhookSecretVersionName().hashCode(); + hash = (37 * hash) + OAUTH_SECRET_VERSION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOauthSecretVersionName().hashCode(); + hash = (37 * hash) + OAUTH_CLIENT_ID_VERSION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOauthClientIdVersionName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloudbuild.v1.GitHubEnterpriseSecrets prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * GitHubEnterpriseSecrets represents the names of all necessary secrets in
+   * Secret Manager for a GitHub Enterprise server.
+   * Format is: projects/<project number>/secrets/<secret name>.
+   * 
+ * + * Protobuf type {@code google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets) + com.google.cloudbuild.v1.GitHubEnterpriseSecretsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseSecrets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseSecrets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloudbuild.v1.GitHubEnterpriseSecrets.class, + com.google.cloudbuild.v1.GitHubEnterpriseSecrets.Builder.class); + } + + // Construct using com.google.cloudbuild.v1.GitHubEnterpriseSecrets.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + privateKeyVersionName_ = ""; + webhookSecretVersionName_ = ""; + oauthSecretVersionName_ = ""; + oauthClientIdVersionName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitHubEnterpriseSecrets_descriptor; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitHubEnterpriseSecrets getDefaultInstanceForType() { + return com.google.cloudbuild.v1.GitHubEnterpriseSecrets.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitHubEnterpriseSecrets build() { + com.google.cloudbuild.v1.GitHubEnterpriseSecrets result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitHubEnterpriseSecrets buildPartial() { + com.google.cloudbuild.v1.GitHubEnterpriseSecrets result = + new com.google.cloudbuild.v1.GitHubEnterpriseSecrets(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloudbuild.v1.GitHubEnterpriseSecrets result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.privateKeyVersionName_ = privateKeyVersionName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.webhookSecretVersionName_ = webhookSecretVersionName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.oauthSecretVersionName_ = oauthSecretVersionName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.oauthClientIdVersionName_ = oauthClientIdVersionName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloudbuild.v1.GitHubEnterpriseSecrets) { + return mergeFrom((com.google.cloudbuild.v1.GitHubEnterpriseSecrets) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloudbuild.v1.GitHubEnterpriseSecrets other) { + if (other == com.google.cloudbuild.v1.GitHubEnterpriseSecrets.getDefaultInstance()) + return this; + if (!other.getPrivateKeyVersionName().isEmpty()) { + privateKeyVersionName_ = other.privateKeyVersionName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getWebhookSecretVersionName().isEmpty()) { + webhookSecretVersionName_ = other.webhookSecretVersionName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOauthSecretVersionName().isEmpty()) { + oauthSecretVersionName_ = other.oauthSecretVersionName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOauthClientIdVersionName().isEmpty()) { + oauthClientIdVersionName_ = other.oauthClientIdVersionName_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 42: + { + privateKeyVersionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 42 + case 50: + { + webhookSecretVersionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 50 + case 58: + { + oauthSecretVersionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 58 + case 66: + { + oauthClientIdVersionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object privateKeyVersionName_ = ""; + /** + * + * + *
+     * The resource name for the private key secret version.
+     * 
+ * + * string private_key_version_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The privateKeyVersionName. + */ + public java.lang.String getPrivateKeyVersionName() { + java.lang.Object ref = privateKeyVersionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + privateKeyVersionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name for the private key secret version.
+     * 
+ * + * string private_key_version_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for privateKeyVersionName. + */ + public com.google.protobuf.ByteString getPrivateKeyVersionNameBytes() { + java.lang.Object ref = privateKeyVersionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + privateKeyVersionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name for the private key secret version.
+     * 
+ * + * string private_key_version_name = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The privateKeyVersionName to set. + * @return This builder for chaining. + */ + public Builder setPrivateKeyVersionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + privateKeyVersionName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the private key secret version.
+     * 
+ * + * string private_key_version_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearPrivateKeyVersionName() { + privateKeyVersionName_ = getDefaultInstance().getPrivateKeyVersionName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the private key secret version.
+     * 
+ * + * string private_key_version_name = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for privateKeyVersionName to set. + * @return This builder for chaining. + */ + public Builder setPrivateKeyVersionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + privateKeyVersionName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object webhookSecretVersionName_ = ""; + /** + * + * + *
+     * The resource name for the webhook secret secret version in Secret Manager.
+     * 
+ * + * string webhook_secret_version_name = 6 [(.google.api.resource_reference) = { ... } + * + * + * @return The webhookSecretVersionName. + */ + public java.lang.String getWebhookSecretVersionName() { + java.lang.Object ref = webhookSecretVersionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webhookSecretVersionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name for the webhook secret secret version in Secret Manager.
+     * 
+ * + * string webhook_secret_version_name = 6 [(.google.api.resource_reference) = { ... } + * + * + * @return The bytes for webhookSecretVersionName. + */ + public com.google.protobuf.ByteString getWebhookSecretVersionNameBytes() { + java.lang.Object ref = webhookSecretVersionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webhookSecretVersionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name for the webhook secret secret version in Secret Manager.
+     * 
+ * + * string webhook_secret_version_name = 6 [(.google.api.resource_reference) = { ... } + * + * + * @param value The webhookSecretVersionName to set. + * @return This builder for chaining. + */ + public Builder setWebhookSecretVersionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + webhookSecretVersionName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the webhook secret secret version in Secret Manager.
+     * 
+ * + * string webhook_secret_version_name = 6 [(.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearWebhookSecretVersionName() { + webhookSecretVersionName_ = getDefaultInstance().getWebhookSecretVersionName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the webhook secret secret version in Secret Manager.
+     * 
+ * + * string webhook_secret_version_name = 6 [(.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for webhookSecretVersionName to set. + * @return This builder for chaining. + */ + public Builder setWebhookSecretVersionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + webhookSecretVersionName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object oauthSecretVersionName_ = ""; + /** + * + * + *
+     * The resource name for the OAuth secret secret version in Secret Manager.
+     * 
+ * + * string oauth_secret_version_name = 7 [(.google.api.resource_reference) = { ... } + * + * @return The oauthSecretVersionName. + */ + public java.lang.String getOauthSecretVersionName() { + java.lang.Object ref = oauthSecretVersionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauthSecretVersionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name for the OAuth secret secret version in Secret Manager.
+     * 
+ * + * string oauth_secret_version_name = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for oauthSecretVersionName. + */ + public com.google.protobuf.ByteString getOauthSecretVersionNameBytes() { + java.lang.Object ref = oauthSecretVersionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauthSecretVersionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name for the OAuth secret secret version in Secret Manager.
+     * 
+ * + * string oauth_secret_version_name = 7 [(.google.api.resource_reference) = { ... } + * + * @param value The oauthSecretVersionName to set. + * @return This builder for chaining. + */ + public Builder setOauthSecretVersionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oauthSecretVersionName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the OAuth secret secret version in Secret Manager.
+     * 
+ * + * string oauth_secret_version_name = 7 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearOauthSecretVersionName() { + oauthSecretVersionName_ = getDefaultInstance().getOauthSecretVersionName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the OAuth secret secret version in Secret Manager.
+     * 
+ * + * string oauth_secret_version_name = 7 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for oauthSecretVersionName to set. + * @return This builder for chaining. + */ + public Builder setOauthSecretVersionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oauthSecretVersionName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object oauthClientIdVersionName_ = ""; + /** + * + * + *
+     * The resource name for the OAuth client ID secret version in Secret Manager.
+     * 
+ * + * string oauth_client_id_version_name = 8 [(.google.api.resource_reference) = { ... } + * + * + * @return The oauthClientIdVersionName. + */ + public java.lang.String getOauthClientIdVersionName() { + java.lang.Object ref = oauthClientIdVersionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauthClientIdVersionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name for the OAuth client ID secret version in Secret Manager.
+     * 
+ * + * string oauth_client_id_version_name = 8 [(.google.api.resource_reference) = { ... } + * + * + * @return The bytes for oauthClientIdVersionName. + */ + public com.google.protobuf.ByteString getOauthClientIdVersionNameBytes() { + java.lang.Object ref = oauthClientIdVersionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauthClientIdVersionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name for the OAuth client ID secret version in Secret Manager.
+     * 
+ * + * string oauth_client_id_version_name = 8 [(.google.api.resource_reference) = { ... } + * + * + * @param value The oauthClientIdVersionName to set. + * @return This builder for chaining. + */ + public Builder setOauthClientIdVersionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oauthClientIdVersionName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the OAuth client ID secret version in Secret Manager.
+     * 
+ * + * string oauth_client_id_version_name = 8 [(.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearOauthClientIdVersionName() { + oauthClientIdVersionName_ = getDefaultInstance().getOauthClientIdVersionName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the OAuth client ID secret version in Secret Manager.
+     * 
+ * + * string oauth_client_id_version_name = 8 [(.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for oauthClientIdVersionName to set. + * @return This builder for chaining. + */ + public Builder setOauthClientIdVersionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oauthClientIdVersionName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets) + } + + // @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets) + private static final com.google.cloudbuild.v1.GitHubEnterpriseSecrets DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloudbuild.v1.GitHubEnterpriseSecrets(); + } + + public static com.google.cloudbuild.v1.GitHubEnterpriseSecrets getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GitHubEnterpriseSecrets parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitHubEnterpriseSecrets getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseSecretsOrBuilder.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseSecretsOrBuilder.java new file mode 100644 index 000000000000..8fcfd324afa0 --- /dev/null +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEnterpriseSecretsOrBuilder.java @@ -0,0 +1,127 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/cloudbuild/v1/cloudbuild.proto + +package com.google.cloudbuild.v1; + +public interface GitHubEnterpriseSecretsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name for the private key secret version.
+   * 
+ * + * string private_key_version_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The privateKeyVersionName. + */ + java.lang.String getPrivateKeyVersionName(); + /** + * + * + *
+   * The resource name for the private key secret version.
+   * 
+ * + * string private_key_version_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for privateKeyVersionName. + */ + com.google.protobuf.ByteString getPrivateKeyVersionNameBytes(); + + /** + * + * + *
+   * The resource name for the webhook secret secret version in Secret Manager.
+   * 
+ * + * string webhook_secret_version_name = 6 [(.google.api.resource_reference) = { ... } + * + * @return The webhookSecretVersionName. + */ + java.lang.String getWebhookSecretVersionName(); + /** + * + * + *
+   * The resource name for the webhook secret secret version in Secret Manager.
+   * 
+ * + * string webhook_secret_version_name = 6 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for webhookSecretVersionName. + */ + com.google.protobuf.ByteString getWebhookSecretVersionNameBytes(); + + /** + * + * + *
+   * The resource name for the OAuth secret secret version in Secret Manager.
+   * 
+ * + * string oauth_secret_version_name = 7 [(.google.api.resource_reference) = { ... } + * + * @return The oauthSecretVersionName. + */ + java.lang.String getOauthSecretVersionName(); + /** + * + * + *
+   * The resource name for the OAuth secret secret version in Secret Manager.
+   * 
+ * + * string oauth_secret_version_name = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for oauthSecretVersionName. + */ + com.google.protobuf.ByteString getOauthSecretVersionNameBytes(); + + /** + * + * + *
+   * The resource name for the OAuth client ID secret version in Secret Manager.
+   * 
+ * + * string oauth_client_id_version_name = 8 [(.google.api.resource_reference) = { ... } + * + * + * @return The oauthClientIdVersionName. + */ + java.lang.String getOauthClientIdVersionName(); + /** + * + * + *
+   * The resource name for the OAuth client ID secret version in Secret Manager.
+   * 
+ * + * string oauth_client_id_version_name = 8 [(.google.api.resource_reference) = { ... } + * + * + * @return The bytes for oauthClientIdVersionName. + */ + com.google.protobuf.ByteString getOauthClientIdVersionNameBytes(); +} diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEventsConfig.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEventsConfig.java index a3fca3c9935d..a0c58ead762d 100644 --- a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEventsConfig.java +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEventsConfig.java @@ -125,7 +125,7 @@ public EventCase getEventCase() { * int64 installation_id = 1 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.GitHubEventsConfig.installation_id is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1743 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1856 * @return The installationId. */ @java.lang.Override @@ -844,7 +844,7 @@ public Builder clearEvent() { * int64 installation_id = 1 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.GitHubEventsConfig.installation_id is deprecated. - * See google/devtools/cloudbuild/v1/cloudbuild.proto;l=1743 + * See google/devtools/cloudbuild/v1/cloudbuild.proto;l=1856 * @return The installationId. */ @java.lang.Override @@ -862,7 +862,7 @@ public long getInstallationId() { * int64 installation_id = 1 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.GitHubEventsConfig.installation_id is deprecated. - * See google/devtools/cloudbuild/v1/cloudbuild.proto;l=1743 + * See google/devtools/cloudbuild/v1/cloudbuild.proto;l=1856 * @param value The installationId to set. * @return This builder for chaining. */ @@ -884,7 +884,7 @@ public Builder setInstallationId(long value) { * int64 installation_id = 1 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.GitHubEventsConfig.installation_id is deprecated. - * See google/devtools/cloudbuild/v1/cloudbuild.proto;l=1743 + * See google/devtools/cloudbuild/v1/cloudbuild.proto;l=1856 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEventsConfigOrBuilder.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEventsConfigOrBuilder.java index cc15ebab73dd..5943cdbdc951 100644 --- a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEventsConfigOrBuilder.java +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitHubEventsConfigOrBuilder.java @@ -33,7 +33,7 @@ public interface GitHubEventsConfigOrBuilder * int64 installation_id = 1 [deprecated = true]; * * @deprecated google.devtools.cloudbuild.v1.GitHubEventsConfig.installation_id is deprecated. See - * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1743 + * google/devtools/cloudbuild/v1/cloudbuild.proto;l=1856 * @return The installationId. */ @java.lang.Deprecated diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitRepoSource.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitRepoSource.java new file mode 100644 index 000000000000..02d266d74d6e --- /dev/null +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitRepoSource.java @@ -0,0 +1,1628 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/cloudbuild/v1/cloudbuild.proto + +package com.google.cloudbuild.v1; + +/** + * + * + *
+ * GitRepoSource describes a repo and ref of a code repository.
+ * 
+ * + * Protobuf type {@code google.devtools.cloudbuild.v1.GitRepoSource} + */ +public final class GitRepoSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.GitRepoSource) + GitRepoSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GitRepoSource.newBuilder() to construct. + private GitRepoSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GitRepoSource() { + uri_ = ""; + ref_ = ""; + repoType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GitRepoSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitRepoSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitRepoSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloudbuild.v1.GitRepoSource.class, + com.google.cloudbuild.v1.GitRepoSource.Builder.class); + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REPOSITORY(6), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 6: + return REPOSITORY; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + private int enterpriseConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object enterpriseConfig_; + + public enum EnterpriseConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GITHUB_ENTERPRISE_CONFIG(4), + ENTERPRISECONFIG_NOT_SET(0); + private final int value; + + private EnterpriseConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EnterpriseConfigCase valueOf(int value) { + return forNumber(value); + } + + public static EnterpriseConfigCase forNumber(int value) { + switch (value) { + case 4: + return GITHUB_ENTERPRISE_CONFIG; + case 0: + return ENTERPRISECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EnterpriseConfigCase getEnterpriseConfigCase() { + return EnterpriseConfigCase.forNumber(enterpriseConfigCase_); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * The URI of the repo (e.g. https://github.com/user/repo.git).
+   * Either `uri` or `repository` can be specified and is required.
+   * 
+ * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the repo (e.g. https://github.com/user/repo.git).
+   * Either `uri` or `repository` can be specified and is required.
+   * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPOSITORY_FIELD_NUMBER = 6; + /** + * + * + *
+   * The connected repository resource name, in the format
+   * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+   * `repository` can be specified and is required.
+   * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @return Whether the repository field is set. + */ + public boolean hasRepository() { + return sourceCase_ == 6; + } + /** + * + * + *
+   * The connected repository resource name, in the format
+   * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+   * `repository` can be specified and is required.
+   * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @return The repository. + */ + public java.lang.String getRepository() { + java.lang.Object ref = ""; + if (sourceCase_ == 6) { + ref = source_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 6) { + source_ = s; + } + return s; + } + } + /** + * + * + *
+   * The connected repository resource name, in the format
+   * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+   * `repository` can be specified and is required.
+   * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for repository. + */ + public com.google.protobuf.ByteString getRepositoryBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 6) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 6) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REF_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ref_ = ""; + /** + * + * + *
+   * The branch or tag to use. Must start with "refs/" (required).
+   * 
+ * + * string ref = 2; + * + * @return The ref. + */ + @java.lang.Override + public java.lang.String getRef() { + java.lang.Object ref = ref_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ref_ = s; + return s; + } + } + /** + * + * + *
+   * The branch or tag to use. Must start with "refs/" (required).
+   * 
+ * + * string ref = 2; + * + * @return The bytes for ref. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRefBytes() { + java.lang.Object ref = ref_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ref_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPO_TYPE_FIELD_NUMBER = 3; + private int repoType_ = 0; + /** + * + * + *
+   * See RepoType below.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The enum numeric value on the wire for repoType. + */ + @java.lang.Override + public int getRepoTypeValue() { + return repoType_; + } + /** + * + * + *
+   * See RepoType below.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The repoType. + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSource.RepoType getRepoType() { + com.google.cloudbuild.v1.GitFileSource.RepoType result = + com.google.cloudbuild.v1.GitFileSource.RepoType.forNumber(repoType_); + return result == null ? com.google.cloudbuild.v1.GitFileSource.RepoType.UNRECOGNIZED : result; + } + + public static final int GITHUB_ENTERPRISE_CONFIG_FIELD_NUMBER = 4; + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @return Whether the githubEnterpriseConfig field is set. + */ + public boolean hasGithubEnterpriseConfig() { + return enterpriseConfigCase_ == 4; + } + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @return The githubEnterpriseConfig. + */ + public java.lang.String getGithubEnterpriseConfig() { + java.lang.Object ref = ""; + if (enterpriseConfigCase_ == 4) { + ref = enterpriseConfig_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (enterpriseConfigCase_ == 4) { + enterpriseConfig_ = s; + } + return s; + } + } + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for githubEnterpriseConfig. + */ + public com.google.protobuf.ByteString getGithubEnterpriseConfigBytes() { + java.lang.Object ref = ""; + if (enterpriseConfigCase_ == 4) { + ref = enterpriseConfig_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (enterpriseConfigCase_ == 4) { + enterpriseConfig_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ref_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ref_); + } + if (repoType_ != com.google.cloudbuild.v1.GitFileSource.RepoType.UNKNOWN.getNumber()) { + output.writeEnum(3, repoType_); + } + if (enterpriseConfigCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, enterpriseConfig_); + } + if (sourceCase_ == 6) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, source_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ref_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ref_); + } + if (repoType_ != com.google.cloudbuild.v1.GitFileSource.RepoType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, repoType_); + } + if (enterpriseConfigCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, enterpriseConfig_); + } + if (sourceCase_ == 6) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, source_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloudbuild.v1.GitRepoSource)) { + return super.equals(obj); + } + com.google.cloudbuild.v1.GitRepoSource other = (com.google.cloudbuild.v1.GitRepoSource) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getRef().equals(other.getRef())) return false; + if (repoType_ != other.repoType_) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 6: + if (!getRepository().equals(other.getRepository())) return false; + break; + case 0: + default: + } + if (!getEnterpriseConfigCase().equals(other.getEnterpriseConfigCase())) return false; + switch (enterpriseConfigCase_) { + case 4: + if (!getGithubEnterpriseConfig().equals(other.getGithubEnterpriseConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + REF_FIELD_NUMBER; + hash = (53 * hash) + getRef().hashCode(); + hash = (37 * hash) + REPO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + repoType_; + switch (sourceCase_) { + case 6: + hash = (37 * hash) + REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getRepository().hashCode(); + break; + case 0: + default: + } + switch (enterpriseConfigCase_) { + case 4: + hash = (37 * hash) + GITHUB_ENTERPRISE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGithubEnterpriseConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloudbuild.v1.GitRepoSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloudbuild.v1.GitRepoSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloudbuild.v1.GitRepoSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * GitRepoSource describes a repo and ref of a code repository.
+   * 
+ * + * Protobuf type {@code google.devtools.cloudbuild.v1.GitRepoSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.GitRepoSource) + com.google.cloudbuild.v1.GitRepoSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitRepoSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitRepoSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloudbuild.v1.GitRepoSource.class, + com.google.cloudbuild.v1.GitRepoSource.Builder.class); + } + + // Construct using com.google.cloudbuild.v1.GitRepoSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + ref_ = ""; + repoType_ = 0; + sourceCase_ = 0; + source_ = null; + enterpriseConfigCase_ = 0; + enterpriseConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloudbuild.v1.Cloudbuild + .internal_static_google_devtools_cloudbuild_v1_GitRepoSource_descriptor; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitRepoSource getDefaultInstanceForType() { + return com.google.cloudbuild.v1.GitRepoSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitRepoSource build() { + com.google.cloudbuild.v1.GitRepoSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitRepoSource buildPartial() { + com.google.cloudbuild.v1.GitRepoSource result = + new com.google.cloudbuild.v1.GitRepoSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloudbuild.v1.GitRepoSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ref_ = ref_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.repoType_ = repoType_; + } + } + + private void buildPartialOneofs(com.google.cloudbuild.v1.GitRepoSource result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + result.enterpriseConfigCase_ = enterpriseConfigCase_; + result.enterpriseConfig_ = this.enterpriseConfig_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloudbuild.v1.GitRepoSource) { + return mergeFrom((com.google.cloudbuild.v1.GitRepoSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloudbuild.v1.GitRepoSource other) { + if (other == com.google.cloudbuild.v1.GitRepoSource.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRef().isEmpty()) { + ref_ = other.ref_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.repoType_ != 0) { + setRepoTypeValue(other.getRepoTypeValue()); + } + switch (other.getSourceCase()) { + case REPOSITORY: + { + sourceCase_ = 6; + source_ = other.source_; + onChanged(); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + switch (other.getEnterpriseConfigCase()) { + case GITHUB_ENTERPRISE_CONFIG: + { + enterpriseConfigCase_ = 4; + enterpriseConfig_ = other.enterpriseConfig_; + onChanged(); + break; + } + case ENTERPRISECONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + ref_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 24: + { + repoType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + enterpriseConfigCase_ = 4; + enterpriseConfig_ = s; + break; + } // case 34 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 6; + source_ = s; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int enterpriseConfigCase_ = 0; + private java.lang.Object enterpriseConfig_; + + public EnterpriseConfigCase getEnterpriseConfigCase() { + return EnterpriseConfigCase.forNumber(enterpriseConfigCase_); + } + + public Builder clearEnterpriseConfig() { + enterpriseConfigCase_ = 0; + enterpriseConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URI of the repo (e.g. https://github.com/user/repo.git).
+     * Either `uri` or `repository` can be specified and is required.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the repo (e.g. https://github.com/user/repo.git).
+     * Either `uri` or `repository` can be specified and is required.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the repo (e.g. https://github.com/user/repo.git).
+     * Either `uri` or `repository` can be specified and is required.
+     * 
+ * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the repo (e.g. https://github.com/user/repo.git).
+     * Either `uri` or `repository` can be specified and is required.
+     * 
+ * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the repo (e.g. https://github.com/user/repo.git).
+     * Either `uri` or `repository` can be specified and is required.
+     * 
+ * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The connected repository resource name, in the format
+     * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+     * `repository` can be specified and is required.
+     * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @return Whether the repository field is set. + */ + @java.lang.Override + public boolean hasRepository() { + return sourceCase_ == 6; + } + /** + * + * + *
+     * The connected repository resource name, in the format
+     * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+     * `repository` can be specified and is required.
+     * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @return The repository. + */ + @java.lang.Override + public java.lang.String getRepository() { + java.lang.Object ref = ""; + if (sourceCase_ == 6) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 6) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The connected repository resource name, in the format
+     * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+     * `repository` can be specified and is required.
+     * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for repository. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRepositoryBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 6) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 6) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The connected repository resource name, in the format
+     * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+     * `repository` can be specified and is required.
+     * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @param value The repository to set. + * @return This builder for chaining. + */ + public Builder setRepository(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 6; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The connected repository resource name, in the format
+     * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+     * `repository` can be specified and is required.
+     * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearRepository() { + if (sourceCase_ == 6) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The connected repository resource name, in the format
+     * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+     * `repository` can be specified and is required.
+     * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for repository to set. + * @return This builder for chaining. + */ + public Builder setRepositoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 6; + source_ = value; + onChanged(); + return this; + } + + private java.lang.Object ref_ = ""; + /** + * + * + *
+     * The branch or tag to use. Must start with "refs/" (required).
+     * 
+ * + * string ref = 2; + * + * @return The ref. + */ + public java.lang.String getRef() { + java.lang.Object ref = ref_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ref_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The branch or tag to use. Must start with "refs/" (required).
+     * 
+ * + * string ref = 2; + * + * @return The bytes for ref. + */ + public com.google.protobuf.ByteString getRefBytes() { + java.lang.Object ref = ref_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ref_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The branch or tag to use. Must start with "refs/" (required).
+     * 
+ * + * string ref = 2; + * + * @param value The ref to set. + * @return This builder for chaining. + */ + public Builder setRef(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ref_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The branch or tag to use. Must start with "refs/" (required).
+     * 
+ * + * string ref = 2; + * + * @return This builder for chaining. + */ + public Builder clearRef() { + ref_ = getDefaultInstance().getRef(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The branch or tag to use. Must start with "refs/" (required).
+     * 
+ * + * string ref = 2; + * + * @param value The bytes for ref to set. + * @return This builder for chaining. + */ + public Builder setRefBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ref_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int repoType_ = 0; + /** + * + * + *
+     * See RepoType below.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The enum numeric value on the wire for repoType. + */ + @java.lang.Override + public int getRepoTypeValue() { + return repoType_; + } + /** + * + * + *
+     * See RepoType below.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @param value The enum numeric value on the wire for repoType to set. + * @return This builder for chaining. + */ + public Builder setRepoTypeValue(int value) { + repoType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * See RepoType below.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The repoType. + */ + @java.lang.Override + public com.google.cloudbuild.v1.GitFileSource.RepoType getRepoType() { + com.google.cloudbuild.v1.GitFileSource.RepoType result = + com.google.cloudbuild.v1.GitFileSource.RepoType.forNumber(repoType_); + return result == null ? com.google.cloudbuild.v1.GitFileSource.RepoType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * See RepoType below.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @param value The repoType to set. + * @return This builder for chaining. + */ + public Builder setRepoType(com.google.cloudbuild.v1.GitFileSource.RepoType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + repoType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * See RepoType below.
+     * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearRepoType() { + bitField0_ = (bitField0_ & ~0x00000008); + repoType_ = 0; + onChanged(); + return this; + } + + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @return Whether the githubEnterpriseConfig field is set. + */ + @java.lang.Override + public boolean hasGithubEnterpriseConfig() { + return enterpriseConfigCase_ == 4; + } + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @return The githubEnterpriseConfig. + */ + @java.lang.Override + public java.lang.String getGithubEnterpriseConfig() { + java.lang.Object ref = ""; + if (enterpriseConfigCase_ == 4) { + ref = enterpriseConfig_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (enterpriseConfigCase_ == 4) { + enterpriseConfig_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for githubEnterpriseConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGithubEnterpriseConfigBytes() { + java.lang.Object ref = ""; + if (enterpriseConfigCase_ == 4) { + ref = enterpriseConfig_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (enterpriseConfigCase_ == 4) { + enterpriseConfig_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The githubEnterpriseConfig to set. + * @return This builder for chaining. + */ + public Builder setGithubEnterpriseConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + enterpriseConfigCase_ = 4; + enterpriseConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearGithubEnterpriseConfig() { + if (enterpriseConfigCase_ == 4) { + enterpriseConfigCase_ = 0; + enterpriseConfig_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The full resource name of the github enterprise config.
+     * Format:
+     * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+     * `projects/{project}/githubEnterpriseConfigs/{id}`.
+     * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for githubEnterpriseConfig to set. + * @return This builder for chaining. + */ + public Builder setGithubEnterpriseConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + enterpriseConfigCase_ = 4; + enterpriseConfig_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.GitRepoSource) + } + + // @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.GitRepoSource) + private static final com.google.cloudbuild.v1.GitRepoSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloudbuild.v1.GitRepoSource(); + } + + public static com.google.cloudbuild.v1.GitRepoSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GitRepoSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloudbuild.v1.GitRepoSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitRepoSourceOrBuilder.java b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitRepoSourceOrBuilder.java new file mode 100644 index 000000000000..5b4e868953a7 --- /dev/null +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/java/com/google/cloudbuild/v1/GitRepoSourceOrBuilder.java @@ -0,0 +1,195 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/devtools/cloudbuild/v1/cloudbuild.proto + +package com.google.cloudbuild.v1; + +public interface GitRepoSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.cloudbuild.v1.GitRepoSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the repo (e.g. https://github.com/user/repo.git).
+   * Either `uri` or `repository` can be specified and is required.
+   * 
+ * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The URI of the repo (e.g. https://github.com/user/repo.git).
+   * Either `uri` or `repository` can be specified and is required.
+   * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The connected repository resource name, in the format
+   * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+   * `repository` can be specified and is required.
+   * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @return Whether the repository field is set. + */ + boolean hasRepository(); + /** + * + * + *
+   * The connected repository resource name, in the format
+   * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+   * `repository` can be specified and is required.
+   * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @return The repository. + */ + java.lang.String getRepository(); + /** + * + * + *
+   * The connected repository resource name, in the format
+   * `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
+   * `repository` can be specified and is required.
+   * 
+ * + * string repository = 6 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for repository. + */ + com.google.protobuf.ByteString getRepositoryBytes(); + + /** + * + * + *
+   * The branch or tag to use. Must start with "refs/" (required).
+   * 
+ * + * string ref = 2; + * + * @return The ref. + */ + java.lang.String getRef(); + /** + * + * + *
+   * The branch or tag to use. Must start with "refs/" (required).
+   * 
+ * + * string ref = 2; + * + * @return The bytes for ref. + */ + com.google.protobuf.ByteString getRefBytes(); + + /** + * + * + *
+   * See RepoType below.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The enum numeric value on the wire for repoType. + */ + int getRepoTypeValue(); + /** + * + * + *
+   * See RepoType below.
+   * 
+ * + * .google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3; + * + * @return The repoType. + */ + com.google.cloudbuild.v1.GitFileSource.RepoType getRepoType(); + + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @return Whether the githubEnterpriseConfig field is set. + */ + boolean hasGithubEnterpriseConfig(); + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @return The githubEnterpriseConfig. + */ + java.lang.String getGithubEnterpriseConfig(); + /** + * + * + *
+   * The full resource name of the github enterprise config.
+   * Format:
+   * `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
+   * `projects/{project}/githubEnterpriseConfigs/{id}`.
+   * 
+ * + * string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for githubEnterpriseConfig. + */ + com.google.protobuf.ByteString getGithubEnterpriseConfigBytes(); + + com.google.cloudbuild.v1.GitRepoSource.SourceCase getSourceCase(); + + com.google.cloudbuild.v1.GitRepoSource.EnterpriseConfigCase getEnterpriseConfigCase(); +} diff --git a/java-cloudbuild/proto-google-cloud-build-v1/src/main/proto/google/devtools/cloudbuild/v1/cloudbuild.proto b/java-cloudbuild/proto-google-cloud-build-v1/src/main/proto/google/devtools/cloudbuild/v1/cloudbuild.proto index 703d54c02e28..b864bed355a9 100644 --- a/java-cloudbuild/proto-google-cloud-build-v1/src/main/proto/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/java-cloudbuild/proto-google-cloud-build-v1/src/main/proto/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -1573,6 +1573,108 @@ message ApprovalResult { string url = 6 [(google.api.field_behavior) = OPTIONAL]; } +// GitRepoSource describes a repo and ref of a code repository. +message GitRepoSource { + // The URI of the repo (e.g. https://github.com/user/repo.git). + // Either `uri` or `repository` can be specified and is required. + string uri = 1; + + // The source of the SCM repo. + oneof source { + // The connected repository resource name, in the format + // `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or + // `repository` can be specified and is required. + string repository = 6 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Repository" + }]; + } + + // The branch or tag to use. Must start with "refs/" (required). + string ref = 2; + + // See RepoType below. + GitFileSource.RepoType repo_type = 3; + + // The resource name of the enterprise config that should be applied + // to this source. + oneof enterprise_config { + // The full resource name of the github enterprise config. + // Format: + // `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`. + // `projects/{project}/githubEnterpriseConfigs/{id}`. + string github_enterprise_config = 4 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/GithubEnterpriseConfig" + }]; + } +} + +// GitFileSource describes a file within a (possibly remote) code repository. +message GitFileSource { + // The type of the repo, since it may not be explicit from the `repo` field + // (e.g from a URL). + enum RepoType { + // The default, unknown repo type. Don't use it, instead use one of + // the other repo types. + UNKNOWN = 0; + + // A Google Cloud Source Repositories-hosted repo. + CLOUD_SOURCE_REPOSITORIES = 1; + + // A GitHub-hosted repo not necessarily on "github.com" (i.e. GitHub + // Enterprise). + GITHUB = 2; + + // A Bitbucket Server-hosted repo. + BITBUCKET_SERVER = 3; + + // A GitLab-hosted repo. + GITLAB = 4; + } + + // The path of the file, with the repo root as the root of the path. + string path = 1; + + // The URI of the repo. + // Either uri or repository can be specified. + // If unspecified, the repo from which the trigger invocation originated is + // assumed to be the repo from which to read the specified path. + string uri = 2; + + // The source of the SCM repo. + oneof source { + // The fully qualified resource name of the Repos API repository. + // Either URI or repository can be specified. + // If unspecified, the repo from which the trigger invocation originated is + // assumed to be the repo from which to read the specified path. + string repository = 7 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Repository" + }]; + } + + // See RepoType above. + RepoType repo_type = 3; + + // The branch, tag, arbitrary ref, or SHA version of the repo to use when + // resolving the filename (optional). + // This field respects the same syntax/resolution as described here: + // https://git-scm.com/docs/gitrevisions + // If unspecified, the revision from which the trigger invocation originated + // is assumed to be the revision from which to read the specified path. + string revision = 4; + + // The resource name of the enterprise config that should be applied + // to this source. + oneof enterprise_config { + // The full resource name of the github enterprise config. + // Format: + // `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`. + // `projects/{project}/githubEnterpriseConfigs/{id}`. + string github_enterprise_config = 5 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/GithubEnterpriseConfig" + }]; + } +} + // Configuration for an automated build in response to source repository // changes. message BuildTrigger { @@ -1649,6 +1751,9 @@ message BuildTrigger { // Path, from the source root, to the build configuration file // (i.e. cloudbuild.yaml). string filename = 8; + + // The file source describing the local or remote Build template. + GitFileSource git_file_source = 24; } // Output only. Time when the trigger was created. @@ -1686,6 +1791,14 @@ message BuildTrigger { // Optional. A Common Expression Language string. string filter = 30 [(google.api.field_behavior) = OPTIONAL]; + // 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. + GitRepoSource source_to_build = 26; + // 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 @@ -2204,6 +2317,83 @@ message ReceiveTriggerWebhookRequest { // ReceiveTriggerWebhook method. message ReceiveTriggerWebhookResponse {} +message GitHubEnterpriseConfig { + option (google.api.resource) = { + type: "cloudbuild.googleapis.com/GithubEnterpriseConfig" + pattern: "projects/{project}/githubEnterpriseConfigs/{config}" + pattern: "projects/{project}/locations/{location}/githubEnterpriseConfigs/{config}" + }; + + // Optional. The full resource name for the GitHubEnterpriseConfig + // For example: + // "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}" + string name = 7 [(google.api.field_behavior) = OPTIONAL]; + + // The URL of the github enterprise host the configuration is for. + string host_url = 3; + + // Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise + // server. + int64 app_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Time when the installation was associated with the project. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The key that should be attached to webhook calls to the ReceiveWebhook + // endpoint. + string webhook_key = 8; + + // Optional. The network to be used when reaching out to the GitHub + // Enterprise server. The VPC network must be enabled for private + // service connection. This should be set if the GitHub Enterprise server is + // hosted on-premises and not reachable by public internet. + // If this field is left empty, no network peering will occur and calls to + // the GitHub Enterprise server will be made over the public internet. + // Must be in the format + // `projects/{project}/global/networks/{network}`, where {project} + // is a project number or id and {network} is the name of a + // VPC network in the project. + string peered_network = 9 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Names of secrets in Secret Manager. + GitHubEnterpriseSecrets secrets = 10; + + // Name to display for this config. + string display_name = 11; + + // Optional. SSL certificate to use for requests to GitHub Enterprise. + string ssl_ca = 12 [(google.api.field_behavior) = OPTIONAL]; +} + +// GitHubEnterpriseSecrets represents the names of all necessary secrets in +// Secret Manager for a GitHub Enterprise server. +// Format is: projects//secrets/. +message GitHubEnterpriseSecrets { + // The resource name for the private key secret version. + string private_key_version_name = 5 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + + // The resource name for the webhook secret secret version in Secret Manager. + string webhook_secret_version_name = 6 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + + // The resource name for the OAuth secret secret version in Secret Manager. + string oauth_secret_version_name = 7 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + + // The resource name for the OAuth client ID secret version in Secret Manager. + string oauth_client_id_version_name = 8 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; +} + // Configuration for a `WorkerPool`. // // Cloud Build owns and maintains a pool of workers for general use and have no