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/contentwarehouse/v1/document.proto 18 19 package com.google.cloud.contentwarehouse.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Timestamp value type. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.contentwarehouse.v1.TimestampValue} 29 */ 30 public final class TimestampValue extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.contentwarehouse.v1.TimestampValue) 33 TimestampValueOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use TimestampValue.newBuilder() to construct. TimestampValue(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private TimestampValue(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 TimestampValue()40 private TimestampValue() {} 41 42 @java.lang.Override 43 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)44 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 45 return new TimestampValue(); 46 } 47 48 @java.lang.Override getUnknownFields()49 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 50 return this.unknownFields; 51 } 52 getDescriptor()53 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 54 return com.google.cloud.contentwarehouse.v1.DocumentProto 55 .internal_static_google_cloud_contentwarehouse_v1_TimestampValue_descriptor; 56 } 57 58 @java.lang.Override 59 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()60 internalGetFieldAccessorTable() { 61 return com.google.cloud.contentwarehouse.v1.DocumentProto 62 .internal_static_google_cloud_contentwarehouse_v1_TimestampValue_fieldAccessorTable 63 .ensureFieldAccessorsInitialized( 64 com.google.cloud.contentwarehouse.v1.TimestampValue.class, 65 com.google.cloud.contentwarehouse.v1.TimestampValue.Builder.class); 66 } 67 68 private int valueCase_ = 0; 69 private java.lang.Object value_; 70 71 public enum ValueCase 72 implements 73 com.google.protobuf.Internal.EnumLite, 74 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 75 TIMESTAMP_VALUE(1), 76 TEXT_VALUE(2), 77 VALUE_NOT_SET(0); 78 private final int value; 79 ValueCase(int value)80 private ValueCase(int value) { 81 this.value = value; 82 } 83 /** 84 * @param value The number of the enum to look for. 85 * @return The enum associated with the given number. 86 * @deprecated Use {@link #forNumber(int)} instead. 87 */ 88 @java.lang.Deprecated valueOf(int value)89 public static ValueCase valueOf(int value) { 90 return forNumber(value); 91 } 92 forNumber(int value)93 public static ValueCase forNumber(int value) { 94 switch (value) { 95 case 1: 96 return TIMESTAMP_VALUE; 97 case 2: 98 return TEXT_VALUE; 99 case 0: 100 return VALUE_NOT_SET; 101 default: 102 return null; 103 } 104 } 105 getNumber()106 public int getNumber() { 107 return this.value; 108 } 109 }; 110 getValueCase()111 public ValueCase getValueCase() { 112 return ValueCase.forNumber(valueCase_); 113 } 114 115 public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 1; 116 /** 117 * 118 * 119 * <pre> 120 * Timestamp value 121 * </pre> 122 * 123 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 124 * 125 * @return Whether the timestampValue field is set. 126 */ 127 @java.lang.Override hasTimestampValue()128 public boolean hasTimestampValue() { 129 return valueCase_ == 1; 130 } 131 /** 132 * 133 * 134 * <pre> 135 * Timestamp value 136 * </pre> 137 * 138 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 139 * 140 * @return The timestampValue. 141 */ 142 @java.lang.Override getTimestampValue()143 public com.google.protobuf.Timestamp getTimestampValue() { 144 if (valueCase_ == 1) { 145 return (com.google.protobuf.Timestamp) value_; 146 } 147 return com.google.protobuf.Timestamp.getDefaultInstance(); 148 } 149 /** 150 * 151 * 152 * <pre> 153 * Timestamp value 154 * </pre> 155 * 156 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 157 */ 158 @java.lang.Override getTimestampValueOrBuilder()159 public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { 160 if (valueCase_ == 1) { 161 return (com.google.protobuf.Timestamp) value_; 162 } 163 return com.google.protobuf.Timestamp.getDefaultInstance(); 164 } 165 166 public static final int TEXT_VALUE_FIELD_NUMBER = 2; 167 /** 168 * 169 * 170 * <pre> 171 * The string must represent a valid instant in UTC and is parsed using 172 * java.time.format.DateTimeFormatter.ISO_INSTANT. 173 * e.g. "2013-09-29T18:46:19Z" 174 * </pre> 175 * 176 * <code>string text_value = 2;</code> 177 * 178 * @return Whether the textValue field is set. 179 */ hasTextValue()180 public boolean hasTextValue() { 181 return valueCase_ == 2; 182 } 183 /** 184 * 185 * 186 * <pre> 187 * The string must represent a valid instant in UTC and is parsed using 188 * java.time.format.DateTimeFormatter.ISO_INSTANT. 189 * e.g. "2013-09-29T18:46:19Z" 190 * </pre> 191 * 192 * <code>string text_value = 2;</code> 193 * 194 * @return The textValue. 195 */ getTextValue()196 public java.lang.String getTextValue() { 197 java.lang.Object ref = ""; 198 if (valueCase_ == 2) { 199 ref = value_; 200 } 201 if (ref instanceof java.lang.String) { 202 return (java.lang.String) ref; 203 } else { 204 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 205 java.lang.String s = bs.toStringUtf8(); 206 if (valueCase_ == 2) { 207 value_ = s; 208 } 209 return s; 210 } 211 } 212 /** 213 * 214 * 215 * <pre> 216 * The string must represent a valid instant in UTC and is parsed using 217 * java.time.format.DateTimeFormatter.ISO_INSTANT. 218 * e.g. "2013-09-29T18:46:19Z" 219 * </pre> 220 * 221 * <code>string text_value = 2;</code> 222 * 223 * @return The bytes for textValue. 224 */ getTextValueBytes()225 public com.google.protobuf.ByteString getTextValueBytes() { 226 java.lang.Object ref = ""; 227 if (valueCase_ == 2) { 228 ref = value_; 229 } 230 if (ref instanceof java.lang.String) { 231 com.google.protobuf.ByteString b = 232 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 233 if (valueCase_ == 2) { 234 value_ = b; 235 } 236 return b; 237 } else { 238 return (com.google.protobuf.ByteString) ref; 239 } 240 } 241 242 private byte memoizedIsInitialized = -1; 243 244 @java.lang.Override isInitialized()245 public final boolean isInitialized() { 246 byte isInitialized = memoizedIsInitialized; 247 if (isInitialized == 1) return true; 248 if (isInitialized == 0) return false; 249 250 memoizedIsInitialized = 1; 251 return true; 252 } 253 254 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)255 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 256 if (valueCase_ == 1) { 257 output.writeMessage(1, (com.google.protobuf.Timestamp) value_); 258 } 259 if (valueCase_ == 2) { 260 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); 261 } 262 getUnknownFields().writeTo(output); 263 } 264 265 @java.lang.Override getSerializedSize()266 public int getSerializedSize() { 267 int size = memoizedSize; 268 if (size != -1) return size; 269 270 size = 0; 271 if (valueCase_ == 1) { 272 size += 273 com.google.protobuf.CodedOutputStream.computeMessageSize( 274 1, (com.google.protobuf.Timestamp) value_); 275 } 276 if (valueCase_ == 2) { 277 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); 278 } 279 size += getUnknownFields().getSerializedSize(); 280 memoizedSize = size; 281 return size; 282 } 283 284 @java.lang.Override equals(final java.lang.Object obj)285 public boolean equals(final java.lang.Object obj) { 286 if (obj == this) { 287 return true; 288 } 289 if (!(obj instanceof com.google.cloud.contentwarehouse.v1.TimestampValue)) { 290 return super.equals(obj); 291 } 292 com.google.cloud.contentwarehouse.v1.TimestampValue other = 293 (com.google.cloud.contentwarehouse.v1.TimestampValue) obj; 294 295 if (!getValueCase().equals(other.getValueCase())) return false; 296 switch (valueCase_) { 297 case 1: 298 if (!getTimestampValue().equals(other.getTimestampValue())) return false; 299 break; 300 case 2: 301 if (!getTextValue().equals(other.getTextValue())) return false; 302 break; 303 case 0: 304 default: 305 } 306 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 307 return true; 308 } 309 310 @java.lang.Override hashCode()311 public int hashCode() { 312 if (memoizedHashCode != 0) { 313 return memoizedHashCode; 314 } 315 int hash = 41; 316 hash = (19 * hash) + getDescriptor().hashCode(); 317 switch (valueCase_) { 318 case 1: 319 hash = (37 * hash) + TIMESTAMP_VALUE_FIELD_NUMBER; 320 hash = (53 * hash) + getTimestampValue().hashCode(); 321 break; 322 case 2: 323 hash = (37 * hash) + TEXT_VALUE_FIELD_NUMBER; 324 hash = (53 * hash) + getTextValue().hashCode(); 325 break; 326 case 0: 327 default: 328 } 329 hash = (29 * hash) + getUnknownFields().hashCode(); 330 memoizedHashCode = hash; 331 return hash; 332 } 333 parseFrom( java.nio.ByteBuffer data)334 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseFrom( 335 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 336 return PARSER.parseFrom(data); 337 } 338 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)339 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseFrom( 340 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 341 throws com.google.protobuf.InvalidProtocolBufferException { 342 return PARSER.parseFrom(data, extensionRegistry); 343 } 344 parseFrom( com.google.protobuf.ByteString data)345 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseFrom( 346 com.google.protobuf.ByteString data) 347 throws com.google.protobuf.InvalidProtocolBufferException { 348 return PARSER.parseFrom(data); 349 } 350 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)351 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseFrom( 352 com.google.protobuf.ByteString data, 353 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 354 throws com.google.protobuf.InvalidProtocolBufferException { 355 return PARSER.parseFrom(data, extensionRegistry); 356 } 357 parseFrom(byte[] data)358 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseFrom(byte[] data) 359 throws com.google.protobuf.InvalidProtocolBufferException { 360 return PARSER.parseFrom(data); 361 } 362 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)363 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseFrom( 364 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 365 throws com.google.protobuf.InvalidProtocolBufferException { 366 return PARSER.parseFrom(data, extensionRegistry); 367 } 368 parseFrom( java.io.InputStream input)369 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseFrom( 370 java.io.InputStream input) throws java.io.IOException { 371 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 372 } 373 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)374 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseFrom( 375 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 376 throws java.io.IOException { 377 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 378 PARSER, input, extensionRegistry); 379 } 380 parseDelimitedFrom( java.io.InputStream input)381 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseDelimitedFrom( 382 java.io.InputStream input) throws java.io.IOException { 383 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 384 } 385 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)386 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseDelimitedFrom( 387 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 388 throws java.io.IOException { 389 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 390 PARSER, input, extensionRegistry); 391 } 392 parseFrom( com.google.protobuf.CodedInputStream input)393 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseFrom( 394 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 395 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 396 } 397 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)398 public static com.google.cloud.contentwarehouse.v1.TimestampValue parseFrom( 399 com.google.protobuf.CodedInputStream input, 400 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 401 throws java.io.IOException { 402 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 403 PARSER, input, extensionRegistry); 404 } 405 406 @java.lang.Override newBuilderForType()407 public Builder newBuilderForType() { 408 return newBuilder(); 409 } 410 newBuilder()411 public static Builder newBuilder() { 412 return DEFAULT_INSTANCE.toBuilder(); 413 } 414 newBuilder(com.google.cloud.contentwarehouse.v1.TimestampValue prototype)415 public static Builder newBuilder(com.google.cloud.contentwarehouse.v1.TimestampValue prototype) { 416 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 417 } 418 419 @java.lang.Override toBuilder()420 public Builder toBuilder() { 421 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 422 } 423 424 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)425 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 426 Builder builder = new Builder(parent); 427 return builder; 428 } 429 /** 430 * 431 * 432 * <pre> 433 * Timestamp value type. 434 * </pre> 435 * 436 * Protobuf type {@code google.cloud.contentwarehouse.v1.TimestampValue} 437 */ 438 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 439 implements 440 // @@protoc_insertion_point(builder_implements:google.cloud.contentwarehouse.v1.TimestampValue) 441 com.google.cloud.contentwarehouse.v1.TimestampValueOrBuilder { getDescriptor()442 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 443 return com.google.cloud.contentwarehouse.v1.DocumentProto 444 .internal_static_google_cloud_contentwarehouse_v1_TimestampValue_descriptor; 445 } 446 447 @java.lang.Override 448 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()449 internalGetFieldAccessorTable() { 450 return com.google.cloud.contentwarehouse.v1.DocumentProto 451 .internal_static_google_cloud_contentwarehouse_v1_TimestampValue_fieldAccessorTable 452 .ensureFieldAccessorsInitialized( 453 com.google.cloud.contentwarehouse.v1.TimestampValue.class, 454 com.google.cloud.contentwarehouse.v1.TimestampValue.Builder.class); 455 } 456 457 // Construct using com.google.cloud.contentwarehouse.v1.TimestampValue.newBuilder() Builder()458 private Builder() {} 459 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)460 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 461 super(parent); 462 } 463 464 @java.lang.Override clear()465 public Builder clear() { 466 super.clear(); 467 bitField0_ = 0; 468 if (timestampValueBuilder_ != null) { 469 timestampValueBuilder_.clear(); 470 } 471 valueCase_ = 0; 472 value_ = null; 473 return this; 474 } 475 476 @java.lang.Override getDescriptorForType()477 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 478 return com.google.cloud.contentwarehouse.v1.DocumentProto 479 .internal_static_google_cloud_contentwarehouse_v1_TimestampValue_descriptor; 480 } 481 482 @java.lang.Override getDefaultInstanceForType()483 public com.google.cloud.contentwarehouse.v1.TimestampValue getDefaultInstanceForType() { 484 return com.google.cloud.contentwarehouse.v1.TimestampValue.getDefaultInstance(); 485 } 486 487 @java.lang.Override build()488 public com.google.cloud.contentwarehouse.v1.TimestampValue build() { 489 com.google.cloud.contentwarehouse.v1.TimestampValue result = buildPartial(); 490 if (!result.isInitialized()) { 491 throw newUninitializedMessageException(result); 492 } 493 return result; 494 } 495 496 @java.lang.Override buildPartial()497 public com.google.cloud.contentwarehouse.v1.TimestampValue buildPartial() { 498 com.google.cloud.contentwarehouse.v1.TimestampValue result = 499 new com.google.cloud.contentwarehouse.v1.TimestampValue(this); 500 if (bitField0_ != 0) { 501 buildPartial0(result); 502 } 503 buildPartialOneofs(result); 504 onBuilt(); 505 return result; 506 } 507 buildPartial0(com.google.cloud.contentwarehouse.v1.TimestampValue result)508 private void buildPartial0(com.google.cloud.contentwarehouse.v1.TimestampValue result) { 509 int from_bitField0_ = bitField0_; 510 } 511 buildPartialOneofs(com.google.cloud.contentwarehouse.v1.TimestampValue result)512 private void buildPartialOneofs(com.google.cloud.contentwarehouse.v1.TimestampValue result) { 513 result.valueCase_ = valueCase_; 514 result.value_ = this.value_; 515 if (valueCase_ == 1 && timestampValueBuilder_ != null) { 516 result.value_ = timestampValueBuilder_.build(); 517 } 518 } 519 520 @java.lang.Override clone()521 public Builder clone() { 522 return super.clone(); 523 } 524 525 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)526 public Builder setField( 527 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 528 return super.setField(field, value); 529 } 530 531 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)532 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 533 return super.clearField(field); 534 } 535 536 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)537 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 538 return super.clearOneof(oneof); 539 } 540 541 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)542 public Builder setRepeatedField( 543 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 544 return super.setRepeatedField(field, index, value); 545 } 546 547 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)548 public Builder addRepeatedField( 549 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 550 return super.addRepeatedField(field, value); 551 } 552 553 @java.lang.Override mergeFrom(com.google.protobuf.Message other)554 public Builder mergeFrom(com.google.protobuf.Message other) { 555 if (other instanceof com.google.cloud.contentwarehouse.v1.TimestampValue) { 556 return mergeFrom((com.google.cloud.contentwarehouse.v1.TimestampValue) other); 557 } else { 558 super.mergeFrom(other); 559 return this; 560 } 561 } 562 mergeFrom(com.google.cloud.contentwarehouse.v1.TimestampValue other)563 public Builder mergeFrom(com.google.cloud.contentwarehouse.v1.TimestampValue other) { 564 if (other == com.google.cloud.contentwarehouse.v1.TimestampValue.getDefaultInstance()) 565 return this; 566 switch (other.getValueCase()) { 567 case TIMESTAMP_VALUE: 568 { 569 mergeTimestampValue(other.getTimestampValue()); 570 break; 571 } 572 case TEXT_VALUE: 573 { 574 valueCase_ = 2; 575 value_ = other.value_; 576 onChanged(); 577 break; 578 } 579 case VALUE_NOT_SET: 580 { 581 break; 582 } 583 } 584 this.mergeUnknownFields(other.getUnknownFields()); 585 onChanged(); 586 return this; 587 } 588 589 @java.lang.Override isInitialized()590 public final boolean isInitialized() { 591 return true; 592 } 593 594 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)595 public Builder mergeFrom( 596 com.google.protobuf.CodedInputStream input, 597 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 598 throws java.io.IOException { 599 if (extensionRegistry == null) { 600 throw new java.lang.NullPointerException(); 601 } 602 try { 603 boolean done = false; 604 while (!done) { 605 int tag = input.readTag(); 606 switch (tag) { 607 case 0: 608 done = true; 609 break; 610 case 10: 611 { 612 input.readMessage(getTimestampValueFieldBuilder().getBuilder(), extensionRegistry); 613 valueCase_ = 1; 614 break; 615 } // case 10 616 case 18: 617 { 618 java.lang.String s = input.readStringRequireUtf8(); 619 valueCase_ = 2; 620 value_ = s; 621 break; 622 } // case 18 623 default: 624 { 625 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 626 done = true; // was an endgroup tag 627 } 628 break; 629 } // default: 630 } // switch (tag) 631 } // while (!done) 632 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 633 throw e.unwrapIOException(); 634 } finally { 635 onChanged(); 636 } // finally 637 return this; 638 } 639 640 private int valueCase_ = 0; 641 private java.lang.Object value_; 642 getValueCase()643 public ValueCase getValueCase() { 644 return ValueCase.forNumber(valueCase_); 645 } 646 clearValue()647 public Builder clearValue() { 648 valueCase_ = 0; 649 value_ = null; 650 onChanged(); 651 return this; 652 } 653 654 private int bitField0_; 655 656 private com.google.protobuf.SingleFieldBuilderV3< 657 com.google.protobuf.Timestamp, 658 com.google.protobuf.Timestamp.Builder, 659 com.google.protobuf.TimestampOrBuilder> 660 timestampValueBuilder_; 661 /** 662 * 663 * 664 * <pre> 665 * Timestamp value 666 * </pre> 667 * 668 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 669 * 670 * @return Whether the timestampValue field is set. 671 */ 672 @java.lang.Override hasTimestampValue()673 public boolean hasTimestampValue() { 674 return valueCase_ == 1; 675 } 676 /** 677 * 678 * 679 * <pre> 680 * Timestamp value 681 * </pre> 682 * 683 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 684 * 685 * @return The timestampValue. 686 */ 687 @java.lang.Override getTimestampValue()688 public com.google.protobuf.Timestamp getTimestampValue() { 689 if (timestampValueBuilder_ == null) { 690 if (valueCase_ == 1) { 691 return (com.google.protobuf.Timestamp) value_; 692 } 693 return com.google.protobuf.Timestamp.getDefaultInstance(); 694 } else { 695 if (valueCase_ == 1) { 696 return timestampValueBuilder_.getMessage(); 697 } 698 return com.google.protobuf.Timestamp.getDefaultInstance(); 699 } 700 } 701 /** 702 * 703 * 704 * <pre> 705 * Timestamp value 706 * </pre> 707 * 708 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 709 */ setTimestampValue(com.google.protobuf.Timestamp value)710 public Builder setTimestampValue(com.google.protobuf.Timestamp value) { 711 if (timestampValueBuilder_ == null) { 712 if (value == null) { 713 throw new NullPointerException(); 714 } 715 value_ = value; 716 onChanged(); 717 } else { 718 timestampValueBuilder_.setMessage(value); 719 } 720 valueCase_ = 1; 721 return this; 722 } 723 /** 724 * 725 * 726 * <pre> 727 * Timestamp value 728 * </pre> 729 * 730 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 731 */ setTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue)732 public Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue) { 733 if (timestampValueBuilder_ == null) { 734 value_ = builderForValue.build(); 735 onChanged(); 736 } else { 737 timestampValueBuilder_.setMessage(builderForValue.build()); 738 } 739 valueCase_ = 1; 740 return this; 741 } 742 /** 743 * 744 * 745 * <pre> 746 * Timestamp value 747 * </pre> 748 * 749 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 750 */ mergeTimestampValue(com.google.protobuf.Timestamp value)751 public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) { 752 if (timestampValueBuilder_ == null) { 753 if (valueCase_ == 1 && value_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 754 value_ = 755 com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) value_) 756 .mergeFrom(value) 757 .buildPartial(); 758 } else { 759 value_ = value; 760 } 761 onChanged(); 762 } else { 763 if (valueCase_ == 1) { 764 timestampValueBuilder_.mergeFrom(value); 765 } else { 766 timestampValueBuilder_.setMessage(value); 767 } 768 } 769 valueCase_ = 1; 770 return this; 771 } 772 /** 773 * 774 * 775 * <pre> 776 * Timestamp value 777 * </pre> 778 * 779 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 780 */ clearTimestampValue()781 public Builder clearTimestampValue() { 782 if (timestampValueBuilder_ == null) { 783 if (valueCase_ == 1) { 784 valueCase_ = 0; 785 value_ = null; 786 onChanged(); 787 } 788 } else { 789 if (valueCase_ == 1) { 790 valueCase_ = 0; 791 value_ = null; 792 } 793 timestampValueBuilder_.clear(); 794 } 795 return this; 796 } 797 /** 798 * 799 * 800 * <pre> 801 * Timestamp value 802 * </pre> 803 * 804 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 805 */ getTimestampValueBuilder()806 public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { 807 return getTimestampValueFieldBuilder().getBuilder(); 808 } 809 /** 810 * 811 * 812 * <pre> 813 * Timestamp value 814 * </pre> 815 * 816 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 817 */ 818 @java.lang.Override getTimestampValueOrBuilder()819 public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { 820 if ((valueCase_ == 1) && (timestampValueBuilder_ != null)) { 821 return timestampValueBuilder_.getMessageOrBuilder(); 822 } else { 823 if (valueCase_ == 1) { 824 return (com.google.protobuf.Timestamp) value_; 825 } 826 return com.google.protobuf.Timestamp.getDefaultInstance(); 827 } 828 } 829 /** 830 * 831 * 832 * <pre> 833 * Timestamp value 834 * </pre> 835 * 836 * <code>.google.protobuf.Timestamp timestamp_value = 1;</code> 837 */ 838 private com.google.protobuf.SingleFieldBuilderV3< 839 com.google.protobuf.Timestamp, 840 com.google.protobuf.Timestamp.Builder, 841 com.google.protobuf.TimestampOrBuilder> getTimestampValueFieldBuilder()842 getTimestampValueFieldBuilder() { 843 if (timestampValueBuilder_ == null) { 844 if (!(valueCase_ == 1)) { 845 value_ = com.google.protobuf.Timestamp.getDefaultInstance(); 846 } 847 timestampValueBuilder_ = 848 new com.google.protobuf.SingleFieldBuilderV3< 849 com.google.protobuf.Timestamp, 850 com.google.protobuf.Timestamp.Builder, 851 com.google.protobuf.TimestampOrBuilder>( 852 (com.google.protobuf.Timestamp) value_, getParentForChildren(), isClean()); 853 value_ = null; 854 } 855 valueCase_ = 1; 856 onChanged(); 857 return timestampValueBuilder_; 858 } 859 860 /** 861 * 862 * 863 * <pre> 864 * The string must represent a valid instant in UTC and is parsed using 865 * java.time.format.DateTimeFormatter.ISO_INSTANT. 866 * e.g. "2013-09-29T18:46:19Z" 867 * </pre> 868 * 869 * <code>string text_value = 2;</code> 870 * 871 * @return Whether the textValue field is set. 872 */ 873 @java.lang.Override hasTextValue()874 public boolean hasTextValue() { 875 return valueCase_ == 2; 876 } 877 /** 878 * 879 * 880 * <pre> 881 * The string must represent a valid instant in UTC and is parsed using 882 * java.time.format.DateTimeFormatter.ISO_INSTANT. 883 * e.g. "2013-09-29T18:46:19Z" 884 * </pre> 885 * 886 * <code>string text_value = 2;</code> 887 * 888 * @return The textValue. 889 */ 890 @java.lang.Override getTextValue()891 public java.lang.String getTextValue() { 892 java.lang.Object ref = ""; 893 if (valueCase_ == 2) { 894 ref = value_; 895 } 896 if (!(ref instanceof java.lang.String)) { 897 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 898 java.lang.String s = bs.toStringUtf8(); 899 if (valueCase_ == 2) { 900 value_ = s; 901 } 902 return s; 903 } else { 904 return (java.lang.String) ref; 905 } 906 } 907 /** 908 * 909 * 910 * <pre> 911 * The string must represent a valid instant in UTC and is parsed using 912 * java.time.format.DateTimeFormatter.ISO_INSTANT. 913 * e.g. "2013-09-29T18:46:19Z" 914 * </pre> 915 * 916 * <code>string text_value = 2;</code> 917 * 918 * @return The bytes for textValue. 919 */ 920 @java.lang.Override getTextValueBytes()921 public com.google.protobuf.ByteString getTextValueBytes() { 922 java.lang.Object ref = ""; 923 if (valueCase_ == 2) { 924 ref = value_; 925 } 926 if (ref instanceof String) { 927 com.google.protobuf.ByteString b = 928 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 929 if (valueCase_ == 2) { 930 value_ = b; 931 } 932 return b; 933 } else { 934 return (com.google.protobuf.ByteString) ref; 935 } 936 } 937 /** 938 * 939 * 940 * <pre> 941 * The string must represent a valid instant in UTC and is parsed using 942 * java.time.format.DateTimeFormatter.ISO_INSTANT. 943 * e.g. "2013-09-29T18:46:19Z" 944 * </pre> 945 * 946 * <code>string text_value = 2;</code> 947 * 948 * @param value The textValue to set. 949 * @return This builder for chaining. 950 */ setTextValue(java.lang.String value)951 public Builder setTextValue(java.lang.String value) { 952 if (value == null) { 953 throw new NullPointerException(); 954 } 955 valueCase_ = 2; 956 value_ = value; 957 onChanged(); 958 return this; 959 } 960 /** 961 * 962 * 963 * <pre> 964 * The string must represent a valid instant in UTC and is parsed using 965 * java.time.format.DateTimeFormatter.ISO_INSTANT. 966 * e.g. "2013-09-29T18:46:19Z" 967 * </pre> 968 * 969 * <code>string text_value = 2;</code> 970 * 971 * @return This builder for chaining. 972 */ clearTextValue()973 public Builder clearTextValue() { 974 if (valueCase_ == 2) { 975 valueCase_ = 0; 976 value_ = null; 977 onChanged(); 978 } 979 return this; 980 } 981 /** 982 * 983 * 984 * <pre> 985 * The string must represent a valid instant in UTC and is parsed using 986 * java.time.format.DateTimeFormatter.ISO_INSTANT. 987 * e.g. "2013-09-29T18:46:19Z" 988 * </pre> 989 * 990 * <code>string text_value = 2;</code> 991 * 992 * @param value The bytes for textValue to set. 993 * @return This builder for chaining. 994 */ setTextValueBytes(com.google.protobuf.ByteString value)995 public Builder setTextValueBytes(com.google.protobuf.ByteString value) { 996 if (value == null) { 997 throw new NullPointerException(); 998 } 999 checkByteStringIsUtf8(value); 1000 valueCase_ = 2; 1001 value_ = value; 1002 onChanged(); 1003 return this; 1004 } 1005 1006 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1007 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1008 return super.setUnknownFields(unknownFields); 1009 } 1010 1011 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1012 public final Builder mergeUnknownFields( 1013 final com.google.protobuf.UnknownFieldSet unknownFields) { 1014 return super.mergeUnknownFields(unknownFields); 1015 } 1016 1017 // @@protoc_insertion_point(builder_scope:google.cloud.contentwarehouse.v1.TimestampValue) 1018 } 1019 1020 // @@protoc_insertion_point(class_scope:google.cloud.contentwarehouse.v1.TimestampValue) 1021 private static final com.google.cloud.contentwarehouse.v1.TimestampValue DEFAULT_INSTANCE; 1022 1023 static { 1024 DEFAULT_INSTANCE = new com.google.cloud.contentwarehouse.v1.TimestampValue(); 1025 } 1026 getDefaultInstance()1027 public static com.google.cloud.contentwarehouse.v1.TimestampValue getDefaultInstance() { 1028 return DEFAULT_INSTANCE; 1029 } 1030 1031 private static final com.google.protobuf.Parser<TimestampValue> PARSER = 1032 new com.google.protobuf.AbstractParser<TimestampValue>() { 1033 @java.lang.Override 1034 public TimestampValue parsePartialFrom( 1035 com.google.protobuf.CodedInputStream input, 1036 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1037 throws com.google.protobuf.InvalidProtocolBufferException { 1038 Builder builder = newBuilder(); 1039 try { 1040 builder.mergeFrom(input, extensionRegistry); 1041 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1042 throw e.setUnfinishedMessage(builder.buildPartial()); 1043 } catch (com.google.protobuf.UninitializedMessageException e) { 1044 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1045 } catch (java.io.IOException e) { 1046 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1047 .setUnfinishedMessage(builder.buildPartial()); 1048 } 1049 return builder.buildPartial(); 1050 } 1051 }; 1052 parser()1053 public static com.google.protobuf.Parser<TimestampValue> parser() { 1054 return PARSER; 1055 } 1056 1057 @java.lang.Override getParserForType()1058 public com.google.protobuf.Parser<TimestampValue> getParserForType() { 1059 return PARSER; 1060 } 1061 1062 @java.lang.Override getDefaultInstanceForType()1063 public com.google.cloud.contentwarehouse.v1.TimestampValue getDefaultInstanceForType() { 1064 return DEFAULT_INSTANCE; 1065 } 1066 } 1067