/protostuff-model/src/test/java/com/dyuproject/protostuff/model/V2CodeSize.java
Java | 1173 lines | 1027 code | 96 blank | 50 comment | 76 complexity | 09d7bf382f599e3ff22e5e9de63c320b MD5 | raw file
Possible License(s): Apache-2.0
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: src/test/resources/TestModel.proto
- package com.dyuproject.protostuff.model;
- public final class V2CodeSize {
- private V2CodeSize() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public static final class Person extends
- com.google.protobuf.GeneratedMessage {
- // Use Person.newBuilder() to construct.
- private Person() {
- initFields();
- }
- private Person(boolean noInit) {}
-
- private static final Person defaultInstance;
- public static Person getDefaultInstance() {
- return defaultInstance;
- }
-
- public Person getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.dyuproject.protostuff.model.V2CodeSize.internal_static_testmodel_Person_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.dyuproject.protostuff.model.V2CodeSize.internal_static_testmodel_Person_fieldAccessorTable;
- }
-
- // required int32 id = 1;
- public static final int ID_FIELD_NUMBER = 1;
- private boolean hasId;
- private int id_ = 0;
- public boolean hasId() { return hasId; }
- public int getId() { return id_; }
-
- // optional string email = 2;
- public static final int EMAIL_FIELD_NUMBER = 2;
- private boolean hasEmail;
- private java.lang.String email_ = "";
- public boolean hasEmail() { return hasEmail; }
- public java.lang.String getEmail() { return email_; }
-
- // optional string first_name = 3;
- public static final int FIRST_NAME_FIELD_NUMBER = 3;
- private boolean hasFirstName;
- private java.lang.String firstName_ = "";
- public boolean hasFirstName() { return hasFirstName; }
- public java.lang.String getFirstName() { return firstName_; }
-
- // optional string lastName = 4;
- public static final int LASTNAME_FIELD_NUMBER = 4;
- private boolean hasLastName;
- private java.lang.String lastName_ = "";
- public boolean hasLastName() { return hasLastName; }
- public java.lang.String getLastName() { return lastName_; }
-
- // repeated .testmodel.Task _delegated_task_ = 5;
- public static final int _DELEGATED_TASK__FIELD_NUMBER = 5;
- private java.util.List<com.dyuproject.protostuff.model.V2CodeSize.Task> DelegatedTask_ =
- java.util.Collections.emptyList();
- public java.util.List<com.dyuproject.protostuff.model.V2CodeSize.Task> getDelegatedTaskList() {
- return DelegatedTask_;
- }
- public int getDelegatedTaskCount() { return DelegatedTask_.size(); }
- public com.dyuproject.protostuff.model.V2CodeSize.Task getDelegatedTask(int index) {
- return DelegatedTask_.get(index);
- }
-
- // repeated .testmodel.Task _priorityTask_ = 6;
- public static final int _PRIORITYTASK__FIELD_NUMBER = 6;
- private java.util.List<com.dyuproject.protostuff.model.V2CodeSize.Task> PriorityTask_ =
- java.util.Collections.emptyList();
- public java.util.List<com.dyuproject.protostuff.model.V2CodeSize.Task> getPriorityTaskList() {
- return PriorityTask_;
- }
- public int getPriorityTaskCount() { return PriorityTask_.size(); }
- public com.dyuproject.protostuff.model.V2CodeSize.Task getPriorityTask(int index) {
- return PriorityTask_.get(index);
- }
-
- // optional int32 _aGe_ = 7;
- public static final int _AGE__FIELD_NUMBER = 7;
- private boolean hasAGe;
- private int AGe_ = 0;
- public boolean hasAGe() { return hasAGe; }
- public int getAGe() { return AGe_; }
-
- // optional .testmodel.Task currentTask = 8;
- public static final int CURRENTTASK_FIELD_NUMBER = 8;
- private boolean hasCurrentTask;
- private com.dyuproject.protostuff.model.V2CodeSize.Task currentTask_;
- public boolean hasCurrentTask() { return hasCurrentTask; }
- public com.dyuproject.protostuff.model.V2CodeSize.Task getCurrentTask() { return currentTask_; }
-
- // repeated int64 repeatedLong = 9;
- public static final int REPEATEDLONG_FIELD_NUMBER = 9;
- private java.util.List<java.lang.Long> repeatedLong_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.Long> getRepeatedLongList() {
- return repeatedLong_;
- }
- public int getRepeatedLongCount() { return repeatedLong_.size(); }
- public long getRepeatedLong(int index) {
- return repeatedLong_.get(index);
- }
-
- // repeated bytes image = 10;
- public static final int IMAGE_FIELD_NUMBER = 10;
- private java.util.List<com.google.protobuf.ByteString> image_ =
- java.util.Collections.emptyList();
- public java.util.List<com.google.protobuf.ByteString> getImageList() {
- return image_;
- }
- public int getImageCount() { return image_.size(); }
- public com.google.protobuf.ByteString getImage(int index) {
- return image_.get(index);
- }
-
- private void initFields() {
- currentTask_ = com.dyuproject.protostuff.model.V2CodeSize.Task.getDefaultInstance();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Person parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Person 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.model.V2CodeSize.Person parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Person parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Person parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Person 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.model.V2CodeSize.Person 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.model.V2CodeSize.Person 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.model.V2CodeSize.Person parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Person 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.model.V2CodeSize.Person 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.model.V2CodeSize.Person result;
-
- // Construct using com.dyuproject.protostuff.model.V2CodeSize.Person.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new com.dyuproject.protostuff.model.V2CodeSize.Person();
- return builder;
- }
-
- protected com.dyuproject.protostuff.model.V2CodeSize.Person internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new com.dyuproject.protostuff.model.V2CodeSize.Person();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.dyuproject.protostuff.model.V2CodeSize.Person.getDescriptor();
- }
-
- public com.dyuproject.protostuff.model.V2CodeSize.Person getDefaultInstanceForType() {
- return com.dyuproject.protostuff.model.V2CodeSize.Person.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public com.dyuproject.protostuff.model.V2CodeSize.Person build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private com.dyuproject.protostuff.model.V2CodeSize.Person buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public com.dyuproject.protostuff.model.V2CodeSize.Person buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.DelegatedTask_ != java.util.Collections.EMPTY_LIST) {
- result.DelegatedTask_ =
- java.util.Collections.unmodifiableList(result.DelegatedTask_);
- }
- if (result.PriorityTask_ != java.util.Collections.EMPTY_LIST) {
- result.PriorityTask_ =
- java.util.Collections.unmodifiableList(result.PriorityTask_);
- }
- if (result.repeatedLong_ != java.util.Collections.EMPTY_LIST) {
- result.repeatedLong_ =
- java.util.Collections.unmodifiableList(result.repeatedLong_);
- }
- if (result.image_ != java.util.Collections.EMPTY_LIST) {
- result.image_ =
- java.util.Collections.unmodifiableList(result.image_);
- }
- com.dyuproject.protostuff.model.V2CodeSize.Person returnMe = result;
- result = null;
- return returnMe;
- }
-
-
- // required int32 id = 1;
- public boolean hasId() {
- return result.hasId();
- }
- public int getId() {
- return result.getId();
- }
- public Builder setId(int value) {
- result.hasId = true;
- result.id_ = value;
- return this;
- }
- public Builder clearId() {
- result.hasId = false;
- result.id_ = 0;
- return this;
- }
-
- // optional string email = 2;
- public boolean hasEmail() {
- return result.hasEmail();
- }
- public java.lang.String getEmail() {
- return result.getEmail();
- }
- public Builder setEmail(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasEmail = true;
- result.email_ = value;
- return this;
- }
- public Builder clearEmail() {
- result.hasEmail = false;
- result.email_ = getDefaultInstance().getEmail();
- return this;
- }
-
- // optional string first_name = 3;
- public boolean hasFirstName() {
- return result.hasFirstName();
- }
- public java.lang.String getFirstName() {
- return result.getFirstName();
- }
- public Builder setFirstName(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasFirstName = true;
- result.firstName_ = value;
- return this;
- }
- public Builder clearFirstName() {
- result.hasFirstName = false;
- result.firstName_ = getDefaultInstance().getFirstName();
- return this;
- }
-
- // optional string lastName = 4;
- public boolean hasLastName() {
- return result.hasLastName();
- }
- public java.lang.String getLastName() {
- return result.getLastName();
- }
- public Builder setLastName(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasLastName = true;
- result.lastName_ = value;
- return this;
- }
- public Builder clearLastName() {
- result.hasLastName = false;
- result.lastName_ = getDefaultInstance().getLastName();
- return this;
- }
-
- // repeated .testmodel.Task _delegated_task_ = 5;
- public java.util.List<com.dyuproject.protostuff.model.V2CodeSize.Task> getDelegatedTaskList() {
- return java.util.Collections.unmodifiableList(result.DelegatedTask_);
- }
- public int getDelegatedTaskCount() {
- return result.getDelegatedTaskCount();
- }
- public com.dyuproject.protostuff.model.V2CodeSize.Task getDelegatedTask(int index) {
- return result.getDelegatedTask(index);
- }
- public Builder setDelegatedTask(int index, com.dyuproject.protostuff.model.V2CodeSize.Task value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.DelegatedTask_.set(index, value);
- return this;
- }
- public Builder setDelegatedTask(int index, com.dyuproject.protostuff.model.V2CodeSize.Task.Builder builderForValue) {
- result.DelegatedTask_.set(index, builderForValue.build());
- return this;
- }
- public Builder addDelegatedTask(com.dyuproject.protostuff.model.V2CodeSize.Task value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.DelegatedTask_.isEmpty()) {
- result.DelegatedTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2CodeSize.Task>();
- }
- result.DelegatedTask_.add(value);
- return this;
- }
- public Builder addDelegatedTask(com.dyuproject.protostuff.model.V2CodeSize.Task.Builder builderForValue) {
- if (result.DelegatedTask_.isEmpty()) {
- result.DelegatedTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2CodeSize.Task>();
- }
- result.DelegatedTask_.add(builderForValue.build());
- return this;
- }
- public Builder addAllDelegatedTask(
- java.lang.Iterable<? extends com.dyuproject.protostuff.model.V2CodeSize.Task> values) {
- if (result.DelegatedTask_.isEmpty()) {
- result.DelegatedTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2CodeSize.Task>();
- }
- super.addAll(values, result.DelegatedTask_);
- return this;
- }
- public Builder clearDelegatedTask() {
- result.DelegatedTask_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .testmodel.Task _priorityTask_ = 6;
- public java.util.List<com.dyuproject.protostuff.model.V2CodeSize.Task> getPriorityTaskList() {
- return java.util.Collections.unmodifiableList(result.PriorityTask_);
- }
- public int getPriorityTaskCount() {
- return result.getPriorityTaskCount();
- }
- public com.dyuproject.protostuff.model.V2CodeSize.Task getPriorityTask(int index) {
- return result.getPriorityTask(index);
- }
- public Builder setPriorityTask(int index, com.dyuproject.protostuff.model.V2CodeSize.Task value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.PriorityTask_.set(index, value);
- return this;
- }
- public Builder setPriorityTask(int index, com.dyuproject.protostuff.model.V2CodeSize.Task.Builder builderForValue) {
- result.PriorityTask_.set(index, builderForValue.build());
- return this;
- }
- public Builder addPriorityTask(com.dyuproject.protostuff.model.V2CodeSize.Task value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.PriorityTask_.isEmpty()) {
- result.PriorityTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2CodeSize.Task>();
- }
- result.PriorityTask_.add(value);
- return this;
- }
- public Builder addPriorityTask(com.dyuproject.protostuff.model.V2CodeSize.Task.Builder builderForValue) {
- if (result.PriorityTask_.isEmpty()) {
- result.PriorityTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2CodeSize.Task>();
- }
- result.PriorityTask_.add(builderForValue.build());
- return this;
- }
- public Builder addAllPriorityTask(
- java.lang.Iterable<? extends com.dyuproject.protostuff.model.V2CodeSize.Task> values) {
- if (result.PriorityTask_.isEmpty()) {
- result.PriorityTask_ = new java.util.ArrayList<com.dyuproject.protostuff.model.V2CodeSize.Task>();
- }
- super.addAll(values, result.PriorityTask_);
- return this;
- }
- public Builder clearPriorityTask() {
- result.PriorityTask_ = java.util.Collections.emptyList();
- return this;
- }
-
- // optional int32 _aGe_ = 7;
- public boolean hasAGe() {
- return result.hasAGe();
- }
- public int getAGe() {
- return result.getAGe();
- }
- public Builder setAGe(int value) {
- result.hasAGe = true;
- result.AGe_ = value;
- return this;
- }
- public Builder clearAGe() {
- result.hasAGe = false;
- result.AGe_ = 0;
- return this;
- }
-
- // optional .testmodel.Task currentTask = 8;
- public boolean hasCurrentTask() {
- return result.hasCurrentTask();
- }
- public com.dyuproject.protostuff.model.V2CodeSize.Task getCurrentTask() {
- return result.getCurrentTask();
- }
- public Builder setCurrentTask(com.dyuproject.protostuff.model.V2CodeSize.Task value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasCurrentTask = true;
- result.currentTask_ = value;
- return this;
- }
- public Builder setCurrentTask(com.dyuproject.protostuff.model.V2CodeSize.Task.Builder builderForValue) {
- result.hasCurrentTask = true;
- result.currentTask_ = builderForValue.build();
- return this;
- }
- public Builder mergeCurrentTask(com.dyuproject.protostuff.model.V2CodeSize.Task value) {
- if (result.hasCurrentTask() &&
- result.currentTask_ != com.dyuproject.protostuff.model.V2CodeSize.Task.getDefaultInstance()) {
- result.currentTask_ =
- com.dyuproject.protostuff.model.V2CodeSize.Task.newBuilder(result.currentTask_).mergeFrom(value).buildPartial();
- } else {
- result.currentTask_ = value;
- }
- result.hasCurrentTask = true;
- return this;
- }
- public Builder clearCurrentTask() {
- result.hasCurrentTask = false;
- result.currentTask_ = com.dyuproject.protostuff.model.V2CodeSize.Task.getDefaultInstance();
- return this;
- }
-
- // repeated int64 repeatedLong = 9;
- public java.util.List<java.lang.Long> getRepeatedLongList() {
- return java.util.Collections.unmodifiableList(result.repeatedLong_);
- }
- public int getRepeatedLongCount() {
- return result.getRepeatedLongCount();
- }
- public long getRepeatedLong(int index) {
- return result.getRepeatedLong(index);
- }
- public Builder setRepeatedLong(int index, long value) {
- result.repeatedLong_.set(index, value);
- return this;
- }
- public Builder addRepeatedLong(long value) {
- if (result.repeatedLong_.isEmpty()) {
- result.repeatedLong_ = new java.util.ArrayList<java.lang.Long>();
- }
- result.repeatedLong_.add(value);
- return this;
- }
- public Builder addAllRepeatedLong(
- java.lang.Iterable<? extends java.lang.Long> values) {
- if (result.repeatedLong_.isEmpty()) {
- result.repeatedLong_ = new java.util.ArrayList<java.lang.Long>();
- }
- super.addAll(values, result.repeatedLong_);
- return this;
- }
- public Builder clearRepeatedLong() {
- result.repeatedLong_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated bytes image = 10;
- public java.util.List<com.google.protobuf.ByteString> getImageList() {
- return java.util.Collections.unmodifiableList(result.image_);
- }
- public int getImageCount() {
- return result.getImageCount();
- }
- public com.google.protobuf.ByteString getImage(int index) {
- return result.getImage(index);
- }
- public Builder setImage(int index, com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.image_.set(index, value);
- return this;
- }
- public Builder addImage(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.image_.isEmpty()) {
- result.image_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
- }
- result.image_.add(value);
- return this;
- }
- public Builder addAllImage(
- java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
- if (result.image_.isEmpty()) {
- result.image_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
- }
- super.addAll(values, result.image_);
- return this;
- }
- public Builder clearImage() {
- result.image_ = java.util.Collections.emptyList();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:testmodel.Person)
- }
-
- static {
- defaultInstance = new Person(true);
- com.dyuproject.protostuff.model.V2CodeSize.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:testmodel.Person)
- }
-
- public static final class Task extends
- com.google.protobuf.GeneratedMessage {
- // Use Task.newBuilder() to construct.
- private Task() {
- initFields();
- }
- private Task(boolean noInit) {}
-
- private static final Task defaultInstance;
- public static Task getDefaultInstance() {
- return defaultInstance;
- }
-
- public Task getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.dyuproject.protostuff.model.V2CodeSize.internal_static_testmodel_Task_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.dyuproject.protostuff.model.V2CodeSize.internal_static_testmodel_Task_fieldAccessorTable;
- }
-
- public enum Status
- implements com.google.protobuf.ProtocolMessageEnum {
- PENDING(0, 0),
- STARTED(1, 1),
- COMPLETED(2, 2),
- ;
-
-
- public final int getNumber() { return value; }
-
- public static Status valueOf(int value) {
- switch (value) {
- case 0: return PENDING;
- case 1: return STARTED;
- case 2: return COMPLETED;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<Status>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static com.google.protobuf.Internal.EnumLiteMap<Status>
- internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<Status>() {
- public Status findValueByNumber(int number) {
- return Status.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.model.V2CodeSize.Task.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final Status[] VALUES = {
- PENDING, STARTED, COMPLETED,
- };
- public static Status 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 Status(int index, int value) {
- this.index = index;
- this.value = value;
- }
-
- static {
- com.dyuproject.protostuff.model.V2CodeSize.getDescriptor();
- }
-
- // @@protoc_insertion_point(enum_scope:testmodel.Task.Status)
- }
-
- // required int32 _id = 1;
- public static final int _ID_FIELD_NUMBER = 1;
- private boolean hasId;
- private int Id_ = 0;
- public boolean hasId() { return hasId; }
- public int getId() { return Id_; }
-
- // optional string name_ = 2;
- public static final int NAME__FIELD_NUMBER = 2;
- private boolean hasName;
- private java.lang.String name_ = "";
- public boolean hasName() { return hasName; }
- public java.lang.String getName() { return name_; }
-
- // optional string _description_ = 3;
- public static final int _DESCRIPTION__FIELD_NUMBER = 3;
- private boolean hasDescription;
- private java.lang.String Description_ = "";
- public boolean hasDescription() { return hasDescription; }
- public java.lang.String getDescription() { return Description_; }
-
- // optional .testmodel.Task.Status status = 4;
- public static final int STATUS_FIELD_NUMBER = 4;
- private boolean hasStatus;
- private com.dyuproject.protostuff.model.V2CodeSize.Task.Status status_;
- public boolean hasStatus() { return hasStatus; }
- public com.dyuproject.protostuff.model.V2CodeSize.Task.Status getStatus() { return status_; }
-
- // optional bytes attachment = 5;
- public static final int ATTACHMENT_FIELD_NUMBER = 5;
- private boolean hasAttachment;
- private com.google.protobuf.ByteString attachment_ = com.google.protobuf.ByteString.EMPTY;
- public boolean hasAttachment() { return hasAttachment; }
- public com.google.protobuf.ByteString getAttachment() { return attachment_; }
-
- // optional bool aboolean = 6;
- public static final int ABOOLEAN_FIELD_NUMBER = 6;
- private boolean hasAboolean;
- private boolean aboolean_ = false;
- public boolean hasAboolean() { return hasAboolean; }
- public boolean getAboolean() { return aboolean_; }
-
- // optional float afloat = 7;
- public static final int AFLOAT_FIELD_NUMBER = 7;
- private boolean hasAfloat;
- private float afloat_ = 0F;
- public boolean hasAfloat() { return hasAfloat; }
- public float getAfloat() { return afloat_; }
-
- // optional double adouble = 8;
- public static final int ADOUBLE_FIELD_NUMBER = 8;
- private boolean hasAdouble;
- private double adouble_ = 0D;
- public boolean hasAdouble() { return hasAdouble; }
- public double getAdouble() { return adouble_; }
-
- // optional int64 along = 9;
- public static final int ALONG_FIELD_NUMBER = 9;
- private boolean hasAlong;
- private long along_ = 0L;
- public boolean hasAlong() { return hasAlong; }
- public long getAlong() { return along_; }
-
- private void initFields() {
- status_ = com.dyuproject.protostuff.model.V2CodeSize.Task.Status.PENDING;
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Task parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Task 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.model.V2CodeSize.Task parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Task parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Task parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Task 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.model.V2CodeSize.Task 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.model.V2CodeSize.Task 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.model.V2CodeSize.Task parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.model.V2CodeSize.Task 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.model.V2CodeSize.Task 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.model.V2CodeSize.Task result;
-
- // Construct using com.dyuproject.protostuff.model.V2CodeSize.Task.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new com.dyuproject.protostuff.model.V2CodeSize.Task();
- return builder;
- }
-
- protected com.dyuproject.protostuff.model.V2CodeSize.Task internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new com.dyuproject.protostuff.model.V2CodeSize.Task();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.dyuproject.protostuff.model.V2CodeSize.Task.getDescriptor();
- }
-
- public com.dyuproject.protostuff.model.V2CodeSize.Task getDefaultInstanceForType() {
- return com.dyuproject.protostuff.model.V2CodeSize.Task.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public com.dyuproject.protostuff.model.V2CodeSize.Task build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private com.dyuproject.protostuff.model.V2CodeSize.Task buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public com.dyuproject.protostuff.model.V2CodeSize.Task buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- com.dyuproject.protostuff.model.V2CodeSize.Task returnMe = result;
- result = null;
- return returnMe;
- }
-
-
- // required int32 _id = 1;
- public boolean hasId() {
- return result.hasId();
- }
- public int getId() {
- return result.getId();
- }
- public Builder setId(int value) {
- result.hasId = true;
- result.Id_ = value;
- return this;
- }
- public Builder clearId() {
- result.hasId = false;
- result.Id_ = 0;
- return this;
- }
-
- // optional string name_ = 2;
- public boolean hasName() {
- return result.hasName();
- }
- public java.lang.String getName() {
- return result.getName();
- }
- public Builder setName(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasName = true;
- result.name_ = value;
- return this;
- }
- public Builder clearName() {
- result.hasName = false;
- result.name_ = getDefaultInstance().getName();
- return this;
- }
-
- // optional string _description_ = 3;
- public boolean hasDescription() {
- return result.hasDescription();
- }
- public java.lang.String getDescription() {
- return result.getDescription();
- }
- public Builder setDescription(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasDescription = true;
- result.Description_ = value;
- return this;
- }
- public Builder clearDescription() {
- result.hasDescription = false;
- result.Description_ = getDefaultInstance().getDescription();
- return this;
- }
-
- // optional .testmodel.Task.Status status = 4;
- public boolean hasStatus() {
- return result.hasStatus();
- }
- public com.dyuproject.protostuff.model.V2CodeSize.Task.Status getStatus() {
- return result.getStatus();
- }
- public Builder setStatus(com.dyuproject.protostuff.model.V2CodeSize.Task.Status value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasStatus = true;
- result.status_ = value;
- return this;
- }
- public Builder clearStatus() {
- result.hasStatus = false;
- result.status_ = com.dyuproject.protostuff.model.V2CodeSize.Task.Status.PENDING;
- return this;
- }
-
- // optional bytes attachment = 5;
- public boolean hasAttachment() {
- return result.hasAttachment();
- }
- public com.google.protobuf.ByteString getAttachment() {
- return result.getAttachment();
- }
- public Builder setAttachment(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasAttachment = true;
- result.attachment_ = value;
- return this;
- }
- public Builder clearAttachment() {
- result.hasAttachment = false;
- result.attachment_ = getDefaultInstance().getAttachment();
- return this;
- }
-
- // optional bool aboolean = 6;
- public boolean hasAboolean() {
- return result.hasAboolean();
- }
- public boolean getAboolean() {
- return result.getAboolean();
- }
- public Builder setAboolean(boolean value) {
- result.hasAboolean = true;
- result.aboolean_ = value;
- return this;
- }
- public Builder clearAboolean() {
- result.hasAboolean = false;
- result.aboolean_ = false;
- return this;
- }
-
- // optional float afloat = 7;
- public boolean hasAfloat() {
- return result.hasAfloat();
- }
- public float getAfloat() {
- return result.getAfloat();
- }
- public Builder setAfloat(float value) {
- result.hasAfloat = true;
- result.afloat_ = value;
- return this;
- }
- public Builder clearAfloat() {
- result.hasAfloat = false;
- result.afloat_ = 0F;
- return this;
- }
-
- // optional double adouble = 8;
- public boolean hasAdouble() {
- return result.hasAdouble();
- }
- public double getAdouble() {
- return result.getAdouble();
- }
- public Builder setAdouble(double value) {
- result.hasAdouble = true;
- result.adouble_ = value;
- return this;
- }
- public Builder clearAdouble() {
- result.hasAdouble = false;
- result.adouble_ = 0D;
- return this;
- }
-
- // optional int64 along = 9;
- public boolean hasAlong() {
- return result.hasAlong();
- }
- public long getAlong() {
- return result.getAlong();
- }
- public Builder setAlong(long value) {
- result.hasAlong = true;
- result.along_ = value;
- return this;
- }
- public Builder clearAlong() {
- result.hasAlong = false;
- result.along_ = 0L;
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:testmodel.Task)
- }
-
- static {
- defaultInstance = new Task(true);
- com.dyuproject.protostuff.model.V2CodeSize.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:testmodel.Task)
- }
-
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_testmodel_Person_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_testmodel_Person_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_testmodel_Task_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_testmodel_Task_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\"src/test/resources/TestModel.proto\022\tte" +
- "stmodel\"\367\001\n\006Person\022\n\n\002id\030\001 \002(\005\022\r\n\005email\030" +
- "\002 \001(\t\022\022\n\nfirst_name\030\003 \001(\t\022\020\n\010lastName\030\004 " +
- "\001(\t\022)\n\020_delegated_task_\030\005 \003(\0132\017.testmode" +
- "l.Task\022\'\n\016_priorityTask_\030\006 \003(\0132\017.testmod" +
- "el.Task\022\r\n\005_aGe_\030\007 \001(\005\022$\n\013currentTask\030\010 " +
- "\001(\0132\017.testmodel.Task\022\024\n\014repeatedLong\030\t \003" +
- "(\003\022\r\n\005image\030\n \003(\014\"\352\001\n\004Task\022\013\n\003_id\030\001 \002(\005\022" +
- "\r\n\005name_\030\002 \001(\t\022\025\n\r_description_\030\003 \001(\t\022&\n" +
- "\006status\030\004 \001(\0162\026.testmodel.Task.Status\022\022\n",
- "\nattachment\030\005 \001(\014\022\020\n\010aboolean\030\006 \001(\010\022\016\n\006a" +
- "float\030\007 \001(\002\022\017\n\007adouble\030\010 \001(\001\022\r\n\005along\030\t " +
- "\001(\003\"1\n\006Status\022\013\n\007PENDING\020\000\022\013\n\007STARTED\020\001\022" +
- "\r\n\tCOMPLETED\020\002B/\n\037com.dyuproject.protost" +
- "uff.modelB\nV2CodeSizeH\002"
- };
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- internal_static_testmodel_Person_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_testmodel_Person_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_testmodel_Person_descriptor,
- new java.lang.String[] { "Id", "Email", "FirstName", "LastName", "DelegatedTask", "PriorityTask", "AGe", "CurrentTask", "RepeatedLong", "Image", },
- com.dyuproject.protostuff.model.V2CodeSize.Person.class,
- com.dyuproject.protostuff.model.V2CodeSize.Person.Builder.class);
- internal_static_testmodel_Task_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_testmodel_Task_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_testmodel_Task_descriptor,
- new java.lang.String[] { "Id", "Name", "Description", "Status", "Attachment", "Aboolean", "Afloat", "Adouble", "Along", },
- com.dyuproject.protostuff.model.V2CodeSize.Task.class,
- com.dyuproject.protostuff.model.V2CodeSize.Task.Builder.class);
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
- }
-
- public static void internalForceInit() {}
-
- // @@protoc_insertion_point(outer_class_scope)
- }