// Generated by the protocol buffer compiler. DO NOT EDIT! // source: ChatData.proto package protocol.Data; public final class ChatData { private ChatData() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } public interface ChatItemOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL]; /** * <code>optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL];</code> */ boolean hasTargetType(); /** * <code>optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL];</code> */ protocol.Data.ChatData.ChatItem.TargetType getTargetType(); // optional string sendUserId = 2; /** * <code>optional string sendUserId = 2;</code> */ boolean hasSendUserId(); /** * <code>optional string sendUserId = 2;</code> */ java.lang.String getSendUserId(); /** * <code>optional string sendUserId = 2;</code> */ com.google.protobuf.ByteString getSendUserIdBytes(); // required string receiveUserId = 3; /** * <code>required string receiveUserId = 3;</code> */ boolean hasReceiveUserId(); /** * <code>required string receiveUserId = 3;</code> */ java.lang.String getReceiveUserId(); /** * <code>required string receiveUserId = 3;</code> */ com.google.protobuf.ByteString getReceiveUserIdBytes(); // required .protocol.ChatItem.ChatType chatType = 4; /** * <code>required .protocol.ChatItem.ChatType chatType = 4;</code> */ boolean hasChatType(); /** * <code>required .protocol.ChatItem.ChatType chatType = 4;</code> */ protocol.Data.ChatData.ChatItem.ChatType getChatType(); // required string chatBody = 5; /** * <code>required string chatBody = 5;</code> */ boolean hasChatBody(); /** * <code>required string chatBody = 5;</code> */ java.lang.String getChatBody(); /** * <code>required string chatBody = 5;</code> */ com.google.protobuf.ByteString getChatBodyBytes(); // optional int64 date = 6; /** * <code>optional int64 date = 6;</code> */ boolean hasDate(); /** * <code>optional int64 date = 6;</code> */ long getDate(); } /** * Protobuf type {@code protocol.ChatItem} */ public static final class ChatItem extends com.google.protobuf.GeneratedMessage implements ChatItemOrBuilder { // Use ChatItem.newBuilder() to construct. private ChatItem(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private ChatItem(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final ChatItem defaultInstance; public static ChatItem getDefaultInstance() { return defaultInstance; } public ChatItem getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ChatItem( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { int rawValue = input.readEnum(); protocol.Data.ChatData.ChatItem.TargetType value = protocol.Data.ChatData.ChatItem.TargetType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; targetType_ = value; } break; } case 18: { bitField0_ |= 0x00000002; sendUserId_ = input.readBytes(); break; } case 26: { bitField0_ |= 0x00000004; receiveUserId_ = input.readBytes(); break; } case 32: { int rawValue = input.readEnum(); protocol.Data.ChatData.ChatItem.ChatType value = protocol.Data.ChatData.ChatItem.ChatType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(4, rawValue); } else { bitField0_ |= 0x00000008; chatType_ = value; } break; } case 42: { bitField0_ |= 0x00000010; chatBody_ = input.readBytes(); break; } case 48: { bitField0_ |= 0x00000020; date_ = input.readInt64(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return protocol.Data.ChatData.internal_static_protocol_ChatItem_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return protocol.Data.ChatData.internal_static_protocol_ChatItem_fieldAccessorTable .ensureFieldAccessorsInitialized( protocol.Data.ChatData.ChatItem.class, protocol.Data.ChatData.ChatItem.Builder.class); } public static com.google.protobuf.Parser<ChatItem> PARSER = new com.google.protobuf.AbstractParser<ChatItem>() { public ChatItem parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ChatItem(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<ChatItem> getParserForType() { return PARSER; } /** * Protobuf enum {@code protocol.ChatItem.ChatType} */ public enum ChatType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>TEXT = 0;</code> */ TEXT(0, 0), /** * <code>IMAGE = 1;</code> */ IMAGE(1, 1), ; /** * <code>TEXT = 0;</code> */ public static final int TEXT_VALUE = 0; /** * <code>IMAGE = 1;</code> */ public static final int IMAGE_VALUE = 1; public final int getNumber() { return value; } public static ChatType valueOf(int value) { switch (value) { case 0: return TEXT; case 1: return IMAGE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<ChatType> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<ChatType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<ChatType>() { public ChatType findValueByNumber(int number) { return ChatType.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return protocol.Data.ChatData.ChatItem.getDescriptor().getEnumTypes().get(0); } private static final ChatType[] VALUES = values(); public static ChatType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; private ChatType(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:protocol.ChatItem.ChatType) } /** * Protobuf enum {@code protocol.ChatItem.TargetType} */ public enum TargetType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>INDIVIDUAL = 0;</code> */ INDIVIDUAL(0, 0), /** * <code>GROUP = 1;</code> */ GROUP(1, 1), /** * <code>SYSTEM = 2;</code> */ SYSTEM(2, 2), ; /** * <code>INDIVIDUAL = 0;</code> */ public static final int INDIVIDUAL_VALUE = 0; /** * <code>GROUP = 1;</code> */ public static final int GROUP_VALUE = 1; /** * <code>SYSTEM = 2;</code> */ public static final int SYSTEM_VALUE = 2; public final int getNumber() { return value; } public static TargetType valueOf(int value) { switch (value) { case 0: return INDIVIDUAL; case 1: return GROUP; case 2: return SYSTEM; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<TargetType> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<TargetType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<TargetType>() { public TargetType findValueByNumber(int number) { return TargetType.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return protocol.Data.ChatData.ChatItem.getDescriptor().getEnumTypes().get(1); } private static final TargetType[] VALUES = values(); public static TargetType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; private TargetType(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:protocol.ChatItem.TargetType) } private int bitField0_; // optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL]; public static final int TARGETTYPE_FIELD_NUMBER = 1; private protocol.Data.ChatData.ChatItem.TargetType targetType_; /** * <code>optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL];</code> */ public boolean hasTargetType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL];</code> */ public protocol.Data.ChatData.ChatItem.TargetType getTargetType() { return targetType_; } // optional string sendUserId = 2; public static final int SENDUSERID_FIELD_NUMBER = 2; private java.lang.Object sendUserId_; /** * <code>optional string sendUserId = 2;</code> */ public boolean hasSendUserId() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string sendUserId = 2;</code> */ public java.lang.String getSendUserId() { java.lang.Object ref = sendUserId_; 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(); if (bs.isValidUtf8()) { sendUserId_ = s; } return s; } } /** * <code>optional string sendUserId = 2;</code> */ public com.google.protobuf.ByteString getSendUserIdBytes() { java.lang.Object ref = sendUserId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); sendUserId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // required string receiveUserId = 3; public static final int RECEIVEUSERID_FIELD_NUMBER = 3; private java.lang.Object receiveUserId_; /** * <code>required string receiveUserId = 3;</code> */ public boolean hasReceiveUserId() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required string receiveUserId = 3;</code> */ public java.lang.String getReceiveUserId() { java.lang.Object ref = receiveUserId_; 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(); if (bs.isValidUtf8()) { receiveUserId_ = s; } return s; } } /** * <code>required string receiveUserId = 3;</code> */ public com.google.protobuf.ByteString getReceiveUserIdBytes() { java.lang.Object ref = receiveUserId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); receiveUserId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // required .protocol.ChatItem.ChatType chatType = 4; public static final int CHATTYPE_FIELD_NUMBER = 4; private protocol.Data.ChatData.ChatItem.ChatType chatType_; /** * <code>required .protocol.ChatItem.ChatType chatType = 4;</code> */ public boolean hasChatType() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>required .protocol.ChatItem.ChatType chatType = 4;</code> */ public protocol.Data.ChatData.ChatItem.ChatType getChatType() { return chatType_; } // required string chatBody = 5; public static final int CHATBODY_FIELD_NUMBER = 5; private java.lang.Object chatBody_; /** * <code>required string chatBody = 5;</code> */ public boolean hasChatBody() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>required string chatBody = 5;</code> */ public java.lang.String getChatBody() { java.lang.Object ref = chatBody_; 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(); if (bs.isValidUtf8()) { chatBody_ = s; } return s; } } /** * <code>required string chatBody = 5;</code> */ public com.google.protobuf.ByteString getChatBodyBytes() { java.lang.Object ref = chatBody_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); chatBody_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // optional int64 date = 6; public static final int DATE_FIELD_NUMBER = 6; private long date_; /** * <code>optional int64 date = 6;</code> */ public boolean hasDate() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional int64 date = 6;</code> */ public long getDate() { return date_; } private void initFields() { targetType_ = protocol.Data.ChatData.ChatItem.TargetType.INDIVIDUAL; sendUserId_ = ""; receiveUserId_ = ""; chatType_ = protocol.Data.ChatData.ChatItem.ChatType.TEXT; chatBody_ = ""; date_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasReceiveUserId()) { memoizedIsInitialized = 0; return false; } if (!hasChatType()) { memoizedIsInitialized = 0; return false; } if (!hasChatBody()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, targetType_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getSendUserIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getReceiveUserIdBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeEnum(4, chatType_.getNumber()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, getChatBodyBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeInt64(6, date_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, targetType_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getSendUserIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getReceiveUserIdBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, chatType_.getNumber()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, getChatBodyBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(6, date_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static protocol.Data.ChatData.ChatItem parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protocol.Data.ChatData.ChatItem parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protocol.Data.ChatData.ChatItem parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protocol.Data.ChatData.ChatItem parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protocol.Data.ChatData.ChatItem parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static protocol.Data.ChatData.ChatItem parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static protocol.Data.ChatData.ChatItem parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static protocol.Data.ChatData.ChatItem parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static protocol.Data.ChatData.ChatItem parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static protocol.Data.ChatData.ChatItem parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(protocol.Data.ChatData.ChatItem prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code protocol.ChatItem} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements protocol.Data.ChatData.ChatItemOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return protocol.Data.ChatData.internal_static_protocol_ChatItem_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return protocol.Data.ChatData.internal_static_protocol_ChatItem_fieldAccessorTable .ensureFieldAccessorsInitialized( protocol.Data.ChatData.ChatItem.class, protocol.Data.ChatData.ChatItem.Builder.class); } // Construct using protocol.Data.ChatData.ChatItem.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); targetType_ = protocol.Data.ChatData.ChatItem.TargetType.INDIVIDUAL; bitField0_ = (bitField0_ & ~0x00000001); sendUserId_ = ""; bitField0_ = (bitField0_ & ~0x00000002); receiveUserId_ = ""; bitField0_ = (bitField0_ & ~0x00000004); chatType_ = protocol.Data.ChatData.ChatItem.ChatType.TEXT; bitField0_ = (bitField0_ & ~0x00000008); chatBody_ = ""; bitField0_ = (bitField0_ & ~0x00000010); date_ = 0L; bitField0_ = (bitField0_ & ~0x00000020); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return protocol.Data.ChatData.internal_static_protocol_ChatItem_descriptor; } public protocol.Data.ChatData.ChatItem getDefaultInstanceForType() { return protocol.Data.ChatData.ChatItem.getDefaultInstance(); } public protocol.Data.ChatData.ChatItem build() { protocol.Data.ChatData.ChatItem result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public protocol.Data.ChatData.ChatItem buildPartial() { protocol.Data.ChatData.ChatItem result = new protocol.Data.ChatData.ChatItem(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.targetType_ = targetType_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.sendUserId_ = sendUserId_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.receiveUserId_ = receiveUserId_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.chatType_ = chatType_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.chatBody_ = chatBody_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.date_ = date_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof protocol.Data.ChatData.ChatItem) { return mergeFrom((protocol.Data.ChatData.ChatItem)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(protocol.Data.ChatData.ChatItem other) { if (other == protocol.Data.ChatData.ChatItem.getDefaultInstance()) return this; if (other.hasTargetType()) { setTargetType(other.getTargetType()); } if (other.hasSendUserId()) { bitField0_ |= 0x00000002; sendUserId_ = other.sendUserId_; onChanged(); } if (other.hasReceiveUserId()) { bitField0_ |= 0x00000004; receiveUserId_ = other.receiveUserId_; onChanged(); } if (other.hasChatType()) { setChatType(other.getChatType()); } if (other.hasChatBody()) { bitField0_ |= 0x00000010; chatBody_ = other.chatBody_; onChanged(); } if (other.hasDate()) { setDate(other.getDate()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasReceiveUserId()) { return false; } if (!hasChatType()) { return false; } if (!hasChatBody()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { protocol.Data.ChatData.ChatItem parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (protocol.Data.ChatData.ChatItem) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL]; private protocol.Data.ChatData.ChatItem.TargetType targetType_ = protocol.Data.ChatData.ChatItem.TargetType.INDIVIDUAL; /** * <code>optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL];</code> */ public boolean hasTargetType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL];</code> */ public protocol.Data.ChatData.ChatItem.TargetType getTargetType() { return targetType_; } /** * <code>optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL];</code> */ public Builder setTargetType(protocol.Data.ChatData.ChatItem.TargetType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; targetType_ = value; onChanged(); return this; } /** * <code>optional .protocol.ChatItem.TargetType targetType = 1 [default = INDIVIDUAL];</code> */ public Builder clearTargetType() { bitField0_ = (bitField0_ & ~0x00000001); targetType_ = protocol.Data.ChatData.ChatItem.TargetType.INDIVIDUAL; onChanged(); return this; } // optional string sendUserId = 2; private java.lang.Object sendUserId_ = ""; /** * <code>optional string sendUserId = 2;</code> */ public boolean hasSendUserId() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string sendUserId = 2;</code> */ public java.lang.String getSendUserId() { java.lang.Object ref = sendUserId_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); sendUserId_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>optional string sendUserId = 2;</code> */ public com.google.protobuf.ByteString getSendUserIdBytes() { java.lang.Object ref = sendUserId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); sendUserId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string sendUserId = 2;</code> */ public Builder setSendUserId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; sendUserId_ = value; onChanged(); return this; } /** * <code>optional string sendUserId = 2;</code> */ public Builder clearSendUserId() { bitField0_ = (bitField0_ & ~0x00000002); sendUserId_ = getDefaultInstance().getSendUserId(); onChanged(); return this; } /** * <code>optional string sendUserId = 2;</code> */ public Builder setSendUserIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; sendUserId_ = value; onChanged(); return this; } // required string receiveUserId = 3; private java.lang.Object receiveUserId_ = ""; /** * <code>required string receiveUserId = 3;</code> */ public boolean hasReceiveUserId() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required string receiveUserId = 3;</code> */ public java.lang.String getReceiveUserId() { java.lang.Object ref = receiveUserId_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); receiveUserId_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>required string receiveUserId = 3;</code> */ public com.google.protobuf.ByteString getReceiveUserIdBytes() { java.lang.Object ref = receiveUserId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); receiveUserId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>required string receiveUserId = 3;</code> */ public Builder setReceiveUserId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; receiveUserId_ = value; onChanged(); return this; } /** * <code>required string receiveUserId = 3;</code> */ public Builder clearReceiveUserId() { bitField0_ = (bitField0_ & ~0x00000004); receiveUserId_ = getDefaultInstance().getReceiveUserId(); onChanged(); return this; } /** * <code>required string receiveUserId = 3;</code> */ public Builder setReceiveUserIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; receiveUserId_ = value; onChanged(); return this; } // required .protocol.ChatItem.ChatType chatType = 4; private protocol.Data.ChatData.ChatItem.ChatType chatType_ = protocol.Data.ChatData.ChatItem.ChatType.TEXT; /** * <code>required .protocol.ChatItem.ChatType chatType = 4;</code> */ public boolean hasChatType() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>required .protocol.ChatItem.ChatType chatType = 4;</code> */ public protocol.Data.ChatData.ChatItem.ChatType getChatType() { return chatType_; } /** * <code>required .protocol.ChatItem.ChatType chatType = 4;</code> */ public Builder setChatType(protocol.Data.ChatData.ChatItem.ChatType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; chatType_ = value; onChanged(); return this; } /** * <code>required .protocol.ChatItem.ChatType chatType = 4;</code> */ public Builder clearChatType() { bitField0_ = (bitField0_ & ~0x00000008); chatType_ = protocol.Data.ChatData.ChatItem.ChatType.TEXT; onChanged(); return this; } // required string chatBody = 5; private java.lang.Object chatBody_ = ""; /** * <code>required string chatBody = 5;</code> */ public boolean hasChatBody() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>required string chatBody = 5;</code> */ public java.lang.String getChatBody() { java.lang.Object ref = chatBody_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); chatBody_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>required string chatBody = 5;</code> */ public com.google.protobuf.ByteString getChatBodyBytes() { java.lang.Object ref = chatBody_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); chatBody_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>required string chatBody = 5;</code> */ public Builder setChatBody( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; chatBody_ = value; onChanged(); return this; } /** * <code>required string chatBody = 5;</code> */ public Builder clearChatBody() { bitField0_ = (bitField0_ & ~0x00000010); chatBody_ = getDefaultInstance().getChatBody(); onChanged(); return this; } /** * <code>required string chatBody = 5;</code> */ public Builder setChatBodyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; chatBody_ = value; onChanged(); return this; } // optional int64 date = 6; private long date_ ; /** * <code>optional int64 date = 6;</code> */ public boolean hasDate() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional int64 date = 6;</code> */ public long getDate() { return date_; } /** * <code>optional int64 date = 6;</code> */ public Builder setDate(long value) { bitField0_ |= 0x00000020; date_ = value; onChanged(); return this; } /** * <code>optional int64 date = 6;</code> */ public Builder clearDate() { bitField0_ = (bitField0_ & ~0x00000020); date_ = 0L; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:protocol.ChatItem) } static { defaultInstance = new ChatItem(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:protocol.ChatItem) } private static com.google.protobuf.Descriptors.Descriptor internal_static_protocol_ChatItem_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_protocol_ChatItem_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\016ChatData.proto\022\010protocol\"\231\002\n\010ChatItem\022" + "=\n\ntargetType\030\001 \001(\0162\035.protocol.ChatItem." + "TargetType:\nINDIVIDUAL\022\022\n\nsendUserId\030\002 \001" + "(\t\022\025\n\rreceiveUserId\030\003 \002(\t\022-\n\010chatType\030\004 " + "\002(\0162\033.protocol.ChatItem.ChatType\022\020\n\010chat" + "Body\030\005 \002(\t\022\014\n\004date\030\006 \001(\003\"\037\n\010ChatType\022\010\n\004" + "TEXT\020\000\022\t\n\005IMAGE\020\001\"3\n\nTargetType\022\016\n\nINDIV" + "IDUAL\020\000\022\t\n\005GROUP\020\001\022\n\n\006SYSTEM\020\002B\017\n\rprotoc" + "ol.Data" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; internal_static_protocol_ChatItem_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_protocol_ChatItem_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_protocol_ChatItem_descriptor, new java.lang.String[] { "TargetType", "SendUserId", "ReceiveUserId", "ChatType", "ChatBody", "Date", }); return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } // @@protoc_insertion_point(outer_class_scope) }