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