/protostuff-benchmark/src/main/java/com/dyuproject/protostuff/benchmark/V2SpeedMedia.java
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
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: src/main/resources/media.proto
- package com.dyuproject.protostuff.benchmark;
- public final class V2SpeedMedia {
- private V2SpeedMedia() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public static final class Image extends
- com.google.protobuf.GeneratedMessage {
- // Use Image.newBuilder() to construct.
- private Image() {
- initFields();
- }
- private Image(boolean noInit) {}
-
- private static final Image defaultInstance;
- public static Image getDefaultInstance() {
- return defaultInstance;
- }
-
- public Image getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.internal_static_serializers_protobuf_media_Image_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.internal_static_serializers_protobuf_media_Image_fieldAccessorTable;
- }
-
- public enum Size
- implements com.google.protobuf.ProtocolMessageEnum {
- SMALL(0, 0),
- LARGE(1, 1),
- ;
-
-
- public final int getNumber() { return value; }
-
- public static Size valueOf(int value) {
- switch (value) {
- case 0: return SMALL;
- case 1: return LARGE;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<Size>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static com.google.protobuf.Internal.EnumLiteMap<Size>
- internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<Size>() {
- public Size findValueByNumber(int number) {
- return Size.valueOf(number)
- ; }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(index);
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final Size[] VALUES = {
- SMALL, LARGE,
- };
- public static Size valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- return VALUES[desc.getIndex()];
- }
- private final int index;
- private final int value;
- private Size(int index, int value) {
- this.index = index;
- this.value = value;
- }
-
- static {
- com.dyuproject.protostuff.benchmark.V2SpeedMedia.getDescriptor();
- }
-
- // @@protoc_insertion_point(enum_scope:serializers.protobuf.media.Image.Size)
- }
-
- // required string uri = 1;
- public static final int URI_FIELD_NUMBER = 1;
- private boolean hasUri;
- private java.lang.String uri_ = "";
- public boolean hasUri() { return hasUri; }
- public java.lang.String getUri() { return uri_; }
-
- // optional string title = 2;
- public static final int TITLE_FIELD_NUMBER = 2;
- private boolean hasTitle;
- private java.lang.String title_ = "";
- public boolean hasTitle() { return hasTitle; }
- public java.lang.String getTitle() { return title_; }
-
- // required int32 width = 3;
- public static final int WIDTH_FIELD_NUMBER = 3;
- private boolean hasWidth;
- private int width_ = 0;
- public boolean hasWidth() { return hasWidth; }
- public int getWidth() { return width_; }
-
- // required int32 height = 4;
- public static final int HEIGHT_FIELD_NUMBER = 4;
- private boolean hasHeight;
- private int height_ = 0;
- public boolean hasHeight() { return hasHeight; }
- public int getHeight() { return height_; }
-
- // required .serializers.protobuf.media.Image.Size size = 5;
- public static final int SIZE_FIELD_NUMBER = 5;
- private boolean hasSize;
- private com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.Size size_;
- public boolean hasSize() { return hasSize; }
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.Size getSize() { return size_; }
-
- private void initFields() {
- size_ = com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.Size.SMALL;
- }
- public final boolean isInitialized() {
- if (!hasUri) return false;
- if (!hasWidth) return false;
- if (!hasHeight) return false;
- if (!hasSize) return false;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasUri()) {
- output.writeString(1, getUri());
- }
- if (hasTitle()) {
- output.writeString(2, getTitle());
- }
- if (hasWidth()) {
- output.writeInt32(3, getWidth());
- }
- if (hasHeight()) {
- output.writeInt32(4, getHeight());
- }
- if (hasSize()) {
- output.writeEnum(5, getSize().getNumber());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasUri()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(1, getUri());
- }
- if (hasTitle()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(2, getTitle());
- }
- if (hasWidth()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(3, getWidth());
- }
- if (hasHeight()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(4, getHeight());
- }
- if (hasSize()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(5, getSize().getNumber());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image result;
-
- // Construct using com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image();
- return builder;
- }
-
- protected com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.getDescriptor();
- }
-
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image getDefaultInstanceForType() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image returnMe = result;
- result = null;
- return returnMe;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image) {
- return mergeFrom((com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image other) {
- if (other == com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.getDefaultInstance()) return this;
- if (other.hasUri()) {
- setUri(other.getUri());
- }
- if (other.hasTitle()) {
- setTitle(other.getTitle());
- }
- if (other.hasWidth()) {
- setWidth(other.getWidth());
- }
- if (other.hasHeight()) {
- setHeight(other.getHeight());
- }
- if (other.hasSize()) {
- setSize(other.getSize());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- setUri(input.readString());
- break;
- }
- case 18: {
- setTitle(input.readString());
- break;
- }
- case 24: {
- setWidth(input.readInt32());
- break;
- }
- case 32: {
- setHeight(input.readInt32());
- break;
- }
- case 40: {
- int rawValue = input.readEnum();
- com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.Size value = com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.Size.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(5, rawValue);
- } else {
- setSize(value);
- }
- break;
- }
- }
- }
- }
-
-
- // required string uri = 1;
- public boolean hasUri() {
- return result.hasUri();
- }
- public java.lang.String getUri() {
- return result.getUri();
- }
- public Builder setUri(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasUri = true;
- result.uri_ = value;
- return this;
- }
- public Builder clearUri() {
- result.hasUri = false;
- result.uri_ = getDefaultInstance().getUri();
- return this;
- }
-
- // optional string title = 2;
- public boolean hasTitle() {
- return result.hasTitle();
- }
- public java.lang.String getTitle() {
- return result.getTitle();
- }
- public Builder setTitle(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasTitle = true;
- result.title_ = value;
- return this;
- }
- public Builder clearTitle() {
- result.hasTitle = false;
- result.title_ = getDefaultInstance().getTitle();
- return this;
- }
-
- // required int32 width = 3;
- public boolean hasWidth() {
- return result.hasWidth();
- }
- public int getWidth() {
- return result.getWidth();
- }
- public Builder setWidth(int value) {
- result.hasWidth = true;
- result.width_ = value;
- return this;
- }
- public Builder clearWidth() {
- result.hasWidth = false;
- result.width_ = 0;
- return this;
- }
-
- // required int32 height = 4;
- public boolean hasHeight() {
- return result.hasHeight();
- }
- public int getHeight() {
- return result.getHeight();
- }
- public Builder setHeight(int value) {
- result.hasHeight = true;
- result.height_ = value;
- return this;
- }
- public Builder clearHeight() {
- result.hasHeight = false;
- result.height_ = 0;
- return this;
- }
-
- // required .serializers.protobuf.media.Image.Size size = 5;
- public boolean hasSize() {
- return result.hasSize();
- }
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.Size getSize() {
- return result.getSize();
- }
- public Builder setSize(com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.Size value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasSize = true;
- result.size_ = value;
- return this;
- }
- public Builder clearSize() {
- result.hasSize = false;
- result.size_ = com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image.Size.SMALL;
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:serializers.protobuf.media.Image)
- }
-
- static {
- defaultInstance = new Image(true);
- com.dyuproject.protostuff.benchmark.V2SpeedMedia.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:serializers.protobuf.media.Image)
- }
-
- public static final class Media extends
- com.google.protobuf.GeneratedMessage {
- // Use Media.newBuilder() to construct.
- private Media() {
- initFields();
- }
- private Media(boolean noInit) {}
-
- private static final Media defaultInstance;
- public static Media getDefaultInstance() {
- return defaultInstance;
- }
-
- public Media getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.internal_static_serializers_protobuf_media_Media_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.internal_static_serializers_protobuf_media_Media_fieldAccessorTable;
- }
-
- public enum Player
- implements com.google.protobuf.ProtocolMessageEnum {
- JAVA(0, 0),
- FLASH(1, 1),
- ;
-
-
- public final int getNumber() { return value; }
-
- public static Player valueOf(int value) {
- switch (value) {
- case 0: return JAVA;
- case 1: return FLASH;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<Player>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static com.google.protobuf.Internal.EnumLiteMap<Player>
- internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<Player>() {
- public Player findValueByNumber(int number) {
- return Player.valueOf(number)
- ; }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(index);
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final Player[] VALUES = {
- JAVA, FLASH,
- };
- public static Player valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- return VALUES[desc.getIndex()];
- }
- private final int index;
- private final int value;
- private Player(int index, int value) {
- this.index = index;
- this.value = value;
- }
-
- static {
- com.dyuproject.protostuff.benchmark.V2SpeedMedia.getDescriptor();
- }
-
- // @@protoc_insertion_point(enum_scope:serializers.protobuf.media.Media.Player)
- }
-
- // required string uri = 1;
- public static final int URI_FIELD_NUMBER = 1;
- private boolean hasUri;
- private java.lang.String uri_ = "";
- public boolean hasUri() { return hasUri; }
- public java.lang.String getUri() { return uri_; }
-
- // optional string title = 2;
- public static final int TITLE_FIELD_NUMBER = 2;
- private boolean hasTitle;
- private java.lang.String title_ = "";
- public boolean hasTitle() { return hasTitle; }
- public java.lang.String getTitle() { return title_; }
-
- // required int32 width = 3;
- public static final int WIDTH_FIELD_NUMBER = 3;
- private boolean hasWidth;
- private int width_ = 0;
- public boolean hasWidth() { return hasWidth; }
- public int getWidth() { return width_; }
-
- // required int32 height = 4;
- public static final int HEIGHT_FIELD_NUMBER = 4;
- private boolean hasHeight;
- private int height_ = 0;
- public boolean hasHeight() { return hasHeight; }
- public int getHeight() { return height_; }
-
- // required string format = 5;
- public static final int FORMAT_FIELD_NUMBER = 5;
- private boolean hasFormat;
- private java.lang.String format_ = "";
- public boolean hasFormat() { return hasFormat; }
- public java.lang.String getFormat() { return format_; }
-
- // required int64 duration = 6;
- public static final int DURATION_FIELD_NUMBER = 6;
- private boolean hasDuration;
- private long duration_ = 0L;
- public boolean hasDuration() { return hasDuration; }
- public long getDuration() { return duration_; }
-
- // required int64 size = 7;
- public static final int SIZE_FIELD_NUMBER = 7;
- private boolean hasSize;
- private long size_ = 0L;
- public boolean hasSize() { return hasSize; }
- public long getSize() { return size_; }
-
- // optional int32 bitrate = 8;
- public static final int BITRATE_FIELD_NUMBER = 8;
- private boolean hasBitrate;
- private int bitrate_ = 0;
- public boolean hasBitrate() { return hasBitrate; }
- public int getBitrate() { return bitrate_; }
-
- // repeated string person = 9;
- public static final int PERSON_FIELD_NUMBER = 9;
- private java.util.List<java.lang.String> person_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.String> getPersonList() {
- return person_;
- }
- public int getPersonCount() { return person_.size(); }
- public java.lang.String getPerson(int index) {
- return person_.get(index);
- }
-
- // required .serializers.protobuf.media.Media.Player player = 10;
- public static final int PLAYER_FIELD_NUMBER = 10;
- private boolean hasPlayer;
- private com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.Player player_;
- public boolean hasPlayer() { return hasPlayer; }
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.Player getPlayer() { return player_; }
-
- // optional string copyright = 11;
- public static final int COPYRIGHT_FIELD_NUMBER = 11;
- private boolean hasCopyright;
- private java.lang.String copyright_ = "";
- public boolean hasCopyright() { return hasCopyright; }
- public java.lang.String getCopyright() { return copyright_; }
-
- private void initFields() {
- player_ = com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.Player.JAVA;
- }
- public final boolean isInitialized() {
- if (!hasUri) return false;
- if (!hasWidth) return false;
- if (!hasHeight) return false;
- if (!hasFormat) return false;
- if (!hasDuration) return false;
- if (!hasSize) return false;
- if (!hasPlayer) return false;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasUri()) {
- output.writeString(1, getUri());
- }
- if (hasTitle()) {
- output.writeString(2, getTitle());
- }
- if (hasWidth()) {
- output.writeInt32(3, getWidth());
- }
- if (hasHeight()) {
- output.writeInt32(4, getHeight());
- }
- if (hasFormat()) {
- output.writeString(5, getFormat());
- }
- if (hasDuration()) {
- output.writeInt64(6, getDuration());
- }
- if (hasSize()) {
- output.writeInt64(7, getSize());
- }
- if (hasBitrate()) {
- output.writeInt32(8, getBitrate());
- }
- for (java.lang.String element : getPersonList()) {
- output.writeString(9, element);
- }
- if (hasPlayer()) {
- output.writeEnum(10, getPlayer().getNumber());
- }
- if (hasCopyright()) {
- output.writeString(11, getCopyright());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasUri()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(1, getUri());
- }
- if (hasTitle()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(2, getTitle());
- }
- if (hasWidth()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(3, getWidth());
- }
- if (hasHeight()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(4, getHeight());
- }
- if (hasFormat()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(5, getFormat());
- }
- if (hasDuration()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(6, getDuration());
- }
- if (hasSize()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(7, getSize());
- }
- if (hasBitrate()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(8, getBitrate());
- }
- {
- int dataSize = 0;
- for (java.lang.String element : getPersonList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * getPersonList().size();
- }
- if (hasPlayer()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(10, getPlayer().getNumber());
- }
- if (hasCopyright()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(11, getCopyright());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media result;
-
- // Construct using com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media();
- return builder;
- }
-
- protected com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.getDescriptor();
- }
-
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media getDefaultInstanceForType() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.person_ != java.util.Collections.EMPTY_LIST) {
- result.person_ =
- java.util.Collections.unmodifiableList(result.person_);
- }
- com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media returnMe = result;
- result = null;
- return returnMe;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media) {
- return mergeFrom((com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media other) {
- if (other == com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.getDefaultInstance()) return this;
- if (other.hasUri()) {
- setUri(other.getUri());
- }
- if (other.hasTitle()) {
- setTitle(other.getTitle());
- }
- if (other.hasWidth()) {
- setWidth(other.getWidth());
- }
- if (other.hasHeight()) {
- setHeight(other.getHeight());
- }
- if (other.hasFormat()) {
- setFormat(other.getFormat());
- }
- if (other.hasDuration()) {
- setDuration(other.getDuration());
- }
- if (other.hasSize()) {
- setSize(other.getSize());
- }
- if (other.hasBitrate()) {
- setBitrate(other.getBitrate());
- }
- if (!other.person_.isEmpty()) {
- if (result.person_.isEmpty()) {
- result.person_ = new java.util.ArrayList<java.lang.String>();
- }
- result.person_.addAll(other.person_);
- }
- if (other.hasPlayer()) {
- setPlayer(other.getPlayer());
- }
- if (other.hasCopyright()) {
- setCopyright(other.getCopyright());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- setUri(input.readString());
- break;
- }
- case 18: {
- setTitle(input.readString());
- break;
- }
- case 24: {
- setWidth(input.readInt32());
- break;
- }
- case 32: {
- setHeight(input.readInt32());
- break;
- }
- case 42: {
- setFormat(input.readString());
- break;
- }
- case 48: {
- setDuration(input.readInt64());
- break;
- }
- case 56: {
- setSize(input.readInt64());
- break;
- }
- case 64: {
- setBitrate(input.readInt32());
- break;
- }
- case 74: {
- addPerson(input.readString());
- break;
- }
- case 80: {
- int rawValue = input.readEnum();
- com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.Player value = com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.Player.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(10, rawValue);
- } else {
- setPlayer(value);
- }
- break;
- }
- case 90: {
- setCopyright(input.readString());
- break;
- }
- }
- }
- }
-
-
- // required string uri = 1;
- public boolean hasUri() {
- return result.hasUri();
- }
- public java.lang.String getUri() {
- return result.getUri();
- }
- public Builder setUri(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasUri = true;
- result.uri_ = value;
- return this;
- }
- public Builder clearUri() {
- result.hasUri = false;
- result.uri_ = getDefaultInstance().getUri();
- return this;
- }
-
- // optional string title = 2;
- public boolean hasTitle() {
- return result.hasTitle();
- }
- public java.lang.String getTitle() {
- return result.getTitle();
- }
- public Builder setTitle(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasTitle = true;
- result.title_ = value;
- return this;
- }
- public Builder clearTitle() {
- result.hasTitle = false;
- result.title_ = getDefaultInstance().getTitle();
- return this;
- }
-
- // required int32 width = 3;
- public boolean hasWidth() {
- return result.hasWidth();
- }
- public int getWidth() {
- return result.getWidth();
- }
- public Builder setWidth(int value) {
- result.hasWidth = true;
- result.width_ = value;
- return this;
- }
- public Builder clearWidth() {
- result.hasWidth = false;
- result.width_ = 0;
- return this;
- }
-
- // required int32 height = 4;
- public boolean hasHeight() {
- return result.hasHeight();
- }
- public int getHeight() {
- return result.getHeight();
- }
- public Builder setHeight(int value) {
- result.hasHeight = true;
- result.height_ = value;
- return this;
- }
- public Builder clearHeight() {
- result.hasHeight = false;
- result.height_ = 0;
- return this;
- }
-
- // required string format = 5;
- public boolean hasFormat() {
- return result.hasFormat();
- }
- public java.lang.String getFormat() {
- return result.getFormat();
- }
- public Builder setFormat(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasFormat = true;
- result.format_ = value;
- return this;
- }
- public Builder clearFormat() {
- result.hasFormat = false;
- result.format_ = getDefaultInstance().getFormat();
- return this;
- }
-
- // required int64 duration = 6;
- public boolean hasDuration() {
- return result.hasDuration();
- }
- public long getDuration() {
- return result.getDuration();
- }
- public Builder setDuration(long value) {
- result.hasDuration = true;
- result.duration_ = value;
- return this;
- }
- public Builder clearDuration() {
- result.hasDuration = false;
- result.duration_ = 0L;
- return this;
- }
-
- // required int64 size = 7;
- public boolean hasSize() {
- return result.hasSize();
- }
- public long getSize() {
- return result.getSize();
- }
- public Builder setSize(long value) {
- result.hasSize = true;
- result.size_ = value;
- return this;
- }
- public Builder clearSize() {
- result.hasSize = false;
- result.size_ = 0L;
- return this;
- }
-
- // optional int32 bitrate = 8;
- public boolean hasBitrate() {
- return result.hasBitrate();
- }
- public int getBitrate() {
- return result.getBitrate();
- }
- public Builder setBitrate(int value) {
- result.hasBitrate = true;
- result.bitrate_ = value;
- return this;
- }
- public Builder clearBitrate() {
- result.hasBitrate = false;
- result.bitrate_ = 0;
- return this;
- }
-
- // repeated string person = 9;
- public java.util.List<java.lang.String> getPersonList() {
- return java.util.Collections.unmodifiableList(result.person_);
- }
- public int getPersonCount() {
- return result.getPersonCount();
- }
- public java.lang.String getPerson(int index) {
- return result.getPerson(index);
- }
- public Builder setPerson(int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.person_.set(index, value);
- return this;
- }
- public Builder addPerson(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.person_.isEmpty()) {
- result.person_ = new java.util.ArrayList<java.lang.String>();
- }
- result.person_.add(value);
- return this;
- }
- public Builder addAllPerson(
- java.lang.Iterable<? extends java.lang.String> values) {
- if (result.person_.isEmpty()) {
- result.person_ = new java.util.ArrayList<java.lang.String>();
- }
- super.addAll(values, result.person_);
- return this;
- }
- public Builder clearPerson() {
- result.person_ = java.util.Collections.emptyList();
- return this;
- }
-
- // required .serializers.protobuf.media.Media.Player player = 10;
- public boolean hasPlayer() {
- return result.hasPlayer();
- }
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.Player getPlayer() {
- return result.getPlayer();
- }
- public Builder setPlayer(com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.Player value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasPlayer = true;
- result.player_ = value;
- return this;
- }
- public Builder clearPlayer() {
- result.hasPlayer = false;
- result.player_ = com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.Player.JAVA;
- return this;
- }
-
- // optional string copyright = 11;
- public boolean hasCopyright() {
- return result.hasCopyright();
- }
- public java.lang.String getCopyright() {
- return result.getCopyright();
- }
- public Builder setCopyright(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasCopyright = true;
- result.copyright_ = value;
- return this;
- }
- public Builder clearCopyright() {
- result.hasCopyright = false;
- result.copyright_ = getDefaultInstance().getCopyright();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:serializers.protobuf.media.Media)
- }
-
- static {
- defaultInstance = new Media(true);
- com.dyuproject.protostuff.benchmark.V2SpeedMedia.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:serializers.protobuf.media.Media)
- }
-
- public static final class MediaContent extends
- com.google.protobuf.GeneratedMessage {
- // Use MediaContent.newBuilder() to construct.
- private MediaContent() {
- initFields();
- }
- private MediaContent(boolean noInit) {}
-
- private static final MediaContent defaultInstance;
- public static MediaContent getDefaultInstance() {
- return defaultInstance;
- }
-
- public MediaContent getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.internal_static_serializers_protobuf_media_MediaContent_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.dyuproject.protostuff.benchmark.V2SpeedMedia.internal_static_serializers_protobuf_media_MediaContent_fieldAccessorTable;
- }
-
- // repeated .serializers.protobuf.media.Image image = 1;
- public static final int IMAGE_FIELD_NUMBER = 1;
- private java.util.List<com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image> image_ =
- java.util.Collections.emptyList();
- public java.util.List<com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image> getImageList() {
- return image_;
- }
- public int getImageCount() { return image_.size(); }
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image getImage(int index) {
- return image_.get(index);
- }
-
- // required .serializers.protobuf.media.Media media = 2;
- public static final int MEDIA_FIELD_NUMBER = 2;
- private boolean hasMedia;
- private com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media media_;
- public boolean hasMedia() { return hasMedia; }
- public com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media getMedia() { return media_; }
-
- private void initFields() {
- media_ = com.dyuproject.protostuff.benchmark.V2SpeedMedia.Media.getDefaultInstance();
- }
- public final boolean isInitialized() {
- if (!hasMedia) return false;
- for (com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image element : getImageList()) {
- if (!element.isInitialized()) return false;
- }
- if (!getMedia().isInitialized()) return false;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- for (com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image element : getImageList()) {
- output.writeMessage(1, element);
- }
- if (hasMedia()) {
- output.writeMessage(2, getMedia());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- for (com.dyuproject.protostuff.benchmark.V2SpeedMedia.Image element : getImageList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, element);
- }
- if (hasMedia()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, getMedia());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.MediaContent parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.MediaContent parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.MediaContent parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.benchmark.V2SpeedMedia.MediaContent parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed(…
Large files files are truncated, but you can click here to view the full file