PageRenderTime 57ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

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

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

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