@@ -47,6 +47,7 @@ private BuildTrigger() {
4747 ignoredFiles_ = com .google .protobuf .LazyStringArrayList .EMPTY ;
4848 includedFiles_ = com .google .protobuf .LazyStringArrayList .EMPTY ;
4949 filter_ = "" ;
50+ serviceAccount_ = "" ;
5051 }
5152
5253 @ java .lang .Override
@@ -264,6 +265,13 @@ private BuildTrigger(
264265 webhookConfig_ = subBuilder .buildPartial ();
265266 }
266267
268+ break ;
269+ }
270+ case 266 :
271+ {
272+ java .lang .String s = input .readStringRequireUtf8 ();
273+
274+ serviceAccount_ = s ;
267275 break ;
268276 }
269277 case 274 :
@@ -1424,6 +1432,63 @@ public com.google.protobuf.ByteString getFilterBytes() {
14241432 }
14251433 }
14261434
1435+ public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 33 ;
1436+ private volatile java .lang .Object serviceAccount_ ;
1437+ /**
1438+ *
1439+ *
1440+ * <pre>
1441+ * The service account used for all user-controlled operations including
1442+ * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
1443+ * If no service account is set, then the standard Cloud Build service account
1444+ * ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
1445+ * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
1446+ * </pre>
1447+ *
1448+ * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
1449+ *
1450+ * @return The serviceAccount.
1451+ */
1452+ @ java .lang .Override
1453+ public java .lang .String getServiceAccount () {
1454+ java .lang .Object ref = serviceAccount_ ;
1455+ if (ref instanceof java .lang .String ) {
1456+ return (java .lang .String ) ref ;
1457+ } else {
1458+ com .google .protobuf .ByteString bs = (com .google .protobuf .ByteString ) ref ;
1459+ java .lang .String s = bs .toStringUtf8 ();
1460+ serviceAccount_ = s ;
1461+ return s ;
1462+ }
1463+ }
1464+ /**
1465+ *
1466+ *
1467+ * <pre>
1468+ * The service account used for all user-controlled operations including
1469+ * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
1470+ * If no service account is set, then the standard Cloud Build service account
1471+ * ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
1472+ * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
1473+ * </pre>
1474+ *
1475+ * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
1476+ *
1477+ * @return The bytes for serviceAccount.
1478+ */
1479+ @ java .lang .Override
1480+ public com .google .protobuf .ByteString getServiceAccountBytes () {
1481+ java .lang .Object ref = serviceAccount_ ;
1482+ if (ref instanceof java .lang .String ) {
1483+ com .google .protobuf .ByteString b =
1484+ com .google .protobuf .ByteString .copyFromUtf8 ((java .lang .String ) ref );
1485+ serviceAccount_ = b ;
1486+ return b ;
1487+ } else {
1488+ return (com .google .protobuf .ByteString ) ref ;
1489+ }
1490+ }
1491+
14271492 private byte memoizedIsInitialized = -1 ;
14281493
14291494 @ java .lang .Override
@@ -1488,6 +1553,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
14881553 if (webhookConfig_ != null ) {
14891554 output .writeMessage (31 , getWebhookConfig ());
14901555 }
1556+ if (!getServiceAccountBytes ().isEmpty ()) {
1557+ com .google .protobuf .GeneratedMessageV3 .writeString (output , 33 , serviceAccount_ );
1558+ }
14911559 if (!getResourceNameBytes ().isEmpty ()) {
14921560 com .google .protobuf .GeneratedMessageV3 .writeString (output , 34 , resourceName_ );
14931561 }
@@ -1577,6 +1645,9 @@ public int getSerializedSize() {
15771645 if (webhookConfig_ != null ) {
15781646 size += com .google .protobuf .CodedOutputStream .computeMessageSize (31 , getWebhookConfig ());
15791647 }
1648+ if (!getServiceAccountBytes ().isEmpty ()) {
1649+ size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (33 , serviceAccount_ );
1650+ }
15801651 if (!getResourceNameBytes ().isEmpty ()) {
15811652 size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (34 , resourceName_ );
15821653 }
@@ -1625,6 +1696,7 @@ public boolean equals(final java.lang.Object obj) {
16251696 if (!getIgnoredFilesList ().equals (other .getIgnoredFilesList ())) return false ;
16261697 if (!getIncludedFilesList ().equals (other .getIncludedFilesList ())) return false ;
16271698 if (!getFilter ().equals (other .getFilter ())) return false ;
1699+ if (!getServiceAccount ().equals (other .getServiceAccount ())) return false ;
16281700 if (!getBuildTemplateCase ().equals (other .getBuildTemplateCase ())) return false ;
16291701 switch (buildTemplateCase_ ) {
16301702 case 18 :
@@ -1698,6 +1770,8 @@ public int hashCode() {
16981770 }
16991771 hash = (37 * hash ) + FILTER_FIELD_NUMBER ;
17001772 hash = (53 * hash ) + getFilter ().hashCode ();
1773+ hash = (37 * hash ) + SERVICE_ACCOUNT_FIELD_NUMBER ;
1774+ hash = (53 * hash ) + getServiceAccount ().hashCode ();
17011775 switch (buildTemplateCase_ ) {
17021776 case 18 :
17031777 hash = (37 * hash ) + AUTODETECT_FIELD_NUMBER ;
@@ -1928,6 +2002,8 @@ public Builder clear() {
19282002 bitField0_ = (bitField0_ & ~0x00000008 );
19292003 filter_ = "" ;
19302004
2005+ serviceAccount_ = "" ;
2006+
19312007 buildTemplateCase_ = 0 ;
19322008 buildTemplate_ = null ;
19332009 return this ;
@@ -2019,6 +2095,7 @@ public com.google.cloudbuild.v1.BuildTrigger buildPartial() {
20192095 }
20202096 result .includedFiles_ = includedFiles_ ;
20212097 result .filter_ = filter_ ;
2098+ result .serviceAccount_ = serviceAccount_ ;
20222099 result .buildTemplateCase_ = buildTemplateCase_ ;
20232100 onBuilt ();
20242101 return result ;
@@ -2138,6 +2215,10 @@ public Builder mergeFrom(com.google.cloudbuild.v1.BuildTrigger other) {
21382215 filter_ = other .filter_ ;
21392216 onChanged ();
21402217 }
2218+ if (!other .getServiceAccount ().isEmpty ()) {
2219+ serviceAccount_ = other .serviceAccount_ ;
2220+ onChanged ();
2221+ }
21412222 switch (other .getBuildTemplateCase ()) {
21422223 case AUTODETECT :
21432224 {
@@ -5050,6 +5131,132 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
50505131 return this ;
50515132 }
50525133
5134+ private java .lang .Object serviceAccount_ = "" ;
5135+ /**
5136+ *
5137+ *
5138+ * <pre>
5139+ * The service account used for all user-controlled operations including
5140+ * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
5141+ * If no service account is set, then the standard Cloud Build service account
5142+ * ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
5143+ * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
5144+ * </pre>
5145+ *
5146+ * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
5147+ *
5148+ * @return The serviceAccount.
5149+ */
5150+ public java .lang .String getServiceAccount () {
5151+ java .lang .Object ref = serviceAccount_ ;
5152+ if (!(ref instanceof java .lang .String )) {
5153+ com .google .protobuf .ByteString bs = (com .google .protobuf .ByteString ) ref ;
5154+ java .lang .String s = bs .toStringUtf8 ();
5155+ serviceAccount_ = s ;
5156+ return s ;
5157+ } else {
5158+ return (java .lang .String ) ref ;
5159+ }
5160+ }
5161+ /**
5162+ *
5163+ *
5164+ * <pre>
5165+ * The service account used for all user-controlled operations including
5166+ * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
5167+ * If no service account is set, then the standard Cloud Build service account
5168+ * ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
5169+ * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
5170+ * </pre>
5171+ *
5172+ * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
5173+ *
5174+ * @return The bytes for serviceAccount.
5175+ */
5176+ public com .google .protobuf .ByteString getServiceAccountBytes () {
5177+ java .lang .Object ref = serviceAccount_ ;
5178+ if (ref instanceof String ) {
5179+ com .google .protobuf .ByteString b =
5180+ com .google .protobuf .ByteString .copyFromUtf8 ((java .lang .String ) ref );
5181+ serviceAccount_ = b ;
5182+ return b ;
5183+ } else {
5184+ return (com .google .protobuf .ByteString ) ref ;
5185+ }
5186+ }
5187+ /**
5188+ *
5189+ *
5190+ * <pre>
5191+ * The service account used for all user-controlled operations including
5192+ * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
5193+ * If no service account is set, then the standard Cloud Build service account
5194+ * ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
5195+ * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
5196+ * </pre>
5197+ *
5198+ * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
5199+ *
5200+ * @param value The serviceAccount to set.
5201+ * @return This builder for chaining.
5202+ */
5203+ public Builder setServiceAccount (java .lang .String value ) {
5204+ if (value == null ) {
5205+ throw new NullPointerException ();
5206+ }
5207+
5208+ serviceAccount_ = value ;
5209+ onChanged ();
5210+ return this ;
5211+ }
5212+ /**
5213+ *
5214+ *
5215+ * <pre>
5216+ * The service account used for all user-controlled operations including
5217+ * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
5218+ * If no service account is set, then the standard Cloud Build service account
5219+ * ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
5220+ * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
5221+ * </pre>
5222+ *
5223+ * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
5224+ *
5225+ * @return This builder for chaining.
5226+ */
5227+ public Builder clearServiceAccount () {
5228+
5229+ serviceAccount_ = getDefaultInstance ().getServiceAccount ();
5230+ onChanged ();
5231+ return this ;
5232+ }
5233+ /**
5234+ *
5235+ *
5236+ * <pre>
5237+ * The service account used for all user-controlled operations including
5238+ * UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
5239+ * If no service account is set, then the standard Cloud Build service account
5240+ * ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
5241+ * Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
5242+ * </pre>
5243+ *
5244+ * <code>string service_account = 33 [(.google.api.resource_reference) = { ... }</code>
5245+ *
5246+ * @param value The bytes for serviceAccount to set.
5247+ * @return This builder for chaining.
5248+ */
5249+ public Builder setServiceAccountBytes (com .google .protobuf .ByteString value ) {
5250+ if (value == null ) {
5251+ throw new NullPointerException ();
5252+ }
5253+ checkByteStringIsUtf8 (value );
5254+
5255+ serviceAccount_ = value ;
5256+ onChanged ();
5257+ return this ;
5258+ }
5259+
50535260 @ java .lang .Override
50545261 public final Builder setUnknownFields (final com .google .protobuf .UnknownFieldSet unknownFields ) {
50555262 return super .setUnknownFields (unknownFields );
0 commit comments