001// Generated by the protocol buffer compiler. DO NOT EDIT! 002// NO CHECKED-IN PROTOBUF GENCODE 003// source: java/dev/enola/thing/thing.proto 004// Protobuf Java Version: 4.32.0 005 006package dev.enola.thing.proto; 007 008/** 009 * <pre> 010 * Value is the stuff that Thing's fields are made of. 011 * </pre> 012 * 013 * Protobuf type {@code dev.enola.thing.Value} 014 */ 015@com.google.protobuf.Generated 016public final class Value extends 017 com.google.protobuf.GeneratedMessage implements 018 // @@protoc_insertion_point(message_implements:dev.enola.thing.Value) 019 ValueOrBuilder { 020private static final long serialVersionUID = 0L; 021 static { 022 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( 023 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, 024 /* major= */ 4, 025 /* minor= */ 32, 026 /* patch= */ 0, 027 /* suffix= */ "", 028 Value.class.getName()); 029 } 030 // Use Value.newBuilder() to construct. 031 private Value(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 032 super(builder); 033 } 034 private Value() { 035 } 036 037 public static final com.google.protobuf.Descriptors.Descriptor 038 getDescriptor() { 039 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_descriptor; 040 } 041 042 @java.lang.Override 043 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 044 internalGetFieldAccessorTable() { 045 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_fieldAccessorTable 046 .ensureFieldAccessorsInitialized( 047 dev.enola.thing.proto.Value.class, dev.enola.thing.proto.Value.Builder.class); 048 } 049 050 public interface LiteralOrBuilder extends 051 // @@protoc_insertion_point(interface_extends:dev.enola.thing.Value.Literal) 052 com.google.protobuf.MessageOrBuilder { 053 054 /** 055 * <pre> 056 * Value of the literal. This is "encoded" by the datatype, below. (RDF 057 * calls this the "label", but to us that sounds wrong, because it evokes 058 * "something to show human users" too much.) 059 * </pre> 060 * 061 * <code>string value = 1;</code> 062 * @return The value. 063 */ 064 java.lang.String getValue(); 065 /** 066 * <pre> 067 * Value of the literal. This is "encoded" by the datatype, below. (RDF 068 * calls this the "label", but to us that sounds wrong, because it evokes 069 * "something to show human users" too much.) 070 * </pre> 071 * 072 * <code>string value = 1;</code> 073 * @return The bytes for value. 074 */ 075 com.google.protobuf.ByteString 076 getValueBytes(); 077 078 /** 079 * <pre> 080 * This is an IRI. 081 * </pre> 082 * 083 * <code>string datatype = 2;</code> 084 * @return The datatype. 085 */ 086 java.lang.String getDatatype(); 087 /** 088 * <pre> 089 * This is an IRI. 090 * </pre> 091 * 092 * <code>string datatype = 2;</code> 093 * @return The bytes for datatype. 094 */ 095 com.google.protobuf.ByteString 096 getDatatypeBytes(); 097 } 098 /** 099 * Protobuf type {@code dev.enola.thing.Value.Literal} 100 */ 101 public static final class Literal extends 102 com.google.protobuf.GeneratedMessage implements 103 // @@protoc_insertion_point(message_implements:dev.enola.thing.Value.Literal) 104 LiteralOrBuilder { 105 private static final long serialVersionUID = 0L; 106 static { 107 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( 108 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, 109 /* major= */ 4, 110 /* minor= */ 32, 111 /* patch= */ 0, 112 /* suffix= */ "", 113 Literal.class.getName()); 114 } 115 // Use Literal.newBuilder() to construct. 116 private Literal(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 117 super(builder); 118 } 119 private Literal() { 120 value_ = ""; 121 datatype_ = ""; 122 } 123 124 public static final com.google.protobuf.Descriptors.Descriptor 125 getDescriptor() { 126 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_Literal_descriptor; 127 } 128 129 @java.lang.Override 130 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 131 internalGetFieldAccessorTable() { 132 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_Literal_fieldAccessorTable 133 .ensureFieldAccessorsInitialized( 134 dev.enola.thing.proto.Value.Literal.class, dev.enola.thing.proto.Value.Literal.Builder.class); 135 } 136 137 public static final int VALUE_FIELD_NUMBER = 1; 138 @SuppressWarnings("serial") 139 private volatile java.lang.Object value_ = ""; 140 /** 141 * <pre> 142 * Value of the literal. This is "encoded" by the datatype, below. (RDF 143 * calls this the "label", but to us that sounds wrong, because it evokes 144 * "something to show human users" too much.) 145 * </pre> 146 * 147 * <code>string value = 1;</code> 148 * @return The value. 149 */ 150 @java.lang.Override 151 public java.lang.String getValue() { 152 java.lang.Object ref = value_; 153 if (ref instanceof java.lang.String) { 154 return (java.lang.String) ref; 155 } else { 156 com.google.protobuf.ByteString bs = 157 (com.google.protobuf.ByteString) ref; 158 java.lang.String s = bs.toStringUtf8(); 159 value_ = s; 160 return s; 161 } 162 } 163 /** 164 * <pre> 165 * Value of the literal. This is "encoded" by the datatype, below. (RDF 166 * calls this the "label", but to us that sounds wrong, because it evokes 167 * "something to show human users" too much.) 168 * </pre> 169 * 170 * <code>string value = 1;</code> 171 * @return The bytes for value. 172 */ 173 @java.lang.Override 174 public com.google.protobuf.ByteString 175 getValueBytes() { 176 java.lang.Object ref = value_; 177 if (ref instanceof java.lang.String) { 178 com.google.protobuf.ByteString b = 179 com.google.protobuf.ByteString.copyFromUtf8( 180 (java.lang.String) ref); 181 value_ = b; 182 return b; 183 } else { 184 return (com.google.protobuf.ByteString) ref; 185 } 186 } 187 188 public static final int DATATYPE_FIELD_NUMBER = 2; 189 @SuppressWarnings("serial") 190 private volatile java.lang.Object datatype_ = ""; 191 /** 192 * <pre> 193 * This is an IRI. 194 * </pre> 195 * 196 * <code>string datatype = 2;</code> 197 * @return The datatype. 198 */ 199 @java.lang.Override 200 public java.lang.String getDatatype() { 201 java.lang.Object ref = datatype_; 202 if (ref instanceof java.lang.String) { 203 return (java.lang.String) ref; 204 } else { 205 com.google.protobuf.ByteString bs = 206 (com.google.protobuf.ByteString) ref; 207 java.lang.String s = bs.toStringUtf8(); 208 datatype_ = s; 209 return s; 210 } 211 } 212 /** 213 * <pre> 214 * This is an IRI. 215 * </pre> 216 * 217 * <code>string datatype = 2;</code> 218 * @return The bytes for datatype. 219 */ 220 @java.lang.Override 221 public com.google.protobuf.ByteString 222 getDatatypeBytes() { 223 java.lang.Object ref = datatype_; 224 if (ref instanceof java.lang.String) { 225 com.google.protobuf.ByteString b = 226 com.google.protobuf.ByteString.copyFromUtf8( 227 (java.lang.String) ref); 228 datatype_ = b; 229 return b; 230 } else { 231 return (com.google.protobuf.ByteString) ref; 232 } 233 } 234 235 private byte memoizedIsInitialized = -1; 236 @java.lang.Override 237 public final boolean isInitialized() { 238 byte isInitialized = memoizedIsInitialized; 239 if (isInitialized == 1) return true; 240 if (isInitialized == 0) return false; 241 242 memoizedIsInitialized = 1; 243 return true; 244 } 245 246 @java.lang.Override 247 public void writeTo(com.google.protobuf.CodedOutputStream output) 248 throws java.io.IOException { 249 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { 250 com.google.protobuf.GeneratedMessage.writeString(output, 1, value_); 251 } 252 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datatype_)) { 253 com.google.protobuf.GeneratedMessage.writeString(output, 2, datatype_); 254 } 255 getUnknownFields().writeTo(output); 256 } 257 258 @java.lang.Override 259 public int getSerializedSize() { 260 int size = memoizedSize; 261 if (size != -1) return size; 262 263 size = 0; 264 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { 265 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, value_); 266 } 267 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datatype_)) { 268 size += com.google.protobuf.GeneratedMessage.computeStringSize(2, datatype_); 269 } 270 size += getUnknownFields().getSerializedSize(); 271 memoizedSize = size; 272 return size; 273 } 274 275 @java.lang.Override 276 public boolean equals(final java.lang.Object obj) { 277 if (obj == this) { 278 return true; 279 } 280 if (!(obj instanceof dev.enola.thing.proto.Value.Literal)) { 281 return super.equals(obj); 282 } 283 dev.enola.thing.proto.Value.Literal other = (dev.enola.thing.proto.Value.Literal) obj; 284 285 if (!getValue() 286 .equals(other.getValue())) return false; 287 if (!getDatatype() 288 .equals(other.getDatatype())) return false; 289 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 290 return true; 291 } 292 293 @java.lang.Override 294 public int hashCode() { 295 if (memoizedHashCode != 0) { 296 return memoizedHashCode; 297 } 298 int hash = 41; 299 hash = (19 * hash) + getDescriptor().hashCode(); 300 hash = (37 * hash) + VALUE_FIELD_NUMBER; 301 hash = (53 * hash) + getValue().hashCode(); 302 hash = (37 * hash) + DATATYPE_FIELD_NUMBER; 303 hash = (53 * hash) + getDatatype().hashCode(); 304 hash = (29 * hash) + getUnknownFields().hashCode(); 305 memoizedHashCode = hash; 306 return hash; 307 } 308 309 public static dev.enola.thing.proto.Value.Literal parseFrom( 310 java.nio.ByteBuffer data) 311 throws com.google.protobuf.InvalidProtocolBufferException { 312 return PARSER.parseFrom(data); 313 } 314 public static dev.enola.thing.proto.Value.Literal parseFrom( 315 java.nio.ByteBuffer data, 316 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 317 throws com.google.protobuf.InvalidProtocolBufferException { 318 return PARSER.parseFrom(data, extensionRegistry); 319 } 320 public static dev.enola.thing.proto.Value.Literal parseFrom( 321 com.google.protobuf.ByteString data) 322 throws com.google.protobuf.InvalidProtocolBufferException { 323 return PARSER.parseFrom(data); 324 } 325 public static dev.enola.thing.proto.Value.Literal parseFrom( 326 com.google.protobuf.ByteString data, 327 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 328 throws com.google.protobuf.InvalidProtocolBufferException { 329 return PARSER.parseFrom(data, extensionRegistry); 330 } 331 public static dev.enola.thing.proto.Value.Literal parseFrom(byte[] data) 332 throws com.google.protobuf.InvalidProtocolBufferException { 333 return PARSER.parseFrom(data); 334 } 335 public static dev.enola.thing.proto.Value.Literal parseFrom( 336 byte[] data, 337 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 338 throws com.google.protobuf.InvalidProtocolBufferException { 339 return PARSER.parseFrom(data, extensionRegistry); 340 } 341 public static dev.enola.thing.proto.Value.Literal parseFrom(java.io.InputStream input) 342 throws java.io.IOException { 343 return com.google.protobuf.GeneratedMessage 344 .parseWithIOException(PARSER, input); 345 } 346 public static dev.enola.thing.proto.Value.Literal parseFrom( 347 java.io.InputStream input, 348 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 349 throws java.io.IOException { 350 return com.google.protobuf.GeneratedMessage 351 .parseWithIOException(PARSER, input, extensionRegistry); 352 } 353 354 public static dev.enola.thing.proto.Value.Literal parseDelimitedFrom(java.io.InputStream input) 355 throws java.io.IOException { 356 return com.google.protobuf.GeneratedMessage 357 .parseDelimitedWithIOException(PARSER, input); 358 } 359 360 public static dev.enola.thing.proto.Value.Literal parseDelimitedFrom( 361 java.io.InputStream input, 362 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 363 throws java.io.IOException { 364 return com.google.protobuf.GeneratedMessage 365 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); 366 } 367 public static dev.enola.thing.proto.Value.Literal parseFrom( 368 com.google.protobuf.CodedInputStream input) 369 throws java.io.IOException { 370 return com.google.protobuf.GeneratedMessage 371 .parseWithIOException(PARSER, input); 372 } 373 public static dev.enola.thing.proto.Value.Literal parseFrom( 374 com.google.protobuf.CodedInputStream input, 375 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 376 throws java.io.IOException { 377 return com.google.protobuf.GeneratedMessage 378 .parseWithIOException(PARSER, input, extensionRegistry); 379 } 380 381 @java.lang.Override 382 public Builder newBuilderForType() { return newBuilder(); } 383 public static Builder newBuilder() { 384 return DEFAULT_INSTANCE.toBuilder(); 385 } 386 public static Builder newBuilder(dev.enola.thing.proto.Value.Literal prototype) { 387 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 388 } 389 @java.lang.Override 390 public Builder toBuilder() { 391 return this == DEFAULT_INSTANCE 392 ? new Builder() : new Builder().mergeFrom(this); 393 } 394 395 @java.lang.Override 396 protected Builder newBuilderForType( 397 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 398 Builder builder = new Builder(parent); 399 return builder; 400 } 401 /** 402 * Protobuf type {@code dev.enola.thing.Value.Literal} 403 */ 404 public static final class Builder extends 405 com.google.protobuf.GeneratedMessage.Builder<Builder> implements 406 // @@protoc_insertion_point(builder_implements:dev.enola.thing.Value.Literal) 407 dev.enola.thing.proto.Value.LiteralOrBuilder { 408 public static final com.google.protobuf.Descriptors.Descriptor 409 getDescriptor() { 410 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_Literal_descriptor; 411 } 412 413 @java.lang.Override 414 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 415 internalGetFieldAccessorTable() { 416 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_Literal_fieldAccessorTable 417 .ensureFieldAccessorsInitialized( 418 dev.enola.thing.proto.Value.Literal.class, dev.enola.thing.proto.Value.Literal.Builder.class); 419 } 420 421 // Construct using dev.enola.thing.proto.Value.Literal.newBuilder() 422 private Builder() { 423 424 } 425 426 private Builder( 427 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 428 super(parent); 429 430 } 431 @java.lang.Override 432 public Builder clear() { 433 super.clear(); 434 bitField0_ = 0; 435 value_ = ""; 436 datatype_ = ""; 437 return this; 438 } 439 440 @java.lang.Override 441 public com.google.protobuf.Descriptors.Descriptor 442 getDescriptorForType() { 443 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_Literal_descriptor; 444 } 445 446 @java.lang.Override 447 public dev.enola.thing.proto.Value.Literal getDefaultInstanceForType() { 448 return dev.enola.thing.proto.Value.Literal.getDefaultInstance(); 449 } 450 451 @java.lang.Override 452 public dev.enola.thing.proto.Value.Literal build() { 453 dev.enola.thing.proto.Value.Literal result = buildPartial(); 454 if (!result.isInitialized()) { 455 throw newUninitializedMessageException(result); 456 } 457 return result; 458 } 459 460 @java.lang.Override 461 public dev.enola.thing.proto.Value.Literal buildPartial() { 462 dev.enola.thing.proto.Value.Literal result = new dev.enola.thing.proto.Value.Literal(this); 463 if (bitField0_ != 0) { buildPartial0(result); } 464 onBuilt(); 465 return result; 466 } 467 468 private void buildPartial0(dev.enola.thing.proto.Value.Literal result) { 469 int from_bitField0_ = bitField0_; 470 if (((from_bitField0_ & 0x00000001) != 0)) { 471 result.value_ = value_; 472 } 473 if (((from_bitField0_ & 0x00000002) != 0)) { 474 result.datatype_ = datatype_; 475 } 476 } 477 478 @java.lang.Override 479 public Builder mergeFrom(com.google.protobuf.Message other) { 480 if (other instanceof dev.enola.thing.proto.Value.Literal) { 481 return mergeFrom((dev.enola.thing.proto.Value.Literal)other); 482 } else { 483 super.mergeFrom(other); 484 return this; 485 } 486 } 487 488 public Builder mergeFrom(dev.enola.thing.proto.Value.Literal other) { 489 if (other == dev.enola.thing.proto.Value.Literal.getDefaultInstance()) return this; 490 if (!other.getValue().isEmpty()) { 491 value_ = other.value_; 492 bitField0_ |= 0x00000001; 493 onChanged(); 494 } 495 if (!other.getDatatype().isEmpty()) { 496 datatype_ = other.datatype_; 497 bitField0_ |= 0x00000002; 498 onChanged(); 499 } 500 this.mergeUnknownFields(other.getUnknownFields()); 501 onChanged(); 502 return this; 503 } 504 505 @java.lang.Override 506 public final boolean isInitialized() { 507 return true; 508 } 509 510 @java.lang.Override 511 public Builder mergeFrom( 512 com.google.protobuf.CodedInputStream input, 513 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 514 throws java.io.IOException { 515 if (extensionRegistry == null) { 516 throw new java.lang.NullPointerException(); 517 } 518 try { 519 boolean done = false; 520 while (!done) { 521 int tag = input.readTag(); 522 switch (tag) { 523 case 0: 524 done = true; 525 break; 526 case 10: { 527 value_ = input.readStringRequireUtf8(); 528 bitField0_ |= 0x00000001; 529 break; 530 } // case 10 531 case 18: { 532 datatype_ = input.readStringRequireUtf8(); 533 bitField0_ |= 0x00000002; 534 break; 535 } // case 18 536 default: { 537 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 538 done = true; // was an endgroup tag 539 } 540 break; 541 } // default: 542 } // switch (tag) 543 } // while (!done) 544 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 545 throw e.unwrapIOException(); 546 } finally { 547 onChanged(); 548 } // finally 549 return this; 550 } 551 private int bitField0_; 552 553 private java.lang.Object value_ = ""; 554 /** 555 * <pre> 556 * Value of the literal. This is "encoded" by the datatype, below. (RDF 557 * calls this the "label", but to us that sounds wrong, because it evokes 558 * "something to show human users" too much.) 559 * </pre> 560 * 561 * <code>string value = 1;</code> 562 * @return The value. 563 */ 564 public java.lang.String getValue() { 565 java.lang.Object ref = value_; 566 if (!(ref instanceof java.lang.String)) { 567 com.google.protobuf.ByteString bs = 568 (com.google.protobuf.ByteString) ref; 569 java.lang.String s = bs.toStringUtf8(); 570 value_ = s; 571 return s; 572 } else { 573 return (java.lang.String) ref; 574 } 575 } 576 /** 577 * <pre> 578 * Value of the literal. This is "encoded" by the datatype, below. (RDF 579 * calls this the "label", but to us that sounds wrong, because it evokes 580 * "something to show human users" too much.) 581 * </pre> 582 * 583 * <code>string value = 1;</code> 584 * @return The bytes for value. 585 */ 586 public com.google.protobuf.ByteString 587 getValueBytes() { 588 java.lang.Object ref = value_; 589 if (ref instanceof String) { 590 com.google.protobuf.ByteString b = 591 com.google.protobuf.ByteString.copyFromUtf8( 592 (java.lang.String) ref); 593 value_ = b; 594 return b; 595 } else { 596 return (com.google.protobuf.ByteString) ref; 597 } 598 } 599 /** 600 * <pre> 601 * Value of the literal. This is "encoded" by the datatype, below. (RDF 602 * calls this the "label", but to us that sounds wrong, because it evokes 603 * "something to show human users" too much.) 604 * </pre> 605 * 606 * <code>string value = 1;</code> 607 * @param value The value to set. 608 * @return This builder for chaining. 609 */ 610 public Builder setValue( 611 java.lang.String value) { 612 if (value == null) { throw new NullPointerException(); } 613 value_ = value; 614 bitField0_ |= 0x00000001; 615 onChanged(); 616 return this; 617 } 618 /** 619 * <pre> 620 * Value of the literal. This is "encoded" by the datatype, below. (RDF 621 * calls this the "label", but to us that sounds wrong, because it evokes 622 * "something to show human users" too much.) 623 * </pre> 624 * 625 * <code>string value = 1;</code> 626 * @return This builder for chaining. 627 */ 628 public Builder clearValue() { 629 value_ = getDefaultInstance().getValue(); 630 bitField0_ = (bitField0_ & ~0x00000001); 631 onChanged(); 632 return this; 633 } 634 /** 635 * <pre> 636 * Value of the literal. This is "encoded" by the datatype, below. (RDF 637 * calls this the "label", but to us that sounds wrong, because it evokes 638 * "something to show human users" too much.) 639 * </pre> 640 * 641 * <code>string value = 1;</code> 642 * @param value The bytes for value to set. 643 * @return This builder for chaining. 644 */ 645 public Builder setValueBytes( 646 com.google.protobuf.ByteString value) { 647 if (value == null) { throw new NullPointerException(); } 648 checkByteStringIsUtf8(value); 649 value_ = value; 650 bitField0_ |= 0x00000001; 651 onChanged(); 652 return this; 653 } 654 655 private java.lang.Object datatype_ = ""; 656 /** 657 * <pre> 658 * This is an IRI. 659 * </pre> 660 * 661 * <code>string datatype = 2;</code> 662 * @return The datatype. 663 */ 664 public java.lang.String getDatatype() { 665 java.lang.Object ref = datatype_; 666 if (!(ref instanceof java.lang.String)) { 667 com.google.protobuf.ByteString bs = 668 (com.google.protobuf.ByteString) ref; 669 java.lang.String s = bs.toStringUtf8(); 670 datatype_ = s; 671 return s; 672 } else { 673 return (java.lang.String) ref; 674 } 675 } 676 /** 677 * <pre> 678 * This is an IRI. 679 * </pre> 680 * 681 * <code>string datatype = 2;</code> 682 * @return The bytes for datatype. 683 */ 684 public com.google.protobuf.ByteString 685 getDatatypeBytes() { 686 java.lang.Object ref = datatype_; 687 if (ref instanceof String) { 688 com.google.protobuf.ByteString b = 689 com.google.protobuf.ByteString.copyFromUtf8( 690 (java.lang.String) ref); 691 datatype_ = b; 692 return b; 693 } else { 694 return (com.google.protobuf.ByteString) ref; 695 } 696 } 697 /** 698 * <pre> 699 * This is an IRI. 700 * </pre> 701 * 702 * <code>string datatype = 2;</code> 703 * @param value The datatype to set. 704 * @return This builder for chaining. 705 */ 706 public Builder setDatatype( 707 java.lang.String value) { 708 if (value == null) { throw new NullPointerException(); } 709 datatype_ = value; 710 bitField0_ |= 0x00000002; 711 onChanged(); 712 return this; 713 } 714 /** 715 * <pre> 716 * This is an IRI. 717 * </pre> 718 * 719 * <code>string datatype = 2;</code> 720 * @return This builder for chaining. 721 */ 722 public Builder clearDatatype() { 723 datatype_ = getDefaultInstance().getDatatype(); 724 bitField0_ = (bitField0_ & ~0x00000002); 725 onChanged(); 726 return this; 727 } 728 /** 729 * <pre> 730 * This is an IRI. 731 * </pre> 732 * 733 * <code>string datatype = 2;</code> 734 * @param value The bytes for datatype to set. 735 * @return This builder for chaining. 736 */ 737 public Builder setDatatypeBytes( 738 com.google.protobuf.ByteString value) { 739 if (value == null) { throw new NullPointerException(); } 740 checkByteStringIsUtf8(value); 741 datatype_ = value; 742 bitField0_ |= 0x00000002; 743 onChanged(); 744 return this; 745 } 746 747 // @@protoc_insertion_point(builder_scope:dev.enola.thing.Value.Literal) 748 } 749 750 // @@protoc_insertion_point(class_scope:dev.enola.thing.Value.Literal) 751 private static final dev.enola.thing.proto.Value.Literal DEFAULT_INSTANCE; 752 static { 753 DEFAULT_INSTANCE = new dev.enola.thing.proto.Value.Literal(); 754 } 755 756 public static dev.enola.thing.proto.Value.Literal getDefaultInstance() { 757 return DEFAULT_INSTANCE; 758 } 759 760 private static final com.google.protobuf.Parser<Literal> 761 PARSER = new com.google.protobuf.AbstractParser<Literal>() { 762 @java.lang.Override 763 public Literal parsePartialFrom( 764 com.google.protobuf.CodedInputStream input, 765 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 766 throws com.google.protobuf.InvalidProtocolBufferException { 767 Builder builder = newBuilder(); 768 try { 769 builder.mergeFrom(input, extensionRegistry); 770 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 771 throw e.setUnfinishedMessage(builder.buildPartial()); 772 } catch (com.google.protobuf.UninitializedMessageException e) { 773 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 774 } catch (java.io.IOException e) { 775 throw new com.google.protobuf.InvalidProtocolBufferException(e) 776 .setUnfinishedMessage(builder.buildPartial()); 777 } 778 return builder.buildPartial(); 779 } 780 }; 781 782 public static com.google.protobuf.Parser<Literal> parser() { 783 return PARSER; 784 } 785 786 @java.lang.Override 787 public com.google.protobuf.Parser<Literal> getParserForType() { 788 return PARSER; 789 } 790 791 @java.lang.Override 792 public dev.enola.thing.proto.Value.Literal getDefaultInstanceForType() { 793 return DEFAULT_INSTANCE; 794 } 795 796 } 797 798 public interface LangStringOrBuilder extends 799 // @@protoc_insertion_point(interface_extends:dev.enola.thing.Value.LangString) 800 com.google.protobuf.MessageOrBuilder { 801 802 /** 803 * <pre> 804 * Text, for humans. 805 * </pre> 806 * 807 * <code>string text = 1;</code> 808 * @return The text. 809 */ 810 java.lang.String getText(); 811 /** 812 * <pre> 813 * Text, for humans. 814 * </pre> 815 * 816 * <code>string text = 1;</code> 817 * @return The bytes for text. 818 */ 819 com.google.protobuf.ByteString 820 getTextBytes(); 821 822 /** 823 * <pre> 824 * BCP 47 “language tag” (e.g. “de-ch”) of the text. 825 * </pre> 826 * 827 * <code>string lang = 2;</code> 828 * @return The lang. 829 */ 830 java.lang.String getLang(); 831 /** 832 * <pre> 833 * BCP 47 “language tag” (e.g. “de-ch”) of the text. 834 * </pre> 835 * 836 * <code>string lang = 2;</code> 837 * @return The bytes for lang. 838 */ 839 com.google.protobuf.ByteString 840 getLangBytes(); 841 } 842 /** 843 * <pre> 844 * TODO Keep or remove this? See 845 * https://github.com/enola-dev/enola/pull/540... 846 * </pre> 847 * 848 * Protobuf type {@code dev.enola.thing.Value.LangString} 849 */ 850 public static final class LangString extends 851 com.google.protobuf.GeneratedMessage implements 852 // @@protoc_insertion_point(message_implements:dev.enola.thing.Value.LangString) 853 LangStringOrBuilder { 854 private static final long serialVersionUID = 0L; 855 static { 856 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( 857 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, 858 /* major= */ 4, 859 /* minor= */ 32, 860 /* patch= */ 0, 861 /* suffix= */ "", 862 LangString.class.getName()); 863 } 864 // Use LangString.newBuilder() to construct. 865 private LangString(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 866 super(builder); 867 } 868 private LangString() { 869 text_ = ""; 870 lang_ = ""; 871 } 872 873 public static final com.google.protobuf.Descriptors.Descriptor 874 getDescriptor() { 875 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_LangString_descriptor; 876 } 877 878 @java.lang.Override 879 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 880 internalGetFieldAccessorTable() { 881 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_LangString_fieldAccessorTable 882 .ensureFieldAccessorsInitialized( 883 dev.enola.thing.proto.Value.LangString.class, dev.enola.thing.proto.Value.LangString.Builder.class); 884 } 885 886 public static final int TEXT_FIELD_NUMBER = 1; 887 @SuppressWarnings("serial") 888 private volatile java.lang.Object text_ = ""; 889 /** 890 * <pre> 891 * Text, for humans. 892 * </pre> 893 * 894 * <code>string text = 1;</code> 895 * @return The text. 896 */ 897 @java.lang.Override 898 public java.lang.String getText() { 899 java.lang.Object ref = text_; 900 if (ref instanceof java.lang.String) { 901 return (java.lang.String) ref; 902 } else { 903 com.google.protobuf.ByteString bs = 904 (com.google.protobuf.ByteString) ref; 905 java.lang.String s = bs.toStringUtf8(); 906 text_ = s; 907 return s; 908 } 909 } 910 /** 911 * <pre> 912 * Text, for humans. 913 * </pre> 914 * 915 * <code>string text = 1;</code> 916 * @return The bytes for text. 917 */ 918 @java.lang.Override 919 public com.google.protobuf.ByteString 920 getTextBytes() { 921 java.lang.Object ref = text_; 922 if (ref instanceof java.lang.String) { 923 com.google.protobuf.ByteString b = 924 com.google.protobuf.ByteString.copyFromUtf8( 925 (java.lang.String) ref); 926 text_ = b; 927 return b; 928 } else { 929 return (com.google.protobuf.ByteString) ref; 930 } 931 } 932 933 public static final int LANG_FIELD_NUMBER = 2; 934 @SuppressWarnings("serial") 935 private volatile java.lang.Object lang_ = ""; 936 /** 937 * <pre> 938 * BCP 47 “language tag” (e.g. “de-ch”) of the text. 939 * </pre> 940 * 941 * <code>string lang = 2;</code> 942 * @return The lang. 943 */ 944 @java.lang.Override 945 public java.lang.String getLang() { 946 java.lang.Object ref = lang_; 947 if (ref instanceof java.lang.String) { 948 return (java.lang.String) ref; 949 } else { 950 com.google.protobuf.ByteString bs = 951 (com.google.protobuf.ByteString) ref; 952 java.lang.String s = bs.toStringUtf8(); 953 lang_ = s; 954 return s; 955 } 956 } 957 /** 958 * <pre> 959 * BCP 47 “language tag” (e.g. “de-ch”) of the text. 960 * </pre> 961 * 962 * <code>string lang = 2;</code> 963 * @return The bytes for lang. 964 */ 965 @java.lang.Override 966 public com.google.protobuf.ByteString 967 getLangBytes() { 968 java.lang.Object ref = lang_; 969 if (ref instanceof java.lang.String) { 970 com.google.protobuf.ByteString b = 971 com.google.protobuf.ByteString.copyFromUtf8( 972 (java.lang.String) ref); 973 lang_ = b; 974 return b; 975 } else { 976 return (com.google.protobuf.ByteString) ref; 977 } 978 } 979 980 private byte memoizedIsInitialized = -1; 981 @java.lang.Override 982 public final boolean isInitialized() { 983 byte isInitialized = memoizedIsInitialized; 984 if (isInitialized == 1) return true; 985 if (isInitialized == 0) return false; 986 987 memoizedIsInitialized = 1; 988 return true; 989 } 990 991 @java.lang.Override 992 public void writeTo(com.google.protobuf.CodedOutputStream output) 993 throws java.io.IOException { 994 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { 995 com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); 996 } 997 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lang_)) { 998 com.google.protobuf.GeneratedMessage.writeString(output, 2, lang_); 999 } 1000 getUnknownFields().writeTo(output); 1001 } 1002 1003 @java.lang.Override 1004 public int getSerializedSize() { 1005 int size = memoizedSize; 1006 if (size != -1) return size; 1007 1008 size = 0; 1009 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { 1010 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); 1011 } 1012 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lang_)) { 1013 size += com.google.protobuf.GeneratedMessage.computeStringSize(2, lang_); 1014 } 1015 size += getUnknownFields().getSerializedSize(); 1016 memoizedSize = size; 1017 return size; 1018 } 1019 1020 @java.lang.Override 1021 public boolean equals(final java.lang.Object obj) { 1022 if (obj == this) { 1023 return true; 1024 } 1025 if (!(obj instanceof dev.enola.thing.proto.Value.LangString)) { 1026 return super.equals(obj); 1027 } 1028 dev.enola.thing.proto.Value.LangString other = (dev.enola.thing.proto.Value.LangString) obj; 1029 1030 if (!getText() 1031 .equals(other.getText())) return false; 1032 if (!getLang() 1033 .equals(other.getLang())) return false; 1034 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1035 return true; 1036 } 1037 1038 @java.lang.Override 1039 public int hashCode() { 1040 if (memoizedHashCode != 0) { 1041 return memoizedHashCode; 1042 } 1043 int hash = 41; 1044 hash = (19 * hash) + getDescriptor().hashCode(); 1045 hash = (37 * hash) + TEXT_FIELD_NUMBER; 1046 hash = (53 * hash) + getText().hashCode(); 1047 hash = (37 * hash) + LANG_FIELD_NUMBER; 1048 hash = (53 * hash) + getLang().hashCode(); 1049 hash = (29 * hash) + getUnknownFields().hashCode(); 1050 memoizedHashCode = hash; 1051 return hash; 1052 } 1053 1054 public static dev.enola.thing.proto.Value.LangString parseFrom( 1055 java.nio.ByteBuffer data) 1056 throws com.google.protobuf.InvalidProtocolBufferException { 1057 return PARSER.parseFrom(data); 1058 } 1059 public static dev.enola.thing.proto.Value.LangString parseFrom( 1060 java.nio.ByteBuffer data, 1061 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1062 throws com.google.protobuf.InvalidProtocolBufferException { 1063 return PARSER.parseFrom(data, extensionRegistry); 1064 } 1065 public static dev.enola.thing.proto.Value.LangString parseFrom( 1066 com.google.protobuf.ByteString data) 1067 throws com.google.protobuf.InvalidProtocolBufferException { 1068 return PARSER.parseFrom(data); 1069 } 1070 public static dev.enola.thing.proto.Value.LangString parseFrom( 1071 com.google.protobuf.ByteString data, 1072 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1073 throws com.google.protobuf.InvalidProtocolBufferException { 1074 return PARSER.parseFrom(data, extensionRegistry); 1075 } 1076 public static dev.enola.thing.proto.Value.LangString parseFrom(byte[] data) 1077 throws com.google.protobuf.InvalidProtocolBufferException { 1078 return PARSER.parseFrom(data); 1079 } 1080 public static dev.enola.thing.proto.Value.LangString parseFrom( 1081 byte[] data, 1082 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1083 throws com.google.protobuf.InvalidProtocolBufferException { 1084 return PARSER.parseFrom(data, extensionRegistry); 1085 } 1086 public static dev.enola.thing.proto.Value.LangString parseFrom(java.io.InputStream input) 1087 throws java.io.IOException { 1088 return com.google.protobuf.GeneratedMessage 1089 .parseWithIOException(PARSER, input); 1090 } 1091 public static dev.enola.thing.proto.Value.LangString parseFrom( 1092 java.io.InputStream input, 1093 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1094 throws java.io.IOException { 1095 return com.google.protobuf.GeneratedMessage 1096 .parseWithIOException(PARSER, input, extensionRegistry); 1097 } 1098 1099 public static dev.enola.thing.proto.Value.LangString parseDelimitedFrom(java.io.InputStream input) 1100 throws java.io.IOException { 1101 return com.google.protobuf.GeneratedMessage 1102 .parseDelimitedWithIOException(PARSER, input); 1103 } 1104 1105 public static dev.enola.thing.proto.Value.LangString parseDelimitedFrom( 1106 java.io.InputStream input, 1107 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1108 throws java.io.IOException { 1109 return com.google.protobuf.GeneratedMessage 1110 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); 1111 } 1112 public static dev.enola.thing.proto.Value.LangString parseFrom( 1113 com.google.protobuf.CodedInputStream input) 1114 throws java.io.IOException { 1115 return com.google.protobuf.GeneratedMessage 1116 .parseWithIOException(PARSER, input); 1117 } 1118 public static dev.enola.thing.proto.Value.LangString parseFrom( 1119 com.google.protobuf.CodedInputStream input, 1120 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1121 throws java.io.IOException { 1122 return com.google.protobuf.GeneratedMessage 1123 .parseWithIOException(PARSER, input, extensionRegistry); 1124 } 1125 1126 @java.lang.Override 1127 public Builder newBuilderForType() { return newBuilder(); } 1128 public static Builder newBuilder() { 1129 return DEFAULT_INSTANCE.toBuilder(); 1130 } 1131 public static Builder newBuilder(dev.enola.thing.proto.Value.LangString prototype) { 1132 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1133 } 1134 @java.lang.Override 1135 public Builder toBuilder() { 1136 return this == DEFAULT_INSTANCE 1137 ? new Builder() : new Builder().mergeFrom(this); 1138 } 1139 1140 @java.lang.Override 1141 protected Builder newBuilderForType( 1142 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 1143 Builder builder = new Builder(parent); 1144 return builder; 1145 } 1146 /** 1147 * <pre> 1148 * TODO Keep or remove this? See 1149 * https://github.com/enola-dev/enola/pull/540... 1150 * </pre> 1151 * 1152 * Protobuf type {@code dev.enola.thing.Value.LangString} 1153 */ 1154 public static final class Builder extends 1155 com.google.protobuf.GeneratedMessage.Builder<Builder> implements 1156 // @@protoc_insertion_point(builder_implements:dev.enola.thing.Value.LangString) 1157 dev.enola.thing.proto.Value.LangStringOrBuilder { 1158 public static final com.google.protobuf.Descriptors.Descriptor 1159 getDescriptor() { 1160 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_LangString_descriptor; 1161 } 1162 1163 @java.lang.Override 1164 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 1165 internalGetFieldAccessorTable() { 1166 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_LangString_fieldAccessorTable 1167 .ensureFieldAccessorsInitialized( 1168 dev.enola.thing.proto.Value.LangString.class, dev.enola.thing.proto.Value.LangString.Builder.class); 1169 } 1170 1171 // Construct using dev.enola.thing.proto.Value.LangString.newBuilder() 1172 private Builder() { 1173 1174 } 1175 1176 private Builder( 1177 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 1178 super(parent); 1179 1180 } 1181 @java.lang.Override 1182 public Builder clear() { 1183 super.clear(); 1184 bitField0_ = 0; 1185 text_ = ""; 1186 lang_ = ""; 1187 return this; 1188 } 1189 1190 @java.lang.Override 1191 public com.google.protobuf.Descriptors.Descriptor 1192 getDescriptorForType() { 1193 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_LangString_descriptor; 1194 } 1195 1196 @java.lang.Override 1197 public dev.enola.thing.proto.Value.LangString getDefaultInstanceForType() { 1198 return dev.enola.thing.proto.Value.LangString.getDefaultInstance(); 1199 } 1200 1201 @java.lang.Override 1202 public dev.enola.thing.proto.Value.LangString build() { 1203 dev.enola.thing.proto.Value.LangString result = buildPartial(); 1204 if (!result.isInitialized()) { 1205 throw newUninitializedMessageException(result); 1206 } 1207 return result; 1208 } 1209 1210 @java.lang.Override 1211 public dev.enola.thing.proto.Value.LangString buildPartial() { 1212 dev.enola.thing.proto.Value.LangString result = new dev.enola.thing.proto.Value.LangString(this); 1213 if (bitField0_ != 0) { buildPartial0(result); } 1214 onBuilt(); 1215 return result; 1216 } 1217 1218 private void buildPartial0(dev.enola.thing.proto.Value.LangString result) { 1219 int from_bitField0_ = bitField0_; 1220 if (((from_bitField0_ & 0x00000001) != 0)) { 1221 result.text_ = text_; 1222 } 1223 if (((from_bitField0_ & 0x00000002) != 0)) { 1224 result.lang_ = lang_; 1225 } 1226 } 1227 1228 @java.lang.Override 1229 public Builder mergeFrom(com.google.protobuf.Message other) { 1230 if (other instanceof dev.enola.thing.proto.Value.LangString) { 1231 return mergeFrom((dev.enola.thing.proto.Value.LangString)other); 1232 } else { 1233 super.mergeFrom(other); 1234 return this; 1235 } 1236 } 1237 1238 public Builder mergeFrom(dev.enola.thing.proto.Value.LangString other) { 1239 if (other == dev.enola.thing.proto.Value.LangString.getDefaultInstance()) return this; 1240 if (!other.getText().isEmpty()) { 1241 text_ = other.text_; 1242 bitField0_ |= 0x00000001; 1243 onChanged(); 1244 } 1245 if (!other.getLang().isEmpty()) { 1246 lang_ = other.lang_; 1247 bitField0_ |= 0x00000002; 1248 onChanged(); 1249 } 1250 this.mergeUnknownFields(other.getUnknownFields()); 1251 onChanged(); 1252 return this; 1253 } 1254 1255 @java.lang.Override 1256 public final boolean isInitialized() { 1257 return true; 1258 } 1259 1260 @java.lang.Override 1261 public Builder mergeFrom( 1262 com.google.protobuf.CodedInputStream input, 1263 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1264 throws java.io.IOException { 1265 if (extensionRegistry == null) { 1266 throw new java.lang.NullPointerException(); 1267 } 1268 try { 1269 boolean done = false; 1270 while (!done) { 1271 int tag = input.readTag(); 1272 switch (tag) { 1273 case 0: 1274 done = true; 1275 break; 1276 case 10: { 1277 text_ = input.readStringRequireUtf8(); 1278 bitField0_ |= 0x00000001; 1279 break; 1280 } // case 10 1281 case 18: { 1282 lang_ = input.readStringRequireUtf8(); 1283 bitField0_ |= 0x00000002; 1284 break; 1285 } // case 18 1286 default: { 1287 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1288 done = true; // was an endgroup tag 1289 } 1290 break; 1291 } // default: 1292 } // switch (tag) 1293 } // while (!done) 1294 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1295 throw e.unwrapIOException(); 1296 } finally { 1297 onChanged(); 1298 } // finally 1299 return this; 1300 } 1301 private int bitField0_; 1302 1303 private java.lang.Object text_ = ""; 1304 /** 1305 * <pre> 1306 * Text, for humans. 1307 * </pre> 1308 * 1309 * <code>string text = 1;</code> 1310 * @return The text. 1311 */ 1312 public java.lang.String getText() { 1313 java.lang.Object ref = text_; 1314 if (!(ref instanceof java.lang.String)) { 1315 com.google.protobuf.ByteString bs = 1316 (com.google.protobuf.ByteString) ref; 1317 java.lang.String s = bs.toStringUtf8(); 1318 text_ = s; 1319 return s; 1320 } else { 1321 return (java.lang.String) ref; 1322 } 1323 } 1324 /** 1325 * <pre> 1326 * Text, for humans. 1327 * </pre> 1328 * 1329 * <code>string text = 1;</code> 1330 * @return The bytes for text. 1331 */ 1332 public com.google.protobuf.ByteString 1333 getTextBytes() { 1334 java.lang.Object ref = text_; 1335 if (ref instanceof String) { 1336 com.google.protobuf.ByteString b = 1337 com.google.protobuf.ByteString.copyFromUtf8( 1338 (java.lang.String) ref); 1339 text_ = b; 1340 return b; 1341 } else { 1342 return (com.google.protobuf.ByteString) ref; 1343 } 1344 } 1345 /** 1346 * <pre> 1347 * Text, for humans. 1348 * </pre> 1349 * 1350 * <code>string text = 1;</code> 1351 * @param value The text to set. 1352 * @return This builder for chaining. 1353 */ 1354 public Builder setText( 1355 java.lang.String value) { 1356 if (value == null) { throw new NullPointerException(); } 1357 text_ = value; 1358 bitField0_ |= 0x00000001; 1359 onChanged(); 1360 return this; 1361 } 1362 /** 1363 * <pre> 1364 * Text, for humans. 1365 * </pre> 1366 * 1367 * <code>string text = 1;</code> 1368 * @return This builder for chaining. 1369 */ 1370 public Builder clearText() { 1371 text_ = getDefaultInstance().getText(); 1372 bitField0_ = (bitField0_ & ~0x00000001); 1373 onChanged(); 1374 return this; 1375 } 1376 /** 1377 * <pre> 1378 * Text, for humans. 1379 * </pre> 1380 * 1381 * <code>string text = 1;</code> 1382 * @param value The bytes for text to set. 1383 * @return This builder for chaining. 1384 */ 1385 public Builder setTextBytes( 1386 com.google.protobuf.ByteString value) { 1387 if (value == null) { throw new NullPointerException(); } 1388 checkByteStringIsUtf8(value); 1389 text_ = value; 1390 bitField0_ |= 0x00000001; 1391 onChanged(); 1392 return this; 1393 } 1394 1395 private java.lang.Object lang_ = ""; 1396 /** 1397 * <pre> 1398 * BCP 47 “language tag” (e.g. “de-ch”) of the text. 1399 * </pre> 1400 * 1401 * <code>string lang = 2;</code> 1402 * @return The lang. 1403 */ 1404 public java.lang.String getLang() { 1405 java.lang.Object ref = lang_; 1406 if (!(ref instanceof java.lang.String)) { 1407 com.google.protobuf.ByteString bs = 1408 (com.google.protobuf.ByteString) ref; 1409 java.lang.String s = bs.toStringUtf8(); 1410 lang_ = s; 1411 return s; 1412 } else { 1413 return (java.lang.String) ref; 1414 } 1415 } 1416 /** 1417 * <pre> 1418 * BCP 47 “language tag” (e.g. “de-ch”) of the text. 1419 * </pre> 1420 * 1421 * <code>string lang = 2;</code> 1422 * @return The bytes for lang. 1423 */ 1424 public com.google.protobuf.ByteString 1425 getLangBytes() { 1426 java.lang.Object ref = lang_; 1427 if (ref instanceof String) { 1428 com.google.protobuf.ByteString b = 1429 com.google.protobuf.ByteString.copyFromUtf8( 1430 (java.lang.String) ref); 1431 lang_ = b; 1432 return b; 1433 } else { 1434 return (com.google.protobuf.ByteString) ref; 1435 } 1436 } 1437 /** 1438 * <pre> 1439 * BCP 47 “language tag” (e.g. “de-ch”) of the text. 1440 * </pre> 1441 * 1442 * <code>string lang = 2;</code> 1443 * @param value The lang to set. 1444 * @return This builder for chaining. 1445 */ 1446 public Builder setLang( 1447 java.lang.String value) { 1448 if (value == null) { throw new NullPointerException(); } 1449 lang_ = value; 1450 bitField0_ |= 0x00000002; 1451 onChanged(); 1452 return this; 1453 } 1454 /** 1455 * <pre> 1456 * BCP 47 “language tag” (e.g. “de-ch”) of the text. 1457 * </pre> 1458 * 1459 * <code>string lang = 2;</code> 1460 * @return This builder for chaining. 1461 */ 1462 public Builder clearLang() { 1463 lang_ = getDefaultInstance().getLang(); 1464 bitField0_ = (bitField0_ & ~0x00000002); 1465 onChanged(); 1466 return this; 1467 } 1468 /** 1469 * <pre> 1470 * BCP 47 “language tag” (e.g. “de-ch”) of the text. 1471 * </pre> 1472 * 1473 * <code>string lang = 2;</code> 1474 * @param value The bytes for lang to set. 1475 * @return This builder for chaining. 1476 */ 1477 public Builder setLangBytes( 1478 com.google.protobuf.ByteString value) { 1479 if (value == null) { throw new NullPointerException(); } 1480 checkByteStringIsUtf8(value); 1481 lang_ = value; 1482 bitField0_ |= 0x00000002; 1483 onChanged(); 1484 return this; 1485 } 1486 1487 // @@protoc_insertion_point(builder_scope:dev.enola.thing.Value.LangString) 1488 } 1489 1490 // @@protoc_insertion_point(class_scope:dev.enola.thing.Value.LangString) 1491 private static final dev.enola.thing.proto.Value.LangString DEFAULT_INSTANCE; 1492 static { 1493 DEFAULT_INSTANCE = new dev.enola.thing.proto.Value.LangString(); 1494 } 1495 1496 public static dev.enola.thing.proto.Value.LangString getDefaultInstance() { 1497 return DEFAULT_INSTANCE; 1498 } 1499 1500 private static final com.google.protobuf.Parser<LangString> 1501 PARSER = new com.google.protobuf.AbstractParser<LangString>() { 1502 @java.lang.Override 1503 public LangString parsePartialFrom( 1504 com.google.protobuf.CodedInputStream input, 1505 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1506 throws com.google.protobuf.InvalidProtocolBufferException { 1507 Builder builder = newBuilder(); 1508 try { 1509 builder.mergeFrom(input, extensionRegistry); 1510 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1511 throw e.setUnfinishedMessage(builder.buildPartial()); 1512 } catch (com.google.protobuf.UninitializedMessageException e) { 1513 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1514 } catch (java.io.IOException e) { 1515 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1516 .setUnfinishedMessage(builder.buildPartial()); 1517 } 1518 return builder.buildPartial(); 1519 } 1520 }; 1521 1522 public static com.google.protobuf.Parser<LangString> parser() { 1523 return PARSER; 1524 } 1525 1526 @java.lang.Override 1527 public com.google.protobuf.Parser<LangString> getParserForType() { 1528 return PARSER; 1529 } 1530 1531 @java.lang.Override 1532 public dev.enola.thing.proto.Value.LangString getDefaultInstanceForType() { 1533 return DEFAULT_INSTANCE; 1534 } 1535 1536 } 1537 1538 public interface ListOrBuilder extends 1539 // @@protoc_insertion_point(interface_extends:dev.enola.thing.Value.List) 1540 com.google.protobuf.MessageOrBuilder { 1541 1542 /** 1543 * <code>bool ordered = 1;</code> 1544 * @return The ordered. 1545 */ 1546 boolean getOrdered(); 1547 1548 /** 1549 * <code>repeated .dev.enola.thing.Value values = 2;</code> 1550 */ 1551 java.util.List<dev.enola.thing.proto.Value> 1552 getValuesList(); 1553 /** 1554 * <code>repeated .dev.enola.thing.Value values = 2;</code> 1555 */ 1556 dev.enola.thing.proto.Value getValues(int index); 1557 /** 1558 * <code>repeated .dev.enola.thing.Value values = 2;</code> 1559 */ 1560 int getValuesCount(); 1561 /** 1562 * <code>repeated .dev.enola.thing.Value values = 2;</code> 1563 */ 1564 java.util.List<? extends dev.enola.thing.proto.ValueOrBuilder> 1565 getValuesOrBuilderList(); 1566 /** 1567 * <code>repeated .dev.enola.thing.Value values = 2;</code> 1568 */ 1569 dev.enola.thing.proto.ValueOrBuilder getValuesOrBuilder( 1570 int index); 1571 } 1572 /** 1573 * <pre> 1574 * TODO Rename to Collection 1575 * </pre> 1576 * 1577 * Protobuf type {@code dev.enola.thing.Value.List} 1578 */ 1579 public static final class List extends 1580 com.google.protobuf.GeneratedMessage implements 1581 // @@protoc_insertion_point(message_implements:dev.enola.thing.Value.List) 1582 ListOrBuilder { 1583 private static final long serialVersionUID = 0L; 1584 static { 1585 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( 1586 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, 1587 /* major= */ 4, 1588 /* minor= */ 32, 1589 /* patch= */ 0, 1590 /* suffix= */ "", 1591 List.class.getName()); 1592 } 1593 // Use List.newBuilder() to construct. 1594 private List(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 1595 super(builder); 1596 } 1597 private List() { 1598 values_ = java.util.Collections.emptyList(); 1599 } 1600 1601 public static final com.google.protobuf.Descriptors.Descriptor 1602 getDescriptor() { 1603 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_List_descriptor; 1604 } 1605 1606 @java.lang.Override 1607 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 1608 internalGetFieldAccessorTable() { 1609 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_List_fieldAccessorTable 1610 .ensureFieldAccessorsInitialized( 1611 dev.enola.thing.proto.Value.List.class, dev.enola.thing.proto.Value.List.Builder.class); 1612 } 1613 1614 public static final int ORDERED_FIELD_NUMBER = 1; 1615 private boolean ordered_ = false; 1616 /** 1617 * <code>bool ordered = 1;</code> 1618 * @return The ordered. 1619 */ 1620 @java.lang.Override 1621 public boolean getOrdered() { 1622 return ordered_; 1623 } 1624 1625 public static final int VALUES_FIELD_NUMBER = 2; 1626 @SuppressWarnings("serial") 1627 private java.util.List<dev.enola.thing.proto.Value> values_; 1628 /** 1629 * <code>repeated .dev.enola.thing.Value values = 2;</code> 1630 */ 1631 @java.lang.Override 1632 public java.util.List<dev.enola.thing.proto.Value> getValuesList() { 1633 return values_; 1634 } 1635 /** 1636 * <code>repeated .dev.enola.thing.Value values = 2;</code> 1637 */ 1638 @java.lang.Override 1639 public java.util.List<? extends dev.enola.thing.proto.ValueOrBuilder> 1640 getValuesOrBuilderList() { 1641 return values_; 1642 } 1643 /** 1644 * <code>repeated .dev.enola.thing.Value values = 2;</code> 1645 */ 1646 @java.lang.Override 1647 public int getValuesCount() { 1648 return values_.size(); 1649 } 1650 /** 1651 * <code>repeated .dev.enola.thing.Value values = 2;</code> 1652 */ 1653 @java.lang.Override 1654 public dev.enola.thing.proto.Value getValues(int index) { 1655 return values_.get(index); 1656 } 1657 /** 1658 * <code>repeated .dev.enola.thing.Value values = 2;</code> 1659 */ 1660 @java.lang.Override 1661 public dev.enola.thing.proto.ValueOrBuilder getValuesOrBuilder( 1662 int index) { 1663 return values_.get(index); 1664 } 1665 1666 private byte memoizedIsInitialized = -1; 1667 @java.lang.Override 1668 public final boolean isInitialized() { 1669 byte isInitialized = memoizedIsInitialized; 1670 if (isInitialized == 1) return true; 1671 if (isInitialized == 0) return false; 1672 1673 memoizedIsInitialized = 1; 1674 return true; 1675 } 1676 1677 @java.lang.Override 1678 public void writeTo(com.google.protobuf.CodedOutputStream output) 1679 throws java.io.IOException { 1680 if (ordered_ != false) { 1681 output.writeBool(1, ordered_); 1682 } 1683 for (int i = 0; i < values_.size(); i++) { 1684 output.writeMessage(2, values_.get(i)); 1685 } 1686 getUnknownFields().writeTo(output); 1687 } 1688 1689 @java.lang.Override 1690 public int getSerializedSize() { 1691 int size = memoizedSize; 1692 if (size != -1) return size; 1693 1694 size = 0; 1695 if (ordered_ != false) { 1696 size += com.google.protobuf.CodedOutputStream 1697 .computeBoolSize(1, ordered_); 1698 } 1699 for (int i = 0; i < values_.size(); i++) { 1700 size += com.google.protobuf.CodedOutputStream 1701 .computeMessageSize(2, values_.get(i)); 1702 } 1703 size += getUnknownFields().getSerializedSize(); 1704 memoizedSize = size; 1705 return size; 1706 } 1707 1708 @java.lang.Override 1709 public boolean equals(final java.lang.Object obj) { 1710 if (obj == this) { 1711 return true; 1712 } 1713 if (!(obj instanceof dev.enola.thing.proto.Value.List)) { 1714 return super.equals(obj); 1715 } 1716 dev.enola.thing.proto.Value.List other = (dev.enola.thing.proto.Value.List) obj; 1717 1718 if (getOrdered() 1719 != other.getOrdered()) return false; 1720 if (!getValuesList() 1721 .equals(other.getValuesList())) return false; 1722 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1723 return true; 1724 } 1725 1726 @java.lang.Override 1727 public int hashCode() { 1728 if (memoizedHashCode != 0) { 1729 return memoizedHashCode; 1730 } 1731 int hash = 41; 1732 hash = (19 * hash) + getDescriptor().hashCode(); 1733 hash = (37 * hash) + ORDERED_FIELD_NUMBER; 1734 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( 1735 getOrdered()); 1736 if (getValuesCount() > 0) { 1737 hash = (37 * hash) + VALUES_FIELD_NUMBER; 1738 hash = (53 * hash) + getValuesList().hashCode(); 1739 } 1740 hash = (29 * hash) + getUnknownFields().hashCode(); 1741 memoizedHashCode = hash; 1742 return hash; 1743 } 1744 1745 public static dev.enola.thing.proto.Value.List parseFrom( 1746 java.nio.ByteBuffer data) 1747 throws com.google.protobuf.InvalidProtocolBufferException { 1748 return PARSER.parseFrom(data); 1749 } 1750 public static dev.enola.thing.proto.Value.List parseFrom( 1751 java.nio.ByteBuffer data, 1752 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1753 throws com.google.protobuf.InvalidProtocolBufferException { 1754 return PARSER.parseFrom(data, extensionRegistry); 1755 } 1756 public static dev.enola.thing.proto.Value.List parseFrom( 1757 com.google.protobuf.ByteString data) 1758 throws com.google.protobuf.InvalidProtocolBufferException { 1759 return PARSER.parseFrom(data); 1760 } 1761 public static dev.enola.thing.proto.Value.List parseFrom( 1762 com.google.protobuf.ByteString data, 1763 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1764 throws com.google.protobuf.InvalidProtocolBufferException { 1765 return PARSER.parseFrom(data, extensionRegistry); 1766 } 1767 public static dev.enola.thing.proto.Value.List parseFrom(byte[] data) 1768 throws com.google.protobuf.InvalidProtocolBufferException { 1769 return PARSER.parseFrom(data); 1770 } 1771 public static dev.enola.thing.proto.Value.List parseFrom( 1772 byte[] data, 1773 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1774 throws com.google.protobuf.InvalidProtocolBufferException { 1775 return PARSER.parseFrom(data, extensionRegistry); 1776 } 1777 public static dev.enola.thing.proto.Value.List parseFrom(java.io.InputStream input) 1778 throws java.io.IOException { 1779 return com.google.protobuf.GeneratedMessage 1780 .parseWithIOException(PARSER, input); 1781 } 1782 public static dev.enola.thing.proto.Value.List parseFrom( 1783 java.io.InputStream input, 1784 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1785 throws java.io.IOException { 1786 return com.google.protobuf.GeneratedMessage 1787 .parseWithIOException(PARSER, input, extensionRegistry); 1788 } 1789 1790 public static dev.enola.thing.proto.Value.List parseDelimitedFrom(java.io.InputStream input) 1791 throws java.io.IOException { 1792 return com.google.protobuf.GeneratedMessage 1793 .parseDelimitedWithIOException(PARSER, input); 1794 } 1795 1796 public static dev.enola.thing.proto.Value.List parseDelimitedFrom( 1797 java.io.InputStream input, 1798 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1799 throws java.io.IOException { 1800 return com.google.protobuf.GeneratedMessage 1801 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); 1802 } 1803 public static dev.enola.thing.proto.Value.List parseFrom( 1804 com.google.protobuf.CodedInputStream input) 1805 throws java.io.IOException { 1806 return com.google.protobuf.GeneratedMessage 1807 .parseWithIOException(PARSER, input); 1808 } 1809 public static dev.enola.thing.proto.Value.List parseFrom( 1810 com.google.protobuf.CodedInputStream input, 1811 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1812 throws java.io.IOException { 1813 return com.google.protobuf.GeneratedMessage 1814 .parseWithIOException(PARSER, input, extensionRegistry); 1815 } 1816 1817 @java.lang.Override 1818 public Builder newBuilderForType() { return newBuilder(); } 1819 public static Builder newBuilder() { 1820 return DEFAULT_INSTANCE.toBuilder(); 1821 } 1822 public static Builder newBuilder(dev.enola.thing.proto.Value.List prototype) { 1823 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1824 } 1825 @java.lang.Override 1826 public Builder toBuilder() { 1827 return this == DEFAULT_INSTANCE 1828 ? new Builder() : new Builder().mergeFrom(this); 1829 } 1830 1831 @java.lang.Override 1832 protected Builder newBuilderForType( 1833 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 1834 Builder builder = new Builder(parent); 1835 return builder; 1836 } 1837 /** 1838 * <pre> 1839 * TODO Rename to Collection 1840 * </pre> 1841 * 1842 * Protobuf type {@code dev.enola.thing.Value.List} 1843 */ 1844 public static final class Builder extends 1845 com.google.protobuf.GeneratedMessage.Builder<Builder> implements 1846 // @@protoc_insertion_point(builder_implements:dev.enola.thing.Value.List) 1847 dev.enola.thing.proto.Value.ListOrBuilder { 1848 public static final com.google.protobuf.Descriptors.Descriptor 1849 getDescriptor() { 1850 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_List_descriptor; 1851 } 1852 1853 @java.lang.Override 1854 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 1855 internalGetFieldAccessorTable() { 1856 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_List_fieldAccessorTable 1857 .ensureFieldAccessorsInitialized( 1858 dev.enola.thing.proto.Value.List.class, dev.enola.thing.proto.Value.List.Builder.class); 1859 } 1860 1861 // Construct using dev.enola.thing.proto.Value.List.newBuilder() 1862 private Builder() { 1863 1864 } 1865 1866 private Builder( 1867 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 1868 super(parent); 1869 1870 } 1871 @java.lang.Override 1872 public Builder clear() { 1873 super.clear(); 1874 bitField0_ = 0; 1875 ordered_ = false; 1876 if (valuesBuilder_ == null) { 1877 values_ = java.util.Collections.emptyList(); 1878 } else { 1879 values_ = null; 1880 valuesBuilder_.clear(); 1881 } 1882 bitField0_ = (bitField0_ & ~0x00000002); 1883 return this; 1884 } 1885 1886 @java.lang.Override 1887 public com.google.protobuf.Descriptors.Descriptor 1888 getDescriptorForType() { 1889 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_List_descriptor; 1890 } 1891 1892 @java.lang.Override 1893 public dev.enola.thing.proto.Value.List getDefaultInstanceForType() { 1894 return dev.enola.thing.proto.Value.List.getDefaultInstance(); 1895 } 1896 1897 @java.lang.Override 1898 public dev.enola.thing.proto.Value.List build() { 1899 dev.enola.thing.proto.Value.List result = buildPartial(); 1900 if (!result.isInitialized()) { 1901 throw newUninitializedMessageException(result); 1902 } 1903 return result; 1904 } 1905 1906 @java.lang.Override 1907 public dev.enola.thing.proto.Value.List buildPartial() { 1908 dev.enola.thing.proto.Value.List result = new dev.enola.thing.proto.Value.List(this); 1909 buildPartialRepeatedFields(result); 1910 if (bitField0_ != 0) { buildPartial0(result); } 1911 onBuilt(); 1912 return result; 1913 } 1914 1915 private void buildPartialRepeatedFields(dev.enola.thing.proto.Value.List result) { 1916 if (valuesBuilder_ == null) { 1917 if (((bitField0_ & 0x00000002) != 0)) { 1918 values_ = java.util.Collections.unmodifiableList(values_); 1919 bitField0_ = (bitField0_ & ~0x00000002); 1920 } 1921 result.values_ = values_; 1922 } else { 1923 result.values_ = valuesBuilder_.build(); 1924 } 1925 } 1926 1927 private void buildPartial0(dev.enola.thing.proto.Value.List result) { 1928 int from_bitField0_ = bitField0_; 1929 if (((from_bitField0_ & 0x00000001) != 0)) { 1930 result.ordered_ = ordered_; 1931 } 1932 } 1933 1934 @java.lang.Override 1935 public Builder mergeFrom(com.google.protobuf.Message other) { 1936 if (other instanceof dev.enola.thing.proto.Value.List) { 1937 return mergeFrom((dev.enola.thing.proto.Value.List)other); 1938 } else { 1939 super.mergeFrom(other); 1940 return this; 1941 } 1942 } 1943 1944 public Builder mergeFrom(dev.enola.thing.proto.Value.List other) { 1945 if (other == dev.enola.thing.proto.Value.List.getDefaultInstance()) return this; 1946 if (other.getOrdered() != false) { 1947 setOrdered(other.getOrdered()); 1948 } 1949 if (valuesBuilder_ == null) { 1950 if (!other.values_.isEmpty()) { 1951 if (values_.isEmpty()) { 1952 values_ = other.values_; 1953 bitField0_ = (bitField0_ & ~0x00000002); 1954 } else { 1955 ensureValuesIsMutable(); 1956 values_.addAll(other.values_); 1957 } 1958 onChanged(); 1959 } 1960 } else { 1961 if (!other.values_.isEmpty()) { 1962 if (valuesBuilder_.isEmpty()) { 1963 valuesBuilder_.dispose(); 1964 valuesBuilder_ = null; 1965 values_ = other.values_; 1966 bitField0_ = (bitField0_ & ~0x00000002); 1967 valuesBuilder_ = 1968 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? 1969 internalGetValuesFieldBuilder() : null; 1970 } else { 1971 valuesBuilder_.addAllMessages(other.values_); 1972 } 1973 } 1974 } 1975 this.mergeUnknownFields(other.getUnknownFields()); 1976 onChanged(); 1977 return this; 1978 } 1979 1980 @java.lang.Override 1981 public final boolean isInitialized() { 1982 return true; 1983 } 1984 1985 @java.lang.Override 1986 public Builder mergeFrom( 1987 com.google.protobuf.CodedInputStream input, 1988 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1989 throws java.io.IOException { 1990 if (extensionRegistry == null) { 1991 throw new java.lang.NullPointerException(); 1992 } 1993 try { 1994 boolean done = false; 1995 while (!done) { 1996 int tag = input.readTag(); 1997 switch (tag) { 1998 case 0: 1999 done = true; 2000 break; 2001 case 8: { 2002 ordered_ = input.readBool(); 2003 bitField0_ |= 0x00000001; 2004 break; 2005 } // case 8 2006 case 18: { 2007 dev.enola.thing.proto.Value m = 2008 input.readMessage( 2009 dev.enola.thing.proto.Value.parser(), 2010 extensionRegistry); 2011 if (valuesBuilder_ == null) { 2012 ensureValuesIsMutable(); 2013 values_.add(m); 2014 } else { 2015 valuesBuilder_.addMessage(m); 2016 } 2017 break; 2018 } // case 18 2019 default: { 2020 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 2021 done = true; // was an endgroup tag 2022 } 2023 break; 2024 } // default: 2025 } // switch (tag) 2026 } // while (!done) 2027 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2028 throw e.unwrapIOException(); 2029 } finally { 2030 onChanged(); 2031 } // finally 2032 return this; 2033 } 2034 private int bitField0_; 2035 2036 private boolean ordered_ ; 2037 /** 2038 * <code>bool ordered = 1;</code> 2039 * @return The ordered. 2040 */ 2041 @java.lang.Override 2042 public boolean getOrdered() { 2043 return ordered_; 2044 } 2045 /** 2046 * <code>bool ordered = 1;</code> 2047 * @param value The ordered to set. 2048 * @return This builder for chaining. 2049 */ 2050 public Builder setOrdered(boolean value) { 2051 2052 ordered_ = value; 2053 bitField0_ |= 0x00000001; 2054 onChanged(); 2055 return this; 2056 } 2057 /** 2058 * <code>bool ordered = 1;</code> 2059 * @return This builder for chaining. 2060 */ 2061 public Builder clearOrdered() { 2062 bitField0_ = (bitField0_ & ~0x00000001); 2063 ordered_ = false; 2064 onChanged(); 2065 return this; 2066 } 2067 2068 private java.util.List<dev.enola.thing.proto.Value> values_ = 2069 java.util.Collections.emptyList(); 2070 private void ensureValuesIsMutable() { 2071 if (!((bitField0_ & 0x00000002) != 0)) { 2072 values_ = new java.util.ArrayList<dev.enola.thing.proto.Value>(values_); 2073 bitField0_ |= 0x00000002; 2074 } 2075 } 2076 2077 private com.google.protobuf.RepeatedFieldBuilder< 2078 dev.enola.thing.proto.Value, dev.enola.thing.proto.Value.Builder, dev.enola.thing.proto.ValueOrBuilder> valuesBuilder_; 2079 2080 /** 2081 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2082 */ 2083 public java.util.List<dev.enola.thing.proto.Value> getValuesList() { 2084 if (valuesBuilder_ == null) { 2085 return java.util.Collections.unmodifiableList(values_); 2086 } else { 2087 return valuesBuilder_.getMessageList(); 2088 } 2089 } 2090 /** 2091 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2092 */ 2093 public int getValuesCount() { 2094 if (valuesBuilder_ == null) { 2095 return values_.size(); 2096 } else { 2097 return valuesBuilder_.getCount(); 2098 } 2099 } 2100 /** 2101 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2102 */ 2103 public dev.enola.thing.proto.Value getValues(int index) { 2104 if (valuesBuilder_ == null) { 2105 return values_.get(index); 2106 } else { 2107 return valuesBuilder_.getMessage(index); 2108 } 2109 } 2110 /** 2111 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2112 */ 2113 public Builder setValues( 2114 int index, dev.enola.thing.proto.Value value) { 2115 if (valuesBuilder_ == null) { 2116 if (value == null) { 2117 throw new NullPointerException(); 2118 } 2119 ensureValuesIsMutable(); 2120 values_.set(index, value); 2121 onChanged(); 2122 } else { 2123 valuesBuilder_.setMessage(index, value); 2124 } 2125 return this; 2126 } 2127 /** 2128 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2129 */ 2130 public Builder setValues( 2131 int index, dev.enola.thing.proto.Value.Builder builderForValue) { 2132 if (valuesBuilder_ == null) { 2133 ensureValuesIsMutable(); 2134 values_.set(index, builderForValue.build()); 2135 onChanged(); 2136 } else { 2137 valuesBuilder_.setMessage(index, builderForValue.build()); 2138 } 2139 return this; 2140 } 2141 /** 2142 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2143 */ 2144 public Builder addValues(dev.enola.thing.proto.Value value) { 2145 if (valuesBuilder_ == null) { 2146 if (value == null) { 2147 throw new NullPointerException(); 2148 } 2149 ensureValuesIsMutable(); 2150 values_.add(value); 2151 onChanged(); 2152 } else { 2153 valuesBuilder_.addMessage(value); 2154 } 2155 return this; 2156 } 2157 /** 2158 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2159 */ 2160 public Builder addValues( 2161 int index, dev.enola.thing.proto.Value value) { 2162 if (valuesBuilder_ == null) { 2163 if (value == null) { 2164 throw new NullPointerException(); 2165 } 2166 ensureValuesIsMutable(); 2167 values_.add(index, value); 2168 onChanged(); 2169 } else { 2170 valuesBuilder_.addMessage(index, value); 2171 } 2172 return this; 2173 } 2174 /** 2175 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2176 */ 2177 public Builder addValues( 2178 dev.enola.thing.proto.Value.Builder builderForValue) { 2179 if (valuesBuilder_ == null) { 2180 ensureValuesIsMutable(); 2181 values_.add(builderForValue.build()); 2182 onChanged(); 2183 } else { 2184 valuesBuilder_.addMessage(builderForValue.build()); 2185 } 2186 return this; 2187 } 2188 /** 2189 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2190 */ 2191 public Builder addValues( 2192 int index, dev.enola.thing.proto.Value.Builder builderForValue) { 2193 if (valuesBuilder_ == null) { 2194 ensureValuesIsMutable(); 2195 values_.add(index, builderForValue.build()); 2196 onChanged(); 2197 } else { 2198 valuesBuilder_.addMessage(index, builderForValue.build()); 2199 } 2200 return this; 2201 } 2202 /** 2203 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2204 */ 2205 public Builder addAllValues( 2206 java.lang.Iterable<? extends dev.enola.thing.proto.Value> values) { 2207 if (valuesBuilder_ == null) { 2208 ensureValuesIsMutable(); 2209 com.google.protobuf.AbstractMessageLite.Builder.addAll( 2210 values, values_); 2211 onChanged(); 2212 } else { 2213 valuesBuilder_.addAllMessages(values); 2214 } 2215 return this; 2216 } 2217 /** 2218 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2219 */ 2220 public Builder clearValues() { 2221 if (valuesBuilder_ == null) { 2222 values_ = java.util.Collections.emptyList(); 2223 bitField0_ = (bitField0_ & ~0x00000002); 2224 onChanged(); 2225 } else { 2226 valuesBuilder_.clear(); 2227 } 2228 return this; 2229 } 2230 /** 2231 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2232 */ 2233 public Builder removeValues(int index) { 2234 if (valuesBuilder_ == null) { 2235 ensureValuesIsMutable(); 2236 values_.remove(index); 2237 onChanged(); 2238 } else { 2239 valuesBuilder_.remove(index); 2240 } 2241 return this; 2242 } 2243 /** 2244 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2245 */ 2246 public dev.enola.thing.proto.Value.Builder getValuesBuilder( 2247 int index) { 2248 return internalGetValuesFieldBuilder().getBuilder(index); 2249 } 2250 /** 2251 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2252 */ 2253 public dev.enola.thing.proto.ValueOrBuilder getValuesOrBuilder( 2254 int index) { 2255 if (valuesBuilder_ == null) { 2256 return values_.get(index); } else { 2257 return valuesBuilder_.getMessageOrBuilder(index); 2258 } 2259 } 2260 /** 2261 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2262 */ 2263 public java.util.List<? extends dev.enola.thing.proto.ValueOrBuilder> 2264 getValuesOrBuilderList() { 2265 if (valuesBuilder_ != null) { 2266 return valuesBuilder_.getMessageOrBuilderList(); 2267 } else { 2268 return java.util.Collections.unmodifiableList(values_); 2269 } 2270 } 2271 /** 2272 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2273 */ 2274 public dev.enola.thing.proto.Value.Builder addValuesBuilder() { 2275 return internalGetValuesFieldBuilder().addBuilder( 2276 dev.enola.thing.proto.Value.getDefaultInstance()); 2277 } 2278 /** 2279 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2280 */ 2281 public dev.enola.thing.proto.Value.Builder addValuesBuilder( 2282 int index) { 2283 return internalGetValuesFieldBuilder().addBuilder( 2284 index, dev.enola.thing.proto.Value.getDefaultInstance()); 2285 } 2286 /** 2287 * <code>repeated .dev.enola.thing.Value values = 2;</code> 2288 */ 2289 public java.util.List<dev.enola.thing.proto.Value.Builder> 2290 getValuesBuilderList() { 2291 return internalGetValuesFieldBuilder().getBuilderList(); 2292 } 2293 private com.google.protobuf.RepeatedFieldBuilder< 2294 dev.enola.thing.proto.Value, dev.enola.thing.proto.Value.Builder, dev.enola.thing.proto.ValueOrBuilder> 2295 internalGetValuesFieldBuilder() { 2296 if (valuesBuilder_ == null) { 2297 valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< 2298 dev.enola.thing.proto.Value, dev.enola.thing.proto.Value.Builder, dev.enola.thing.proto.ValueOrBuilder>( 2299 values_, 2300 ((bitField0_ & 0x00000002) != 0), 2301 getParentForChildren(), 2302 isClean()); 2303 values_ = null; 2304 } 2305 return valuesBuilder_; 2306 } 2307 2308 // @@protoc_insertion_point(builder_scope:dev.enola.thing.Value.List) 2309 } 2310 2311 // @@protoc_insertion_point(class_scope:dev.enola.thing.Value.List) 2312 private static final dev.enola.thing.proto.Value.List DEFAULT_INSTANCE; 2313 static { 2314 DEFAULT_INSTANCE = new dev.enola.thing.proto.Value.List(); 2315 } 2316 2317 public static dev.enola.thing.proto.Value.List getDefaultInstance() { 2318 return DEFAULT_INSTANCE; 2319 } 2320 2321 private static final com.google.protobuf.Parser<List> 2322 PARSER = new com.google.protobuf.AbstractParser<List>() { 2323 @java.lang.Override 2324 public List parsePartialFrom( 2325 com.google.protobuf.CodedInputStream input, 2326 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2327 throws com.google.protobuf.InvalidProtocolBufferException { 2328 Builder builder = newBuilder(); 2329 try { 2330 builder.mergeFrom(input, extensionRegistry); 2331 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2332 throw e.setUnfinishedMessage(builder.buildPartial()); 2333 } catch (com.google.protobuf.UninitializedMessageException e) { 2334 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2335 } catch (java.io.IOException e) { 2336 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2337 .setUnfinishedMessage(builder.buildPartial()); 2338 } 2339 return builder.buildPartial(); 2340 } 2341 }; 2342 2343 public static com.google.protobuf.Parser<List> parser() { 2344 return PARSER; 2345 } 2346 2347 @java.lang.Override 2348 public com.google.protobuf.Parser<List> getParserForType() { 2349 return PARSER; 2350 } 2351 2352 @java.lang.Override 2353 public dev.enola.thing.proto.Value.List getDefaultInstanceForType() { 2354 return DEFAULT_INSTANCE; 2355 } 2356 2357 } 2358 2359 private int kindCase_ = 0; 2360 @SuppressWarnings("serial") 2361 private java.lang.Object kind_; 2362 public enum KindCase 2363 implements com.google.protobuf.Internal.EnumLite, 2364 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 2365 LINK(1), 2366 STRING(2), 2367 LITERAL(3), 2368 LANG_STRING(4), 2369 STRUCT(5), 2370 LIST(6), 2371 KIND_NOT_SET(0); 2372 private final int value; 2373 private KindCase(int value) { 2374 this.value = value; 2375 } 2376 /** 2377 * @param value The number of the enum to look for. 2378 * @return The enum associated with the given number. 2379 * @deprecated Use {@link #forNumber(int)} instead. 2380 */ 2381 @java.lang.Deprecated 2382 public static KindCase valueOf(int value) { 2383 return forNumber(value); 2384 } 2385 2386 public static KindCase forNumber(int value) { 2387 switch (value) { 2388 case 1: return LINK; 2389 case 2: return STRING; 2390 case 3: return LITERAL; 2391 case 4: return LANG_STRING; 2392 case 5: return STRUCT; 2393 case 6: return LIST; 2394 case 0: return KIND_NOT_SET; 2395 default: return null; 2396 } 2397 } 2398 public int getNumber() { 2399 return this.value; 2400 } 2401 }; 2402 2403 public KindCase 2404 getKindCase() { 2405 return KindCase.forNumber( 2406 kindCase_); 2407 } 2408 2409 public static final int LINK_FIELD_NUMBER = 1; 2410 /** 2411 * <code>string link = 1;</code> 2412 * @return Whether the link field is set. 2413 */ 2414 public boolean hasLink() { 2415 return kindCase_ == 1; 2416 } 2417 /** 2418 * <code>string link = 1;</code> 2419 * @return The link. 2420 */ 2421 public java.lang.String getLink() { 2422 java.lang.Object ref = ""; 2423 if (kindCase_ == 1) { 2424 ref = kind_; 2425 } 2426 if (ref instanceof java.lang.String) { 2427 return (java.lang.String) ref; 2428 } else { 2429 com.google.protobuf.ByteString bs = 2430 (com.google.protobuf.ByteString) ref; 2431 java.lang.String s = bs.toStringUtf8(); 2432 if (kindCase_ == 1) { 2433 kind_ = s; 2434 } 2435 return s; 2436 } 2437 } 2438 /** 2439 * <code>string link = 1;</code> 2440 * @return The bytes for link. 2441 */ 2442 public com.google.protobuf.ByteString 2443 getLinkBytes() { 2444 java.lang.Object ref = ""; 2445 if (kindCase_ == 1) { 2446 ref = kind_; 2447 } 2448 if (ref instanceof java.lang.String) { 2449 com.google.protobuf.ByteString b = 2450 com.google.protobuf.ByteString.copyFromUtf8( 2451 (java.lang.String) ref); 2452 if (kindCase_ == 1) { 2453 kind_ = b; 2454 } 2455 return b; 2456 } else { 2457 return (com.google.protobuf.ByteString) ref; 2458 } 2459 } 2460 2461 public static final int STRING_FIELD_NUMBER = 2; 2462 /** 2463 * <code>string string = 2;</code> 2464 * @return Whether the string field is set. 2465 */ 2466 public boolean hasString() { 2467 return kindCase_ == 2; 2468 } 2469 /** 2470 * <code>string string = 2;</code> 2471 * @return The string. 2472 */ 2473 public java.lang.String getString() { 2474 java.lang.Object ref = ""; 2475 if (kindCase_ == 2) { 2476 ref = kind_; 2477 } 2478 if (ref instanceof java.lang.String) { 2479 return (java.lang.String) ref; 2480 } else { 2481 com.google.protobuf.ByteString bs = 2482 (com.google.protobuf.ByteString) ref; 2483 java.lang.String s = bs.toStringUtf8(); 2484 if (kindCase_ == 2) { 2485 kind_ = s; 2486 } 2487 return s; 2488 } 2489 } 2490 /** 2491 * <code>string string = 2;</code> 2492 * @return The bytes for string. 2493 */ 2494 public com.google.protobuf.ByteString 2495 getStringBytes() { 2496 java.lang.Object ref = ""; 2497 if (kindCase_ == 2) { 2498 ref = kind_; 2499 } 2500 if (ref instanceof java.lang.String) { 2501 com.google.protobuf.ByteString b = 2502 com.google.protobuf.ByteString.copyFromUtf8( 2503 (java.lang.String) ref); 2504 if (kindCase_ == 2) { 2505 kind_ = b; 2506 } 2507 return b; 2508 } else { 2509 return (com.google.protobuf.ByteString) ref; 2510 } 2511 } 2512 2513 public static final int LITERAL_FIELD_NUMBER = 3; 2514 /** 2515 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 2516 * @return Whether the literal field is set. 2517 */ 2518 @java.lang.Override 2519 public boolean hasLiteral() { 2520 return kindCase_ == 3; 2521 } 2522 /** 2523 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 2524 * @return The literal. 2525 */ 2526 @java.lang.Override 2527 public dev.enola.thing.proto.Value.Literal getLiteral() { 2528 if (kindCase_ == 3) { 2529 return (dev.enola.thing.proto.Value.Literal) kind_; 2530 } 2531 return dev.enola.thing.proto.Value.Literal.getDefaultInstance(); 2532 } 2533 /** 2534 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 2535 */ 2536 @java.lang.Override 2537 public dev.enola.thing.proto.Value.LiteralOrBuilder getLiteralOrBuilder() { 2538 if (kindCase_ == 3) { 2539 return (dev.enola.thing.proto.Value.Literal) kind_; 2540 } 2541 return dev.enola.thing.proto.Value.Literal.getDefaultInstance(); 2542 } 2543 2544 public static final int LANG_STRING_FIELD_NUMBER = 4; 2545 /** 2546 * <pre> 2547 * TODO Keep or remove this? See 2548 * https://github.com/enola-dev/enola/pull/540... 2549 * </pre> 2550 * 2551 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 2552 * @return Whether the langString field is set. 2553 */ 2554 @java.lang.Override 2555 public boolean hasLangString() { 2556 return kindCase_ == 4; 2557 } 2558 /** 2559 * <pre> 2560 * TODO Keep or remove this? See 2561 * https://github.com/enola-dev/enola/pull/540... 2562 * </pre> 2563 * 2564 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 2565 * @return The langString. 2566 */ 2567 @java.lang.Override 2568 public dev.enola.thing.proto.Value.LangString getLangString() { 2569 if (kindCase_ == 4) { 2570 return (dev.enola.thing.proto.Value.LangString) kind_; 2571 } 2572 return dev.enola.thing.proto.Value.LangString.getDefaultInstance(); 2573 } 2574 /** 2575 * <pre> 2576 * TODO Keep or remove this? See 2577 * https://github.com/enola-dev/enola/pull/540... 2578 * </pre> 2579 * 2580 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 2581 */ 2582 @java.lang.Override 2583 public dev.enola.thing.proto.Value.LangStringOrBuilder getLangStringOrBuilder() { 2584 if (kindCase_ == 4) { 2585 return (dev.enola.thing.proto.Value.LangString) kind_; 2586 } 2587 return dev.enola.thing.proto.Value.LangString.getDefaultInstance(); 2588 } 2589 2590 public static final int STRUCT_FIELD_NUMBER = 5; 2591 /** 2592 * <pre> 2593 * Sub-structure (contained) Thing. 2594 * </pre> 2595 * 2596 * <code>.dev.enola.thing.Thing struct = 5;</code> 2597 * @return Whether the struct field is set. 2598 */ 2599 @java.lang.Override 2600 public boolean hasStruct() { 2601 return kindCase_ == 5; 2602 } 2603 /** 2604 * <pre> 2605 * Sub-structure (contained) Thing. 2606 * </pre> 2607 * 2608 * <code>.dev.enola.thing.Thing struct = 5;</code> 2609 * @return The struct. 2610 */ 2611 @java.lang.Override 2612 public dev.enola.thing.proto.Thing getStruct() { 2613 if (kindCase_ == 5) { 2614 return (dev.enola.thing.proto.Thing) kind_; 2615 } 2616 return dev.enola.thing.proto.Thing.getDefaultInstance(); 2617 } 2618 /** 2619 * <pre> 2620 * Sub-structure (contained) Thing. 2621 * </pre> 2622 * 2623 * <code>.dev.enola.thing.Thing struct = 5;</code> 2624 */ 2625 @java.lang.Override 2626 public dev.enola.thing.proto.ThingOrBuilder getStructOrBuilder() { 2627 if (kindCase_ == 5) { 2628 return (dev.enola.thing.proto.Thing) kind_; 2629 } 2630 return dev.enola.thing.proto.Thing.getDefaultInstance(); 2631 } 2632 2633 public static final int LIST_FIELD_NUMBER = 6; 2634 /** 2635 * <pre> 2636 * List of Values. 2637 * </pre> 2638 * 2639 * <code>.dev.enola.thing.Value.List list = 6;</code> 2640 * @return Whether the list field is set. 2641 */ 2642 @java.lang.Override 2643 public boolean hasList() { 2644 return kindCase_ == 6; 2645 } 2646 /** 2647 * <pre> 2648 * List of Values. 2649 * </pre> 2650 * 2651 * <code>.dev.enola.thing.Value.List list = 6;</code> 2652 * @return The list. 2653 */ 2654 @java.lang.Override 2655 public dev.enola.thing.proto.Value.List getList() { 2656 if (kindCase_ == 6) { 2657 return (dev.enola.thing.proto.Value.List) kind_; 2658 } 2659 return dev.enola.thing.proto.Value.List.getDefaultInstance(); 2660 } 2661 /** 2662 * <pre> 2663 * List of Values. 2664 * </pre> 2665 * 2666 * <code>.dev.enola.thing.Value.List list = 6;</code> 2667 */ 2668 @java.lang.Override 2669 public dev.enola.thing.proto.Value.ListOrBuilder getListOrBuilder() { 2670 if (kindCase_ == 6) { 2671 return (dev.enola.thing.proto.Value.List) kind_; 2672 } 2673 return dev.enola.thing.proto.Value.List.getDefaultInstance(); 2674 } 2675 2676 private byte memoizedIsInitialized = -1; 2677 @java.lang.Override 2678 public final boolean isInitialized() { 2679 byte isInitialized = memoizedIsInitialized; 2680 if (isInitialized == 1) return true; 2681 if (isInitialized == 0) return false; 2682 2683 memoizedIsInitialized = 1; 2684 return true; 2685 } 2686 2687 @java.lang.Override 2688 public void writeTo(com.google.protobuf.CodedOutputStream output) 2689 throws java.io.IOException { 2690 if (kindCase_ == 1) { 2691 com.google.protobuf.GeneratedMessage.writeString(output, 1, kind_); 2692 } 2693 if (kindCase_ == 2) { 2694 com.google.protobuf.GeneratedMessage.writeString(output, 2, kind_); 2695 } 2696 if (kindCase_ == 3) { 2697 output.writeMessage(3, (dev.enola.thing.proto.Value.Literal) kind_); 2698 } 2699 if (kindCase_ == 4) { 2700 output.writeMessage(4, (dev.enola.thing.proto.Value.LangString) kind_); 2701 } 2702 if (kindCase_ == 5) { 2703 output.writeMessage(5, (dev.enola.thing.proto.Thing) kind_); 2704 } 2705 if (kindCase_ == 6) { 2706 output.writeMessage(6, (dev.enola.thing.proto.Value.List) kind_); 2707 } 2708 getUnknownFields().writeTo(output); 2709 } 2710 2711 @java.lang.Override 2712 public int getSerializedSize() { 2713 int size = memoizedSize; 2714 if (size != -1) return size; 2715 2716 size = 0; 2717 if (kindCase_ == 1) { 2718 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kind_); 2719 } 2720 if (kindCase_ == 2) { 2721 size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kind_); 2722 } 2723 if (kindCase_ == 3) { 2724 size += com.google.protobuf.CodedOutputStream 2725 .computeMessageSize(3, (dev.enola.thing.proto.Value.Literal) kind_); 2726 } 2727 if (kindCase_ == 4) { 2728 size += com.google.protobuf.CodedOutputStream 2729 .computeMessageSize(4, (dev.enola.thing.proto.Value.LangString) kind_); 2730 } 2731 if (kindCase_ == 5) { 2732 size += com.google.protobuf.CodedOutputStream 2733 .computeMessageSize(5, (dev.enola.thing.proto.Thing) kind_); 2734 } 2735 if (kindCase_ == 6) { 2736 size += com.google.protobuf.CodedOutputStream 2737 .computeMessageSize(6, (dev.enola.thing.proto.Value.List) kind_); 2738 } 2739 size += getUnknownFields().getSerializedSize(); 2740 memoizedSize = size; 2741 return size; 2742 } 2743 2744 @java.lang.Override 2745 public boolean equals(final java.lang.Object obj) { 2746 if (obj == this) { 2747 return true; 2748 } 2749 if (!(obj instanceof dev.enola.thing.proto.Value)) { 2750 return super.equals(obj); 2751 } 2752 dev.enola.thing.proto.Value other = (dev.enola.thing.proto.Value) obj; 2753 2754 if (!getKindCase().equals(other.getKindCase())) return false; 2755 switch (kindCase_) { 2756 case 1: 2757 if (!getLink() 2758 .equals(other.getLink())) return false; 2759 break; 2760 case 2: 2761 if (!getString() 2762 .equals(other.getString())) return false; 2763 break; 2764 case 3: 2765 if (!getLiteral() 2766 .equals(other.getLiteral())) return false; 2767 break; 2768 case 4: 2769 if (!getLangString() 2770 .equals(other.getLangString())) return false; 2771 break; 2772 case 5: 2773 if (!getStruct() 2774 .equals(other.getStruct())) return false; 2775 break; 2776 case 6: 2777 if (!getList() 2778 .equals(other.getList())) return false; 2779 break; 2780 case 0: 2781 default: 2782 } 2783 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 2784 return true; 2785 } 2786 2787 @java.lang.Override 2788 public int hashCode() { 2789 if (memoizedHashCode != 0) { 2790 return memoizedHashCode; 2791 } 2792 int hash = 41; 2793 hash = (19 * hash) + getDescriptor().hashCode(); 2794 switch (kindCase_) { 2795 case 1: 2796 hash = (37 * hash) + LINK_FIELD_NUMBER; 2797 hash = (53 * hash) + getLink().hashCode(); 2798 break; 2799 case 2: 2800 hash = (37 * hash) + STRING_FIELD_NUMBER; 2801 hash = (53 * hash) + getString().hashCode(); 2802 break; 2803 case 3: 2804 hash = (37 * hash) + LITERAL_FIELD_NUMBER; 2805 hash = (53 * hash) + getLiteral().hashCode(); 2806 break; 2807 case 4: 2808 hash = (37 * hash) + LANG_STRING_FIELD_NUMBER; 2809 hash = (53 * hash) + getLangString().hashCode(); 2810 break; 2811 case 5: 2812 hash = (37 * hash) + STRUCT_FIELD_NUMBER; 2813 hash = (53 * hash) + getStruct().hashCode(); 2814 break; 2815 case 6: 2816 hash = (37 * hash) + LIST_FIELD_NUMBER; 2817 hash = (53 * hash) + getList().hashCode(); 2818 break; 2819 case 0: 2820 default: 2821 } 2822 hash = (29 * hash) + getUnknownFields().hashCode(); 2823 memoizedHashCode = hash; 2824 return hash; 2825 } 2826 2827 public static dev.enola.thing.proto.Value parseFrom( 2828 java.nio.ByteBuffer data) 2829 throws com.google.protobuf.InvalidProtocolBufferException { 2830 return PARSER.parseFrom(data); 2831 } 2832 public static dev.enola.thing.proto.Value parseFrom( 2833 java.nio.ByteBuffer data, 2834 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2835 throws com.google.protobuf.InvalidProtocolBufferException { 2836 return PARSER.parseFrom(data, extensionRegistry); 2837 } 2838 public static dev.enola.thing.proto.Value parseFrom( 2839 com.google.protobuf.ByteString data) 2840 throws com.google.protobuf.InvalidProtocolBufferException { 2841 return PARSER.parseFrom(data); 2842 } 2843 public static dev.enola.thing.proto.Value parseFrom( 2844 com.google.protobuf.ByteString data, 2845 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2846 throws com.google.protobuf.InvalidProtocolBufferException { 2847 return PARSER.parseFrom(data, extensionRegistry); 2848 } 2849 public static dev.enola.thing.proto.Value parseFrom(byte[] data) 2850 throws com.google.protobuf.InvalidProtocolBufferException { 2851 return PARSER.parseFrom(data); 2852 } 2853 public static dev.enola.thing.proto.Value parseFrom( 2854 byte[] data, 2855 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2856 throws com.google.protobuf.InvalidProtocolBufferException { 2857 return PARSER.parseFrom(data, extensionRegistry); 2858 } 2859 public static dev.enola.thing.proto.Value parseFrom(java.io.InputStream input) 2860 throws java.io.IOException { 2861 return com.google.protobuf.GeneratedMessage 2862 .parseWithIOException(PARSER, input); 2863 } 2864 public static dev.enola.thing.proto.Value parseFrom( 2865 java.io.InputStream input, 2866 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2867 throws java.io.IOException { 2868 return com.google.protobuf.GeneratedMessage 2869 .parseWithIOException(PARSER, input, extensionRegistry); 2870 } 2871 2872 public static dev.enola.thing.proto.Value parseDelimitedFrom(java.io.InputStream input) 2873 throws java.io.IOException { 2874 return com.google.protobuf.GeneratedMessage 2875 .parseDelimitedWithIOException(PARSER, input); 2876 } 2877 2878 public static dev.enola.thing.proto.Value parseDelimitedFrom( 2879 java.io.InputStream input, 2880 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2881 throws java.io.IOException { 2882 return com.google.protobuf.GeneratedMessage 2883 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); 2884 } 2885 public static dev.enola.thing.proto.Value parseFrom( 2886 com.google.protobuf.CodedInputStream input) 2887 throws java.io.IOException { 2888 return com.google.protobuf.GeneratedMessage 2889 .parseWithIOException(PARSER, input); 2890 } 2891 public static dev.enola.thing.proto.Value parseFrom( 2892 com.google.protobuf.CodedInputStream input, 2893 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2894 throws java.io.IOException { 2895 return com.google.protobuf.GeneratedMessage 2896 .parseWithIOException(PARSER, input, extensionRegistry); 2897 } 2898 2899 @java.lang.Override 2900 public Builder newBuilderForType() { return newBuilder(); } 2901 public static Builder newBuilder() { 2902 return DEFAULT_INSTANCE.toBuilder(); 2903 } 2904 public static Builder newBuilder(dev.enola.thing.proto.Value prototype) { 2905 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 2906 } 2907 @java.lang.Override 2908 public Builder toBuilder() { 2909 return this == DEFAULT_INSTANCE 2910 ? new Builder() : new Builder().mergeFrom(this); 2911 } 2912 2913 @java.lang.Override 2914 protected Builder newBuilderForType( 2915 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 2916 Builder builder = new Builder(parent); 2917 return builder; 2918 } 2919 /** 2920 * <pre> 2921 * Value is the stuff that Thing's fields are made of. 2922 * </pre> 2923 * 2924 * Protobuf type {@code dev.enola.thing.Value} 2925 */ 2926 public static final class Builder extends 2927 com.google.protobuf.GeneratedMessage.Builder<Builder> implements 2928 // @@protoc_insertion_point(builder_implements:dev.enola.thing.Value) 2929 dev.enola.thing.proto.ValueOrBuilder { 2930 public static final com.google.protobuf.Descriptors.Descriptor 2931 getDescriptor() { 2932 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_descriptor; 2933 } 2934 2935 @java.lang.Override 2936 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 2937 internalGetFieldAccessorTable() { 2938 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_fieldAccessorTable 2939 .ensureFieldAccessorsInitialized( 2940 dev.enola.thing.proto.Value.class, dev.enola.thing.proto.Value.Builder.class); 2941 } 2942 2943 // Construct using dev.enola.thing.proto.Value.newBuilder() 2944 private Builder() { 2945 2946 } 2947 2948 private Builder( 2949 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 2950 super(parent); 2951 2952 } 2953 @java.lang.Override 2954 public Builder clear() { 2955 super.clear(); 2956 bitField0_ = 0; 2957 if (literalBuilder_ != null) { 2958 literalBuilder_.clear(); 2959 } 2960 if (langStringBuilder_ != null) { 2961 langStringBuilder_.clear(); 2962 } 2963 if (structBuilder_ != null) { 2964 structBuilder_.clear(); 2965 } 2966 if (listBuilder_ != null) { 2967 listBuilder_.clear(); 2968 } 2969 kindCase_ = 0; 2970 kind_ = null; 2971 return this; 2972 } 2973 2974 @java.lang.Override 2975 public com.google.protobuf.Descriptors.Descriptor 2976 getDescriptorForType() { 2977 return dev.enola.thing.proto.ThingOuterClass.internal_static_dev_enola_thing_Value_descriptor; 2978 } 2979 2980 @java.lang.Override 2981 public dev.enola.thing.proto.Value getDefaultInstanceForType() { 2982 return dev.enola.thing.proto.Value.getDefaultInstance(); 2983 } 2984 2985 @java.lang.Override 2986 public dev.enola.thing.proto.Value build() { 2987 dev.enola.thing.proto.Value result = buildPartial(); 2988 if (!result.isInitialized()) { 2989 throw newUninitializedMessageException(result); 2990 } 2991 return result; 2992 } 2993 2994 @java.lang.Override 2995 public dev.enola.thing.proto.Value buildPartial() { 2996 dev.enola.thing.proto.Value result = new dev.enola.thing.proto.Value(this); 2997 if (bitField0_ != 0) { buildPartial0(result); } 2998 buildPartialOneofs(result); 2999 onBuilt(); 3000 return result; 3001 } 3002 3003 private void buildPartial0(dev.enola.thing.proto.Value result) { 3004 int from_bitField0_ = bitField0_; 3005 } 3006 3007 private void buildPartialOneofs(dev.enola.thing.proto.Value result) { 3008 result.kindCase_ = kindCase_; 3009 result.kind_ = this.kind_; 3010 if (kindCase_ == 3 && 3011 literalBuilder_ != null) { 3012 result.kind_ = literalBuilder_.build(); 3013 } 3014 if (kindCase_ == 4 && 3015 langStringBuilder_ != null) { 3016 result.kind_ = langStringBuilder_.build(); 3017 } 3018 if (kindCase_ == 5 && 3019 structBuilder_ != null) { 3020 result.kind_ = structBuilder_.build(); 3021 } 3022 if (kindCase_ == 6 && 3023 listBuilder_ != null) { 3024 result.kind_ = listBuilder_.build(); 3025 } 3026 } 3027 3028 @java.lang.Override 3029 public Builder mergeFrom(com.google.protobuf.Message other) { 3030 if (other instanceof dev.enola.thing.proto.Value) { 3031 return mergeFrom((dev.enola.thing.proto.Value)other); 3032 } else { 3033 super.mergeFrom(other); 3034 return this; 3035 } 3036 } 3037 3038 public Builder mergeFrom(dev.enola.thing.proto.Value other) { 3039 if (other == dev.enola.thing.proto.Value.getDefaultInstance()) return this; 3040 switch (other.getKindCase()) { 3041 case LINK: { 3042 kindCase_ = 1; 3043 kind_ = other.kind_; 3044 onChanged(); 3045 break; 3046 } 3047 case STRING: { 3048 kindCase_ = 2; 3049 kind_ = other.kind_; 3050 onChanged(); 3051 break; 3052 } 3053 case LITERAL: { 3054 mergeLiteral(other.getLiteral()); 3055 break; 3056 } 3057 case LANG_STRING: { 3058 mergeLangString(other.getLangString()); 3059 break; 3060 } 3061 case STRUCT: { 3062 mergeStruct(other.getStruct()); 3063 break; 3064 } 3065 case LIST: { 3066 mergeList(other.getList()); 3067 break; 3068 } 3069 case KIND_NOT_SET: { 3070 break; 3071 } 3072 } 3073 this.mergeUnknownFields(other.getUnknownFields()); 3074 onChanged(); 3075 return this; 3076 } 3077 3078 @java.lang.Override 3079 public final boolean isInitialized() { 3080 return true; 3081 } 3082 3083 @java.lang.Override 3084 public Builder mergeFrom( 3085 com.google.protobuf.CodedInputStream input, 3086 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3087 throws java.io.IOException { 3088 if (extensionRegistry == null) { 3089 throw new java.lang.NullPointerException(); 3090 } 3091 try { 3092 boolean done = false; 3093 while (!done) { 3094 int tag = input.readTag(); 3095 switch (tag) { 3096 case 0: 3097 done = true; 3098 break; 3099 case 10: { 3100 java.lang.String s = input.readStringRequireUtf8(); 3101 kindCase_ = 1; 3102 kind_ = s; 3103 break; 3104 } // case 10 3105 case 18: { 3106 java.lang.String s = input.readStringRequireUtf8(); 3107 kindCase_ = 2; 3108 kind_ = s; 3109 break; 3110 } // case 18 3111 case 26: { 3112 input.readMessage( 3113 internalGetLiteralFieldBuilder().getBuilder(), 3114 extensionRegistry); 3115 kindCase_ = 3; 3116 break; 3117 } // case 26 3118 case 34: { 3119 input.readMessage( 3120 internalGetLangStringFieldBuilder().getBuilder(), 3121 extensionRegistry); 3122 kindCase_ = 4; 3123 break; 3124 } // case 34 3125 case 42: { 3126 input.readMessage( 3127 internalGetStructFieldBuilder().getBuilder(), 3128 extensionRegistry); 3129 kindCase_ = 5; 3130 break; 3131 } // case 42 3132 case 50: { 3133 input.readMessage( 3134 internalGetListFieldBuilder().getBuilder(), 3135 extensionRegistry); 3136 kindCase_ = 6; 3137 break; 3138 } // case 50 3139 default: { 3140 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 3141 done = true; // was an endgroup tag 3142 } 3143 break; 3144 } // default: 3145 } // switch (tag) 3146 } // while (!done) 3147 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3148 throw e.unwrapIOException(); 3149 } finally { 3150 onChanged(); 3151 } // finally 3152 return this; 3153 } 3154 private int kindCase_ = 0; 3155 private java.lang.Object kind_; 3156 public KindCase 3157 getKindCase() { 3158 return KindCase.forNumber( 3159 kindCase_); 3160 } 3161 3162 public Builder clearKind() { 3163 kindCase_ = 0; 3164 kind_ = null; 3165 onChanged(); 3166 return this; 3167 } 3168 3169 private int bitField0_; 3170 3171 /** 3172 * <code>string link = 1;</code> 3173 * @return Whether the link field is set. 3174 */ 3175 @java.lang.Override 3176 public boolean hasLink() { 3177 return kindCase_ == 1; 3178 } 3179 /** 3180 * <code>string link = 1;</code> 3181 * @return The link. 3182 */ 3183 @java.lang.Override 3184 public java.lang.String getLink() { 3185 java.lang.Object ref = ""; 3186 if (kindCase_ == 1) { 3187 ref = kind_; 3188 } 3189 if (!(ref instanceof java.lang.String)) { 3190 com.google.protobuf.ByteString bs = 3191 (com.google.protobuf.ByteString) ref; 3192 java.lang.String s = bs.toStringUtf8(); 3193 if (kindCase_ == 1) { 3194 kind_ = s; 3195 } 3196 return s; 3197 } else { 3198 return (java.lang.String) ref; 3199 } 3200 } 3201 /** 3202 * <code>string link = 1;</code> 3203 * @return The bytes for link. 3204 */ 3205 @java.lang.Override 3206 public com.google.protobuf.ByteString 3207 getLinkBytes() { 3208 java.lang.Object ref = ""; 3209 if (kindCase_ == 1) { 3210 ref = kind_; 3211 } 3212 if (ref instanceof String) { 3213 com.google.protobuf.ByteString b = 3214 com.google.protobuf.ByteString.copyFromUtf8( 3215 (java.lang.String) ref); 3216 if (kindCase_ == 1) { 3217 kind_ = b; 3218 } 3219 return b; 3220 } else { 3221 return (com.google.protobuf.ByteString) ref; 3222 } 3223 } 3224 /** 3225 * <code>string link = 1;</code> 3226 * @param value The link to set. 3227 * @return This builder for chaining. 3228 */ 3229 public Builder setLink( 3230 java.lang.String value) { 3231 if (value == null) { throw new NullPointerException(); } 3232 kindCase_ = 1; 3233 kind_ = value; 3234 onChanged(); 3235 return this; 3236 } 3237 /** 3238 * <code>string link = 1;</code> 3239 * @return This builder for chaining. 3240 */ 3241 public Builder clearLink() { 3242 if (kindCase_ == 1) { 3243 kindCase_ = 0; 3244 kind_ = null; 3245 onChanged(); 3246 } 3247 return this; 3248 } 3249 /** 3250 * <code>string link = 1;</code> 3251 * @param value The bytes for link to set. 3252 * @return This builder for chaining. 3253 */ 3254 public Builder setLinkBytes( 3255 com.google.protobuf.ByteString value) { 3256 if (value == null) { throw new NullPointerException(); } 3257 checkByteStringIsUtf8(value); 3258 kindCase_ = 1; 3259 kind_ = value; 3260 onChanged(); 3261 return this; 3262 } 3263 3264 /** 3265 * <code>string string = 2;</code> 3266 * @return Whether the string field is set. 3267 */ 3268 @java.lang.Override 3269 public boolean hasString() { 3270 return kindCase_ == 2; 3271 } 3272 /** 3273 * <code>string string = 2;</code> 3274 * @return The string. 3275 */ 3276 @java.lang.Override 3277 public java.lang.String getString() { 3278 java.lang.Object ref = ""; 3279 if (kindCase_ == 2) { 3280 ref = kind_; 3281 } 3282 if (!(ref instanceof java.lang.String)) { 3283 com.google.protobuf.ByteString bs = 3284 (com.google.protobuf.ByteString) ref; 3285 java.lang.String s = bs.toStringUtf8(); 3286 if (kindCase_ == 2) { 3287 kind_ = s; 3288 } 3289 return s; 3290 } else { 3291 return (java.lang.String) ref; 3292 } 3293 } 3294 /** 3295 * <code>string string = 2;</code> 3296 * @return The bytes for string. 3297 */ 3298 @java.lang.Override 3299 public com.google.protobuf.ByteString 3300 getStringBytes() { 3301 java.lang.Object ref = ""; 3302 if (kindCase_ == 2) { 3303 ref = kind_; 3304 } 3305 if (ref instanceof String) { 3306 com.google.protobuf.ByteString b = 3307 com.google.protobuf.ByteString.copyFromUtf8( 3308 (java.lang.String) ref); 3309 if (kindCase_ == 2) { 3310 kind_ = b; 3311 } 3312 return b; 3313 } else { 3314 return (com.google.protobuf.ByteString) ref; 3315 } 3316 } 3317 /** 3318 * <code>string string = 2;</code> 3319 * @param value The string to set. 3320 * @return This builder for chaining. 3321 */ 3322 public Builder setString( 3323 java.lang.String value) { 3324 if (value == null) { throw new NullPointerException(); } 3325 kindCase_ = 2; 3326 kind_ = value; 3327 onChanged(); 3328 return this; 3329 } 3330 /** 3331 * <code>string string = 2;</code> 3332 * @return This builder for chaining. 3333 */ 3334 public Builder clearString() { 3335 if (kindCase_ == 2) { 3336 kindCase_ = 0; 3337 kind_ = null; 3338 onChanged(); 3339 } 3340 return this; 3341 } 3342 /** 3343 * <code>string string = 2;</code> 3344 * @param value The bytes for string to set. 3345 * @return This builder for chaining. 3346 */ 3347 public Builder setStringBytes( 3348 com.google.protobuf.ByteString value) { 3349 if (value == null) { throw new NullPointerException(); } 3350 checkByteStringIsUtf8(value); 3351 kindCase_ = 2; 3352 kind_ = value; 3353 onChanged(); 3354 return this; 3355 } 3356 3357 private com.google.protobuf.SingleFieldBuilder< 3358 dev.enola.thing.proto.Value.Literal, dev.enola.thing.proto.Value.Literal.Builder, dev.enola.thing.proto.Value.LiteralOrBuilder> literalBuilder_; 3359 /** 3360 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 3361 * @return Whether the literal field is set. 3362 */ 3363 @java.lang.Override 3364 public boolean hasLiteral() { 3365 return kindCase_ == 3; 3366 } 3367 /** 3368 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 3369 * @return The literal. 3370 */ 3371 @java.lang.Override 3372 public dev.enola.thing.proto.Value.Literal getLiteral() { 3373 if (literalBuilder_ == null) { 3374 if (kindCase_ == 3) { 3375 return (dev.enola.thing.proto.Value.Literal) kind_; 3376 } 3377 return dev.enola.thing.proto.Value.Literal.getDefaultInstance(); 3378 } else { 3379 if (kindCase_ == 3) { 3380 return literalBuilder_.getMessage(); 3381 } 3382 return dev.enola.thing.proto.Value.Literal.getDefaultInstance(); 3383 } 3384 } 3385 /** 3386 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 3387 */ 3388 public Builder setLiteral(dev.enola.thing.proto.Value.Literal value) { 3389 if (literalBuilder_ == null) { 3390 if (value == null) { 3391 throw new NullPointerException(); 3392 } 3393 kind_ = value; 3394 onChanged(); 3395 } else { 3396 literalBuilder_.setMessage(value); 3397 } 3398 kindCase_ = 3; 3399 return this; 3400 } 3401 /** 3402 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 3403 */ 3404 public Builder setLiteral( 3405 dev.enola.thing.proto.Value.Literal.Builder builderForValue) { 3406 if (literalBuilder_ == null) { 3407 kind_ = builderForValue.build(); 3408 onChanged(); 3409 } else { 3410 literalBuilder_.setMessage(builderForValue.build()); 3411 } 3412 kindCase_ = 3; 3413 return this; 3414 } 3415 /** 3416 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 3417 */ 3418 public Builder mergeLiteral(dev.enola.thing.proto.Value.Literal value) { 3419 if (literalBuilder_ == null) { 3420 if (kindCase_ == 3 && 3421 kind_ != dev.enola.thing.proto.Value.Literal.getDefaultInstance()) { 3422 kind_ = dev.enola.thing.proto.Value.Literal.newBuilder((dev.enola.thing.proto.Value.Literal) kind_) 3423 .mergeFrom(value).buildPartial(); 3424 } else { 3425 kind_ = value; 3426 } 3427 onChanged(); 3428 } else { 3429 if (kindCase_ == 3) { 3430 literalBuilder_.mergeFrom(value); 3431 } else { 3432 literalBuilder_.setMessage(value); 3433 } 3434 } 3435 kindCase_ = 3; 3436 return this; 3437 } 3438 /** 3439 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 3440 */ 3441 public Builder clearLiteral() { 3442 if (literalBuilder_ == null) { 3443 if (kindCase_ == 3) { 3444 kindCase_ = 0; 3445 kind_ = null; 3446 onChanged(); 3447 } 3448 } else { 3449 if (kindCase_ == 3) { 3450 kindCase_ = 0; 3451 kind_ = null; 3452 } 3453 literalBuilder_.clear(); 3454 } 3455 return this; 3456 } 3457 /** 3458 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 3459 */ 3460 public dev.enola.thing.proto.Value.Literal.Builder getLiteralBuilder() { 3461 return internalGetLiteralFieldBuilder().getBuilder(); 3462 } 3463 /** 3464 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 3465 */ 3466 @java.lang.Override 3467 public dev.enola.thing.proto.Value.LiteralOrBuilder getLiteralOrBuilder() { 3468 if ((kindCase_ == 3) && (literalBuilder_ != null)) { 3469 return literalBuilder_.getMessageOrBuilder(); 3470 } else { 3471 if (kindCase_ == 3) { 3472 return (dev.enola.thing.proto.Value.Literal) kind_; 3473 } 3474 return dev.enola.thing.proto.Value.Literal.getDefaultInstance(); 3475 } 3476 } 3477 /** 3478 * <code>.dev.enola.thing.Value.Literal literal = 3;</code> 3479 */ 3480 private com.google.protobuf.SingleFieldBuilder< 3481 dev.enola.thing.proto.Value.Literal, dev.enola.thing.proto.Value.Literal.Builder, dev.enola.thing.proto.Value.LiteralOrBuilder> 3482 internalGetLiteralFieldBuilder() { 3483 if (literalBuilder_ == null) { 3484 if (!(kindCase_ == 3)) { 3485 kind_ = dev.enola.thing.proto.Value.Literal.getDefaultInstance(); 3486 } 3487 literalBuilder_ = new com.google.protobuf.SingleFieldBuilder< 3488 dev.enola.thing.proto.Value.Literal, dev.enola.thing.proto.Value.Literal.Builder, dev.enola.thing.proto.Value.LiteralOrBuilder>( 3489 (dev.enola.thing.proto.Value.Literal) kind_, 3490 getParentForChildren(), 3491 isClean()); 3492 kind_ = null; 3493 } 3494 kindCase_ = 3; 3495 onChanged(); 3496 return literalBuilder_; 3497 } 3498 3499 private com.google.protobuf.SingleFieldBuilder< 3500 dev.enola.thing.proto.Value.LangString, dev.enola.thing.proto.Value.LangString.Builder, dev.enola.thing.proto.Value.LangStringOrBuilder> langStringBuilder_; 3501 /** 3502 * <pre> 3503 * TODO Keep or remove this? See 3504 * https://github.com/enola-dev/enola/pull/540... 3505 * </pre> 3506 * 3507 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 3508 * @return Whether the langString field is set. 3509 */ 3510 @java.lang.Override 3511 public boolean hasLangString() { 3512 return kindCase_ == 4; 3513 } 3514 /** 3515 * <pre> 3516 * TODO Keep or remove this? See 3517 * https://github.com/enola-dev/enola/pull/540... 3518 * </pre> 3519 * 3520 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 3521 * @return The langString. 3522 */ 3523 @java.lang.Override 3524 public dev.enola.thing.proto.Value.LangString getLangString() { 3525 if (langStringBuilder_ == null) { 3526 if (kindCase_ == 4) { 3527 return (dev.enola.thing.proto.Value.LangString) kind_; 3528 } 3529 return dev.enola.thing.proto.Value.LangString.getDefaultInstance(); 3530 } else { 3531 if (kindCase_ == 4) { 3532 return langStringBuilder_.getMessage(); 3533 } 3534 return dev.enola.thing.proto.Value.LangString.getDefaultInstance(); 3535 } 3536 } 3537 /** 3538 * <pre> 3539 * TODO Keep or remove this? See 3540 * https://github.com/enola-dev/enola/pull/540... 3541 * </pre> 3542 * 3543 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 3544 */ 3545 public Builder setLangString(dev.enola.thing.proto.Value.LangString value) { 3546 if (langStringBuilder_ == null) { 3547 if (value == null) { 3548 throw new NullPointerException(); 3549 } 3550 kind_ = value; 3551 onChanged(); 3552 } else { 3553 langStringBuilder_.setMessage(value); 3554 } 3555 kindCase_ = 4; 3556 return this; 3557 } 3558 /** 3559 * <pre> 3560 * TODO Keep or remove this? See 3561 * https://github.com/enola-dev/enola/pull/540... 3562 * </pre> 3563 * 3564 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 3565 */ 3566 public Builder setLangString( 3567 dev.enola.thing.proto.Value.LangString.Builder builderForValue) { 3568 if (langStringBuilder_ == null) { 3569 kind_ = builderForValue.build(); 3570 onChanged(); 3571 } else { 3572 langStringBuilder_.setMessage(builderForValue.build()); 3573 } 3574 kindCase_ = 4; 3575 return this; 3576 } 3577 /** 3578 * <pre> 3579 * TODO Keep or remove this? See 3580 * https://github.com/enola-dev/enola/pull/540... 3581 * </pre> 3582 * 3583 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 3584 */ 3585 public Builder mergeLangString(dev.enola.thing.proto.Value.LangString value) { 3586 if (langStringBuilder_ == null) { 3587 if (kindCase_ == 4 && 3588 kind_ != dev.enola.thing.proto.Value.LangString.getDefaultInstance()) { 3589 kind_ = dev.enola.thing.proto.Value.LangString.newBuilder((dev.enola.thing.proto.Value.LangString) kind_) 3590 .mergeFrom(value).buildPartial(); 3591 } else { 3592 kind_ = value; 3593 } 3594 onChanged(); 3595 } else { 3596 if (kindCase_ == 4) { 3597 langStringBuilder_.mergeFrom(value); 3598 } else { 3599 langStringBuilder_.setMessage(value); 3600 } 3601 } 3602 kindCase_ = 4; 3603 return this; 3604 } 3605 /** 3606 * <pre> 3607 * TODO Keep or remove this? See 3608 * https://github.com/enola-dev/enola/pull/540... 3609 * </pre> 3610 * 3611 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 3612 */ 3613 public Builder clearLangString() { 3614 if (langStringBuilder_ == null) { 3615 if (kindCase_ == 4) { 3616 kindCase_ = 0; 3617 kind_ = null; 3618 onChanged(); 3619 } 3620 } else { 3621 if (kindCase_ == 4) { 3622 kindCase_ = 0; 3623 kind_ = null; 3624 } 3625 langStringBuilder_.clear(); 3626 } 3627 return this; 3628 } 3629 /** 3630 * <pre> 3631 * TODO Keep or remove this? See 3632 * https://github.com/enola-dev/enola/pull/540... 3633 * </pre> 3634 * 3635 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 3636 */ 3637 public dev.enola.thing.proto.Value.LangString.Builder getLangStringBuilder() { 3638 return internalGetLangStringFieldBuilder().getBuilder(); 3639 } 3640 /** 3641 * <pre> 3642 * TODO Keep or remove this? See 3643 * https://github.com/enola-dev/enola/pull/540... 3644 * </pre> 3645 * 3646 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 3647 */ 3648 @java.lang.Override 3649 public dev.enola.thing.proto.Value.LangStringOrBuilder getLangStringOrBuilder() { 3650 if ((kindCase_ == 4) && (langStringBuilder_ != null)) { 3651 return langStringBuilder_.getMessageOrBuilder(); 3652 } else { 3653 if (kindCase_ == 4) { 3654 return (dev.enola.thing.proto.Value.LangString) kind_; 3655 } 3656 return dev.enola.thing.proto.Value.LangString.getDefaultInstance(); 3657 } 3658 } 3659 /** 3660 * <pre> 3661 * TODO Keep or remove this? See 3662 * https://github.com/enola-dev/enola/pull/540... 3663 * </pre> 3664 * 3665 * <code>.dev.enola.thing.Value.LangString lang_string = 4;</code> 3666 */ 3667 private com.google.protobuf.SingleFieldBuilder< 3668 dev.enola.thing.proto.Value.LangString, dev.enola.thing.proto.Value.LangString.Builder, dev.enola.thing.proto.Value.LangStringOrBuilder> 3669 internalGetLangStringFieldBuilder() { 3670 if (langStringBuilder_ == null) { 3671 if (!(kindCase_ == 4)) { 3672 kind_ = dev.enola.thing.proto.Value.LangString.getDefaultInstance(); 3673 } 3674 langStringBuilder_ = new com.google.protobuf.SingleFieldBuilder< 3675 dev.enola.thing.proto.Value.LangString, dev.enola.thing.proto.Value.LangString.Builder, dev.enola.thing.proto.Value.LangStringOrBuilder>( 3676 (dev.enola.thing.proto.Value.LangString) kind_, 3677 getParentForChildren(), 3678 isClean()); 3679 kind_ = null; 3680 } 3681 kindCase_ = 4; 3682 onChanged(); 3683 return langStringBuilder_; 3684 } 3685 3686 private com.google.protobuf.SingleFieldBuilder< 3687 dev.enola.thing.proto.Thing, dev.enola.thing.proto.Thing.Builder, dev.enola.thing.proto.ThingOrBuilder> structBuilder_; 3688 /** 3689 * <pre> 3690 * Sub-structure (contained) Thing. 3691 * </pre> 3692 * 3693 * <code>.dev.enola.thing.Thing struct = 5;</code> 3694 * @return Whether the struct field is set. 3695 */ 3696 @java.lang.Override 3697 public boolean hasStruct() { 3698 return kindCase_ == 5; 3699 } 3700 /** 3701 * <pre> 3702 * Sub-structure (contained) Thing. 3703 * </pre> 3704 * 3705 * <code>.dev.enola.thing.Thing struct = 5;</code> 3706 * @return The struct. 3707 */ 3708 @java.lang.Override 3709 public dev.enola.thing.proto.Thing getStruct() { 3710 if (structBuilder_ == null) { 3711 if (kindCase_ == 5) { 3712 return (dev.enola.thing.proto.Thing) kind_; 3713 } 3714 return dev.enola.thing.proto.Thing.getDefaultInstance(); 3715 } else { 3716 if (kindCase_ == 5) { 3717 return structBuilder_.getMessage(); 3718 } 3719 return dev.enola.thing.proto.Thing.getDefaultInstance(); 3720 } 3721 } 3722 /** 3723 * <pre> 3724 * Sub-structure (contained) Thing. 3725 * </pre> 3726 * 3727 * <code>.dev.enola.thing.Thing struct = 5;</code> 3728 */ 3729 public Builder setStruct(dev.enola.thing.proto.Thing value) { 3730 if (structBuilder_ == null) { 3731 if (value == null) { 3732 throw new NullPointerException(); 3733 } 3734 kind_ = value; 3735 onChanged(); 3736 } else { 3737 structBuilder_.setMessage(value); 3738 } 3739 kindCase_ = 5; 3740 return this; 3741 } 3742 /** 3743 * <pre> 3744 * Sub-structure (contained) Thing. 3745 * </pre> 3746 * 3747 * <code>.dev.enola.thing.Thing struct = 5;</code> 3748 */ 3749 public Builder setStruct( 3750 dev.enola.thing.proto.Thing.Builder builderForValue) { 3751 if (structBuilder_ == null) { 3752 kind_ = builderForValue.build(); 3753 onChanged(); 3754 } else { 3755 structBuilder_.setMessage(builderForValue.build()); 3756 } 3757 kindCase_ = 5; 3758 return this; 3759 } 3760 /** 3761 * <pre> 3762 * Sub-structure (contained) Thing. 3763 * </pre> 3764 * 3765 * <code>.dev.enola.thing.Thing struct = 5;</code> 3766 */ 3767 public Builder mergeStruct(dev.enola.thing.proto.Thing value) { 3768 if (structBuilder_ == null) { 3769 if (kindCase_ == 5 && 3770 kind_ != dev.enola.thing.proto.Thing.getDefaultInstance()) { 3771 kind_ = dev.enola.thing.proto.Thing.newBuilder((dev.enola.thing.proto.Thing) kind_) 3772 .mergeFrom(value).buildPartial(); 3773 } else { 3774 kind_ = value; 3775 } 3776 onChanged(); 3777 } else { 3778 if (kindCase_ == 5) { 3779 structBuilder_.mergeFrom(value); 3780 } else { 3781 structBuilder_.setMessage(value); 3782 } 3783 } 3784 kindCase_ = 5; 3785 return this; 3786 } 3787 /** 3788 * <pre> 3789 * Sub-structure (contained) Thing. 3790 * </pre> 3791 * 3792 * <code>.dev.enola.thing.Thing struct = 5;</code> 3793 */ 3794 public Builder clearStruct() { 3795 if (structBuilder_ == null) { 3796 if (kindCase_ == 5) { 3797 kindCase_ = 0; 3798 kind_ = null; 3799 onChanged(); 3800 } 3801 } else { 3802 if (kindCase_ == 5) { 3803 kindCase_ = 0; 3804 kind_ = null; 3805 } 3806 structBuilder_.clear(); 3807 } 3808 return this; 3809 } 3810 /** 3811 * <pre> 3812 * Sub-structure (contained) Thing. 3813 * </pre> 3814 * 3815 * <code>.dev.enola.thing.Thing struct = 5;</code> 3816 */ 3817 public dev.enola.thing.proto.Thing.Builder getStructBuilder() { 3818 return internalGetStructFieldBuilder().getBuilder(); 3819 } 3820 /** 3821 * <pre> 3822 * Sub-structure (contained) Thing. 3823 * </pre> 3824 * 3825 * <code>.dev.enola.thing.Thing struct = 5;</code> 3826 */ 3827 @java.lang.Override 3828 public dev.enola.thing.proto.ThingOrBuilder getStructOrBuilder() { 3829 if ((kindCase_ == 5) && (structBuilder_ != null)) { 3830 return structBuilder_.getMessageOrBuilder(); 3831 } else { 3832 if (kindCase_ == 5) { 3833 return (dev.enola.thing.proto.Thing) kind_; 3834 } 3835 return dev.enola.thing.proto.Thing.getDefaultInstance(); 3836 } 3837 } 3838 /** 3839 * <pre> 3840 * Sub-structure (contained) Thing. 3841 * </pre> 3842 * 3843 * <code>.dev.enola.thing.Thing struct = 5;</code> 3844 */ 3845 private com.google.protobuf.SingleFieldBuilder< 3846 dev.enola.thing.proto.Thing, dev.enola.thing.proto.Thing.Builder, dev.enola.thing.proto.ThingOrBuilder> 3847 internalGetStructFieldBuilder() { 3848 if (structBuilder_ == null) { 3849 if (!(kindCase_ == 5)) { 3850 kind_ = dev.enola.thing.proto.Thing.getDefaultInstance(); 3851 } 3852 structBuilder_ = new com.google.protobuf.SingleFieldBuilder< 3853 dev.enola.thing.proto.Thing, dev.enola.thing.proto.Thing.Builder, dev.enola.thing.proto.ThingOrBuilder>( 3854 (dev.enola.thing.proto.Thing) kind_, 3855 getParentForChildren(), 3856 isClean()); 3857 kind_ = null; 3858 } 3859 kindCase_ = 5; 3860 onChanged(); 3861 return structBuilder_; 3862 } 3863 3864 private com.google.protobuf.SingleFieldBuilder< 3865 dev.enola.thing.proto.Value.List, dev.enola.thing.proto.Value.List.Builder, dev.enola.thing.proto.Value.ListOrBuilder> listBuilder_; 3866 /** 3867 * <pre> 3868 * List of Values. 3869 * </pre> 3870 * 3871 * <code>.dev.enola.thing.Value.List list = 6;</code> 3872 * @return Whether the list field is set. 3873 */ 3874 @java.lang.Override 3875 public boolean hasList() { 3876 return kindCase_ == 6; 3877 } 3878 /** 3879 * <pre> 3880 * List of Values. 3881 * </pre> 3882 * 3883 * <code>.dev.enola.thing.Value.List list = 6;</code> 3884 * @return The list. 3885 */ 3886 @java.lang.Override 3887 public dev.enola.thing.proto.Value.List getList() { 3888 if (listBuilder_ == null) { 3889 if (kindCase_ == 6) { 3890 return (dev.enola.thing.proto.Value.List) kind_; 3891 } 3892 return dev.enola.thing.proto.Value.List.getDefaultInstance(); 3893 } else { 3894 if (kindCase_ == 6) { 3895 return listBuilder_.getMessage(); 3896 } 3897 return dev.enola.thing.proto.Value.List.getDefaultInstance(); 3898 } 3899 } 3900 /** 3901 * <pre> 3902 * List of Values. 3903 * </pre> 3904 * 3905 * <code>.dev.enola.thing.Value.List list = 6;</code> 3906 */ 3907 public Builder setList(dev.enola.thing.proto.Value.List value) { 3908 if (listBuilder_ == null) { 3909 if (value == null) { 3910 throw new NullPointerException(); 3911 } 3912 kind_ = value; 3913 onChanged(); 3914 } else { 3915 listBuilder_.setMessage(value); 3916 } 3917 kindCase_ = 6; 3918 return this; 3919 } 3920 /** 3921 * <pre> 3922 * List of Values. 3923 * </pre> 3924 * 3925 * <code>.dev.enola.thing.Value.List list = 6;</code> 3926 */ 3927 public Builder setList( 3928 dev.enola.thing.proto.Value.List.Builder builderForValue) { 3929 if (listBuilder_ == null) { 3930 kind_ = builderForValue.build(); 3931 onChanged(); 3932 } else { 3933 listBuilder_.setMessage(builderForValue.build()); 3934 } 3935 kindCase_ = 6; 3936 return this; 3937 } 3938 /** 3939 * <pre> 3940 * List of Values. 3941 * </pre> 3942 * 3943 * <code>.dev.enola.thing.Value.List list = 6;</code> 3944 */ 3945 public Builder mergeList(dev.enola.thing.proto.Value.List value) { 3946 if (listBuilder_ == null) { 3947 if (kindCase_ == 6 && 3948 kind_ != dev.enola.thing.proto.Value.List.getDefaultInstance()) { 3949 kind_ = dev.enola.thing.proto.Value.List.newBuilder((dev.enola.thing.proto.Value.List) kind_) 3950 .mergeFrom(value).buildPartial(); 3951 } else { 3952 kind_ = value; 3953 } 3954 onChanged(); 3955 } else { 3956 if (kindCase_ == 6) { 3957 listBuilder_.mergeFrom(value); 3958 } else { 3959 listBuilder_.setMessage(value); 3960 } 3961 } 3962 kindCase_ = 6; 3963 return this; 3964 } 3965 /** 3966 * <pre> 3967 * List of Values. 3968 * </pre> 3969 * 3970 * <code>.dev.enola.thing.Value.List list = 6;</code> 3971 */ 3972 public Builder clearList() { 3973 if (listBuilder_ == null) { 3974 if (kindCase_ == 6) { 3975 kindCase_ = 0; 3976 kind_ = null; 3977 onChanged(); 3978 } 3979 } else { 3980 if (kindCase_ == 6) { 3981 kindCase_ = 0; 3982 kind_ = null; 3983 } 3984 listBuilder_.clear(); 3985 } 3986 return this; 3987 } 3988 /** 3989 * <pre> 3990 * List of Values. 3991 * </pre> 3992 * 3993 * <code>.dev.enola.thing.Value.List list = 6;</code> 3994 */ 3995 public dev.enola.thing.proto.Value.List.Builder getListBuilder() { 3996 return internalGetListFieldBuilder().getBuilder(); 3997 } 3998 /** 3999 * <pre> 4000 * List of Values. 4001 * </pre> 4002 * 4003 * <code>.dev.enola.thing.Value.List list = 6;</code> 4004 */ 4005 @java.lang.Override 4006 public dev.enola.thing.proto.Value.ListOrBuilder getListOrBuilder() { 4007 if ((kindCase_ == 6) && (listBuilder_ != null)) { 4008 return listBuilder_.getMessageOrBuilder(); 4009 } else { 4010 if (kindCase_ == 6) { 4011 return (dev.enola.thing.proto.Value.List) kind_; 4012 } 4013 return dev.enola.thing.proto.Value.List.getDefaultInstance(); 4014 } 4015 } 4016 /** 4017 * <pre> 4018 * List of Values. 4019 * </pre> 4020 * 4021 * <code>.dev.enola.thing.Value.List list = 6;</code> 4022 */ 4023 private com.google.protobuf.SingleFieldBuilder< 4024 dev.enola.thing.proto.Value.List, dev.enola.thing.proto.Value.List.Builder, dev.enola.thing.proto.Value.ListOrBuilder> 4025 internalGetListFieldBuilder() { 4026 if (listBuilder_ == null) { 4027 if (!(kindCase_ == 6)) { 4028 kind_ = dev.enola.thing.proto.Value.List.getDefaultInstance(); 4029 } 4030 listBuilder_ = new com.google.protobuf.SingleFieldBuilder< 4031 dev.enola.thing.proto.Value.List, dev.enola.thing.proto.Value.List.Builder, dev.enola.thing.proto.Value.ListOrBuilder>( 4032 (dev.enola.thing.proto.Value.List) kind_, 4033 getParentForChildren(), 4034 isClean()); 4035 kind_ = null; 4036 } 4037 kindCase_ = 6; 4038 onChanged(); 4039 return listBuilder_; 4040 } 4041 4042 // @@protoc_insertion_point(builder_scope:dev.enola.thing.Value) 4043 } 4044 4045 // @@protoc_insertion_point(class_scope:dev.enola.thing.Value) 4046 private static final dev.enola.thing.proto.Value DEFAULT_INSTANCE; 4047 static { 4048 DEFAULT_INSTANCE = new dev.enola.thing.proto.Value(); 4049 } 4050 4051 public static dev.enola.thing.proto.Value getDefaultInstance() { 4052 return DEFAULT_INSTANCE; 4053 } 4054 4055 private static final com.google.protobuf.Parser<Value> 4056 PARSER = new com.google.protobuf.AbstractParser<Value>() { 4057 @java.lang.Override 4058 public Value parsePartialFrom( 4059 com.google.protobuf.CodedInputStream input, 4060 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4061 throws com.google.protobuf.InvalidProtocolBufferException { 4062 Builder builder = newBuilder(); 4063 try { 4064 builder.mergeFrom(input, extensionRegistry); 4065 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4066 throw e.setUnfinishedMessage(builder.buildPartial()); 4067 } catch (com.google.protobuf.UninitializedMessageException e) { 4068 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 4069 } catch (java.io.IOException e) { 4070 throw new com.google.protobuf.InvalidProtocolBufferException(e) 4071 .setUnfinishedMessage(builder.buildPartial()); 4072 } 4073 return builder.buildPartial(); 4074 } 4075 }; 4076 4077 public static com.google.protobuf.Parser<Value> parser() { 4078 return PARSER; 4079 } 4080 4081 @java.lang.Override 4082 public com.google.protobuf.Parser<Value> getParserForType() { 4083 return PARSER; 4084 } 4085 4086 @java.lang.Override 4087 public dev.enola.thing.proto.Value getDefaultInstanceForType() { 4088 return DEFAULT_INSTANCE; 4089 } 4090 4091} 4092