@@ -41,6 +41,7 @@ private UploadModelRequest() {
4141 parent_ = "" ;
4242 parentModel_ = "" ;
4343 modelId_ = "" ;
44+ serviceAccount_ = "" ;
4445 }
4546
4647 @ java .lang .Override
@@ -279,6 +280,67 @@ public com.google.cloud.aiplatform.v1.ModelOrBuilder getModelOrBuilder() {
279280 return getModel ();
280281 }
281282
283+ public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 6 ;
284+ private volatile java .lang .Object serviceAccount_ ;
285+ /**
286+ *
287+ *
288+ * <pre>
289+ * Optional. The user-provided custom service account to use to do the model
290+ * upload. If empty, [Vertex AI Service
291+ * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
292+ * will be used. Users uploading the Model must have the
293+ * `iam.serviceAccounts.actAs` permission on this service account. Also, this
294+ * account must belong to the project specified in the `parent` field and have
295+ * all necessary read permissions.
296+ * </pre>
297+ *
298+ * <code>string service_account = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
299+ *
300+ * @return The serviceAccount.
301+ */
302+ @ java .lang .Override
303+ public java .lang .String getServiceAccount () {
304+ java .lang .Object ref = serviceAccount_ ;
305+ if (ref instanceof java .lang .String ) {
306+ return (java .lang .String ) ref ;
307+ } else {
308+ com .google .protobuf .ByteString bs = (com .google .protobuf .ByteString ) ref ;
309+ java .lang .String s = bs .toStringUtf8 ();
310+ serviceAccount_ = s ;
311+ return s ;
312+ }
313+ }
314+ /**
315+ *
316+ *
317+ * <pre>
318+ * Optional. The user-provided custom service account to use to do the model
319+ * upload. If empty, [Vertex AI Service
320+ * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
321+ * will be used. Users uploading the Model must have the
322+ * `iam.serviceAccounts.actAs` permission on this service account. Also, this
323+ * account must belong to the project specified in the `parent` field and have
324+ * all necessary read permissions.
325+ * </pre>
326+ *
327+ * <code>string service_account = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
328+ *
329+ * @return The bytes for serviceAccount.
330+ */
331+ @ java .lang .Override
332+ public com .google .protobuf .ByteString getServiceAccountBytes () {
333+ java .lang .Object ref = serviceAccount_ ;
334+ if (ref instanceof java .lang .String ) {
335+ com .google .protobuf .ByteString b =
336+ com .google .protobuf .ByteString .copyFromUtf8 ((java .lang .String ) ref );
337+ serviceAccount_ = b ;
338+ return b ;
339+ } else {
340+ return (com .google .protobuf .ByteString ) ref ;
341+ }
342+ }
343+
282344 private byte memoizedIsInitialized = -1 ;
283345
284346 @ java .lang .Override
@@ -305,6 +367,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
305367 if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (modelId_ )) {
306368 com .google .protobuf .GeneratedMessageV3 .writeString (output , 5 , modelId_ );
307369 }
370+ if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (serviceAccount_ )) {
371+ com .google .protobuf .GeneratedMessageV3 .writeString (output , 6 , serviceAccount_ );
372+ }
308373 getUnknownFields ().writeTo (output );
309374 }
310375
@@ -326,6 +391,9 @@ public int getSerializedSize() {
326391 if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (modelId_ )) {
327392 size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (5 , modelId_ );
328393 }
394+ if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (serviceAccount_ )) {
395+ size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (6 , serviceAccount_ );
396+ }
329397 size += getUnknownFields ().getSerializedSize ();
330398 memoizedSize = size ;
331399 return size ;
@@ -349,6 +417,7 @@ public boolean equals(final java.lang.Object obj) {
349417 if (hasModel ()) {
350418 if (!getModel ().equals (other .getModel ())) return false ;
351419 }
420+ if (!getServiceAccount ().equals (other .getServiceAccount ())) return false ;
352421 if (!getUnknownFields ().equals (other .getUnknownFields ())) return false ;
353422 return true ;
354423 }
@@ -370,6 +439,8 @@ public int hashCode() {
370439 hash = (37 * hash ) + MODEL_FIELD_NUMBER ;
371440 hash = (53 * hash ) + getModel ().hashCode ();
372441 }
442+ hash = (37 * hash ) + SERVICE_ACCOUNT_FIELD_NUMBER ;
443+ hash = (53 * hash ) + getServiceAccount ().hashCode ();
373444 hash = (29 * hash ) + getUnknownFields ().hashCode ();
374445 memoizedHashCode = hash ;
375446 return hash ;
@@ -520,6 +591,8 @@ public Builder clear() {
520591 model_ = null ;
521592 modelBuilder_ = null ;
522593 }
594+ serviceAccount_ = "" ;
595+
523596 return this ;
524597 }
525598
@@ -555,6 +628,7 @@ public com.google.cloud.aiplatform.v1.UploadModelRequest buildPartial() {
555628 } else {
556629 result .model_ = modelBuilder_ .build ();
557630 }
631+ result .serviceAccount_ = serviceAccount_ ;
558632 onBuilt ();
559633 return result ;
560634 }
@@ -620,6 +694,10 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.UploadModelRequest other
620694 if (other .hasModel ()) {
621695 mergeModel (other .getModel ());
622696 }
697+ if (!other .getServiceAccount ().isEmpty ()) {
698+ serviceAccount_ = other .serviceAccount_ ;
699+ onChanged ();
700+ }
623701 this .mergeUnknownFields (other .getUnknownFields ());
624702 onChanged ();
625703 return this ;
@@ -670,6 +748,12 @@ public Builder mergeFrom(
670748
671749 break ;
672750 } // case 42
751+ case 50 :
752+ {
753+ serviceAccount_ = input .readStringRequireUtf8 ();
754+
755+ break ;
756+ } // case 50
673757 default :
674758 {
675759 if (!super .parseUnknownField (input , extensionRegistry , tag )) {
@@ -1230,6 +1314,142 @@ public com.google.cloud.aiplatform.v1.ModelOrBuilder getModelOrBuilder() {
12301314 return modelBuilder_ ;
12311315 }
12321316
1317+ private java .lang .Object serviceAccount_ = "" ;
1318+ /**
1319+ *
1320+ *
1321+ * <pre>
1322+ * Optional. The user-provided custom service account to use to do the model
1323+ * upload. If empty, [Vertex AI Service
1324+ * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
1325+ * will be used. Users uploading the Model must have the
1326+ * `iam.serviceAccounts.actAs` permission on this service account. Also, this
1327+ * account must belong to the project specified in the `parent` field and have
1328+ * all necessary read permissions.
1329+ * </pre>
1330+ *
1331+ * <code>string service_account = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
1332+ *
1333+ * @return The serviceAccount.
1334+ */
1335+ public java .lang .String getServiceAccount () {
1336+ java .lang .Object ref = serviceAccount_ ;
1337+ if (!(ref instanceof java .lang .String )) {
1338+ com .google .protobuf .ByteString bs = (com .google .protobuf .ByteString ) ref ;
1339+ java .lang .String s = bs .toStringUtf8 ();
1340+ serviceAccount_ = s ;
1341+ return s ;
1342+ } else {
1343+ return (java .lang .String ) ref ;
1344+ }
1345+ }
1346+ /**
1347+ *
1348+ *
1349+ * <pre>
1350+ * Optional. The user-provided custom service account to use to do the model
1351+ * upload. If empty, [Vertex AI Service
1352+ * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
1353+ * will be used. Users uploading the Model must have the
1354+ * `iam.serviceAccounts.actAs` permission on this service account. Also, this
1355+ * account must belong to the project specified in the `parent` field and have
1356+ * all necessary read permissions.
1357+ * </pre>
1358+ *
1359+ * <code>string service_account = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
1360+ *
1361+ * @return The bytes for serviceAccount.
1362+ */
1363+ public com .google .protobuf .ByteString getServiceAccountBytes () {
1364+ java .lang .Object ref = serviceAccount_ ;
1365+ if (ref instanceof String ) {
1366+ com .google .protobuf .ByteString b =
1367+ com .google .protobuf .ByteString .copyFromUtf8 ((java .lang .String ) ref );
1368+ serviceAccount_ = b ;
1369+ return b ;
1370+ } else {
1371+ return (com .google .protobuf .ByteString ) ref ;
1372+ }
1373+ }
1374+ /**
1375+ *
1376+ *
1377+ * <pre>
1378+ * Optional. The user-provided custom service account to use to do the model
1379+ * upload. If empty, [Vertex AI Service
1380+ * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
1381+ * will be used. Users uploading the Model must have the
1382+ * `iam.serviceAccounts.actAs` permission on this service account. Also, this
1383+ * account must belong to the project specified in the `parent` field and have
1384+ * all necessary read permissions.
1385+ * </pre>
1386+ *
1387+ * <code>string service_account = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
1388+ *
1389+ * @param value The serviceAccount to set.
1390+ * @return This builder for chaining.
1391+ */
1392+ public Builder setServiceAccount (java .lang .String value ) {
1393+ if (value == null ) {
1394+ throw new NullPointerException ();
1395+ }
1396+
1397+ serviceAccount_ = value ;
1398+ onChanged ();
1399+ return this ;
1400+ }
1401+ /**
1402+ *
1403+ *
1404+ * <pre>
1405+ * Optional. The user-provided custom service account to use to do the model
1406+ * upload. If empty, [Vertex AI Service
1407+ * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
1408+ * will be used. Users uploading the Model must have the
1409+ * `iam.serviceAccounts.actAs` permission on this service account. Also, this
1410+ * account must belong to the project specified in the `parent` field and have
1411+ * all necessary read permissions.
1412+ * </pre>
1413+ *
1414+ * <code>string service_account = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
1415+ *
1416+ * @return This builder for chaining.
1417+ */
1418+ public Builder clearServiceAccount () {
1419+
1420+ serviceAccount_ = getDefaultInstance ().getServiceAccount ();
1421+ onChanged ();
1422+ return this ;
1423+ }
1424+ /**
1425+ *
1426+ *
1427+ * <pre>
1428+ * Optional. The user-provided custom service account to use to do the model
1429+ * upload. If empty, [Vertex AI Service
1430+ * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
1431+ * will be used. Users uploading the Model must have the
1432+ * `iam.serviceAccounts.actAs` permission on this service account. Also, this
1433+ * account must belong to the project specified in the `parent` field and have
1434+ * all necessary read permissions.
1435+ * </pre>
1436+ *
1437+ * <code>string service_account = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
1438+ *
1439+ * @param value The bytes for serviceAccount to set.
1440+ * @return This builder for chaining.
1441+ */
1442+ public Builder setServiceAccountBytes (com .google .protobuf .ByteString value ) {
1443+ if (value == null ) {
1444+ throw new NullPointerException ();
1445+ }
1446+ checkByteStringIsUtf8 (value );
1447+
1448+ serviceAccount_ = value ;
1449+ onChanged ();
1450+ return this ;
1451+ }
1452+
12331453 @ java .lang .Override
12341454 public final Builder setUnknownFields (final com .google .protobuf .UnknownFieldSet unknownFields ) {
12351455 return super .setUnknownFields (unknownFields );
0 commit comments