/akka-amqp/src/main/java/akka/amqp/AkkaAmqp.java

https://github.com/apeshimam/akka-modules · Java · 340 lines · 295 code · 36 blank · 9 comment · 26 complexity · 1c4fc48775ffc04499a03d9056b88d2a MD5 · raw file

  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: akka-amqp.proto
  3. package akka.amqp;
  4. public final class AkkaAmqp {
  5. private AkkaAmqp() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public static final class TestMessage extends
  10. com.google.protobuf.GeneratedMessage {
  11. // Use TestMessage.newBuilder() to construct.
  12. private TestMessage() {
  13. initFields();
  14. }
  15. private TestMessage(boolean noInit) {}
  16. private static final TestMessage defaultInstance;
  17. public static TestMessage getDefaultInstance() {
  18. return defaultInstance;
  19. }
  20. public TestMessage getDefaultInstanceForType() {
  21. return defaultInstance;
  22. }
  23. public static final com.google.protobuf.Descriptors.Descriptor
  24. getDescriptor() {
  25. return akka.amqp.AkkaAmqp.internal_static_TestMessage_descriptor;
  26. }
  27. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  28. internalGetFieldAccessorTable() {
  29. return akka.amqp.AkkaAmqp.internal_static_TestMessage_fieldAccessorTable;
  30. }
  31. // optional string message = 1;
  32. public static final int MESSAGE_FIELD_NUMBER = 1;
  33. private boolean hasMessage;
  34. private java.lang.String message_ = "";
  35. public boolean hasMessage() { return hasMessage; }
  36. public java.lang.String getMessage() { return message_; }
  37. private void initFields() {
  38. }
  39. public final boolean isInitialized() {
  40. return true;
  41. }
  42. public void writeTo(com.google.protobuf.CodedOutputStream output)
  43. throws java.io.IOException {
  44. getSerializedSize();
  45. if (hasMessage()) {
  46. output.writeString(1, getMessage());
  47. }
  48. getUnknownFields().writeTo(output);
  49. }
  50. private int memoizedSerializedSize = -1;
  51. public int getSerializedSize() {
  52. int size = memoizedSerializedSize;
  53. if (size != -1) return size;
  54. size = 0;
  55. if (hasMessage()) {
  56. size += com.google.protobuf.CodedOutputStream
  57. .computeStringSize(1, getMessage());
  58. }
  59. size += getUnknownFields().getSerializedSize();
  60. memoizedSerializedSize = size;
  61. return size;
  62. }
  63. public static akka.amqp.AkkaAmqp.TestMessage parseFrom(
  64. com.google.protobuf.ByteString data)
  65. throws com.google.protobuf.InvalidProtocolBufferException {
  66. return newBuilder().mergeFrom(data).buildParsed();
  67. }
  68. public static akka.amqp.AkkaAmqp.TestMessage parseFrom(
  69. com.google.protobuf.ByteString data,
  70. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  71. throws com.google.protobuf.InvalidProtocolBufferException {
  72. return newBuilder().mergeFrom(data, extensionRegistry)
  73. .buildParsed();
  74. }
  75. public static akka.amqp.AkkaAmqp.TestMessage parseFrom(byte[] data)
  76. throws com.google.protobuf.InvalidProtocolBufferException {
  77. return newBuilder().mergeFrom(data).buildParsed();
  78. }
  79. public static akka.amqp.AkkaAmqp.TestMessage parseFrom(
  80. byte[] data,
  81. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  82. throws com.google.protobuf.InvalidProtocolBufferException {
  83. return newBuilder().mergeFrom(data, extensionRegistry)
  84. .buildParsed();
  85. }
  86. public static akka.amqp.AkkaAmqp.TestMessage parseFrom(java.io.InputStream input)
  87. throws java.io.IOException {
  88. return newBuilder().mergeFrom(input).buildParsed();
  89. }
  90. public static akka.amqp.AkkaAmqp.TestMessage parseFrom(
  91. java.io.InputStream input,
  92. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  93. throws java.io.IOException {
  94. return newBuilder().mergeFrom(input, extensionRegistry)
  95. .buildParsed();
  96. }
  97. public static akka.amqp.AkkaAmqp.TestMessage parseDelimitedFrom(java.io.InputStream input)
  98. throws java.io.IOException {
  99. Builder builder = newBuilder();
  100. if (builder.mergeDelimitedFrom(input)) {
  101. return builder.buildParsed();
  102. } else {
  103. return null;
  104. }
  105. }
  106. public static akka.amqp.AkkaAmqp.TestMessage parseDelimitedFrom(
  107. java.io.InputStream input,
  108. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  109. throws java.io.IOException {
  110. Builder builder = newBuilder();
  111. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  112. return builder.buildParsed();
  113. } else {
  114. return null;
  115. }
  116. }
  117. public static akka.amqp.AkkaAmqp.TestMessage parseFrom(
  118. com.google.protobuf.CodedInputStream input)
  119. throws java.io.IOException {
  120. return newBuilder().mergeFrom(input).buildParsed();
  121. }
  122. public static akka.amqp.AkkaAmqp.TestMessage parseFrom(
  123. com.google.protobuf.CodedInputStream input,
  124. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  125. throws java.io.IOException {
  126. return newBuilder().mergeFrom(input, extensionRegistry)
  127. .buildParsed();
  128. }
  129. public static Builder newBuilder() { return Builder.create(); }
  130. public Builder newBuilderForType() { return newBuilder(); }
  131. public static Builder newBuilder(akka.amqp.AkkaAmqp.TestMessage prototype) {
  132. return newBuilder().mergeFrom(prototype);
  133. }
  134. public Builder toBuilder() { return newBuilder(this); }
  135. public static final class Builder extends
  136. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  137. private akka.amqp.AkkaAmqp.TestMessage result;
  138. // Construct using akka.amqp.AkkaAmqp.TestMessage.newBuilder()
  139. private Builder() {}
  140. private static Builder create() {
  141. Builder builder = new Builder();
  142. builder.result = new akka.amqp.AkkaAmqp.TestMessage();
  143. return builder;
  144. }
  145. protected akka.amqp.AkkaAmqp.TestMessage internalGetResult() {
  146. return result;
  147. }
  148. public Builder clear() {
  149. if (result == null) {
  150. throw new IllegalStateException(
  151. "Cannot call clear() after build().");
  152. }
  153. result = new akka.amqp.AkkaAmqp.TestMessage();
  154. return this;
  155. }
  156. public Builder clone() {
  157. return create().mergeFrom(result);
  158. }
  159. public com.google.protobuf.Descriptors.Descriptor
  160. getDescriptorForType() {
  161. return akka.amqp.AkkaAmqp.TestMessage.getDescriptor();
  162. }
  163. public akka.amqp.AkkaAmqp.TestMessage getDefaultInstanceForType() {
  164. return akka.amqp.AkkaAmqp.TestMessage.getDefaultInstance();
  165. }
  166. public boolean isInitialized() {
  167. return result.isInitialized();
  168. }
  169. public akka.amqp.AkkaAmqp.TestMessage build() {
  170. if (result != null && !isInitialized()) {
  171. throw newUninitializedMessageException(result);
  172. }
  173. return buildPartial();
  174. }
  175. private akka.amqp.AkkaAmqp.TestMessage buildParsed()
  176. throws com.google.protobuf.InvalidProtocolBufferException {
  177. if (!isInitialized()) {
  178. throw newUninitializedMessageException(
  179. result).asInvalidProtocolBufferException();
  180. }
  181. return buildPartial();
  182. }
  183. public akka.amqp.AkkaAmqp.TestMessage buildPartial() {
  184. if (result == null) {
  185. throw new IllegalStateException(
  186. "build() has already been called on this Builder.");
  187. }
  188. akka.amqp.AkkaAmqp.TestMessage returnMe = result;
  189. result = null;
  190. return returnMe;
  191. }
  192. public Builder mergeFrom(com.google.protobuf.Message other) {
  193. if (other instanceof akka.amqp.AkkaAmqp.TestMessage) {
  194. return mergeFrom((akka.amqp.AkkaAmqp.TestMessage)other);
  195. } else {
  196. super.mergeFrom(other);
  197. return this;
  198. }
  199. }
  200. public Builder mergeFrom(akka.amqp.AkkaAmqp.TestMessage other) {
  201. if (other == akka.amqp.AkkaAmqp.TestMessage.getDefaultInstance()) return this;
  202. if (other.hasMessage()) {
  203. setMessage(other.getMessage());
  204. }
  205. this.mergeUnknownFields(other.getUnknownFields());
  206. return this;
  207. }
  208. public Builder mergeFrom(
  209. com.google.protobuf.CodedInputStream input,
  210. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  211. throws java.io.IOException {
  212. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  213. com.google.protobuf.UnknownFieldSet.newBuilder(
  214. this.getUnknownFields());
  215. while (true) {
  216. int tag = input.readTag();
  217. switch (tag) {
  218. case 0:
  219. this.setUnknownFields(unknownFields.build());
  220. return this;
  221. default: {
  222. if (!parseUnknownField(input, unknownFields,
  223. extensionRegistry, tag)) {
  224. this.setUnknownFields(unknownFields.build());
  225. return this;
  226. }
  227. break;
  228. }
  229. case 10: {
  230. setMessage(input.readString());
  231. break;
  232. }
  233. }
  234. }
  235. }
  236. // optional string message = 1;
  237. public boolean hasMessage() {
  238. return result.hasMessage();
  239. }
  240. public java.lang.String getMessage() {
  241. return result.getMessage();
  242. }
  243. public Builder setMessage(java.lang.String value) {
  244. if (value == null) {
  245. throw new NullPointerException();
  246. }
  247. result.hasMessage = true;
  248. result.message_ = value;
  249. return this;
  250. }
  251. public Builder clearMessage() {
  252. result.hasMessage = false;
  253. result.message_ = getDefaultInstance().getMessage();
  254. return this;
  255. }
  256. // @@protoc_insertion_point(builder_scope:TestMessage)
  257. }
  258. static {
  259. defaultInstance = new TestMessage(true);
  260. akka.amqp.AkkaAmqp.internalForceInit();
  261. defaultInstance.initFields();
  262. }
  263. // @@protoc_insertion_point(class_scope:TestMessage)
  264. }
  265. private static com.google.protobuf.Descriptors.Descriptor
  266. internal_static_TestMessage_descriptor;
  267. private static
  268. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  269. internal_static_TestMessage_fieldAccessorTable;
  270. public static com.google.protobuf.Descriptors.FileDescriptor
  271. getDescriptor() {
  272. return descriptor;
  273. }
  274. private static com.google.protobuf.Descriptors.FileDescriptor
  275. descriptor;
  276. static {
  277. java.lang.String[] descriptorData = {
  278. "\n\017akka-amqp.proto\"\036\n\013TestMessage\022\017\n\007mess" +
  279. "age\030\001 \001(\tB\013\n\takka.amqp"
  280. };
  281. com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
  282. new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
  283. public com.google.protobuf.ExtensionRegistry assignDescriptors(
  284. com.google.protobuf.Descriptors.FileDescriptor root) {
  285. descriptor = root;
  286. internal_static_TestMessage_descriptor =
  287. getDescriptor().getMessageTypes().get(0);
  288. internal_static_TestMessage_fieldAccessorTable = new
  289. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  290. internal_static_TestMessage_descriptor,
  291. new java.lang.String[] { "Message", },
  292. akka.amqp.AkkaAmqp.TestMessage.class,
  293. akka.amqp.AkkaAmqp.TestMessage.Builder.class);
  294. return null;
  295. }
  296. };
  297. com.google.protobuf.Descriptors.FileDescriptor
  298. .internalBuildGeneratedFileFrom(descriptorData,
  299. new com.google.protobuf.Descriptors.FileDescriptor[] {
  300. }, assigner);
  301. }
  302. public static void internalForceInit() {}
  303. // @@protoc_insertion_point(outer_class_scope)
  304. }