1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/aiplatform/v1/annotation.proto 18 19 package com.google.cloud.aiplatform.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Used to assign specific AnnotationSpec to a particular area of a DataItem or 26 * the whole part of the DataItem. 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.aiplatform.v1.Annotation} 30 */ 31 public final class Annotation extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Annotation) 34 AnnotationOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use Annotation.newBuilder() to construct. Annotation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private Annotation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 Annotation()41 private Annotation() { 42 name_ = ""; 43 payloadSchemaUri_ = ""; 44 etag_ = ""; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new Annotation(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.cloud.aiplatform.v1.AnnotationProto 60 .internal_static_google_cloud_aiplatform_v1_Annotation_descriptor; 61 } 62 63 @SuppressWarnings({"rawtypes"}) 64 @java.lang.Override internalGetMapField(int number)65 protected com.google.protobuf.MapField internalGetMapField(int number) { 66 switch (number) { 67 case 6: 68 return internalGetLabels(); 69 default: 70 throw new RuntimeException("Invalid map field number: " + number); 71 } 72 } 73 74 @java.lang.Override 75 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()76 internalGetFieldAccessorTable() { 77 return com.google.cloud.aiplatform.v1.AnnotationProto 78 .internal_static_google_cloud_aiplatform_v1_Annotation_fieldAccessorTable 79 .ensureFieldAccessorsInitialized( 80 com.google.cloud.aiplatform.v1.Annotation.class, 81 com.google.cloud.aiplatform.v1.Annotation.Builder.class); 82 } 83 84 public static final int NAME_FIELD_NUMBER = 1; 85 86 @SuppressWarnings("serial") 87 private volatile java.lang.Object name_ = ""; 88 /** 89 * 90 * 91 * <pre> 92 * Output only. Resource name of the Annotation. 93 * </pre> 94 * 95 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 96 * 97 * @return The name. 98 */ 99 @java.lang.Override getName()100 public java.lang.String getName() { 101 java.lang.Object ref = name_; 102 if (ref instanceof java.lang.String) { 103 return (java.lang.String) ref; 104 } else { 105 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 106 java.lang.String s = bs.toStringUtf8(); 107 name_ = s; 108 return s; 109 } 110 } 111 /** 112 * 113 * 114 * <pre> 115 * Output only. Resource name of the Annotation. 116 * </pre> 117 * 118 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 119 * 120 * @return The bytes for name. 121 */ 122 @java.lang.Override getNameBytes()123 public com.google.protobuf.ByteString getNameBytes() { 124 java.lang.Object ref = name_; 125 if (ref instanceof java.lang.String) { 126 com.google.protobuf.ByteString b = 127 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 128 name_ = b; 129 return b; 130 } else { 131 return (com.google.protobuf.ByteString) ref; 132 } 133 } 134 135 public static final int PAYLOAD_SCHEMA_URI_FIELD_NUMBER = 2; 136 137 @SuppressWarnings("serial") 138 private volatile java.lang.Object payloadSchemaUri_ = ""; 139 /** 140 * 141 * 142 * <pre> 143 * Required. Google Cloud Storage URI points to a YAML file describing 144 * [payload][google.cloud.aiplatform.v1.Annotation.payload]. The schema is 145 * defined as an [OpenAPI 3.0.2 Schema 146 * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 147 * The schema files that can be used here are found in 148 * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the 149 * chosen schema must be consistent with the parent Dataset's 150 * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]. 151 * </pre> 152 * 153 * <code>string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code> 154 * 155 * @return The payloadSchemaUri. 156 */ 157 @java.lang.Override getPayloadSchemaUri()158 public java.lang.String getPayloadSchemaUri() { 159 java.lang.Object ref = payloadSchemaUri_; 160 if (ref instanceof java.lang.String) { 161 return (java.lang.String) ref; 162 } else { 163 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 164 java.lang.String s = bs.toStringUtf8(); 165 payloadSchemaUri_ = s; 166 return s; 167 } 168 } 169 /** 170 * 171 * 172 * <pre> 173 * Required. Google Cloud Storage URI points to a YAML file describing 174 * [payload][google.cloud.aiplatform.v1.Annotation.payload]. The schema is 175 * defined as an [OpenAPI 3.0.2 Schema 176 * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 177 * The schema files that can be used here are found in 178 * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the 179 * chosen schema must be consistent with the parent Dataset's 180 * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]. 181 * </pre> 182 * 183 * <code>string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code> 184 * 185 * @return The bytes for payloadSchemaUri. 186 */ 187 @java.lang.Override getPayloadSchemaUriBytes()188 public com.google.protobuf.ByteString getPayloadSchemaUriBytes() { 189 java.lang.Object ref = payloadSchemaUri_; 190 if (ref instanceof java.lang.String) { 191 com.google.protobuf.ByteString b = 192 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 193 payloadSchemaUri_ = b; 194 return b; 195 } else { 196 return (com.google.protobuf.ByteString) ref; 197 } 198 } 199 200 public static final int PAYLOAD_FIELD_NUMBER = 3; 201 private com.google.protobuf.Value payload_; 202 /** 203 * 204 * 205 * <pre> 206 * Required. The schema of the payload can be found in 207 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 208 * </pre> 209 * 210 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 211 * 212 * @return Whether the payload field is set. 213 */ 214 @java.lang.Override hasPayload()215 public boolean hasPayload() { 216 return payload_ != null; 217 } 218 /** 219 * 220 * 221 * <pre> 222 * Required. The schema of the payload can be found in 223 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 224 * </pre> 225 * 226 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 227 * 228 * @return The payload. 229 */ 230 @java.lang.Override getPayload()231 public com.google.protobuf.Value getPayload() { 232 return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; 233 } 234 /** 235 * 236 * 237 * <pre> 238 * Required. The schema of the payload can be found in 239 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 240 * </pre> 241 * 242 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 243 */ 244 @java.lang.Override getPayloadOrBuilder()245 public com.google.protobuf.ValueOrBuilder getPayloadOrBuilder() { 246 return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; 247 } 248 249 public static final int CREATE_TIME_FIELD_NUMBER = 4; 250 private com.google.protobuf.Timestamp createTime_; 251 /** 252 * 253 * 254 * <pre> 255 * Output only. Timestamp when this Annotation was created. 256 * </pre> 257 * 258 * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 259 * </code> 260 * 261 * @return Whether the createTime field is set. 262 */ 263 @java.lang.Override hasCreateTime()264 public boolean hasCreateTime() { 265 return createTime_ != null; 266 } 267 /** 268 * 269 * 270 * <pre> 271 * Output only. Timestamp when this Annotation was created. 272 * </pre> 273 * 274 * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 275 * </code> 276 * 277 * @return The createTime. 278 */ 279 @java.lang.Override getCreateTime()280 public com.google.protobuf.Timestamp getCreateTime() { 281 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 282 } 283 /** 284 * 285 * 286 * <pre> 287 * Output only. Timestamp when this Annotation was created. 288 * </pre> 289 * 290 * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 291 * </code> 292 */ 293 @java.lang.Override getCreateTimeOrBuilder()294 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 295 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 296 } 297 298 public static final int UPDATE_TIME_FIELD_NUMBER = 7; 299 private com.google.protobuf.Timestamp updateTime_; 300 /** 301 * 302 * 303 * <pre> 304 * Output only. Timestamp when this Annotation was last updated. 305 * </pre> 306 * 307 * <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 308 * </code> 309 * 310 * @return Whether the updateTime field is set. 311 */ 312 @java.lang.Override hasUpdateTime()313 public boolean hasUpdateTime() { 314 return updateTime_ != null; 315 } 316 /** 317 * 318 * 319 * <pre> 320 * Output only. Timestamp when this Annotation was last updated. 321 * </pre> 322 * 323 * <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 324 * </code> 325 * 326 * @return The updateTime. 327 */ 328 @java.lang.Override getUpdateTime()329 public com.google.protobuf.Timestamp getUpdateTime() { 330 return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; 331 } 332 /** 333 * 334 * 335 * <pre> 336 * Output only. Timestamp when this Annotation was last updated. 337 * </pre> 338 * 339 * <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 340 * </code> 341 */ 342 @java.lang.Override getUpdateTimeOrBuilder()343 public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { 344 return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; 345 } 346 347 public static final int ETAG_FIELD_NUMBER = 8; 348 349 @SuppressWarnings("serial") 350 private volatile java.lang.Object etag_ = ""; 351 /** 352 * 353 * 354 * <pre> 355 * Optional. Used to perform consistent read-modify-write updates. If not set, 356 * a blind "overwrite" update happens. 357 * </pre> 358 * 359 * <code>string etag = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 360 * 361 * @return The etag. 362 */ 363 @java.lang.Override getEtag()364 public java.lang.String getEtag() { 365 java.lang.Object ref = etag_; 366 if (ref instanceof java.lang.String) { 367 return (java.lang.String) ref; 368 } else { 369 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 370 java.lang.String s = bs.toStringUtf8(); 371 etag_ = s; 372 return s; 373 } 374 } 375 /** 376 * 377 * 378 * <pre> 379 * Optional. Used to perform consistent read-modify-write updates. If not set, 380 * a blind "overwrite" update happens. 381 * </pre> 382 * 383 * <code>string etag = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 384 * 385 * @return The bytes for etag. 386 */ 387 @java.lang.Override getEtagBytes()388 public com.google.protobuf.ByteString getEtagBytes() { 389 java.lang.Object ref = etag_; 390 if (ref instanceof java.lang.String) { 391 com.google.protobuf.ByteString b = 392 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 393 etag_ = b; 394 return b; 395 } else { 396 return (com.google.protobuf.ByteString) ref; 397 } 398 } 399 400 public static final int ANNOTATION_SOURCE_FIELD_NUMBER = 5; 401 private com.google.cloud.aiplatform.v1.UserActionReference annotationSource_; 402 /** 403 * 404 * 405 * <pre> 406 * Output only. The source of the Annotation. 407 * </pre> 408 * 409 * <code> 410 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 411 * </code> 412 * 413 * @return Whether the annotationSource field is set. 414 */ 415 @java.lang.Override hasAnnotationSource()416 public boolean hasAnnotationSource() { 417 return annotationSource_ != null; 418 } 419 /** 420 * 421 * 422 * <pre> 423 * Output only. The source of the Annotation. 424 * </pre> 425 * 426 * <code> 427 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 428 * </code> 429 * 430 * @return The annotationSource. 431 */ 432 @java.lang.Override getAnnotationSource()433 public com.google.cloud.aiplatform.v1.UserActionReference getAnnotationSource() { 434 return annotationSource_ == null 435 ? com.google.cloud.aiplatform.v1.UserActionReference.getDefaultInstance() 436 : annotationSource_; 437 } 438 /** 439 * 440 * 441 * <pre> 442 * Output only. The source of the Annotation. 443 * </pre> 444 * 445 * <code> 446 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 447 * </code> 448 */ 449 @java.lang.Override 450 public com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder getAnnotationSourceOrBuilder()451 getAnnotationSourceOrBuilder() { 452 return annotationSource_ == null 453 ? com.google.cloud.aiplatform.v1.UserActionReference.getDefaultInstance() 454 : annotationSource_; 455 } 456 457 public static final int LABELS_FIELD_NUMBER = 6; 458 459 private static final class LabelsDefaultEntryHolder { 460 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 461 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 462 com.google.cloud.aiplatform.v1.AnnotationProto 463 .internal_static_google_cloud_aiplatform_v1_Annotation_LabelsEntry_descriptor, 464 com.google.protobuf.WireFormat.FieldType.STRING, 465 "", 466 com.google.protobuf.WireFormat.FieldType.STRING, 467 ""); 468 } 469 470 @SuppressWarnings("serial") 471 private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_; 472 internalGetLabels()473 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() { 474 if (labels_ == null) { 475 return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); 476 } 477 return labels_; 478 } 479 getLabelsCount()480 public int getLabelsCount() { 481 return internalGetLabels().getMap().size(); 482 } 483 /** 484 * 485 * 486 * <pre> 487 * Optional. The labels with user-defined metadata to organize your 488 * Annotations. 489 * Label keys and values can be no longer than 64 characters 490 * (Unicode codepoints), can only contain lowercase letters, numeric 491 * characters, underscores and dashes. International characters are allowed. 492 * No more than 64 user labels can be associated with one Annotation(System 493 * labels are excluded). 494 * See https://goo.gl/xmQnxf for more information and examples of labels. 495 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 496 * and are immutable. Following system labels exist for each Annotation: 497 * * "aiplatform.googleapis.com/annotation_set_name": 498 * optional, name of the UI's annotation set this Annotation belongs to. 499 * If not set, the Annotation is not visible in the UI. 500 * * "aiplatform.googleapis.com/payload_schema": 501 * output only, its value is the 502 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 503 * title. 504 * </pre> 505 * 506 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 507 */ 508 @java.lang.Override containsLabels(java.lang.String key)509 public boolean containsLabels(java.lang.String key) { 510 if (key == null) { 511 throw new NullPointerException("map key"); 512 } 513 return internalGetLabels().getMap().containsKey(key); 514 } 515 /** Use {@link #getLabelsMap()} instead. */ 516 @java.lang.Override 517 @java.lang.Deprecated getLabels()518 public java.util.Map<java.lang.String, java.lang.String> getLabels() { 519 return getLabelsMap(); 520 } 521 /** 522 * 523 * 524 * <pre> 525 * Optional. The labels with user-defined metadata to organize your 526 * Annotations. 527 * Label keys and values can be no longer than 64 characters 528 * (Unicode codepoints), can only contain lowercase letters, numeric 529 * characters, underscores and dashes. International characters are allowed. 530 * No more than 64 user labels can be associated with one Annotation(System 531 * labels are excluded). 532 * See https://goo.gl/xmQnxf for more information and examples of labels. 533 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 534 * and are immutable. Following system labels exist for each Annotation: 535 * * "aiplatform.googleapis.com/annotation_set_name": 536 * optional, name of the UI's annotation set this Annotation belongs to. 537 * If not set, the Annotation is not visible in the UI. 538 * * "aiplatform.googleapis.com/payload_schema": 539 * output only, its value is the 540 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 541 * title. 542 * </pre> 543 * 544 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 545 */ 546 @java.lang.Override getLabelsMap()547 public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { 548 return internalGetLabels().getMap(); 549 } 550 /** 551 * 552 * 553 * <pre> 554 * Optional. The labels with user-defined metadata to organize your 555 * Annotations. 556 * Label keys and values can be no longer than 64 characters 557 * (Unicode codepoints), can only contain lowercase letters, numeric 558 * characters, underscores and dashes. International characters are allowed. 559 * No more than 64 user labels can be associated with one Annotation(System 560 * labels are excluded). 561 * See https://goo.gl/xmQnxf for more information and examples of labels. 562 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 563 * and are immutable. Following system labels exist for each Annotation: 564 * * "aiplatform.googleapis.com/annotation_set_name": 565 * optional, name of the UI's annotation set this Annotation belongs to. 566 * If not set, the Annotation is not visible in the UI. 567 * * "aiplatform.googleapis.com/payload_schema": 568 * output only, its value is the 569 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 570 * title. 571 * </pre> 572 * 573 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 574 */ 575 @java.lang.Override getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)576 public /* nullable */ java.lang.String getLabelsOrDefault( 577 java.lang.String key, 578 /* nullable */ 579 java.lang.String defaultValue) { 580 if (key == null) { 581 throw new NullPointerException("map key"); 582 } 583 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 584 return map.containsKey(key) ? map.get(key) : defaultValue; 585 } 586 /** 587 * 588 * 589 * <pre> 590 * Optional. The labels with user-defined metadata to organize your 591 * Annotations. 592 * Label keys and values can be no longer than 64 characters 593 * (Unicode codepoints), can only contain lowercase letters, numeric 594 * characters, underscores and dashes. International characters are allowed. 595 * No more than 64 user labels can be associated with one Annotation(System 596 * labels are excluded). 597 * See https://goo.gl/xmQnxf for more information and examples of labels. 598 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 599 * and are immutable. Following system labels exist for each Annotation: 600 * * "aiplatform.googleapis.com/annotation_set_name": 601 * optional, name of the UI's annotation set this Annotation belongs to. 602 * If not set, the Annotation is not visible in the UI. 603 * * "aiplatform.googleapis.com/payload_schema": 604 * output only, its value is the 605 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 606 * title. 607 * </pre> 608 * 609 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 610 */ 611 @java.lang.Override getLabelsOrThrow(java.lang.String key)612 public java.lang.String getLabelsOrThrow(java.lang.String key) { 613 if (key == null) { 614 throw new NullPointerException("map key"); 615 } 616 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 617 if (!map.containsKey(key)) { 618 throw new java.lang.IllegalArgumentException(); 619 } 620 return map.get(key); 621 } 622 623 private byte memoizedIsInitialized = -1; 624 625 @java.lang.Override isInitialized()626 public final boolean isInitialized() { 627 byte isInitialized = memoizedIsInitialized; 628 if (isInitialized == 1) return true; 629 if (isInitialized == 0) return false; 630 631 memoizedIsInitialized = 1; 632 return true; 633 } 634 635 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)636 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 637 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 638 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 639 } 640 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadSchemaUri_)) { 641 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, payloadSchemaUri_); 642 } 643 if (payload_ != null) { 644 output.writeMessage(3, getPayload()); 645 } 646 if (createTime_ != null) { 647 output.writeMessage(4, getCreateTime()); 648 } 649 if (annotationSource_ != null) { 650 output.writeMessage(5, getAnnotationSource()); 651 } 652 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 653 output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); 654 if (updateTime_ != null) { 655 output.writeMessage(7, getUpdateTime()); 656 } 657 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { 658 com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); 659 } 660 getUnknownFields().writeTo(output); 661 } 662 663 @java.lang.Override getSerializedSize()664 public int getSerializedSize() { 665 int size = memoizedSize; 666 if (size != -1) return size; 667 668 size = 0; 669 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 670 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 671 } 672 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadSchemaUri_)) { 673 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, payloadSchemaUri_); 674 } 675 if (payload_ != null) { 676 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPayload()); 677 } 678 if (createTime_ != null) { 679 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); 680 } 681 if (annotationSource_ != null) { 682 size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAnnotationSource()); 683 } 684 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 685 internalGetLabels().getMap().entrySet()) { 686 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = 687 LabelsDefaultEntryHolder.defaultEntry 688 .newBuilderForType() 689 .setKey(entry.getKey()) 690 .setValue(entry.getValue()) 691 .build(); 692 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__); 693 } 694 if (updateTime_ != null) { 695 size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); 696 } 697 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { 698 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); 699 } 700 size += getUnknownFields().getSerializedSize(); 701 memoizedSize = size; 702 return size; 703 } 704 705 @java.lang.Override equals(final java.lang.Object obj)706 public boolean equals(final java.lang.Object obj) { 707 if (obj == this) { 708 return true; 709 } 710 if (!(obj instanceof com.google.cloud.aiplatform.v1.Annotation)) { 711 return super.equals(obj); 712 } 713 com.google.cloud.aiplatform.v1.Annotation other = 714 (com.google.cloud.aiplatform.v1.Annotation) obj; 715 716 if (!getName().equals(other.getName())) return false; 717 if (!getPayloadSchemaUri().equals(other.getPayloadSchemaUri())) return false; 718 if (hasPayload() != other.hasPayload()) return false; 719 if (hasPayload()) { 720 if (!getPayload().equals(other.getPayload())) return false; 721 } 722 if (hasCreateTime() != other.hasCreateTime()) return false; 723 if (hasCreateTime()) { 724 if (!getCreateTime().equals(other.getCreateTime())) return false; 725 } 726 if (hasUpdateTime() != other.hasUpdateTime()) return false; 727 if (hasUpdateTime()) { 728 if (!getUpdateTime().equals(other.getUpdateTime())) return false; 729 } 730 if (!getEtag().equals(other.getEtag())) return false; 731 if (hasAnnotationSource() != other.hasAnnotationSource()) return false; 732 if (hasAnnotationSource()) { 733 if (!getAnnotationSource().equals(other.getAnnotationSource())) return false; 734 } 735 if (!internalGetLabels().equals(other.internalGetLabels())) return false; 736 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 737 return true; 738 } 739 740 @java.lang.Override hashCode()741 public int hashCode() { 742 if (memoizedHashCode != 0) { 743 return memoizedHashCode; 744 } 745 int hash = 41; 746 hash = (19 * hash) + getDescriptor().hashCode(); 747 hash = (37 * hash) + NAME_FIELD_NUMBER; 748 hash = (53 * hash) + getName().hashCode(); 749 hash = (37 * hash) + PAYLOAD_SCHEMA_URI_FIELD_NUMBER; 750 hash = (53 * hash) + getPayloadSchemaUri().hashCode(); 751 if (hasPayload()) { 752 hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; 753 hash = (53 * hash) + getPayload().hashCode(); 754 } 755 if (hasCreateTime()) { 756 hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; 757 hash = (53 * hash) + getCreateTime().hashCode(); 758 } 759 if (hasUpdateTime()) { 760 hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; 761 hash = (53 * hash) + getUpdateTime().hashCode(); 762 } 763 hash = (37 * hash) + ETAG_FIELD_NUMBER; 764 hash = (53 * hash) + getEtag().hashCode(); 765 if (hasAnnotationSource()) { 766 hash = (37 * hash) + ANNOTATION_SOURCE_FIELD_NUMBER; 767 hash = (53 * hash) + getAnnotationSource().hashCode(); 768 } 769 if (!internalGetLabels().getMap().isEmpty()) { 770 hash = (37 * hash) + LABELS_FIELD_NUMBER; 771 hash = (53 * hash) + internalGetLabels().hashCode(); 772 } 773 hash = (29 * hash) + getUnknownFields().hashCode(); 774 memoizedHashCode = hash; 775 return hash; 776 } 777 parseFrom(java.nio.ByteBuffer data)778 public static com.google.cloud.aiplatform.v1.Annotation parseFrom(java.nio.ByteBuffer data) 779 throws com.google.protobuf.InvalidProtocolBufferException { 780 return PARSER.parseFrom(data); 781 } 782 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)783 public static com.google.cloud.aiplatform.v1.Annotation parseFrom( 784 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 785 throws com.google.protobuf.InvalidProtocolBufferException { 786 return PARSER.parseFrom(data, extensionRegistry); 787 } 788 parseFrom( com.google.protobuf.ByteString data)789 public static com.google.cloud.aiplatform.v1.Annotation parseFrom( 790 com.google.protobuf.ByteString data) 791 throws com.google.protobuf.InvalidProtocolBufferException { 792 return PARSER.parseFrom(data); 793 } 794 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)795 public static com.google.cloud.aiplatform.v1.Annotation parseFrom( 796 com.google.protobuf.ByteString data, 797 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 798 throws com.google.protobuf.InvalidProtocolBufferException { 799 return PARSER.parseFrom(data, extensionRegistry); 800 } 801 parseFrom(byte[] data)802 public static com.google.cloud.aiplatform.v1.Annotation parseFrom(byte[] data) 803 throws com.google.protobuf.InvalidProtocolBufferException { 804 return PARSER.parseFrom(data); 805 } 806 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)807 public static com.google.cloud.aiplatform.v1.Annotation parseFrom( 808 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 809 throws com.google.protobuf.InvalidProtocolBufferException { 810 return PARSER.parseFrom(data, extensionRegistry); 811 } 812 parseFrom(java.io.InputStream input)813 public static com.google.cloud.aiplatform.v1.Annotation parseFrom(java.io.InputStream input) 814 throws java.io.IOException { 815 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 816 } 817 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)818 public static com.google.cloud.aiplatform.v1.Annotation parseFrom( 819 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 820 throws java.io.IOException { 821 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 822 PARSER, input, extensionRegistry); 823 } 824 parseDelimitedFrom( java.io.InputStream input)825 public static com.google.cloud.aiplatform.v1.Annotation parseDelimitedFrom( 826 java.io.InputStream input) throws java.io.IOException { 827 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 828 } 829 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)830 public static com.google.cloud.aiplatform.v1.Annotation parseDelimitedFrom( 831 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 832 throws java.io.IOException { 833 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 834 PARSER, input, extensionRegistry); 835 } 836 parseFrom( com.google.protobuf.CodedInputStream input)837 public static com.google.cloud.aiplatform.v1.Annotation parseFrom( 838 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 839 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 840 } 841 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)842 public static com.google.cloud.aiplatform.v1.Annotation parseFrom( 843 com.google.protobuf.CodedInputStream input, 844 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 845 throws java.io.IOException { 846 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 847 PARSER, input, extensionRegistry); 848 } 849 850 @java.lang.Override newBuilderForType()851 public Builder newBuilderForType() { 852 return newBuilder(); 853 } 854 newBuilder()855 public static Builder newBuilder() { 856 return DEFAULT_INSTANCE.toBuilder(); 857 } 858 newBuilder(com.google.cloud.aiplatform.v1.Annotation prototype)859 public static Builder newBuilder(com.google.cloud.aiplatform.v1.Annotation prototype) { 860 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 861 } 862 863 @java.lang.Override toBuilder()864 public Builder toBuilder() { 865 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 866 } 867 868 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)869 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 870 Builder builder = new Builder(parent); 871 return builder; 872 } 873 /** 874 * 875 * 876 * <pre> 877 * Used to assign specific AnnotationSpec to a particular area of a DataItem or 878 * the whole part of the DataItem. 879 * </pre> 880 * 881 * Protobuf type {@code google.cloud.aiplatform.v1.Annotation} 882 */ 883 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 884 implements 885 // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Annotation) 886 com.google.cloud.aiplatform.v1.AnnotationOrBuilder { getDescriptor()887 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 888 return com.google.cloud.aiplatform.v1.AnnotationProto 889 .internal_static_google_cloud_aiplatform_v1_Annotation_descriptor; 890 } 891 892 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)893 protected com.google.protobuf.MapField internalGetMapField(int number) { 894 switch (number) { 895 case 6: 896 return internalGetLabels(); 897 default: 898 throw new RuntimeException("Invalid map field number: " + number); 899 } 900 } 901 902 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)903 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 904 switch (number) { 905 case 6: 906 return internalGetMutableLabels(); 907 default: 908 throw new RuntimeException("Invalid map field number: " + number); 909 } 910 } 911 912 @java.lang.Override 913 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()914 internalGetFieldAccessorTable() { 915 return com.google.cloud.aiplatform.v1.AnnotationProto 916 .internal_static_google_cloud_aiplatform_v1_Annotation_fieldAccessorTable 917 .ensureFieldAccessorsInitialized( 918 com.google.cloud.aiplatform.v1.Annotation.class, 919 com.google.cloud.aiplatform.v1.Annotation.Builder.class); 920 } 921 922 // Construct using com.google.cloud.aiplatform.v1.Annotation.newBuilder() Builder()923 private Builder() {} 924 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)925 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 926 super(parent); 927 } 928 929 @java.lang.Override clear()930 public Builder clear() { 931 super.clear(); 932 bitField0_ = 0; 933 name_ = ""; 934 payloadSchemaUri_ = ""; 935 payload_ = null; 936 if (payloadBuilder_ != null) { 937 payloadBuilder_.dispose(); 938 payloadBuilder_ = null; 939 } 940 createTime_ = null; 941 if (createTimeBuilder_ != null) { 942 createTimeBuilder_.dispose(); 943 createTimeBuilder_ = null; 944 } 945 updateTime_ = null; 946 if (updateTimeBuilder_ != null) { 947 updateTimeBuilder_.dispose(); 948 updateTimeBuilder_ = null; 949 } 950 etag_ = ""; 951 annotationSource_ = null; 952 if (annotationSourceBuilder_ != null) { 953 annotationSourceBuilder_.dispose(); 954 annotationSourceBuilder_ = null; 955 } 956 internalGetMutableLabels().clear(); 957 return this; 958 } 959 960 @java.lang.Override getDescriptorForType()961 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 962 return com.google.cloud.aiplatform.v1.AnnotationProto 963 .internal_static_google_cloud_aiplatform_v1_Annotation_descriptor; 964 } 965 966 @java.lang.Override getDefaultInstanceForType()967 public com.google.cloud.aiplatform.v1.Annotation getDefaultInstanceForType() { 968 return com.google.cloud.aiplatform.v1.Annotation.getDefaultInstance(); 969 } 970 971 @java.lang.Override build()972 public com.google.cloud.aiplatform.v1.Annotation build() { 973 com.google.cloud.aiplatform.v1.Annotation result = buildPartial(); 974 if (!result.isInitialized()) { 975 throw newUninitializedMessageException(result); 976 } 977 return result; 978 } 979 980 @java.lang.Override buildPartial()981 public com.google.cloud.aiplatform.v1.Annotation buildPartial() { 982 com.google.cloud.aiplatform.v1.Annotation result = 983 new com.google.cloud.aiplatform.v1.Annotation(this); 984 if (bitField0_ != 0) { 985 buildPartial0(result); 986 } 987 onBuilt(); 988 return result; 989 } 990 buildPartial0(com.google.cloud.aiplatform.v1.Annotation result)991 private void buildPartial0(com.google.cloud.aiplatform.v1.Annotation result) { 992 int from_bitField0_ = bitField0_; 993 if (((from_bitField0_ & 0x00000001) != 0)) { 994 result.name_ = name_; 995 } 996 if (((from_bitField0_ & 0x00000002) != 0)) { 997 result.payloadSchemaUri_ = payloadSchemaUri_; 998 } 999 if (((from_bitField0_ & 0x00000004) != 0)) { 1000 result.payload_ = payloadBuilder_ == null ? payload_ : payloadBuilder_.build(); 1001 } 1002 if (((from_bitField0_ & 0x00000008) != 0)) { 1003 result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); 1004 } 1005 if (((from_bitField0_ & 0x00000010) != 0)) { 1006 result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); 1007 } 1008 if (((from_bitField0_ & 0x00000020) != 0)) { 1009 result.etag_ = etag_; 1010 } 1011 if (((from_bitField0_ & 0x00000040) != 0)) { 1012 result.annotationSource_ = 1013 annotationSourceBuilder_ == null ? annotationSource_ : annotationSourceBuilder_.build(); 1014 } 1015 if (((from_bitField0_ & 0x00000080) != 0)) { 1016 result.labels_ = internalGetLabels(); 1017 result.labels_.makeImmutable(); 1018 } 1019 } 1020 1021 @java.lang.Override clone()1022 public Builder clone() { 1023 return super.clone(); 1024 } 1025 1026 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1027 public Builder setField( 1028 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1029 return super.setField(field, value); 1030 } 1031 1032 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1033 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1034 return super.clearField(field); 1035 } 1036 1037 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1038 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1039 return super.clearOneof(oneof); 1040 } 1041 1042 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1043 public Builder setRepeatedField( 1044 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1045 return super.setRepeatedField(field, index, value); 1046 } 1047 1048 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1049 public Builder addRepeatedField( 1050 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1051 return super.addRepeatedField(field, value); 1052 } 1053 1054 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1055 public Builder mergeFrom(com.google.protobuf.Message other) { 1056 if (other instanceof com.google.cloud.aiplatform.v1.Annotation) { 1057 return mergeFrom((com.google.cloud.aiplatform.v1.Annotation) other); 1058 } else { 1059 super.mergeFrom(other); 1060 return this; 1061 } 1062 } 1063 mergeFrom(com.google.cloud.aiplatform.v1.Annotation other)1064 public Builder mergeFrom(com.google.cloud.aiplatform.v1.Annotation other) { 1065 if (other == com.google.cloud.aiplatform.v1.Annotation.getDefaultInstance()) return this; 1066 if (!other.getName().isEmpty()) { 1067 name_ = other.name_; 1068 bitField0_ |= 0x00000001; 1069 onChanged(); 1070 } 1071 if (!other.getPayloadSchemaUri().isEmpty()) { 1072 payloadSchemaUri_ = other.payloadSchemaUri_; 1073 bitField0_ |= 0x00000002; 1074 onChanged(); 1075 } 1076 if (other.hasPayload()) { 1077 mergePayload(other.getPayload()); 1078 } 1079 if (other.hasCreateTime()) { 1080 mergeCreateTime(other.getCreateTime()); 1081 } 1082 if (other.hasUpdateTime()) { 1083 mergeUpdateTime(other.getUpdateTime()); 1084 } 1085 if (!other.getEtag().isEmpty()) { 1086 etag_ = other.etag_; 1087 bitField0_ |= 0x00000020; 1088 onChanged(); 1089 } 1090 if (other.hasAnnotationSource()) { 1091 mergeAnnotationSource(other.getAnnotationSource()); 1092 } 1093 internalGetMutableLabels().mergeFrom(other.internalGetLabels()); 1094 bitField0_ |= 0x00000080; 1095 this.mergeUnknownFields(other.getUnknownFields()); 1096 onChanged(); 1097 return this; 1098 } 1099 1100 @java.lang.Override isInitialized()1101 public final boolean isInitialized() { 1102 return true; 1103 } 1104 1105 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1106 public Builder mergeFrom( 1107 com.google.protobuf.CodedInputStream input, 1108 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1109 throws java.io.IOException { 1110 if (extensionRegistry == null) { 1111 throw new java.lang.NullPointerException(); 1112 } 1113 try { 1114 boolean done = false; 1115 while (!done) { 1116 int tag = input.readTag(); 1117 switch (tag) { 1118 case 0: 1119 done = true; 1120 break; 1121 case 10: 1122 { 1123 name_ = input.readStringRequireUtf8(); 1124 bitField0_ |= 0x00000001; 1125 break; 1126 } // case 10 1127 case 18: 1128 { 1129 payloadSchemaUri_ = input.readStringRequireUtf8(); 1130 bitField0_ |= 0x00000002; 1131 break; 1132 } // case 18 1133 case 26: 1134 { 1135 input.readMessage(getPayloadFieldBuilder().getBuilder(), extensionRegistry); 1136 bitField0_ |= 0x00000004; 1137 break; 1138 } // case 26 1139 case 34: 1140 { 1141 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); 1142 bitField0_ |= 0x00000008; 1143 break; 1144 } // case 34 1145 case 42: 1146 { 1147 input.readMessage( 1148 getAnnotationSourceFieldBuilder().getBuilder(), extensionRegistry); 1149 bitField0_ |= 0x00000040; 1150 break; 1151 } // case 42 1152 case 50: 1153 { 1154 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = 1155 input.readMessage( 1156 LabelsDefaultEntryHolder.defaultEntry.getParserForType(), 1157 extensionRegistry); 1158 internalGetMutableLabels() 1159 .getMutableMap() 1160 .put(labels__.getKey(), labels__.getValue()); 1161 bitField0_ |= 0x00000080; 1162 break; 1163 } // case 50 1164 case 58: 1165 { 1166 input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); 1167 bitField0_ |= 0x00000010; 1168 break; 1169 } // case 58 1170 case 66: 1171 { 1172 etag_ = input.readStringRequireUtf8(); 1173 bitField0_ |= 0x00000020; 1174 break; 1175 } // case 66 1176 default: 1177 { 1178 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1179 done = true; // was an endgroup tag 1180 } 1181 break; 1182 } // default: 1183 } // switch (tag) 1184 } // while (!done) 1185 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1186 throw e.unwrapIOException(); 1187 } finally { 1188 onChanged(); 1189 } // finally 1190 return this; 1191 } 1192 1193 private int bitField0_; 1194 1195 private java.lang.Object name_ = ""; 1196 /** 1197 * 1198 * 1199 * <pre> 1200 * Output only. Resource name of the Annotation. 1201 * </pre> 1202 * 1203 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1204 * 1205 * @return The name. 1206 */ getName()1207 public java.lang.String getName() { 1208 java.lang.Object ref = name_; 1209 if (!(ref instanceof java.lang.String)) { 1210 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1211 java.lang.String s = bs.toStringUtf8(); 1212 name_ = s; 1213 return s; 1214 } else { 1215 return (java.lang.String) ref; 1216 } 1217 } 1218 /** 1219 * 1220 * 1221 * <pre> 1222 * Output only. Resource name of the Annotation. 1223 * </pre> 1224 * 1225 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1226 * 1227 * @return The bytes for name. 1228 */ getNameBytes()1229 public com.google.protobuf.ByteString getNameBytes() { 1230 java.lang.Object ref = name_; 1231 if (ref instanceof String) { 1232 com.google.protobuf.ByteString b = 1233 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1234 name_ = b; 1235 return b; 1236 } else { 1237 return (com.google.protobuf.ByteString) ref; 1238 } 1239 } 1240 /** 1241 * 1242 * 1243 * <pre> 1244 * Output only. Resource name of the Annotation. 1245 * </pre> 1246 * 1247 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1248 * 1249 * @param value The name to set. 1250 * @return This builder for chaining. 1251 */ setName(java.lang.String value)1252 public Builder setName(java.lang.String value) { 1253 if (value == null) { 1254 throw new NullPointerException(); 1255 } 1256 name_ = value; 1257 bitField0_ |= 0x00000001; 1258 onChanged(); 1259 return this; 1260 } 1261 /** 1262 * 1263 * 1264 * <pre> 1265 * Output only. Resource name of the Annotation. 1266 * </pre> 1267 * 1268 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1269 * 1270 * @return This builder for chaining. 1271 */ clearName()1272 public Builder clearName() { 1273 name_ = getDefaultInstance().getName(); 1274 bitField0_ = (bitField0_ & ~0x00000001); 1275 onChanged(); 1276 return this; 1277 } 1278 /** 1279 * 1280 * 1281 * <pre> 1282 * Output only. Resource name of the Annotation. 1283 * </pre> 1284 * 1285 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1286 * 1287 * @param value The bytes for name to set. 1288 * @return This builder for chaining. 1289 */ setNameBytes(com.google.protobuf.ByteString value)1290 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1291 if (value == null) { 1292 throw new NullPointerException(); 1293 } 1294 checkByteStringIsUtf8(value); 1295 name_ = value; 1296 bitField0_ |= 0x00000001; 1297 onChanged(); 1298 return this; 1299 } 1300 1301 private java.lang.Object payloadSchemaUri_ = ""; 1302 /** 1303 * 1304 * 1305 * <pre> 1306 * Required. Google Cloud Storage URI points to a YAML file describing 1307 * [payload][google.cloud.aiplatform.v1.Annotation.payload]. The schema is 1308 * defined as an [OpenAPI 3.0.2 Schema 1309 * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 1310 * The schema files that can be used here are found in 1311 * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the 1312 * chosen schema must be consistent with the parent Dataset's 1313 * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]. 1314 * </pre> 1315 * 1316 * <code>string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1317 * 1318 * @return The payloadSchemaUri. 1319 */ getPayloadSchemaUri()1320 public java.lang.String getPayloadSchemaUri() { 1321 java.lang.Object ref = payloadSchemaUri_; 1322 if (!(ref instanceof java.lang.String)) { 1323 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1324 java.lang.String s = bs.toStringUtf8(); 1325 payloadSchemaUri_ = s; 1326 return s; 1327 } else { 1328 return (java.lang.String) ref; 1329 } 1330 } 1331 /** 1332 * 1333 * 1334 * <pre> 1335 * Required. Google Cloud Storage URI points to a YAML file describing 1336 * [payload][google.cloud.aiplatform.v1.Annotation.payload]. The schema is 1337 * defined as an [OpenAPI 3.0.2 Schema 1338 * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 1339 * The schema files that can be used here are found in 1340 * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the 1341 * chosen schema must be consistent with the parent Dataset's 1342 * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]. 1343 * </pre> 1344 * 1345 * <code>string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1346 * 1347 * @return The bytes for payloadSchemaUri. 1348 */ getPayloadSchemaUriBytes()1349 public com.google.protobuf.ByteString getPayloadSchemaUriBytes() { 1350 java.lang.Object ref = payloadSchemaUri_; 1351 if (ref instanceof String) { 1352 com.google.protobuf.ByteString b = 1353 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1354 payloadSchemaUri_ = b; 1355 return b; 1356 } else { 1357 return (com.google.protobuf.ByteString) ref; 1358 } 1359 } 1360 /** 1361 * 1362 * 1363 * <pre> 1364 * Required. Google Cloud Storage URI points to a YAML file describing 1365 * [payload][google.cloud.aiplatform.v1.Annotation.payload]. The schema is 1366 * defined as an [OpenAPI 3.0.2 Schema 1367 * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 1368 * The schema files that can be used here are found in 1369 * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the 1370 * chosen schema must be consistent with the parent Dataset's 1371 * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]. 1372 * </pre> 1373 * 1374 * <code>string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1375 * 1376 * @param value The payloadSchemaUri to set. 1377 * @return This builder for chaining. 1378 */ setPayloadSchemaUri(java.lang.String value)1379 public Builder setPayloadSchemaUri(java.lang.String value) { 1380 if (value == null) { 1381 throw new NullPointerException(); 1382 } 1383 payloadSchemaUri_ = value; 1384 bitField0_ |= 0x00000002; 1385 onChanged(); 1386 return this; 1387 } 1388 /** 1389 * 1390 * 1391 * <pre> 1392 * Required. Google Cloud Storage URI points to a YAML file describing 1393 * [payload][google.cloud.aiplatform.v1.Annotation.payload]. The schema is 1394 * defined as an [OpenAPI 3.0.2 Schema 1395 * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 1396 * The schema files that can be used here are found in 1397 * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the 1398 * chosen schema must be consistent with the parent Dataset's 1399 * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]. 1400 * </pre> 1401 * 1402 * <code>string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1403 * 1404 * @return This builder for chaining. 1405 */ clearPayloadSchemaUri()1406 public Builder clearPayloadSchemaUri() { 1407 payloadSchemaUri_ = getDefaultInstance().getPayloadSchemaUri(); 1408 bitField0_ = (bitField0_ & ~0x00000002); 1409 onChanged(); 1410 return this; 1411 } 1412 /** 1413 * 1414 * 1415 * <pre> 1416 * Required. Google Cloud Storage URI points to a YAML file describing 1417 * [payload][google.cloud.aiplatform.v1.Annotation.payload]. The schema is 1418 * defined as an [OpenAPI 3.0.2 Schema 1419 * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 1420 * The schema files that can be used here are found in 1421 * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the 1422 * chosen schema must be consistent with the parent Dataset's 1423 * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]. 1424 * </pre> 1425 * 1426 * <code>string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1427 * 1428 * @param value The bytes for payloadSchemaUri to set. 1429 * @return This builder for chaining. 1430 */ setPayloadSchemaUriBytes(com.google.protobuf.ByteString value)1431 public Builder setPayloadSchemaUriBytes(com.google.protobuf.ByteString value) { 1432 if (value == null) { 1433 throw new NullPointerException(); 1434 } 1435 checkByteStringIsUtf8(value); 1436 payloadSchemaUri_ = value; 1437 bitField0_ |= 0x00000002; 1438 onChanged(); 1439 return this; 1440 } 1441 1442 private com.google.protobuf.Value payload_; 1443 private com.google.protobuf.SingleFieldBuilderV3< 1444 com.google.protobuf.Value, 1445 com.google.protobuf.Value.Builder, 1446 com.google.protobuf.ValueOrBuilder> 1447 payloadBuilder_; 1448 /** 1449 * 1450 * 1451 * <pre> 1452 * Required. The schema of the payload can be found in 1453 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 1454 * </pre> 1455 * 1456 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1457 * 1458 * @return Whether the payload field is set. 1459 */ hasPayload()1460 public boolean hasPayload() { 1461 return ((bitField0_ & 0x00000004) != 0); 1462 } 1463 /** 1464 * 1465 * 1466 * <pre> 1467 * Required. The schema of the payload can be found in 1468 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 1469 * </pre> 1470 * 1471 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1472 * 1473 * @return The payload. 1474 */ getPayload()1475 public com.google.protobuf.Value getPayload() { 1476 if (payloadBuilder_ == null) { 1477 return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; 1478 } else { 1479 return payloadBuilder_.getMessage(); 1480 } 1481 } 1482 /** 1483 * 1484 * 1485 * <pre> 1486 * Required. The schema of the payload can be found in 1487 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 1488 * </pre> 1489 * 1490 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1491 */ setPayload(com.google.protobuf.Value value)1492 public Builder setPayload(com.google.protobuf.Value value) { 1493 if (payloadBuilder_ == null) { 1494 if (value == null) { 1495 throw new NullPointerException(); 1496 } 1497 payload_ = value; 1498 } else { 1499 payloadBuilder_.setMessage(value); 1500 } 1501 bitField0_ |= 0x00000004; 1502 onChanged(); 1503 return this; 1504 } 1505 /** 1506 * 1507 * 1508 * <pre> 1509 * Required. The schema of the payload can be found in 1510 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 1511 * </pre> 1512 * 1513 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1514 */ setPayload(com.google.protobuf.Value.Builder builderForValue)1515 public Builder setPayload(com.google.protobuf.Value.Builder builderForValue) { 1516 if (payloadBuilder_ == null) { 1517 payload_ = builderForValue.build(); 1518 } else { 1519 payloadBuilder_.setMessage(builderForValue.build()); 1520 } 1521 bitField0_ |= 0x00000004; 1522 onChanged(); 1523 return this; 1524 } 1525 /** 1526 * 1527 * 1528 * <pre> 1529 * Required. The schema of the payload can be found in 1530 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 1531 * </pre> 1532 * 1533 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1534 */ mergePayload(com.google.protobuf.Value value)1535 public Builder mergePayload(com.google.protobuf.Value value) { 1536 if (payloadBuilder_ == null) { 1537 if (((bitField0_ & 0x00000004) != 0) 1538 && payload_ != null 1539 && payload_ != com.google.protobuf.Value.getDefaultInstance()) { 1540 getPayloadBuilder().mergeFrom(value); 1541 } else { 1542 payload_ = value; 1543 } 1544 } else { 1545 payloadBuilder_.mergeFrom(value); 1546 } 1547 bitField0_ |= 0x00000004; 1548 onChanged(); 1549 return this; 1550 } 1551 /** 1552 * 1553 * 1554 * <pre> 1555 * Required. The schema of the payload can be found in 1556 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 1557 * </pre> 1558 * 1559 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1560 */ clearPayload()1561 public Builder clearPayload() { 1562 bitField0_ = (bitField0_ & ~0x00000004); 1563 payload_ = null; 1564 if (payloadBuilder_ != null) { 1565 payloadBuilder_.dispose(); 1566 payloadBuilder_ = null; 1567 } 1568 onChanged(); 1569 return this; 1570 } 1571 /** 1572 * 1573 * 1574 * <pre> 1575 * Required. The schema of the payload can be found in 1576 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 1577 * </pre> 1578 * 1579 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1580 */ getPayloadBuilder()1581 public com.google.protobuf.Value.Builder getPayloadBuilder() { 1582 bitField0_ |= 0x00000004; 1583 onChanged(); 1584 return getPayloadFieldBuilder().getBuilder(); 1585 } 1586 /** 1587 * 1588 * 1589 * <pre> 1590 * Required. The schema of the payload can be found in 1591 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 1592 * </pre> 1593 * 1594 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1595 */ getPayloadOrBuilder()1596 public com.google.protobuf.ValueOrBuilder getPayloadOrBuilder() { 1597 if (payloadBuilder_ != null) { 1598 return payloadBuilder_.getMessageOrBuilder(); 1599 } else { 1600 return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; 1601 } 1602 } 1603 /** 1604 * 1605 * 1606 * <pre> 1607 * Required. The schema of the payload can be found in 1608 * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. 1609 * </pre> 1610 * 1611 * <code>.google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1612 */ 1613 private com.google.protobuf.SingleFieldBuilderV3< 1614 com.google.protobuf.Value, 1615 com.google.protobuf.Value.Builder, 1616 com.google.protobuf.ValueOrBuilder> getPayloadFieldBuilder()1617 getPayloadFieldBuilder() { 1618 if (payloadBuilder_ == null) { 1619 payloadBuilder_ = 1620 new com.google.protobuf.SingleFieldBuilderV3< 1621 com.google.protobuf.Value, 1622 com.google.protobuf.Value.Builder, 1623 com.google.protobuf.ValueOrBuilder>( 1624 getPayload(), getParentForChildren(), isClean()); 1625 payload_ = null; 1626 } 1627 return payloadBuilder_; 1628 } 1629 1630 private com.google.protobuf.Timestamp createTime_; 1631 private com.google.protobuf.SingleFieldBuilderV3< 1632 com.google.protobuf.Timestamp, 1633 com.google.protobuf.Timestamp.Builder, 1634 com.google.protobuf.TimestampOrBuilder> 1635 createTimeBuilder_; 1636 /** 1637 * 1638 * 1639 * <pre> 1640 * Output only. Timestamp when this Annotation was created. 1641 * </pre> 1642 * 1643 * <code> 1644 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1645 * </code> 1646 * 1647 * @return Whether the createTime field is set. 1648 */ hasCreateTime()1649 public boolean hasCreateTime() { 1650 return ((bitField0_ & 0x00000008) != 0); 1651 } 1652 /** 1653 * 1654 * 1655 * <pre> 1656 * Output only. Timestamp when this Annotation was created. 1657 * </pre> 1658 * 1659 * <code> 1660 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1661 * </code> 1662 * 1663 * @return The createTime. 1664 */ getCreateTime()1665 public com.google.protobuf.Timestamp getCreateTime() { 1666 if (createTimeBuilder_ == null) { 1667 return createTime_ == null 1668 ? com.google.protobuf.Timestamp.getDefaultInstance() 1669 : createTime_; 1670 } else { 1671 return createTimeBuilder_.getMessage(); 1672 } 1673 } 1674 /** 1675 * 1676 * 1677 * <pre> 1678 * Output only. Timestamp when this Annotation was created. 1679 * </pre> 1680 * 1681 * <code> 1682 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1683 * </code> 1684 */ setCreateTime(com.google.protobuf.Timestamp value)1685 public Builder setCreateTime(com.google.protobuf.Timestamp value) { 1686 if (createTimeBuilder_ == null) { 1687 if (value == null) { 1688 throw new NullPointerException(); 1689 } 1690 createTime_ = value; 1691 } else { 1692 createTimeBuilder_.setMessage(value); 1693 } 1694 bitField0_ |= 0x00000008; 1695 onChanged(); 1696 return this; 1697 } 1698 /** 1699 * 1700 * 1701 * <pre> 1702 * Output only. Timestamp when this Annotation was created. 1703 * </pre> 1704 * 1705 * <code> 1706 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1707 * </code> 1708 */ setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)1709 public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 1710 if (createTimeBuilder_ == null) { 1711 createTime_ = builderForValue.build(); 1712 } else { 1713 createTimeBuilder_.setMessage(builderForValue.build()); 1714 } 1715 bitField0_ |= 0x00000008; 1716 onChanged(); 1717 return this; 1718 } 1719 /** 1720 * 1721 * 1722 * <pre> 1723 * Output only. Timestamp when this Annotation was created. 1724 * </pre> 1725 * 1726 * <code> 1727 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1728 * </code> 1729 */ mergeCreateTime(com.google.protobuf.Timestamp value)1730 public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { 1731 if (createTimeBuilder_ == null) { 1732 if (((bitField0_ & 0x00000008) != 0) 1733 && createTime_ != null 1734 && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 1735 getCreateTimeBuilder().mergeFrom(value); 1736 } else { 1737 createTime_ = value; 1738 } 1739 } else { 1740 createTimeBuilder_.mergeFrom(value); 1741 } 1742 bitField0_ |= 0x00000008; 1743 onChanged(); 1744 return this; 1745 } 1746 /** 1747 * 1748 * 1749 * <pre> 1750 * Output only. Timestamp when this Annotation was created. 1751 * </pre> 1752 * 1753 * <code> 1754 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1755 * </code> 1756 */ clearCreateTime()1757 public Builder clearCreateTime() { 1758 bitField0_ = (bitField0_ & ~0x00000008); 1759 createTime_ = null; 1760 if (createTimeBuilder_ != null) { 1761 createTimeBuilder_.dispose(); 1762 createTimeBuilder_ = null; 1763 } 1764 onChanged(); 1765 return this; 1766 } 1767 /** 1768 * 1769 * 1770 * <pre> 1771 * Output only. Timestamp when this Annotation was created. 1772 * </pre> 1773 * 1774 * <code> 1775 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1776 * </code> 1777 */ getCreateTimeBuilder()1778 public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { 1779 bitField0_ |= 0x00000008; 1780 onChanged(); 1781 return getCreateTimeFieldBuilder().getBuilder(); 1782 } 1783 /** 1784 * 1785 * 1786 * <pre> 1787 * Output only. Timestamp when this Annotation was created. 1788 * </pre> 1789 * 1790 * <code> 1791 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1792 * </code> 1793 */ getCreateTimeOrBuilder()1794 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 1795 if (createTimeBuilder_ != null) { 1796 return createTimeBuilder_.getMessageOrBuilder(); 1797 } else { 1798 return createTime_ == null 1799 ? com.google.protobuf.Timestamp.getDefaultInstance() 1800 : createTime_; 1801 } 1802 } 1803 /** 1804 * 1805 * 1806 * <pre> 1807 * Output only. Timestamp when this Annotation was created. 1808 * </pre> 1809 * 1810 * <code> 1811 * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1812 * </code> 1813 */ 1814 private com.google.protobuf.SingleFieldBuilderV3< 1815 com.google.protobuf.Timestamp, 1816 com.google.protobuf.Timestamp.Builder, 1817 com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder()1818 getCreateTimeFieldBuilder() { 1819 if (createTimeBuilder_ == null) { 1820 createTimeBuilder_ = 1821 new com.google.protobuf.SingleFieldBuilderV3< 1822 com.google.protobuf.Timestamp, 1823 com.google.protobuf.Timestamp.Builder, 1824 com.google.protobuf.TimestampOrBuilder>( 1825 getCreateTime(), getParentForChildren(), isClean()); 1826 createTime_ = null; 1827 } 1828 return createTimeBuilder_; 1829 } 1830 1831 private com.google.protobuf.Timestamp updateTime_; 1832 private com.google.protobuf.SingleFieldBuilderV3< 1833 com.google.protobuf.Timestamp, 1834 com.google.protobuf.Timestamp.Builder, 1835 com.google.protobuf.TimestampOrBuilder> 1836 updateTimeBuilder_; 1837 /** 1838 * 1839 * 1840 * <pre> 1841 * Output only. Timestamp when this Annotation was last updated. 1842 * </pre> 1843 * 1844 * <code> 1845 * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1846 * </code> 1847 * 1848 * @return Whether the updateTime field is set. 1849 */ hasUpdateTime()1850 public boolean hasUpdateTime() { 1851 return ((bitField0_ & 0x00000010) != 0); 1852 } 1853 /** 1854 * 1855 * 1856 * <pre> 1857 * Output only. Timestamp when this Annotation was last updated. 1858 * </pre> 1859 * 1860 * <code> 1861 * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1862 * </code> 1863 * 1864 * @return The updateTime. 1865 */ getUpdateTime()1866 public com.google.protobuf.Timestamp getUpdateTime() { 1867 if (updateTimeBuilder_ == null) { 1868 return updateTime_ == null 1869 ? com.google.protobuf.Timestamp.getDefaultInstance() 1870 : updateTime_; 1871 } else { 1872 return updateTimeBuilder_.getMessage(); 1873 } 1874 } 1875 /** 1876 * 1877 * 1878 * <pre> 1879 * Output only. Timestamp when this Annotation was last updated. 1880 * </pre> 1881 * 1882 * <code> 1883 * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1884 * </code> 1885 */ setUpdateTime(com.google.protobuf.Timestamp value)1886 public Builder setUpdateTime(com.google.protobuf.Timestamp value) { 1887 if (updateTimeBuilder_ == null) { 1888 if (value == null) { 1889 throw new NullPointerException(); 1890 } 1891 updateTime_ = value; 1892 } else { 1893 updateTimeBuilder_.setMessage(value); 1894 } 1895 bitField0_ |= 0x00000010; 1896 onChanged(); 1897 return this; 1898 } 1899 /** 1900 * 1901 * 1902 * <pre> 1903 * Output only. Timestamp when this Annotation was last updated. 1904 * </pre> 1905 * 1906 * <code> 1907 * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1908 * </code> 1909 */ setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)1910 public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 1911 if (updateTimeBuilder_ == null) { 1912 updateTime_ = builderForValue.build(); 1913 } else { 1914 updateTimeBuilder_.setMessage(builderForValue.build()); 1915 } 1916 bitField0_ |= 0x00000010; 1917 onChanged(); 1918 return this; 1919 } 1920 /** 1921 * 1922 * 1923 * <pre> 1924 * Output only. Timestamp when this Annotation was last updated. 1925 * </pre> 1926 * 1927 * <code> 1928 * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1929 * </code> 1930 */ mergeUpdateTime(com.google.protobuf.Timestamp value)1931 public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { 1932 if (updateTimeBuilder_ == null) { 1933 if (((bitField0_ & 0x00000010) != 0) 1934 && updateTime_ != null 1935 && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 1936 getUpdateTimeBuilder().mergeFrom(value); 1937 } else { 1938 updateTime_ = value; 1939 } 1940 } else { 1941 updateTimeBuilder_.mergeFrom(value); 1942 } 1943 bitField0_ |= 0x00000010; 1944 onChanged(); 1945 return this; 1946 } 1947 /** 1948 * 1949 * 1950 * <pre> 1951 * Output only. Timestamp when this Annotation was last updated. 1952 * </pre> 1953 * 1954 * <code> 1955 * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1956 * </code> 1957 */ clearUpdateTime()1958 public Builder clearUpdateTime() { 1959 bitField0_ = (bitField0_ & ~0x00000010); 1960 updateTime_ = null; 1961 if (updateTimeBuilder_ != null) { 1962 updateTimeBuilder_.dispose(); 1963 updateTimeBuilder_ = null; 1964 } 1965 onChanged(); 1966 return this; 1967 } 1968 /** 1969 * 1970 * 1971 * <pre> 1972 * Output only. Timestamp when this Annotation was last updated. 1973 * </pre> 1974 * 1975 * <code> 1976 * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1977 * </code> 1978 */ getUpdateTimeBuilder()1979 public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { 1980 bitField0_ |= 0x00000010; 1981 onChanged(); 1982 return getUpdateTimeFieldBuilder().getBuilder(); 1983 } 1984 /** 1985 * 1986 * 1987 * <pre> 1988 * Output only. Timestamp when this Annotation was last updated. 1989 * </pre> 1990 * 1991 * <code> 1992 * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1993 * </code> 1994 */ getUpdateTimeOrBuilder()1995 public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { 1996 if (updateTimeBuilder_ != null) { 1997 return updateTimeBuilder_.getMessageOrBuilder(); 1998 } else { 1999 return updateTime_ == null 2000 ? com.google.protobuf.Timestamp.getDefaultInstance() 2001 : updateTime_; 2002 } 2003 } 2004 /** 2005 * 2006 * 2007 * <pre> 2008 * Output only. Timestamp when this Annotation was last updated. 2009 * </pre> 2010 * 2011 * <code> 2012 * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2013 * </code> 2014 */ 2015 private com.google.protobuf.SingleFieldBuilderV3< 2016 com.google.protobuf.Timestamp, 2017 com.google.protobuf.Timestamp.Builder, 2018 com.google.protobuf.TimestampOrBuilder> getUpdateTimeFieldBuilder()2019 getUpdateTimeFieldBuilder() { 2020 if (updateTimeBuilder_ == null) { 2021 updateTimeBuilder_ = 2022 new com.google.protobuf.SingleFieldBuilderV3< 2023 com.google.protobuf.Timestamp, 2024 com.google.protobuf.Timestamp.Builder, 2025 com.google.protobuf.TimestampOrBuilder>( 2026 getUpdateTime(), getParentForChildren(), isClean()); 2027 updateTime_ = null; 2028 } 2029 return updateTimeBuilder_; 2030 } 2031 2032 private java.lang.Object etag_ = ""; 2033 /** 2034 * 2035 * 2036 * <pre> 2037 * Optional. Used to perform consistent read-modify-write updates. If not set, 2038 * a blind "overwrite" update happens. 2039 * </pre> 2040 * 2041 * <code>string etag = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2042 * 2043 * @return The etag. 2044 */ getEtag()2045 public java.lang.String getEtag() { 2046 java.lang.Object ref = etag_; 2047 if (!(ref instanceof java.lang.String)) { 2048 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2049 java.lang.String s = bs.toStringUtf8(); 2050 etag_ = s; 2051 return s; 2052 } else { 2053 return (java.lang.String) ref; 2054 } 2055 } 2056 /** 2057 * 2058 * 2059 * <pre> 2060 * Optional. Used to perform consistent read-modify-write updates. If not set, 2061 * a blind "overwrite" update happens. 2062 * </pre> 2063 * 2064 * <code>string etag = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2065 * 2066 * @return The bytes for etag. 2067 */ getEtagBytes()2068 public com.google.protobuf.ByteString getEtagBytes() { 2069 java.lang.Object ref = etag_; 2070 if (ref instanceof String) { 2071 com.google.protobuf.ByteString b = 2072 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2073 etag_ = b; 2074 return b; 2075 } else { 2076 return (com.google.protobuf.ByteString) ref; 2077 } 2078 } 2079 /** 2080 * 2081 * 2082 * <pre> 2083 * Optional. Used to perform consistent read-modify-write updates. If not set, 2084 * a blind "overwrite" update happens. 2085 * </pre> 2086 * 2087 * <code>string etag = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2088 * 2089 * @param value The etag to set. 2090 * @return This builder for chaining. 2091 */ setEtag(java.lang.String value)2092 public Builder setEtag(java.lang.String value) { 2093 if (value == null) { 2094 throw new NullPointerException(); 2095 } 2096 etag_ = value; 2097 bitField0_ |= 0x00000020; 2098 onChanged(); 2099 return this; 2100 } 2101 /** 2102 * 2103 * 2104 * <pre> 2105 * Optional. Used to perform consistent read-modify-write updates. If not set, 2106 * a blind "overwrite" update happens. 2107 * </pre> 2108 * 2109 * <code>string etag = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2110 * 2111 * @return This builder for chaining. 2112 */ clearEtag()2113 public Builder clearEtag() { 2114 etag_ = getDefaultInstance().getEtag(); 2115 bitField0_ = (bitField0_ & ~0x00000020); 2116 onChanged(); 2117 return this; 2118 } 2119 /** 2120 * 2121 * 2122 * <pre> 2123 * Optional. Used to perform consistent read-modify-write updates. If not set, 2124 * a blind "overwrite" update happens. 2125 * </pre> 2126 * 2127 * <code>string etag = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 2128 * 2129 * @param value The bytes for etag to set. 2130 * @return This builder for chaining. 2131 */ setEtagBytes(com.google.protobuf.ByteString value)2132 public Builder setEtagBytes(com.google.protobuf.ByteString value) { 2133 if (value == null) { 2134 throw new NullPointerException(); 2135 } 2136 checkByteStringIsUtf8(value); 2137 etag_ = value; 2138 bitField0_ |= 0x00000020; 2139 onChanged(); 2140 return this; 2141 } 2142 2143 private com.google.cloud.aiplatform.v1.UserActionReference annotationSource_; 2144 private com.google.protobuf.SingleFieldBuilderV3< 2145 com.google.cloud.aiplatform.v1.UserActionReference, 2146 com.google.cloud.aiplatform.v1.UserActionReference.Builder, 2147 com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder> 2148 annotationSourceBuilder_; 2149 /** 2150 * 2151 * 2152 * <pre> 2153 * Output only. The source of the Annotation. 2154 * </pre> 2155 * 2156 * <code> 2157 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2158 * </code> 2159 * 2160 * @return Whether the annotationSource field is set. 2161 */ hasAnnotationSource()2162 public boolean hasAnnotationSource() { 2163 return ((bitField0_ & 0x00000040) != 0); 2164 } 2165 /** 2166 * 2167 * 2168 * <pre> 2169 * Output only. The source of the Annotation. 2170 * </pre> 2171 * 2172 * <code> 2173 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2174 * </code> 2175 * 2176 * @return The annotationSource. 2177 */ getAnnotationSource()2178 public com.google.cloud.aiplatform.v1.UserActionReference getAnnotationSource() { 2179 if (annotationSourceBuilder_ == null) { 2180 return annotationSource_ == null 2181 ? com.google.cloud.aiplatform.v1.UserActionReference.getDefaultInstance() 2182 : annotationSource_; 2183 } else { 2184 return annotationSourceBuilder_.getMessage(); 2185 } 2186 } 2187 /** 2188 * 2189 * 2190 * <pre> 2191 * Output only. The source of the Annotation. 2192 * </pre> 2193 * 2194 * <code> 2195 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2196 * </code> 2197 */ setAnnotationSource(com.google.cloud.aiplatform.v1.UserActionReference value)2198 public Builder setAnnotationSource(com.google.cloud.aiplatform.v1.UserActionReference value) { 2199 if (annotationSourceBuilder_ == null) { 2200 if (value == null) { 2201 throw new NullPointerException(); 2202 } 2203 annotationSource_ = value; 2204 } else { 2205 annotationSourceBuilder_.setMessage(value); 2206 } 2207 bitField0_ |= 0x00000040; 2208 onChanged(); 2209 return this; 2210 } 2211 /** 2212 * 2213 * 2214 * <pre> 2215 * Output only. The source of the Annotation. 2216 * </pre> 2217 * 2218 * <code> 2219 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2220 * </code> 2221 */ setAnnotationSource( com.google.cloud.aiplatform.v1.UserActionReference.Builder builderForValue)2222 public Builder setAnnotationSource( 2223 com.google.cloud.aiplatform.v1.UserActionReference.Builder builderForValue) { 2224 if (annotationSourceBuilder_ == null) { 2225 annotationSource_ = builderForValue.build(); 2226 } else { 2227 annotationSourceBuilder_.setMessage(builderForValue.build()); 2228 } 2229 bitField0_ |= 0x00000040; 2230 onChanged(); 2231 return this; 2232 } 2233 /** 2234 * 2235 * 2236 * <pre> 2237 * Output only. The source of the Annotation. 2238 * </pre> 2239 * 2240 * <code> 2241 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2242 * </code> 2243 */ mergeAnnotationSource(com.google.cloud.aiplatform.v1.UserActionReference value)2244 public Builder mergeAnnotationSource(com.google.cloud.aiplatform.v1.UserActionReference value) { 2245 if (annotationSourceBuilder_ == null) { 2246 if (((bitField0_ & 0x00000040) != 0) 2247 && annotationSource_ != null 2248 && annotationSource_ 2249 != com.google.cloud.aiplatform.v1.UserActionReference.getDefaultInstance()) { 2250 getAnnotationSourceBuilder().mergeFrom(value); 2251 } else { 2252 annotationSource_ = value; 2253 } 2254 } else { 2255 annotationSourceBuilder_.mergeFrom(value); 2256 } 2257 bitField0_ |= 0x00000040; 2258 onChanged(); 2259 return this; 2260 } 2261 /** 2262 * 2263 * 2264 * <pre> 2265 * Output only. The source of the Annotation. 2266 * </pre> 2267 * 2268 * <code> 2269 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2270 * </code> 2271 */ clearAnnotationSource()2272 public Builder clearAnnotationSource() { 2273 bitField0_ = (bitField0_ & ~0x00000040); 2274 annotationSource_ = null; 2275 if (annotationSourceBuilder_ != null) { 2276 annotationSourceBuilder_.dispose(); 2277 annotationSourceBuilder_ = null; 2278 } 2279 onChanged(); 2280 return this; 2281 } 2282 /** 2283 * 2284 * 2285 * <pre> 2286 * Output only. The source of the Annotation. 2287 * </pre> 2288 * 2289 * <code> 2290 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2291 * </code> 2292 */ getAnnotationSourceBuilder()2293 public com.google.cloud.aiplatform.v1.UserActionReference.Builder getAnnotationSourceBuilder() { 2294 bitField0_ |= 0x00000040; 2295 onChanged(); 2296 return getAnnotationSourceFieldBuilder().getBuilder(); 2297 } 2298 /** 2299 * 2300 * 2301 * <pre> 2302 * Output only. The source of the Annotation. 2303 * </pre> 2304 * 2305 * <code> 2306 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2307 * </code> 2308 */ 2309 public com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder getAnnotationSourceOrBuilder()2310 getAnnotationSourceOrBuilder() { 2311 if (annotationSourceBuilder_ != null) { 2312 return annotationSourceBuilder_.getMessageOrBuilder(); 2313 } else { 2314 return annotationSource_ == null 2315 ? com.google.cloud.aiplatform.v1.UserActionReference.getDefaultInstance() 2316 : annotationSource_; 2317 } 2318 } 2319 /** 2320 * 2321 * 2322 * <pre> 2323 * Output only. The source of the Annotation. 2324 * </pre> 2325 * 2326 * <code> 2327 * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2328 * </code> 2329 */ 2330 private com.google.protobuf.SingleFieldBuilderV3< 2331 com.google.cloud.aiplatform.v1.UserActionReference, 2332 com.google.cloud.aiplatform.v1.UserActionReference.Builder, 2333 com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder> getAnnotationSourceFieldBuilder()2334 getAnnotationSourceFieldBuilder() { 2335 if (annotationSourceBuilder_ == null) { 2336 annotationSourceBuilder_ = 2337 new com.google.protobuf.SingleFieldBuilderV3< 2338 com.google.cloud.aiplatform.v1.UserActionReference, 2339 com.google.cloud.aiplatform.v1.UserActionReference.Builder, 2340 com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder>( 2341 getAnnotationSource(), getParentForChildren(), isClean()); 2342 annotationSource_ = null; 2343 } 2344 return annotationSourceBuilder_; 2345 } 2346 2347 private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_; 2348 internalGetLabels()2349 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() { 2350 if (labels_ == null) { 2351 return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); 2352 } 2353 return labels_; 2354 } 2355 2356 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableLabels()2357 internalGetMutableLabels() { 2358 if (labels_ == null) { 2359 labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); 2360 } 2361 if (!labels_.isMutable()) { 2362 labels_ = labels_.copy(); 2363 } 2364 bitField0_ |= 0x00000080; 2365 onChanged(); 2366 return labels_; 2367 } 2368 getLabelsCount()2369 public int getLabelsCount() { 2370 return internalGetLabels().getMap().size(); 2371 } 2372 /** 2373 * 2374 * 2375 * <pre> 2376 * Optional. The labels with user-defined metadata to organize your 2377 * Annotations. 2378 * Label keys and values can be no longer than 64 characters 2379 * (Unicode codepoints), can only contain lowercase letters, numeric 2380 * characters, underscores and dashes. International characters are allowed. 2381 * No more than 64 user labels can be associated with one Annotation(System 2382 * labels are excluded). 2383 * See https://goo.gl/xmQnxf for more information and examples of labels. 2384 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 2385 * and are immutable. Following system labels exist for each Annotation: 2386 * * "aiplatform.googleapis.com/annotation_set_name": 2387 * optional, name of the UI's annotation set this Annotation belongs to. 2388 * If not set, the Annotation is not visible in the UI. 2389 * * "aiplatform.googleapis.com/payload_schema": 2390 * output only, its value is the 2391 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 2392 * title. 2393 * </pre> 2394 * 2395 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2396 */ 2397 @java.lang.Override containsLabels(java.lang.String key)2398 public boolean containsLabels(java.lang.String key) { 2399 if (key == null) { 2400 throw new NullPointerException("map key"); 2401 } 2402 return internalGetLabels().getMap().containsKey(key); 2403 } 2404 /** Use {@link #getLabelsMap()} instead. */ 2405 @java.lang.Override 2406 @java.lang.Deprecated getLabels()2407 public java.util.Map<java.lang.String, java.lang.String> getLabels() { 2408 return getLabelsMap(); 2409 } 2410 /** 2411 * 2412 * 2413 * <pre> 2414 * Optional. The labels with user-defined metadata to organize your 2415 * Annotations. 2416 * Label keys and values can be no longer than 64 characters 2417 * (Unicode codepoints), can only contain lowercase letters, numeric 2418 * characters, underscores and dashes. International characters are allowed. 2419 * No more than 64 user labels can be associated with one Annotation(System 2420 * labels are excluded). 2421 * See https://goo.gl/xmQnxf for more information and examples of labels. 2422 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 2423 * and are immutable. Following system labels exist for each Annotation: 2424 * * "aiplatform.googleapis.com/annotation_set_name": 2425 * optional, name of the UI's annotation set this Annotation belongs to. 2426 * If not set, the Annotation is not visible in the UI. 2427 * * "aiplatform.googleapis.com/payload_schema": 2428 * output only, its value is the 2429 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 2430 * title. 2431 * </pre> 2432 * 2433 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2434 */ 2435 @java.lang.Override getLabelsMap()2436 public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { 2437 return internalGetLabels().getMap(); 2438 } 2439 /** 2440 * 2441 * 2442 * <pre> 2443 * Optional. The labels with user-defined metadata to organize your 2444 * Annotations. 2445 * Label keys and values can be no longer than 64 characters 2446 * (Unicode codepoints), can only contain lowercase letters, numeric 2447 * characters, underscores and dashes. International characters are allowed. 2448 * No more than 64 user labels can be associated with one Annotation(System 2449 * labels are excluded). 2450 * See https://goo.gl/xmQnxf for more information and examples of labels. 2451 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 2452 * and are immutable. Following system labels exist for each Annotation: 2453 * * "aiplatform.googleapis.com/annotation_set_name": 2454 * optional, name of the UI's annotation set this Annotation belongs to. 2455 * If not set, the Annotation is not visible in the UI. 2456 * * "aiplatform.googleapis.com/payload_schema": 2457 * output only, its value is the 2458 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 2459 * title. 2460 * </pre> 2461 * 2462 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2463 */ 2464 @java.lang.Override getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)2465 public /* nullable */ java.lang.String getLabelsOrDefault( 2466 java.lang.String key, 2467 /* nullable */ 2468 java.lang.String defaultValue) { 2469 if (key == null) { 2470 throw new NullPointerException("map key"); 2471 } 2472 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 2473 return map.containsKey(key) ? map.get(key) : defaultValue; 2474 } 2475 /** 2476 * 2477 * 2478 * <pre> 2479 * Optional. The labels with user-defined metadata to organize your 2480 * Annotations. 2481 * Label keys and values can be no longer than 64 characters 2482 * (Unicode codepoints), can only contain lowercase letters, numeric 2483 * characters, underscores and dashes. International characters are allowed. 2484 * No more than 64 user labels can be associated with one Annotation(System 2485 * labels are excluded). 2486 * See https://goo.gl/xmQnxf for more information and examples of labels. 2487 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 2488 * and are immutable. Following system labels exist for each Annotation: 2489 * * "aiplatform.googleapis.com/annotation_set_name": 2490 * optional, name of the UI's annotation set this Annotation belongs to. 2491 * If not set, the Annotation is not visible in the UI. 2492 * * "aiplatform.googleapis.com/payload_schema": 2493 * output only, its value is the 2494 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 2495 * title. 2496 * </pre> 2497 * 2498 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2499 */ 2500 @java.lang.Override getLabelsOrThrow(java.lang.String key)2501 public java.lang.String getLabelsOrThrow(java.lang.String key) { 2502 if (key == null) { 2503 throw new NullPointerException("map key"); 2504 } 2505 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 2506 if (!map.containsKey(key)) { 2507 throw new java.lang.IllegalArgumentException(); 2508 } 2509 return map.get(key); 2510 } 2511 clearLabels()2512 public Builder clearLabels() { 2513 bitField0_ = (bitField0_ & ~0x00000080); 2514 internalGetMutableLabels().getMutableMap().clear(); 2515 return this; 2516 } 2517 /** 2518 * 2519 * 2520 * <pre> 2521 * Optional. The labels with user-defined metadata to organize your 2522 * Annotations. 2523 * Label keys and values can be no longer than 64 characters 2524 * (Unicode codepoints), can only contain lowercase letters, numeric 2525 * characters, underscores and dashes. International characters are allowed. 2526 * No more than 64 user labels can be associated with one Annotation(System 2527 * labels are excluded). 2528 * See https://goo.gl/xmQnxf for more information and examples of labels. 2529 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 2530 * and are immutable. Following system labels exist for each Annotation: 2531 * * "aiplatform.googleapis.com/annotation_set_name": 2532 * optional, name of the UI's annotation set this Annotation belongs to. 2533 * If not set, the Annotation is not visible in the UI. 2534 * * "aiplatform.googleapis.com/payload_schema": 2535 * output only, its value is the 2536 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 2537 * title. 2538 * </pre> 2539 * 2540 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2541 */ removeLabels(java.lang.String key)2542 public Builder removeLabels(java.lang.String key) { 2543 if (key == null) { 2544 throw new NullPointerException("map key"); 2545 } 2546 internalGetMutableLabels().getMutableMap().remove(key); 2547 return this; 2548 } 2549 /** Use alternate mutation accessors instead. */ 2550 @java.lang.Deprecated getMutableLabels()2551 public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() { 2552 bitField0_ |= 0x00000080; 2553 return internalGetMutableLabels().getMutableMap(); 2554 } 2555 /** 2556 * 2557 * 2558 * <pre> 2559 * Optional. The labels with user-defined metadata to organize your 2560 * Annotations. 2561 * Label keys and values can be no longer than 64 characters 2562 * (Unicode codepoints), can only contain lowercase letters, numeric 2563 * characters, underscores and dashes. International characters are allowed. 2564 * No more than 64 user labels can be associated with one Annotation(System 2565 * labels are excluded). 2566 * See https://goo.gl/xmQnxf for more information and examples of labels. 2567 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 2568 * and are immutable. Following system labels exist for each Annotation: 2569 * * "aiplatform.googleapis.com/annotation_set_name": 2570 * optional, name of the UI's annotation set this Annotation belongs to. 2571 * If not set, the Annotation is not visible in the UI. 2572 * * "aiplatform.googleapis.com/payload_schema": 2573 * output only, its value is the 2574 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 2575 * title. 2576 * </pre> 2577 * 2578 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2579 */ putLabels(java.lang.String key, java.lang.String value)2580 public Builder putLabels(java.lang.String key, java.lang.String value) { 2581 if (key == null) { 2582 throw new NullPointerException("map key"); 2583 } 2584 if (value == null) { 2585 throw new NullPointerException("map value"); 2586 } 2587 internalGetMutableLabels().getMutableMap().put(key, value); 2588 bitField0_ |= 0x00000080; 2589 return this; 2590 } 2591 /** 2592 * 2593 * 2594 * <pre> 2595 * Optional. The labels with user-defined metadata to organize your 2596 * Annotations. 2597 * Label keys and values can be no longer than 64 characters 2598 * (Unicode codepoints), can only contain lowercase letters, numeric 2599 * characters, underscores and dashes. International characters are allowed. 2600 * No more than 64 user labels can be associated with one Annotation(System 2601 * labels are excluded). 2602 * See https://goo.gl/xmQnxf for more information and examples of labels. 2603 * System reserved label keys are prefixed with "aiplatform.googleapis.com/" 2604 * and are immutable. Following system labels exist for each Annotation: 2605 * * "aiplatform.googleapis.com/annotation_set_name": 2606 * optional, name of the UI's annotation set this Annotation belongs to. 2607 * If not set, the Annotation is not visible in the UI. 2608 * * "aiplatform.googleapis.com/payload_schema": 2609 * output only, its value is the 2610 * [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] 2611 * title. 2612 * </pre> 2613 * 2614 * <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2615 */ putAllLabels(java.util.Map<java.lang.String, java.lang.String> values)2616 public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) { 2617 internalGetMutableLabels().getMutableMap().putAll(values); 2618 bitField0_ |= 0x00000080; 2619 return this; 2620 } 2621 2622 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2623 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2624 return super.setUnknownFields(unknownFields); 2625 } 2626 2627 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2628 public final Builder mergeUnknownFields( 2629 final com.google.protobuf.UnknownFieldSet unknownFields) { 2630 return super.mergeUnknownFields(unknownFields); 2631 } 2632 2633 // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.Annotation) 2634 } 2635 2636 // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Annotation) 2637 private static final com.google.cloud.aiplatform.v1.Annotation DEFAULT_INSTANCE; 2638 2639 static { 2640 DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Annotation(); 2641 } 2642 getDefaultInstance()2643 public static com.google.cloud.aiplatform.v1.Annotation getDefaultInstance() { 2644 return DEFAULT_INSTANCE; 2645 } 2646 2647 private static final com.google.protobuf.Parser<Annotation> PARSER = 2648 new com.google.protobuf.AbstractParser<Annotation>() { 2649 @java.lang.Override 2650 public Annotation parsePartialFrom( 2651 com.google.protobuf.CodedInputStream input, 2652 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2653 throws com.google.protobuf.InvalidProtocolBufferException { 2654 Builder builder = newBuilder(); 2655 try { 2656 builder.mergeFrom(input, extensionRegistry); 2657 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2658 throw e.setUnfinishedMessage(builder.buildPartial()); 2659 } catch (com.google.protobuf.UninitializedMessageException e) { 2660 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2661 } catch (java.io.IOException e) { 2662 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2663 .setUnfinishedMessage(builder.buildPartial()); 2664 } 2665 return builder.buildPartial(); 2666 } 2667 }; 2668 parser()2669 public static com.google.protobuf.Parser<Annotation> parser() { 2670 return PARSER; 2671 } 2672 2673 @java.lang.Override getParserForType()2674 public com.google.protobuf.Parser<Annotation> getParserForType() { 2675 return PARSER; 2676 } 2677 2678 @java.lang.Override getDefaultInstanceForType()2679 public com.google.cloud.aiplatform.v1.Annotation getDefaultInstanceForType() { 2680 return DEFAULT_INSTANCE; 2681 } 2682 } 2683