001// Generated by the protocol buffer compiler. DO NOT EDIT! 002// source: TestProtocol.proto 003 004package org.apache.reef.wake.test.proto; 005 006public final class TestProtos { 007 private TestProtos() {} 008 public static void registerAllExtensions( 009 com.google.protobuf.ExtensionRegistry registry) { 010 } 011 public interface TestEventPBufOrBuilder 012 extends com.google.protobuf.MessageOrBuilder { 013 014 // required string message = 1; 015 /** 016 * <code>required string message = 1;</code> 017 */ 018 boolean hasMessage(); 019 /** 020 * <code>required string message = 1;</code> 021 */ 022 java.lang.String getMessage(); 023 /** 024 * <code>required string message = 1;</code> 025 */ 026 com.google.protobuf.ByteString 027 getMessageBytes(); 028 029 // required double load = 2; 030 /** 031 * <code>required double load = 2;</code> 032 */ 033 boolean hasLoad(); 034 /** 035 * <code>required double load = 2;</code> 036 */ 037 double getLoad(); 038 } 039 /** 040 * Protobuf type {@code TestEventPBuf} 041 */ 042 public static final class TestEventPBuf extends 043 com.google.protobuf.GeneratedMessage 044 implements TestEventPBufOrBuilder { 045 // Use TestEventPBuf.newBuilder() to construct. 046 private TestEventPBuf(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 047 super(builder); 048 this.unknownFields = builder.getUnknownFields(); 049 } 050 private TestEventPBuf(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 051 052 private static final TestEventPBuf defaultInstance; 053 public static TestEventPBuf getDefaultInstance() { 054 return defaultInstance; 055 } 056 057 public TestEventPBuf getDefaultInstanceForType() { 058 return defaultInstance; 059 } 060 061 private final com.google.protobuf.UnknownFieldSet unknownFields; 062 @java.lang.Override 063 public final com.google.protobuf.UnknownFieldSet 064 getUnknownFields() { 065 return this.unknownFields; 066 } 067 private TestEventPBuf( 068 com.google.protobuf.CodedInputStream input, 069 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 070 throws com.google.protobuf.InvalidProtocolBufferException { 071 initFields(); 072 int mutable_bitField0_ = 0; 073 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 074 com.google.protobuf.UnknownFieldSet.newBuilder(); 075 try { 076 boolean done = false; 077 while (!done) { 078 int tag = input.readTag(); 079 switch (tag) { 080 case 0: 081 done = true; 082 break; 083 default: { 084 if (!parseUnknownField(input, unknownFields, 085 extensionRegistry, tag)) { 086 done = true; 087 } 088 break; 089 } 090 case 10: { 091 bitField0_ |= 0x00000001; 092 message_ = input.readBytes(); 093 break; 094 } 095 case 17: { 096 bitField0_ |= 0x00000002; 097 load_ = input.readDouble(); 098 break; 099 } 100 } 101 } 102 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 103 throw e.setUnfinishedMessage(this); 104 } catch (java.io.IOException e) { 105 throw new com.google.protobuf.InvalidProtocolBufferException( 106 e.getMessage()).setUnfinishedMessage(this); 107 } finally { 108 this.unknownFields = unknownFields.build(); 109 makeExtensionsImmutable(); 110 } 111 } 112 public static final com.google.protobuf.Descriptors.Descriptor 113 getDescriptor() { 114 return org.apache.reef.wake.test.proto.TestProtos.internal_static_TestEventPBuf_descriptor; 115 } 116 117 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 118 internalGetFieldAccessorTable() { 119 return org.apache.reef.wake.test.proto.TestProtos.internal_static_TestEventPBuf_fieldAccessorTable 120 .ensureFieldAccessorsInitialized( 121 org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf.class, org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf.Builder.class); 122 } 123 124 public static com.google.protobuf.Parser<TestEventPBuf> PARSER = 125 new com.google.protobuf.AbstractParser<TestEventPBuf>() { 126 public TestEventPBuf parsePartialFrom( 127 com.google.protobuf.CodedInputStream input, 128 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 129 throws com.google.protobuf.InvalidProtocolBufferException { 130 return new TestEventPBuf(input, extensionRegistry); 131 } 132 }; 133 134 @java.lang.Override 135 public com.google.protobuf.Parser<TestEventPBuf> getParserForType() { 136 return PARSER; 137 } 138 139 private int bitField0_; 140 // required string message = 1; 141 public static final int MESSAGE_FIELD_NUMBER = 1; 142 private java.lang.Object message_; 143 /** 144 * <code>required string message = 1;</code> 145 */ 146 public boolean hasMessage() { 147 return ((bitField0_ & 0x00000001) == 0x00000001); 148 } 149 /** 150 * <code>required string message = 1;</code> 151 */ 152 public java.lang.String getMessage() { 153 java.lang.Object ref = message_; 154 if (ref instanceof java.lang.String) { 155 return (java.lang.String) ref; 156 } else { 157 com.google.protobuf.ByteString bs = 158 (com.google.protobuf.ByteString) ref; 159 java.lang.String s = bs.toStringUtf8(); 160 if (bs.isValidUtf8()) { 161 message_ = s; 162 } 163 return s; 164 } 165 } 166 /** 167 * <code>required string message = 1;</code> 168 */ 169 public com.google.protobuf.ByteString 170 getMessageBytes() { 171 java.lang.Object ref = message_; 172 if (ref instanceof java.lang.String) { 173 com.google.protobuf.ByteString b = 174 com.google.protobuf.ByteString.copyFromUtf8( 175 (java.lang.String) ref); 176 message_ = b; 177 return b; 178 } else { 179 return (com.google.protobuf.ByteString) ref; 180 } 181 } 182 183 // required double load = 2; 184 public static final int LOAD_FIELD_NUMBER = 2; 185 private double load_; 186 /** 187 * <code>required double load = 2;</code> 188 */ 189 public boolean hasLoad() { 190 return ((bitField0_ & 0x00000002) == 0x00000002); 191 } 192 /** 193 * <code>required double load = 2;</code> 194 */ 195 public double getLoad() { 196 return load_; 197 } 198 199 private void initFields() { 200 message_ = ""; 201 load_ = 0D; 202 } 203 private byte memoizedIsInitialized = -1; 204 public final boolean isInitialized() { 205 byte isInitialized = memoizedIsInitialized; 206 if (isInitialized != -1) return isInitialized == 1; 207 208 if (!hasMessage()) { 209 memoizedIsInitialized = 0; 210 return false; 211 } 212 if (!hasLoad()) { 213 memoizedIsInitialized = 0; 214 return false; 215 } 216 memoizedIsInitialized = 1; 217 return true; 218 } 219 220 public void writeTo(com.google.protobuf.CodedOutputStream output) 221 throws java.io.IOException { 222 getSerializedSize(); 223 if (((bitField0_ & 0x00000001) == 0x00000001)) { 224 output.writeBytes(1, getMessageBytes()); 225 } 226 if (((bitField0_ & 0x00000002) == 0x00000002)) { 227 output.writeDouble(2, load_); 228 } 229 getUnknownFields().writeTo(output); 230 } 231 232 private int memoizedSerializedSize = -1; 233 public int getSerializedSize() { 234 int size = memoizedSerializedSize; 235 if (size != -1) return size; 236 237 size = 0; 238 if (((bitField0_ & 0x00000001) == 0x00000001)) { 239 size += com.google.protobuf.CodedOutputStream 240 .computeBytesSize(1, getMessageBytes()); 241 } 242 if (((bitField0_ & 0x00000002) == 0x00000002)) { 243 size += com.google.protobuf.CodedOutputStream 244 .computeDoubleSize(2, load_); 245 } 246 size += getUnknownFields().getSerializedSize(); 247 memoizedSerializedSize = size; 248 return size; 249 } 250 251 private static final long serialVersionUID = 0L; 252 @java.lang.Override 253 protected java.lang.Object writeReplace() 254 throws java.io.ObjectStreamException { 255 return super.writeReplace(); 256 } 257 258 @java.lang.Override 259 public boolean equals(final java.lang.Object obj) { 260 if (obj == this) { 261 return true; 262 } 263 if (!(obj instanceof org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf)) { 264 return super.equals(obj); 265 } 266 org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf other = (org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf) obj; 267 268 boolean result = true; 269 result = result && (hasMessage() == other.hasMessage()); 270 if (hasMessage()) { 271 result = result && getMessage() 272 .equals(other.getMessage()); 273 } 274 result = result && (hasLoad() == other.hasLoad()); 275 if (hasLoad()) { 276 result = result && (Double.doubleToLongBits(getLoad()) == Double.doubleToLongBits(other.getLoad())); 277 } 278 result = result && 279 getUnknownFields().equals(other.getUnknownFields()); 280 return result; 281 } 282 283 private int memoizedHashCode = 0; 284 @java.lang.Override 285 public int hashCode() { 286 if (memoizedHashCode != 0) { 287 return memoizedHashCode; 288 } 289 int hash = 41; 290 hash = (19 * hash) + getDescriptorForType().hashCode(); 291 if (hasMessage()) { 292 hash = (37 * hash) + MESSAGE_FIELD_NUMBER; 293 hash = (53 * hash) + getMessage().hashCode(); 294 } 295 if (hasLoad()) { 296 hash = (37 * hash) + LOAD_FIELD_NUMBER; 297 hash = (53 * hash) + hashLong( 298 Double.doubleToLongBits(getLoad())); 299 } 300 hash = (29 * hash) + getUnknownFields().hashCode(); 301 memoizedHashCode = hash; 302 return hash; 303 } 304 305 public static org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parseFrom( 306 com.google.protobuf.ByteString data) 307 throws com.google.protobuf.InvalidProtocolBufferException { 308 return PARSER.parseFrom(data); 309 } 310 public static org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parseFrom( 311 com.google.protobuf.ByteString data, 312 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 313 throws com.google.protobuf.InvalidProtocolBufferException { 314 return PARSER.parseFrom(data, extensionRegistry); 315 } 316 public static org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parseFrom(byte[] data) 317 throws com.google.protobuf.InvalidProtocolBufferException { 318 return PARSER.parseFrom(data); 319 } 320 public static org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parseFrom( 321 byte[] data, 322 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 323 throws com.google.protobuf.InvalidProtocolBufferException { 324 return PARSER.parseFrom(data, extensionRegistry); 325 } 326 public static org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parseFrom(java.io.InputStream input) 327 throws java.io.IOException { 328 return PARSER.parseFrom(input); 329 } 330 public static org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parseFrom( 331 java.io.InputStream input, 332 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 333 throws java.io.IOException { 334 return PARSER.parseFrom(input, extensionRegistry); 335 } 336 public static org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parseDelimitedFrom(java.io.InputStream input) 337 throws java.io.IOException { 338 return PARSER.parseDelimitedFrom(input); 339 } 340 public static org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parseDelimitedFrom( 341 java.io.InputStream input, 342 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 343 throws java.io.IOException { 344 return PARSER.parseDelimitedFrom(input, extensionRegistry); 345 } 346 public static org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parseFrom( 347 com.google.protobuf.CodedInputStream input) 348 throws java.io.IOException { 349 return PARSER.parseFrom(input); 350 } 351 public static org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parseFrom( 352 com.google.protobuf.CodedInputStream input, 353 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 354 throws java.io.IOException { 355 return PARSER.parseFrom(input, extensionRegistry); 356 } 357 358 public static Builder newBuilder() { return Builder.create(); } 359 public Builder newBuilderForType() { return newBuilder(); } 360 public static Builder newBuilder(org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf prototype) { 361 return newBuilder().mergeFrom(prototype); 362 } 363 public Builder toBuilder() { return newBuilder(this); } 364 365 @java.lang.Override 366 protected Builder newBuilderForType( 367 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 368 Builder builder = new Builder(parent); 369 return builder; 370 } 371 /** 372 * Protobuf type {@code TestEventPBuf} 373 */ 374 public static final class Builder extends 375 com.google.protobuf.GeneratedMessage.Builder<Builder> 376 implements org.apache.reef.wake.test.proto.TestProtos.TestEventPBufOrBuilder { 377 public static final com.google.protobuf.Descriptors.Descriptor 378 getDescriptor() { 379 return org.apache.reef.wake.test.proto.TestProtos.internal_static_TestEventPBuf_descriptor; 380 } 381 382 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 383 internalGetFieldAccessorTable() { 384 return org.apache.reef.wake.test.proto.TestProtos.internal_static_TestEventPBuf_fieldAccessorTable 385 .ensureFieldAccessorsInitialized( 386 org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf.class, org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf.Builder.class); 387 } 388 389 // Construct using org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf.newBuilder() 390 private Builder() { 391 maybeForceBuilderInitialization(); 392 } 393 394 private Builder( 395 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 396 super(parent); 397 maybeForceBuilderInitialization(); 398 } 399 private void maybeForceBuilderInitialization() { 400 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 401 } 402 } 403 private static Builder create() { 404 return new Builder(); 405 } 406 407 public Builder clear() { 408 super.clear(); 409 message_ = ""; 410 bitField0_ = (bitField0_ & ~0x00000001); 411 load_ = 0D; 412 bitField0_ = (bitField0_ & ~0x00000002); 413 return this; 414 } 415 416 public Builder clone() { 417 return create().mergeFrom(buildPartial()); 418 } 419 420 public com.google.protobuf.Descriptors.Descriptor 421 getDescriptorForType() { 422 return org.apache.reef.wake.test.proto.TestProtos.internal_static_TestEventPBuf_descriptor; 423 } 424 425 public org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf getDefaultInstanceForType() { 426 return org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf.getDefaultInstance(); 427 } 428 429 public org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf build() { 430 org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf result = buildPartial(); 431 if (!result.isInitialized()) { 432 throw newUninitializedMessageException(result); 433 } 434 return result; 435 } 436 437 public org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf buildPartial() { 438 org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf result = new org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf(this); 439 int from_bitField0_ = bitField0_; 440 int to_bitField0_ = 0; 441 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 442 to_bitField0_ |= 0x00000001; 443 } 444 result.message_ = message_; 445 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 446 to_bitField0_ |= 0x00000002; 447 } 448 result.load_ = load_; 449 result.bitField0_ = to_bitField0_; 450 onBuilt(); 451 return result; 452 } 453 454 public Builder mergeFrom(com.google.protobuf.Message other) { 455 if (other instanceof org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf) { 456 return mergeFrom((org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf)other); 457 } else { 458 super.mergeFrom(other); 459 return this; 460 } 461 } 462 463 public Builder mergeFrom(org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf other) { 464 if (other == org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf.getDefaultInstance()) return this; 465 if (other.hasMessage()) { 466 bitField0_ |= 0x00000001; 467 message_ = other.message_; 468 onChanged(); 469 } 470 if (other.hasLoad()) { 471 setLoad(other.getLoad()); 472 } 473 this.mergeUnknownFields(other.getUnknownFields()); 474 return this; 475 } 476 477 public final boolean isInitialized() { 478 if (!hasMessage()) { 479 480 return false; 481 } 482 if (!hasLoad()) { 483 484 return false; 485 } 486 return true; 487 } 488 489 public Builder mergeFrom( 490 com.google.protobuf.CodedInputStream input, 491 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 492 throws java.io.IOException { 493 org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf parsedMessage = null; 494 try { 495 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 496 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 497 parsedMessage = (org.apache.reef.wake.test.proto.TestProtos.TestEventPBuf) e.getUnfinishedMessage(); 498 throw e; 499 } finally { 500 if (parsedMessage != null) { 501 mergeFrom(parsedMessage); 502 } 503 } 504 return this; 505 } 506 private int bitField0_; 507 508 // required string message = 1; 509 private java.lang.Object message_ = ""; 510 /** 511 * <code>required string message = 1;</code> 512 */ 513 public boolean hasMessage() { 514 return ((bitField0_ & 0x00000001) == 0x00000001); 515 } 516 /** 517 * <code>required string message = 1;</code> 518 */ 519 public java.lang.String getMessage() { 520 java.lang.Object ref = message_; 521 if (!(ref instanceof java.lang.String)) { 522 java.lang.String s = ((com.google.protobuf.ByteString) ref) 523 .toStringUtf8(); 524 message_ = s; 525 return s; 526 } else { 527 return (java.lang.String) ref; 528 } 529 } 530 /** 531 * <code>required string message = 1;</code> 532 */ 533 public com.google.protobuf.ByteString 534 getMessageBytes() { 535 java.lang.Object ref = message_; 536 if (ref instanceof String) { 537 com.google.protobuf.ByteString b = 538 com.google.protobuf.ByteString.copyFromUtf8( 539 (java.lang.String) ref); 540 message_ = b; 541 return b; 542 } else { 543 return (com.google.protobuf.ByteString) ref; 544 } 545 } 546 /** 547 * <code>required string message = 1;</code> 548 */ 549 public Builder setMessage( 550 java.lang.String value) { 551 if (value == null) { 552 throw new NullPointerException(); 553 } 554 bitField0_ |= 0x00000001; 555 message_ = value; 556 onChanged(); 557 return this; 558 } 559 /** 560 * <code>required string message = 1;</code> 561 */ 562 public Builder clearMessage() { 563 bitField0_ = (bitField0_ & ~0x00000001); 564 message_ = getDefaultInstance().getMessage(); 565 onChanged(); 566 return this; 567 } 568 /** 569 * <code>required string message = 1;</code> 570 */ 571 public Builder setMessageBytes( 572 com.google.protobuf.ByteString value) { 573 if (value == null) { 574 throw new NullPointerException(); 575 } 576 bitField0_ |= 0x00000001; 577 message_ = value; 578 onChanged(); 579 return this; 580 } 581 582 // required double load = 2; 583 private double load_ ; 584 /** 585 * <code>required double load = 2;</code> 586 */ 587 public boolean hasLoad() { 588 return ((bitField0_ & 0x00000002) == 0x00000002); 589 } 590 /** 591 * <code>required double load = 2;</code> 592 */ 593 public double getLoad() { 594 return load_; 595 } 596 /** 597 * <code>required double load = 2;</code> 598 */ 599 public Builder setLoad(double value) { 600 bitField0_ |= 0x00000002; 601 load_ = value; 602 onChanged(); 603 return this; 604 } 605 /** 606 * <code>required double load = 2;</code> 607 */ 608 public Builder clearLoad() { 609 bitField0_ = (bitField0_ & ~0x00000002); 610 load_ = 0D; 611 onChanged(); 612 return this; 613 } 614 615 // @@protoc_insertion_point(builder_scope:TestEventPBuf) 616 } 617 618 static { 619 defaultInstance = new TestEventPBuf(true); 620 defaultInstance.initFields(); 621 } 622 623 // @@protoc_insertion_point(class_scope:TestEventPBuf) 624 } 625 626 private static com.google.protobuf.Descriptors.Descriptor 627 internal_static_TestEventPBuf_descriptor; 628 private static 629 com.google.protobuf.GeneratedMessage.FieldAccessorTable 630 internal_static_TestEventPBuf_fieldAccessorTable; 631 632 public static com.google.protobuf.Descriptors.FileDescriptor 633 getDescriptor() { 634 return descriptor; 635 } 636 private static com.google.protobuf.Descriptors.FileDescriptor 637 descriptor; 638 static { 639 java.lang.String[] descriptorData = { 640 "\n\022TestProtocol.proto\".\n\rTestEventPBuf\022\017\n" + 641 "\007message\030\001 \002(\t\022\014\n\004load\030\002 \002(\001B3\n\037org.apac" + 642 "he.reef.wake.test.protoB\nTestProtos\210\001\001\240\001" + 643 "\001" 644 }; 645 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 646 new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { 647 public com.google.protobuf.ExtensionRegistry assignDescriptors( 648 com.google.protobuf.Descriptors.FileDescriptor root) { 649 descriptor = root; 650 internal_static_TestEventPBuf_descriptor = 651 getDescriptor().getMessageTypes().get(0); 652 internal_static_TestEventPBuf_fieldAccessorTable = new 653 com.google.protobuf.GeneratedMessage.FieldAccessorTable( 654 internal_static_TestEventPBuf_descriptor, 655 new java.lang.String[] { "Message", "Load", }); 656 return null; 657 } 658 }; 659 com.google.protobuf.Descriptors.FileDescriptor 660 .internalBuildGeneratedFileFrom(descriptorData, 661 new com.google.protobuf.Descriptors.FileDescriptor[] { 662 }, assigner); 663 } 664 665 // @@protoc_insertion_point(outer_class_scope) 666}