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