PageRenderTime 63ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 1ms

/protostuff-benchmark/src/main/java/com/dyuproject/protostuff/benchmark/V2LiteMedia.java

http://protostuff.googlecode.com/
Java | 1598 lines | 1415 code | 130 blank | 53 comment | 173 complexity | 9c9debf0d085a84adad27041557c3aaf MD5 | raw file
Possible License(s): Apache-2.0

Large files files are truncated, but you can click here to view the full file

  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: src/main/resources/media.proto
  3. package com.dyuproject.protostuff.benchmark;
  4. public final class V2LiteMedia {
  5. private V2LiteMedia() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistryLite registry) {
  8. }
  9. public static final class Image extends
  10. com.google.protobuf.GeneratedMessageLite {
  11. // Use Image.newBuilder() to construct.
  12. private Image() {
  13. initFields();
  14. }
  15. private Image(boolean noInit) {}
  16. private static final Image defaultInstance;
  17. public static Image getDefaultInstance() {
  18. return defaultInstance;
  19. }
  20. public Image getDefaultInstanceForType() {
  21. return defaultInstance;
  22. }
  23. public enum Size
  24. implements com.google.protobuf.Internal.EnumLite {
  25. SMALL(0, 0),
  26. LARGE(1, 1),
  27. ;
  28. public final int getNumber() { return value; }
  29. public static Size valueOf(int value) {
  30. switch (value) {
  31. case 0: return SMALL;
  32. case 1: return LARGE;
  33. default: return null;
  34. }
  35. }
  36. public static com.google.protobuf.Internal.EnumLiteMap<Size>
  37. internalGetValueMap() {
  38. return internalValueMap;
  39. }
  40. private static com.google.protobuf.Internal.EnumLiteMap<Size>
  41. internalValueMap =
  42. new com.google.protobuf.Internal.EnumLiteMap<Size>() {
  43. public Size findValueByNumber(int number) {
  44. return Size.valueOf(number)
  45. ; }
  46. };
  47. private final int index;
  48. private final int value;
  49. private Size(int index, int value) {
  50. this.index = index;
  51. this.value = value;
  52. }
  53. // @@protoc_insertion_point(enum_scope:serializers.protobuf.media.Image.Size)
  54. }
  55. // required string uri = 1;
  56. public static final int URI_FIELD_NUMBER = 1;
  57. private boolean hasUri;
  58. private java.lang.String uri_ = "";
  59. public boolean hasUri() { return hasUri; }
  60. public java.lang.String getUri() { return uri_; }
  61. // optional string title = 2;
  62. public static final int TITLE_FIELD_NUMBER = 2;
  63. private boolean hasTitle;
  64. private java.lang.String title_ = "";
  65. public boolean hasTitle() { return hasTitle; }
  66. public java.lang.String getTitle() { return title_; }
  67. // required int32 width = 3;
  68. public static final int WIDTH_FIELD_NUMBER = 3;
  69. private boolean hasWidth;
  70. private int width_ = 0;
  71. public boolean hasWidth() { return hasWidth; }
  72. public int getWidth() { return width_; }
  73. // required int32 height = 4;
  74. public static final int HEIGHT_FIELD_NUMBER = 4;
  75. private boolean hasHeight;
  76. private int height_ = 0;
  77. public boolean hasHeight() { return hasHeight; }
  78. public int getHeight() { return height_; }
  79. // required .serializers.protobuf.media.Image.Size size = 5;
  80. public static final int SIZE_FIELD_NUMBER = 5;
  81. private boolean hasSize;
  82. private com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.Size size_;
  83. public boolean hasSize() { return hasSize; }
  84. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.Size getSize() { return size_; }
  85. private void initFields() {
  86. size_ = com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.Size.SMALL;
  87. }
  88. public final boolean isInitialized() {
  89. if (!hasUri) return false;
  90. if (!hasWidth) return false;
  91. if (!hasHeight) return false;
  92. if (!hasSize) return false;
  93. return true;
  94. }
  95. public void writeTo(com.google.protobuf.CodedOutputStream output)
  96. throws java.io.IOException {
  97. getSerializedSize();
  98. if (hasUri()) {
  99. output.writeString(1, getUri());
  100. }
  101. if (hasTitle()) {
  102. output.writeString(2, getTitle());
  103. }
  104. if (hasWidth()) {
  105. output.writeInt32(3, getWidth());
  106. }
  107. if (hasHeight()) {
  108. output.writeInt32(4, getHeight());
  109. }
  110. if (hasSize()) {
  111. output.writeEnum(5, getSize().getNumber());
  112. }
  113. }
  114. private int memoizedSerializedSize = -1;
  115. public int getSerializedSize() {
  116. int size = memoizedSerializedSize;
  117. if (size != -1) return size;
  118. size = 0;
  119. if (hasUri()) {
  120. size += com.google.protobuf.CodedOutputStream
  121. .computeStringSize(1, getUri());
  122. }
  123. if (hasTitle()) {
  124. size += com.google.protobuf.CodedOutputStream
  125. .computeStringSize(2, getTitle());
  126. }
  127. if (hasWidth()) {
  128. size += com.google.protobuf.CodedOutputStream
  129. .computeInt32Size(3, getWidth());
  130. }
  131. if (hasHeight()) {
  132. size += com.google.protobuf.CodedOutputStream
  133. .computeInt32Size(4, getHeight());
  134. }
  135. if (hasSize()) {
  136. size += com.google.protobuf.CodedOutputStream
  137. .computeEnumSize(5, getSize().getNumber());
  138. }
  139. memoizedSerializedSize = size;
  140. return size;
  141. }
  142. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Image parseFrom(
  143. com.google.protobuf.ByteString data)
  144. throws com.google.protobuf.InvalidProtocolBufferException {
  145. return newBuilder().mergeFrom(data).buildParsed();
  146. }
  147. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Image parseFrom(
  148. com.google.protobuf.ByteString data,
  149. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  150. throws com.google.protobuf.InvalidProtocolBufferException {
  151. return newBuilder().mergeFrom(data, extensionRegistry)
  152. .buildParsed();
  153. }
  154. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Image parseFrom(byte[] data)
  155. throws com.google.protobuf.InvalidProtocolBufferException {
  156. return newBuilder().mergeFrom(data).buildParsed();
  157. }
  158. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Image parseFrom(
  159. byte[] data,
  160. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  161. throws com.google.protobuf.InvalidProtocolBufferException {
  162. return newBuilder().mergeFrom(data, extensionRegistry)
  163. .buildParsed();
  164. }
  165. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Image parseFrom(java.io.InputStream input)
  166. throws java.io.IOException {
  167. return newBuilder().mergeFrom(input).buildParsed();
  168. }
  169. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Image parseFrom(
  170. java.io.InputStream input,
  171. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  172. throws java.io.IOException {
  173. return newBuilder().mergeFrom(input, extensionRegistry)
  174. .buildParsed();
  175. }
  176. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Image parseDelimitedFrom(java.io.InputStream input)
  177. throws java.io.IOException {
  178. Builder builder = newBuilder();
  179. if (builder.mergeDelimitedFrom(input)) {
  180. return builder.buildParsed();
  181. } else {
  182. return null;
  183. }
  184. }
  185. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Image parseDelimitedFrom(
  186. java.io.InputStream input,
  187. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  188. throws java.io.IOException {
  189. Builder builder = newBuilder();
  190. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  191. return builder.buildParsed();
  192. } else {
  193. return null;
  194. }
  195. }
  196. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Image parseFrom(
  197. com.google.protobuf.CodedInputStream input)
  198. throws java.io.IOException {
  199. return newBuilder().mergeFrom(input).buildParsed();
  200. }
  201. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Image parseFrom(
  202. com.google.protobuf.CodedInputStream input,
  203. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  204. throws java.io.IOException {
  205. return newBuilder().mergeFrom(input, extensionRegistry)
  206. .buildParsed();
  207. }
  208. public static Builder newBuilder() { return Builder.create(); }
  209. public Builder newBuilderForType() { return newBuilder(); }
  210. public static Builder newBuilder(com.dyuproject.protostuff.benchmark.V2LiteMedia.Image prototype) {
  211. return newBuilder().mergeFrom(prototype);
  212. }
  213. public Builder toBuilder() { return newBuilder(this); }
  214. public static final class Builder extends
  215. com.google.protobuf.GeneratedMessageLite.Builder<
  216. com.dyuproject.protostuff.benchmark.V2LiteMedia.Image, Builder> {
  217. private com.dyuproject.protostuff.benchmark.V2LiteMedia.Image result;
  218. // Construct using com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.newBuilder()
  219. private Builder() {}
  220. private static Builder create() {
  221. Builder builder = new Builder();
  222. builder.result = new com.dyuproject.protostuff.benchmark.V2LiteMedia.Image();
  223. return builder;
  224. }
  225. protected com.dyuproject.protostuff.benchmark.V2LiteMedia.Image internalGetResult() {
  226. return result;
  227. }
  228. public Builder clear() {
  229. if (result == null) {
  230. throw new IllegalStateException(
  231. "Cannot call clear() after build().");
  232. }
  233. result = new com.dyuproject.protostuff.benchmark.V2LiteMedia.Image();
  234. return this;
  235. }
  236. public Builder clone() {
  237. return create().mergeFrom(result);
  238. }
  239. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Image getDefaultInstanceForType() {
  240. return com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.getDefaultInstance();
  241. }
  242. public boolean isInitialized() {
  243. return result.isInitialized();
  244. }
  245. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Image build() {
  246. if (result != null && !isInitialized()) {
  247. throw newUninitializedMessageException(result);
  248. }
  249. return buildPartial();
  250. }
  251. private com.dyuproject.protostuff.benchmark.V2LiteMedia.Image buildParsed()
  252. throws com.google.protobuf.InvalidProtocolBufferException {
  253. if (!isInitialized()) {
  254. throw newUninitializedMessageException(
  255. result).asInvalidProtocolBufferException();
  256. }
  257. return buildPartial();
  258. }
  259. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Image buildPartial() {
  260. if (result == null) {
  261. throw new IllegalStateException(
  262. "build() has already been called on this Builder.");
  263. }
  264. com.dyuproject.protostuff.benchmark.V2LiteMedia.Image returnMe = result;
  265. result = null;
  266. return returnMe;
  267. }
  268. public Builder mergeFrom(com.dyuproject.protostuff.benchmark.V2LiteMedia.Image other) {
  269. if (other == com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.getDefaultInstance()) return this;
  270. if (other.hasUri()) {
  271. setUri(other.getUri());
  272. }
  273. if (other.hasTitle()) {
  274. setTitle(other.getTitle());
  275. }
  276. if (other.hasWidth()) {
  277. setWidth(other.getWidth());
  278. }
  279. if (other.hasHeight()) {
  280. setHeight(other.getHeight());
  281. }
  282. if (other.hasSize()) {
  283. setSize(other.getSize());
  284. }
  285. return this;
  286. }
  287. public Builder mergeFrom(
  288. com.google.protobuf.CodedInputStream input,
  289. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  290. throws java.io.IOException {
  291. while (true) {
  292. int tag = input.readTag();
  293. switch (tag) {
  294. case 0:
  295. return this;
  296. default: {
  297. if (!parseUnknownField(input, extensionRegistry, tag)) {
  298. return this;
  299. }
  300. break;
  301. }
  302. case 10: {
  303. setUri(input.readString());
  304. break;
  305. }
  306. case 18: {
  307. setTitle(input.readString());
  308. break;
  309. }
  310. case 24: {
  311. setWidth(input.readInt32());
  312. break;
  313. }
  314. case 32: {
  315. setHeight(input.readInt32());
  316. break;
  317. }
  318. case 40: {
  319. int rawValue = input.readEnum();
  320. com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.Size value = com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.Size.valueOf(rawValue);
  321. if (value != null) {
  322. setSize(value);
  323. }
  324. break;
  325. }
  326. }
  327. }
  328. }
  329. // required string uri = 1;
  330. public boolean hasUri() {
  331. return result.hasUri();
  332. }
  333. public java.lang.String getUri() {
  334. return result.getUri();
  335. }
  336. public Builder setUri(java.lang.String value) {
  337. if (value == null) {
  338. throw new NullPointerException();
  339. }
  340. result.hasUri = true;
  341. result.uri_ = value;
  342. return this;
  343. }
  344. public Builder clearUri() {
  345. result.hasUri = false;
  346. result.uri_ = getDefaultInstance().getUri();
  347. return this;
  348. }
  349. // optional string title = 2;
  350. public boolean hasTitle() {
  351. return result.hasTitle();
  352. }
  353. public java.lang.String getTitle() {
  354. return result.getTitle();
  355. }
  356. public Builder setTitle(java.lang.String value) {
  357. if (value == null) {
  358. throw new NullPointerException();
  359. }
  360. result.hasTitle = true;
  361. result.title_ = value;
  362. return this;
  363. }
  364. public Builder clearTitle() {
  365. result.hasTitle = false;
  366. result.title_ = getDefaultInstance().getTitle();
  367. return this;
  368. }
  369. // required int32 width = 3;
  370. public boolean hasWidth() {
  371. return result.hasWidth();
  372. }
  373. public int getWidth() {
  374. return result.getWidth();
  375. }
  376. public Builder setWidth(int value) {
  377. result.hasWidth = true;
  378. result.width_ = value;
  379. return this;
  380. }
  381. public Builder clearWidth() {
  382. result.hasWidth = false;
  383. result.width_ = 0;
  384. return this;
  385. }
  386. // required int32 height = 4;
  387. public boolean hasHeight() {
  388. return result.hasHeight();
  389. }
  390. public int getHeight() {
  391. return result.getHeight();
  392. }
  393. public Builder setHeight(int value) {
  394. result.hasHeight = true;
  395. result.height_ = value;
  396. return this;
  397. }
  398. public Builder clearHeight() {
  399. result.hasHeight = false;
  400. result.height_ = 0;
  401. return this;
  402. }
  403. // required .serializers.protobuf.media.Image.Size size = 5;
  404. public boolean hasSize() {
  405. return result.hasSize();
  406. }
  407. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.Size getSize() {
  408. return result.getSize();
  409. }
  410. public Builder setSize(com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.Size value) {
  411. if (value == null) {
  412. throw new NullPointerException();
  413. }
  414. result.hasSize = true;
  415. result.size_ = value;
  416. return this;
  417. }
  418. public Builder clearSize() {
  419. result.hasSize = false;
  420. result.size_ = com.dyuproject.protostuff.benchmark.V2LiteMedia.Image.Size.SMALL;
  421. return this;
  422. }
  423. // @@protoc_insertion_point(builder_scope:serializers.protobuf.media.Image)
  424. }
  425. static {
  426. defaultInstance = new Image(true);
  427. com.dyuproject.protostuff.benchmark.V2LiteMedia.internalForceInit();
  428. defaultInstance.initFields();
  429. }
  430. // @@protoc_insertion_point(class_scope:serializers.protobuf.media.Image)
  431. }
  432. public static final class Media extends
  433. com.google.protobuf.GeneratedMessageLite {
  434. // Use Media.newBuilder() to construct.
  435. private Media() {
  436. initFields();
  437. }
  438. private Media(boolean noInit) {}
  439. private static final Media defaultInstance;
  440. public static Media getDefaultInstance() {
  441. return defaultInstance;
  442. }
  443. public Media getDefaultInstanceForType() {
  444. return defaultInstance;
  445. }
  446. public enum Player
  447. implements com.google.protobuf.Internal.EnumLite {
  448. JAVA(0, 0),
  449. FLASH(1, 1),
  450. ;
  451. public final int getNumber() { return value; }
  452. public static Player valueOf(int value) {
  453. switch (value) {
  454. case 0: return JAVA;
  455. case 1: return FLASH;
  456. default: return null;
  457. }
  458. }
  459. public static com.google.protobuf.Internal.EnumLiteMap<Player>
  460. internalGetValueMap() {
  461. return internalValueMap;
  462. }
  463. private static com.google.protobuf.Internal.EnumLiteMap<Player>
  464. internalValueMap =
  465. new com.google.protobuf.Internal.EnumLiteMap<Player>() {
  466. public Player findValueByNumber(int number) {
  467. return Player.valueOf(number)
  468. ; }
  469. };
  470. private final int index;
  471. private final int value;
  472. private Player(int index, int value) {
  473. this.index = index;
  474. this.value = value;
  475. }
  476. // @@protoc_insertion_point(enum_scope:serializers.protobuf.media.Media.Player)
  477. }
  478. // required string uri = 1;
  479. public static final int URI_FIELD_NUMBER = 1;
  480. private boolean hasUri;
  481. private java.lang.String uri_ = "";
  482. public boolean hasUri() { return hasUri; }
  483. public java.lang.String getUri() { return uri_; }
  484. // optional string title = 2;
  485. public static final int TITLE_FIELD_NUMBER = 2;
  486. private boolean hasTitle;
  487. private java.lang.String title_ = "";
  488. public boolean hasTitle() { return hasTitle; }
  489. public java.lang.String getTitle() { return title_; }
  490. // required int32 width = 3;
  491. public static final int WIDTH_FIELD_NUMBER = 3;
  492. private boolean hasWidth;
  493. private int width_ = 0;
  494. public boolean hasWidth() { return hasWidth; }
  495. public int getWidth() { return width_; }
  496. // required int32 height = 4;
  497. public static final int HEIGHT_FIELD_NUMBER = 4;
  498. private boolean hasHeight;
  499. private int height_ = 0;
  500. public boolean hasHeight() { return hasHeight; }
  501. public int getHeight() { return height_; }
  502. // required string format = 5;
  503. public static final int FORMAT_FIELD_NUMBER = 5;
  504. private boolean hasFormat;
  505. private java.lang.String format_ = "";
  506. public boolean hasFormat() { return hasFormat; }
  507. public java.lang.String getFormat() { return format_; }
  508. // required int64 duration = 6;
  509. public static final int DURATION_FIELD_NUMBER = 6;
  510. private boolean hasDuration;
  511. private long duration_ = 0L;
  512. public boolean hasDuration() { return hasDuration; }
  513. public long getDuration() { return duration_; }
  514. // required int64 size = 7;
  515. public static final int SIZE_FIELD_NUMBER = 7;
  516. private boolean hasSize;
  517. private long size_ = 0L;
  518. public boolean hasSize() { return hasSize; }
  519. public long getSize() { return size_; }
  520. // optional int32 bitrate = 8;
  521. public static final int BITRATE_FIELD_NUMBER = 8;
  522. private boolean hasBitrate;
  523. private int bitrate_ = 0;
  524. public boolean hasBitrate() { return hasBitrate; }
  525. public int getBitrate() { return bitrate_; }
  526. // repeated string person = 9;
  527. public static final int PERSON_FIELD_NUMBER = 9;
  528. private java.util.List<java.lang.String> person_ =
  529. java.util.Collections.emptyList();
  530. public java.util.List<java.lang.String> getPersonList() {
  531. return person_;
  532. }
  533. public int getPersonCount() { return person_.size(); }
  534. public java.lang.String getPerson(int index) {
  535. return person_.get(index);
  536. }
  537. // required .serializers.protobuf.media.Media.Player player = 10;
  538. public static final int PLAYER_FIELD_NUMBER = 10;
  539. private boolean hasPlayer;
  540. private com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.Player player_;
  541. public boolean hasPlayer() { return hasPlayer; }
  542. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.Player getPlayer() { return player_; }
  543. // optional string copyright = 11;
  544. public static final int COPYRIGHT_FIELD_NUMBER = 11;
  545. private boolean hasCopyright;
  546. private java.lang.String copyright_ = "";
  547. public boolean hasCopyright() { return hasCopyright; }
  548. public java.lang.String getCopyright() { return copyright_; }
  549. private void initFields() {
  550. player_ = com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.Player.JAVA;
  551. }
  552. public final boolean isInitialized() {
  553. if (!hasUri) return false;
  554. if (!hasWidth) return false;
  555. if (!hasHeight) return false;
  556. if (!hasFormat) return false;
  557. if (!hasDuration) return false;
  558. if (!hasSize) return false;
  559. if (!hasPlayer) return false;
  560. return true;
  561. }
  562. public void writeTo(com.google.protobuf.CodedOutputStream output)
  563. throws java.io.IOException {
  564. getSerializedSize();
  565. if (hasUri()) {
  566. output.writeString(1, getUri());
  567. }
  568. if (hasTitle()) {
  569. output.writeString(2, getTitle());
  570. }
  571. if (hasWidth()) {
  572. output.writeInt32(3, getWidth());
  573. }
  574. if (hasHeight()) {
  575. output.writeInt32(4, getHeight());
  576. }
  577. if (hasFormat()) {
  578. output.writeString(5, getFormat());
  579. }
  580. if (hasDuration()) {
  581. output.writeInt64(6, getDuration());
  582. }
  583. if (hasSize()) {
  584. output.writeInt64(7, getSize());
  585. }
  586. if (hasBitrate()) {
  587. output.writeInt32(8, getBitrate());
  588. }
  589. for (java.lang.String element : getPersonList()) {
  590. output.writeString(9, element);
  591. }
  592. if (hasPlayer()) {
  593. output.writeEnum(10, getPlayer().getNumber());
  594. }
  595. if (hasCopyright()) {
  596. output.writeString(11, getCopyright());
  597. }
  598. }
  599. private int memoizedSerializedSize = -1;
  600. public int getSerializedSize() {
  601. int size = memoizedSerializedSize;
  602. if (size != -1) return size;
  603. size = 0;
  604. if (hasUri()) {
  605. size += com.google.protobuf.CodedOutputStream
  606. .computeStringSize(1, getUri());
  607. }
  608. if (hasTitle()) {
  609. size += com.google.protobuf.CodedOutputStream
  610. .computeStringSize(2, getTitle());
  611. }
  612. if (hasWidth()) {
  613. size += com.google.protobuf.CodedOutputStream
  614. .computeInt32Size(3, getWidth());
  615. }
  616. if (hasHeight()) {
  617. size += com.google.protobuf.CodedOutputStream
  618. .computeInt32Size(4, getHeight());
  619. }
  620. if (hasFormat()) {
  621. size += com.google.protobuf.CodedOutputStream
  622. .computeStringSize(5, getFormat());
  623. }
  624. if (hasDuration()) {
  625. size += com.google.protobuf.CodedOutputStream
  626. .computeInt64Size(6, getDuration());
  627. }
  628. if (hasSize()) {
  629. size += com.google.protobuf.CodedOutputStream
  630. .computeInt64Size(7, getSize());
  631. }
  632. if (hasBitrate()) {
  633. size += com.google.protobuf.CodedOutputStream
  634. .computeInt32Size(8, getBitrate());
  635. }
  636. {
  637. int dataSize = 0;
  638. for (java.lang.String element : getPersonList()) {
  639. dataSize += com.google.protobuf.CodedOutputStream
  640. .computeStringSizeNoTag(element);
  641. }
  642. size += dataSize;
  643. size += 1 * getPersonList().size();
  644. }
  645. if (hasPlayer()) {
  646. size += com.google.protobuf.CodedOutputStream
  647. .computeEnumSize(10, getPlayer().getNumber());
  648. }
  649. if (hasCopyright()) {
  650. size += com.google.protobuf.CodedOutputStream
  651. .computeStringSize(11, getCopyright());
  652. }
  653. memoizedSerializedSize = size;
  654. return size;
  655. }
  656. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Media parseFrom(
  657. com.google.protobuf.ByteString data)
  658. throws com.google.protobuf.InvalidProtocolBufferException {
  659. return newBuilder().mergeFrom(data).buildParsed();
  660. }
  661. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Media parseFrom(
  662. com.google.protobuf.ByteString data,
  663. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  664. throws com.google.protobuf.InvalidProtocolBufferException {
  665. return newBuilder().mergeFrom(data, extensionRegistry)
  666. .buildParsed();
  667. }
  668. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Media parseFrom(byte[] data)
  669. throws com.google.protobuf.InvalidProtocolBufferException {
  670. return newBuilder().mergeFrom(data).buildParsed();
  671. }
  672. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Media parseFrom(
  673. byte[] data,
  674. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  675. throws com.google.protobuf.InvalidProtocolBufferException {
  676. return newBuilder().mergeFrom(data, extensionRegistry)
  677. .buildParsed();
  678. }
  679. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Media parseFrom(java.io.InputStream input)
  680. throws java.io.IOException {
  681. return newBuilder().mergeFrom(input).buildParsed();
  682. }
  683. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Media parseFrom(
  684. java.io.InputStream input,
  685. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  686. throws java.io.IOException {
  687. return newBuilder().mergeFrom(input, extensionRegistry)
  688. .buildParsed();
  689. }
  690. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Media parseDelimitedFrom(java.io.InputStream input)
  691. throws java.io.IOException {
  692. Builder builder = newBuilder();
  693. if (builder.mergeDelimitedFrom(input)) {
  694. return builder.buildParsed();
  695. } else {
  696. return null;
  697. }
  698. }
  699. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Media parseDelimitedFrom(
  700. java.io.InputStream input,
  701. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  702. throws java.io.IOException {
  703. Builder builder = newBuilder();
  704. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  705. return builder.buildParsed();
  706. } else {
  707. return null;
  708. }
  709. }
  710. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Media parseFrom(
  711. com.google.protobuf.CodedInputStream input)
  712. throws java.io.IOException {
  713. return newBuilder().mergeFrom(input).buildParsed();
  714. }
  715. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.Media parseFrom(
  716. com.google.protobuf.CodedInputStream input,
  717. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  718. throws java.io.IOException {
  719. return newBuilder().mergeFrom(input, extensionRegistry)
  720. .buildParsed();
  721. }
  722. public static Builder newBuilder() { return Builder.create(); }
  723. public Builder newBuilderForType() { return newBuilder(); }
  724. public static Builder newBuilder(com.dyuproject.protostuff.benchmark.V2LiteMedia.Media prototype) {
  725. return newBuilder().mergeFrom(prototype);
  726. }
  727. public Builder toBuilder() { return newBuilder(this); }
  728. public static final class Builder extends
  729. com.google.protobuf.GeneratedMessageLite.Builder<
  730. com.dyuproject.protostuff.benchmark.V2LiteMedia.Media, Builder> {
  731. private com.dyuproject.protostuff.benchmark.V2LiteMedia.Media result;
  732. // Construct using com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.newBuilder()
  733. private Builder() {}
  734. private static Builder create() {
  735. Builder builder = new Builder();
  736. builder.result = new com.dyuproject.protostuff.benchmark.V2LiteMedia.Media();
  737. return builder;
  738. }
  739. protected com.dyuproject.protostuff.benchmark.V2LiteMedia.Media internalGetResult() {
  740. return result;
  741. }
  742. public Builder clear() {
  743. if (result == null) {
  744. throw new IllegalStateException(
  745. "Cannot call clear() after build().");
  746. }
  747. result = new com.dyuproject.protostuff.benchmark.V2LiteMedia.Media();
  748. return this;
  749. }
  750. public Builder clone() {
  751. return create().mergeFrom(result);
  752. }
  753. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Media getDefaultInstanceForType() {
  754. return com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.getDefaultInstance();
  755. }
  756. public boolean isInitialized() {
  757. return result.isInitialized();
  758. }
  759. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Media build() {
  760. if (result != null && !isInitialized()) {
  761. throw newUninitializedMessageException(result);
  762. }
  763. return buildPartial();
  764. }
  765. private com.dyuproject.protostuff.benchmark.V2LiteMedia.Media buildParsed()
  766. throws com.google.protobuf.InvalidProtocolBufferException {
  767. if (!isInitialized()) {
  768. throw newUninitializedMessageException(
  769. result).asInvalidProtocolBufferException();
  770. }
  771. return buildPartial();
  772. }
  773. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Media buildPartial() {
  774. if (result == null) {
  775. throw new IllegalStateException(
  776. "build() has already been called on this Builder.");
  777. }
  778. if (result.person_ != java.util.Collections.EMPTY_LIST) {
  779. result.person_ =
  780. java.util.Collections.unmodifiableList(result.person_);
  781. }
  782. com.dyuproject.protostuff.benchmark.V2LiteMedia.Media returnMe = result;
  783. result = null;
  784. return returnMe;
  785. }
  786. public Builder mergeFrom(com.dyuproject.protostuff.benchmark.V2LiteMedia.Media other) {
  787. if (other == com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.getDefaultInstance()) return this;
  788. if (other.hasUri()) {
  789. setUri(other.getUri());
  790. }
  791. if (other.hasTitle()) {
  792. setTitle(other.getTitle());
  793. }
  794. if (other.hasWidth()) {
  795. setWidth(other.getWidth());
  796. }
  797. if (other.hasHeight()) {
  798. setHeight(other.getHeight());
  799. }
  800. if (other.hasFormat()) {
  801. setFormat(other.getFormat());
  802. }
  803. if (other.hasDuration()) {
  804. setDuration(other.getDuration());
  805. }
  806. if (other.hasSize()) {
  807. setSize(other.getSize());
  808. }
  809. if (other.hasBitrate()) {
  810. setBitrate(other.getBitrate());
  811. }
  812. if (!other.person_.isEmpty()) {
  813. if (result.person_.isEmpty()) {
  814. result.person_ = new java.util.ArrayList<java.lang.String>();
  815. }
  816. result.person_.addAll(other.person_);
  817. }
  818. if (other.hasPlayer()) {
  819. setPlayer(other.getPlayer());
  820. }
  821. if (other.hasCopyright()) {
  822. setCopyright(other.getCopyright());
  823. }
  824. return this;
  825. }
  826. public Builder mergeFrom(
  827. com.google.protobuf.CodedInputStream input,
  828. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  829. throws java.io.IOException {
  830. while (true) {
  831. int tag = input.readTag();
  832. switch (tag) {
  833. case 0:
  834. return this;
  835. default: {
  836. if (!parseUnknownField(input, extensionRegistry, tag)) {
  837. return this;
  838. }
  839. break;
  840. }
  841. case 10: {
  842. setUri(input.readString());
  843. break;
  844. }
  845. case 18: {
  846. setTitle(input.readString());
  847. break;
  848. }
  849. case 24: {
  850. setWidth(input.readInt32());
  851. break;
  852. }
  853. case 32: {
  854. setHeight(input.readInt32());
  855. break;
  856. }
  857. case 42: {
  858. setFormat(input.readString());
  859. break;
  860. }
  861. case 48: {
  862. setDuration(input.readInt64());
  863. break;
  864. }
  865. case 56: {
  866. setSize(input.readInt64());
  867. break;
  868. }
  869. case 64: {
  870. setBitrate(input.readInt32());
  871. break;
  872. }
  873. case 74: {
  874. addPerson(input.readString());
  875. break;
  876. }
  877. case 80: {
  878. int rawValue = input.readEnum();
  879. com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.Player value = com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.Player.valueOf(rawValue);
  880. if (value != null) {
  881. setPlayer(value);
  882. }
  883. break;
  884. }
  885. case 90: {
  886. setCopyright(input.readString());
  887. break;
  888. }
  889. }
  890. }
  891. }
  892. // required string uri = 1;
  893. public boolean hasUri() {
  894. return result.hasUri();
  895. }
  896. public java.lang.String getUri() {
  897. return result.getUri();
  898. }
  899. public Builder setUri(java.lang.String value) {
  900. if (value == null) {
  901. throw new NullPointerException();
  902. }
  903. result.hasUri = true;
  904. result.uri_ = value;
  905. return this;
  906. }
  907. public Builder clearUri() {
  908. result.hasUri = false;
  909. result.uri_ = getDefaultInstance().getUri();
  910. return this;
  911. }
  912. // optional string title = 2;
  913. public boolean hasTitle() {
  914. return result.hasTitle();
  915. }
  916. public java.lang.String getTitle() {
  917. return result.getTitle();
  918. }
  919. public Builder setTitle(java.lang.String value) {
  920. if (value == null) {
  921. throw new NullPointerException();
  922. }
  923. result.hasTitle = true;
  924. result.title_ = value;
  925. return this;
  926. }
  927. public Builder clearTitle() {
  928. result.hasTitle = false;
  929. result.title_ = getDefaultInstance().getTitle();
  930. return this;
  931. }
  932. // required int32 width = 3;
  933. public boolean hasWidth() {
  934. return result.hasWidth();
  935. }
  936. public int getWidth() {
  937. return result.getWidth();
  938. }
  939. public Builder setWidth(int value) {
  940. result.hasWidth = true;
  941. result.width_ = value;
  942. return this;
  943. }
  944. public Builder clearWidth() {
  945. result.hasWidth = false;
  946. result.width_ = 0;
  947. return this;
  948. }
  949. // required int32 height = 4;
  950. public boolean hasHeight() {
  951. return result.hasHeight();
  952. }
  953. public int getHeight() {
  954. return result.getHeight();
  955. }
  956. public Builder setHeight(int value) {
  957. result.hasHeight = true;
  958. result.height_ = value;
  959. return this;
  960. }
  961. public Builder clearHeight() {
  962. result.hasHeight = false;
  963. result.height_ = 0;
  964. return this;
  965. }
  966. // required string format = 5;
  967. public boolean hasFormat() {
  968. return result.hasFormat();
  969. }
  970. public java.lang.String getFormat() {
  971. return result.getFormat();
  972. }
  973. public Builder setFormat(java.lang.String value) {
  974. if (value == null) {
  975. throw new NullPointerException();
  976. }
  977. result.hasFormat = true;
  978. result.format_ = value;
  979. return this;
  980. }
  981. public Builder clearFormat() {
  982. result.hasFormat = false;
  983. result.format_ = getDefaultInstance().getFormat();
  984. return this;
  985. }
  986. // required int64 duration = 6;
  987. public boolean hasDuration() {
  988. return result.hasDuration();
  989. }
  990. public long getDuration() {
  991. return result.getDuration();
  992. }
  993. public Builder setDuration(long value) {
  994. result.hasDuration = true;
  995. result.duration_ = value;
  996. return this;
  997. }
  998. public Builder clearDuration() {
  999. result.hasDuration = false;
  1000. result.duration_ = 0L;
  1001. return this;
  1002. }
  1003. // required int64 size = 7;
  1004. public boolean hasSize() {
  1005. return result.hasSize();
  1006. }
  1007. public long getSize() {
  1008. return result.getSize();
  1009. }
  1010. public Builder setSize(long value) {
  1011. result.hasSize = true;
  1012. result.size_ = value;
  1013. return this;
  1014. }
  1015. public Builder clearSize() {
  1016. result.hasSize = false;
  1017. result.size_ = 0L;
  1018. return this;
  1019. }
  1020. // optional int32 bitrate = 8;
  1021. public boolean hasBitrate() {
  1022. return result.hasBitrate();
  1023. }
  1024. public int getBitrate() {
  1025. return result.getBitrate();
  1026. }
  1027. public Builder setBitrate(int value) {
  1028. result.hasBitrate = true;
  1029. result.bitrate_ = value;
  1030. return this;
  1031. }
  1032. public Builder clearBitrate() {
  1033. result.hasBitrate = false;
  1034. result.bitrate_ = 0;
  1035. return this;
  1036. }
  1037. // repeated string person = 9;
  1038. public java.util.List<java.lang.String> getPersonList() {
  1039. return java.util.Collections.unmodifiableList(result.person_);
  1040. }
  1041. public int getPersonCount() {
  1042. return result.getPersonCount();
  1043. }
  1044. public java.lang.String getPerson(int index) {
  1045. return result.getPerson(index);
  1046. }
  1047. public Builder setPerson(int index, java.lang.String value) {
  1048. if (value == null) {
  1049. throw new NullPointerException();
  1050. }
  1051. result.person_.set(index, value);
  1052. return this;
  1053. }
  1054. public Builder addPerson(java.lang.String value) {
  1055. if (value == null) {
  1056. throw new NullPointerException();
  1057. }
  1058. if (result.person_.isEmpty()) {
  1059. result.person_ = new java.util.ArrayList<java.lang.String>();
  1060. }
  1061. result.person_.add(value);
  1062. return this;
  1063. }
  1064. public Builder addAllPerson(
  1065. java.lang.Iterable<? extends java.lang.String> values) {
  1066. if (result.person_.isEmpty()) {
  1067. result.person_ = new java.util.ArrayList<java.lang.String>();
  1068. }
  1069. super.addAll(values, result.person_);
  1070. return this;
  1071. }
  1072. public Builder clearPerson() {
  1073. result.person_ = java.util.Collections.emptyList();
  1074. return this;
  1075. }
  1076. // required .serializers.protobuf.media.Media.Player player = 10;
  1077. public boolean hasPlayer() {
  1078. return result.hasPlayer();
  1079. }
  1080. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.Player getPlayer() {
  1081. return result.getPlayer();
  1082. }
  1083. public Builder setPlayer(com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.Player value) {
  1084. if (value == null) {
  1085. throw new NullPointerException();
  1086. }
  1087. result.hasPlayer = true;
  1088. result.player_ = value;
  1089. return this;
  1090. }
  1091. public Builder clearPlayer() {
  1092. result.hasPlayer = false;
  1093. result.player_ = com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.Player.JAVA;
  1094. return this;
  1095. }
  1096. // optional string copyright = 11;
  1097. public boolean hasCopyright() {
  1098. return result.hasCopyright();
  1099. }
  1100. public java.lang.String getCopyright() {
  1101. return result.getCopyright();
  1102. }
  1103. public Builder setCopyright(java.lang.String value) {
  1104. if (value == null) {
  1105. throw new NullPointerException();
  1106. }
  1107. result.hasCopyright = true;
  1108. result.copyright_ = value;
  1109. return this;
  1110. }
  1111. public Builder clearCopyright() {
  1112. result.hasCopyright = false;
  1113. result.copyright_ = getDefaultInstance().getCopyright();
  1114. return this;
  1115. }
  1116. // @@protoc_insertion_point(builder_scope:serializers.protobuf.media.Media)
  1117. }
  1118. static {
  1119. defaultInstance = new Media(true);
  1120. com.dyuproject.protostuff.benchmark.V2LiteMedia.internalForceInit();
  1121. defaultInstance.initFields();
  1122. }
  1123. // @@protoc_insertion_point(class_scope:serializers.protobuf.media.Media)
  1124. }
  1125. public static final class MediaContent extends
  1126. com.google.protobuf.GeneratedMessageLite {
  1127. // Use MediaContent.newBuilder() to construct.
  1128. private MediaContent() {
  1129. initFields();
  1130. }
  1131. private MediaContent(boolean noInit) {}
  1132. private static final MediaContent defaultInstance;
  1133. public static MediaContent getDefaultInstance() {
  1134. return defaultInstance;
  1135. }
  1136. public MediaContent getDefaultInstanceForType() {
  1137. return defaultInstance;
  1138. }
  1139. // repeated .serializers.protobuf.media.Image image = 1;
  1140. public static final int IMAGE_FIELD_NUMBER = 1;
  1141. private java.util.List<com.dyuproject.protostuff.benchmark.V2LiteMedia.Image> image_ =
  1142. java.util.Collections.emptyList();
  1143. public java.util.List<com.dyuproject.protostuff.benchmark.V2LiteMedia.Image> getImageList() {
  1144. return image_;
  1145. }
  1146. public int getImageCount() { return image_.size(); }
  1147. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Image getImage(int index) {
  1148. return image_.get(index);
  1149. }
  1150. // required .serializers.protobuf.media.Media media = 2;
  1151. public static final int MEDIA_FIELD_NUMBER = 2;
  1152. private boolean hasMedia;
  1153. private com.dyuproject.protostuff.benchmark.V2LiteMedia.Media media_;
  1154. public boolean hasMedia() { return hasMedia; }
  1155. public com.dyuproject.protostuff.benchmark.V2LiteMedia.Media getMedia() { return media_; }
  1156. private void initFields() {
  1157. media_ = com.dyuproject.protostuff.benchmark.V2LiteMedia.Media.getDefaultInstance();
  1158. }
  1159. public final boolean isInitialized() {
  1160. if (!hasMedia) return false;
  1161. for (com.dyuproject.protostuff.benchmark.V2LiteMedia.Image element : getImageList()) {
  1162. if (!element.isInitialized()) return false;
  1163. }
  1164. if (!getMedia().isInitialized()) return false;
  1165. return true;
  1166. }
  1167. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1168. throws java.io.IOException {
  1169. getSerializedSize();
  1170. for (com.dyuproject.protostuff.benchmark.V2LiteMedia.Image element : getImageList()) {
  1171. output.writeMessage(1, element);
  1172. }
  1173. if (hasMedia()) {
  1174. output.writeMessage(2, getMedia());
  1175. }
  1176. }
  1177. private int memoizedSerializedSize = -1;
  1178. public int getSerializedSize() {
  1179. int size = memoizedSerializedSize;
  1180. if (size != -1) return size;
  1181. size = 0;
  1182. for (com.dyuproject.protostuff.benchmark.V2LiteMedia.Image element : getImageList()) {
  1183. size += com.google.protobuf.CodedOutputStream
  1184. .computeMessageSize(1, element);
  1185. }
  1186. if (hasMedia()) {
  1187. size += com.google.protobuf.CodedOutputStream
  1188. .computeMessageSize(2, getMedia());
  1189. }
  1190. memoizedSerializedSize = size;
  1191. return size;
  1192. }
  1193. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent parseFrom(
  1194. com.google.protobuf.ByteString data)
  1195. throws com.google.protobuf.InvalidProtocolBufferException {
  1196. return newBuilder().mergeFrom(data).buildParsed();
  1197. }
  1198. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent parseFrom(
  1199. com.google.protobuf.ByteString data,
  1200. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1201. throws com.google.protobuf.InvalidProtocolBufferException {
  1202. return newBuilder().mergeFrom(data, extensionRegistry)
  1203. .buildParsed();
  1204. }
  1205. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent parseFrom(byte[] data)
  1206. throws com.google.protobuf.InvalidProtocolBufferException {
  1207. return newBuilder().mergeFrom(data).buildParsed();
  1208. }
  1209. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent parseFrom(
  1210. byte[] data,
  1211. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1212. throws com.google.protobuf.InvalidProtocolBufferException {
  1213. return newBuilder().mergeFrom(data, extensionRegistry)
  1214. .buildParsed();
  1215. }
  1216. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent parseFrom(java.io.InputStream input)
  1217. throws java.io.IOException {
  1218. return newBuilder().mergeFrom(input).buildParsed();
  1219. }
  1220. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent parseFrom(
  1221. java.io.InputStream input,
  1222. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1223. throws java.io.IOException {
  1224. return newBuilder().mergeFrom(input, extensionRegistry)
  1225. .buildParsed();
  1226. }
  1227. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent parseDelimitedFrom(java.io.InputStream input)
  1228. throws java.io.IOException {
  1229. Builder builder = newBuilder();
  1230. if (builder.mergeDelimitedFrom(input)) {
  1231. return builder.buildParsed();
  1232. } else {
  1233. return null;
  1234. }
  1235. }
  1236. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent parseDelimitedFrom(
  1237. java.io.InputStream input,
  1238. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1239. throws java.io.IOException {
  1240. Builder builder = newBuilder();
  1241. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1242. return builder.buildParsed();
  1243. } else {
  1244. return null;
  1245. }
  1246. }
  1247. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent parseFrom(
  1248. com.google.protobuf.CodedInputStream input)
  1249. throws java.io.IOException {
  1250. return newBuilder().mergeFrom(input).buildParsed();
  1251. }
  1252. public static com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent parseFrom(
  1253. com.google.protobuf.CodedInputStream input,
  1254. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1255. throws java.io.IOException {
  1256. return newBuilder().mergeFrom(input, extensionRegistry)
  1257. .buildParsed();
  1258. }
  1259. public static Builder newBuilder() { return Builder.create(); }
  1260. public Builder newBuilderForType() { return newBuilder(); }
  1261. public static Builder newBuilder(com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent prototype) {
  1262. return newBuilder().mergeFrom(prototype);
  1263. }
  1264. public Builder toBuilder() { return newBuilder(this); }
  1265. public static final class Builder extends
  1266. com.google.protobuf.GeneratedMessageLite.Builder<
  1267. com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent, Builder> {
  1268. private com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent result;
  1269. // Construct using com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent.newBuilder()
  1270. private Builder() {}
  1271. private static Builder create() {
  1272. Builder builder = new Builder();
  1273. builder.result = new com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent();
  1274. return builder;
  1275. }
  1276. protected com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent internalGetResult() {
  1277. return result;
  1278. }
  1279. public Builder clear() {
  1280. if (result == null) {
  1281. throw new IllegalStateException(
  1282. "Cannot call clear() after build().");
  1283. }
  1284. result = new com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent();
  1285. return this;
  1286. }
  1287. public Builder clone() {
  1288. return create().mergeFrom(result);
  1289. }
  1290. public com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent getDefaultInstanceForType() {
  1291. return com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent.getDefaultInstance();
  1292. }
  1293. public boolean isInitialized() {
  1294. return result.isInitialized();
  1295. }
  1296. public com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent build() {
  1297. if (result != null && !isInitialized()) {
  1298. throw newUninitializedMessageException(result);
  1299. }
  1300. return buildPartial();
  1301. }
  1302. private com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent buildParsed()
  1303. throws com.google.protobuf.InvalidProtocolBufferException {
  1304. if (!isInitialized()) {
  1305. throw newUninitializedMessageException(
  1306. result).asInvalidProtocolBufferException();
  1307. }
  1308. return buildPartial();
  1309. }
  1310. public com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent buildPartial() {
  1311. if (result == null) {
  1312. throw new IllegalStateException(
  1313. "build() has already been called on this Builder.");
  1314. }
  1315. if (result.image_ != java.util.Collections.EMPTY_LIST) {
  1316. result.image_ =
  1317. java.util.Collections.unmodifiableList(result.image_);
  1318. }
  1319. com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent returnMe = result;
  1320. result = null;
  1321. return returnMe;
  1322. }
  1323. public Builder mergeFrom(com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent other) {
  1324. if (other == com.dyuproject.protostuff.benchmark.V2LiteMedia.MediaContent.getDefaultInstance()) return this;
  1325. if (!other.image_.isEmpty()) {
  1326. if (result.image_.isEmpty()) {
  1327. result.image_ = new java.util.ArrayList<com.dyuproject.protostuff.benchmark.V2LiteMedia.Image>();
  1328. }
  1329. result.image_.addAll(other.image_);
  1330. }
  1331. if (other.hasMedia()) {
  1332. mergeMedia(other.getMedia());
  1333. }
  1334. return this;
  1335. }
  1336. public Builder mergeFrom(
  1337. com.google.protobuf.CodedInputStream input,
  1338. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1339. throws java.io.IOException {
  1340. while (true) {
  1341. int tag = input.readTag();
  1342. switch (tag) {
  1343. case 0:
  1344. return t

Large files files are truncated, but you can click here to view the full file