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/v1beta1/explanation.proto 18 19 package com.google.cloud.aiplatform.v1beta1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Example-based explainability that returns the nearest neighbors from the 26 * provided dataset. 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.aiplatform.v1beta1.Examples} 30 */ 31 public final class Examples extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.Examples) 34 ExamplesOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use Examples.newBuilder() to construct. Examples(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private Examples(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 Examples()41 private Examples() {} 42 43 @java.lang.Override 44 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)45 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 46 return new Examples(); 47 } 48 49 @java.lang.Override getUnknownFields()50 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 51 return this.unknownFields; 52 } 53 getDescriptor()54 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 55 return com.google.cloud.aiplatform.v1beta1.ExplanationProto 56 .internal_static_google_cloud_aiplatform_v1beta1_Examples_descriptor; 57 } 58 59 @java.lang.Override 60 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()61 internalGetFieldAccessorTable() { 62 return com.google.cloud.aiplatform.v1beta1.ExplanationProto 63 .internal_static_google_cloud_aiplatform_v1beta1_Examples_fieldAccessorTable 64 .ensureFieldAccessorsInitialized( 65 com.google.cloud.aiplatform.v1beta1.Examples.class, 66 com.google.cloud.aiplatform.v1beta1.Examples.Builder.class); 67 } 68 69 public interface ExampleGcsSourceOrBuilder 70 extends 71 // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) 72 com.google.protobuf.MessageOrBuilder { 73 74 /** 75 * 76 * 77 * <pre> 78 * The format in which instances are given, if not specified, assume it's 79 * JSONL format. Currently only JSONL format is supported. 80 * </pre> 81 * 82 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat data_format = 1; 83 * </code> 84 * 85 * @return The enum numeric value on the wire for dataFormat. 86 */ getDataFormatValue()87 int getDataFormatValue(); 88 /** 89 * 90 * 91 * <pre> 92 * The format in which instances are given, if not specified, assume it's 93 * JSONL format. Currently only JSONL format is supported. 94 * </pre> 95 * 96 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat data_format = 1; 97 * </code> 98 * 99 * @return The dataFormat. 100 */ getDataFormat()101 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat getDataFormat(); 102 103 /** 104 * 105 * 106 * <pre> 107 * The Cloud Storage location for the input instances. 108 * </pre> 109 * 110 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 111 * 112 * @return Whether the gcsSource field is set. 113 */ hasGcsSource()114 boolean hasGcsSource(); 115 /** 116 * 117 * 118 * <pre> 119 * The Cloud Storage location for the input instances. 120 * </pre> 121 * 122 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 123 * 124 * @return The gcsSource. 125 */ getGcsSource()126 com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource(); 127 /** 128 * 129 * 130 * <pre> 131 * The Cloud Storage location for the input instances. 132 * </pre> 133 * 134 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 135 */ getGcsSourceOrBuilder()136 com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); 137 } 138 /** 139 * 140 * 141 * <pre> 142 * The Cloud Storage input instances. 143 * </pre> 144 * 145 * Protobuf type {@code google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource} 146 */ 147 public static final class ExampleGcsSource extends com.google.protobuf.GeneratedMessageV3 148 implements 149 // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) 150 ExampleGcsSourceOrBuilder { 151 private static final long serialVersionUID = 0L; 152 // Use ExampleGcsSource.newBuilder() to construct. ExampleGcsSource(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)153 private ExampleGcsSource(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 154 super(builder); 155 } 156 ExampleGcsSource()157 private ExampleGcsSource() { 158 dataFormat_ = 0; 159 } 160 161 @java.lang.Override 162 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)163 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 164 return new ExampleGcsSource(); 165 } 166 167 @java.lang.Override getUnknownFields()168 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 169 return this.unknownFields; 170 } 171 getDescriptor()172 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 173 return com.google.cloud.aiplatform.v1beta1.ExplanationProto 174 .internal_static_google_cloud_aiplatform_v1beta1_Examples_ExampleGcsSource_descriptor; 175 } 176 177 @java.lang.Override 178 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()179 internalGetFieldAccessorTable() { 180 return com.google.cloud.aiplatform.v1beta1.ExplanationProto 181 .internal_static_google_cloud_aiplatform_v1beta1_Examples_ExampleGcsSource_fieldAccessorTable 182 .ensureFieldAccessorsInitialized( 183 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.class, 184 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.Builder.class); 185 } 186 187 /** 188 * 189 * 190 * <pre> 191 * The format of the input example instances. 192 * </pre> 193 * 194 * Protobuf enum {@code google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat} 195 */ 196 public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { 197 /** 198 * 199 * 200 * <pre> 201 * Format unspecified, used when unset. 202 * </pre> 203 * 204 * <code>DATA_FORMAT_UNSPECIFIED = 0;</code> 205 */ 206 DATA_FORMAT_UNSPECIFIED(0), 207 /** 208 * 209 * 210 * <pre> 211 * Examples are stored in JSONL files. 212 * </pre> 213 * 214 * <code>JSONL = 1;</code> 215 */ 216 JSONL(1), 217 UNRECOGNIZED(-1), 218 ; 219 220 /** 221 * 222 * 223 * <pre> 224 * Format unspecified, used when unset. 225 * </pre> 226 * 227 * <code>DATA_FORMAT_UNSPECIFIED = 0;</code> 228 */ 229 public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0; 230 /** 231 * 232 * 233 * <pre> 234 * Examples are stored in JSONL files. 235 * </pre> 236 * 237 * <code>JSONL = 1;</code> 238 */ 239 public static final int JSONL_VALUE = 1; 240 getNumber()241 public final int getNumber() { 242 if (this == UNRECOGNIZED) { 243 throw new java.lang.IllegalArgumentException( 244 "Can't get the number of an unknown enum value."); 245 } 246 return value; 247 } 248 249 /** 250 * @param value The numeric wire value of the corresponding enum entry. 251 * @return The enum associated with the given numeric wire value. 252 * @deprecated Use {@link #forNumber(int)} instead. 253 */ 254 @java.lang.Deprecated valueOf(int value)255 public static DataFormat valueOf(int value) { 256 return forNumber(value); 257 } 258 259 /** 260 * @param value The numeric wire value of the corresponding enum entry. 261 * @return The enum associated with the given numeric wire value. 262 */ forNumber(int value)263 public static DataFormat forNumber(int value) { 264 switch (value) { 265 case 0: 266 return DATA_FORMAT_UNSPECIFIED; 267 case 1: 268 return JSONL; 269 default: 270 return null; 271 } 272 } 273 internalGetValueMap()274 public static com.google.protobuf.Internal.EnumLiteMap<DataFormat> internalGetValueMap() { 275 return internalValueMap; 276 } 277 278 private static final com.google.protobuf.Internal.EnumLiteMap<DataFormat> internalValueMap = 279 new com.google.protobuf.Internal.EnumLiteMap<DataFormat>() { 280 public DataFormat findValueByNumber(int number) { 281 return DataFormat.forNumber(number); 282 } 283 }; 284 getValueDescriptor()285 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 286 if (this == UNRECOGNIZED) { 287 throw new java.lang.IllegalStateException( 288 "Can't get the descriptor of an unrecognized enum value."); 289 } 290 return getDescriptor().getValues().get(ordinal()); 291 } 292 getDescriptorForType()293 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 294 return getDescriptor(); 295 } 296 getDescriptor()297 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 298 return com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.getDescriptor() 299 .getEnumTypes() 300 .get(0); 301 } 302 303 private static final DataFormat[] VALUES = values(); 304 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)305 public static DataFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 306 if (desc.getType() != getDescriptor()) { 307 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 308 } 309 if (desc.getIndex() == -1) { 310 return UNRECOGNIZED; 311 } 312 return VALUES[desc.getIndex()]; 313 } 314 315 private final int value; 316 DataFormat(int value)317 private DataFormat(int value) { 318 this.value = value; 319 } 320 321 // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat) 322 } 323 324 public static final int DATA_FORMAT_FIELD_NUMBER = 1; 325 private int dataFormat_ = 0; 326 /** 327 * 328 * 329 * <pre> 330 * The format in which instances are given, if not specified, assume it's 331 * JSONL format. Currently only JSONL format is supported. 332 * </pre> 333 * 334 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat data_format = 1; 335 * </code> 336 * 337 * @return The enum numeric value on the wire for dataFormat. 338 */ 339 @java.lang.Override getDataFormatValue()340 public int getDataFormatValue() { 341 return dataFormat_; 342 } 343 /** 344 * 345 * 346 * <pre> 347 * The format in which instances are given, if not specified, assume it's 348 * JSONL format. Currently only JSONL format is supported. 349 * </pre> 350 * 351 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat data_format = 1; 352 * </code> 353 * 354 * @return The dataFormat. 355 */ 356 @java.lang.Override 357 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat getDataFormat()358 getDataFormat() { 359 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat result = 360 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat.forNumber( 361 dataFormat_); 362 return result == null 363 ? com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat.UNRECOGNIZED 364 : result; 365 } 366 367 public static final int GCS_SOURCE_FIELD_NUMBER = 2; 368 private com.google.cloud.aiplatform.v1beta1.GcsSource gcsSource_; 369 /** 370 * 371 * 372 * <pre> 373 * The Cloud Storage location for the input instances. 374 * </pre> 375 * 376 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 377 * 378 * @return Whether the gcsSource field is set. 379 */ 380 @java.lang.Override hasGcsSource()381 public boolean hasGcsSource() { 382 return gcsSource_ != null; 383 } 384 /** 385 * 386 * 387 * <pre> 388 * The Cloud Storage location for the input instances. 389 * </pre> 390 * 391 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 392 * 393 * @return The gcsSource. 394 */ 395 @java.lang.Override getGcsSource()396 public com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource() { 397 return gcsSource_ == null 398 ? com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance() 399 : gcsSource_; 400 } 401 /** 402 * 403 * 404 * <pre> 405 * The Cloud Storage location for the input instances. 406 * </pre> 407 * 408 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 409 */ 410 @java.lang.Override getGcsSourceOrBuilder()411 public com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { 412 return gcsSource_ == null 413 ? com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance() 414 : gcsSource_; 415 } 416 417 private byte memoizedIsInitialized = -1; 418 419 @java.lang.Override isInitialized()420 public final boolean isInitialized() { 421 byte isInitialized = memoizedIsInitialized; 422 if (isInitialized == 1) return true; 423 if (isInitialized == 0) return false; 424 425 memoizedIsInitialized = 1; 426 return true; 427 } 428 429 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)430 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 431 if (dataFormat_ 432 != com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat 433 .DATA_FORMAT_UNSPECIFIED 434 .getNumber()) { 435 output.writeEnum(1, dataFormat_); 436 } 437 if (gcsSource_ != null) { 438 output.writeMessage(2, getGcsSource()); 439 } 440 getUnknownFields().writeTo(output); 441 } 442 443 @java.lang.Override getSerializedSize()444 public int getSerializedSize() { 445 int size = memoizedSize; 446 if (size != -1) return size; 447 448 size = 0; 449 if (dataFormat_ 450 != com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat 451 .DATA_FORMAT_UNSPECIFIED 452 .getNumber()) { 453 size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, dataFormat_); 454 } 455 if (gcsSource_ != null) { 456 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGcsSource()); 457 } 458 size += getUnknownFields().getSerializedSize(); 459 memoizedSize = size; 460 return size; 461 } 462 463 @java.lang.Override equals(final java.lang.Object obj)464 public boolean equals(final java.lang.Object obj) { 465 if (obj == this) { 466 return true; 467 } 468 if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource)) { 469 return super.equals(obj); 470 } 471 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource other = 472 (com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) obj; 473 474 if (dataFormat_ != other.dataFormat_) return false; 475 if (hasGcsSource() != other.hasGcsSource()) return false; 476 if (hasGcsSource()) { 477 if (!getGcsSource().equals(other.getGcsSource())) return false; 478 } 479 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 480 return true; 481 } 482 483 @java.lang.Override hashCode()484 public int hashCode() { 485 if (memoizedHashCode != 0) { 486 return memoizedHashCode; 487 } 488 int hash = 41; 489 hash = (19 * hash) + getDescriptor().hashCode(); 490 hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; 491 hash = (53 * hash) + dataFormat_; 492 if (hasGcsSource()) { 493 hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; 494 hash = (53 * hash) + getGcsSource().hashCode(); 495 } 496 hash = (29 * hash) + getUnknownFields().hashCode(); 497 memoizedHashCode = hash; 498 return hash; 499 } 500 parseFrom( java.nio.ByteBuffer data)501 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseFrom( 502 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 503 return PARSER.parseFrom(data); 504 } 505 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)506 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseFrom( 507 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 508 throws com.google.protobuf.InvalidProtocolBufferException { 509 return PARSER.parseFrom(data, extensionRegistry); 510 } 511 parseFrom( com.google.protobuf.ByteString data)512 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseFrom( 513 com.google.protobuf.ByteString data) 514 throws com.google.protobuf.InvalidProtocolBufferException { 515 return PARSER.parseFrom(data); 516 } 517 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)518 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseFrom( 519 com.google.protobuf.ByteString data, 520 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 521 throws com.google.protobuf.InvalidProtocolBufferException { 522 return PARSER.parseFrom(data, extensionRegistry); 523 } 524 parseFrom( byte[] data)525 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseFrom( 526 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 527 return PARSER.parseFrom(data); 528 } 529 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)530 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseFrom( 531 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 532 throws com.google.protobuf.InvalidProtocolBufferException { 533 return PARSER.parseFrom(data, extensionRegistry); 534 } 535 parseFrom( java.io.InputStream input)536 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseFrom( 537 java.io.InputStream input) throws java.io.IOException { 538 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 539 } 540 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)541 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseFrom( 542 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 543 throws java.io.IOException { 544 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 545 PARSER, input, extensionRegistry); 546 } 547 parseDelimitedFrom( java.io.InputStream input)548 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseDelimitedFrom( 549 java.io.InputStream input) throws java.io.IOException { 550 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 551 } 552 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)553 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseDelimitedFrom( 554 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 555 throws java.io.IOException { 556 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 557 PARSER, input, extensionRegistry); 558 } 559 parseFrom( com.google.protobuf.CodedInputStream input)560 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseFrom( 561 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 562 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 563 } 564 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)565 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource parseFrom( 566 com.google.protobuf.CodedInputStream input, 567 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 568 throws java.io.IOException { 569 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 570 PARSER, input, extensionRegistry); 571 } 572 573 @java.lang.Override newBuilderForType()574 public Builder newBuilderForType() { 575 return newBuilder(); 576 } 577 newBuilder()578 public static Builder newBuilder() { 579 return DEFAULT_INSTANCE.toBuilder(); 580 } 581 newBuilder( com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource prototype)582 public static Builder newBuilder( 583 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource prototype) { 584 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 585 } 586 587 @java.lang.Override toBuilder()588 public Builder toBuilder() { 589 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 590 } 591 592 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)593 protected Builder newBuilderForType( 594 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 595 Builder builder = new Builder(parent); 596 return builder; 597 } 598 /** 599 * 600 * 601 * <pre> 602 * The Cloud Storage input instances. 603 * </pre> 604 * 605 * Protobuf type {@code google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource} 606 */ 607 public static final class Builder 608 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 609 implements 610 // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) 611 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSourceOrBuilder { getDescriptor()612 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 613 return com.google.cloud.aiplatform.v1beta1.ExplanationProto 614 .internal_static_google_cloud_aiplatform_v1beta1_Examples_ExampleGcsSource_descriptor; 615 } 616 617 @java.lang.Override 618 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()619 internalGetFieldAccessorTable() { 620 return com.google.cloud.aiplatform.v1beta1.ExplanationProto 621 .internal_static_google_cloud_aiplatform_v1beta1_Examples_ExampleGcsSource_fieldAccessorTable 622 .ensureFieldAccessorsInitialized( 623 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.class, 624 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.Builder.class); 625 } 626 627 // Construct using com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.newBuilder() Builder()628 private Builder() {} 629 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)630 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 631 super(parent); 632 } 633 634 @java.lang.Override clear()635 public Builder clear() { 636 super.clear(); 637 bitField0_ = 0; 638 dataFormat_ = 0; 639 gcsSource_ = null; 640 if (gcsSourceBuilder_ != null) { 641 gcsSourceBuilder_.dispose(); 642 gcsSourceBuilder_ = null; 643 } 644 return this; 645 } 646 647 @java.lang.Override getDescriptorForType()648 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 649 return com.google.cloud.aiplatform.v1beta1.ExplanationProto 650 .internal_static_google_cloud_aiplatform_v1beta1_Examples_ExampleGcsSource_descriptor; 651 } 652 653 @java.lang.Override 654 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource getDefaultInstanceForType()655 getDefaultInstanceForType() { 656 return com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.getDefaultInstance(); 657 } 658 659 @java.lang.Override build()660 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource build() { 661 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource result = buildPartial(); 662 if (!result.isInitialized()) { 663 throw newUninitializedMessageException(result); 664 } 665 return result; 666 } 667 668 @java.lang.Override buildPartial()669 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource buildPartial() { 670 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource result = 671 new com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource(this); 672 if (bitField0_ != 0) { 673 buildPartial0(result); 674 } 675 onBuilt(); 676 return result; 677 } 678 buildPartial0( com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource result)679 private void buildPartial0( 680 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource result) { 681 int from_bitField0_ = bitField0_; 682 if (((from_bitField0_ & 0x00000001) != 0)) { 683 result.dataFormat_ = dataFormat_; 684 } 685 if (((from_bitField0_ & 0x00000002) != 0)) { 686 result.gcsSource_ = gcsSourceBuilder_ == null ? gcsSource_ : gcsSourceBuilder_.build(); 687 } 688 } 689 690 @java.lang.Override clone()691 public Builder clone() { 692 return super.clone(); 693 } 694 695 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)696 public Builder setField( 697 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 698 return super.setField(field, value); 699 } 700 701 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)702 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 703 return super.clearField(field); 704 } 705 706 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)707 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 708 return super.clearOneof(oneof); 709 } 710 711 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)712 public Builder setRepeatedField( 713 com.google.protobuf.Descriptors.FieldDescriptor field, 714 int index, 715 java.lang.Object value) { 716 return super.setRepeatedField(field, index, value); 717 } 718 719 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)720 public Builder addRepeatedField( 721 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 722 return super.addRepeatedField(field, value); 723 } 724 725 @java.lang.Override mergeFrom(com.google.protobuf.Message other)726 public Builder mergeFrom(com.google.protobuf.Message other) { 727 if (other instanceof com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) { 728 return mergeFrom((com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) other); 729 } else { 730 super.mergeFrom(other); 731 return this; 732 } 733 } 734 mergeFrom( com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource other)735 public Builder mergeFrom( 736 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource other) { 737 if (other 738 == com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.getDefaultInstance()) 739 return this; 740 if (other.dataFormat_ != 0) { 741 setDataFormatValue(other.getDataFormatValue()); 742 } 743 if (other.hasGcsSource()) { 744 mergeGcsSource(other.getGcsSource()); 745 } 746 this.mergeUnknownFields(other.getUnknownFields()); 747 onChanged(); 748 return this; 749 } 750 751 @java.lang.Override isInitialized()752 public final boolean isInitialized() { 753 return true; 754 } 755 756 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)757 public Builder mergeFrom( 758 com.google.protobuf.CodedInputStream input, 759 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 760 throws java.io.IOException { 761 if (extensionRegistry == null) { 762 throw new java.lang.NullPointerException(); 763 } 764 try { 765 boolean done = false; 766 while (!done) { 767 int tag = input.readTag(); 768 switch (tag) { 769 case 0: 770 done = true; 771 break; 772 case 8: 773 { 774 dataFormat_ = input.readEnum(); 775 bitField0_ |= 0x00000001; 776 break; 777 } // case 8 778 case 18: 779 { 780 input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); 781 bitField0_ |= 0x00000002; 782 break; 783 } // case 18 784 default: 785 { 786 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 787 done = true; // was an endgroup tag 788 } 789 break; 790 } // default: 791 } // switch (tag) 792 } // while (!done) 793 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 794 throw e.unwrapIOException(); 795 } finally { 796 onChanged(); 797 } // finally 798 return this; 799 } 800 801 private int bitField0_; 802 803 private int dataFormat_ = 0; 804 /** 805 * 806 * 807 * <pre> 808 * The format in which instances are given, if not specified, assume it's 809 * JSONL format. Currently only JSONL format is supported. 810 * </pre> 811 * 812 * <code> 813 * .google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat data_format = 1; 814 * </code> 815 * 816 * @return The enum numeric value on the wire for dataFormat. 817 */ 818 @java.lang.Override getDataFormatValue()819 public int getDataFormatValue() { 820 return dataFormat_; 821 } 822 /** 823 * 824 * 825 * <pre> 826 * The format in which instances are given, if not specified, assume it's 827 * JSONL format. Currently only JSONL format is supported. 828 * </pre> 829 * 830 * <code> 831 * .google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat data_format = 1; 832 * </code> 833 * 834 * @param value The enum numeric value on the wire for dataFormat to set. 835 * @return This builder for chaining. 836 */ setDataFormatValue(int value)837 public Builder setDataFormatValue(int value) { 838 dataFormat_ = value; 839 bitField0_ |= 0x00000001; 840 onChanged(); 841 return this; 842 } 843 /** 844 * 845 * 846 * <pre> 847 * The format in which instances are given, if not specified, assume it's 848 * JSONL format. Currently only JSONL format is supported. 849 * </pre> 850 * 851 * <code> 852 * .google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat data_format = 1; 853 * </code> 854 * 855 * @return The dataFormat. 856 */ 857 @java.lang.Override 858 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat getDataFormat()859 getDataFormat() { 860 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat result = 861 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat.forNumber( 862 dataFormat_); 863 return result == null 864 ? com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat.UNRECOGNIZED 865 : result; 866 } 867 /** 868 * 869 * 870 * <pre> 871 * The format in which instances are given, if not specified, assume it's 872 * JSONL format. Currently only JSONL format is supported. 873 * </pre> 874 * 875 * <code> 876 * .google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat data_format = 1; 877 * </code> 878 * 879 * @param value The dataFormat to set. 880 * @return This builder for chaining. 881 */ setDataFormat( com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat value)882 public Builder setDataFormat( 883 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat value) { 884 if (value == null) { 885 throw new NullPointerException(); 886 } 887 bitField0_ |= 0x00000001; 888 dataFormat_ = value.getNumber(); 889 onChanged(); 890 return this; 891 } 892 /** 893 * 894 * 895 * <pre> 896 * The format in which instances are given, if not specified, assume it's 897 * JSONL format. Currently only JSONL format is supported. 898 * </pre> 899 * 900 * <code> 901 * .google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat data_format = 1; 902 * </code> 903 * 904 * @return This builder for chaining. 905 */ clearDataFormat()906 public Builder clearDataFormat() { 907 bitField0_ = (bitField0_ & ~0x00000001); 908 dataFormat_ = 0; 909 onChanged(); 910 return this; 911 } 912 913 private com.google.cloud.aiplatform.v1beta1.GcsSource gcsSource_; 914 private com.google.protobuf.SingleFieldBuilderV3< 915 com.google.cloud.aiplatform.v1beta1.GcsSource, 916 com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, 917 com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder> 918 gcsSourceBuilder_; 919 /** 920 * 921 * 922 * <pre> 923 * The Cloud Storage location for the input instances. 924 * </pre> 925 * 926 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 927 * 928 * @return Whether the gcsSource field is set. 929 */ hasGcsSource()930 public boolean hasGcsSource() { 931 return ((bitField0_ & 0x00000002) != 0); 932 } 933 /** 934 * 935 * 936 * <pre> 937 * The Cloud Storage location for the input instances. 938 * </pre> 939 * 940 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 941 * 942 * @return The gcsSource. 943 */ getGcsSource()944 public com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource() { 945 if (gcsSourceBuilder_ == null) { 946 return gcsSource_ == null 947 ? com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance() 948 : gcsSource_; 949 } else { 950 return gcsSourceBuilder_.getMessage(); 951 } 952 } 953 /** 954 * 955 * 956 * <pre> 957 * The Cloud Storage location for the input instances. 958 * </pre> 959 * 960 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 961 */ setGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value)962 public Builder setGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value) { 963 if (gcsSourceBuilder_ == null) { 964 if (value == null) { 965 throw new NullPointerException(); 966 } 967 gcsSource_ = value; 968 } else { 969 gcsSourceBuilder_.setMessage(value); 970 } 971 bitField0_ |= 0x00000002; 972 onChanged(); 973 return this; 974 } 975 /** 976 * 977 * 978 * <pre> 979 * The Cloud Storage location for the input instances. 980 * </pre> 981 * 982 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 983 */ setGcsSource( com.google.cloud.aiplatform.v1beta1.GcsSource.Builder builderForValue)984 public Builder setGcsSource( 985 com.google.cloud.aiplatform.v1beta1.GcsSource.Builder builderForValue) { 986 if (gcsSourceBuilder_ == null) { 987 gcsSource_ = builderForValue.build(); 988 } else { 989 gcsSourceBuilder_.setMessage(builderForValue.build()); 990 } 991 bitField0_ |= 0x00000002; 992 onChanged(); 993 return this; 994 } 995 /** 996 * 997 * 998 * <pre> 999 * The Cloud Storage location for the input instances. 1000 * </pre> 1001 * 1002 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 1003 */ mergeGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value)1004 public Builder mergeGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value) { 1005 if (gcsSourceBuilder_ == null) { 1006 if (((bitField0_ & 0x00000002) != 0) 1007 && gcsSource_ != null 1008 && gcsSource_ != com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance()) { 1009 getGcsSourceBuilder().mergeFrom(value); 1010 } else { 1011 gcsSource_ = value; 1012 } 1013 } else { 1014 gcsSourceBuilder_.mergeFrom(value); 1015 } 1016 bitField0_ |= 0x00000002; 1017 onChanged(); 1018 return this; 1019 } 1020 /** 1021 * 1022 * 1023 * <pre> 1024 * The Cloud Storage location for the input instances. 1025 * </pre> 1026 * 1027 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 1028 */ clearGcsSource()1029 public Builder clearGcsSource() { 1030 bitField0_ = (bitField0_ & ~0x00000002); 1031 gcsSource_ = null; 1032 if (gcsSourceBuilder_ != null) { 1033 gcsSourceBuilder_.dispose(); 1034 gcsSourceBuilder_ = null; 1035 } 1036 onChanged(); 1037 return this; 1038 } 1039 /** 1040 * 1041 * 1042 * <pre> 1043 * The Cloud Storage location for the input instances. 1044 * </pre> 1045 * 1046 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 1047 */ getGcsSourceBuilder()1048 public com.google.cloud.aiplatform.v1beta1.GcsSource.Builder getGcsSourceBuilder() { 1049 bitField0_ |= 0x00000002; 1050 onChanged(); 1051 return getGcsSourceFieldBuilder().getBuilder(); 1052 } 1053 /** 1054 * 1055 * 1056 * <pre> 1057 * The Cloud Storage location for the input instances. 1058 * </pre> 1059 * 1060 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 1061 */ getGcsSourceOrBuilder()1062 public com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { 1063 if (gcsSourceBuilder_ != null) { 1064 return gcsSourceBuilder_.getMessageOrBuilder(); 1065 } else { 1066 return gcsSource_ == null 1067 ? com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance() 1068 : gcsSource_; 1069 } 1070 } 1071 /** 1072 * 1073 * 1074 * <pre> 1075 * The Cloud Storage location for the input instances. 1076 * </pre> 1077 * 1078 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2;</code> 1079 */ 1080 private com.google.protobuf.SingleFieldBuilderV3< 1081 com.google.cloud.aiplatform.v1beta1.GcsSource, 1082 com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, 1083 com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder> getGcsSourceFieldBuilder()1084 getGcsSourceFieldBuilder() { 1085 if (gcsSourceBuilder_ == null) { 1086 gcsSourceBuilder_ = 1087 new com.google.protobuf.SingleFieldBuilderV3< 1088 com.google.cloud.aiplatform.v1beta1.GcsSource, 1089 com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, 1090 com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder>( 1091 getGcsSource(), getParentForChildren(), isClean()); 1092 gcsSource_ = null; 1093 } 1094 return gcsSourceBuilder_; 1095 } 1096 1097 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1098 public final Builder setUnknownFields( 1099 final com.google.protobuf.UnknownFieldSet unknownFields) { 1100 return super.setUnknownFields(unknownFields); 1101 } 1102 1103 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1104 public final Builder mergeUnknownFields( 1105 final com.google.protobuf.UnknownFieldSet unknownFields) { 1106 return super.mergeUnknownFields(unknownFields); 1107 } 1108 1109 // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) 1110 } 1111 1112 // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) 1113 private static final com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource 1114 DEFAULT_INSTANCE; 1115 1116 static { 1117 DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource(); 1118 } 1119 1120 public static com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource getDefaultInstance()1121 getDefaultInstance() { 1122 return DEFAULT_INSTANCE; 1123 } 1124 1125 private static final com.google.protobuf.Parser<ExampleGcsSource> PARSER = 1126 new com.google.protobuf.AbstractParser<ExampleGcsSource>() { 1127 @java.lang.Override 1128 public ExampleGcsSource parsePartialFrom( 1129 com.google.protobuf.CodedInputStream input, 1130 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1131 throws com.google.protobuf.InvalidProtocolBufferException { 1132 Builder builder = newBuilder(); 1133 try { 1134 builder.mergeFrom(input, extensionRegistry); 1135 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1136 throw e.setUnfinishedMessage(builder.buildPartial()); 1137 } catch (com.google.protobuf.UninitializedMessageException e) { 1138 throw e.asInvalidProtocolBufferException() 1139 .setUnfinishedMessage(builder.buildPartial()); 1140 } catch (java.io.IOException e) { 1141 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1142 .setUnfinishedMessage(builder.buildPartial()); 1143 } 1144 return builder.buildPartial(); 1145 } 1146 }; 1147 parser()1148 public static com.google.protobuf.Parser<ExampleGcsSource> parser() { 1149 return PARSER; 1150 } 1151 1152 @java.lang.Override getParserForType()1153 public com.google.protobuf.Parser<ExampleGcsSource> getParserForType() { 1154 return PARSER; 1155 } 1156 1157 @java.lang.Override 1158 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource getDefaultInstanceForType()1159 getDefaultInstanceForType() { 1160 return DEFAULT_INSTANCE; 1161 } 1162 } 1163 1164 private int sourceCase_ = 0; 1165 private java.lang.Object source_; 1166 1167 public enum SourceCase 1168 implements 1169 com.google.protobuf.Internal.EnumLite, 1170 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 1171 EXAMPLE_GCS_SOURCE(5), 1172 SOURCE_NOT_SET(0); 1173 private final int value; 1174 SourceCase(int value)1175 private SourceCase(int value) { 1176 this.value = value; 1177 } 1178 /** 1179 * @param value The number of the enum to look for. 1180 * @return The enum associated with the given number. 1181 * @deprecated Use {@link #forNumber(int)} instead. 1182 */ 1183 @java.lang.Deprecated valueOf(int value)1184 public static SourceCase valueOf(int value) { 1185 return forNumber(value); 1186 } 1187 forNumber(int value)1188 public static SourceCase forNumber(int value) { 1189 switch (value) { 1190 case 5: 1191 return EXAMPLE_GCS_SOURCE; 1192 case 0: 1193 return SOURCE_NOT_SET; 1194 default: 1195 return null; 1196 } 1197 } 1198 getNumber()1199 public int getNumber() { 1200 return this.value; 1201 } 1202 }; 1203 getSourceCase()1204 public SourceCase getSourceCase() { 1205 return SourceCase.forNumber(sourceCase_); 1206 } 1207 1208 private int configCase_ = 0; 1209 private java.lang.Object config_; 1210 1211 public enum ConfigCase 1212 implements 1213 com.google.protobuf.Internal.EnumLite, 1214 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 1215 NEAREST_NEIGHBOR_SEARCH_CONFIG(2), 1216 PRESETS(4), 1217 CONFIG_NOT_SET(0); 1218 private final int value; 1219 ConfigCase(int value)1220 private ConfigCase(int value) { 1221 this.value = value; 1222 } 1223 /** 1224 * @param value The number of the enum to look for. 1225 * @return The enum associated with the given number. 1226 * @deprecated Use {@link #forNumber(int)} instead. 1227 */ 1228 @java.lang.Deprecated valueOf(int value)1229 public static ConfigCase valueOf(int value) { 1230 return forNumber(value); 1231 } 1232 forNumber(int value)1233 public static ConfigCase forNumber(int value) { 1234 switch (value) { 1235 case 2: 1236 return NEAREST_NEIGHBOR_SEARCH_CONFIG; 1237 case 4: 1238 return PRESETS; 1239 case 0: 1240 return CONFIG_NOT_SET; 1241 default: 1242 return null; 1243 } 1244 } 1245 getNumber()1246 public int getNumber() { 1247 return this.value; 1248 } 1249 }; 1250 getConfigCase()1251 public ConfigCase getConfigCase() { 1252 return ConfigCase.forNumber(configCase_); 1253 } 1254 1255 public static final int EXAMPLE_GCS_SOURCE_FIELD_NUMBER = 5; 1256 /** 1257 * 1258 * 1259 * <pre> 1260 * The Cloud Storage input instances. 1261 * </pre> 1262 * 1263 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5;</code> 1264 * 1265 * @return Whether the exampleGcsSource field is set. 1266 */ 1267 @java.lang.Override hasExampleGcsSource()1268 public boolean hasExampleGcsSource() { 1269 return sourceCase_ == 5; 1270 } 1271 /** 1272 * 1273 * 1274 * <pre> 1275 * The Cloud Storage input instances. 1276 * </pre> 1277 * 1278 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5;</code> 1279 * 1280 * @return The exampleGcsSource. 1281 */ 1282 @java.lang.Override getExampleGcsSource()1283 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource getExampleGcsSource() { 1284 if (sourceCase_ == 5) { 1285 return (com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) source_; 1286 } 1287 return com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.getDefaultInstance(); 1288 } 1289 /** 1290 * 1291 * 1292 * <pre> 1293 * The Cloud Storage input instances. 1294 * </pre> 1295 * 1296 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5;</code> 1297 */ 1298 @java.lang.Override 1299 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSourceOrBuilder getExampleGcsSourceOrBuilder()1300 getExampleGcsSourceOrBuilder() { 1301 if (sourceCase_ == 5) { 1302 return (com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) source_; 1303 } 1304 return com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.getDefaultInstance(); 1305 } 1306 1307 public static final int NEAREST_NEIGHBOR_SEARCH_CONFIG_FIELD_NUMBER = 2; 1308 /** 1309 * 1310 * 1311 * <pre> 1312 * The full configuration for the generated index, the semantics are the 1313 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 1314 * should match 1315 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 1316 * </pre> 1317 * 1318 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 1319 * 1320 * @return Whether the nearestNeighborSearchConfig field is set. 1321 */ 1322 @java.lang.Override hasNearestNeighborSearchConfig()1323 public boolean hasNearestNeighborSearchConfig() { 1324 return configCase_ == 2; 1325 } 1326 /** 1327 * 1328 * 1329 * <pre> 1330 * The full configuration for the generated index, the semantics are the 1331 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 1332 * should match 1333 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 1334 * </pre> 1335 * 1336 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 1337 * 1338 * @return The nearestNeighborSearchConfig. 1339 */ 1340 @java.lang.Override getNearestNeighborSearchConfig()1341 public com.google.protobuf.Value getNearestNeighborSearchConfig() { 1342 if (configCase_ == 2) { 1343 return (com.google.protobuf.Value) config_; 1344 } 1345 return com.google.protobuf.Value.getDefaultInstance(); 1346 } 1347 /** 1348 * 1349 * 1350 * <pre> 1351 * The full configuration for the generated index, the semantics are the 1352 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 1353 * should match 1354 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 1355 * </pre> 1356 * 1357 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 1358 */ 1359 @java.lang.Override getNearestNeighborSearchConfigOrBuilder()1360 public com.google.protobuf.ValueOrBuilder getNearestNeighborSearchConfigOrBuilder() { 1361 if (configCase_ == 2) { 1362 return (com.google.protobuf.Value) config_; 1363 } 1364 return com.google.protobuf.Value.getDefaultInstance(); 1365 } 1366 1367 public static final int PRESETS_FIELD_NUMBER = 4; 1368 /** 1369 * 1370 * 1371 * <pre> 1372 * Simplified preset configuration, which automatically sets configuration 1373 * values based on the desired query speed-precision trade-off and modality. 1374 * </pre> 1375 * 1376 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 1377 * 1378 * @return Whether the presets field is set. 1379 */ 1380 @java.lang.Override hasPresets()1381 public boolean hasPresets() { 1382 return configCase_ == 4; 1383 } 1384 /** 1385 * 1386 * 1387 * <pre> 1388 * Simplified preset configuration, which automatically sets configuration 1389 * values based on the desired query speed-precision trade-off and modality. 1390 * </pre> 1391 * 1392 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 1393 * 1394 * @return The presets. 1395 */ 1396 @java.lang.Override getPresets()1397 public com.google.cloud.aiplatform.v1beta1.Presets getPresets() { 1398 if (configCase_ == 4) { 1399 return (com.google.cloud.aiplatform.v1beta1.Presets) config_; 1400 } 1401 return com.google.cloud.aiplatform.v1beta1.Presets.getDefaultInstance(); 1402 } 1403 /** 1404 * 1405 * 1406 * <pre> 1407 * Simplified preset configuration, which automatically sets configuration 1408 * values based on the desired query speed-precision trade-off and modality. 1409 * </pre> 1410 * 1411 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 1412 */ 1413 @java.lang.Override getPresetsOrBuilder()1414 public com.google.cloud.aiplatform.v1beta1.PresetsOrBuilder getPresetsOrBuilder() { 1415 if (configCase_ == 4) { 1416 return (com.google.cloud.aiplatform.v1beta1.Presets) config_; 1417 } 1418 return com.google.cloud.aiplatform.v1beta1.Presets.getDefaultInstance(); 1419 } 1420 1421 public static final int GCS_SOURCE_FIELD_NUMBER = 1; 1422 private com.google.cloud.aiplatform.v1beta1.GcsSource gcsSource_; 1423 /** 1424 * 1425 * 1426 * <pre> 1427 * The Cloud Storage locations that contain the instances to be 1428 * indexed for approximate nearest neighbor search. 1429 * </pre> 1430 * 1431 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 1432 * 1433 * @return Whether the gcsSource field is set. 1434 */ 1435 @java.lang.Override hasGcsSource()1436 public boolean hasGcsSource() { 1437 return gcsSource_ != null; 1438 } 1439 /** 1440 * 1441 * 1442 * <pre> 1443 * The Cloud Storage locations that contain the instances to be 1444 * indexed for approximate nearest neighbor search. 1445 * </pre> 1446 * 1447 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 1448 * 1449 * @return The gcsSource. 1450 */ 1451 @java.lang.Override getGcsSource()1452 public com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource() { 1453 return gcsSource_ == null 1454 ? com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance() 1455 : gcsSource_; 1456 } 1457 /** 1458 * 1459 * 1460 * <pre> 1461 * The Cloud Storage locations that contain the instances to be 1462 * indexed for approximate nearest neighbor search. 1463 * </pre> 1464 * 1465 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 1466 */ 1467 @java.lang.Override getGcsSourceOrBuilder()1468 public com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { 1469 return gcsSource_ == null 1470 ? com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance() 1471 : gcsSource_; 1472 } 1473 1474 public static final int NEIGHBOR_COUNT_FIELD_NUMBER = 3; 1475 private int neighborCount_ = 0; 1476 /** 1477 * 1478 * 1479 * <pre> 1480 * The number of neighbors to return when querying for examples. 1481 * </pre> 1482 * 1483 * <code>int32 neighbor_count = 3;</code> 1484 * 1485 * @return The neighborCount. 1486 */ 1487 @java.lang.Override getNeighborCount()1488 public int getNeighborCount() { 1489 return neighborCount_; 1490 } 1491 1492 private byte memoizedIsInitialized = -1; 1493 1494 @java.lang.Override isInitialized()1495 public final boolean isInitialized() { 1496 byte isInitialized = memoizedIsInitialized; 1497 if (isInitialized == 1) return true; 1498 if (isInitialized == 0) return false; 1499 1500 memoizedIsInitialized = 1; 1501 return true; 1502 } 1503 1504 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1505 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1506 if (gcsSource_ != null) { 1507 output.writeMessage(1, getGcsSource()); 1508 } 1509 if (configCase_ == 2) { 1510 output.writeMessage(2, (com.google.protobuf.Value) config_); 1511 } 1512 if (neighborCount_ != 0) { 1513 output.writeInt32(3, neighborCount_); 1514 } 1515 if (configCase_ == 4) { 1516 output.writeMessage(4, (com.google.cloud.aiplatform.v1beta1.Presets) config_); 1517 } 1518 if (sourceCase_ == 5) { 1519 output.writeMessage( 1520 5, (com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) source_); 1521 } 1522 getUnknownFields().writeTo(output); 1523 } 1524 1525 @java.lang.Override getSerializedSize()1526 public int getSerializedSize() { 1527 int size = memoizedSize; 1528 if (size != -1) return size; 1529 1530 size = 0; 1531 if (gcsSource_ != null) { 1532 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGcsSource()); 1533 } 1534 if (configCase_ == 2) { 1535 size += 1536 com.google.protobuf.CodedOutputStream.computeMessageSize( 1537 2, (com.google.protobuf.Value) config_); 1538 } 1539 if (neighborCount_ != 0) { 1540 size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, neighborCount_); 1541 } 1542 if (configCase_ == 4) { 1543 size += 1544 com.google.protobuf.CodedOutputStream.computeMessageSize( 1545 4, (com.google.cloud.aiplatform.v1beta1.Presets) config_); 1546 } 1547 if (sourceCase_ == 5) { 1548 size += 1549 com.google.protobuf.CodedOutputStream.computeMessageSize( 1550 5, (com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) source_); 1551 } 1552 size += getUnknownFields().getSerializedSize(); 1553 memoizedSize = size; 1554 return size; 1555 } 1556 1557 @java.lang.Override equals(final java.lang.Object obj)1558 public boolean equals(final java.lang.Object obj) { 1559 if (obj == this) { 1560 return true; 1561 } 1562 if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.Examples)) { 1563 return super.equals(obj); 1564 } 1565 com.google.cloud.aiplatform.v1beta1.Examples other = 1566 (com.google.cloud.aiplatform.v1beta1.Examples) obj; 1567 1568 if (hasGcsSource() != other.hasGcsSource()) return false; 1569 if (hasGcsSource()) { 1570 if (!getGcsSource().equals(other.getGcsSource())) return false; 1571 } 1572 if (getNeighborCount() != other.getNeighborCount()) return false; 1573 if (!getSourceCase().equals(other.getSourceCase())) return false; 1574 switch (sourceCase_) { 1575 case 5: 1576 if (!getExampleGcsSource().equals(other.getExampleGcsSource())) return false; 1577 break; 1578 case 0: 1579 default: 1580 } 1581 if (!getConfigCase().equals(other.getConfigCase())) return false; 1582 switch (configCase_) { 1583 case 2: 1584 if (!getNearestNeighborSearchConfig().equals(other.getNearestNeighborSearchConfig())) 1585 return false; 1586 break; 1587 case 4: 1588 if (!getPresets().equals(other.getPresets())) return false; 1589 break; 1590 case 0: 1591 default: 1592 } 1593 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1594 return true; 1595 } 1596 1597 @java.lang.Override hashCode()1598 public int hashCode() { 1599 if (memoizedHashCode != 0) { 1600 return memoizedHashCode; 1601 } 1602 int hash = 41; 1603 hash = (19 * hash) + getDescriptor().hashCode(); 1604 if (hasGcsSource()) { 1605 hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; 1606 hash = (53 * hash) + getGcsSource().hashCode(); 1607 } 1608 hash = (37 * hash) + NEIGHBOR_COUNT_FIELD_NUMBER; 1609 hash = (53 * hash) + getNeighborCount(); 1610 switch (sourceCase_) { 1611 case 5: 1612 hash = (37 * hash) + EXAMPLE_GCS_SOURCE_FIELD_NUMBER; 1613 hash = (53 * hash) + getExampleGcsSource().hashCode(); 1614 break; 1615 case 0: 1616 default: 1617 } 1618 switch (configCase_) { 1619 case 2: 1620 hash = (37 * hash) + NEAREST_NEIGHBOR_SEARCH_CONFIG_FIELD_NUMBER; 1621 hash = (53 * hash) + getNearestNeighborSearchConfig().hashCode(); 1622 break; 1623 case 4: 1624 hash = (37 * hash) + PRESETS_FIELD_NUMBER; 1625 hash = (53 * hash) + getPresets().hashCode(); 1626 break; 1627 case 0: 1628 default: 1629 } 1630 hash = (29 * hash) + getUnknownFields().hashCode(); 1631 memoizedHashCode = hash; 1632 return hash; 1633 } 1634 parseFrom(java.nio.ByteBuffer data)1635 public static com.google.cloud.aiplatform.v1beta1.Examples parseFrom(java.nio.ByteBuffer data) 1636 throws com.google.protobuf.InvalidProtocolBufferException { 1637 return PARSER.parseFrom(data); 1638 } 1639 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1640 public static com.google.cloud.aiplatform.v1beta1.Examples parseFrom( 1641 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1642 throws com.google.protobuf.InvalidProtocolBufferException { 1643 return PARSER.parseFrom(data, extensionRegistry); 1644 } 1645 parseFrom( com.google.protobuf.ByteString data)1646 public static com.google.cloud.aiplatform.v1beta1.Examples parseFrom( 1647 com.google.protobuf.ByteString data) 1648 throws com.google.protobuf.InvalidProtocolBufferException { 1649 return PARSER.parseFrom(data); 1650 } 1651 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1652 public static com.google.cloud.aiplatform.v1beta1.Examples parseFrom( 1653 com.google.protobuf.ByteString data, 1654 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1655 throws com.google.protobuf.InvalidProtocolBufferException { 1656 return PARSER.parseFrom(data, extensionRegistry); 1657 } 1658 parseFrom(byte[] data)1659 public static com.google.cloud.aiplatform.v1beta1.Examples parseFrom(byte[] data) 1660 throws com.google.protobuf.InvalidProtocolBufferException { 1661 return PARSER.parseFrom(data); 1662 } 1663 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1664 public static com.google.cloud.aiplatform.v1beta1.Examples parseFrom( 1665 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1666 throws com.google.protobuf.InvalidProtocolBufferException { 1667 return PARSER.parseFrom(data, extensionRegistry); 1668 } 1669 parseFrom(java.io.InputStream input)1670 public static com.google.cloud.aiplatform.v1beta1.Examples parseFrom(java.io.InputStream input) 1671 throws java.io.IOException { 1672 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1673 } 1674 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1675 public static com.google.cloud.aiplatform.v1beta1.Examples parseFrom( 1676 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1677 throws java.io.IOException { 1678 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1679 PARSER, input, extensionRegistry); 1680 } 1681 parseDelimitedFrom( java.io.InputStream input)1682 public static com.google.cloud.aiplatform.v1beta1.Examples parseDelimitedFrom( 1683 java.io.InputStream input) throws java.io.IOException { 1684 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1685 } 1686 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1687 public static com.google.cloud.aiplatform.v1beta1.Examples parseDelimitedFrom( 1688 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1689 throws java.io.IOException { 1690 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1691 PARSER, input, extensionRegistry); 1692 } 1693 parseFrom( com.google.protobuf.CodedInputStream input)1694 public static com.google.cloud.aiplatform.v1beta1.Examples parseFrom( 1695 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1696 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1697 } 1698 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1699 public static com.google.cloud.aiplatform.v1beta1.Examples parseFrom( 1700 com.google.protobuf.CodedInputStream input, 1701 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1702 throws java.io.IOException { 1703 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1704 PARSER, input, extensionRegistry); 1705 } 1706 1707 @java.lang.Override newBuilderForType()1708 public Builder newBuilderForType() { 1709 return newBuilder(); 1710 } 1711 newBuilder()1712 public static Builder newBuilder() { 1713 return DEFAULT_INSTANCE.toBuilder(); 1714 } 1715 newBuilder(com.google.cloud.aiplatform.v1beta1.Examples prototype)1716 public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.Examples prototype) { 1717 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1718 } 1719 1720 @java.lang.Override toBuilder()1721 public Builder toBuilder() { 1722 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1723 } 1724 1725 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1726 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1727 Builder builder = new Builder(parent); 1728 return builder; 1729 } 1730 /** 1731 * 1732 * 1733 * <pre> 1734 * Example-based explainability that returns the nearest neighbors from the 1735 * provided dataset. 1736 * </pre> 1737 * 1738 * Protobuf type {@code google.cloud.aiplatform.v1beta1.Examples} 1739 */ 1740 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1741 implements 1742 // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.Examples) 1743 com.google.cloud.aiplatform.v1beta1.ExamplesOrBuilder { getDescriptor()1744 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1745 return com.google.cloud.aiplatform.v1beta1.ExplanationProto 1746 .internal_static_google_cloud_aiplatform_v1beta1_Examples_descriptor; 1747 } 1748 1749 @java.lang.Override 1750 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1751 internalGetFieldAccessorTable() { 1752 return com.google.cloud.aiplatform.v1beta1.ExplanationProto 1753 .internal_static_google_cloud_aiplatform_v1beta1_Examples_fieldAccessorTable 1754 .ensureFieldAccessorsInitialized( 1755 com.google.cloud.aiplatform.v1beta1.Examples.class, 1756 com.google.cloud.aiplatform.v1beta1.Examples.Builder.class); 1757 } 1758 1759 // Construct using com.google.cloud.aiplatform.v1beta1.Examples.newBuilder() Builder()1760 private Builder() {} 1761 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1762 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1763 super(parent); 1764 } 1765 1766 @java.lang.Override clear()1767 public Builder clear() { 1768 super.clear(); 1769 bitField0_ = 0; 1770 if (exampleGcsSourceBuilder_ != null) { 1771 exampleGcsSourceBuilder_.clear(); 1772 } 1773 if (nearestNeighborSearchConfigBuilder_ != null) { 1774 nearestNeighborSearchConfigBuilder_.clear(); 1775 } 1776 if (presetsBuilder_ != null) { 1777 presetsBuilder_.clear(); 1778 } 1779 gcsSource_ = null; 1780 if (gcsSourceBuilder_ != null) { 1781 gcsSourceBuilder_.dispose(); 1782 gcsSourceBuilder_ = null; 1783 } 1784 neighborCount_ = 0; 1785 sourceCase_ = 0; 1786 source_ = null; 1787 configCase_ = 0; 1788 config_ = null; 1789 return this; 1790 } 1791 1792 @java.lang.Override getDescriptorForType()1793 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1794 return com.google.cloud.aiplatform.v1beta1.ExplanationProto 1795 .internal_static_google_cloud_aiplatform_v1beta1_Examples_descriptor; 1796 } 1797 1798 @java.lang.Override getDefaultInstanceForType()1799 public com.google.cloud.aiplatform.v1beta1.Examples getDefaultInstanceForType() { 1800 return com.google.cloud.aiplatform.v1beta1.Examples.getDefaultInstance(); 1801 } 1802 1803 @java.lang.Override build()1804 public com.google.cloud.aiplatform.v1beta1.Examples build() { 1805 com.google.cloud.aiplatform.v1beta1.Examples result = buildPartial(); 1806 if (!result.isInitialized()) { 1807 throw newUninitializedMessageException(result); 1808 } 1809 return result; 1810 } 1811 1812 @java.lang.Override buildPartial()1813 public com.google.cloud.aiplatform.v1beta1.Examples buildPartial() { 1814 com.google.cloud.aiplatform.v1beta1.Examples result = 1815 new com.google.cloud.aiplatform.v1beta1.Examples(this); 1816 if (bitField0_ != 0) { 1817 buildPartial0(result); 1818 } 1819 buildPartialOneofs(result); 1820 onBuilt(); 1821 return result; 1822 } 1823 buildPartial0(com.google.cloud.aiplatform.v1beta1.Examples result)1824 private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Examples result) { 1825 int from_bitField0_ = bitField0_; 1826 if (((from_bitField0_ & 0x00000008) != 0)) { 1827 result.gcsSource_ = gcsSourceBuilder_ == null ? gcsSource_ : gcsSourceBuilder_.build(); 1828 } 1829 if (((from_bitField0_ & 0x00000010) != 0)) { 1830 result.neighborCount_ = neighborCount_; 1831 } 1832 } 1833 buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.Examples result)1834 private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.Examples result) { 1835 result.sourceCase_ = sourceCase_; 1836 result.source_ = this.source_; 1837 if (sourceCase_ == 5 && exampleGcsSourceBuilder_ != null) { 1838 result.source_ = exampleGcsSourceBuilder_.build(); 1839 } 1840 result.configCase_ = configCase_; 1841 result.config_ = this.config_; 1842 if (configCase_ == 2 && nearestNeighborSearchConfigBuilder_ != null) { 1843 result.config_ = nearestNeighborSearchConfigBuilder_.build(); 1844 } 1845 if (configCase_ == 4 && presetsBuilder_ != null) { 1846 result.config_ = presetsBuilder_.build(); 1847 } 1848 } 1849 1850 @java.lang.Override clone()1851 public Builder clone() { 1852 return super.clone(); 1853 } 1854 1855 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1856 public Builder setField( 1857 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1858 return super.setField(field, value); 1859 } 1860 1861 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1862 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1863 return super.clearField(field); 1864 } 1865 1866 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1867 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1868 return super.clearOneof(oneof); 1869 } 1870 1871 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1872 public Builder setRepeatedField( 1873 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1874 return super.setRepeatedField(field, index, value); 1875 } 1876 1877 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1878 public Builder addRepeatedField( 1879 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1880 return super.addRepeatedField(field, value); 1881 } 1882 1883 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1884 public Builder mergeFrom(com.google.protobuf.Message other) { 1885 if (other instanceof com.google.cloud.aiplatform.v1beta1.Examples) { 1886 return mergeFrom((com.google.cloud.aiplatform.v1beta1.Examples) other); 1887 } else { 1888 super.mergeFrom(other); 1889 return this; 1890 } 1891 } 1892 mergeFrom(com.google.cloud.aiplatform.v1beta1.Examples other)1893 public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Examples other) { 1894 if (other == com.google.cloud.aiplatform.v1beta1.Examples.getDefaultInstance()) return this; 1895 if (other.hasGcsSource()) { 1896 mergeGcsSource(other.getGcsSource()); 1897 } 1898 if (other.getNeighborCount() != 0) { 1899 setNeighborCount(other.getNeighborCount()); 1900 } 1901 switch (other.getSourceCase()) { 1902 case EXAMPLE_GCS_SOURCE: 1903 { 1904 mergeExampleGcsSource(other.getExampleGcsSource()); 1905 break; 1906 } 1907 case SOURCE_NOT_SET: 1908 { 1909 break; 1910 } 1911 } 1912 switch (other.getConfigCase()) { 1913 case NEAREST_NEIGHBOR_SEARCH_CONFIG: 1914 { 1915 mergeNearestNeighborSearchConfig(other.getNearestNeighborSearchConfig()); 1916 break; 1917 } 1918 case PRESETS: 1919 { 1920 mergePresets(other.getPresets()); 1921 break; 1922 } 1923 case CONFIG_NOT_SET: 1924 { 1925 break; 1926 } 1927 } 1928 this.mergeUnknownFields(other.getUnknownFields()); 1929 onChanged(); 1930 return this; 1931 } 1932 1933 @java.lang.Override isInitialized()1934 public final boolean isInitialized() { 1935 return true; 1936 } 1937 1938 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1939 public Builder mergeFrom( 1940 com.google.protobuf.CodedInputStream input, 1941 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1942 throws java.io.IOException { 1943 if (extensionRegistry == null) { 1944 throw new java.lang.NullPointerException(); 1945 } 1946 try { 1947 boolean done = false; 1948 while (!done) { 1949 int tag = input.readTag(); 1950 switch (tag) { 1951 case 0: 1952 done = true; 1953 break; 1954 case 10: 1955 { 1956 input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); 1957 bitField0_ |= 0x00000008; 1958 break; 1959 } // case 10 1960 case 18: 1961 { 1962 input.readMessage( 1963 getNearestNeighborSearchConfigFieldBuilder().getBuilder(), extensionRegistry); 1964 configCase_ = 2; 1965 break; 1966 } // case 18 1967 case 24: 1968 { 1969 neighborCount_ = input.readInt32(); 1970 bitField0_ |= 0x00000010; 1971 break; 1972 } // case 24 1973 case 34: 1974 { 1975 input.readMessage(getPresetsFieldBuilder().getBuilder(), extensionRegistry); 1976 configCase_ = 4; 1977 break; 1978 } // case 34 1979 case 42: 1980 { 1981 input.readMessage( 1982 getExampleGcsSourceFieldBuilder().getBuilder(), extensionRegistry); 1983 sourceCase_ = 5; 1984 break; 1985 } // case 42 1986 default: 1987 { 1988 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1989 done = true; // was an endgroup tag 1990 } 1991 break; 1992 } // default: 1993 } // switch (tag) 1994 } // while (!done) 1995 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1996 throw e.unwrapIOException(); 1997 } finally { 1998 onChanged(); 1999 } // finally 2000 return this; 2001 } 2002 2003 private int sourceCase_ = 0; 2004 private java.lang.Object source_; 2005 getSourceCase()2006 public SourceCase getSourceCase() { 2007 return SourceCase.forNumber(sourceCase_); 2008 } 2009 clearSource()2010 public Builder clearSource() { 2011 sourceCase_ = 0; 2012 source_ = null; 2013 onChanged(); 2014 return this; 2015 } 2016 2017 private int configCase_ = 0; 2018 private java.lang.Object config_; 2019 getConfigCase()2020 public ConfigCase getConfigCase() { 2021 return ConfigCase.forNumber(configCase_); 2022 } 2023 clearConfig()2024 public Builder clearConfig() { 2025 configCase_ = 0; 2026 config_ = null; 2027 onChanged(); 2028 return this; 2029 } 2030 2031 private int bitField0_; 2032 2033 private com.google.protobuf.SingleFieldBuilderV3< 2034 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource, 2035 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.Builder, 2036 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSourceOrBuilder> 2037 exampleGcsSourceBuilder_; 2038 /** 2039 * 2040 * 2041 * <pre> 2042 * The Cloud Storage input instances. 2043 * </pre> 2044 * 2045 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5; 2046 * </code> 2047 * 2048 * @return Whether the exampleGcsSource field is set. 2049 */ 2050 @java.lang.Override hasExampleGcsSource()2051 public boolean hasExampleGcsSource() { 2052 return sourceCase_ == 5; 2053 } 2054 /** 2055 * 2056 * 2057 * <pre> 2058 * The Cloud Storage input instances. 2059 * </pre> 2060 * 2061 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5; 2062 * </code> 2063 * 2064 * @return The exampleGcsSource. 2065 */ 2066 @java.lang.Override getExampleGcsSource()2067 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource getExampleGcsSource() { 2068 if (exampleGcsSourceBuilder_ == null) { 2069 if (sourceCase_ == 5) { 2070 return (com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) source_; 2071 } 2072 return com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.getDefaultInstance(); 2073 } else { 2074 if (sourceCase_ == 5) { 2075 return exampleGcsSourceBuilder_.getMessage(); 2076 } 2077 return com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.getDefaultInstance(); 2078 } 2079 } 2080 /** 2081 * 2082 * 2083 * <pre> 2084 * The Cloud Storage input instances. 2085 * </pre> 2086 * 2087 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5; 2088 * </code> 2089 */ setExampleGcsSource( com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource value)2090 public Builder setExampleGcsSource( 2091 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource value) { 2092 if (exampleGcsSourceBuilder_ == null) { 2093 if (value == null) { 2094 throw new NullPointerException(); 2095 } 2096 source_ = value; 2097 onChanged(); 2098 } else { 2099 exampleGcsSourceBuilder_.setMessage(value); 2100 } 2101 sourceCase_ = 5; 2102 return this; 2103 } 2104 /** 2105 * 2106 * 2107 * <pre> 2108 * The Cloud Storage input instances. 2109 * </pre> 2110 * 2111 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5; 2112 * </code> 2113 */ setExampleGcsSource( com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.Builder builderForValue)2114 public Builder setExampleGcsSource( 2115 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.Builder builderForValue) { 2116 if (exampleGcsSourceBuilder_ == null) { 2117 source_ = builderForValue.build(); 2118 onChanged(); 2119 } else { 2120 exampleGcsSourceBuilder_.setMessage(builderForValue.build()); 2121 } 2122 sourceCase_ = 5; 2123 return this; 2124 } 2125 /** 2126 * 2127 * 2128 * <pre> 2129 * The Cloud Storage input instances. 2130 * </pre> 2131 * 2132 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5; 2133 * </code> 2134 */ mergeExampleGcsSource( com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource value)2135 public Builder mergeExampleGcsSource( 2136 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource value) { 2137 if (exampleGcsSourceBuilder_ == null) { 2138 if (sourceCase_ == 5 2139 && source_ 2140 != com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource 2141 .getDefaultInstance()) { 2142 source_ = 2143 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.newBuilder( 2144 (com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) source_) 2145 .mergeFrom(value) 2146 .buildPartial(); 2147 } else { 2148 source_ = value; 2149 } 2150 onChanged(); 2151 } else { 2152 if (sourceCase_ == 5) { 2153 exampleGcsSourceBuilder_.mergeFrom(value); 2154 } else { 2155 exampleGcsSourceBuilder_.setMessage(value); 2156 } 2157 } 2158 sourceCase_ = 5; 2159 return this; 2160 } 2161 /** 2162 * 2163 * 2164 * <pre> 2165 * The Cloud Storage input instances. 2166 * </pre> 2167 * 2168 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5; 2169 * </code> 2170 */ clearExampleGcsSource()2171 public Builder clearExampleGcsSource() { 2172 if (exampleGcsSourceBuilder_ == null) { 2173 if (sourceCase_ == 5) { 2174 sourceCase_ = 0; 2175 source_ = null; 2176 onChanged(); 2177 } 2178 } else { 2179 if (sourceCase_ == 5) { 2180 sourceCase_ = 0; 2181 source_ = null; 2182 } 2183 exampleGcsSourceBuilder_.clear(); 2184 } 2185 return this; 2186 } 2187 /** 2188 * 2189 * 2190 * <pre> 2191 * The Cloud Storage input instances. 2192 * </pre> 2193 * 2194 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5; 2195 * </code> 2196 */ 2197 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.Builder getExampleGcsSourceBuilder()2198 getExampleGcsSourceBuilder() { 2199 return getExampleGcsSourceFieldBuilder().getBuilder(); 2200 } 2201 /** 2202 * 2203 * 2204 * <pre> 2205 * The Cloud Storage input instances. 2206 * </pre> 2207 * 2208 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5; 2209 * </code> 2210 */ 2211 @java.lang.Override 2212 public com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSourceOrBuilder getExampleGcsSourceOrBuilder()2213 getExampleGcsSourceOrBuilder() { 2214 if ((sourceCase_ == 5) && (exampleGcsSourceBuilder_ != null)) { 2215 return exampleGcsSourceBuilder_.getMessageOrBuilder(); 2216 } else { 2217 if (sourceCase_ == 5) { 2218 return (com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) source_; 2219 } 2220 return com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.getDefaultInstance(); 2221 } 2222 } 2223 /** 2224 * 2225 * 2226 * <pre> 2227 * The Cloud Storage input instances. 2228 * </pre> 2229 * 2230 * <code>.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource example_gcs_source = 5; 2231 * </code> 2232 */ 2233 private com.google.protobuf.SingleFieldBuilderV3< 2234 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource, 2235 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.Builder, 2236 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSourceOrBuilder> getExampleGcsSourceFieldBuilder()2237 getExampleGcsSourceFieldBuilder() { 2238 if (exampleGcsSourceBuilder_ == null) { 2239 if (!(sourceCase_ == 5)) { 2240 source_ = 2241 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.getDefaultInstance(); 2242 } 2243 exampleGcsSourceBuilder_ = 2244 new com.google.protobuf.SingleFieldBuilderV3< 2245 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource, 2246 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.Builder, 2247 com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSourceOrBuilder>( 2248 (com.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) source_, 2249 getParentForChildren(), 2250 isClean()); 2251 source_ = null; 2252 } 2253 sourceCase_ = 5; 2254 onChanged(); 2255 return exampleGcsSourceBuilder_; 2256 } 2257 2258 private com.google.protobuf.SingleFieldBuilderV3< 2259 com.google.protobuf.Value, 2260 com.google.protobuf.Value.Builder, 2261 com.google.protobuf.ValueOrBuilder> 2262 nearestNeighborSearchConfigBuilder_; 2263 /** 2264 * 2265 * 2266 * <pre> 2267 * The full configuration for the generated index, the semantics are the 2268 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 2269 * should match 2270 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 2271 * </pre> 2272 * 2273 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 2274 * 2275 * @return Whether the nearestNeighborSearchConfig field is set. 2276 */ 2277 @java.lang.Override hasNearestNeighborSearchConfig()2278 public boolean hasNearestNeighborSearchConfig() { 2279 return configCase_ == 2; 2280 } 2281 /** 2282 * 2283 * 2284 * <pre> 2285 * The full configuration for the generated index, the semantics are the 2286 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 2287 * should match 2288 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 2289 * </pre> 2290 * 2291 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 2292 * 2293 * @return The nearestNeighborSearchConfig. 2294 */ 2295 @java.lang.Override getNearestNeighborSearchConfig()2296 public com.google.protobuf.Value getNearestNeighborSearchConfig() { 2297 if (nearestNeighborSearchConfigBuilder_ == null) { 2298 if (configCase_ == 2) { 2299 return (com.google.protobuf.Value) config_; 2300 } 2301 return com.google.protobuf.Value.getDefaultInstance(); 2302 } else { 2303 if (configCase_ == 2) { 2304 return nearestNeighborSearchConfigBuilder_.getMessage(); 2305 } 2306 return com.google.protobuf.Value.getDefaultInstance(); 2307 } 2308 } 2309 /** 2310 * 2311 * 2312 * <pre> 2313 * The full configuration for the generated index, the semantics are the 2314 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 2315 * should match 2316 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 2317 * </pre> 2318 * 2319 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 2320 */ setNearestNeighborSearchConfig(com.google.protobuf.Value value)2321 public Builder setNearestNeighborSearchConfig(com.google.protobuf.Value value) { 2322 if (nearestNeighborSearchConfigBuilder_ == null) { 2323 if (value == null) { 2324 throw new NullPointerException(); 2325 } 2326 config_ = value; 2327 onChanged(); 2328 } else { 2329 nearestNeighborSearchConfigBuilder_.setMessage(value); 2330 } 2331 configCase_ = 2; 2332 return this; 2333 } 2334 /** 2335 * 2336 * 2337 * <pre> 2338 * The full configuration for the generated index, the semantics are the 2339 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 2340 * should match 2341 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 2342 * </pre> 2343 * 2344 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 2345 */ setNearestNeighborSearchConfig( com.google.protobuf.Value.Builder builderForValue)2346 public Builder setNearestNeighborSearchConfig( 2347 com.google.protobuf.Value.Builder builderForValue) { 2348 if (nearestNeighborSearchConfigBuilder_ == null) { 2349 config_ = builderForValue.build(); 2350 onChanged(); 2351 } else { 2352 nearestNeighborSearchConfigBuilder_.setMessage(builderForValue.build()); 2353 } 2354 configCase_ = 2; 2355 return this; 2356 } 2357 /** 2358 * 2359 * 2360 * <pre> 2361 * The full configuration for the generated index, the semantics are the 2362 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 2363 * should match 2364 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 2365 * </pre> 2366 * 2367 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 2368 */ mergeNearestNeighborSearchConfig(com.google.protobuf.Value value)2369 public Builder mergeNearestNeighborSearchConfig(com.google.protobuf.Value value) { 2370 if (nearestNeighborSearchConfigBuilder_ == null) { 2371 if (configCase_ == 2 && config_ != com.google.protobuf.Value.getDefaultInstance()) { 2372 config_ = 2373 com.google.protobuf.Value.newBuilder((com.google.protobuf.Value) config_) 2374 .mergeFrom(value) 2375 .buildPartial(); 2376 } else { 2377 config_ = value; 2378 } 2379 onChanged(); 2380 } else { 2381 if (configCase_ == 2) { 2382 nearestNeighborSearchConfigBuilder_.mergeFrom(value); 2383 } else { 2384 nearestNeighborSearchConfigBuilder_.setMessage(value); 2385 } 2386 } 2387 configCase_ = 2; 2388 return this; 2389 } 2390 /** 2391 * 2392 * 2393 * <pre> 2394 * The full configuration for the generated index, the semantics are the 2395 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 2396 * should match 2397 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 2398 * </pre> 2399 * 2400 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 2401 */ clearNearestNeighborSearchConfig()2402 public Builder clearNearestNeighborSearchConfig() { 2403 if (nearestNeighborSearchConfigBuilder_ == null) { 2404 if (configCase_ == 2) { 2405 configCase_ = 0; 2406 config_ = null; 2407 onChanged(); 2408 } 2409 } else { 2410 if (configCase_ == 2) { 2411 configCase_ = 0; 2412 config_ = null; 2413 } 2414 nearestNeighborSearchConfigBuilder_.clear(); 2415 } 2416 return this; 2417 } 2418 /** 2419 * 2420 * 2421 * <pre> 2422 * The full configuration for the generated index, the semantics are the 2423 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 2424 * should match 2425 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 2426 * </pre> 2427 * 2428 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 2429 */ getNearestNeighborSearchConfigBuilder()2430 public com.google.protobuf.Value.Builder getNearestNeighborSearchConfigBuilder() { 2431 return getNearestNeighborSearchConfigFieldBuilder().getBuilder(); 2432 } 2433 /** 2434 * 2435 * 2436 * <pre> 2437 * The full configuration for the generated index, the semantics are the 2438 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 2439 * should match 2440 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 2441 * </pre> 2442 * 2443 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 2444 */ 2445 @java.lang.Override getNearestNeighborSearchConfigOrBuilder()2446 public com.google.protobuf.ValueOrBuilder getNearestNeighborSearchConfigOrBuilder() { 2447 if ((configCase_ == 2) && (nearestNeighborSearchConfigBuilder_ != null)) { 2448 return nearestNeighborSearchConfigBuilder_.getMessageOrBuilder(); 2449 } else { 2450 if (configCase_ == 2) { 2451 return (com.google.protobuf.Value) config_; 2452 } 2453 return com.google.protobuf.Value.getDefaultInstance(); 2454 } 2455 } 2456 /** 2457 * 2458 * 2459 * <pre> 2460 * The full configuration for the generated index, the semantics are the 2461 * same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and 2462 * should match 2463 * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). 2464 * </pre> 2465 * 2466 * <code>.google.protobuf.Value nearest_neighbor_search_config = 2;</code> 2467 */ 2468 private com.google.protobuf.SingleFieldBuilderV3< 2469 com.google.protobuf.Value, 2470 com.google.protobuf.Value.Builder, 2471 com.google.protobuf.ValueOrBuilder> getNearestNeighborSearchConfigFieldBuilder()2472 getNearestNeighborSearchConfigFieldBuilder() { 2473 if (nearestNeighborSearchConfigBuilder_ == null) { 2474 if (!(configCase_ == 2)) { 2475 config_ = com.google.protobuf.Value.getDefaultInstance(); 2476 } 2477 nearestNeighborSearchConfigBuilder_ = 2478 new com.google.protobuf.SingleFieldBuilderV3< 2479 com.google.protobuf.Value, 2480 com.google.protobuf.Value.Builder, 2481 com.google.protobuf.ValueOrBuilder>( 2482 (com.google.protobuf.Value) config_, getParentForChildren(), isClean()); 2483 config_ = null; 2484 } 2485 configCase_ = 2; 2486 onChanged(); 2487 return nearestNeighborSearchConfigBuilder_; 2488 } 2489 2490 private com.google.protobuf.SingleFieldBuilderV3< 2491 com.google.cloud.aiplatform.v1beta1.Presets, 2492 com.google.cloud.aiplatform.v1beta1.Presets.Builder, 2493 com.google.cloud.aiplatform.v1beta1.PresetsOrBuilder> 2494 presetsBuilder_; 2495 /** 2496 * 2497 * 2498 * <pre> 2499 * Simplified preset configuration, which automatically sets configuration 2500 * values based on the desired query speed-precision trade-off and modality. 2501 * </pre> 2502 * 2503 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 2504 * 2505 * @return Whether the presets field is set. 2506 */ 2507 @java.lang.Override hasPresets()2508 public boolean hasPresets() { 2509 return configCase_ == 4; 2510 } 2511 /** 2512 * 2513 * 2514 * <pre> 2515 * Simplified preset configuration, which automatically sets configuration 2516 * values based on the desired query speed-precision trade-off and modality. 2517 * </pre> 2518 * 2519 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 2520 * 2521 * @return The presets. 2522 */ 2523 @java.lang.Override getPresets()2524 public com.google.cloud.aiplatform.v1beta1.Presets getPresets() { 2525 if (presetsBuilder_ == null) { 2526 if (configCase_ == 4) { 2527 return (com.google.cloud.aiplatform.v1beta1.Presets) config_; 2528 } 2529 return com.google.cloud.aiplatform.v1beta1.Presets.getDefaultInstance(); 2530 } else { 2531 if (configCase_ == 4) { 2532 return presetsBuilder_.getMessage(); 2533 } 2534 return com.google.cloud.aiplatform.v1beta1.Presets.getDefaultInstance(); 2535 } 2536 } 2537 /** 2538 * 2539 * 2540 * <pre> 2541 * Simplified preset configuration, which automatically sets configuration 2542 * values based on the desired query speed-precision trade-off and modality. 2543 * </pre> 2544 * 2545 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 2546 */ setPresets(com.google.cloud.aiplatform.v1beta1.Presets value)2547 public Builder setPresets(com.google.cloud.aiplatform.v1beta1.Presets value) { 2548 if (presetsBuilder_ == null) { 2549 if (value == null) { 2550 throw new NullPointerException(); 2551 } 2552 config_ = value; 2553 onChanged(); 2554 } else { 2555 presetsBuilder_.setMessage(value); 2556 } 2557 configCase_ = 4; 2558 return this; 2559 } 2560 /** 2561 * 2562 * 2563 * <pre> 2564 * Simplified preset configuration, which automatically sets configuration 2565 * values based on the desired query speed-precision trade-off and modality. 2566 * </pre> 2567 * 2568 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 2569 */ setPresets(com.google.cloud.aiplatform.v1beta1.Presets.Builder builderForValue)2570 public Builder setPresets(com.google.cloud.aiplatform.v1beta1.Presets.Builder builderForValue) { 2571 if (presetsBuilder_ == null) { 2572 config_ = builderForValue.build(); 2573 onChanged(); 2574 } else { 2575 presetsBuilder_.setMessage(builderForValue.build()); 2576 } 2577 configCase_ = 4; 2578 return this; 2579 } 2580 /** 2581 * 2582 * 2583 * <pre> 2584 * Simplified preset configuration, which automatically sets configuration 2585 * values based on the desired query speed-precision trade-off and modality. 2586 * </pre> 2587 * 2588 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 2589 */ mergePresets(com.google.cloud.aiplatform.v1beta1.Presets value)2590 public Builder mergePresets(com.google.cloud.aiplatform.v1beta1.Presets value) { 2591 if (presetsBuilder_ == null) { 2592 if (configCase_ == 4 2593 && config_ != com.google.cloud.aiplatform.v1beta1.Presets.getDefaultInstance()) { 2594 config_ = 2595 com.google.cloud.aiplatform.v1beta1.Presets.newBuilder( 2596 (com.google.cloud.aiplatform.v1beta1.Presets) config_) 2597 .mergeFrom(value) 2598 .buildPartial(); 2599 } else { 2600 config_ = value; 2601 } 2602 onChanged(); 2603 } else { 2604 if (configCase_ == 4) { 2605 presetsBuilder_.mergeFrom(value); 2606 } else { 2607 presetsBuilder_.setMessage(value); 2608 } 2609 } 2610 configCase_ = 4; 2611 return this; 2612 } 2613 /** 2614 * 2615 * 2616 * <pre> 2617 * Simplified preset configuration, which automatically sets configuration 2618 * values based on the desired query speed-precision trade-off and modality. 2619 * </pre> 2620 * 2621 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 2622 */ clearPresets()2623 public Builder clearPresets() { 2624 if (presetsBuilder_ == null) { 2625 if (configCase_ == 4) { 2626 configCase_ = 0; 2627 config_ = null; 2628 onChanged(); 2629 } 2630 } else { 2631 if (configCase_ == 4) { 2632 configCase_ = 0; 2633 config_ = null; 2634 } 2635 presetsBuilder_.clear(); 2636 } 2637 return this; 2638 } 2639 /** 2640 * 2641 * 2642 * <pre> 2643 * Simplified preset configuration, which automatically sets configuration 2644 * values based on the desired query speed-precision trade-off and modality. 2645 * </pre> 2646 * 2647 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 2648 */ getPresetsBuilder()2649 public com.google.cloud.aiplatform.v1beta1.Presets.Builder getPresetsBuilder() { 2650 return getPresetsFieldBuilder().getBuilder(); 2651 } 2652 /** 2653 * 2654 * 2655 * <pre> 2656 * Simplified preset configuration, which automatically sets configuration 2657 * values based on the desired query speed-precision trade-off and modality. 2658 * </pre> 2659 * 2660 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 2661 */ 2662 @java.lang.Override getPresetsOrBuilder()2663 public com.google.cloud.aiplatform.v1beta1.PresetsOrBuilder getPresetsOrBuilder() { 2664 if ((configCase_ == 4) && (presetsBuilder_ != null)) { 2665 return presetsBuilder_.getMessageOrBuilder(); 2666 } else { 2667 if (configCase_ == 4) { 2668 return (com.google.cloud.aiplatform.v1beta1.Presets) config_; 2669 } 2670 return com.google.cloud.aiplatform.v1beta1.Presets.getDefaultInstance(); 2671 } 2672 } 2673 /** 2674 * 2675 * 2676 * <pre> 2677 * Simplified preset configuration, which automatically sets configuration 2678 * values based on the desired query speed-precision trade-off and modality. 2679 * </pre> 2680 * 2681 * <code>.google.cloud.aiplatform.v1beta1.Presets presets = 4;</code> 2682 */ 2683 private com.google.protobuf.SingleFieldBuilderV3< 2684 com.google.cloud.aiplatform.v1beta1.Presets, 2685 com.google.cloud.aiplatform.v1beta1.Presets.Builder, 2686 com.google.cloud.aiplatform.v1beta1.PresetsOrBuilder> getPresetsFieldBuilder()2687 getPresetsFieldBuilder() { 2688 if (presetsBuilder_ == null) { 2689 if (!(configCase_ == 4)) { 2690 config_ = com.google.cloud.aiplatform.v1beta1.Presets.getDefaultInstance(); 2691 } 2692 presetsBuilder_ = 2693 new com.google.protobuf.SingleFieldBuilderV3< 2694 com.google.cloud.aiplatform.v1beta1.Presets, 2695 com.google.cloud.aiplatform.v1beta1.Presets.Builder, 2696 com.google.cloud.aiplatform.v1beta1.PresetsOrBuilder>( 2697 (com.google.cloud.aiplatform.v1beta1.Presets) config_, 2698 getParentForChildren(), 2699 isClean()); 2700 config_ = null; 2701 } 2702 configCase_ = 4; 2703 onChanged(); 2704 return presetsBuilder_; 2705 } 2706 2707 private com.google.cloud.aiplatform.v1beta1.GcsSource gcsSource_; 2708 private com.google.protobuf.SingleFieldBuilderV3< 2709 com.google.cloud.aiplatform.v1beta1.GcsSource, 2710 com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, 2711 com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder> 2712 gcsSourceBuilder_; 2713 /** 2714 * 2715 * 2716 * <pre> 2717 * The Cloud Storage locations that contain the instances to be 2718 * indexed for approximate nearest neighbor search. 2719 * </pre> 2720 * 2721 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 2722 * 2723 * @return Whether the gcsSource field is set. 2724 */ hasGcsSource()2725 public boolean hasGcsSource() { 2726 return ((bitField0_ & 0x00000008) != 0); 2727 } 2728 /** 2729 * 2730 * 2731 * <pre> 2732 * The Cloud Storage locations that contain the instances to be 2733 * indexed for approximate nearest neighbor search. 2734 * </pre> 2735 * 2736 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 2737 * 2738 * @return The gcsSource. 2739 */ getGcsSource()2740 public com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource() { 2741 if (gcsSourceBuilder_ == null) { 2742 return gcsSource_ == null 2743 ? com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance() 2744 : gcsSource_; 2745 } else { 2746 return gcsSourceBuilder_.getMessage(); 2747 } 2748 } 2749 /** 2750 * 2751 * 2752 * <pre> 2753 * The Cloud Storage locations that contain the instances to be 2754 * indexed for approximate nearest neighbor search. 2755 * </pre> 2756 * 2757 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 2758 */ setGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value)2759 public Builder setGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value) { 2760 if (gcsSourceBuilder_ == null) { 2761 if (value == null) { 2762 throw new NullPointerException(); 2763 } 2764 gcsSource_ = value; 2765 } else { 2766 gcsSourceBuilder_.setMessage(value); 2767 } 2768 bitField0_ |= 0x00000008; 2769 onChanged(); 2770 return this; 2771 } 2772 /** 2773 * 2774 * 2775 * <pre> 2776 * The Cloud Storage locations that contain the instances to be 2777 * indexed for approximate nearest neighbor search. 2778 * </pre> 2779 * 2780 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 2781 */ setGcsSource( com.google.cloud.aiplatform.v1beta1.GcsSource.Builder builderForValue)2782 public Builder setGcsSource( 2783 com.google.cloud.aiplatform.v1beta1.GcsSource.Builder builderForValue) { 2784 if (gcsSourceBuilder_ == null) { 2785 gcsSource_ = builderForValue.build(); 2786 } else { 2787 gcsSourceBuilder_.setMessage(builderForValue.build()); 2788 } 2789 bitField0_ |= 0x00000008; 2790 onChanged(); 2791 return this; 2792 } 2793 /** 2794 * 2795 * 2796 * <pre> 2797 * The Cloud Storage locations that contain the instances to be 2798 * indexed for approximate nearest neighbor search. 2799 * </pre> 2800 * 2801 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 2802 */ mergeGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value)2803 public Builder mergeGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value) { 2804 if (gcsSourceBuilder_ == null) { 2805 if (((bitField0_ & 0x00000008) != 0) 2806 && gcsSource_ != null 2807 && gcsSource_ != com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance()) { 2808 getGcsSourceBuilder().mergeFrom(value); 2809 } else { 2810 gcsSource_ = value; 2811 } 2812 } else { 2813 gcsSourceBuilder_.mergeFrom(value); 2814 } 2815 bitField0_ |= 0x00000008; 2816 onChanged(); 2817 return this; 2818 } 2819 /** 2820 * 2821 * 2822 * <pre> 2823 * The Cloud Storage locations that contain the instances to be 2824 * indexed for approximate nearest neighbor search. 2825 * </pre> 2826 * 2827 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 2828 */ clearGcsSource()2829 public Builder clearGcsSource() { 2830 bitField0_ = (bitField0_ & ~0x00000008); 2831 gcsSource_ = null; 2832 if (gcsSourceBuilder_ != null) { 2833 gcsSourceBuilder_.dispose(); 2834 gcsSourceBuilder_ = null; 2835 } 2836 onChanged(); 2837 return this; 2838 } 2839 /** 2840 * 2841 * 2842 * <pre> 2843 * The Cloud Storage locations that contain the instances to be 2844 * indexed for approximate nearest neighbor search. 2845 * </pre> 2846 * 2847 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 2848 */ getGcsSourceBuilder()2849 public com.google.cloud.aiplatform.v1beta1.GcsSource.Builder getGcsSourceBuilder() { 2850 bitField0_ |= 0x00000008; 2851 onChanged(); 2852 return getGcsSourceFieldBuilder().getBuilder(); 2853 } 2854 /** 2855 * 2856 * 2857 * <pre> 2858 * The Cloud Storage locations that contain the instances to be 2859 * indexed for approximate nearest neighbor search. 2860 * </pre> 2861 * 2862 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 2863 */ getGcsSourceOrBuilder()2864 public com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { 2865 if (gcsSourceBuilder_ != null) { 2866 return gcsSourceBuilder_.getMessageOrBuilder(); 2867 } else { 2868 return gcsSource_ == null 2869 ? com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance() 2870 : gcsSource_; 2871 } 2872 } 2873 /** 2874 * 2875 * 2876 * <pre> 2877 * The Cloud Storage locations that contain the instances to be 2878 * indexed for approximate nearest neighbor search. 2879 * </pre> 2880 * 2881 * <code>.google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 1;</code> 2882 */ 2883 private com.google.protobuf.SingleFieldBuilderV3< 2884 com.google.cloud.aiplatform.v1beta1.GcsSource, 2885 com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, 2886 com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder> getGcsSourceFieldBuilder()2887 getGcsSourceFieldBuilder() { 2888 if (gcsSourceBuilder_ == null) { 2889 gcsSourceBuilder_ = 2890 new com.google.protobuf.SingleFieldBuilderV3< 2891 com.google.cloud.aiplatform.v1beta1.GcsSource, 2892 com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, 2893 com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder>( 2894 getGcsSource(), getParentForChildren(), isClean()); 2895 gcsSource_ = null; 2896 } 2897 return gcsSourceBuilder_; 2898 } 2899 2900 private int neighborCount_; 2901 /** 2902 * 2903 * 2904 * <pre> 2905 * The number of neighbors to return when querying for examples. 2906 * </pre> 2907 * 2908 * <code>int32 neighbor_count = 3;</code> 2909 * 2910 * @return The neighborCount. 2911 */ 2912 @java.lang.Override getNeighborCount()2913 public int getNeighborCount() { 2914 return neighborCount_; 2915 } 2916 /** 2917 * 2918 * 2919 * <pre> 2920 * The number of neighbors to return when querying for examples. 2921 * </pre> 2922 * 2923 * <code>int32 neighbor_count = 3;</code> 2924 * 2925 * @param value The neighborCount to set. 2926 * @return This builder for chaining. 2927 */ setNeighborCount(int value)2928 public Builder setNeighborCount(int value) { 2929 2930 neighborCount_ = value; 2931 bitField0_ |= 0x00000010; 2932 onChanged(); 2933 return this; 2934 } 2935 /** 2936 * 2937 * 2938 * <pre> 2939 * The number of neighbors to return when querying for examples. 2940 * </pre> 2941 * 2942 * <code>int32 neighbor_count = 3;</code> 2943 * 2944 * @return This builder for chaining. 2945 */ clearNeighborCount()2946 public Builder clearNeighborCount() { 2947 bitField0_ = (bitField0_ & ~0x00000010); 2948 neighborCount_ = 0; 2949 onChanged(); 2950 return this; 2951 } 2952 2953 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2954 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2955 return super.setUnknownFields(unknownFields); 2956 } 2957 2958 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2959 public final Builder mergeUnknownFields( 2960 final com.google.protobuf.UnknownFieldSet unknownFields) { 2961 return super.mergeUnknownFields(unknownFields); 2962 } 2963 2964 // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.Examples) 2965 } 2966 2967 // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.Examples) 2968 private static final com.google.cloud.aiplatform.v1beta1.Examples DEFAULT_INSTANCE; 2969 2970 static { 2971 DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.Examples(); 2972 } 2973 getDefaultInstance()2974 public static com.google.cloud.aiplatform.v1beta1.Examples getDefaultInstance() { 2975 return DEFAULT_INSTANCE; 2976 } 2977 2978 private static final com.google.protobuf.Parser<Examples> PARSER = 2979 new com.google.protobuf.AbstractParser<Examples>() { 2980 @java.lang.Override 2981 public Examples parsePartialFrom( 2982 com.google.protobuf.CodedInputStream input, 2983 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2984 throws com.google.protobuf.InvalidProtocolBufferException { 2985 Builder builder = newBuilder(); 2986 try { 2987 builder.mergeFrom(input, extensionRegistry); 2988 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2989 throw e.setUnfinishedMessage(builder.buildPartial()); 2990 } catch (com.google.protobuf.UninitializedMessageException e) { 2991 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2992 } catch (java.io.IOException e) { 2993 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2994 .setUnfinishedMessage(builder.buildPartial()); 2995 } 2996 return builder.buildPartial(); 2997 } 2998 }; 2999 parser()3000 public static com.google.protobuf.Parser<Examples> parser() { 3001 return PARSER; 3002 } 3003 3004 @java.lang.Override getParserForType()3005 public com.google.protobuf.Parser<Examples> getParserForType() { 3006 return PARSER; 3007 } 3008 3009 @java.lang.Override getDefaultInstanceForType()3010 public com.google.cloud.aiplatform.v1beta1.Examples getDefaultInstanceForType() { 3011 return DEFAULT_INSTANCE; 3012 } 3013 } 3014