//Generated by the protocol buffer compiler. DO NOT EDIT!//source: proto/player.proto
packagecom.example.netty.lesson8;public final classPlayerModule {privatePlayerModule() {}public static voidregisterAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}public interfacePBPlayerOrBuilderextendscom.google.protobuf.MessageOrBuilder {//required int64 playerId = 1;
booleanhasPlayerId();longgetPlayerId();//required int32 age = 2; required表示必须要设置值,否则使用会报错
booleanhasAge();intgetAge();//required string name = 3;
booleanhasName();
String getName();//repeated int32 skills = 4;
java.util.ListgetSkillsList();intgetSkillsCount();int getSkills(intindex);
}public static final class PBPlayer extendscom.google.protobuf.GeneratedMessageimplementsPBPlayerOrBuilder {//Use PBPlayer.newBuilder() to construct.
privatePBPlayer(Builder builder) {super(builder);
}private PBPlayer(booleannoInit) {}private static finalPBPlayer defaultInstance;public staticPBPlayer getDefaultInstance() {returndefaultInstance;
}publicPBPlayer getDefaultInstanceForType() {returndefaultInstance;
}public static finalcom.google.protobuf.Descriptors.Descriptor
getDescriptor() {returncom.example.netty.lesson8.PlayerModule.internal_static_PBPlayer_descriptor;
}protectedcom.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {returncom.example.netty.lesson8.PlayerModule.internal_static_PBPlayer_fieldAccessorTable;
}private intbitField0_;//required int64 playerId = 1;
public static final int PLAYERID_FIELD_NUMBER = 1;private longplayerId_;public booleanhasPlayerId() {return ((bitField0_ & 0x00000001) == 0x00000001);
}public longgetPlayerId() {returnplayerId_;
}//required int32 age = 2;
public static final int AGE_FIELD_NUMBER = 2;private intage_;public booleanhasAge() {return ((bitField0_ & 0x00000002) == 0x00000002);
}public intgetAge() {returnage_;
}//required string name = 3;
public static final int NAME_FIELD_NUMBER = 3;privatejava.lang.Object name_;public booleanhasName() {return ((bitField0_ & 0x00000004) == 0x00000004);
}publicString getName() {
java.lang.Object ref=name_;if (ref instanceofString) {return(String) ref;
}else{
com.google.protobuf.ByteString bs=(com.google.protobuf.ByteString) ref;
String s=bs.toStringUtf8();if(com.google.protobuf.Internal.isValidUtf8(bs)) {
name_=s;
}returns;
}
}privatecom.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref=name_;if (ref instanceofString) {
com.google.protobuf.ByteString b=com.google.protobuf.ByteString.copyFromUtf8((String) ref);
name_=b;returnb;
}else{return(com.google.protobuf.ByteString) ref;
}
}//repeated int32 skills = 4;
public static final int SKILLS_FIELD_NUMBER = 4;private java.util.Listskills_;public java.util.ListgetSkillsList() {returnskills_;
}public intgetSkillsCount() {returnskills_.size();
}public int getSkills(intindex) {returnskills_.get(index);
}private voidinitFields() {
playerId_= 0L;
age_= 0;
name_= "";
skills_=java.util.Collections.emptyList();;
}private byte memoizedIsInitialized = -1;public final booleanisInitialized() {byte isInitialized =memoizedIsInitialized;if (isInitialized != -1) return isInitialized == 1;if (!hasPlayerId()) {
memoizedIsInitialized= 0;return false;
}if (!hasAge()) {
memoizedIsInitialized= 0;return false;
}if (!hasName()) {
memoizedIsInitialized= 0;return false;
}
memoizedIsInitialized= 1;return true;
}public voidwriteTo(com.google.protobuf.CodedOutputStream output)throwsjava.io.IOException {
getSerializedSize();if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt64(1, playerId_);
}if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, age_);
}if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBytes(3, getNameBytes());
}for (int i = 0; i < skills_.size(); i++) {
output.writeInt32(4, skills_.get(i));
}
getUnknownFields().writeTo(output);
}private int memoizedSerializedSize = -1;public intgetSerializedSize() {int size =memoizedSerializedSize;if (size != -1) returnsize;
size= 0;if (((bitField0_ & 0x00000001) == 0x00000001)) {
size+=com.google.protobuf.CodedOutputStream
.computeInt64Size(1, playerId_);
}if (((bitField0_ & 0x00000002) == 0x00000002)) {
size+=com.google.protobuf.CodedOutputStream
.computeInt32Size(2, age_);
}if (((bitField0_ & 0x00000004) == 0x00000004)) {
size+=com.google.protobuf.CodedOutputStream
.computeBytesSize(3, getNameBytes());
}
{int dataSize = 0;for (int i = 0; i < skills_.size(); i++) {
dataSize+=com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(skills_.get(i));
}
size+=dataSize;
size+= 1 *getSkillsList().size();
}
size+=getUnknownFields().getSerializedSize();
memoizedSerializedSize=size;returnsize;
}private static final long serialVersionUID = 0L;
@java.lang.Overrideprotectedjava.lang.Object writeReplace()throwsjava.io.ObjectStreamException {return super.writeReplace();
}public staticcom.example.netty.lesson8.PlayerModule.PBPlayer parseFrom(
com.google.protobuf.ByteString data)throwscom.google.protobuf.InvalidProtocolBufferException {returnnewBuilder().mergeFrom(data).buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBPlayer parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwscom.google.protobuf.InvalidProtocolBufferException {returnnewBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}public static com.example.netty.lesson8.PlayerModule.PBPlayer parseFrom(byte[] data)throwscom.google.protobuf.InvalidProtocolBufferException {returnnewBuilder().mergeFrom(data).buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBPlayer parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwscom.google.protobuf.InvalidProtocolBufferException {returnnewBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBPlayer parseFrom(java.io.InputStream input)throwsjava.io.IOException {returnnewBuilder().mergeFrom(input).buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBPlayer parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwsjava.io.IOException {returnnewBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBPlayer parseDelimitedFrom(java.io.InputStream input)throwsjava.io.IOException {
Builder builder=newBuilder();if(builder.mergeDelimitedFrom(input)) {returnbuilder.buildParsed();
}else{return null;
}
}public staticcom.example.netty.lesson8.PlayerModule.PBPlayer parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwsjava.io.IOException {
Builder builder=newBuilder();if(builder.mergeDelimitedFrom(input, extensionRegistry)) {returnbuilder.buildParsed();
}else{return null;
}
}public staticcom.example.netty.lesson8.PlayerModule.PBPlayer parseFrom(
com.google.protobuf.CodedInputStream input)throwsjava.io.IOException {returnnewBuilder().mergeFrom(input).buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBPlayer parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwsjava.io.IOException {returnnewBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}public static Builder newBuilder() { returnBuilder.create(); }public Builder newBuilderForType() { returnnewBuilder(); }public staticBuilder newBuilder(com.example.netty.lesson8.PlayerModule.PBPlayer prototype) {returnnewBuilder().mergeFrom(prototype);
}public Builder toBuilder() { return newBuilder(this); }
@java.lang.OverrideprotectedBuilder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder= newBuilder(parent);returnbuilder;
}public static final class Builder extendscom.google.protobuf.GeneratedMessage.Builder
implementscom.example.netty.lesson8.PlayerModule.PBPlayerOrBuilder {public static finalcom.google.protobuf.Descriptors.Descriptor
getDescriptor() {returncom.example.netty.lesson8.PlayerModule.internal_static_PBPlayer_descriptor;
}protectedcom.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {returncom.example.netty.lesson8.PlayerModule.internal_static_PBPlayer_fieldAccessorTable;
}//Construct using com.example.netty.lesson8.PlayerModule.PBPlayer.newBuilder()
privateBuilder() {
maybeForceBuilderInitialization();
}privateBuilder(BuilderParent parent) {super(parent);
maybeForceBuilderInitialization();
}private voidmaybeForceBuilderInitialization() {if(com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}private staticBuilder create() {return newBuilder();
}publicBuilder clear() {super.clear();
playerId_= 0L;
bitField0_= (bitField0_ & ~0x00000001);
age_= 0;
bitField0_= (bitField0_ & ~0x00000002);
name_= "";
bitField0_= (bitField0_ & ~0x00000004);
skills_=java.util.Collections.emptyList();;
bitField0_= (bitField0_ & ~0x00000008);return this;
}publicBuilder clone() {returncreate().mergeFrom(buildPartial());
}publiccom.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {returncom.example.netty.lesson8.PlayerModule.PBPlayer.getDescriptor();
}publiccom.example.netty.lesson8.PlayerModule.PBPlayer getDefaultInstanceForType() {returncom.example.netty.lesson8.PlayerModule.PBPlayer.getDefaultInstance();
}publiccom.example.netty.lesson8.PlayerModule.PBPlayer build() {
com.example.netty.lesson8.PlayerModule.PBPlayer result=buildPartial();if (!result.isInitialized()) {thrownewUninitializedMessageException(result);
}returnresult;
}privatecom.example.netty.lesson8.PlayerModule.PBPlayer buildParsed()throwscom.google.protobuf.InvalidProtocolBufferException {
com.example.netty.lesson8.PlayerModule.PBPlayer result=buildPartial();if (!result.isInitialized()) {thrownewUninitializedMessageException(
result).asInvalidProtocolBufferException();
}returnresult;
}publiccom.example.netty.lesson8.PlayerModule.PBPlayer buildPartial() {
com.example.netty.lesson8.PlayerModule.PBPlayer result= new com.example.netty.lesson8.PlayerModule.PBPlayer(this);int from_bitField0_ =bitField0_;int to_bitField0_ = 0;if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_|= 0x00000001;
}
result.playerId_=playerId_;if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_|= 0x00000002;
}
result.age_=age_;if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_|= 0x00000004;
}
result.name_=name_;if (((bitField0_ & 0x00000008) == 0x00000008)) {
skills_=java.util.Collections.unmodifiableList(skills_);
bitField0_= (bitField0_ & ~0x00000008);
}
result.skills_=skills_;
result.bitField0_=to_bitField0_;
onBuilt();returnresult;
}publicBuilder mergeFrom(com.google.protobuf.Message other) {if (other instanceofcom.example.netty.lesson8.PlayerModule.PBPlayer) {returnmergeFrom((com.example.netty.lesson8.PlayerModule.PBPlayer)other);
}else{super.mergeFrom(other);return this;
}
}publicBuilder mergeFrom(com.example.netty.lesson8.PlayerModule.PBPlayer other) {if (other == com.example.netty.lesson8.PlayerModule.PBPlayer.getDefaultInstance()) return this;if(other.hasPlayerId()) {
setPlayerId(other.getPlayerId());
}if(other.hasAge()) {
setAge(other.getAge());
}if(other.hasName()) {
setName(other.getName());
}if (!other.skills_.isEmpty()) {if(skills_.isEmpty()) {
skills_=other.skills_;
bitField0_= (bitField0_ & ~0x00000008);
}else{
ensureSkillsIsMutable();
skills_.addAll(other.skills_);
}
onChanged();
}this.mergeUnknownFields(other.getUnknownFields());return this;
}public final booleanisInitialized() {if (!hasPlayerId()) {return false;
}if (!hasAge()) {return false;
}if (!hasName()) {return false;
}return true;
}publicBuilder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwsjava.io.IOException {
com.google.protobuf.UnknownFieldSet.Builder unknownFields=com.google.protobuf.UnknownFieldSet.newBuilder(this.getUnknownFields());while (true) {int tag =input.readTag();switch(tag) {case 0:this.setUnknownFields(unknownFields.build());
onChanged();return this;default: {if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {this.setUnknownFields(unknownFields.build());
onChanged();return this;
}break;
}case 8: {
bitField0_|= 0x00000001;
playerId_=input.readInt64();break;
}case 16: {
bitField0_|= 0x00000002;
age_=input.readInt32();break;
}case 26: {
bitField0_|= 0x00000004;
name_=input.readBytes();break;
}case 32: {
ensureSkillsIsMutable();
skills_.add(input.readInt32());break;
}case 34: {int length =input.readRawVarint32();int limit =input.pushLimit(length);while (input.getBytesUntilLimit() > 0) {
addSkills(input.readInt32());
}
input.popLimit(limit);break;
}
}
}
}private intbitField0_;//required int64 playerId = 1;
private longplayerId_ ;public booleanhasPlayerId() {return ((bitField0_ & 0x00000001) == 0x00000001);
}public longgetPlayerId() {returnplayerId_;
}public Builder setPlayerId(longvalue) {
bitField0_|= 0x00000001;
playerId_=value;
onChanged();return this;
}publicBuilder clearPlayerId() {
bitField0_= (bitField0_ & ~0x00000001);
playerId_= 0L;
onChanged();return this;
}//required int32 age = 2;
private intage_ ;public booleanhasAge() {return ((bitField0_ & 0x00000002) == 0x00000002);
}public intgetAge() {returnage_;
}public Builder setAge(intvalue) {
bitField0_|= 0x00000002;
age_=value;
onChanged();return this;
}publicBuilder clearAge() {
bitField0_= (bitField0_ & ~0x00000002);
age_= 0;
onChanged();return this;
}//required string name = 3;
private java.lang.Object name_ = "";public booleanhasName() {return ((bitField0_ & 0x00000004) == 0x00000004);
}publicString getName() {
java.lang.Object ref=name_;if (!(ref instanceofString)) {
String s=((com.google.protobuf.ByteString) ref).toStringUtf8();
name_=s;returns;
}else{return(String) ref;
}
}publicBuilder setName(String value) {if (value == null) {throw newNullPointerException();
}
bitField0_|= 0x00000004;
name_=value;
onChanged();return this;
}publicBuilder clearName() {
bitField0_= (bitField0_ & ~0x00000004);
name_=getDefaultInstance().getName();
onChanged();return this;
}voidsetName(com.google.protobuf.ByteString value) {
bitField0_|= 0x00000004;
name_=value;
onChanged();
}//repeated int32 skills = 4;
private java.util.List skills_ =java.util.Collections.emptyList();;private voidensureSkillsIsMutable() {if (!((bitField0_ & 0x00000008) == 0x00000008)) {
skills_= new java.util.ArrayList(skills_);
bitField0_|= 0x00000008;
}
}public java.util.ListgetSkillsList() {returnjava.util.Collections.unmodifiableList(skills_);
}public intgetSkillsCount() {returnskills_.size();
}public int getSkills(intindex) {returnskills_.get(index);
}publicBuilder setSkills(int index, intvalue) {
ensureSkillsIsMutable();
skills_.set(index, value);
onChanged();return this;
}public Builder addSkills(intvalue) {
ensureSkillsIsMutable();
skills_.add(value);
onChanged();return this;
}publicBuilder addAllSkills(
java.lang.Iterable extends java.lang.Integer>values) {
ensureSkillsIsMutable();super.addAll(values, skills_);
onChanged();return this;
}publicBuilder clearSkills() {
skills_=java.util.Collections.emptyList();;
bitField0_= (bitField0_ & ~0x00000008);
onChanged();return this;
}//@@protoc_insertion_point(builder_scope:PBPlayer)
}static{
defaultInstance= new PBPlayer(true);
defaultInstance.initFields();
}//@@protoc_insertion_point(class_scope:PBPlayer)
}public interfacePBResourceOrBuilderextendscom.google.protobuf.MessageOrBuilder {//required int64 gold = 1;
booleanhasGold();longgetGold();//required int32 energy = 2;
booleanhasEnergy();intgetEnergy();
}public static final class PBResource extendscom.google.protobuf.GeneratedMessageimplementsPBResourceOrBuilder {//Use PBResource.newBuilder() to construct.
privatePBResource(Builder builder) {super(builder);
}private PBResource(booleannoInit) {}private static finalPBResource defaultInstance;public staticPBResource getDefaultInstance() {returndefaultInstance;
}publicPBResource getDefaultInstanceForType() {returndefaultInstance;
}public static finalcom.google.protobuf.Descriptors.Descriptor
getDescriptor() {returncom.example.netty.lesson8.PlayerModule.internal_static_PBResource_descriptor;
}protectedcom.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {returncom.example.netty.lesson8.PlayerModule.internal_static_PBResource_fieldAccessorTable;
}private intbitField0_;//required int64 gold = 1;
public static final int GOLD_FIELD_NUMBER = 1;private longgold_;public booleanhasGold() {return ((bitField0_ & 0x00000001) == 0x00000001);
}public longgetGold() {returngold_;
}//required int32 energy = 2;
public static final int ENERGY_FIELD_NUMBER = 2;private intenergy_;public booleanhasEnergy() {return ((bitField0_ & 0x00000002) == 0x00000002);
}public intgetEnergy() {returnenergy_;
}private voidinitFields() {
gold_= 0L;
energy_= 0;
}private byte memoizedIsInitialized = -1;public final booleanisInitialized() {byte isInitialized =memoizedIsInitialized;if (isInitialized != -1) return isInitialized == 1;if (!hasGold()) {
memoizedIsInitialized= 0;return false;
}if (!hasEnergy()) {
memoizedIsInitialized= 0;return false;
}
memoizedIsInitialized= 1;return true;
}public voidwriteTo(com.google.protobuf.CodedOutputStream output)throwsjava.io.IOException {
getSerializedSize();if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt64(1, gold_);
}if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, energy_);
}
getUnknownFields().writeTo(output);
}private int memoizedSerializedSize = -1;public intgetSerializedSize() {int size =memoizedSerializedSize;if (size != -1) returnsize;
size= 0;if (((bitField0_ & 0x00000001) == 0x00000001)) {
size+=com.google.protobuf.CodedOutputStream
.computeInt64Size(1, gold_);
}if (((bitField0_ & 0x00000002) == 0x00000002)) {
size+=com.google.protobuf.CodedOutputStream
.computeInt32Size(2, energy_);
}
size+=getUnknownFields().getSerializedSize();
memoizedSerializedSize=size;returnsize;
}private static final long serialVersionUID = 0L;
@java.lang.Overrideprotectedjava.lang.Object writeReplace()throwsjava.io.ObjectStreamException {return super.writeReplace();
}public staticcom.example.netty.lesson8.PlayerModule.PBResource parseFrom(
com.google.protobuf.ByteString data)throwscom.google.protobuf.InvalidProtocolBufferException {returnnewBuilder().mergeFrom(data).buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBResource parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwscom.google.protobuf.InvalidProtocolBufferException {returnnewBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}public static com.example.netty.lesson8.PlayerModule.PBResource parseFrom(byte[] data)throwscom.google.protobuf.InvalidProtocolBufferException {returnnewBuilder().mergeFrom(data).buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBResource parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwscom.google.protobuf.InvalidProtocolBufferException {returnnewBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBResource parseFrom(java.io.InputStream input)throwsjava.io.IOException {returnnewBuilder().mergeFrom(input).buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBResource parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwsjava.io.IOException {returnnewBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBResource parseDelimitedFrom(java.io.InputStream input)throwsjava.io.IOException {
Builder builder=newBuilder();if(builder.mergeDelimitedFrom(input)) {returnbuilder.buildParsed();
}else{return null;
}
}public staticcom.example.netty.lesson8.PlayerModule.PBResource parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwsjava.io.IOException {
Builder builder=newBuilder();if(builder.mergeDelimitedFrom(input, extensionRegistry)) {returnbuilder.buildParsed();
}else{return null;
}
}public staticcom.example.netty.lesson8.PlayerModule.PBResource parseFrom(
com.google.protobuf.CodedInputStream input)throwsjava.io.IOException {returnnewBuilder().mergeFrom(input).buildParsed();
}public staticcom.example.netty.lesson8.PlayerModule.PBResource parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwsjava.io.IOException {returnnewBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}public static Builder newBuilder() { returnBuilder.create(); }public Builder newBuilderForType() { returnnewBuilder(); }public staticBuilder newBuilder(com.example.netty.lesson8.PlayerModule.PBResource prototype) {returnnewBuilder().mergeFrom(prototype);
}public Builder toBuilder() { return newBuilder(this); }
@java.lang.OverrideprotectedBuilder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder= newBuilder(parent);returnbuilder;
}public static final class Builder extendscom.google.protobuf.GeneratedMessage.Builder
implementscom.example.netty.lesson8.PlayerModule.PBResourceOrBuilder {public static finalcom.google.protobuf.Descriptors.Descriptor
getDescriptor() {returncom.example.netty.lesson8.PlayerModule.internal_static_PBResource_descriptor;
}protectedcom.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {returncom.example.netty.lesson8.PlayerModule.internal_static_PBResource_fieldAccessorTable;
}//Construct using com.example.netty.lesson8.PlayerModule.PBResource.newBuilder()
privateBuilder() {
maybeForceBuilderInitialization();
}privateBuilder(BuilderParent parent) {super(parent);
maybeForceBuilderInitialization();
}private voidmaybeForceBuilderInitialization() {if(com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}private staticBuilder create() {return newBuilder();
}publicBuilder clear() {super.clear();
gold_= 0L;
bitField0_= (bitField0_ & ~0x00000001);
energy_= 0;
bitField0_= (bitField0_ & ~0x00000002);return this;
}publicBuilder clone() {returncreate().mergeFrom(buildPartial());
}publiccom.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {returncom.example.netty.lesson8.PlayerModule.PBResource.getDescriptor();
}publiccom.example.netty.lesson8.PlayerModule.PBResource getDefaultInstanceForType() {returncom.example.netty.lesson8.PlayerModule.PBResource.getDefaultInstance();
}publiccom.example.netty.lesson8.PlayerModule.PBResource build() {
com.example.netty.lesson8.PlayerModule.PBResource result=buildPartial();if (!result.isInitialized()) {thrownewUninitializedMessageException(result);
}returnresult;
}privatecom.example.netty.lesson8.PlayerModule.PBResource buildParsed()throwscom.google.protobuf.InvalidProtocolBufferException {
com.example.netty.lesson8.PlayerModule.PBResource result=buildPartial();if (!result.isInitialized()) {thrownewUninitializedMessageException(
result).asInvalidProtocolBufferException();
}returnresult;
}publiccom.example.netty.lesson8.PlayerModule.PBResource buildPartial() {
com.example.netty.lesson8.PlayerModule.PBResource result= new com.example.netty.lesson8.PlayerModule.PBResource(this);int from_bitField0_ =bitField0_;int to_bitField0_ = 0;if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_|= 0x00000001;
}
result.gold_=gold_;if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_|= 0x00000002;
}
result.energy_=energy_;
result.bitField0_=to_bitField0_;
onBuilt();returnresult;
}publicBuilder mergeFrom(com.google.protobuf.Message other) {if (other instanceofcom.example.netty.lesson8.PlayerModule.PBResource) {returnmergeFrom((com.example.netty.lesson8.PlayerModule.PBResource)other);
}else{super.mergeFrom(other);return this;
}
}publicBuilder mergeFrom(com.example.netty.lesson8.PlayerModule.PBResource other) {if (other == com.example.netty.lesson8.PlayerModule.PBResource.getDefaultInstance()) return this;if(other.hasGold()) {
setGold(other.getGold());
}if(other.hasEnergy()) {
setEnergy(other.getEnergy());
}this.mergeUnknownFields(other.getUnknownFields());return this;
}public final booleanisInitialized() {if (!hasGold()) {return false;
}if (!hasEnergy()) {return false;
}return true;
}publicBuilder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)throwsjava.io.IOException {
com.google.protobuf.UnknownFieldSet.Builder unknownFields=com.google.protobuf.UnknownFieldSet.newBuilder(this.getUnknownFields());while (true) {int tag =input.readTag();switch(tag) {case 0:this.setUnknownFields(unknownFields.build());
onChanged();return this;default: {if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {this.setUnknownFields(unknownFields.build());
onChanged();return this;
}break;
}case 8: {
bitField0_|= 0x00000001;
gold_=input.readInt64();break;
}case 16: {
bitField0_|= 0x00000002;
energy_=input.readInt32();break;
}
}
}
}private intbitField0_;//required int64 gold = 1;
private longgold_ ;public booleanhasGold() {return ((bitField0_ & 0x00000001) == 0x00000001);
}public longgetGold() {returngold_;
}public Builder setGold(longvalue) {
bitField0_|= 0x00000001;
gold_=value;
onChanged();return this;
}publicBuilder clearGold() {
bitField0_= (bitField0_ & ~0x00000001);
gold_= 0L;
onChanged();return this;
}//required int32 energy = 2;
private intenergy_ ;public booleanhasEnergy() {return ((bitField0_ & 0x00000002) == 0x00000002);
}public intgetEnergy() {returnenergy_;
}public Builder setEnergy(intvalue) {
bitField0_|= 0x00000002;
energy_=value;
onChanged();return this;
}publicBuilder clearEnergy() {
bitField0_= (bitField0_ & ~0x00000002);
energy_= 0;
onChanged();return this;
}//@@protoc_insertion_point(builder_scope:PBResource)
}static{
defaultInstance= new PBResource(true);
defaultInstance.initFields();
}//@@protoc_insertion_point(class_scope:PBResource)
}private staticcom.google.protobuf.Descriptors.Descriptor
internal_static_PBPlayer_descriptor;private staticcom.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_PBPlayer_fieldAccessorTable;private staticcom.google.protobuf.Descriptors.Descriptor
internal_static_PBResource_descriptor;private staticcom.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_PBResource_fieldAccessorTable;public staticcom.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {returndescriptor;
}private staticcom.google.protobuf.Descriptors.FileDescriptor
descriptor;static{
java.lang.String[] descriptorData={"\n\022proto/player.proto\"G\n\010PBPlayer\022\020\n\010play" +
"erId\030\001 \002(\003\022\013\n\003age\030\002 \002(\005\022\014\n\004name\030\003 \002(\t\022\016\n" +
"\006skills\030\004 \003(\005\"*\n\nPBResource\022\014\n\004gold\030\001 \002(" +
"\003\022\016\n\006energy\030\002 \002(\005B)\n\031com.example.netty.l" +
"esson8B\014PlayerModule"};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner=
newcom.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {publiccom.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor=root;
internal_static_PBPlayer_descriptor=getDescriptor().getMessageTypes().get(0);
internal_static_PBPlayer_fieldAccessorTable= newcom.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_PBPlayer_descriptor,new java.lang.String[] { "PlayerId", "Age", "Name", "Skills", },
com.example.netty.lesson8.PlayerModule.PBPlayer.class,
com.example.netty.lesson8.PlayerModule.PBPlayer.Builder.class);
internal_static_PBResource_descriptor=getDescriptor().getMessageTypes().get(1);
internal_static_PBResource_fieldAccessorTable= newcom.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_PBResource_descriptor,new java.lang.String[] { "Gold", "Energy", },
com.example.netty.lesson8.PlayerModule.PBResource.class,
com.example.netty.lesson8.PlayerModule.PBResource.Builder.class);return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,newcom.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
}//@@protoc_insertion_point(outer_class_scope)
}