Skip to content
Permalink
Browse files
feat: Add script field to BuildStep message (#584)
- [x] Regenerate this pull request now.

PiperOrigin-RevId: 392761119

Source-Link: googleapis/googleapis@3cd708e

Source-Link: https://github.com/googleapis/googleapis-gen/commit/05d56192ca207d89227b4b28a73bbeab312bd097
  • Loading branch information
gcf-owl-bot[bot] committed Aug 28, 2021
1 parent 10a2065 commit 1d7ba55644d47d3ce8f355dbf18322577777ba09
Show file tree
Hide file tree
Showing 5 changed files with 297 additions and 551 deletions.
@@ -565,7 +565,6 @@ public void createBuildTriggerTest() throws Exception {
.addAllIgnoredFiles(new ArrayList<String>())
.addAllIncludedFiles(new ArrayList<String>())
.setFilter("filter-1274492040")
.setServiceAccount("serviceAccount1079137720")
.build();
mockCloudBuild.addResponse(expectedResponse);

@@ -621,7 +620,6 @@ public void getBuildTriggerTest() throws Exception {
.addAllIgnoredFiles(new ArrayList<String>())
.addAllIncludedFiles(new ArrayList<String>())
.setFilter("filter-1274492040")
.setServiceAccount("serviceAccount1079137720")
.build();
mockCloudBuild.addResponse(expectedResponse);

@@ -758,7 +756,6 @@ public void updateBuildTriggerTest() throws Exception {
.addAllIgnoredFiles(new ArrayList<String>())
.addAllIncludedFiles(new ArrayList<String>())
.setFilter("filter-1274492040")
.setServiceAccount("serviceAccount1079137720")
.build();
mockCloudBuild.addResponse(expectedResponse);

@@ -47,7 +47,6 @@ private BuildTrigger() {
ignoredFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY;
includedFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY;
filter_ = "";
serviceAccount_ = "";
}

@java.lang.Override
@@ -265,13 +264,6 @@ private BuildTrigger(
webhookConfig_ = subBuilder.buildPartial();
}

break;
}
case 266:
{
java.lang.String s = input.readStringRequireUtf8();

serviceAccount_ = s;
break;
}
case 274:
@@ -1432,63 +1424,6 @@ public com.google.protobuf.ByteString getFilterBytes() {
}
}

public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 33;
private volatile java.lang.Object serviceAccount_;
/**
*
*
* <pre>
* The service account used for all user-controlled operations including
* UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
* If no service account is set, then the standard Cloud Build service account
* ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
* Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
* </pre>
*
* <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
*
* @return The serviceAccount.
*/
@java.lang.Override
public java.lang.String getServiceAccount() {
java.lang.Object ref = serviceAccount_;
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();
serviceAccount_ = s;
return s;
}
}
/**
*
*
* <pre>
* The service account used for all user-controlled operations including
* UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
* If no service account is set, then the standard Cloud Build service account
* ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
* Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
* </pre>
*
* <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
*
* @return The bytes for serviceAccount.
*/
@java.lang.Override
public com.google.protobuf.ByteString getServiceAccountBytes() {
java.lang.Object ref = serviceAccount_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
serviceAccount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
@@ -1553,9 +1488,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (webhookConfig_ != null) {
output.writeMessage(31, getWebhookConfig());
}
if (!getServiceAccountBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 33, serviceAccount_);
}
if (!getResourceNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 34, resourceName_);
}
@@ -1645,9 +1577,6 @@ public int getSerializedSize() {
if (webhookConfig_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, getWebhookConfig());
}
if (!getServiceAccountBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(33, serviceAccount_);
}
if (!getResourceNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(34, resourceName_);
}
@@ -1696,7 +1625,6 @@ 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 (!getServiceAccount().equals(other.getServiceAccount())) return false;
if (!getBuildTemplateCase().equals(other.getBuildTemplateCase())) return false;
switch (buildTemplateCase_) {
case 18:
@@ -1770,8 +1698,6 @@ public int hashCode() {
}
hash = (37 * hash) + FILTER_FIELD_NUMBER;
hash = (53 * hash) + getFilter().hashCode();
hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER;
hash = (53 * hash) + getServiceAccount().hashCode();
switch (buildTemplateCase_) {
case 18:
hash = (37 * hash) + AUTODETECT_FIELD_NUMBER;
@@ -2002,8 +1928,6 @@ public Builder clear() {
bitField0_ = (bitField0_ & ~0x00000008);
filter_ = "";

serviceAccount_ = "";

buildTemplateCase_ = 0;
buildTemplate_ = null;
return this;
@@ -2095,7 +2019,6 @@ public com.google.cloudbuild.v1.BuildTrigger buildPartial() {
}
result.includedFiles_ = includedFiles_;
result.filter_ = filter_;
result.serviceAccount_ = serviceAccount_;
result.buildTemplateCase_ = buildTemplateCase_;
onBuilt();
return result;
@@ -2215,10 +2138,6 @@ public Builder mergeFrom(com.google.cloudbuild.v1.BuildTrigger other) {
filter_ = other.filter_;
onChanged();
}
if (!other.getServiceAccount().isEmpty()) {
serviceAccount_ = other.serviceAccount_;
onChanged();
}
switch (other.getBuildTemplateCase()) {
case AUTODETECT:
{
@@ -5131,132 +5050,6 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
return this;
}

private java.lang.Object serviceAccount_ = "";
/**
*
*
* <pre>
* The service account used for all user-controlled operations including
* UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
* If no service account is set, then the standard Cloud Build service account
* ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
* Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
* </pre>
*
* <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
*
* @return The serviceAccount.
*/
public java.lang.String getServiceAccount() {
java.lang.Object ref = serviceAccount_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
serviceAccount_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
* <pre>
* The service account used for all user-controlled operations including
* UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
* If no service account is set, then the standard Cloud Build service account
* ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
* Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
* </pre>
*
* <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
*
* @return The bytes for serviceAccount.
*/
public com.google.protobuf.ByteString getServiceAccountBytes() {
java.lang.Object ref = serviceAccount_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
serviceAccount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
* <pre>
* The service account used for all user-controlled operations including
* UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
* If no service account is set, then the standard Cloud Build service account
* ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
* Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
* </pre>
*
* <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
*
* @param value The serviceAccount to set.
* @return This builder for chaining.
*/
public Builder setServiceAccount(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}

serviceAccount_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* The service account used for all user-controlled operations including
* UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
* If no service account is set, then the standard Cloud Build service account
* ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
* Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
* </pre>
*
* <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
*
* @return This builder for chaining.
*/
public Builder clearServiceAccount() {

serviceAccount_ = getDefaultInstance().getServiceAccount();
onChanged();
return this;
}
/**
*
*
* <pre>
* The service account used for all user-controlled operations including
* UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
* If no service account is set, then the standard Cloud Build service account
* ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
* Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
* </pre>
*
* <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
*
* @param value The bytes for serviceAccount to set.
* @return This builder for chaining.
*/
public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);

serviceAccount_ = value;
onChanged();
return this;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
@@ -747,38 +747,5 @@
*/
com.google.protobuf.ByteString getFilterBytes();

/**
*
*
* <pre>
* The service account used for all user-controlled operations including
* UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
* If no service account is set, then the standard Cloud Build service account
* ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
* Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
* </pre>
*
* <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
*
* @return The serviceAccount.
*/
java.lang.String getServiceAccount();
/**
*
*
* <pre>
* The service account used for all user-controlled operations including
* UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
* If no service account is set, then the standard Cloud Build service account
* ([PROJECT_NUM]&#64;system.gserviceaccount.com) will be used instead.
* Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
* </pre>
*
* <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
*
* @return The bytes for serviceAccount.
*/
com.google.protobuf.ByteString getServiceAccountBytes();

public com.google.cloudbuild.v1.BuildTrigger.BuildTemplateCase getBuildTemplateCase();
}

0 comments on commit 1d7ba55

Please sign in to comment.