• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/aiplatform/v1/prediction_service.proto
18 
19 package com.google.cloud.aiplatform.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Request message for
26  * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
27  * </pre>
28  *
29  * Protobuf type {@code google.cloud.aiplatform.v1.PredictRequest}
30  */
31 public final class PredictRequest extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PredictRequest)
34     PredictRequestOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use PredictRequest.newBuilder() to construct.
PredictRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private PredictRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
PredictRequest()41   private PredictRequest() {
42     endpoint_ = "";
43     instances_ = java.util.Collections.emptyList();
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new PredictRequest();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.cloud.aiplatform.v1.PredictionServiceProto
59         .internal_static_google_cloud_aiplatform_v1_PredictRequest_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.cloud.aiplatform.v1.PredictionServiceProto
66         .internal_static_google_cloud_aiplatform_v1_PredictRequest_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.cloud.aiplatform.v1.PredictRequest.class,
69             com.google.cloud.aiplatform.v1.PredictRequest.Builder.class);
70   }
71 
72   public static final int ENDPOINT_FIELD_NUMBER = 1;
73 
74   @SuppressWarnings("serial")
75   private volatile java.lang.Object endpoint_ = "";
76   /**
77    *
78    *
79    * <pre>
80    * Required. The name of the Endpoint requested to serve the prediction.
81    * Format:
82    * `projects/{project}/locations/{location}/endpoints/{endpoint}`
83    * </pre>
84    *
85    * <code>
86    * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
87    * </code>
88    *
89    * @return The endpoint.
90    */
91   @java.lang.Override
getEndpoint()92   public java.lang.String getEndpoint() {
93     java.lang.Object ref = endpoint_;
94     if (ref instanceof java.lang.String) {
95       return (java.lang.String) ref;
96     } else {
97       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
98       java.lang.String s = bs.toStringUtf8();
99       endpoint_ = s;
100       return s;
101     }
102   }
103   /**
104    *
105    *
106    * <pre>
107    * Required. The name of the Endpoint requested to serve the prediction.
108    * Format:
109    * `projects/{project}/locations/{location}/endpoints/{endpoint}`
110    * </pre>
111    *
112    * <code>
113    * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
114    * </code>
115    *
116    * @return The bytes for endpoint.
117    */
118   @java.lang.Override
getEndpointBytes()119   public com.google.protobuf.ByteString getEndpointBytes() {
120     java.lang.Object ref = endpoint_;
121     if (ref instanceof java.lang.String) {
122       com.google.protobuf.ByteString b =
123           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
124       endpoint_ = b;
125       return b;
126     } else {
127       return (com.google.protobuf.ByteString) ref;
128     }
129   }
130 
131   public static final int INSTANCES_FIELD_NUMBER = 2;
132 
133   @SuppressWarnings("serial")
134   private java.util.List<com.google.protobuf.Value> instances_;
135   /**
136    *
137    *
138    * <pre>
139    * Required. The instances that are the input to the prediction call.
140    * A DeployedModel may have an upper limit on the number of instances it
141    * supports per request, and when it is exceeded the prediction call errors
142    * in case of AutoML Models, or, in case of customer created Models, the
143    * behaviour is as documented by that Model.
144    * The schema of any single instance may be specified via Endpoint's
145    * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
146    * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
147    * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
148    * </pre>
149    *
150    * <code>repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
151    * </code>
152    */
153   @java.lang.Override
getInstancesList()154   public java.util.List<com.google.protobuf.Value> getInstancesList() {
155     return instances_;
156   }
157   /**
158    *
159    *
160    * <pre>
161    * Required. The instances that are the input to the prediction call.
162    * A DeployedModel may have an upper limit on the number of instances it
163    * supports per request, and when it is exceeded the prediction call errors
164    * in case of AutoML Models, or, in case of customer created Models, the
165    * behaviour is as documented by that Model.
166    * The schema of any single instance may be specified via Endpoint's
167    * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
168    * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
169    * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
170    * </pre>
171    *
172    * <code>repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
173    * </code>
174    */
175   @java.lang.Override
getInstancesOrBuilderList()176   public java.util.List<? extends com.google.protobuf.ValueOrBuilder> getInstancesOrBuilderList() {
177     return instances_;
178   }
179   /**
180    *
181    *
182    * <pre>
183    * Required. The instances that are the input to the prediction call.
184    * A DeployedModel may have an upper limit on the number of instances it
185    * supports per request, and when it is exceeded the prediction call errors
186    * in case of AutoML Models, or, in case of customer created Models, the
187    * behaviour is as documented by that Model.
188    * The schema of any single instance may be specified via Endpoint's
189    * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
190    * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
191    * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
192    * </pre>
193    *
194    * <code>repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
195    * </code>
196    */
197   @java.lang.Override
getInstancesCount()198   public int getInstancesCount() {
199     return instances_.size();
200   }
201   /**
202    *
203    *
204    * <pre>
205    * Required. The instances that are the input to the prediction call.
206    * A DeployedModel may have an upper limit on the number of instances it
207    * supports per request, and when it is exceeded the prediction call errors
208    * in case of AutoML Models, or, in case of customer created Models, the
209    * behaviour is as documented by that Model.
210    * The schema of any single instance may be specified via Endpoint's
211    * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
212    * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
213    * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
214    * </pre>
215    *
216    * <code>repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
217    * </code>
218    */
219   @java.lang.Override
getInstances(int index)220   public com.google.protobuf.Value getInstances(int index) {
221     return instances_.get(index);
222   }
223   /**
224    *
225    *
226    * <pre>
227    * Required. The instances that are the input to the prediction call.
228    * A DeployedModel may have an upper limit on the number of instances it
229    * supports per request, and when it is exceeded the prediction call errors
230    * in case of AutoML Models, or, in case of customer created Models, the
231    * behaviour is as documented by that Model.
232    * The schema of any single instance may be specified via Endpoint's
233    * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
234    * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
235    * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
236    * </pre>
237    *
238    * <code>repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
239    * </code>
240    */
241   @java.lang.Override
getInstancesOrBuilder(int index)242   public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) {
243     return instances_.get(index);
244   }
245 
246   public static final int PARAMETERS_FIELD_NUMBER = 3;
247   private com.google.protobuf.Value parameters_;
248   /**
249    *
250    *
251    * <pre>
252    * The parameters that govern the prediction. The schema of the parameters may
253    * be specified via Endpoint's DeployedModels' [Model's
254    * ][google.cloud.aiplatform.v1.DeployedModel.model]
255    * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
256    * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
257    * </pre>
258    *
259    * <code>.google.protobuf.Value parameters = 3;</code>
260    *
261    * @return Whether the parameters field is set.
262    */
263   @java.lang.Override
hasParameters()264   public boolean hasParameters() {
265     return parameters_ != null;
266   }
267   /**
268    *
269    *
270    * <pre>
271    * The parameters that govern the prediction. The schema of the parameters may
272    * be specified via Endpoint's DeployedModels' [Model's
273    * ][google.cloud.aiplatform.v1.DeployedModel.model]
274    * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
275    * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
276    * </pre>
277    *
278    * <code>.google.protobuf.Value parameters = 3;</code>
279    *
280    * @return The parameters.
281    */
282   @java.lang.Override
getParameters()283   public com.google.protobuf.Value getParameters() {
284     return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_;
285   }
286   /**
287    *
288    *
289    * <pre>
290    * The parameters that govern the prediction. The schema of the parameters may
291    * be specified via Endpoint's DeployedModels' [Model's
292    * ][google.cloud.aiplatform.v1.DeployedModel.model]
293    * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
294    * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
295    * </pre>
296    *
297    * <code>.google.protobuf.Value parameters = 3;</code>
298    */
299   @java.lang.Override
getParametersOrBuilder()300   public com.google.protobuf.ValueOrBuilder getParametersOrBuilder() {
301     return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_;
302   }
303 
304   private byte memoizedIsInitialized = -1;
305 
306   @java.lang.Override
isInitialized()307   public final boolean isInitialized() {
308     byte isInitialized = memoizedIsInitialized;
309     if (isInitialized == 1) return true;
310     if (isInitialized == 0) return false;
311 
312     memoizedIsInitialized = 1;
313     return true;
314   }
315 
316   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)317   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
318     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) {
319       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_);
320     }
321     for (int i = 0; i < instances_.size(); i++) {
322       output.writeMessage(2, instances_.get(i));
323     }
324     if (parameters_ != null) {
325       output.writeMessage(3, getParameters());
326     }
327     getUnknownFields().writeTo(output);
328   }
329 
330   @java.lang.Override
getSerializedSize()331   public int getSerializedSize() {
332     int size = memoizedSize;
333     if (size != -1) return size;
334 
335     size = 0;
336     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) {
337       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_);
338     }
339     for (int i = 0; i < instances_.size(); i++) {
340       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, instances_.get(i));
341     }
342     if (parameters_ != null) {
343       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters());
344     }
345     size += getUnknownFields().getSerializedSize();
346     memoizedSize = size;
347     return size;
348   }
349 
350   @java.lang.Override
equals(final java.lang.Object obj)351   public boolean equals(final java.lang.Object obj) {
352     if (obj == this) {
353       return true;
354     }
355     if (!(obj instanceof com.google.cloud.aiplatform.v1.PredictRequest)) {
356       return super.equals(obj);
357     }
358     com.google.cloud.aiplatform.v1.PredictRequest other =
359         (com.google.cloud.aiplatform.v1.PredictRequest) obj;
360 
361     if (!getEndpoint().equals(other.getEndpoint())) return false;
362     if (!getInstancesList().equals(other.getInstancesList())) return false;
363     if (hasParameters() != other.hasParameters()) return false;
364     if (hasParameters()) {
365       if (!getParameters().equals(other.getParameters())) return false;
366     }
367     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
368     return true;
369   }
370 
371   @java.lang.Override
hashCode()372   public int hashCode() {
373     if (memoizedHashCode != 0) {
374       return memoizedHashCode;
375     }
376     int hash = 41;
377     hash = (19 * hash) + getDescriptor().hashCode();
378     hash = (37 * hash) + ENDPOINT_FIELD_NUMBER;
379     hash = (53 * hash) + getEndpoint().hashCode();
380     if (getInstancesCount() > 0) {
381       hash = (37 * hash) + INSTANCES_FIELD_NUMBER;
382       hash = (53 * hash) + getInstancesList().hashCode();
383     }
384     if (hasParameters()) {
385       hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
386       hash = (53 * hash) + getParameters().hashCode();
387     }
388     hash = (29 * hash) + getUnknownFields().hashCode();
389     memoizedHashCode = hash;
390     return hash;
391   }
392 
parseFrom(java.nio.ByteBuffer data)393   public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(java.nio.ByteBuffer data)
394       throws com.google.protobuf.InvalidProtocolBufferException {
395     return PARSER.parseFrom(data);
396   }
397 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)398   public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(
399       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
400       throws com.google.protobuf.InvalidProtocolBufferException {
401     return PARSER.parseFrom(data, extensionRegistry);
402   }
403 
parseFrom( com.google.protobuf.ByteString data)404   public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(
405       com.google.protobuf.ByteString data)
406       throws com.google.protobuf.InvalidProtocolBufferException {
407     return PARSER.parseFrom(data);
408   }
409 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)410   public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(
411       com.google.protobuf.ByteString data,
412       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
413       throws com.google.protobuf.InvalidProtocolBufferException {
414     return PARSER.parseFrom(data, extensionRegistry);
415   }
416 
parseFrom(byte[] data)417   public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(byte[] data)
418       throws com.google.protobuf.InvalidProtocolBufferException {
419     return PARSER.parseFrom(data);
420   }
421 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)422   public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(
423       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
424       throws com.google.protobuf.InvalidProtocolBufferException {
425     return PARSER.parseFrom(data, extensionRegistry);
426   }
427 
parseFrom(java.io.InputStream input)428   public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(java.io.InputStream input)
429       throws java.io.IOException {
430     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
431   }
432 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)433   public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(
434       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
435       throws java.io.IOException {
436     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
437         PARSER, input, extensionRegistry);
438   }
439 
parseDelimitedFrom( java.io.InputStream input)440   public static com.google.cloud.aiplatform.v1.PredictRequest parseDelimitedFrom(
441       java.io.InputStream input) throws java.io.IOException {
442     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
443   }
444 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)445   public static com.google.cloud.aiplatform.v1.PredictRequest parseDelimitedFrom(
446       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
447       throws java.io.IOException {
448     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
449         PARSER, input, extensionRegistry);
450   }
451 
parseFrom( com.google.protobuf.CodedInputStream input)452   public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(
453       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
454     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
455   }
456 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)457   public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(
458       com.google.protobuf.CodedInputStream input,
459       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
460       throws java.io.IOException {
461     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
462         PARSER, input, extensionRegistry);
463   }
464 
465   @java.lang.Override
newBuilderForType()466   public Builder newBuilderForType() {
467     return newBuilder();
468   }
469 
newBuilder()470   public static Builder newBuilder() {
471     return DEFAULT_INSTANCE.toBuilder();
472   }
473 
newBuilder(com.google.cloud.aiplatform.v1.PredictRequest prototype)474   public static Builder newBuilder(com.google.cloud.aiplatform.v1.PredictRequest prototype) {
475     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
476   }
477 
478   @java.lang.Override
toBuilder()479   public Builder toBuilder() {
480     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
481   }
482 
483   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)484   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
485     Builder builder = new Builder(parent);
486     return builder;
487   }
488   /**
489    *
490    *
491    * <pre>
492    * Request message for
493    * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
494    * </pre>
495    *
496    * Protobuf type {@code google.cloud.aiplatform.v1.PredictRequest}
497    */
498   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
499       implements
500       // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.PredictRequest)
501       com.google.cloud.aiplatform.v1.PredictRequestOrBuilder {
getDescriptor()502     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
503       return com.google.cloud.aiplatform.v1.PredictionServiceProto
504           .internal_static_google_cloud_aiplatform_v1_PredictRequest_descriptor;
505     }
506 
507     @java.lang.Override
508     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()509         internalGetFieldAccessorTable() {
510       return com.google.cloud.aiplatform.v1.PredictionServiceProto
511           .internal_static_google_cloud_aiplatform_v1_PredictRequest_fieldAccessorTable
512           .ensureFieldAccessorsInitialized(
513               com.google.cloud.aiplatform.v1.PredictRequest.class,
514               com.google.cloud.aiplatform.v1.PredictRequest.Builder.class);
515     }
516 
517     // Construct using com.google.cloud.aiplatform.v1.PredictRequest.newBuilder()
Builder()518     private Builder() {}
519 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)520     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
521       super(parent);
522     }
523 
524     @java.lang.Override
clear()525     public Builder clear() {
526       super.clear();
527       bitField0_ = 0;
528       endpoint_ = "";
529       if (instancesBuilder_ == null) {
530         instances_ = java.util.Collections.emptyList();
531       } else {
532         instances_ = null;
533         instancesBuilder_.clear();
534       }
535       bitField0_ = (bitField0_ & ~0x00000002);
536       parameters_ = null;
537       if (parametersBuilder_ != null) {
538         parametersBuilder_.dispose();
539         parametersBuilder_ = null;
540       }
541       return this;
542     }
543 
544     @java.lang.Override
getDescriptorForType()545     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
546       return com.google.cloud.aiplatform.v1.PredictionServiceProto
547           .internal_static_google_cloud_aiplatform_v1_PredictRequest_descriptor;
548     }
549 
550     @java.lang.Override
getDefaultInstanceForType()551     public com.google.cloud.aiplatform.v1.PredictRequest getDefaultInstanceForType() {
552       return com.google.cloud.aiplatform.v1.PredictRequest.getDefaultInstance();
553     }
554 
555     @java.lang.Override
build()556     public com.google.cloud.aiplatform.v1.PredictRequest build() {
557       com.google.cloud.aiplatform.v1.PredictRequest result = buildPartial();
558       if (!result.isInitialized()) {
559         throw newUninitializedMessageException(result);
560       }
561       return result;
562     }
563 
564     @java.lang.Override
buildPartial()565     public com.google.cloud.aiplatform.v1.PredictRequest buildPartial() {
566       com.google.cloud.aiplatform.v1.PredictRequest result =
567           new com.google.cloud.aiplatform.v1.PredictRequest(this);
568       buildPartialRepeatedFields(result);
569       if (bitField0_ != 0) {
570         buildPartial0(result);
571       }
572       onBuilt();
573       return result;
574     }
575 
buildPartialRepeatedFields(com.google.cloud.aiplatform.v1.PredictRequest result)576     private void buildPartialRepeatedFields(com.google.cloud.aiplatform.v1.PredictRequest result) {
577       if (instancesBuilder_ == null) {
578         if (((bitField0_ & 0x00000002) != 0)) {
579           instances_ = java.util.Collections.unmodifiableList(instances_);
580           bitField0_ = (bitField0_ & ~0x00000002);
581         }
582         result.instances_ = instances_;
583       } else {
584         result.instances_ = instancesBuilder_.build();
585       }
586     }
587 
buildPartial0(com.google.cloud.aiplatform.v1.PredictRequest result)588     private void buildPartial0(com.google.cloud.aiplatform.v1.PredictRequest result) {
589       int from_bitField0_ = bitField0_;
590       if (((from_bitField0_ & 0x00000001) != 0)) {
591         result.endpoint_ = endpoint_;
592       }
593       if (((from_bitField0_ & 0x00000004) != 0)) {
594         result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build();
595       }
596     }
597 
598     @java.lang.Override
clone()599     public Builder clone() {
600       return super.clone();
601     }
602 
603     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)604     public Builder setField(
605         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
606       return super.setField(field, value);
607     }
608 
609     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)610     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
611       return super.clearField(field);
612     }
613 
614     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)615     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
616       return super.clearOneof(oneof);
617     }
618 
619     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)620     public Builder setRepeatedField(
621         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
622       return super.setRepeatedField(field, index, value);
623     }
624 
625     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)626     public Builder addRepeatedField(
627         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
628       return super.addRepeatedField(field, value);
629     }
630 
631     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)632     public Builder mergeFrom(com.google.protobuf.Message other) {
633       if (other instanceof com.google.cloud.aiplatform.v1.PredictRequest) {
634         return mergeFrom((com.google.cloud.aiplatform.v1.PredictRequest) other);
635       } else {
636         super.mergeFrom(other);
637         return this;
638       }
639     }
640 
mergeFrom(com.google.cloud.aiplatform.v1.PredictRequest other)641     public Builder mergeFrom(com.google.cloud.aiplatform.v1.PredictRequest other) {
642       if (other == com.google.cloud.aiplatform.v1.PredictRequest.getDefaultInstance()) return this;
643       if (!other.getEndpoint().isEmpty()) {
644         endpoint_ = other.endpoint_;
645         bitField0_ |= 0x00000001;
646         onChanged();
647       }
648       if (instancesBuilder_ == null) {
649         if (!other.instances_.isEmpty()) {
650           if (instances_.isEmpty()) {
651             instances_ = other.instances_;
652             bitField0_ = (bitField0_ & ~0x00000002);
653           } else {
654             ensureInstancesIsMutable();
655             instances_.addAll(other.instances_);
656           }
657           onChanged();
658         }
659       } else {
660         if (!other.instances_.isEmpty()) {
661           if (instancesBuilder_.isEmpty()) {
662             instancesBuilder_.dispose();
663             instancesBuilder_ = null;
664             instances_ = other.instances_;
665             bitField0_ = (bitField0_ & ~0x00000002);
666             instancesBuilder_ =
667                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
668                     ? getInstancesFieldBuilder()
669                     : null;
670           } else {
671             instancesBuilder_.addAllMessages(other.instances_);
672           }
673         }
674       }
675       if (other.hasParameters()) {
676         mergeParameters(other.getParameters());
677       }
678       this.mergeUnknownFields(other.getUnknownFields());
679       onChanged();
680       return this;
681     }
682 
683     @java.lang.Override
isInitialized()684     public final boolean isInitialized() {
685       return true;
686     }
687 
688     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)689     public Builder mergeFrom(
690         com.google.protobuf.CodedInputStream input,
691         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
692         throws java.io.IOException {
693       if (extensionRegistry == null) {
694         throw new java.lang.NullPointerException();
695       }
696       try {
697         boolean done = false;
698         while (!done) {
699           int tag = input.readTag();
700           switch (tag) {
701             case 0:
702               done = true;
703               break;
704             case 10:
705               {
706                 endpoint_ = input.readStringRequireUtf8();
707                 bitField0_ |= 0x00000001;
708                 break;
709               } // case 10
710             case 18:
711               {
712                 com.google.protobuf.Value m =
713                     input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry);
714                 if (instancesBuilder_ == null) {
715                   ensureInstancesIsMutable();
716                   instances_.add(m);
717                 } else {
718                   instancesBuilder_.addMessage(m);
719                 }
720                 break;
721               } // case 18
722             case 26:
723               {
724                 input.readMessage(getParametersFieldBuilder().getBuilder(), extensionRegistry);
725                 bitField0_ |= 0x00000004;
726                 break;
727               } // case 26
728             default:
729               {
730                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
731                   done = true; // was an endgroup tag
732                 }
733                 break;
734               } // default:
735           } // switch (tag)
736         } // while (!done)
737       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
738         throw e.unwrapIOException();
739       } finally {
740         onChanged();
741       } // finally
742       return this;
743     }
744 
745     private int bitField0_;
746 
747     private java.lang.Object endpoint_ = "";
748     /**
749      *
750      *
751      * <pre>
752      * Required. The name of the Endpoint requested to serve the prediction.
753      * Format:
754      * `projects/{project}/locations/{location}/endpoints/{endpoint}`
755      * </pre>
756      *
757      * <code>
758      * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
759      * </code>
760      *
761      * @return The endpoint.
762      */
getEndpoint()763     public java.lang.String getEndpoint() {
764       java.lang.Object ref = endpoint_;
765       if (!(ref instanceof java.lang.String)) {
766         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
767         java.lang.String s = bs.toStringUtf8();
768         endpoint_ = s;
769         return s;
770       } else {
771         return (java.lang.String) ref;
772       }
773     }
774     /**
775      *
776      *
777      * <pre>
778      * Required. The name of the Endpoint requested to serve the prediction.
779      * Format:
780      * `projects/{project}/locations/{location}/endpoints/{endpoint}`
781      * </pre>
782      *
783      * <code>
784      * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
785      * </code>
786      *
787      * @return The bytes for endpoint.
788      */
getEndpointBytes()789     public com.google.protobuf.ByteString getEndpointBytes() {
790       java.lang.Object ref = endpoint_;
791       if (ref instanceof String) {
792         com.google.protobuf.ByteString b =
793             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
794         endpoint_ = b;
795         return b;
796       } else {
797         return (com.google.protobuf.ByteString) ref;
798       }
799     }
800     /**
801      *
802      *
803      * <pre>
804      * Required. The name of the Endpoint requested to serve the prediction.
805      * Format:
806      * `projects/{project}/locations/{location}/endpoints/{endpoint}`
807      * </pre>
808      *
809      * <code>
810      * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
811      * </code>
812      *
813      * @param value The endpoint to set.
814      * @return This builder for chaining.
815      */
setEndpoint(java.lang.String value)816     public Builder setEndpoint(java.lang.String value) {
817       if (value == null) {
818         throw new NullPointerException();
819       }
820       endpoint_ = value;
821       bitField0_ |= 0x00000001;
822       onChanged();
823       return this;
824     }
825     /**
826      *
827      *
828      * <pre>
829      * Required. The name of the Endpoint requested to serve the prediction.
830      * Format:
831      * `projects/{project}/locations/{location}/endpoints/{endpoint}`
832      * </pre>
833      *
834      * <code>
835      * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
836      * </code>
837      *
838      * @return This builder for chaining.
839      */
clearEndpoint()840     public Builder clearEndpoint() {
841       endpoint_ = getDefaultInstance().getEndpoint();
842       bitField0_ = (bitField0_ & ~0x00000001);
843       onChanged();
844       return this;
845     }
846     /**
847      *
848      *
849      * <pre>
850      * Required. The name of the Endpoint requested to serve the prediction.
851      * Format:
852      * `projects/{project}/locations/{location}/endpoints/{endpoint}`
853      * </pre>
854      *
855      * <code>
856      * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
857      * </code>
858      *
859      * @param value The bytes for endpoint to set.
860      * @return This builder for chaining.
861      */
setEndpointBytes(com.google.protobuf.ByteString value)862     public Builder setEndpointBytes(com.google.protobuf.ByteString value) {
863       if (value == null) {
864         throw new NullPointerException();
865       }
866       checkByteStringIsUtf8(value);
867       endpoint_ = value;
868       bitField0_ |= 0x00000001;
869       onChanged();
870       return this;
871     }
872 
873     private java.util.List<com.google.protobuf.Value> instances_ =
874         java.util.Collections.emptyList();
875 
ensureInstancesIsMutable()876     private void ensureInstancesIsMutable() {
877       if (!((bitField0_ & 0x00000002) != 0)) {
878         instances_ = new java.util.ArrayList<com.google.protobuf.Value>(instances_);
879         bitField0_ |= 0x00000002;
880       }
881     }
882 
883     private com.google.protobuf.RepeatedFieldBuilderV3<
884             com.google.protobuf.Value,
885             com.google.protobuf.Value.Builder,
886             com.google.protobuf.ValueOrBuilder>
887         instancesBuilder_;
888 
889     /**
890      *
891      *
892      * <pre>
893      * Required. The instances that are the input to the prediction call.
894      * A DeployedModel may have an upper limit on the number of instances it
895      * supports per request, and when it is exceeded the prediction call errors
896      * in case of AutoML Models, or, in case of customer created Models, the
897      * behaviour is as documented by that Model.
898      * The schema of any single instance may be specified via Endpoint's
899      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
900      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
901      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
902      * </pre>
903      *
904      * <code>
905      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
906      * </code>
907      */
getInstancesList()908     public java.util.List<com.google.protobuf.Value> getInstancesList() {
909       if (instancesBuilder_ == null) {
910         return java.util.Collections.unmodifiableList(instances_);
911       } else {
912         return instancesBuilder_.getMessageList();
913       }
914     }
915     /**
916      *
917      *
918      * <pre>
919      * Required. The instances that are the input to the prediction call.
920      * A DeployedModel may have an upper limit on the number of instances it
921      * supports per request, and when it is exceeded the prediction call errors
922      * in case of AutoML Models, or, in case of customer created Models, the
923      * behaviour is as documented by that Model.
924      * The schema of any single instance may be specified via Endpoint's
925      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
926      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
927      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
928      * </pre>
929      *
930      * <code>
931      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
932      * </code>
933      */
getInstancesCount()934     public int getInstancesCount() {
935       if (instancesBuilder_ == null) {
936         return instances_.size();
937       } else {
938         return instancesBuilder_.getCount();
939       }
940     }
941     /**
942      *
943      *
944      * <pre>
945      * Required. The instances that are the input to the prediction call.
946      * A DeployedModel may have an upper limit on the number of instances it
947      * supports per request, and when it is exceeded the prediction call errors
948      * in case of AutoML Models, or, in case of customer created Models, the
949      * behaviour is as documented by that Model.
950      * The schema of any single instance may be specified via Endpoint's
951      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
952      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
953      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
954      * </pre>
955      *
956      * <code>
957      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
958      * </code>
959      */
getInstances(int index)960     public com.google.protobuf.Value getInstances(int index) {
961       if (instancesBuilder_ == null) {
962         return instances_.get(index);
963       } else {
964         return instancesBuilder_.getMessage(index);
965       }
966     }
967     /**
968      *
969      *
970      * <pre>
971      * Required. The instances that are the input to the prediction call.
972      * A DeployedModel may have an upper limit on the number of instances it
973      * supports per request, and when it is exceeded the prediction call errors
974      * in case of AutoML Models, or, in case of customer created Models, the
975      * behaviour is as documented by that Model.
976      * The schema of any single instance may be specified via Endpoint's
977      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
978      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
979      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
980      * </pre>
981      *
982      * <code>
983      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
984      * </code>
985      */
setInstances(int index, com.google.protobuf.Value value)986     public Builder setInstances(int index, com.google.protobuf.Value value) {
987       if (instancesBuilder_ == null) {
988         if (value == null) {
989           throw new NullPointerException();
990         }
991         ensureInstancesIsMutable();
992         instances_.set(index, value);
993         onChanged();
994       } else {
995         instancesBuilder_.setMessage(index, value);
996       }
997       return this;
998     }
999     /**
1000      *
1001      *
1002      * <pre>
1003      * Required. The instances that are the input to the prediction call.
1004      * A DeployedModel may have an upper limit on the number of instances it
1005      * supports per request, and when it is exceeded the prediction call errors
1006      * in case of AutoML Models, or, in case of customer created Models, the
1007      * behaviour is as documented by that Model.
1008      * The schema of any single instance may be specified via Endpoint's
1009      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1010      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1011      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1012      * </pre>
1013      *
1014      * <code>
1015      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1016      * </code>
1017      */
setInstances(int index, com.google.protobuf.Value.Builder builderForValue)1018     public Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue) {
1019       if (instancesBuilder_ == null) {
1020         ensureInstancesIsMutable();
1021         instances_.set(index, builderForValue.build());
1022         onChanged();
1023       } else {
1024         instancesBuilder_.setMessage(index, builderForValue.build());
1025       }
1026       return this;
1027     }
1028     /**
1029      *
1030      *
1031      * <pre>
1032      * Required. The instances that are the input to the prediction call.
1033      * A DeployedModel may have an upper limit on the number of instances it
1034      * supports per request, and when it is exceeded the prediction call errors
1035      * in case of AutoML Models, or, in case of customer created Models, the
1036      * behaviour is as documented by that Model.
1037      * The schema of any single instance may be specified via Endpoint's
1038      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1039      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1040      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1041      * </pre>
1042      *
1043      * <code>
1044      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1045      * </code>
1046      */
addInstances(com.google.protobuf.Value value)1047     public Builder addInstances(com.google.protobuf.Value value) {
1048       if (instancesBuilder_ == null) {
1049         if (value == null) {
1050           throw new NullPointerException();
1051         }
1052         ensureInstancesIsMutable();
1053         instances_.add(value);
1054         onChanged();
1055       } else {
1056         instancesBuilder_.addMessage(value);
1057       }
1058       return this;
1059     }
1060     /**
1061      *
1062      *
1063      * <pre>
1064      * Required. The instances that are the input to the prediction call.
1065      * A DeployedModel may have an upper limit on the number of instances it
1066      * supports per request, and when it is exceeded the prediction call errors
1067      * in case of AutoML Models, or, in case of customer created Models, the
1068      * behaviour is as documented by that Model.
1069      * The schema of any single instance may be specified via Endpoint's
1070      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1071      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1072      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1073      * </pre>
1074      *
1075      * <code>
1076      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1077      * </code>
1078      */
addInstances(int index, com.google.protobuf.Value value)1079     public Builder addInstances(int index, com.google.protobuf.Value value) {
1080       if (instancesBuilder_ == null) {
1081         if (value == null) {
1082           throw new NullPointerException();
1083         }
1084         ensureInstancesIsMutable();
1085         instances_.add(index, value);
1086         onChanged();
1087       } else {
1088         instancesBuilder_.addMessage(index, value);
1089       }
1090       return this;
1091     }
1092     /**
1093      *
1094      *
1095      * <pre>
1096      * Required. The instances that are the input to the prediction call.
1097      * A DeployedModel may have an upper limit on the number of instances it
1098      * supports per request, and when it is exceeded the prediction call errors
1099      * in case of AutoML Models, or, in case of customer created Models, the
1100      * behaviour is as documented by that Model.
1101      * The schema of any single instance may be specified via Endpoint's
1102      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1103      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1104      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1105      * </pre>
1106      *
1107      * <code>
1108      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1109      * </code>
1110      */
addInstances(com.google.protobuf.Value.Builder builderForValue)1111     public Builder addInstances(com.google.protobuf.Value.Builder builderForValue) {
1112       if (instancesBuilder_ == null) {
1113         ensureInstancesIsMutable();
1114         instances_.add(builderForValue.build());
1115         onChanged();
1116       } else {
1117         instancesBuilder_.addMessage(builderForValue.build());
1118       }
1119       return this;
1120     }
1121     /**
1122      *
1123      *
1124      * <pre>
1125      * Required. The instances that are the input to the prediction call.
1126      * A DeployedModel may have an upper limit on the number of instances it
1127      * supports per request, and when it is exceeded the prediction call errors
1128      * in case of AutoML Models, or, in case of customer created Models, the
1129      * behaviour is as documented by that Model.
1130      * The schema of any single instance may be specified via Endpoint's
1131      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1132      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1133      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1134      * </pre>
1135      *
1136      * <code>
1137      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1138      * </code>
1139      */
addInstances(int index, com.google.protobuf.Value.Builder builderForValue)1140     public Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue) {
1141       if (instancesBuilder_ == null) {
1142         ensureInstancesIsMutable();
1143         instances_.add(index, builderForValue.build());
1144         onChanged();
1145       } else {
1146         instancesBuilder_.addMessage(index, builderForValue.build());
1147       }
1148       return this;
1149     }
1150     /**
1151      *
1152      *
1153      * <pre>
1154      * Required. The instances that are the input to the prediction call.
1155      * A DeployedModel may have an upper limit on the number of instances it
1156      * supports per request, and when it is exceeded the prediction call errors
1157      * in case of AutoML Models, or, in case of customer created Models, the
1158      * behaviour is as documented by that Model.
1159      * The schema of any single instance may be specified via Endpoint's
1160      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1161      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1162      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1163      * </pre>
1164      *
1165      * <code>
1166      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1167      * </code>
1168      */
addAllInstances(java.lang.Iterable<? extends com.google.protobuf.Value> values)1169     public Builder addAllInstances(java.lang.Iterable<? extends com.google.protobuf.Value> values) {
1170       if (instancesBuilder_ == null) {
1171         ensureInstancesIsMutable();
1172         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_);
1173         onChanged();
1174       } else {
1175         instancesBuilder_.addAllMessages(values);
1176       }
1177       return this;
1178     }
1179     /**
1180      *
1181      *
1182      * <pre>
1183      * Required. The instances that are the input to the prediction call.
1184      * A DeployedModel may have an upper limit on the number of instances it
1185      * supports per request, and when it is exceeded the prediction call errors
1186      * in case of AutoML Models, or, in case of customer created Models, the
1187      * behaviour is as documented by that Model.
1188      * The schema of any single instance may be specified via Endpoint's
1189      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1190      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1191      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1192      * </pre>
1193      *
1194      * <code>
1195      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1196      * </code>
1197      */
clearInstances()1198     public Builder clearInstances() {
1199       if (instancesBuilder_ == null) {
1200         instances_ = java.util.Collections.emptyList();
1201         bitField0_ = (bitField0_ & ~0x00000002);
1202         onChanged();
1203       } else {
1204         instancesBuilder_.clear();
1205       }
1206       return this;
1207     }
1208     /**
1209      *
1210      *
1211      * <pre>
1212      * Required. The instances that are the input to the prediction call.
1213      * A DeployedModel may have an upper limit on the number of instances it
1214      * supports per request, and when it is exceeded the prediction call errors
1215      * in case of AutoML Models, or, in case of customer created Models, the
1216      * behaviour is as documented by that Model.
1217      * The schema of any single instance may be specified via Endpoint's
1218      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1219      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1220      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1221      * </pre>
1222      *
1223      * <code>
1224      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1225      * </code>
1226      */
removeInstances(int index)1227     public Builder removeInstances(int index) {
1228       if (instancesBuilder_ == null) {
1229         ensureInstancesIsMutable();
1230         instances_.remove(index);
1231         onChanged();
1232       } else {
1233         instancesBuilder_.remove(index);
1234       }
1235       return this;
1236     }
1237     /**
1238      *
1239      *
1240      * <pre>
1241      * Required. The instances that are the input to the prediction call.
1242      * A DeployedModel may have an upper limit on the number of instances it
1243      * supports per request, and when it is exceeded the prediction call errors
1244      * in case of AutoML Models, or, in case of customer created Models, the
1245      * behaviour is as documented by that Model.
1246      * The schema of any single instance may be specified via Endpoint's
1247      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1248      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1249      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1250      * </pre>
1251      *
1252      * <code>
1253      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1254      * </code>
1255      */
getInstancesBuilder(int index)1256     public com.google.protobuf.Value.Builder getInstancesBuilder(int index) {
1257       return getInstancesFieldBuilder().getBuilder(index);
1258     }
1259     /**
1260      *
1261      *
1262      * <pre>
1263      * Required. The instances that are the input to the prediction call.
1264      * A DeployedModel may have an upper limit on the number of instances it
1265      * supports per request, and when it is exceeded the prediction call errors
1266      * in case of AutoML Models, or, in case of customer created Models, the
1267      * behaviour is as documented by that Model.
1268      * The schema of any single instance may be specified via Endpoint's
1269      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1270      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1271      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1272      * </pre>
1273      *
1274      * <code>
1275      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1276      * </code>
1277      */
getInstancesOrBuilder(int index)1278     public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) {
1279       if (instancesBuilder_ == null) {
1280         return instances_.get(index);
1281       } else {
1282         return instancesBuilder_.getMessageOrBuilder(index);
1283       }
1284     }
1285     /**
1286      *
1287      *
1288      * <pre>
1289      * Required. The instances that are the input to the prediction call.
1290      * A DeployedModel may have an upper limit on the number of instances it
1291      * supports per request, and when it is exceeded the prediction call errors
1292      * in case of AutoML Models, or, in case of customer created Models, the
1293      * behaviour is as documented by that Model.
1294      * The schema of any single instance may be specified via Endpoint's
1295      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1296      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1297      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1298      * </pre>
1299      *
1300      * <code>
1301      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1302      * </code>
1303      */
1304     public java.util.List<? extends com.google.protobuf.ValueOrBuilder>
getInstancesOrBuilderList()1305         getInstancesOrBuilderList() {
1306       if (instancesBuilder_ != null) {
1307         return instancesBuilder_.getMessageOrBuilderList();
1308       } else {
1309         return java.util.Collections.unmodifiableList(instances_);
1310       }
1311     }
1312     /**
1313      *
1314      *
1315      * <pre>
1316      * Required. The instances that are the input to the prediction call.
1317      * A DeployedModel may have an upper limit on the number of instances it
1318      * supports per request, and when it is exceeded the prediction call errors
1319      * in case of AutoML Models, or, in case of customer created Models, the
1320      * behaviour is as documented by that Model.
1321      * The schema of any single instance may be specified via Endpoint's
1322      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1323      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1324      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1325      * </pre>
1326      *
1327      * <code>
1328      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1329      * </code>
1330      */
addInstancesBuilder()1331     public com.google.protobuf.Value.Builder addInstancesBuilder() {
1332       return getInstancesFieldBuilder().addBuilder(com.google.protobuf.Value.getDefaultInstance());
1333     }
1334     /**
1335      *
1336      *
1337      * <pre>
1338      * Required. The instances that are the input to the prediction call.
1339      * A DeployedModel may have an upper limit on the number of instances it
1340      * supports per request, and when it is exceeded the prediction call errors
1341      * in case of AutoML Models, or, in case of customer created Models, the
1342      * behaviour is as documented by that Model.
1343      * The schema of any single instance may be specified via Endpoint's
1344      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1345      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1346      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1347      * </pre>
1348      *
1349      * <code>
1350      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1351      * </code>
1352      */
addInstancesBuilder(int index)1353     public com.google.protobuf.Value.Builder addInstancesBuilder(int index) {
1354       return getInstancesFieldBuilder()
1355           .addBuilder(index, com.google.protobuf.Value.getDefaultInstance());
1356     }
1357     /**
1358      *
1359      *
1360      * <pre>
1361      * Required. The instances that are the input to the prediction call.
1362      * A DeployedModel may have an upper limit on the number of instances it
1363      * supports per request, and when it is exceeded the prediction call errors
1364      * in case of AutoML Models, or, in case of customer created Models, the
1365      * behaviour is as documented by that Model.
1366      * The schema of any single instance may be specified via Endpoint's
1367      * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
1368      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1369      * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
1370      * </pre>
1371      *
1372      * <code>
1373      * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
1374      * </code>
1375      */
getInstancesBuilderList()1376     public java.util.List<com.google.protobuf.Value.Builder> getInstancesBuilderList() {
1377       return getInstancesFieldBuilder().getBuilderList();
1378     }
1379 
1380     private com.google.protobuf.RepeatedFieldBuilderV3<
1381             com.google.protobuf.Value,
1382             com.google.protobuf.Value.Builder,
1383             com.google.protobuf.ValueOrBuilder>
getInstancesFieldBuilder()1384         getInstancesFieldBuilder() {
1385       if (instancesBuilder_ == null) {
1386         instancesBuilder_ =
1387             new com.google.protobuf.RepeatedFieldBuilderV3<
1388                 com.google.protobuf.Value,
1389                 com.google.protobuf.Value.Builder,
1390                 com.google.protobuf.ValueOrBuilder>(
1391                 instances_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
1392         instances_ = null;
1393       }
1394       return instancesBuilder_;
1395     }
1396 
1397     private com.google.protobuf.Value parameters_;
1398     private com.google.protobuf.SingleFieldBuilderV3<
1399             com.google.protobuf.Value,
1400             com.google.protobuf.Value.Builder,
1401             com.google.protobuf.ValueOrBuilder>
1402         parametersBuilder_;
1403     /**
1404      *
1405      *
1406      * <pre>
1407      * The parameters that govern the prediction. The schema of the parameters may
1408      * be specified via Endpoint's DeployedModels' [Model's
1409      * ][google.cloud.aiplatform.v1.DeployedModel.model]
1410      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1411      * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
1412      * </pre>
1413      *
1414      * <code>.google.protobuf.Value parameters = 3;</code>
1415      *
1416      * @return Whether the parameters field is set.
1417      */
hasParameters()1418     public boolean hasParameters() {
1419       return ((bitField0_ & 0x00000004) != 0);
1420     }
1421     /**
1422      *
1423      *
1424      * <pre>
1425      * The parameters that govern the prediction. The schema of the parameters may
1426      * be specified via Endpoint's DeployedModels' [Model's
1427      * ][google.cloud.aiplatform.v1.DeployedModel.model]
1428      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1429      * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
1430      * </pre>
1431      *
1432      * <code>.google.protobuf.Value parameters = 3;</code>
1433      *
1434      * @return The parameters.
1435      */
getParameters()1436     public com.google.protobuf.Value getParameters() {
1437       if (parametersBuilder_ == null) {
1438         return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_;
1439       } else {
1440         return parametersBuilder_.getMessage();
1441       }
1442     }
1443     /**
1444      *
1445      *
1446      * <pre>
1447      * The parameters that govern the prediction. The schema of the parameters may
1448      * be specified via Endpoint's DeployedModels' [Model's
1449      * ][google.cloud.aiplatform.v1.DeployedModel.model]
1450      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1451      * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
1452      * </pre>
1453      *
1454      * <code>.google.protobuf.Value parameters = 3;</code>
1455      */
setParameters(com.google.protobuf.Value value)1456     public Builder setParameters(com.google.protobuf.Value value) {
1457       if (parametersBuilder_ == null) {
1458         if (value == null) {
1459           throw new NullPointerException();
1460         }
1461         parameters_ = value;
1462       } else {
1463         parametersBuilder_.setMessage(value);
1464       }
1465       bitField0_ |= 0x00000004;
1466       onChanged();
1467       return this;
1468     }
1469     /**
1470      *
1471      *
1472      * <pre>
1473      * The parameters that govern the prediction. The schema of the parameters may
1474      * be specified via Endpoint's DeployedModels' [Model's
1475      * ][google.cloud.aiplatform.v1.DeployedModel.model]
1476      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1477      * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
1478      * </pre>
1479      *
1480      * <code>.google.protobuf.Value parameters = 3;</code>
1481      */
setParameters(com.google.protobuf.Value.Builder builderForValue)1482     public Builder setParameters(com.google.protobuf.Value.Builder builderForValue) {
1483       if (parametersBuilder_ == null) {
1484         parameters_ = builderForValue.build();
1485       } else {
1486         parametersBuilder_.setMessage(builderForValue.build());
1487       }
1488       bitField0_ |= 0x00000004;
1489       onChanged();
1490       return this;
1491     }
1492     /**
1493      *
1494      *
1495      * <pre>
1496      * The parameters that govern the prediction. The schema of the parameters may
1497      * be specified via Endpoint's DeployedModels' [Model's
1498      * ][google.cloud.aiplatform.v1.DeployedModel.model]
1499      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1500      * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
1501      * </pre>
1502      *
1503      * <code>.google.protobuf.Value parameters = 3;</code>
1504      */
mergeParameters(com.google.protobuf.Value value)1505     public Builder mergeParameters(com.google.protobuf.Value value) {
1506       if (parametersBuilder_ == null) {
1507         if (((bitField0_ & 0x00000004) != 0)
1508             && parameters_ != null
1509             && parameters_ != com.google.protobuf.Value.getDefaultInstance()) {
1510           getParametersBuilder().mergeFrom(value);
1511         } else {
1512           parameters_ = value;
1513         }
1514       } else {
1515         parametersBuilder_.mergeFrom(value);
1516       }
1517       bitField0_ |= 0x00000004;
1518       onChanged();
1519       return this;
1520     }
1521     /**
1522      *
1523      *
1524      * <pre>
1525      * The parameters that govern the prediction. The schema of the parameters may
1526      * be specified via Endpoint's DeployedModels' [Model's
1527      * ][google.cloud.aiplatform.v1.DeployedModel.model]
1528      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1529      * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
1530      * </pre>
1531      *
1532      * <code>.google.protobuf.Value parameters = 3;</code>
1533      */
clearParameters()1534     public Builder clearParameters() {
1535       bitField0_ = (bitField0_ & ~0x00000004);
1536       parameters_ = null;
1537       if (parametersBuilder_ != null) {
1538         parametersBuilder_.dispose();
1539         parametersBuilder_ = null;
1540       }
1541       onChanged();
1542       return this;
1543     }
1544     /**
1545      *
1546      *
1547      * <pre>
1548      * The parameters that govern the prediction. The schema of the parameters may
1549      * be specified via Endpoint's DeployedModels' [Model's
1550      * ][google.cloud.aiplatform.v1.DeployedModel.model]
1551      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1552      * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
1553      * </pre>
1554      *
1555      * <code>.google.protobuf.Value parameters = 3;</code>
1556      */
getParametersBuilder()1557     public com.google.protobuf.Value.Builder getParametersBuilder() {
1558       bitField0_ |= 0x00000004;
1559       onChanged();
1560       return getParametersFieldBuilder().getBuilder();
1561     }
1562     /**
1563      *
1564      *
1565      * <pre>
1566      * The parameters that govern the prediction. The schema of the parameters may
1567      * be specified via Endpoint's DeployedModels' [Model's
1568      * ][google.cloud.aiplatform.v1.DeployedModel.model]
1569      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1570      * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
1571      * </pre>
1572      *
1573      * <code>.google.protobuf.Value parameters = 3;</code>
1574      */
getParametersOrBuilder()1575     public com.google.protobuf.ValueOrBuilder getParametersOrBuilder() {
1576       if (parametersBuilder_ != null) {
1577         return parametersBuilder_.getMessageOrBuilder();
1578       } else {
1579         return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_;
1580       }
1581     }
1582     /**
1583      *
1584      *
1585      * <pre>
1586      * The parameters that govern the prediction. The schema of the parameters may
1587      * be specified via Endpoint's DeployedModels' [Model's
1588      * ][google.cloud.aiplatform.v1.DeployedModel.model]
1589      * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
1590      * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
1591      * </pre>
1592      *
1593      * <code>.google.protobuf.Value parameters = 3;</code>
1594      */
1595     private com.google.protobuf.SingleFieldBuilderV3<
1596             com.google.protobuf.Value,
1597             com.google.protobuf.Value.Builder,
1598             com.google.protobuf.ValueOrBuilder>
getParametersFieldBuilder()1599         getParametersFieldBuilder() {
1600       if (parametersBuilder_ == null) {
1601         parametersBuilder_ =
1602             new com.google.protobuf.SingleFieldBuilderV3<
1603                 com.google.protobuf.Value,
1604                 com.google.protobuf.Value.Builder,
1605                 com.google.protobuf.ValueOrBuilder>(
1606                 getParameters(), getParentForChildren(), isClean());
1607         parameters_ = null;
1608       }
1609       return parametersBuilder_;
1610     }
1611 
1612     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1613     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1614       return super.setUnknownFields(unknownFields);
1615     }
1616 
1617     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1618     public final Builder mergeUnknownFields(
1619         final com.google.protobuf.UnknownFieldSet unknownFields) {
1620       return super.mergeUnknownFields(unknownFields);
1621     }
1622 
1623     // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.PredictRequest)
1624   }
1625 
1626   // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.PredictRequest)
1627   private static final com.google.cloud.aiplatform.v1.PredictRequest DEFAULT_INSTANCE;
1628 
1629   static {
1630     DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.PredictRequest();
1631   }
1632 
getDefaultInstance()1633   public static com.google.cloud.aiplatform.v1.PredictRequest getDefaultInstance() {
1634     return DEFAULT_INSTANCE;
1635   }
1636 
1637   private static final com.google.protobuf.Parser<PredictRequest> PARSER =
1638       new com.google.protobuf.AbstractParser<PredictRequest>() {
1639         @java.lang.Override
1640         public PredictRequest parsePartialFrom(
1641             com.google.protobuf.CodedInputStream input,
1642             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1643             throws com.google.protobuf.InvalidProtocolBufferException {
1644           Builder builder = newBuilder();
1645           try {
1646             builder.mergeFrom(input, extensionRegistry);
1647           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1648             throw e.setUnfinishedMessage(builder.buildPartial());
1649           } catch (com.google.protobuf.UninitializedMessageException e) {
1650             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1651           } catch (java.io.IOException e) {
1652             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1653                 .setUnfinishedMessage(builder.buildPartial());
1654           }
1655           return builder.buildPartial();
1656         }
1657       };
1658 
parser()1659   public static com.google.protobuf.Parser<PredictRequest> parser() {
1660     return PARSER;
1661   }
1662 
1663   @java.lang.Override
getParserForType()1664   public com.google.protobuf.Parser<PredictRequest> getParserForType() {
1665     return PARSER;
1666   }
1667 
1668   @java.lang.Override
getDefaultInstanceForType()1669   public com.google.cloud.aiplatform.v1.PredictRequest getDefaultInstanceForType() {
1670     return DEFAULT_INSTANCE;
1671   }
1672 }
1673