PageRenderTime 54ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/proto_src/org/waveprotocol/box/profile/ProfilesProto.java

https://code.google.com/p/wave-protocol/
Java | 1158 lines | 1027 code | 104 blank | 27 comment | 113 complexity | 5952eac08223690e9043170b39c5b3d3 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-3.0, CPL-1.0, Apache-2.0, MIT
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: org/waveprotocol/box/profile/profiles.proto
  3. package org.waveprotocol.box.profile;
  4. public final class ProfilesProto {
  5. private ProfilesProto() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public static final class ProfileRequest extends
  10. com.google.protobuf.GeneratedMessage {
  11. // Use ProfileRequest.newBuilder() to construct.
  12. private ProfileRequest() {
  13. initFields();
  14. }
  15. private ProfileRequest(boolean noInit) {}
  16. private static final ProfileRequest defaultInstance;
  17. public static ProfileRequest getDefaultInstance() {
  18. return defaultInstance;
  19. }
  20. public ProfileRequest getDefaultInstanceForType() {
  21. return defaultInstance;
  22. }
  23. public static final com.google.protobuf.Descriptors.Descriptor
  24. getDescriptor() {
  25. return org.waveprotocol.box.profile.ProfilesProto.internal_static_profile_ProfileRequest_descriptor;
  26. }
  27. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  28. internalGetFieldAccessorTable() {
  29. return org.waveprotocol.box.profile.ProfilesProto.internal_static_profile_ProfileRequest_fieldAccessorTable;
  30. }
  31. // repeated string addresses = 1;
  32. public static final int ADDRESSES_FIELD_NUMBER = 1;
  33. private java.util.List<java.lang.String> addresses_ =
  34. java.util.Collections.emptyList();
  35. public java.util.List<java.lang.String> getAddressesList() {
  36. return addresses_;
  37. }
  38. public int getAddressesCount() { return addresses_.size(); }
  39. public java.lang.String getAddresses(int index) {
  40. return addresses_.get(index);
  41. }
  42. private void initFields() {
  43. }
  44. public final boolean isInitialized() {
  45. return true;
  46. }
  47. public void writeTo(com.google.protobuf.CodedOutputStream output)
  48. throws java.io.IOException {
  49. getSerializedSize();
  50. for (java.lang.String element : getAddressesList()) {
  51. output.writeString(1, element);
  52. }
  53. getUnknownFields().writeTo(output);
  54. }
  55. private int memoizedSerializedSize = -1;
  56. public int getSerializedSize() {
  57. int size = memoizedSerializedSize;
  58. if (size != -1) return size;
  59. size = 0;
  60. {
  61. int dataSize = 0;
  62. for (java.lang.String element : getAddressesList()) {
  63. dataSize += com.google.protobuf.CodedOutputStream
  64. .computeStringSizeNoTag(element);
  65. }
  66. size += dataSize;
  67. size += 1 * getAddressesList().size();
  68. }
  69. size += getUnknownFields().getSerializedSize();
  70. memoizedSerializedSize = size;
  71. return size;
  72. }
  73. public static org.waveprotocol.box.profile.ProfilesProto.ProfileRequest parseFrom(
  74. com.google.protobuf.ByteString data)
  75. throws com.google.protobuf.InvalidProtocolBufferException {
  76. return newBuilder().mergeFrom(data).buildParsed();
  77. }
  78. public static org.waveprotocol.box.profile.ProfilesProto.ProfileRequest parseFrom(
  79. com.google.protobuf.ByteString data,
  80. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  81. throws com.google.protobuf.InvalidProtocolBufferException {
  82. return newBuilder().mergeFrom(data, extensionRegistry)
  83. .buildParsed();
  84. }
  85. public static org.waveprotocol.box.profile.ProfilesProto.ProfileRequest parseFrom(byte[] data)
  86. throws com.google.protobuf.InvalidProtocolBufferException {
  87. return newBuilder().mergeFrom(data).buildParsed();
  88. }
  89. public static org.waveprotocol.box.profile.ProfilesProto.ProfileRequest parseFrom(
  90. byte[] data,
  91. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  92. throws com.google.protobuf.InvalidProtocolBufferException {
  93. return newBuilder().mergeFrom(data, extensionRegistry)
  94. .buildParsed();
  95. }
  96. public static org.waveprotocol.box.profile.ProfilesProto.ProfileRequest parseFrom(java.io.InputStream input)
  97. throws java.io.IOException {
  98. return newBuilder().mergeFrom(input).buildParsed();
  99. }
  100. public static org.waveprotocol.box.profile.ProfilesProto.ProfileRequest parseFrom(
  101. java.io.InputStream input,
  102. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  103. throws java.io.IOException {
  104. return newBuilder().mergeFrom(input, extensionRegistry)
  105. .buildParsed();
  106. }
  107. public static org.waveprotocol.box.profile.ProfilesProto.ProfileRequest parseDelimitedFrom(java.io.InputStream input)
  108. throws java.io.IOException {
  109. Builder builder = newBuilder();
  110. if (builder.mergeDelimitedFrom(input)) {
  111. return builder.buildParsed();
  112. } else {
  113. return null;
  114. }
  115. }
  116. public static org.waveprotocol.box.profile.ProfilesProto.ProfileRequest parseDelimitedFrom(
  117. java.io.InputStream input,
  118. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  119. throws java.io.IOException {
  120. Builder builder = newBuilder();
  121. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  122. return builder.buildParsed();
  123. } else {
  124. return null;
  125. }
  126. }
  127. public static org.waveprotocol.box.profile.ProfilesProto.ProfileRequest parseFrom(
  128. com.google.protobuf.CodedInputStream input)
  129. throws java.io.IOException {
  130. return newBuilder().mergeFrom(input).buildParsed();
  131. }
  132. public static org.waveprotocol.box.profile.ProfilesProto.ProfileRequest parseFrom(
  133. com.google.protobuf.CodedInputStream input,
  134. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  135. throws java.io.IOException {
  136. return newBuilder().mergeFrom(input, extensionRegistry)
  137. .buildParsed();
  138. }
  139. public static Builder newBuilder() { return Builder.create(); }
  140. public Builder newBuilderForType() { return newBuilder(); }
  141. public static Builder newBuilder(org.waveprotocol.box.profile.ProfilesProto.ProfileRequest prototype) {
  142. return newBuilder().mergeFrom(prototype);
  143. }
  144. public Builder toBuilder() { return newBuilder(this); }
  145. public static final class Builder extends
  146. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  147. private org.waveprotocol.box.profile.ProfilesProto.ProfileRequest result;
  148. // Construct using org.waveprotocol.box.profile.ProfilesProto.ProfileRequest.newBuilder()
  149. private Builder() {}
  150. private static Builder create() {
  151. Builder builder = new Builder();
  152. builder.result = new org.waveprotocol.box.profile.ProfilesProto.ProfileRequest();
  153. return builder;
  154. }
  155. protected org.waveprotocol.box.profile.ProfilesProto.ProfileRequest internalGetResult() {
  156. return result;
  157. }
  158. public Builder clear() {
  159. if (result == null) {
  160. throw new IllegalStateException(
  161. "Cannot call clear() after build().");
  162. }
  163. result = new org.waveprotocol.box.profile.ProfilesProto.ProfileRequest();
  164. return this;
  165. }
  166. public Builder clone() {
  167. return create().mergeFrom(result);
  168. }
  169. public com.google.protobuf.Descriptors.Descriptor
  170. getDescriptorForType() {
  171. return org.waveprotocol.box.profile.ProfilesProto.ProfileRequest.getDescriptor();
  172. }
  173. public org.waveprotocol.box.profile.ProfilesProto.ProfileRequest getDefaultInstanceForType() {
  174. return org.waveprotocol.box.profile.ProfilesProto.ProfileRequest.getDefaultInstance();
  175. }
  176. public boolean isInitialized() {
  177. return result.isInitialized();
  178. }
  179. public org.waveprotocol.box.profile.ProfilesProto.ProfileRequest build() {
  180. if (result != null && !isInitialized()) {
  181. throw newUninitializedMessageException(result);
  182. }
  183. return buildPartial();
  184. }
  185. private org.waveprotocol.box.profile.ProfilesProto.ProfileRequest buildParsed()
  186. throws com.google.protobuf.InvalidProtocolBufferException {
  187. if (!isInitialized()) {
  188. throw newUninitializedMessageException(
  189. result).asInvalidProtocolBufferException();
  190. }
  191. return buildPartial();
  192. }
  193. public org.waveprotocol.box.profile.ProfilesProto.ProfileRequest buildPartial() {
  194. if (result == null) {
  195. throw new IllegalStateException(
  196. "build() has already been called on this Builder.");
  197. }
  198. if (result.addresses_ != java.util.Collections.EMPTY_LIST) {
  199. result.addresses_ =
  200. java.util.Collections.unmodifiableList(result.addresses_);
  201. }
  202. org.waveprotocol.box.profile.ProfilesProto.ProfileRequest returnMe = result;
  203. result = null;
  204. return returnMe;
  205. }
  206. public Builder mergeFrom(com.google.protobuf.Message other) {
  207. if (other instanceof org.waveprotocol.box.profile.ProfilesProto.ProfileRequest) {
  208. return mergeFrom((org.waveprotocol.box.profile.ProfilesProto.ProfileRequest)other);
  209. } else {
  210. super.mergeFrom(other);
  211. return this;
  212. }
  213. }
  214. public Builder mergeFrom(org.waveprotocol.box.profile.ProfilesProto.ProfileRequest other) {
  215. if (other == org.waveprotocol.box.profile.ProfilesProto.ProfileRequest.getDefaultInstance()) return this;
  216. if (!other.addresses_.isEmpty()) {
  217. if (result.addresses_.isEmpty()) {
  218. result.addresses_ = new java.util.ArrayList<java.lang.String>();
  219. }
  220. result.addresses_.addAll(other.addresses_);
  221. }
  222. this.mergeUnknownFields(other.getUnknownFields());
  223. return this;
  224. }
  225. public Builder mergeFrom(
  226. com.google.protobuf.CodedInputStream input,
  227. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  228. throws java.io.IOException {
  229. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  230. com.google.protobuf.UnknownFieldSet.newBuilder(
  231. this.getUnknownFields());
  232. while (true) {
  233. int tag = input.readTag();
  234. switch (tag) {
  235. case 0:
  236. this.setUnknownFields(unknownFields.build());
  237. return this;
  238. default: {
  239. if (!parseUnknownField(input, unknownFields,
  240. extensionRegistry, tag)) {
  241. this.setUnknownFields(unknownFields.build());
  242. return this;
  243. }
  244. break;
  245. }
  246. case 10: {
  247. addAddresses(input.readString());
  248. break;
  249. }
  250. }
  251. }
  252. }
  253. // repeated string addresses = 1;
  254. public java.util.List<java.lang.String> getAddressesList() {
  255. return java.util.Collections.unmodifiableList(result.addresses_);
  256. }
  257. public int getAddressesCount() {
  258. return result.getAddressesCount();
  259. }
  260. public java.lang.String getAddresses(int index) {
  261. return result.getAddresses(index);
  262. }
  263. public Builder setAddresses(int index, java.lang.String value) {
  264. if (value == null) {
  265. throw new NullPointerException();
  266. }
  267. result.addresses_.set(index, value);
  268. return this;
  269. }
  270. public Builder addAddresses(java.lang.String value) {
  271. if (value == null) {
  272. throw new NullPointerException();
  273. }
  274. if (result.addresses_.isEmpty()) {
  275. result.addresses_ = new java.util.ArrayList<java.lang.String>();
  276. }
  277. result.addresses_.add(value);
  278. return this;
  279. }
  280. public Builder addAllAddresses(
  281. java.lang.Iterable<? extends java.lang.String> values) {
  282. if (result.addresses_.isEmpty()) {
  283. result.addresses_ = new java.util.ArrayList<java.lang.String>();
  284. }
  285. super.addAll(values, result.addresses_);
  286. return this;
  287. }
  288. public Builder clearAddresses() {
  289. result.addresses_ = java.util.Collections.emptyList();
  290. return this;
  291. }
  292. // @@protoc_insertion_point(builder_scope:profile.ProfileRequest)
  293. }
  294. static {
  295. defaultInstance = new ProfileRequest(true);
  296. org.waveprotocol.box.profile.ProfilesProto.internalForceInit();
  297. defaultInstance.initFields();
  298. }
  299. // @@protoc_insertion_point(class_scope:profile.ProfileRequest)
  300. }
  301. public static final class ProfileResponse extends
  302. com.google.protobuf.GeneratedMessage {
  303. // Use ProfileResponse.newBuilder() to construct.
  304. private ProfileResponse() {
  305. initFields();
  306. }
  307. private ProfileResponse(boolean noInit) {}
  308. private static final ProfileResponse defaultInstance;
  309. public static ProfileResponse getDefaultInstance() {
  310. return defaultInstance;
  311. }
  312. public ProfileResponse getDefaultInstanceForType() {
  313. return defaultInstance;
  314. }
  315. public static final com.google.protobuf.Descriptors.Descriptor
  316. getDescriptor() {
  317. return org.waveprotocol.box.profile.ProfilesProto.internal_static_profile_ProfileResponse_descriptor;
  318. }
  319. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  320. internalGetFieldAccessorTable() {
  321. return org.waveprotocol.box.profile.ProfilesProto.internal_static_profile_ProfileResponse_fieldAccessorTable;
  322. }
  323. public static final class FetchedProfile extends
  324. com.google.protobuf.GeneratedMessage {
  325. // Use FetchedProfile.newBuilder() to construct.
  326. private FetchedProfile() {
  327. initFields();
  328. }
  329. private FetchedProfile(boolean noInit) {}
  330. private static final FetchedProfile defaultInstance;
  331. public static FetchedProfile getDefaultInstance() {
  332. return defaultInstance;
  333. }
  334. public FetchedProfile getDefaultInstanceForType() {
  335. return defaultInstance;
  336. }
  337. public static final com.google.protobuf.Descriptors.Descriptor
  338. getDescriptor() {
  339. return org.waveprotocol.box.profile.ProfilesProto.internal_static_profile_ProfileResponse_FetchedProfile_descriptor;
  340. }
  341. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  342. internalGetFieldAccessorTable() {
  343. return org.waveprotocol.box.profile.ProfilesProto.internal_static_profile_ProfileResponse_FetchedProfile_fieldAccessorTable;
  344. }
  345. // required string address = 1;
  346. public static final int ADDRESS_FIELD_NUMBER = 1;
  347. private boolean hasAddress;
  348. private java.lang.String address_ = "";
  349. public boolean hasAddress() { return hasAddress; }
  350. public java.lang.String getAddress() { return address_; }
  351. // required string name = 2;
  352. public static final int NAME_FIELD_NUMBER = 2;
  353. private boolean hasName;
  354. private java.lang.String name_ = "";
  355. public boolean hasName() { return hasName; }
  356. public java.lang.String getName() { return name_; }
  357. // required string imageUrl = 3;
  358. public static final int IMAGEURL_FIELD_NUMBER = 3;
  359. private boolean hasImageUrl;
  360. private java.lang.String imageUrl_ = "";
  361. public boolean hasImageUrl() { return hasImageUrl; }
  362. public java.lang.String getImageUrl() { return imageUrl_; }
  363. // optional string profileUrl = 4;
  364. public static final int PROFILEURL_FIELD_NUMBER = 4;
  365. private boolean hasProfileUrl;
  366. private java.lang.String profileUrl_ = "";
  367. public boolean hasProfileUrl() { return hasProfileUrl; }
  368. public java.lang.String getProfileUrl() { return profileUrl_; }
  369. private void initFields() {
  370. }
  371. public final boolean isInitialized() {
  372. if (!hasAddress) return false;
  373. if (!hasName) return false;
  374. if (!hasImageUrl) return false;
  375. return true;
  376. }
  377. public void writeTo(com.google.protobuf.CodedOutputStream output)
  378. throws java.io.IOException {
  379. getSerializedSize();
  380. if (hasAddress()) {
  381. output.writeString(1, getAddress());
  382. }
  383. if (hasName()) {
  384. output.writeString(2, getName());
  385. }
  386. if (hasImageUrl()) {
  387. output.writeString(3, getImageUrl());
  388. }
  389. if (hasProfileUrl()) {
  390. output.writeString(4, getProfileUrl());
  391. }
  392. getUnknownFields().writeTo(output);
  393. }
  394. private int memoizedSerializedSize = -1;
  395. public int getSerializedSize() {
  396. int size = memoizedSerializedSize;
  397. if (size != -1) return size;
  398. size = 0;
  399. if (hasAddress()) {
  400. size += com.google.protobuf.CodedOutputStream
  401. .computeStringSize(1, getAddress());
  402. }
  403. if (hasName()) {
  404. size += com.google.protobuf.CodedOutputStream
  405. .computeStringSize(2, getName());
  406. }
  407. if (hasImageUrl()) {
  408. size += com.google.protobuf.CodedOutputStream
  409. .computeStringSize(3, getImageUrl());
  410. }
  411. if (hasProfileUrl()) {
  412. size += com.google.protobuf.CodedOutputStream
  413. .computeStringSize(4, getProfileUrl());
  414. }
  415. size += getUnknownFields().getSerializedSize();
  416. memoizedSerializedSize = size;
  417. return size;
  418. }
  419. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile parseFrom(
  420. com.google.protobuf.ByteString data)
  421. throws com.google.protobuf.InvalidProtocolBufferException {
  422. return newBuilder().mergeFrom(data).buildParsed();
  423. }
  424. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile parseFrom(
  425. com.google.protobuf.ByteString data,
  426. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  427. throws com.google.protobuf.InvalidProtocolBufferException {
  428. return newBuilder().mergeFrom(data, extensionRegistry)
  429. .buildParsed();
  430. }
  431. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile parseFrom(byte[] data)
  432. throws com.google.protobuf.InvalidProtocolBufferException {
  433. return newBuilder().mergeFrom(data).buildParsed();
  434. }
  435. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile parseFrom(
  436. byte[] data,
  437. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  438. throws com.google.protobuf.InvalidProtocolBufferException {
  439. return newBuilder().mergeFrom(data, extensionRegistry)
  440. .buildParsed();
  441. }
  442. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile parseFrom(java.io.InputStream input)
  443. throws java.io.IOException {
  444. return newBuilder().mergeFrom(input).buildParsed();
  445. }
  446. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile parseFrom(
  447. java.io.InputStream input,
  448. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  449. throws java.io.IOException {
  450. return newBuilder().mergeFrom(input, extensionRegistry)
  451. .buildParsed();
  452. }
  453. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile parseDelimitedFrom(java.io.InputStream input)
  454. throws java.io.IOException {
  455. Builder builder = newBuilder();
  456. if (builder.mergeDelimitedFrom(input)) {
  457. return builder.buildParsed();
  458. } else {
  459. return null;
  460. }
  461. }
  462. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile parseDelimitedFrom(
  463. java.io.InputStream input,
  464. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  465. throws java.io.IOException {
  466. Builder builder = newBuilder();
  467. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  468. return builder.buildParsed();
  469. } else {
  470. return null;
  471. }
  472. }
  473. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile parseFrom(
  474. com.google.protobuf.CodedInputStream input)
  475. throws java.io.IOException {
  476. return newBuilder().mergeFrom(input).buildParsed();
  477. }
  478. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile parseFrom(
  479. com.google.protobuf.CodedInputStream input,
  480. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  481. throws java.io.IOException {
  482. return newBuilder().mergeFrom(input, extensionRegistry)
  483. .buildParsed();
  484. }
  485. public static Builder newBuilder() { return Builder.create(); }
  486. public Builder newBuilderForType() { return newBuilder(); }
  487. public static Builder newBuilder(org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile prototype) {
  488. return newBuilder().mergeFrom(prototype);
  489. }
  490. public Builder toBuilder() { return newBuilder(this); }
  491. public static final class Builder extends
  492. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  493. private org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile result;
  494. // Construct using org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile.newBuilder()
  495. private Builder() {}
  496. private static Builder create() {
  497. Builder builder = new Builder();
  498. builder.result = new org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile();
  499. return builder;
  500. }
  501. protected org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile internalGetResult() {
  502. return result;
  503. }
  504. public Builder clear() {
  505. if (result == null) {
  506. throw new IllegalStateException(
  507. "Cannot call clear() after build().");
  508. }
  509. result = new org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile();
  510. return this;
  511. }
  512. public Builder clone() {
  513. return create().mergeFrom(result);
  514. }
  515. public com.google.protobuf.Descriptors.Descriptor
  516. getDescriptorForType() {
  517. return org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile.getDescriptor();
  518. }
  519. public org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile getDefaultInstanceForType() {
  520. return org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile.getDefaultInstance();
  521. }
  522. public boolean isInitialized() {
  523. return result.isInitialized();
  524. }
  525. public org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile build() {
  526. if (result != null && !isInitialized()) {
  527. throw newUninitializedMessageException(result);
  528. }
  529. return buildPartial();
  530. }
  531. private org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile buildParsed()
  532. throws com.google.protobuf.InvalidProtocolBufferException {
  533. if (!isInitialized()) {
  534. throw newUninitializedMessageException(
  535. result).asInvalidProtocolBufferException();
  536. }
  537. return buildPartial();
  538. }
  539. public org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile buildPartial() {
  540. if (result == null) {
  541. throw new IllegalStateException(
  542. "build() has already been called on this Builder.");
  543. }
  544. org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile returnMe = result;
  545. result = null;
  546. return returnMe;
  547. }
  548. public Builder mergeFrom(com.google.protobuf.Message other) {
  549. if (other instanceof org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile) {
  550. return mergeFrom((org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile)other);
  551. } else {
  552. super.mergeFrom(other);
  553. return this;
  554. }
  555. }
  556. public Builder mergeFrom(org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile other) {
  557. if (other == org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile.getDefaultInstance()) return this;
  558. if (other.hasAddress()) {
  559. setAddress(other.getAddress());
  560. }
  561. if (other.hasName()) {
  562. setName(other.getName());
  563. }
  564. if (other.hasImageUrl()) {
  565. setImageUrl(other.getImageUrl());
  566. }
  567. if (other.hasProfileUrl()) {
  568. setProfileUrl(other.getProfileUrl());
  569. }
  570. this.mergeUnknownFields(other.getUnknownFields());
  571. return this;
  572. }
  573. public Builder mergeFrom(
  574. com.google.protobuf.CodedInputStream input,
  575. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  576. throws java.io.IOException {
  577. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  578. com.google.protobuf.UnknownFieldSet.newBuilder(
  579. this.getUnknownFields());
  580. while (true) {
  581. int tag = input.readTag();
  582. switch (tag) {
  583. case 0:
  584. this.setUnknownFields(unknownFields.build());
  585. return this;
  586. default: {
  587. if (!parseUnknownField(input, unknownFields,
  588. extensionRegistry, tag)) {
  589. this.setUnknownFields(unknownFields.build());
  590. return this;
  591. }
  592. break;
  593. }
  594. case 10: {
  595. setAddress(input.readString());
  596. break;
  597. }
  598. case 18: {
  599. setName(input.readString());
  600. break;
  601. }
  602. case 26: {
  603. setImageUrl(input.readString());
  604. break;
  605. }
  606. case 34: {
  607. setProfileUrl(input.readString());
  608. break;
  609. }
  610. }
  611. }
  612. }
  613. // required string address = 1;
  614. public boolean hasAddress() {
  615. return result.hasAddress();
  616. }
  617. public java.lang.String getAddress() {
  618. return result.getAddress();
  619. }
  620. public Builder setAddress(java.lang.String value) {
  621. if (value == null) {
  622. throw new NullPointerException();
  623. }
  624. result.hasAddress = true;
  625. result.address_ = value;
  626. return this;
  627. }
  628. public Builder clearAddress() {
  629. result.hasAddress = false;
  630. result.address_ = getDefaultInstance().getAddress();
  631. return this;
  632. }
  633. // required string name = 2;
  634. public boolean hasName() {
  635. return result.hasName();
  636. }
  637. public java.lang.String getName() {
  638. return result.getName();
  639. }
  640. public Builder setName(java.lang.String value) {
  641. if (value == null) {
  642. throw new NullPointerException();
  643. }
  644. result.hasName = true;
  645. result.name_ = value;
  646. return this;
  647. }
  648. public Builder clearName() {
  649. result.hasName = false;
  650. result.name_ = getDefaultInstance().getName();
  651. return this;
  652. }
  653. // required string imageUrl = 3;
  654. public boolean hasImageUrl() {
  655. return result.hasImageUrl();
  656. }
  657. public java.lang.String getImageUrl() {
  658. return result.getImageUrl();
  659. }
  660. public Builder setImageUrl(java.lang.String value) {
  661. if (value == null) {
  662. throw new NullPointerException();
  663. }
  664. result.hasImageUrl = true;
  665. result.imageUrl_ = value;
  666. return this;
  667. }
  668. public Builder clearImageUrl() {
  669. result.hasImageUrl = false;
  670. result.imageUrl_ = getDefaultInstance().getImageUrl();
  671. return this;
  672. }
  673. // optional string profileUrl = 4;
  674. public boolean hasProfileUrl() {
  675. return result.hasProfileUrl();
  676. }
  677. public java.lang.String getProfileUrl() {
  678. return result.getProfileUrl();
  679. }
  680. public Builder setProfileUrl(java.lang.String value) {
  681. if (value == null) {
  682. throw new NullPointerException();
  683. }
  684. result.hasProfileUrl = true;
  685. result.profileUrl_ = value;
  686. return this;
  687. }
  688. public Builder clearProfileUrl() {
  689. result.hasProfileUrl = false;
  690. result.profileUrl_ = getDefaultInstance().getProfileUrl();
  691. return this;
  692. }
  693. // @@protoc_insertion_point(builder_scope:profile.ProfileResponse.FetchedProfile)
  694. }
  695. static {
  696. defaultInstance = new FetchedProfile(true);
  697. org.waveprotocol.box.profile.ProfilesProto.internalForceInit();
  698. defaultInstance.initFields();
  699. }
  700. // @@protoc_insertion_point(class_scope:profile.ProfileResponse.FetchedProfile)
  701. }
  702. // repeated .profile.ProfileResponse.FetchedProfile profiles = 1;
  703. public static final int PROFILES_FIELD_NUMBER = 1;
  704. private java.util.List<org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile> profiles_ =
  705. java.util.Collections.emptyList();
  706. public java.util.List<org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile> getProfilesList() {
  707. return profiles_;
  708. }
  709. public int getProfilesCount() { return profiles_.size(); }
  710. public org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile getProfiles(int index) {
  711. return profiles_.get(index);
  712. }
  713. private void initFields() {
  714. }
  715. public final boolean isInitialized() {
  716. for (org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile element : getProfilesList()) {
  717. if (!element.isInitialized()) return false;
  718. }
  719. return true;
  720. }
  721. public void writeTo(com.google.protobuf.CodedOutputStream output)
  722. throws java.io.IOException {
  723. getSerializedSize();
  724. for (org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile element : getProfilesList()) {
  725. output.writeMessage(1, element);
  726. }
  727. getUnknownFields().writeTo(output);
  728. }
  729. private int memoizedSerializedSize = -1;
  730. public int getSerializedSize() {
  731. int size = memoizedSerializedSize;
  732. if (size != -1) return size;
  733. size = 0;
  734. for (org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile element : getProfilesList()) {
  735. size += com.google.protobuf.CodedOutputStream
  736. .computeMessageSize(1, element);
  737. }
  738. size += getUnknownFields().getSerializedSize();
  739. memoizedSerializedSize = size;
  740. return size;
  741. }
  742. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse parseFrom(
  743. com.google.protobuf.ByteString data)
  744. throws com.google.protobuf.InvalidProtocolBufferException {
  745. return newBuilder().mergeFrom(data).buildParsed();
  746. }
  747. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse parseFrom(
  748. com.google.protobuf.ByteString data,
  749. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  750. throws com.google.protobuf.InvalidProtocolBufferException {
  751. return newBuilder().mergeFrom(data, extensionRegistry)
  752. .buildParsed();
  753. }
  754. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse parseFrom(byte[] data)
  755. throws com.google.protobuf.InvalidProtocolBufferException {
  756. return newBuilder().mergeFrom(data).buildParsed();
  757. }
  758. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse parseFrom(
  759. byte[] data,
  760. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  761. throws com.google.protobuf.InvalidProtocolBufferException {
  762. return newBuilder().mergeFrom(data, extensionRegistry)
  763. .buildParsed();
  764. }
  765. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse parseFrom(java.io.InputStream input)
  766. throws java.io.IOException {
  767. return newBuilder().mergeFrom(input).buildParsed();
  768. }
  769. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse parseFrom(
  770. java.io.InputStream input,
  771. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  772. throws java.io.IOException {
  773. return newBuilder().mergeFrom(input, extensionRegistry)
  774. .buildParsed();
  775. }
  776. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse parseDelimitedFrom(java.io.InputStream input)
  777. throws java.io.IOException {
  778. Builder builder = newBuilder();
  779. if (builder.mergeDelimitedFrom(input)) {
  780. return builder.buildParsed();
  781. } else {
  782. return null;
  783. }
  784. }
  785. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse parseDelimitedFrom(
  786. java.io.InputStream input,
  787. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  788. throws java.io.IOException {
  789. Builder builder = newBuilder();
  790. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  791. return builder.buildParsed();
  792. } else {
  793. return null;
  794. }
  795. }
  796. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse parseFrom(
  797. com.google.protobuf.CodedInputStream input)
  798. throws java.io.IOException {
  799. return newBuilder().mergeFrom(input).buildParsed();
  800. }
  801. public static org.waveprotocol.box.profile.ProfilesProto.ProfileResponse parseFrom(
  802. com.google.protobuf.CodedInputStream input,
  803. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  804. throws java.io.IOException {
  805. return newBuilder().mergeFrom(input, extensionRegistry)
  806. .buildParsed();
  807. }
  808. public static Builder newBuilder() { return Builder.create(); }
  809. public Builder newBuilderForType() { return newBuilder(); }
  810. public static Builder newBuilder(org.waveprotocol.box.profile.ProfilesProto.ProfileResponse prototype) {
  811. return newBuilder().mergeFrom(prototype);
  812. }
  813. public Builder toBuilder() { return newBuilder(this); }
  814. public static final class Builder extends
  815. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  816. private org.waveprotocol.box.profile.ProfilesProto.ProfileResponse result;
  817. // Construct using org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.newBuilder()
  818. private Builder() {}
  819. private static Builder create() {
  820. Builder builder = new Builder();
  821. builder.result = new org.waveprotocol.box.profile.ProfilesProto.ProfileResponse();
  822. return builder;
  823. }
  824. protected org.waveprotocol.box.profile.ProfilesProto.ProfileResponse internalGetResult() {
  825. return result;
  826. }
  827. public Builder clear() {
  828. if (result == null) {
  829. throw new IllegalStateException(
  830. "Cannot call clear() after build().");
  831. }
  832. result = new org.waveprotocol.box.profile.ProfilesProto.ProfileResponse();
  833. return this;
  834. }
  835. public Builder clone() {
  836. return create().mergeFrom(result);
  837. }
  838. public com.google.protobuf.Descriptors.Descriptor
  839. getDescriptorForType() {
  840. return org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.getDescriptor();
  841. }
  842. public org.waveprotocol.box.profile.ProfilesProto.ProfileResponse getDefaultInstanceForType() {
  843. return org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.getDefaultInstance();
  844. }
  845. public boolean isInitialized() {
  846. return result.isInitialized();
  847. }
  848. public org.waveprotocol.box.profile.ProfilesProto.ProfileResponse build() {
  849. if (result != null && !isInitialized()) {
  850. throw newUninitializedMessageException(result);
  851. }
  852. return buildPartial();
  853. }
  854. private org.waveprotocol.box.profile.ProfilesProto.ProfileResponse buildParsed()
  855. throws com.google.protobuf.InvalidProtocolBufferException {
  856. if (!isInitialized()) {
  857. throw newUninitializedMessageException(
  858. result).asInvalidProtocolBufferException();
  859. }
  860. return buildPartial();
  861. }
  862. public org.waveprotocol.box.profile.ProfilesProto.ProfileResponse buildPartial() {
  863. if (result == null) {
  864. throw new IllegalStateException(
  865. "build() has already been called on this Builder.");
  866. }
  867. if (result.profiles_ != java.util.Collections.EMPTY_LIST) {
  868. result.profiles_ =
  869. java.util.Collections.unmodifiableList(result.profiles_);
  870. }
  871. org.waveprotocol.box.profile.ProfilesProto.ProfileResponse returnMe = result;
  872. result = null;
  873. return returnMe;
  874. }
  875. public Builder mergeFrom(com.google.protobuf.Message other) {
  876. if (other instanceof org.waveprotocol.box.profile.ProfilesProto.ProfileResponse) {
  877. return mergeFrom((org.waveprotocol.box.profile.ProfilesProto.ProfileResponse)other);
  878. } else {
  879. super.mergeFrom(other);
  880. return this;
  881. }
  882. }
  883. public Builder mergeFrom(org.waveprotocol.box.profile.ProfilesProto.ProfileResponse other) {
  884. if (other == org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.getDefaultInstance()) return this;
  885. if (!other.profiles_.isEmpty()) {
  886. if (result.profiles_.isEmpty()) {
  887. result.profiles_ = new java.util.ArrayList<org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile>();
  888. }
  889. result.profiles_.addAll(other.profiles_);
  890. }
  891. this.mergeUnknownFields(other.getUnknownFields());
  892. return this;
  893. }
  894. public Builder mergeFrom(
  895. com.google.protobuf.CodedInputStream input,
  896. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  897. throws java.io.IOException {
  898. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  899. com.google.protobuf.UnknownFieldSet.newBuilder(
  900. this.getUnknownFields());
  901. while (true) {
  902. int tag = input.readTag();
  903. switch (tag) {
  904. case 0:
  905. this.setUnknownFields(unknownFields.build());
  906. return this;
  907. default: {
  908. if (!parseUnknownField(input, unknownFields,
  909. extensionRegistry, tag)) {
  910. this.setUnknownFields(unknownFields.build());
  911. return this;
  912. }
  913. break;
  914. }
  915. case 10: {
  916. org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile.Builder subBuilder = org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile.newBuilder();
  917. input.readMessage(subBuilder, extensionRegistry);
  918. addProfiles(subBuilder.buildPartial());
  919. break;
  920. }
  921. }
  922. }
  923. }
  924. // repeated .profile.ProfileResponse.FetchedProfile profiles = 1;
  925. public java.util.List<org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile> getProfilesList() {
  926. return java.util.Collections.unmodifiableList(result.profiles_);
  927. }
  928. public int getProfilesCount() {
  929. return result.getProfilesCount();
  930. }
  931. public org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile getProfiles(int index) {
  932. return result.getProfiles(index);
  933. }
  934. public Builder setProfiles(int index, org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile value) {
  935. if (value == null) {
  936. throw new NullPointerException();
  937. }
  938. result.profiles_.set(index, value);
  939. return this;
  940. }
  941. public Builder setProfiles(int index, org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile.Builder builderForValue) {
  942. result.profiles_.set(index, builderForValue.build());
  943. return this;
  944. }
  945. public Builder addProfiles(org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile value) {
  946. if (value == null) {
  947. throw new NullPointerException();
  948. }
  949. if (result.profiles_.isEmpty()) {
  950. result.profiles_ = new java.util.ArrayList<org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile>();
  951. }
  952. result.profiles_.add(value);
  953. return this;
  954. }
  955. public Builder addProfiles(org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile.Builder builderForValue) {
  956. if (result.profiles_.isEmpty()) {
  957. result.profiles_ = new java.util.ArrayList<org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile>();
  958. }
  959. result.profiles_.add(builderForValue.build());
  960. return this;
  961. }
  962. public Builder addAllProfiles(
  963. java.lang.Iterable<? extends org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile> values) {
  964. if (result.profiles_.isEmpty()) {
  965. result.profiles_ = new java.util.ArrayList<org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile>();
  966. }
  967. super.addAll(values, result.profiles_);
  968. return this;
  969. }
  970. public Builder clearProfiles() {
  971. result.profiles_ = java.util.Collections.emptyList();
  972. return this;
  973. }
  974. // @@protoc_insertion_point(builder_scope:profile.ProfileResponse)
  975. }
  976. static {
  977. defaultInstance = new ProfileResponse(true);
  978. org.waveprotocol.box.profile.ProfilesProto.internalForceInit();
  979. defaultInstance.initFields();
  980. }
  981. // @@protoc_insertion_point(class_scope:profile.ProfileResponse)
  982. }
  983. private static com.google.protobuf.Descriptors.Descriptor
  984. internal_static_profile_ProfileRequest_descriptor;
  985. private static
  986. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  987. internal_static_profile_ProfileRequest_fieldAccessorTable;
  988. private static com.google.protobuf.Descriptors.Descriptor
  989. internal_static_profile_ProfileResponse_descriptor;
  990. private static
  991. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  992. internal_static_profile_ProfileResponse_fieldAccessorTable;
  993. private static com.google.protobuf.Descriptors.Descriptor
  994. internal_static_profile_ProfileResponse_FetchedProfile_descriptor;
  995. private static
  996. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  997. internal_static_profile_ProfileResponse_FetchedProfile_fieldAccessorTable;
  998. public static com.google.protobuf.Descriptors.FileDescriptor
  999. getDescriptor() {
  1000. return descriptor;
  1001. }
  1002. private static com.google.protobuf.Descriptors.FileDescriptor
  1003. descriptor;
  1004. static {
  1005. java.lang.String[] descriptorData = {
  1006. "\n+org/waveprotocol/box/profile/profiles." +
  1007. "proto\022\007profile\"#\n\016ProfileRequest\022\021\n\taddr" +
  1008. "esses\030\001 \003(\t\"\243\001\n\017ProfileResponse\0229\n\010profi" +
  1009. "les\030\001 \003(\0132\'.profile.ProfileResponse.Fetc" +
  1010. "hedProfile\032U\n\016FetchedProfile\022\017\n\007address\030" +
  1011. "\001 \002(\t\022\014\n\004name\030\002 \002(\t\022\020\n\010imageUrl\030\003 \002(\t\022\022\n" +
  1012. "\nprofileUrl\030\004 \001(\tB-\n\034org.waveprotocol.bo" +
  1013. "x.profileB\rProfilesProto"
  1014. };
  1015. com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
  1016. new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
  1017. public com.google.protobuf.ExtensionRegistry assignDescriptors(
  1018. com.google.protobuf.Descriptors.FileDescriptor root) {
  1019. descriptor = root;
  1020. internal_static_profile_ProfileRequest_descriptor =
  1021. getDescriptor().getMessageTypes().get(0);
  1022. internal_static_profile_ProfileRequest_fieldAccessorTable = new
  1023. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  1024. internal_static_profile_ProfileRequest_descriptor,
  1025. new java.lang.String[] { "Addresses", },
  1026. org.waveprotocol.box.profile.ProfilesProto.ProfileRequest.class,
  1027. org.waveprotocol.box.profile.ProfilesProto.ProfileRequest.Builder.class);
  1028. internal_static_profile_ProfileResponse_descriptor =
  1029. getDescriptor().getMessageTypes().get(1);
  1030. internal_static_profile_ProfileResponse_fieldAccessorTable = new
  1031. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  1032. internal_static_profile_ProfileResponse_descriptor,
  1033. new java.lang.String[] { "Profiles", },
  1034. org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.class,
  1035. org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.Builder.class);
  1036. internal_static_profile_ProfileResponse_FetchedProfile_descriptor =
  1037. internal_static_profile_ProfileResponse_descriptor.getNestedTypes().get(0);
  1038. internal_static_profile_ProfileResponse_FetchedProfile_fieldAccessorTable = new
  1039. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  1040. internal_static_profile_ProfileResponse_FetchedProfile_descriptor,
  1041. new java.lang.String[] { "Address", "Name", "ImageUrl", "ProfileUrl", },
  1042. org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile.class,
  1043. org.waveprotocol.box.profile.ProfilesProto.ProfileResponse.FetchedProfile.Builder.class);
  1044. return null;
  1045. }
  1046. };
  1047. com.google.protobuf.Descriptors.FileDescriptor
  1048. .internalBuildGeneratedFileFrom(descriptorData,
  1049. new com.google.protobuf.Descriptors.FileDescriptor[] {
  1050. }, assigner);
  1051. }
  1052. public static void internalForceInit() {}
  1053. // @@protoc_insertion_point(outer_class_scope)
  1054. }