Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 9, 2023. It is now read-only.

Commitcd12452

Browse files
feat: addservice_account toBatchPredictionJob in aiplatformv1beta1batch_prediction_job.proto (#831)
- [ ] Regenerate this pull request now.PiperOrigin-RevId: 434935416Source-Link:googleapis/googleapis@dfdd5eeSource-Link:https://github.com/googleapis/googleapis-gen/commit/2774684c3b8b22639909688d297d4fa591fde9ebCopy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjc3NDY4NGMzYjhiMjI2Mzk5MDk2ODhkMjk3ZDRmYTU5MWZkZTllYiJ9
1 parent139a839 commitcd12452

File tree

5 files changed

+316
-52
lines changed

5 files changed

+316
-52
lines changed

‎google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/JobServiceClientTest.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,7 @@ public void createBatchPredictionJobTest() throws Exception {
15301530
.setModelParameters(Value.newBuilder().build())
15311531
.setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build())
15321532
.setDedicatedResources(BatchDedicatedResources.newBuilder().build())
1533+
.setServiceAccount("serviceAccount1079137720")
15331534
.setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build())
15341535
.setGenerateExplanation(true)
15351536
.setExplanationSpec(ExplanationSpec.newBuilder().build())
@@ -1596,6 +1597,7 @@ public void createBatchPredictionJobTest2() throws Exception {
15961597
.setModelParameters(Value.newBuilder().build())
15971598
.setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build())
15981599
.setDedicatedResources(BatchDedicatedResources.newBuilder().build())
1600+
.setServiceAccount("serviceAccount1079137720")
15991601
.setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build())
16001602
.setGenerateExplanation(true)
16011603
.setExplanationSpec(ExplanationSpec.newBuilder().build())
@@ -1662,6 +1664,7 @@ public void getBatchPredictionJobTest() throws Exception {
16621664
.setModelParameters(Value.newBuilder().build())
16631665
.setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build())
16641666
.setDedicatedResources(BatchDedicatedResources.newBuilder().build())
1667+
.setServiceAccount("serviceAccount1079137720")
16651668
.setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build())
16661669
.setGenerateExplanation(true)
16671670
.setExplanationSpec(ExplanationSpec.newBuilder().build())
@@ -1727,6 +1730,7 @@ public void getBatchPredictionJobTest2() throws Exception {
17271730
.setModelParameters(Value.newBuilder().build())
17281731
.setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build())
17291732
.setDedicatedResources(BatchDedicatedResources.newBuilder().build())
1733+
.setServiceAccount("serviceAccount1079137720")
17301734
.setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build())
17311735
.setGenerateExplanation(true)
17321736
.setExplanationSpec(ExplanationSpec.newBuilder().build())

‎proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchPredictionJob.java‎

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ private BatchPredictionJob() {
4444
name_ ="";
4545
displayName_ ="";
4646
model_ ="";
47+
serviceAccount_ ="";
4748
state_ =0;
4849
partialFailures_ =java.util.Collections.emptyList();
4950
}
@@ -395,6 +396,13 @@ private BatchPredictionJob(
395396
unmanagedContainerModel_ =subBuilder.buildPartial();
396397
}
397398

399+
break;
400+
}
401+
case234:
402+
{
403+
java.lang.Strings =input.readStringRequireUtf8();
404+
405+
serviceAccount_ =s;
398406
break;
399407
}
400408
default:
@@ -5793,6 +5801,65 @@ public com.google.cloud.aiplatform.v1beta1.BatchDedicatedResources getDedicatedR
57935801
returngetDedicatedResources();
57945802
}
57955803

5804+
publicstaticfinalintSERVICE_ACCOUNT_FIELD_NUMBER =29;
5805+
privatevolatilejava.lang.ObjectserviceAccount_;
5806+
/**
5807+
*
5808+
*
5809+
* <pre>
5810+
* The service account that the DeployedModel's container runs as. If not
5811+
* specified, a system generated one will be used, which
5812+
* has minimal permissions and the custom container, if used, may not have
5813+
* enough permission to access other GCP resources.
5814+
* Users deploying the Model must have the `iam.serviceAccounts.actAs`
5815+
* permission on this service account.
5816+
* </pre>
5817+
*
5818+
* <code>string service_account = 29;</code>
5819+
*
5820+
* @return The serviceAccount.
5821+
*/
5822+
@java.lang.Override
5823+
publicjava.lang.StringgetServiceAccount() {
5824+
java.lang.Objectref =serviceAccount_;
5825+
if (refinstanceofjava.lang.String) {
5826+
return (java.lang.String)ref;
5827+
}else {
5828+
com.google.protobuf.ByteStringbs = (com.google.protobuf.ByteString)ref;
5829+
java.lang.Strings =bs.toStringUtf8();
5830+
serviceAccount_ =s;
5831+
returns;
5832+
}
5833+
}
5834+
/**
5835+
*
5836+
*
5837+
* <pre>
5838+
* The service account that the DeployedModel's container runs as. If not
5839+
* specified, a system generated one will be used, which
5840+
* has minimal permissions and the custom container, if used, may not have
5841+
* enough permission to access other GCP resources.
5842+
* Users deploying the Model must have the `iam.serviceAccounts.actAs`
5843+
* permission on this service account.
5844+
* </pre>
5845+
*
5846+
* <code>string service_account = 29;</code>
5847+
*
5848+
* @return The bytes for serviceAccount.
5849+
*/
5850+
@java.lang.Override
5851+
publiccom.google.protobuf.ByteStringgetServiceAccountBytes() {
5852+
java.lang.Objectref =serviceAccount_;
5853+
if (refinstanceofjava.lang.String) {
5854+
com.google.protobuf.ByteStringb =
5855+
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String)ref);
5856+
serviceAccount_ =b;
5857+
returnb;
5858+
}else {
5859+
return (com.google.protobuf.ByteString)ref;
5860+
}
5861+
}
5862+
57965863
publicstaticfinalintMANUAL_BATCH_TUNING_PARAMETERS_FIELD_NUMBER =8;
57975864
privatecom.google.cloud.aiplatform.v1beta1.ManualBatchTuningParameters
57985865
manualBatchTuningParameters_;
@@ -6761,6 +6828,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
67616828
if (unmanagedContainerModel_ !=null) {
67626829
output.writeMessage(28,getUnmanagedContainerModel());
67636830
}
6831+
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
6832+
com.google.protobuf.GeneratedMessageV3.writeString(output,29,serviceAccount_);
6833+
}
67646834
unknownFields.writeTo(output);
67656835
}
67666836

@@ -6850,6 +6920,9 @@ public int getSerializedSize() {
68506920
com.google.protobuf.CodedOutputStream.computeMessageSize(
68516921
28,getUnmanagedContainerModel());
68526922
}
6923+
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
6924+
size +=com.google.protobuf.GeneratedMessageV3.computeStringSize(29,serviceAccount_);
6925+
}
68536926
size +=unknownFields.getSerializedSize();
68546927
memoizedSize =size;
68556928
returnsize;
@@ -6889,6 +6962,7 @@ public boolean equals(final java.lang.Object obj) {
68896962
if (hasDedicatedResources()) {
68906963
if (!getDedicatedResources().equals(other.getDedicatedResources()))returnfalse;
68916964
}
6965+
if (!getServiceAccount().equals(other.getServiceAccount()))returnfalse;
68926966
if (hasManualBatchTuningParameters() !=other.hasManualBatchTuningParameters())returnfalse;
68936967
if (hasManualBatchTuningParameters()) {
68946968
if (!getManualBatchTuningParameters().equals(other.getManualBatchTuningParameters()))
@@ -6975,6 +7049,8 @@ public int hashCode() {
69757049
hash = (37 *hash) +DEDICATED_RESOURCES_FIELD_NUMBER;
69767050
hash = (53 *hash) +getDedicatedResources().hashCode();
69777051
}
7052+
hash = (37 *hash) +SERVICE_ACCOUNT_FIELD_NUMBER;
7053+
hash = (53 *hash) +getServiceAccount().hashCode();
69787054
if (hasManualBatchTuningParameters()) {
69797055
hash = (37 *hash) +MANUAL_BATCH_TUNING_PARAMETERS_FIELD_NUMBER;
69807056
hash = (53 *hash) +getManualBatchTuningParameters().hashCode();
@@ -7238,6 +7314,8 @@ public Builder clear() {
72387314
dedicatedResources_ =null;
72397315
dedicatedResourcesBuilder_ =null;
72407316
}
7317+
serviceAccount_ ="";
7318+
72417319
if (manualBatchTuningParametersBuilder_ ==null) {
72427320
manualBatchTuningParameters_ =null;
72437321
}else {
@@ -7371,6 +7449,7 @@ public com.google.cloud.aiplatform.v1beta1.BatchPredictionJob buildPartial() {
73717449
}else {
73727450
result.dedicatedResources_ =dedicatedResourcesBuilder_.build();
73737451
}
7452+
result.serviceAccount_ =serviceAccount_;
73747453
if (manualBatchTuningParametersBuilder_ ==null) {
73757454
result.manualBatchTuningParameters_ =manualBatchTuningParameters_;
73767455
}else {
@@ -7516,6 +7595,10 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.BatchPredictionJob
75167595
if (other.hasDedicatedResources()) {
75177596
mergeDedicatedResources(other.getDedicatedResources());
75187597
}
7598+
if (!other.getServiceAccount().isEmpty()) {
7599+
serviceAccount_ =other.serviceAccount_;
7600+
onChanged();
7601+
}
75197602
if (other.hasManualBatchTuningParameters()) {
75207603
mergeManualBatchTuningParameters(other.getManualBatchTuningParameters());
75217604
}
@@ -9152,6 +9235,137 @@ public Builder clearDedicatedResources() {
91529235
returndedicatedResourcesBuilder_;
91539236
}
91549237

9238+
privatejava.lang.ObjectserviceAccount_ ="";
9239+
/**
9240+
*
9241+
*
9242+
* <pre>
9243+
* The service account that the DeployedModel's container runs as. If not
9244+
* specified, a system generated one will be used, which
9245+
* has minimal permissions and the custom container, if used, may not have
9246+
* enough permission to access other GCP resources.
9247+
* Users deploying the Model must have the `iam.serviceAccounts.actAs`
9248+
* permission on this service account.
9249+
* </pre>
9250+
*
9251+
* <code>string service_account = 29;</code>
9252+
*
9253+
* @return The serviceAccount.
9254+
*/
9255+
publicjava.lang.StringgetServiceAccount() {
9256+
java.lang.Objectref =serviceAccount_;
9257+
if (!(refinstanceofjava.lang.String)) {
9258+
com.google.protobuf.ByteStringbs = (com.google.protobuf.ByteString)ref;
9259+
java.lang.Strings =bs.toStringUtf8();
9260+
serviceAccount_ =s;
9261+
returns;
9262+
}else {
9263+
return (java.lang.String)ref;
9264+
}
9265+
}
9266+
/**
9267+
*
9268+
*
9269+
* <pre>
9270+
* The service account that the DeployedModel's container runs as. If not
9271+
* specified, a system generated one will be used, which
9272+
* has minimal permissions and the custom container, if used, may not have
9273+
* enough permission to access other GCP resources.
9274+
* Users deploying the Model must have the `iam.serviceAccounts.actAs`
9275+
* permission on this service account.
9276+
* </pre>
9277+
*
9278+
* <code>string service_account = 29;</code>
9279+
*
9280+
* @return The bytes for serviceAccount.
9281+
*/
9282+
publiccom.google.protobuf.ByteStringgetServiceAccountBytes() {
9283+
java.lang.Objectref =serviceAccount_;
9284+
if (refinstanceofString) {
9285+
com.google.protobuf.ByteStringb =
9286+
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String)ref);
9287+
serviceAccount_ =b;
9288+
returnb;
9289+
}else {
9290+
return (com.google.protobuf.ByteString)ref;
9291+
}
9292+
}
9293+
/**
9294+
*
9295+
*
9296+
* <pre>
9297+
* The service account that the DeployedModel's container runs as. If not
9298+
* specified, a system generated one will be used, which
9299+
* has minimal permissions and the custom container, if used, may not have
9300+
* enough permission to access other GCP resources.
9301+
* Users deploying the Model must have the `iam.serviceAccounts.actAs`
9302+
* permission on this service account.
9303+
* </pre>
9304+
*
9305+
* <code>string service_account = 29;</code>
9306+
*
9307+
* @param value The serviceAccount to set.
9308+
* @return This builder for chaining.
9309+
*/
9310+
publicBuildersetServiceAccount(java.lang.Stringvalue) {
9311+
if (value ==null) {
9312+
thrownewNullPointerException();
9313+
}
9314+
9315+
serviceAccount_ =value;
9316+
onChanged();
9317+
returnthis;
9318+
}
9319+
/**
9320+
*
9321+
*
9322+
* <pre>
9323+
* The service account that the DeployedModel's container runs as. If not
9324+
* specified, a system generated one will be used, which
9325+
* has minimal permissions and the custom container, if used, may not have
9326+
* enough permission to access other GCP resources.
9327+
* Users deploying the Model must have the `iam.serviceAccounts.actAs`
9328+
* permission on this service account.
9329+
* </pre>
9330+
*
9331+
* <code>string service_account = 29;</code>
9332+
*
9333+
* @return This builder for chaining.
9334+
*/
9335+
publicBuilderclearServiceAccount() {
9336+
9337+
serviceAccount_ =getDefaultInstance().getServiceAccount();
9338+
onChanged();
9339+
returnthis;
9340+
}
9341+
/**
9342+
*
9343+
*
9344+
* <pre>
9345+
* The service account that the DeployedModel's container runs as. If not
9346+
* specified, a system generated one will be used, which
9347+
* has minimal permissions and the custom container, if used, may not have
9348+
* enough permission to access other GCP resources.
9349+
* Users deploying the Model must have the `iam.serviceAccounts.actAs`
9350+
* permission on this service account.
9351+
* </pre>
9352+
*
9353+
* <code>string service_account = 29;</code>
9354+
*
9355+
* @param value The bytes for serviceAccount to set.
9356+
* @return This builder for chaining.
9357+
*/
9358+
publicBuildersetServiceAccountBytes(com.google.protobuf.ByteStringvalue) {
9359+
if (value ==null) {
9360+
thrownewNullPointerException();
9361+
}
9362+
checkByteStringIsUtf8(value);
9363+
9364+
serviceAccount_ =value;
9365+
onChanged();
9366+
returnthis;
9367+
}
9368+
91559369
privatecom.google.cloud.aiplatform.v1beta1.ManualBatchTuningParameters
91569370
manualBatchTuningParameters_;
91579371
privatecom.google.protobuf.SingleFieldBuilderV3<

‎proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchPredictionJobOrBuilder.java‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,41 @@ public interface BatchPredictionJobOrBuilder
360360
com.google.cloud.aiplatform.v1beta1.BatchDedicatedResourcesOrBuilder
361361
getDedicatedResourcesOrBuilder();
362362

363+
/**
364+
*
365+
*
366+
* <pre>
367+
* The service account that the DeployedModel's container runs as. If not
368+
* specified, a system generated one will be used, which
369+
* has minimal permissions and the custom container, if used, may not have
370+
* enough permission to access other GCP resources.
371+
* Users deploying the Model must have the `iam.serviceAccounts.actAs`
372+
* permission on this service account.
373+
* </pre>
374+
*
375+
* <code>string service_account = 29;</code>
376+
*
377+
* @return The serviceAccount.
378+
*/
379+
java.lang.StringgetServiceAccount();
380+
/**
381+
*
382+
*
383+
* <pre>
384+
* The service account that the DeployedModel's container runs as. If not
385+
* specified, a system generated one will be used, which
386+
* has minimal permissions and the custom container, if used, may not have
387+
* enough permission to access other GCP resources.
388+
* Users deploying the Model must have the `iam.serviceAccounts.actAs`
389+
* permission on this service account.
390+
* </pre>
391+
*
392+
* <code>string service_account = 29;</code>
393+
*
394+
* @return The bytes for serviceAccount.
395+
*/
396+
com.google.protobuf.ByteStringgetServiceAccountBytes();
397+
363398
/**
364399
*
365400
*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp