// Generated by the protocol buffer compiler. DO NOT EDIT! // source: test.proto package proto; public final class Test { private Test() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } /** * Protobuf enum {@code proto.OrderStatus} */ public enum OrderStatus implements com.google.protobuf.ProtocolMessageEnum { /** *
*The first enum value must be zero in proto3. ** *
FIRST_VAL = 0;
*/
FIRST_VAL(0),
/**
* SECOND_VAL = 1;
*/
SECOND_VAL(1),
UNRECOGNIZED(-1),
;
/**
* *The first enum value must be zero in proto3. ** *
FIRST_VAL = 0;
*/
public static final int FIRST_VAL_VALUE = 0;
/**
* SECOND_VAL = 1;
*/
public static final int SECOND_VAL_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static OrderStatus valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static OrderStatus forNumber(int value) {
switch (value) {
case 0: return FIRST_VAL;
case 1: return SECOND_VAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapint64 id = 1;
* @return The id.
*/
long getId();
/**
* string no = 2;
* @return The no.
*/
java.lang.String getNo();
/**
* string no = 2;
* @return The bytes for no.
*/
com.google.protobuf.ByteString
getNoBytes();
/**
* string tel = 3;
* @return The tel.
*/
java.lang.String getTel();
/**
* string tel = 3;
* @return The bytes for tel.
*/
com.google.protobuf.ByteString
getTelBytes();
/**
* string address = 4;
* @return The address.
*/
java.lang.String getAddress();
/**
* string address = 4;
* @return The bytes for address.
*/
com.google.protobuf.ByteString
getAddressBytes();
/**
* string addTime = 5;
* @return The addTime.
*/
java.lang.String getAddTime();
/**
* string addTime = 5;
* @return The bytes for addTime.
*/
com.google.protobuf.ByteString
getAddTimeBytes();
/**
* .proto.OrderStatus status = 6;
* @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
* .proto.OrderStatus status = 6;
* @return The status.
*/
proto.Test.OrderStatus getStatus();
/**
* .proto.Order.Producets producets = 7;
* @return Whether the producets field is set.
*/
boolean hasProducets();
/**
* .proto.Order.Producets producets = 7;
* @return The producets.
*/
proto.Test.Order.Producets getProducets();
/**
* .proto.Order.Producets producets = 7;
*/
proto.Test.Order.ProducetsOrBuilder getProducetsOrBuilder();
}
/**
* *结构体 ** * Protobuf type {@code proto.Order} */ public static final class Order extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.Order) OrderOrBuilder { private static final long serialVersionUID = 0L; // Use Order.newBuilder() to construct. private Order(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private Order() { no_ = ""; tel_ = ""; address_ = ""; addTime_ = ""; status_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Order(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Order( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { id_ = input.readInt64(); break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); no_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); tel_ = s; break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); address_ = s; break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); addTime_ = s; break; } case 48: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 58: { proto.Test.Order.Producets.Builder subBuilder = null; if (producets_ != null) { subBuilder = producets_.toBuilder(); } producets_ = input.readMessage(proto.Test.Order.Producets.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(producets_); producets_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return proto.Test.internal_static_proto_Order_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return proto.Test.internal_static_proto_Order_fieldAccessorTable .ensureFieldAccessorsInitialized( proto.Test.Order.class, proto.Test.Order.Builder.class); } public interface ProducetsOrBuilder extends // @@protoc_insertion_point(interface_extends:proto.Order.Producets) com.google.protobuf.MessageOrBuilder { /** *
int64 id = 1;
* @return The id.
*/
long getId();
/**
* string title = 2;
* @return The title.
*/
java.lang.String getTitle();
/**
* string title = 2;
* @return The bytes for title.
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
* double price = 3;
* @return The price.
*/
double getPrice();
/**
* int32 num = 4;
* @return The num.
*/
int getNum();
}
/**
* Protobuf type {@code proto.Order.Producets}
*/
public static final class Producets extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.Order.Producets)
ProducetsOrBuilder {
private static final long serialVersionUID = 0L;
// Use Producets.newBuilder() to construct.
private Producets(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Producets() {
title_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Producets();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Producets(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
id_ = input.readInt64();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 25: {
price_ = input.readDouble();
break;
}
case 32: {
num_ = input.readInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return proto.Test.internal_static_proto_Order_Producets_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return proto.Test.internal_static_proto_Order_Producets_fieldAccessorTable
.ensureFieldAccessorsInitialized(
proto.Test.Order.Producets.class, proto.Test.Order.Producets.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private long id_;
/**
* int64 id = 1;
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
public static final int TITLE_FIELD_NUMBER = 2;
private volatile java.lang.Object title_;
/**
* string title = 2;
* @return The title.
*/
@java.lang.Override
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
}
}
/**
* string title = 2;
* @return The bytes for title.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRICE_FIELD_NUMBER = 3;
private double price_;
/**
* double price = 3;
* @return The price.
*/
@java.lang.Override
public double getPrice() {
return price_;
}
public static final int NUM_FIELD_NUMBER = 4;
private int num_;
/**
* int32 num = 4;
* @return The num.
*/
@java.lang.Override
public int getNum() {
return num_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (id_ != 0L) {
output.writeInt64(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_);
}
if (price_ != 0D) {
output.writeDouble(3, price_);
}
if (num_ != 0) {
output.writeInt32(4, num_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_);
}
if (price_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, price_);
}
if (num_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, num_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof proto.Test.Order.Producets)) {
return super.equals(obj);
}
proto.Test.Order.Producets other = (proto.Test.Order.Producets) obj;
if (getId()
!= other.getId()) return false;
if (!getTitle()
.equals(other.getTitle())) return false;
if (java.lang.Double.doubleToLongBits(getPrice())
!= java.lang.Double.doubleToLongBits(
other.getPrice())) return false;
if (getNum()
!= other.getNum()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + PRICE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getPrice()));
hash = (37 * hash) + NUM_FIELD_NUMBER;
hash = (53 * hash) + getNum();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static proto.Test.Order.Producets parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.Order.Producets parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.Order.Producets parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.Order.Producets parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.Order.Producets parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.Order.Producets parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.Order.Producets parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static proto.Test.Order.Producets parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static proto.Test.Order.Producets parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static proto.Test.Order.Producets parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static proto.Test.Order.Producets parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static proto.Test.Order.Producets parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(proto.Test.Order.Producets prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code proto.Order.Producets}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builderint64 id = 1;
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
/**
* int64 id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
* int64 id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private java.lang.Object title_ = "";
/**
* string title = 2;
* @return The title.
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string title = 2;
* @return The bytes for title.
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string title = 2;
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
* string title = 2;
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
* string title = 2;
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private double price_ ;
/**
* double price = 3;
* @return The price.
*/
@java.lang.Override
public double getPrice() {
return price_;
}
/**
* double price = 3;
* @param value The price to set.
* @return This builder for chaining.
*/
public Builder setPrice(double value) {
price_ = value;
onChanged();
return this;
}
/**
* double price = 3;
* @return This builder for chaining.
*/
public Builder clearPrice() {
price_ = 0D;
onChanged();
return this;
}
private int num_ ;
/**
* int32 num = 4;
* @return The num.
*/
@java.lang.Override
public int getNum() {
return num_;
}
/**
* int32 num = 4;
* @param value The num to set.
* @return This builder for chaining.
*/
public Builder setNum(int value) {
num_ = value;
onChanged();
return this;
}
/**
* int32 num = 4;
* @return This builder for chaining.
*/
public Builder clearNum() {
num_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:proto.Order.Producets)
}
// @@protoc_insertion_point(class_scope:proto.Order.Producets)
private static final proto.Test.Order.Producets DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new proto.Test.Order.Producets();
}
public static proto.Test.Order.Producets getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parserint64 id = 1;
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
public static final int NO_FIELD_NUMBER = 2;
private volatile java.lang.Object no_;
/**
* string no = 2;
* @return The no.
*/
@java.lang.Override
public java.lang.String getNo() {
java.lang.Object ref = no_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
no_ = s;
return s;
}
}
/**
* string no = 2;
* @return The bytes for no.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNoBytes() {
java.lang.Object ref = no_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
no_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TEL_FIELD_NUMBER = 3;
private volatile java.lang.Object tel_;
/**
* string tel = 3;
* @return The tel.
*/
@java.lang.Override
public java.lang.String getTel() {
java.lang.Object ref = tel_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
tel_ = s;
return s;
}
}
/**
* string tel = 3;
* @return The bytes for tel.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTelBytes() {
java.lang.Object ref = tel_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tel_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ADDRESS_FIELD_NUMBER = 4;
private volatile java.lang.Object address_;
/**
* string address = 4;
* @return The address.
*/
@java.lang.Override
public java.lang.String getAddress() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
address_ = s;
return s;
}
}
/**
* string address = 4;
* @return The bytes for address.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ADDTIME_FIELD_NUMBER = 5;
private volatile java.lang.Object addTime_;
/**
* string addTime = 5;
* @return The addTime.
*/
@java.lang.Override
public java.lang.String getAddTime() {
java.lang.Object ref = addTime_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
addTime_ = s;
return s;
}
}
/**
* string addTime = 5;
* @return The bytes for addTime.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAddTimeBytes() {
java.lang.Object ref = addTime_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
addTime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 6;
private int status_;
/**
* .proto.OrderStatus status = 6;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
* .proto.OrderStatus status = 6;
* @return The status.
*/
@java.lang.Override public proto.Test.OrderStatus getStatus() {
@SuppressWarnings("deprecation")
proto.Test.OrderStatus result = proto.Test.OrderStatus.valueOf(status_);
return result == null ? proto.Test.OrderStatus.UNRECOGNIZED : result;
}
public static final int PRODUCETS_FIELD_NUMBER = 7;
private proto.Test.Order.Producets producets_;
/**
* .proto.Order.Producets producets = 7;
* @return Whether the producets field is set.
*/
@java.lang.Override
public boolean hasProducets() {
return producets_ != null;
}
/**
* .proto.Order.Producets producets = 7;
* @return The producets.
*/
@java.lang.Override
public proto.Test.Order.Producets getProducets() {
return producets_ == null ? proto.Test.Order.Producets.getDefaultInstance() : producets_;
}
/**
* .proto.Order.Producets producets = 7;
*/
@java.lang.Override
public proto.Test.Order.ProducetsOrBuilder getProducetsOrBuilder() {
return getProducets();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (id_ != 0L) {
output.writeInt64(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(no_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, no_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tel_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tel_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, address_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(addTime_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, addTime_);
}
if (status_ != proto.Test.OrderStatus.FIRST_VAL.getNumber()) {
output.writeEnum(6, status_);
}
if (producets_ != null) {
output.writeMessage(7, getProducets());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(no_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, no_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tel_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tel_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, address_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(addTime_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, addTime_);
}
if (status_ != proto.Test.OrderStatus.FIRST_VAL.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, status_);
}
if (producets_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getProducets());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof proto.Test.Order)) {
return super.equals(obj);
}
proto.Test.Order other = (proto.Test.Order) obj;
if (getId()
!= other.getId()) return false;
if (!getNo()
.equals(other.getNo())) return false;
if (!getTel()
.equals(other.getTel())) return false;
if (!getAddress()
.equals(other.getAddress())) return false;
if (!getAddTime()
.equals(other.getAddTime())) return false;
if (status_ != other.status_) return false;
if (hasProducets() != other.hasProducets()) return false;
if (hasProducets()) {
if (!getProducets()
.equals(other.getProducets())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
hash = (37 * hash) + NO_FIELD_NUMBER;
hash = (53 * hash) + getNo().hashCode();
hash = (37 * hash) + TEL_FIELD_NUMBER;
hash = (53 * hash) + getTel().hashCode();
hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getAddress().hashCode();
hash = (37 * hash) + ADDTIME_FIELD_NUMBER;
hash = (53 * hash) + getAddTime().hashCode();
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
if (hasProducets()) {
hash = (37 * hash) + PRODUCETS_FIELD_NUMBER;
hash = (53 * hash) + getProducets().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static proto.Test.Order parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.Order parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.Order parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.Order parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.Order parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.Order parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.Order parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static proto.Test.Order parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static proto.Test.Order parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static proto.Test.Order parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static proto.Test.Order parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static proto.Test.Order parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(proto.Test.Order prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* *结构体 ** * Protobuf type {@code proto.Order} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
int64 id = 1;
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
/**
* int64 id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
* int64 id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private java.lang.Object no_ = "";
/**
* string no = 2;
* @return The no.
*/
public java.lang.String getNo() {
java.lang.Object ref = no_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
no_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string no = 2;
* @return The bytes for no.
*/
public com.google.protobuf.ByteString
getNoBytes() {
java.lang.Object ref = no_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
no_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string no = 2;
* @param value The no to set.
* @return This builder for chaining.
*/
public Builder setNo(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
no_ = value;
onChanged();
return this;
}
/**
* string no = 2;
* @return This builder for chaining.
*/
public Builder clearNo() {
no_ = getDefaultInstance().getNo();
onChanged();
return this;
}
/**
* string no = 2;
* @param value The bytes for no to set.
* @return This builder for chaining.
*/
public Builder setNoBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
no_ = value;
onChanged();
return this;
}
private java.lang.Object tel_ = "";
/**
* string tel = 3;
* @return The tel.
*/
public java.lang.String getTel() {
java.lang.Object ref = tel_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
tel_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string tel = 3;
* @return The bytes for tel.
*/
public com.google.protobuf.ByteString
getTelBytes() {
java.lang.Object ref = tel_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tel_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string tel = 3;
* @param value The tel to set.
* @return This builder for chaining.
*/
public Builder setTel(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
tel_ = value;
onChanged();
return this;
}
/**
* string tel = 3;
* @return This builder for chaining.
*/
public Builder clearTel() {
tel_ = getDefaultInstance().getTel();
onChanged();
return this;
}
/**
* string tel = 3;
* @param value The bytes for tel to set.
* @return This builder for chaining.
*/
public Builder setTelBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
tel_ = value;
onChanged();
return this;
}
private java.lang.Object address_ = "";
/**
* string address = 4;
* @return The address.
*/
public java.lang.String getAddress() {
java.lang.Object ref = address_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
address_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string address = 4;
* @return The bytes for address.
*/
public com.google.protobuf.ByteString
getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string address = 4;
* @param value The address to set.
* @return This builder for chaining.
*/
public Builder setAddress(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
address_ = value;
onChanged();
return this;
}
/**
* string address = 4;
* @return This builder for chaining.
*/
public Builder clearAddress() {
address_ = getDefaultInstance().getAddress();
onChanged();
return this;
}
/**
* string address = 4;
* @param value The bytes for address to set.
* @return This builder for chaining.
*/
public Builder setAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
address_ = value;
onChanged();
return this;
}
private java.lang.Object addTime_ = "";
/**
* string addTime = 5;
* @return The addTime.
*/
public java.lang.String getAddTime() {
java.lang.Object ref = addTime_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
addTime_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string addTime = 5;
* @return The bytes for addTime.
*/
public com.google.protobuf.ByteString
getAddTimeBytes() {
java.lang.Object ref = addTime_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
addTime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string addTime = 5;
* @param value The addTime to set.
* @return This builder for chaining.
*/
public Builder setAddTime(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
addTime_ = value;
onChanged();
return this;
}
/**
* string addTime = 5;
* @return This builder for chaining.
*/
public Builder clearAddTime() {
addTime_ = getDefaultInstance().getAddTime();
onChanged();
return this;
}
/**
* string addTime = 5;
* @param value The bytes for addTime to set.
* @return This builder for chaining.
*/
public Builder setAddTimeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
addTime_ = value;
onChanged();
return this;
}
private int status_ = 0;
/**
* .proto.OrderStatus status = 6;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
* .proto.OrderStatus status = 6;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
onChanged();
return this;
}
/**
* .proto.OrderStatus status = 6;
* @return The status.
*/
@java.lang.Override
public proto.Test.OrderStatus getStatus() {
@SuppressWarnings("deprecation")
proto.Test.OrderStatus result = proto.Test.OrderStatus.valueOf(status_);
return result == null ? proto.Test.OrderStatus.UNRECOGNIZED : result;
}
/**
* .proto.OrderStatus status = 6;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(proto.Test.OrderStatus value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
* .proto.OrderStatus status = 6;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
private proto.Test.Order.Producets producets_;
private com.google.protobuf.SingleFieldBuilderV3<
proto.Test.Order.Producets, proto.Test.Order.Producets.Builder, proto.Test.Order.ProducetsOrBuilder> producetsBuilder_;
/**
* .proto.Order.Producets producets = 7;
* @return Whether the producets field is set.
*/
public boolean hasProducets() {
return producetsBuilder_ != null || producets_ != null;
}
/**
* .proto.Order.Producets producets = 7;
* @return The producets.
*/
public proto.Test.Order.Producets getProducets() {
if (producetsBuilder_ == null) {
return producets_ == null ? proto.Test.Order.Producets.getDefaultInstance() : producets_;
} else {
return producetsBuilder_.getMessage();
}
}
/**
* .proto.Order.Producets producets = 7;
*/
public Builder setProducets(proto.Test.Order.Producets value) {
if (producetsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
producets_ = value;
onChanged();
} else {
producetsBuilder_.setMessage(value);
}
return this;
}
/**
* .proto.Order.Producets producets = 7;
*/
public Builder setProducets(
proto.Test.Order.Producets.Builder builderForValue) {
if (producetsBuilder_ == null) {
producets_ = builderForValue.build();
onChanged();
} else {
producetsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .proto.Order.Producets producets = 7;
*/
public Builder mergeProducets(proto.Test.Order.Producets value) {
if (producetsBuilder_ == null) {
if (producets_ != null) {
producets_ =
proto.Test.Order.Producets.newBuilder(producets_).mergeFrom(value).buildPartial();
} else {
producets_ = value;
}
onChanged();
} else {
producetsBuilder_.mergeFrom(value);
}
return this;
}
/**
* .proto.Order.Producets producets = 7;
*/
public Builder clearProducets() {
if (producetsBuilder_ == null) {
producets_ = null;
onChanged();
} else {
producets_ = null;
producetsBuilder_ = null;
}
return this;
}
/**
* .proto.Order.Producets producets = 7;
*/
public proto.Test.Order.Producets.Builder getProducetsBuilder() {
onChanged();
return getProducetsFieldBuilder().getBuilder();
}
/**
* .proto.Order.Producets producets = 7;
*/
public proto.Test.Order.ProducetsOrBuilder getProducetsOrBuilder() {
if (producetsBuilder_ != null) {
return producetsBuilder_.getMessageOrBuilder();
} else {
return producets_ == null ?
proto.Test.Order.Producets.getDefaultInstance() : producets_;
}
}
/**
* .proto.Order.Producets producets = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
proto.Test.Order.Producets, proto.Test.Order.Producets.Builder, proto.Test.Order.ProducetsOrBuilder>
getProducetsFieldBuilder() {
if (producetsBuilder_ == null) {
producetsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
proto.Test.Order.Producets, proto.Test.Order.Producets.Builder, proto.Test.Order.ProducetsOrBuilder>(
getProducets(),
getParentForChildren(),
isClean());
producets_ = null;
}
return producetsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:proto.Order)
}
// @@protoc_insertion_point(class_scope:proto.Order)
private static final proto.Test.Order DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new proto.Test.Order();
}
public static proto.Test.Order getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parserint32 activityType = 1;
* @return The activityType.
*/
int getActivityType();
}
/**
* *也可写这里 * message Producets { * int64 id = 1; * string title = 2; * double price =3; * int32 num = 4; * } *请求 request struct ** * Protobuf type {@code proto.OrderRequest} */ public static final class OrderRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.OrderRequest) OrderRequestOrBuilder { private static final long serialVersionUID = 0L; // Use OrderRequest.newBuilder() to construct. private OrderRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private OrderRequest() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new OrderRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private OrderRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { activityType_ = input.readInt32(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return proto.Test.internal_static_proto_OrderRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return proto.Test.internal_static_proto_OrderRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( proto.Test.OrderRequest.class, proto.Test.OrderRequest.Builder.class); } public static final int ACTIVITYTYPE_FIELD_NUMBER = 1; private int activityType_; /** *
int32 activityType = 1;
* @return The activityType.
*/
@java.lang.Override
public int getActivityType() {
return activityType_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (activityType_ != 0) {
output.writeInt32(1, activityType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (activityType_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, activityType_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof proto.Test.OrderRequest)) {
return super.equals(obj);
}
proto.Test.OrderRequest other = (proto.Test.OrderRequest) obj;
if (getActivityType()
!= other.getActivityType()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ACTIVITYTYPE_FIELD_NUMBER;
hash = (53 * hash) + getActivityType();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static proto.Test.OrderRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.OrderRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.OrderRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.OrderRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.OrderRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.OrderRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.OrderRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static proto.Test.OrderRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static proto.Test.OrderRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static proto.Test.OrderRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static proto.Test.OrderRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static proto.Test.OrderRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(proto.Test.OrderRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* *也可写这里 * message Producets { * int64 id = 1; * string title = 2; * double price =3; * int32 num = 4; * } *请求 request struct ** * Protobuf type {@code proto.OrderRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
int32 activityType = 1;
* @return The activityType.
*/
@java.lang.Override
public int getActivityType() {
return activityType_;
}
/**
* int32 activityType = 1;
* @param value The activityType to set.
* @return This builder for chaining.
*/
public Builder setActivityType(int value) {
activityType_ = value;
onChanged();
return this;
}
/**
* int32 activityType = 1;
* @return This builder for chaining.
*/
public Builder clearActivityType() {
activityType_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:proto.OrderRequest)
}
// @@protoc_insertion_point(class_scope:proto.OrderRequest)
private static final proto.Test.OrderRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new proto.Test.OrderRequest();
}
public static proto.Test.OrderRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parserint32 discountAmount = 1;
* @return The discountAmount.
*/
int getDiscountAmount();
/**
* string code = 2;
* @return The code.
*/
java.lang.String getCode();
/**
* string code = 2;
* @return The bytes for code.
*/
com.google.protobuf.ByteString
getCodeBytes();
/**
* string msg = 3;
* @return The msg.
*/
java.lang.String getMsg();
/**
* string msg = 3;
* @return The bytes for msg.
*/
com.google.protobuf.ByteString
getMsgBytes();
}
/**
* *响应 resp struct ** * Protobuf type {@code proto.OrderResp} */ public static final class OrderResp extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.OrderResp) OrderRespOrBuilder { private static final long serialVersionUID = 0L; // Use OrderResp.newBuilder() to construct. private OrderResp(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private OrderResp() { code_ = ""; msg_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new OrderResp(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private OrderResp( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { discountAmount_ = input.readInt32(); break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); code_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); msg_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return proto.Test.internal_static_proto_OrderResp_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return proto.Test.internal_static_proto_OrderResp_fieldAccessorTable .ensureFieldAccessorsInitialized( proto.Test.OrderResp.class, proto.Test.OrderResp.Builder.class); } public static final int DISCOUNTAMOUNT_FIELD_NUMBER = 1; private int discountAmount_; /** *
int32 discountAmount = 1;
* @return The discountAmount.
*/
@java.lang.Override
public int getDiscountAmount() {
return discountAmount_;
}
public static final int CODE_FIELD_NUMBER = 2;
private volatile java.lang.Object code_;
/**
* string code = 2;
* @return The code.
*/
@java.lang.Override
public java.lang.String getCode() {
java.lang.Object ref = code_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
code_ = s;
return s;
}
}
/**
* string code = 2;
* @return The bytes for code.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCodeBytes() {
java.lang.Object ref = code_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
code_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MSG_FIELD_NUMBER = 3;
private volatile java.lang.Object msg_;
/**
* string msg = 3;
* @return The msg.
*/
@java.lang.Override
public java.lang.String getMsg() {
java.lang.Object ref = msg_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
msg_ = s;
return s;
}
}
/**
* string msg = 3;
* @return The bytes for msg.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMsgBytes() {
java.lang.Object ref = msg_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
msg_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (discountAmount_ != 0) {
output.writeInt32(1, discountAmount_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(code_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, code_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, msg_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (discountAmount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, discountAmount_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(code_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, code_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, msg_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof proto.Test.OrderResp)) {
return super.equals(obj);
}
proto.Test.OrderResp other = (proto.Test.OrderResp) obj;
if (getDiscountAmount()
!= other.getDiscountAmount()) return false;
if (!getCode()
.equals(other.getCode())) return false;
if (!getMsg()
.equals(other.getMsg())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DISCOUNTAMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getDiscountAmount();
hash = (37 * hash) + CODE_FIELD_NUMBER;
hash = (53 * hash) + getCode().hashCode();
hash = (37 * hash) + MSG_FIELD_NUMBER;
hash = (53 * hash) + getMsg().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static proto.Test.OrderResp parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.OrderResp parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.OrderResp parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.OrderResp parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.OrderResp parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto.Test.OrderResp parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto.Test.OrderResp parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static proto.Test.OrderResp parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static proto.Test.OrderResp parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static proto.Test.OrderResp parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static proto.Test.OrderResp parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static proto.Test.OrderResp parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(proto.Test.OrderResp prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* *响应 resp struct ** * Protobuf type {@code proto.OrderResp} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
int32 discountAmount = 1;
* @return The discountAmount.
*/
@java.lang.Override
public int getDiscountAmount() {
return discountAmount_;
}
/**
* int32 discountAmount = 1;
* @param value The discountAmount to set.
* @return This builder for chaining.
*/
public Builder setDiscountAmount(int value) {
discountAmount_ = value;
onChanged();
return this;
}
/**
* int32 discountAmount = 1;
* @return This builder for chaining.
*/
public Builder clearDiscountAmount() {
discountAmount_ = 0;
onChanged();
return this;
}
private java.lang.Object code_ = "";
/**
* string code = 2;
* @return The code.
*/
public java.lang.String getCode() {
java.lang.Object ref = code_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
code_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string code = 2;
* @return The bytes for code.
*/
public com.google.protobuf.ByteString
getCodeBytes() {
java.lang.Object ref = code_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
code_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string code = 2;
* @param value The code to set.
* @return This builder for chaining.
*/
public Builder setCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
code_ = value;
onChanged();
return this;
}
/**
* string code = 2;
* @return This builder for chaining.
*/
public Builder clearCode() {
code_ = getDefaultInstance().getCode();
onChanged();
return this;
}
/**
* string code = 2;
* @param value The bytes for code to set.
* @return This builder for chaining.
*/
public Builder setCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
code_ = value;
onChanged();
return this;
}
private java.lang.Object msg_ = "";
/**
* string msg = 3;
* @return The msg.
*/
public java.lang.String getMsg() {
java.lang.Object ref = msg_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
msg_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string msg = 3;
* @return The bytes for msg.
*/
public com.google.protobuf.ByteString
getMsgBytes() {
java.lang.Object ref = msg_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
msg_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string msg = 3;
* @param value The msg to set.
* @return This builder for chaining.
*/
public Builder setMsg(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
msg_ = value;
onChanged();
return this;
}
/**
* string msg = 3;
* @return This builder for chaining.
*/
public Builder clearMsg() {
msg_ = getDefaultInstance().getMsg();
onChanged();
return this;
}
/**
* string msg = 3;
* @param value The bytes for msg to set.
* @return This builder for chaining.
*/
public Builder setMsgBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
msg_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:proto.OrderResp)
}
// @@protoc_insertion_point(class_scope:proto.OrderResp)
private static final proto.Test.OrderResp DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new proto.Test.OrderResp();
}
public static proto.Test.OrderResp getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser