修改Android sdk 替换protobuf-lite为protobuf-javalite

This commit is contained in:
远方夕阳 2023-12-04 19:02:08 +08:00
parent 43308baa5f
commit e60f64ec55
9 changed files with 733 additions and 831 deletions

View File

@ -6,7 +6,7 @@
<groupId>com.farsunset</groupId>
<artifactId>cim-android-sdk</artifactId>
<version>4.2.12</version>
<version>4.2.13</version>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
@ -29,17 +29,18 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<protobuf.lite.version>3.0.1</protobuf.lite.version>
<google.protobuf.version>3.22.0</google.protobuf.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-lite</artifactId>
<version>${protobuf.lite.version}</version>
<artifactId>protobuf-javalite</artifactId>
<version>3.22.0</version>
</dependency>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>

View File

@ -77,7 +77,7 @@ public class ClientMessageDecoder {
}
if (ProtobufType.REPLY_BODY == type) {
ReplyBodyProto.Model bodyProto = ReplyBodyProto.Model.parseFrom(bodyBuffer.array());
ReplyBodyProto.ReplyModel bodyProto = ReplyBodyProto.ReplyModel.parseFrom(bodyBuffer.array());
ReplyBody body = new ReplyBody();
body.setKey(bodyProto.getKey());
body.setTimestamp(bodyProto.getTimestamp());
@ -87,7 +87,7 @@ public class ClientMessageDecoder {
return body;
}
MessageProto.Model bodyProto = MessageProto.Model.parseFrom(bodyBuffer.array());
MessageProto.MessageModel bodyProto = MessageProto.MessageModel.parseFrom(bodyBuffer.array());
Message message = new Message();
message.setId(bodyProto.getId());
message.setAction(bodyProto.getAction());

View File

@ -97,7 +97,7 @@ public class SentBody implements Serializable, BinaryBody {
@Override
public byte[] getByteArray() {
SentBodyProto.Model.Builder builder = SentBodyProto.Model.newBuilder();
SentBodyProto.SentModel.Builder builder = SentBodyProto.SentModel.newBuilder();
builder.setKey(key);
builder.setTimestamp(timestamp);
if (!data.isEmpty()) {

View File

@ -8,42 +8,49 @@ public final class ReplyBodyProto {
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public interface ModelOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.farsunset.cim.sdk.android.model.proto.Model)
public interface ReplyModelOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.farsunset.cim.sdk.android.model.proto.ReplyModel)
com.google.protobuf.MessageLiteOrBuilder {
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The key.
*/
String getKey();
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The bytes for key.
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @return The code.
*/
String getCode();
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @return The bytes for code.
*/
com.google.protobuf.ByteString
getCodeBytes();
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @return The message.
*/
String getMessage();
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @return The bytes for message.
*/
com.google.protobuf.ByteString
getMessageBytes();
/**
* <code>optional int64 timestamp = 4;</code>
* <code>int64 timestamp = 4;</code>
* @return The timestamp.
*/
long getTimestamp();
@ -71,9 +78,11 @@ public final class ReplyBodyProto {
* <code>map&lt;string, string&gt; data = 5;</code>
*/
String getDataOrDefault(
/* nullable */
String getDataOrDefault(
String key,
String defaultValue);
/* nullable */
String defaultValue);
/**
* <code>map&lt;string, string&gt; data = 5;</code>
*/
@ -82,174 +91,179 @@ public final class ReplyBodyProto {
String key);
}
/**
* Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
* Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.ReplyModel}
*/
public static final class Model extends
public static final class ReplyModel extends
com.google.protobuf.GeneratedMessageLite<
Model, Model.Builder> implements
// @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.Model)
ModelOrBuilder {
private Model() {
ReplyModel, ReplyModel.Builder> implements
// @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.ReplyModel)
ReplyModelOrBuilder {
private ReplyModel() {
key_ = "";
code_ = "";
message_ = "";
}
private int bitField0_;
public static final int KEY_FIELD_NUMBER = 1;
private String key_;
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The key.
*/
@Override
public String getKey() {
return key_;
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The bytes for key.
*/
@Override
public com.google.protobuf.ByteString
getKeyBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(key_);
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @param value The key to set.
*/
private void setKey(
String value) {
if (value == null) {
throw new NullPointerException();
}
Class<?> valueClass = value.getClass();
key_ = value;
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
*/
private void clearKey() {
key_ = getDefaultInstance().getKey();
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @param value The bytes for key to set.
*/
private void setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value.toStringUtf8();
}
public static final int CODE_FIELD_NUMBER = 2;
private String code_;
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @return The code.
*/
@Override
public String getCode() {
return code_;
}
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @return The bytes for code.
*/
@Override
public com.google.protobuf.ByteString
getCodeBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(code_);
}
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @param value The code to set.
*/
private void setCode(
String value) {
if (value == null) {
throw new NullPointerException();
}
Class<?> valueClass = value.getClass();
code_ = value;
}
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
*/
private void clearCode() {
code_ = getDefaultInstance().getCode();
}
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @param value The bytes for code to set.
*/
private void setCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
code_ = value.toStringUtf8();
}
public static final int MESSAGE_FIELD_NUMBER = 3;
private String message_;
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @return The message.
*/
@Override
public String getMessage() {
return message_;
}
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @return The bytes for message.
*/
@Override
public com.google.protobuf.ByteString
getMessageBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(message_);
}
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @param value The message to set.
*/
private void setMessage(
String value) {
if (value == null) {
throw new NullPointerException();
}
Class<?> valueClass = value.getClass();
message_ = value;
}
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
*/
private void clearMessage() {
message_ = getDefaultInstance().getMessage();
}
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @param value The bytes for message to set.
*/
private void setMessageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
message_ = value.toStringUtf8();
}
public static final int TIMESTAMP_FIELD_NUMBER = 4;
private long timestamp_;
/**
* <code>optional int64 timestamp = 4;</code>
* <code>int64 timestamp = 4;</code>
* @return The timestamp.
*/
@Override
public long getTimestamp() {
return timestamp_;
}
/**
* <code>optional int64 timestamp = 4;</code>
* <code>int64 timestamp = 4;</code>
* @param value The timestamp to set.
*/
private void setTimestamp(long value) {
timestamp_ = value;
}
/**
* <code>optional int64 timestamp = 4;</code>
* <code>int64 timestamp = 4;</code>
*/
private void clearTimestamp() {
@ -281,6 +295,7 @@ public final class ReplyBodyProto {
}
return data_;
}
@Override
public int getDataCount() {
return internalGetData().size();
@ -288,15 +303,17 @@ public final class ReplyBodyProto {
/**
* <code>map&lt;string, string&gt; data = 5;</code>
*/
@Override
public boolean containsData(
String key) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
return internalGetData().containsKey(key);
}
/**
* Use {@link #getDataMap()} instead.
*/
@Override
@Deprecated
public java.util.Map<String, String> getData() {
return getDataMap();
@ -304,6 +321,7 @@ public final class ReplyBodyProto {
/**
* <code>map&lt;string, string&gt; data = 5;</code>
*/
@Override
public java.util.Map<String, String> getDataMap() {
return java.util.Collections.unmodifiableMap(
@ -312,11 +330,12 @@ public final class ReplyBodyProto {
/**
* <code>map&lt;string, string&gt; data = 5;</code>
*/
@Override
public String getDataOrDefault(
String key,
String defaultValue) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
java.util.Map<String, String> map =
internalGetData();
return map.containsKey(key) ? map.get(key) : defaultValue;
@ -324,10 +343,11 @@ public final class ReplyBodyProto {
/**
* <code>map&lt;string, string&gt; data = 5;</code>
*/
@Override
public String getDataOrThrow(
String key) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
java.util.Map<String, String> map =
internalGetData();
if (!map.containsKey(key)) {
@ -343,111 +363,73 @@ public final class ReplyBodyProto {
return internalGetMutableData();
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!key_.isEmpty()) {
output.writeString(1, getKey());
public static ReplyModel parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
if (!code_.isEmpty()) {
output.writeString(2, getCode());
public static ReplyModel parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
if (!message_.isEmpty()) {
output.writeString(3, getMessage());
}
if (timestamp_ != 0L) {
output.writeInt64(4, timestamp_);
}
for (java.util.Map.Entry<String, String> entry
: internalGetData().entrySet()) {
DataDefaultEntryHolder.defaultEntry.serializeTo(
output, 5, entry.getKey(), entry.getValue());
}
}
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (!key_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(1, getKey());
}
if (!code_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(2, getCode());
}
if (!message_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(3, getMessage());
}
if (timestamp_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, timestamp_);
}
for (java.util.Map.Entry<String, String> entry
: internalGetData().entrySet()) {
size += DataDefaultEntryHolder.defaultEntry.computeMessageSize(
5, entry.getKey(), entry.getValue());
}
memoizedSerializedSize = size;
return size;
}
public static Model parseFrom(
public static ReplyModel parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static Model parseFrom(
public static ReplyModel parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static Model parseFrom(byte[] data)
public static ReplyModel parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static Model parseFrom(
public static ReplyModel parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static Model parseFrom(java.io.InputStream input)
public static ReplyModel parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static Model parseFrom(
public static ReplyModel parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Model parseDelimitedFrom(java.io.InputStream input)
public static ReplyModel parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static Model parseDelimitedFrom(
public static ReplyModel parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Model parseFrom(
public static ReplyModel parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static Model parseFrom(
public static ReplyModel parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@ -456,41 +438,47 @@ public final class ReplyBodyProto {
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(Model prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
public static Builder newBuilder(ReplyModel prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
* Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.ReplyModel}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
Model, Builder> implements
// @@protoc_insertion_point(builder_implements:com.farsunset.cim.sdk.android.model.proto.Model)
ModelOrBuilder {
// Construct using com.farsunset.cim.sdk.android.model.proto.ReplyBodyProto.Model.newBuilder()
ReplyModel, Builder> implements
// @@protoc_insertion_point(builder_implements:com.farsunset.cim.sdk.android.model.proto.ReplyModel)
ReplyModelOrBuilder {
// Construct using com.farsunset.cim.sdk.android.model.proto.ReplyBodyProto.ReplyModel.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The key.
*/
@Override
public String getKey() {
return instance.getKey();
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The bytes for key.
*/
@Override
public com.google.protobuf.ByteString
getKeyBytes() {
return instance.getKeyBytes();
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
String value) {
@ -499,7 +487,8 @@ public final class ReplyBodyProto {
return this;
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return This builder for chaining.
*/
public Builder clearKey() {
copyOnWrite();
@ -507,7 +496,9 @@ public final class ReplyBodyProto {
return this;
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
@ -517,20 +508,26 @@ public final class ReplyBodyProto {
}
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @return The code.
*/
@Override
public String getCode() {
return instance.getCode();
}
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @return The bytes for code.
*/
@Override
public com.google.protobuf.ByteString
getCodeBytes() {
return instance.getCodeBytes();
}
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @param value The code to set.
* @return This builder for chaining.
*/
public Builder setCode(
String value) {
@ -539,7 +536,8 @@ public final class ReplyBodyProto {
return this;
}
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @return This builder for chaining.
*/
public Builder clearCode() {
copyOnWrite();
@ -547,7 +545,9 @@ public final class ReplyBodyProto {
return this;
}
/**
* <code>optional string code = 2;</code>
* <code>string code = 2;</code>
* @param value The bytes for code to set.
* @return This builder for chaining.
*/
public Builder setCodeBytes(
com.google.protobuf.ByteString value) {
@ -557,20 +557,26 @@ public final class ReplyBodyProto {
}
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @return The message.
*/
@Override
public String getMessage() {
return instance.getMessage();
}
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @return The bytes for message.
*/
@Override
public com.google.protobuf.ByteString
getMessageBytes() {
return instance.getMessageBytes();
}
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @param value The message to set.
* @return This builder for chaining.
*/
public Builder setMessage(
String value) {
@ -579,7 +585,8 @@ public final class ReplyBodyProto {
return this;
}
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @return This builder for chaining.
*/
public Builder clearMessage() {
copyOnWrite();
@ -587,7 +594,9 @@ public final class ReplyBodyProto {
return this;
}
/**
* <code>optional string message = 3;</code>
* <code>string message = 3;</code>
* @param value The bytes for message to set.
* @return This builder for chaining.
*/
public Builder setMessageBytes(
com.google.protobuf.ByteString value) {
@ -597,13 +606,17 @@ public final class ReplyBodyProto {
}
/**
* <code>optional int64 timestamp = 4;</code>
* <code>int64 timestamp = 4;</code>
* @return The timestamp.
*/
@Override
public long getTimestamp() {
return instance.getTimestamp();
}
/**
* <code>optional int64 timestamp = 4;</code>
* <code>int64 timestamp = 4;</code>
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
copyOnWrite();
@ -611,7 +624,8 @@ public final class ReplyBodyProto {
return this;
}
/**
* <code>optional int64 timestamp = 4;</code>
* <code>int64 timestamp = 4;</code>
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
copyOnWrite();
@ -619,6 +633,7 @@ public final class ReplyBodyProto {
return this;
}
@Override
public int getDataCount() {
return instance.getDataMap().size();
@ -626,10 +641,11 @@ public final class ReplyBodyProto {
/**
* <code>map&lt;string, string&gt; data = 5;</code>
*/
@Override
public boolean containsData(
String key) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
return instance.getDataMap().containsKey(key);
}
@ -644,7 +660,7 @@ public final class ReplyBodyProto {
public Builder removeData(
String key) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
copyOnWrite();
instance.getMutableDataMap().remove(key);
return this;
@ -652,6 +668,7 @@ public final class ReplyBodyProto {
/**
* Use {@link #getDataMap()} instead.
*/
@Override
@Deprecated
public java.util.Map<String, String> getData() {
return getDataMap();
@ -659,6 +676,7 @@ public final class ReplyBodyProto {
/**
* <code>map&lt;string, string&gt; data = 5;</code>
*/
@Override
public java.util.Map<String, String> getDataMap() {
return java.util.Collections.unmodifiableMap(
instance.getDataMap());
@ -666,11 +684,12 @@ public final class ReplyBodyProto {
/**
* <code>map&lt;string, string&gt; data = 5;</code>
*/
@Override
public String getDataOrDefault(
String key,
String defaultValue) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
java.util.Map<String, String> map =
instance.getDataMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
@ -678,10 +697,11 @@ public final class ReplyBodyProto {
/**
* <code>map&lt;string, string&gt; data = 5;</code>
*/
@Override
public String getDataOrThrow(
String key) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
java.util.Map<String, String> map =
instance.getDataMap();
if (!map.containsKey(key)) {
@ -695,8 +715,8 @@ public final class ReplyBodyProto {
public Builder putData(
String key,
String value) {
if (key == null) { throw new NullPointerException(); }
if (value == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
Class<?> valueClass = value.getClass();
copyOnWrite();
instance.getMutableDataMap().put(key, value);
return this;
@ -711,134 +731,82 @@ public final class ReplyBodyProto {
return this;
}
// @@protoc_insertion_point(builder_scope:com.farsunset.cim.sdk.android.model.proto.Model)
// @@protoc_insertion_point(builder_scope:com.farsunset.cim.sdk.android.model.proto.ReplyModel)
}
@Override
@SuppressWarnings({"unchecked", "fallthrough"})
protected final Object dynamicMethod(
MethodToInvoke method,
Object arg0, Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new Model();
}
case IS_INITIALIZED: {
return DEFAULT_INSTANCE;
}
case MAKE_IMMUTABLE: {
data_.makeImmutable();
return null;
return new ReplyModel();
}
case NEW_BUILDER: {
return new Builder();
}
case VISIT: {
Visitor visitor = (Visitor) arg0;
Model other = (Model) arg1;
key_ = visitor.visitString(!key_.isEmpty(), key_,
!other.key_.isEmpty(), other.key_);
code_ = visitor.visitString(!code_.isEmpty(), code_,
!other.code_.isEmpty(), other.code_);
message_ = visitor.visitString(!message_.isEmpty(), message_,
!other.message_.isEmpty(), other.message_);
timestamp_ = visitor.visitLong(timestamp_ != 0L, timestamp_,
other.timestamp_ != 0L, other.timestamp_);
data_ = visitor.visitMap(
data_, other.internalGetData());
if (visitor == MergeFromVisitor
.INSTANCE) {
bitField0_ |= other.bitField0_;
}
return this;
}
case MERGE_FROM_STREAM: {
com.google.protobuf.CodedInputStream input =
(com.google.protobuf.CodedInputStream) arg0;
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
(com.google.protobuf.ExtensionRegistryLite) arg1;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
String s = input.readStringRequireUtf8();
key_ = s;
break;
}
case 18: {
String s = input.readStringRequireUtf8();
code_ = s;
break;
}
case 26: {
String s = input.readStringRequireUtf8();
message_ = s;
break;
}
case 32: {
timestamp_ = input.readInt64();
break;
}
case 42: {
if (!data_.isMutable()) {
data_ = data_.mutableCopy();
}
DataDefaultEntryHolder.defaultEntry.parseInto(data_, input, extensionRegistry); break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
throw new RuntimeException(
new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this));
} finally {
}
case BUILD_MESSAGE_INFO: {
Object[] objects = new Object[] {
"key_",
"code_",
"message_",
"timestamp_",
"data_",
DataDefaultEntryHolder.defaultEntry,
};
String info =
"\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0001\u0000\u0000\u0001\u0208\u0002\u0208" +
"\u0003\u0208\u0004\u0002\u00052";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
if (PARSER == null) { synchronized (Model.class) {
if (PARSER == null) {
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
com.google.protobuf.Parser<ReplyModel> parser = PARSER;
if (parser == null) {
synchronized (ReplyModel.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser<ReplyModel>(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return PARSER;
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:com.farsunset.cim.sdk.android.model.proto.Model)
private static final Model DEFAULT_INSTANCE;
// @@protoc_insertion_point(class_scope:com.farsunset.cim.sdk.android.model.proto.ReplyModel)
private static final ReplyModel DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new Model();
DEFAULT_INSTANCE.makeImmutable();
ReplyModel defaultInstance = new ReplyModel();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
ReplyModel.class, defaultInstance);
}
public static Model getDefaultInstance() {
public static ReplyModel getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser<Model> PARSER;
private static volatile com.google.protobuf.Parser<ReplyModel> PARSER;
public static com.google.protobuf.Parser<Model> parser() {
public static com.google.protobuf.Parser<ReplyModel> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@ -8,22 +8,25 @@ public final class SentBodyProto {
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public interface ModelOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.farsunset.cim.sdk.android.model.proto.Model)
public interface SentModelOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.farsunset.cim.sdk.android.model.proto.SentModel)
com.google.protobuf.MessageLiteOrBuilder {
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The key.
*/
String getKey();
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The bytes for key.
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* <code>optional int64 timestamp = 2;</code>
* <code>int64 timestamp = 2;</code>
* @return The timestamp.
*/
long getTimestamp();
@ -51,9 +54,11 @@ public final class SentBodyProto {
* <code>map&lt;string, string&gt; data = 3;</code>
*/
String getDataOrDefault(
/* nullable */
String getDataOrDefault(
String key,
String defaultValue);
/* nullable */
String defaultValue);
/**
* <code>map&lt;string, string&gt; data = 3;</code>
*/
@ -62,80 +67,83 @@ public final class SentBodyProto {
String key);
}
/**
* Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
* Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.SentModel}
*/
public static final class Model extends
public static final class SentModel extends
com.google.protobuf.GeneratedMessageLite<
Model, Model.Builder> implements
// @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.Model)
ModelOrBuilder {
private Model() {
SentModel, SentModel.Builder> implements
// @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.SentModel)
SentModelOrBuilder {
private SentModel() {
key_ = "";
}
private int bitField0_;
public static final int KEY_FIELD_NUMBER = 1;
private String key_;
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The key.
*/
@Override
public String getKey() {
return key_;
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The bytes for key.
*/
@Override
public com.google.protobuf.ByteString
getKeyBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(key_);
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @param value The key to set.
*/
private void setKey(
String value) {
if (value == null) {
throw new NullPointerException();
}
Class<?> valueClass = value.getClass();
key_ = value;
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
*/
private void clearKey() {
key_ = getDefaultInstance().getKey();
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @param value The bytes for key to set.
*/
private void setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value.toStringUtf8();
}
public static final int TIMESTAMP_FIELD_NUMBER = 2;
private long timestamp_;
/**
* <code>optional int64 timestamp = 2;</code>
* <code>int64 timestamp = 2;</code>
* @return The timestamp.
*/
@Override
public long getTimestamp() {
return timestamp_;
}
/**
* <code>optional int64 timestamp = 2;</code>
* <code>int64 timestamp = 2;</code>
* @param value The timestamp to set.
*/
private void setTimestamp(long value) {
timestamp_ = value;
}
/**
* <code>optional int64 timestamp = 2;</code>
* <code>int64 timestamp = 2;</code>
*/
private void clearTimestamp() {
@ -167,6 +175,7 @@ public final class SentBodyProto {
}
return data_;
}
@Override
public int getDataCount() {
return internalGetData().size();
@ -174,15 +183,17 @@ public final class SentBodyProto {
/**
* <code>map&lt;string, string&gt; data = 3;</code>
*/
@Override
public boolean containsData(
String key) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
return internalGetData().containsKey(key);
}
/**
* Use {@link #getDataMap()} instead.
*/
@Override
@Deprecated
public java.util.Map<String, String> getData() {
return getDataMap();
@ -190,6 +201,7 @@ public final class SentBodyProto {
/**
* <code>map&lt;string, string&gt; data = 3;</code>
*/
@Override
public java.util.Map<String, String> getDataMap() {
return java.util.Collections.unmodifiableMap(
@ -198,11 +210,12 @@ public final class SentBodyProto {
/**
* <code>map&lt;string, string&gt; data = 3;</code>
*/
@Override
public String getDataOrDefault(
String key,
String defaultValue) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
java.util.Map<String, String> map =
internalGetData();
return map.containsKey(key) ? map.get(key) : defaultValue;
@ -210,10 +223,11 @@ public final class SentBodyProto {
/**
* <code>map&lt;string, string&gt; data = 3;</code>
*/
@Override
public String getDataOrThrow(
String key) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
java.util.Map<String, String> map =
internalGetData();
if (!map.containsKey(key)) {
@ -229,97 +243,73 @@ public final class SentBodyProto {
return internalGetMutableData();
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!key_.isEmpty()) {
output.writeString(1, getKey());
public static SentModel parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
if (timestamp_ != 0L) {
output.writeInt64(2, timestamp_);
public static SentModel parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
for (java.util.Map.Entry<String, String> entry
: internalGetData().entrySet()) {
DataDefaultEntryHolder.defaultEntry.serializeTo(
output, 3, entry.getKey(), entry.getValue());
}
}
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (!key_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(1, getKey());
}
if (timestamp_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, timestamp_);
}
for (java.util.Map.Entry<String, String> entry
: internalGetData().entrySet()) {
size += DataDefaultEntryHolder.defaultEntry.computeMessageSize(
3, entry.getKey(), entry.getValue());
}
memoizedSerializedSize = size;
return size;
}
public static Model parseFrom(
public static SentModel parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static Model parseFrom(
public static SentModel parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static Model parseFrom(byte[] data)
public static SentModel parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static Model parseFrom(
public static SentModel parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static Model parseFrom(java.io.InputStream input)
public static SentModel parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static Model parseFrom(
public static SentModel parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Model parseDelimitedFrom(java.io.InputStream input)
public static SentModel parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static Model parseDelimitedFrom(
public static SentModel parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Model parseFrom(
public static SentModel parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static Model parseFrom(
public static SentModel parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@ -328,41 +318,47 @@ public final class SentBodyProto {
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(Model prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
public static Builder newBuilder(SentModel prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
* Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.SentModel}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
Model, Builder> implements
// @@protoc_insertion_point(builder_implements:com.farsunset.cim.sdk.android.model.proto.Model)
ModelOrBuilder {
// Construct using com.farsunset.cim.sdk.android.model.proto.SentBodyProto.Model.newBuilder()
SentModel, Builder> implements
// @@protoc_insertion_point(builder_implements:com.farsunset.cim.sdk.android.model.proto.SentModel)
SentModelOrBuilder {
// Construct using com.farsunset.cim.sdk.android.model.proto.SentBodyProto.SentModel.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The key.
*/
@Override
public String getKey() {
return instance.getKey();
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return The bytes for key.
*/
@Override
public com.google.protobuf.ByteString
getKeyBytes() {
return instance.getKeyBytes();
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
String value) {
@ -371,7 +367,8 @@ public final class SentBodyProto {
return this;
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @return This builder for chaining.
*/
public Builder clearKey() {
copyOnWrite();
@ -379,7 +376,9 @@ public final class SentBodyProto {
return this;
}
/**
* <code>optional string key = 1;</code>
* <code>string key = 1;</code>
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
@ -389,13 +388,17 @@ public final class SentBodyProto {
}
/**
* <code>optional int64 timestamp = 2;</code>
* <code>int64 timestamp = 2;</code>
* @return The timestamp.
*/
@Override
public long getTimestamp() {
return instance.getTimestamp();
}
/**
* <code>optional int64 timestamp = 2;</code>
* <code>int64 timestamp = 2;</code>
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
copyOnWrite();
@ -403,7 +406,8 @@ public final class SentBodyProto {
return this;
}
/**
* <code>optional int64 timestamp = 2;</code>
* <code>int64 timestamp = 2;</code>
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
copyOnWrite();
@ -411,6 +415,7 @@ public final class SentBodyProto {
return this;
}
@Override
public int getDataCount() {
return instance.getDataMap().size();
@ -418,10 +423,11 @@ public final class SentBodyProto {
/**
* <code>map&lt;string, string&gt; data = 3;</code>
*/
@Override
public boolean containsData(
String key) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
return instance.getDataMap().containsKey(key);
}
@ -436,7 +442,7 @@ public final class SentBodyProto {
public Builder removeData(
String key) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
copyOnWrite();
instance.getMutableDataMap().remove(key);
return this;
@ -444,6 +450,7 @@ public final class SentBodyProto {
/**
* Use {@link #getDataMap()} instead.
*/
@Override
@Deprecated
public java.util.Map<String, String> getData() {
return getDataMap();
@ -451,6 +458,7 @@ public final class SentBodyProto {
/**
* <code>map&lt;string, string&gt; data = 3;</code>
*/
@Override
public java.util.Map<String, String> getDataMap() {
return java.util.Collections.unmodifiableMap(
instance.getDataMap());
@ -458,11 +466,12 @@ public final class SentBodyProto {
/**
* <code>map&lt;string, string&gt; data = 3;</code>
*/
@Override
public String getDataOrDefault(
String key,
String defaultValue) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
java.util.Map<String, String> map =
instance.getDataMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
@ -470,10 +479,11 @@ public final class SentBodyProto {
/**
* <code>map&lt;string, string&gt; data = 3;</code>
*/
@Override
public String getDataOrThrow(
String key) {
if (key == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
java.util.Map<String, String> map =
instance.getDataMap();
if (!map.containsKey(key)) {
@ -487,8 +497,8 @@ public final class SentBodyProto {
public Builder putData(
String key,
String value) {
if (key == null) { throw new NullPointerException(); }
if (value == null) { throw new NullPointerException(); }
Class<?> keyClass = key.getClass();
Class<?> valueClass = value.getClass();
copyOnWrite();
instance.getMutableDataMap().put(key, value);
return this;
@ -503,118 +513,80 @@ public final class SentBodyProto {
return this;
}
// @@protoc_insertion_point(builder_scope:com.farsunset.cim.sdk.android.model.proto.Model)
// @@protoc_insertion_point(builder_scope:com.farsunset.cim.sdk.android.model.proto.SentModel)
}
@Override
@SuppressWarnings({"unchecked", "fallthrough"})
protected final Object dynamicMethod(
MethodToInvoke method,
Object arg0, Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new Model();
}
case IS_INITIALIZED: {
return DEFAULT_INSTANCE;
}
case MAKE_IMMUTABLE: {
data_.makeImmutable();
return null;
return new SentModel();
}
case NEW_BUILDER: {
return new Builder();
}
case VISIT: {
Visitor visitor = (Visitor) arg0;
Model other = (Model) arg1;
key_ = visitor.visitString(!key_.isEmpty(), key_,
!other.key_.isEmpty(), other.key_);
timestamp_ = visitor.visitLong(timestamp_ != 0L, timestamp_,
other.timestamp_ != 0L, other.timestamp_);
data_ = visitor.visitMap(
data_, other.internalGetData());
if (visitor == MergeFromVisitor
.INSTANCE) {
bitField0_ |= other.bitField0_;
}
return this;
}
case MERGE_FROM_STREAM: {
com.google.protobuf.CodedInputStream input =
(com.google.protobuf.CodedInputStream) arg0;
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
(com.google.protobuf.ExtensionRegistryLite) arg1;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
String s = input.readStringRequireUtf8();
key_ = s;
break;
}
case 16: {
timestamp_ = input.readInt64();
break;
}
case 26: {
if (!data_.isMutable()) {
data_ = data_.mutableCopy();
}
DataDefaultEntryHolder.defaultEntry.parseInto(data_, input, extensionRegistry); break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
throw new RuntimeException(
new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this));
} finally {
}
case BUILD_MESSAGE_INFO: {
Object[] objects = new Object[] {
"key_",
"timestamp_",
"data_",
DataDefaultEntryHolder.defaultEntry,
};
String info =
"\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0001\u0000\u0000\u0001\u0208\u0002\u0002" +
"\u00032";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
if (PARSER == null) { synchronized (Model.class) {
if (PARSER == null) {
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
com.google.protobuf.Parser<SentModel> parser = PARSER;
if (parser == null) {
synchronized (SentModel.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser<SentModel>(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return PARSER;
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:com.farsunset.cim.sdk.android.model.proto.Model)
private static final Model DEFAULT_INSTANCE;
// @@protoc_insertion_point(class_scope:com.farsunset.cim.sdk.android.model.proto.SentModel)
private static final SentModel DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new Model();
DEFAULT_INSTANCE.makeImmutable();
SentModel defaultInstance = new SentModel();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
SentModel.class, defaultInstance);
}
public static Model getDefaultInstance() {
public static SentModel getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser<Model> PARSER;
private static volatile com.google.protobuf.Parser<SentModel> PARSER;
public static com.google.protobuf.Parser<Model> parser() {
public static com.google.protobuf.Parser<SentModel> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@ -1,7 +1,7 @@
syntax = "proto3";
package com.farsunset.cim.sdk.android.model.proto;
option java_outer_classname = "MessageProto";
message Model {
message MessageModel {
int64 id = 1;
string action = 2;
string content = 3;

View File

@ -2,7 +2,7 @@ syntax = "proto3";
package com.farsunset.cim.sdk.android.model.proto;
option java_outer_classname = "ReplyBodyProto";
message Model {
message ReplyModel {
string key = 1;
string code = 2;
string message = 3;

View File

@ -2,7 +2,7 @@ syntax = "proto3";
package com.farsunset.cim.sdk.android.model.proto;
option java_outer_classname = "SentBodyProto";
message Model {
message SentModel {
string key = 1;
int64 timestamp = 2;
map<string, string> data = 3;