// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: player_model.proto
package com.protos;
public final class PlayerModelProto {
private PlayerModelProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface PlayerModelOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.protos.PlayerModel)
com.google.protobuf.MessageOrBuilder {
/**
* <code>required string name = 1;</code>
*/
boolean hasName();
/**
* <code>required string name = 1;</code>
*/
java.lang.String getName();
/**
* <code>required string name = 1;</code>
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* <code>required int32 player_id = 2;</code>
*/
boolean hasPlayerId();
/**
* <code>required int32 player_id = 2;</code>
*/
int getPlayerId();
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
boolean hasHero();
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
com.protos.HeroProto.Hero getHero();
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
com.protos.HeroProto.HeroOrBuilder getHeroOrBuilder();
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
boolean hasDeck();
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
com.protos.DeckProto.Deck getDeck();
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
com.protos.DeckProto.DeckOrBuilder getDeckOrBuilder();
/**
* <code>optional int32 mana = 5;</code>
*/
boolean hasMana();
/**
* <code>optional int32 mana = 5;</code>
*/
int getMana();
/**
* <code>required int32 max_mana = 6;</code>
*/
boolean hasMaxMana();
/**
* <code>required int32 max_mana = 6;</code>
*/
int getMaxMana();
/**
* <code>optional int32 deck_pos = 7;</code>
*/
boolean hasDeckPos();
/**
* <code>optional int32 deck_pos = 7;</code>
*/
int getDeckPos();
/**
* <code>optional int32 fatigue_damage = 8;</code>
*/
boolean hasFatigueDamage();
/**
* <code>optional int32 fatigue_damage = 8;</code>
*/
int getFatigueDamage();
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
java.util.List<com.protos.MinionProto.Minion>
getMinionsList();
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
com.protos.MinionProto.Minion getMinions(int index);
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
int getMinionsCount();
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
java.util.List<? extends com.protos.MinionProto.MinionOrBuilder>
getMinionsOrBuilderList();
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
com.protos.MinionProto.MinionOrBuilder getMinionsOrBuilder(
int index);
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
java.util.List<com.protos.CardProto.Card>
getHandList();
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
com.protos.CardProto.Card getHand(int index);
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
int getHandCount();
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
java.util.List<? extends com.protos.CardProto.CardOrBuilder>
getHandOrBuilderList();
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
com.protos.CardProto.CardOrBuilder getHandOrBuilder(
int index);
/**
* <code>optional int32 overload = 11;</code>
*/
boolean hasOverload();
/**
* <code>optional int32 overload = 11;</code>
*/
int getOverload();
/**
* <code>optional int32 num_cards_used = 12;</code>
*/
boolean hasNumCardsUsed();
/**
* <code>optional int32 num_cards_used = 12;</code>
*/
int getNumCardsUsed();
/**
* <code>optional int32 turn_number = 13;</code>
*/
boolean hasTurnNumber();
/**
* <code>optional int32 turn_number = 13;</code>
*/
int getTurnNumber();
/**
* <code>optional bool current_player = 14;</code>
*/
boolean hasCurrentPlayer();
/**
* <code>optional bool current_player = 14;</code>
*/
boolean getCurrentPlayer();
/**
* <code>optional bool submit = 15;</code>
*/
boolean hasSubmit();
/**
* <code>optional bool submit = 15;</code>
*/
boolean getSubmit();
}
/**
* Protobuf type {@code com.protos.PlayerModel}
*/
public static final class PlayerModel extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:com.protos.PlayerModel)
PlayerModelOrBuilder {
// Use PlayerModel.newBuilder() to construct.
private PlayerModel(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private PlayerModel(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final PlayerModel defaultInstance;
public static PlayerModel getDefaultInstance() {
return defaultInstance;
}
public PlayerModel getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PlayerModel(
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 10: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
name_ = bs;
break;
}
case 16: {
bitField0_ |= 0x00000002;
playerId_ = input.readInt32();
break;
}
case 26: {
com.protos.HeroProto.Hero.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = hero_.toBuilder();
}
hero_ = input.readMessage(com.protos.HeroProto.Hero.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(hero_);
hero_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34: {
com.protos.DeckProto.Deck.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = deck_.toBuilder();
}
deck_ = input.readMessage(com.protos.DeckProto.Deck.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(deck_);
deck_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 40: {
bitField0_ |= 0x00000010;
mana_ = input.readInt32();
break;
}
case 48: {
bitField0_ |= 0x00000020;
maxMana_ = input.readInt32();
break;
}
case 56: {
bitField0_ |= 0x00000040;
deckPos_ = input.readInt32();
break;
}
case 64: {
bitField0_ |= 0x00000080;
fatigueDamage_ = input.readInt32();
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
minions_ = new java.util.ArrayList<com.protos.MinionProto.Minion>();
mutable_bitField0_ |= 0x00000100;
}
minions_.add(input.readMessage(com.protos.MinionProto.Minion.PARSER, extensionRegistry));
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
hand_ = new java.util.ArrayList<com.protos.CardProto.Card>();
mutable_bitField0_ |= 0x00000200;
}
hand_.add(input.readMessage(com.protos.CardProto.Card.PARSER, extensionRegistry));
break;
}
case 88: {
bitField0_ |= 0x00000100;
overload_ = input.readInt32();
break;
}
case 96: {
bitField0_ |= 0x00000200;
numCardsUsed_ = input.readInt32();
break;
}
case 104: {
bitField0_ |= 0x00000400;
turnNumber_ = input.readInt32();
break;
}
case 112: {
bitField0_ |= 0x00000800;
currentPlayer_ = input.readBool();
break;
}
case 120: {
bitField0_ |= 0x00001000;
submit_ = input.readBool();
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 {
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
minions_ = java.util.Collections.unmodifiableList(minions_);
}
if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
hand_ = java.util.Collections.unmodifiableList(hand_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.protos.PlayerModelProto.internal_static_com_protos_PlayerModel_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.protos.PlayerModelProto.internal_static_com_protos_PlayerModel_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.protos.PlayerModelProto.PlayerModel.class, com.protos.PlayerModelProto.PlayerModel.Builder.class);
}
public static com.google.protobuf.Parser<PlayerModel> PARSER =
new com.google.protobuf.AbstractParser<PlayerModel>() {
public PlayerModel parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PlayerModel(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<PlayerModel> getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private java.lang.Object name_;
/**
* <code>required string name = 1;</code>
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required string name = 1;</code>
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
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()) {
name_ = s;
}
return s;
}
}
/**
* <code>required string name = 1;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PLAYER_ID_FIELD_NUMBER = 2;
private int playerId_;
/**
* <code>required int32 player_id = 2;</code>
*/
public boolean hasPlayerId() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* <code>required int32 player_id = 2;</code>
*/
public int getPlayerId() {
return playerId_;
}
public static final int HERO_FIELD_NUMBER = 3;
private com.protos.HeroProto.Hero hero_;
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public boolean hasHero() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public com.protos.HeroProto.Hero getHero() {
return hero_;
}
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public com.protos.HeroProto.HeroOrBuilder getHeroOrBuilder() {
return hero_;
}
public static final int DECK_FIELD_NUMBER = 4;
private com.protos.DeckProto.Deck deck_;
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public boolean hasDeck() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public com.protos.DeckProto.Deck getDeck() {
return deck_;
}
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public com.protos.DeckProto.DeckOrBuilder getDeckOrBuilder() {
return deck_;
}
public static final int MANA_FIELD_NUMBER = 5;
private int mana_;
/**
* <code>optional int32 mana = 5;</code>
*/
public boolean hasMana() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* <code>optional int32 mana = 5;</code>
*/
public int getMana() {
return mana_;
}
public static final int MAX_MANA_FIELD_NUMBER = 6;
private int maxMana_;
/**
* <code>required int32 max_mana = 6;</code>
*/
public boolean hasMaxMana() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* <code>required int32 max_mana = 6;</code>
*/
public int getMaxMana() {
return maxMana_;
}
public static final int DECK_POS_FIELD_NUMBER = 7;
private int deckPos_;
/**
* <code>optional int32 deck_pos = 7;</code>
*/
public boolean hasDeckPos() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* <code>optional int32 deck_pos = 7;</code>
*/
public int getDeckPos() {
return deckPos_;
}
public static final int FATIGUE_DAMAGE_FIELD_NUMBER = 8;
private int fatigueDamage_;
/**
* <code>optional int32 fatigue_damage = 8;</code>
*/
public boolean hasFatigueDamage() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* <code>optional int32 fatigue_damage = 8;</code>
*/
public int getFatigueDamage() {
return fatigueDamage_;
}
public static final int MINIONS_FIELD_NUMBER = 9;
private java.util.List<com.protos.MinionProto.Minion> minions_;
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public java.util.List<com.protos.MinionProto.Minion> getMinionsList() {
return minions_;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public java.util.List<? extends com.protos.MinionProto.MinionOrBuilder>
getMinionsOrBuilderList() {
return minions_;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public int getMinionsCount() {
return minions_.size();
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public com.protos.MinionProto.Minion getMinions(int index) {
return minions_.get(index);
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public com.protos.MinionProto.MinionOrBuilder getMinionsOrBuilder(
int index) {
return minions_.get(index);
}
public static final int HAND_FIELD_NUMBER = 10;
private java.util.List<com.protos.CardProto.Card> hand_;
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public java.util.List<com.protos.CardProto.Card> getHandList() {
return hand_;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public java.util.List<? extends com.protos.CardProto.CardOrBuilder>
getHandOrBuilderList() {
return hand_;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public int getHandCount() {
return hand_.size();
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public com.protos.CardProto.Card getHand(int index) {
return hand_.get(index);
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public com.protos.CardProto.CardOrBuilder getHandOrBuilder(
int index) {
return hand_.get(index);
}
public static final int OVERLOAD_FIELD_NUMBER = 11;
private int overload_;
/**
* <code>optional int32 overload = 11;</code>
*/
public boolean hasOverload() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* <code>optional int32 overload = 11;</code>
*/
public int getOverload() {
return overload_;
}
public static final int NUM_CARDS_USED_FIELD_NUMBER = 12;
private int numCardsUsed_;
/**
* <code>optional int32 num_cards_used = 12;</code>
*/
public boolean hasNumCardsUsed() {
return ((bitField0_ & 0x00000200) == 0x00000200);
}
/**
* <code>optional int32 num_cards_used = 12;</code>
*/
public int getNumCardsUsed() {
return numCardsUsed_;
}
public static final int TURN_NUMBER_FIELD_NUMBER = 13;
private int turnNumber_;
/**
* <code>optional int32 turn_number = 13;</code>
*/
public boolean hasTurnNumber() {
return ((bitField0_ & 0x00000400) == 0x00000400);
}
/**
* <code>optional int32 turn_number = 13;</code>
*/
public int getTurnNumber() {
return turnNumber_;
}
public static final int CURRENT_PLAYER_FIELD_NUMBER = 14;
private boolean currentPlayer_;
/**
* <code>optional bool current_player = 14;</code>
*/
public boolean hasCurrentPlayer() {
return ((bitField0_ & 0x00000800) == 0x00000800);
}
/**
* <code>optional bool current_player = 14;</code>
*/
public boolean getCurrentPlayer() {
return currentPlayer_;
}
public static final int SUBMIT_FIELD_NUMBER = 15;
private boolean submit_;
/**
* <code>optional bool submit = 15;</code>
*/
public boolean hasSubmit() {
return ((bitField0_ & 0x00001000) == 0x00001000);
}
/**
* <code>optional bool submit = 15;</code>
*/
public boolean getSubmit() {
return submit_;
}
private void initFields() {
name_ = "";
playerId_ = 0;
hero_ = com.protos.HeroProto.Hero.getDefaultInstance();
deck_ = com.protos.DeckProto.Deck.getDefaultInstance();
mana_ = 0;
maxMana_ = 0;
deckPos_ = 0;
fatigueDamage_ = 0;
minions_ = java.util.Collections.emptyList();
hand_ = java.util.Collections.emptyList();
overload_ = 0;
numCardsUsed_ = 0;
turnNumber_ = 0;
currentPlayer_ = false;
submit_ = false;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasName()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasPlayerId()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasHero()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasDeck()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasMaxMana()) {
memoizedIsInitialized = 0;
return false;
}
if (!getHero().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
if (!getDeck().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
for (int i = 0; i < getMinionsCount(); i++) {
if (!getMinions(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
for (int i = 0; i < getHandCount(); i++) {
if (!getHand(i).isInitialized()) {
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.writeBytes(1, getNameBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, playerId_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, hero_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(4, deck_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeInt32(5, mana_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeInt32(6, maxMana_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeInt32(7, deckPos_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeInt32(8, fatigueDamage_);
}
for (int i = 0; i < minions_.size(); i++) {
output.writeMessage(9, minions_.get(i));
}
for (int i = 0; i < hand_.size(); i++) {
output.writeMessage(10, hand_.get(i));
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeInt32(11, overload_);
}
if (((bitField0_ & 0x00000200) == 0x00000200)) {
output.writeInt32(12, numCardsUsed_);
}
if (((bitField0_ & 0x00000400) == 0x00000400)) {
output.writeInt32(13, turnNumber_);
}
if (((bitField0_ & 0x00000800) == 0x00000800)) {
output.writeBool(14, currentPlayer_);
}
if (((bitField0_ & 0x00001000) == 0x00001000)) {
output.writeBool(15, submit_);
}
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
.computeBytesSize(1, getNameBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, playerId_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, hero_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, deck_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, mana_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(6, maxMana_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(7, deckPos_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(8, fatigueDamage_);
}
for (int i = 0; i < minions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, minions_.get(i));
}
for (int i = 0; i < hand_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, hand_.get(i));
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(11, overload_);
}
if (((bitField0_ & 0x00000200) == 0x00000200)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(12, numCardsUsed_);
}
if (((bitField0_ & 0x00000400) == 0x00000400)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(13, turnNumber_);
}
if (((bitField0_ & 0x00000800) == 0x00000800)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(14, currentPlayer_);
}
if (((bitField0_ & 0x00001000) == 0x00001000)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(15, submit_);
}
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 com.protos.PlayerModelProto.PlayerModel parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.protos.PlayerModelProto.PlayerModel parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.protos.PlayerModelProto.PlayerModel parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.protos.PlayerModelProto.PlayerModel parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.protos.PlayerModelProto.PlayerModel parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static com.protos.PlayerModelProto.PlayerModel parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static com.protos.PlayerModelProto.PlayerModel parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static com.protos.PlayerModelProto.PlayerModel parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static com.protos.PlayerModelProto.PlayerModel parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static com.protos.PlayerModelProto.PlayerModel 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(com.protos.PlayerModelProto.PlayerModel 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 com.protos.PlayerModel}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:com.protos.PlayerModel)
com.protos.PlayerModelProto.PlayerModelOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.protos.PlayerModelProto.internal_static_com_protos_PlayerModel_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.protos.PlayerModelProto.internal_static_com_protos_PlayerModel_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.protos.PlayerModelProto.PlayerModel.class, com.protos.PlayerModelProto.PlayerModel.Builder.class);
}
// Construct using com.protos.PlayerModelProto.PlayerModel.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getHeroFieldBuilder();
getDeckFieldBuilder();
getMinionsFieldBuilder();
getHandFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
playerId_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
if (heroBuilder_ == null) {
hero_ = com.protos.HeroProto.Hero.getDefaultInstance();
} else {
heroBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (deckBuilder_ == null) {
deck_ = com.protos.DeckProto.Deck.getDefaultInstance();
} else {
deckBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
mana_ = 0;
bitField0_ = (bitField0_ & ~0x00000010);
maxMana_ = 0;
bitField0_ = (bitField0_ & ~0x00000020);
deckPos_ = 0;
bitField0_ = (bitField0_ & ~0x00000040);
fatigueDamage_ = 0;
bitField0_ = (bitField0_ & ~0x00000080);
if (minionsBuilder_ == null) {
minions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
} else {
minionsBuilder_.clear();
}
if (handBuilder_ == null) {
hand_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000200);
} else {
handBuilder_.clear();
}
overload_ = 0;
bitField0_ = (bitField0_ & ~0x00000400);
numCardsUsed_ = 0;
bitField0_ = (bitField0_ & ~0x00000800);
turnNumber_ = 0;
bitField0_ = (bitField0_ & ~0x00001000);
currentPlayer_ = false;
bitField0_ = (bitField0_ & ~0x00002000);
submit_ = false;
bitField0_ = (bitField0_ & ~0x00004000);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.protos.PlayerModelProto.internal_static_com_protos_PlayerModel_descriptor;
}
public com.protos.PlayerModelProto.PlayerModel getDefaultInstanceForType() {
return com.protos.PlayerModelProto.PlayerModel.getDefaultInstance();
}
public com.protos.PlayerModelProto.PlayerModel build() {
com.protos.PlayerModelProto.PlayerModel result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.protos.PlayerModelProto.PlayerModel buildPartial() {
com.protos.PlayerModelProto.PlayerModel result = new com.protos.PlayerModelProto.PlayerModel(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.playerId_ = playerId_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (heroBuilder_ == null) {
result.hero_ = hero_;
} else {
result.hero_ = heroBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (deckBuilder_ == null) {
result.deck_ = deck_;
} else {
result.deck_ = deckBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.mana_ = mana_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000020;
}
result.maxMana_ = maxMana_;
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000040;
}
result.deckPos_ = deckPos_;
if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
to_bitField0_ |= 0x00000080;
}
result.fatigueDamage_ = fatigueDamage_;
if (minionsBuilder_ == null) {
if (((bitField0_ & 0x00000100) == 0x00000100)) {
minions_ = java.util.Collections.unmodifiableList(minions_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.minions_ = minions_;
} else {
result.minions_ = minionsBuilder_.build();
}
if (handBuilder_ == null) {
if (((bitField0_ & 0x00000200) == 0x00000200)) {
hand_ = java.util.Collections.unmodifiableList(hand_);
bitField0_ = (bitField0_ & ~0x00000200);
}
result.hand_ = hand_;
} else {
result.hand_ = handBuilder_.build();
}
if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
to_bitField0_ |= 0x00000100;
}
result.overload_ = overload_;
if (((from_bitField0_ & 0x00000800) == 0x00000800)) {
to_bitField0_ |= 0x00000200;
}
result.numCardsUsed_ = numCardsUsed_;
if (((from_bitField0_ & 0x00001000) == 0x00001000)) {
to_bitField0_ |= 0x00000400;
}
result.turnNumber_ = turnNumber_;
if (((from_bitField0_ & 0x00002000) == 0x00002000)) {
to_bitField0_ |= 0x00000800;
}
result.currentPlayer_ = currentPlayer_;
if (((from_bitField0_ & 0x00004000) == 0x00004000)) {
to_bitField0_ |= 0x00001000;
}
result.submit_ = submit_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.protos.PlayerModelProto.PlayerModel) {
return mergeFrom((com.protos.PlayerModelProto.PlayerModel)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.protos.PlayerModelProto.PlayerModel other) {
if (other == com.protos.PlayerModelProto.PlayerModel.getDefaultInstance()) return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
if (other.hasPlayerId()) {
setPlayerId(other.getPlayerId());
}
if (other.hasHero()) {
mergeHero(other.getHero());
}
if (other.hasDeck()) {
mergeDeck(other.getDeck());
}
if (other.hasMana()) {
setMana(other.getMana());
}
if (other.hasMaxMana()) {
setMaxMana(other.getMaxMana());
}
if (other.hasDeckPos()) {
setDeckPos(other.getDeckPos());
}
if (other.hasFatigueDamage()) {
setFatigueDamage(other.getFatigueDamage());
}
if (minionsBuilder_ == null) {
if (!other.minions_.isEmpty()) {
if (minions_.isEmpty()) {
minions_ = other.minions_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureMinionsIsMutable();
minions_.addAll(other.minions_);
}
onChanged();
}
} else {
if (!other.minions_.isEmpty()) {
if (minionsBuilder_.isEmpty()) {
minionsBuilder_.dispose();
minionsBuilder_ = null;
minions_ = other.minions_;
bitField0_ = (bitField0_ & ~0x00000100);
minionsBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getMinionsFieldBuilder() : null;
} else {
minionsBuilder_.addAllMessages(other.minions_);
}
}
}
if (handBuilder_ == null) {
if (!other.hand_.isEmpty()) {
if (hand_.isEmpty()) {
hand_ = other.hand_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureHandIsMutable();
hand_.addAll(other.hand_);
}
onChanged();
}
} else {
if (!other.hand_.isEmpty()) {
if (handBuilder_.isEmpty()) {
handBuilder_.dispose();
handBuilder_ = null;
hand_ = other.hand_;
bitField0_ = (bitField0_ & ~0x00000200);
handBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getHandFieldBuilder() : null;
} else {
handBuilder_.addAllMessages(other.hand_);
}
}
}
if (other.hasOverload()) {
setOverload(other.getOverload());
}
if (other.hasNumCardsUsed()) {
setNumCardsUsed(other.getNumCardsUsed());
}
if (other.hasTurnNumber()) {
setTurnNumber(other.getTurnNumber());
}
if (other.hasCurrentPlayer()) {
setCurrentPlayer(other.getCurrentPlayer());
}
if (other.hasSubmit()) {
setSubmit(other.getSubmit());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasName()) {
return false;
}
if (!hasPlayerId()) {
return false;
}
if (!hasHero()) {
return false;
}
if (!hasDeck()) {
return false;
}
if (!hasMaxMana()) {
return false;
}
if (!getHero().isInitialized()) {
return false;
}
if (!getDeck().isInitialized()) {
return false;
}
for (int i = 0; i < getMinionsCount(); i++) {
if (!getMinions(i).isInitialized()) {
return false;
}
}
for (int i = 0; i < getHandCount(); i++) {
if (!getHand(i).isInitialized()) {
return false;
}
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.protos.PlayerModelProto.PlayerModel parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.protos.PlayerModelProto.PlayerModel) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* <code>required string name = 1;</code>
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required string name = 1;</code>
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>required string name = 1;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>required string name = 1;</code>
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
/**
* <code>required string name = 1;</code>
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* <code>required string name = 1;</code>
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
private int playerId_ ;
/**
* <code>required int32 player_id = 2;</code>
*/
public boolean hasPlayerId() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* <code>required int32 player_id = 2;</code>
*/
public int getPlayerId() {
return playerId_;
}
/**
* <code>required int32 player_id = 2;</code>
*/
public Builder setPlayerId(int value) {
bitField0_ |= 0x00000002;
playerId_ = value;
onChanged();
return this;
}
/**
* <code>required int32 player_id = 2;</code>
*/
public Builder clearPlayerId() {
bitField0_ = (bitField0_ & ~0x00000002);
playerId_ = 0;
onChanged();
return this;
}
private com.protos.HeroProto.Hero hero_ = com.protos.HeroProto.Hero.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
com.protos.HeroProto.Hero, com.protos.HeroProto.Hero.Builder, com.protos.HeroProto.HeroOrBuilder> heroBuilder_;
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public boolean hasHero() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public com.protos.HeroProto.Hero getHero() {
if (heroBuilder_ == null) {
return hero_;
} else {
return heroBuilder_.getMessage();
}
}
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public Builder setHero(com.protos.HeroProto.Hero value) {
if (heroBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
hero_ = value;
onChanged();
} else {
heroBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public Builder setHero(
com.protos.HeroProto.Hero.Builder builderForValue) {
if (heroBuilder_ == null) {
hero_ = builderForValue.build();
onChanged();
} else {
heroBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public Builder mergeHero(com.protos.HeroProto.Hero value) {
if (heroBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004) &&
hero_ != com.protos.HeroProto.Hero.getDefaultInstance()) {
hero_ =
com.protos.HeroProto.Hero.newBuilder(hero_).mergeFrom(value).buildPartial();
} else {
hero_ = value;
}
onChanged();
} else {
heroBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public Builder clearHero() {
if (heroBuilder_ == null) {
hero_ = com.protos.HeroProto.Hero.getDefaultInstance();
onChanged();
} else {
heroBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public com.protos.HeroProto.Hero.Builder getHeroBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getHeroFieldBuilder().getBuilder();
}
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
public com.protos.HeroProto.HeroOrBuilder getHeroOrBuilder() {
if (heroBuilder_ != null) {
return heroBuilder_.getMessageOrBuilder();
} else {
return hero_;
}
}
/**
* <code>required .com.protos.Hero hero = 3;</code>
*/
private com.google.protobuf.SingleFieldBuilder<
com.protos.HeroProto.Hero, com.protos.HeroProto.Hero.Builder, com.protos.HeroProto.HeroOrBuilder>
getHeroFieldBuilder() {
if (heroBuilder_ == null) {
heroBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.protos.HeroProto.Hero, com.protos.HeroProto.Hero.Builder, com.protos.HeroProto.HeroOrBuilder>(
getHero(),
getParentForChildren(),
isClean());
hero_ = null;
}
return heroBuilder_;
}
private com.protos.DeckProto.Deck deck_ = com.protos.DeckProto.Deck.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
com.protos.DeckProto.Deck, com.protos.DeckProto.Deck.Builder, com.protos.DeckProto.DeckOrBuilder> deckBuilder_;
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public boolean hasDeck() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public com.protos.DeckProto.Deck getDeck() {
if (deckBuilder_ == null) {
return deck_;
} else {
return deckBuilder_.getMessage();
}
}
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public Builder setDeck(com.protos.DeckProto.Deck value) {
if (deckBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
deck_ = value;
onChanged();
} else {
deckBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public Builder setDeck(
com.protos.DeckProto.Deck.Builder builderForValue) {
if (deckBuilder_ == null) {
deck_ = builderForValue.build();
onChanged();
} else {
deckBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public Builder mergeDeck(com.protos.DeckProto.Deck value) {
if (deckBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008) &&
deck_ != com.protos.DeckProto.Deck.getDefaultInstance()) {
deck_ =
com.protos.DeckProto.Deck.newBuilder(deck_).mergeFrom(value).buildPartial();
} else {
deck_ = value;
}
onChanged();
} else {
deckBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public Builder clearDeck() {
if (deckBuilder_ == null) {
deck_ = com.protos.DeckProto.Deck.getDefaultInstance();
onChanged();
} else {
deckBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public com.protos.DeckProto.Deck.Builder getDeckBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getDeckFieldBuilder().getBuilder();
}
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
public com.protos.DeckProto.DeckOrBuilder getDeckOrBuilder() {
if (deckBuilder_ != null) {
return deckBuilder_.getMessageOrBuilder();
} else {
return deck_;
}
}
/**
* <code>required .com.protos.Deck deck = 4;</code>
*/
private com.google.protobuf.SingleFieldBuilder<
com.protos.DeckProto.Deck, com.protos.DeckProto.Deck.Builder, com.protos.DeckProto.DeckOrBuilder>
getDeckFieldBuilder() {
if (deckBuilder_ == null) {
deckBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.protos.DeckProto.Deck, com.protos.DeckProto.Deck.Builder, com.protos.DeckProto.DeckOrBuilder>(
getDeck(),
getParentForChildren(),
isClean());
deck_ = null;
}
return deckBuilder_;
}
private int mana_ ;
/**
* <code>optional int32 mana = 5;</code>
*/
public boolean hasMana() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* <code>optional int32 mana = 5;</code>
*/
public int getMana() {
return mana_;
}
/**
* <code>optional int32 mana = 5;</code>
*/
public Builder setMana(int value) {
bitField0_ |= 0x00000010;
mana_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 mana = 5;</code>
*/
public Builder clearMana() {
bitField0_ = (bitField0_ & ~0x00000010);
mana_ = 0;
onChanged();
return this;
}
private int maxMana_ ;
/**
* <code>required int32 max_mana = 6;</code>
*/
public boolean hasMaxMana() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* <code>required int32 max_mana = 6;</code>
*/
public int getMaxMana() {
return maxMana_;
}
/**
* <code>required int32 max_mana = 6;</code>
*/
public Builder setMaxMana(int value) {
bitField0_ |= 0x00000020;
maxMana_ = value;
onChanged();
return this;
}
/**
* <code>required int32 max_mana = 6;</code>
*/
public Builder clearMaxMana() {
bitField0_ = (bitField0_ & ~0x00000020);
maxMana_ = 0;
onChanged();
return this;
}
private int deckPos_ ;
/**
* <code>optional int32 deck_pos = 7;</code>
*/
public boolean hasDeckPos() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* <code>optional int32 deck_pos = 7;</code>
*/
public int getDeckPos() {
return deckPos_;
}
/**
* <code>optional int32 deck_pos = 7;</code>
*/
public Builder setDeckPos(int value) {
bitField0_ |= 0x00000040;
deckPos_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 deck_pos = 7;</code>
*/
public Builder clearDeckPos() {
bitField0_ = (bitField0_ & ~0x00000040);
deckPos_ = 0;
onChanged();
return this;
}
private int fatigueDamage_ ;
/**
* <code>optional int32 fatigue_damage = 8;</code>
*/
public boolean hasFatigueDamage() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* <code>optional int32 fatigue_damage = 8;</code>
*/
public int getFatigueDamage() {
return fatigueDamage_;
}
/**
* <code>optional int32 fatigue_damage = 8;</code>
*/
public Builder setFatigueDamage(int value) {
bitField0_ |= 0x00000080;
fatigueDamage_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 fatigue_damage = 8;</code>
*/
public Builder clearFatigueDamage() {
bitField0_ = (bitField0_ & ~0x00000080);
fatigueDamage_ = 0;
onChanged();
return this;
}
private java.util.List<com.protos.MinionProto.Minion> minions_ =
java.util.Collections.emptyList();
private void ensureMinionsIsMutable() {
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
minions_ = new java.util.ArrayList<com.protos.MinionProto.Minion>(minions_);
bitField0_ |= 0x00000100;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
com.protos.MinionProto.Minion, com.protos.MinionProto.Minion.Builder, com.protos.MinionProto.MinionOrBuilder> minionsBuilder_;
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public java.util.List<com.protos.MinionProto.Minion> getMinionsList() {
if (minionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(minions_);
} else {
return minionsBuilder_.getMessageList();
}
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public int getMinionsCount() {
if (minionsBuilder_ == null) {
return minions_.size();
} else {
return minionsBuilder_.getCount();
}
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public com.protos.MinionProto.Minion getMinions(int index) {
if (minionsBuilder_ == null) {
return minions_.get(index);
} else {
return minionsBuilder_.getMessage(index);
}
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public Builder setMinions(
int index, com.protos.MinionProto.Minion value) {
if (minionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMinionsIsMutable();
minions_.set(index, value);
onChanged();
} else {
minionsBuilder_.setMessage(index, value);
}
return this;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public Builder setMinions(
int index, com.protos.MinionProto.Minion.Builder builderForValue) {
if (minionsBuilder_ == null) {
ensureMinionsIsMutable();
minions_.set(index, builderForValue.build());
onChanged();
} else {
minionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public Builder addMinions(com.protos.MinionProto.Minion value) {
if (minionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMinionsIsMutable();
minions_.add(value);
onChanged();
} else {
minionsBuilder_.addMessage(value);
}
return this;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public Builder addMinions(
int index, com.protos.MinionProto.Minion value) {
if (minionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMinionsIsMutable();
minions_.add(index, value);
onChanged();
} else {
minionsBuilder_.addMessage(index, value);
}
return this;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public Builder addMinions(
com.protos.MinionProto.Minion.Builder builderForValue) {
if (minionsBuilder_ == null) {
ensureMinionsIsMutable();
minions_.add(builderForValue.build());
onChanged();
} else {
minionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public Builder addMinions(
int index, com.protos.MinionProto.Minion.Builder builderForValue) {
if (minionsBuilder_ == null) {
ensureMinionsIsMutable();
minions_.add(index, builderForValue.build());
onChanged();
} else {
minionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public Builder addAllMinions(
java.lang.Iterable<? extends com.protos.MinionProto.Minion> values) {
if (minionsBuilder_ == null) {
ensureMinionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, minions_);
onChanged();
} else {
minionsBuilder_.addAllMessages(values);
}
return this;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public Builder clearMinions() {
if (minionsBuilder_ == null) {
minions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
} else {
minionsBuilder_.clear();
}
return this;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public Builder removeMinions(int index) {
if (minionsBuilder_ == null) {
ensureMinionsIsMutable();
minions_.remove(index);
onChanged();
} else {
minionsBuilder_.remove(index);
}
return this;
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public com.protos.MinionProto.Minion.Builder getMinionsBuilder(
int index) {
return getMinionsFieldBuilder().getBuilder(index);
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public com.protos.MinionProto.MinionOrBuilder getMinionsOrBuilder(
int index) {
if (minionsBuilder_ == null) {
return minions_.get(index); } else {
return minionsBuilder_.getMessageOrBuilder(index);
}
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public java.util.List<? extends com.protos.MinionProto.MinionOrBuilder>
getMinionsOrBuilderList() {
if (minionsBuilder_ != null) {
return minionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(minions_);
}
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public com.protos.MinionProto.Minion.Builder addMinionsBuilder() {
return getMinionsFieldBuilder().addBuilder(
com.protos.MinionProto.Minion.getDefaultInstance());
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public com.protos.MinionProto.Minion.Builder addMinionsBuilder(
int index) {
return getMinionsFieldBuilder().addBuilder(
index, com.protos.MinionProto.Minion.getDefaultInstance());
}
/**
* <code>repeated .com.protos.Minion minions = 9;</code>
*/
public java.util.List<com.protos.MinionProto.Minion.Builder>
getMinionsBuilderList() {
return getMinionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
com.protos.MinionProto.Minion, com.protos.MinionProto.Minion.Builder, com.protos.MinionProto.MinionOrBuilder>
getMinionsFieldBuilder() {
if (minionsBuilder_ == null) {
minionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
com.protos.MinionProto.Minion, com.protos.MinionProto.Minion.Builder, com.protos.MinionProto.MinionOrBuilder>(
minions_,
((bitField0_ & 0x00000100) == 0x00000100),
getParentForChildren(),
isClean());
minions_ = null;
}
return minionsBuilder_;
}
private java.util.List<com.protos.CardProto.Card> hand_ =
java.util.Collections.emptyList();
private void ensureHandIsMutable() {
if (!((bitField0_ & 0x00000200) == 0x00000200)) {
hand_ = new java.util.ArrayList<com.protos.CardProto.Card>(hand_);
bitField0_ |= 0x00000200;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
com.protos.CardProto.Card, com.protos.CardProto.Card.Builder, com.protos.CardProto.CardOrBuilder> handBuilder_;
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public java.util.List<com.protos.CardProto.Card> getHandList() {
if (handBuilder_ == null) {
return java.util.Collections.unmodifiableList(hand_);
} else {
return handBuilder_.getMessageList();
}
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public int getHandCount() {
if (handBuilder_ == null) {
return hand_.size();
} else {
return handBuilder_.getCount();
}
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public com.protos.CardProto.Card getHand(int index) {
if (handBuilder_ == null) {
return hand_.get(index);
} else {
return handBuilder_.getMessage(index);
}
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public Builder setHand(
int index, com.protos.CardProto.Card value) {
if (handBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHandIsMutable();
hand_.set(index, value);
onChanged();
} else {
handBuilder_.setMessage(index, value);
}
return this;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public Builder setHand(
int index, com.protos.CardProto.Card.Builder builderForValue) {
if (handBuilder_ == null) {
ensureHandIsMutable();
hand_.set(index, builderForValue.build());
onChanged();
} else {
handBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public Builder addHand(com.protos.CardProto.Card value) {
if (handBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHandIsMutable();
hand_.add(value);
onChanged();
} else {
handBuilder_.addMessage(value);
}
return this;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public Builder addHand(
int index, com.protos.CardProto.Card value) {
if (handBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHandIsMutable();
hand_.add(index, value);
onChanged();
} else {
handBuilder_.addMessage(index, value);
}
return this;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public Builder addHand(
com.protos.CardProto.Card.Builder builderForValue) {
if (handBuilder_ == null) {
ensureHandIsMutable();
hand_.add(builderForValue.build());
onChanged();
} else {
handBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public Builder addHand(
int index, com.protos.CardProto.Card.Builder builderForValue) {
if (handBuilder_ == null) {
ensureHandIsMutable();
hand_.add(index, builderForValue.build());
onChanged();
} else {
handBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public Builder addAllHand(
java.lang.Iterable<? extends com.protos.CardProto.Card> values) {
if (handBuilder_ == null) {
ensureHandIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, hand_);
onChanged();
} else {
handBuilder_.addAllMessages(values);
}
return this;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public Builder clearHand() {
if (handBuilder_ == null) {
hand_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
} else {
handBuilder_.clear();
}
return this;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public Builder removeHand(int index) {
if (handBuilder_ == null) {
ensureHandIsMutable();
hand_.remove(index);
onChanged();
} else {
handBuilder_.remove(index);
}
return this;
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public com.protos.CardProto.Card.Builder getHandBuilder(
int index) {
return getHandFieldBuilder().getBuilder(index);
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public com.protos.CardProto.CardOrBuilder getHandOrBuilder(
int index) {
if (handBuilder_ == null) {
return hand_.get(index); } else {
return handBuilder_.getMessageOrBuilder(index);
}
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public java.util.List<? extends com.protos.CardProto.CardOrBuilder>
getHandOrBuilderList() {
if (handBuilder_ != null) {
return handBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(hand_);
}
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public com.protos.CardProto.Card.Builder addHandBuilder() {
return getHandFieldBuilder().addBuilder(
com.protos.CardProto.Card.getDefaultInstance());
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public com.protos.CardProto.Card.Builder addHandBuilder(
int index) {
return getHandFieldBuilder().addBuilder(
index, com.protos.CardProto.Card.getDefaultInstance());
}
/**
* <code>repeated .com.protos.Card hand = 10;</code>
*/
public java.util.List<com.protos.CardProto.Card.Builder>
getHandBuilderList() {
return getHandFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
com.protos.CardProto.Card, com.protos.CardProto.Card.Builder, com.protos.CardProto.CardOrBuilder>
getHandFieldBuilder() {
if (handBuilder_ == null) {
handBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
com.protos.CardProto.Card, com.protos.CardProto.Card.Builder, com.protos.CardProto.CardOrBuilder>(
hand_,
((bitField0_ & 0x00000200) == 0x00000200),
getParentForChildren(),
isClean());
hand_ = null;
}
return handBuilder_;
}
private int overload_ ;
/**
* <code>optional int32 overload = 11;</code>
*/
public boolean hasOverload() {
return ((bitField0_ & 0x00000400) == 0x00000400);
}
/**
* <code>optional int32 overload = 11;</code>
*/
public int getOverload() {
return overload_;
}
/**
* <code>optional int32 overload = 11;</code>
*/
public Builder setOverload(int value) {
bitField0_ |= 0x00000400;
overload_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 overload = 11;</code>
*/
public Builder clearOverload() {
bitField0_ = (bitField0_ & ~0x00000400);
overload_ = 0;
onChanged();
return this;
}
private int numCardsUsed_ ;
/**
* <code>optional int32 num_cards_used = 12;</code>
*/
public boolean hasNumCardsUsed() {
return ((bitField0_ & 0x00000800) == 0x00000800);
}
/**
* <code>optional int32 num_cards_used = 12;</code>
*/
public int getNumCardsUsed() {
return numCardsUsed_;
}
/**
* <code>optional int32 num_cards_used = 12;</code>
*/
public Builder setNumCardsUsed(int value) {
bitField0_ |= 0x00000800;
numCardsUsed_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 num_cards_used = 12;</code>
*/
public Builder clearNumCardsUsed() {
bitField0_ = (bitField0_ & ~0x00000800);
numCardsUsed_ = 0;
onChanged();
return this;
}
private int turnNumber_ ;
/**
* <code>optional int32 turn_number = 13;</code>
*/
public boolean hasTurnNumber() {
return ((bitField0_ & 0x00001000) == 0x00001000);
}
/**
* <code>optional int32 turn_number = 13;</code>
*/
public int getTurnNumber() {
return turnNumber_;
}
/**
* <code>optional int32 turn_number = 13;</code>
*/
public Builder setTurnNumber(int value) {
bitField0_ |= 0x00001000;
turnNumber_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 turn_number = 13;</code>
*/
public Builder clearTurnNumber() {
bitField0_ = (bitField0_ & ~0x00001000);
turnNumber_ = 0;
onChanged();
return this;
}
private boolean currentPlayer_ ;
/**
* <code>optional bool current_player = 14;</code>
*/
public boolean hasCurrentPlayer() {
return ((bitField0_ & 0x00002000) == 0x00002000);
}
/**
* <code>optional bool current_player = 14;</code>
*/
public boolean getCurrentPlayer() {
return currentPlayer_;
}
/**
* <code>optional bool current_player = 14;</code>
*/
public Builder setCurrentPlayer(boolean value) {
bitField0_ |= 0x00002000;
currentPlayer_ = value;
onChanged();
return this;
}
/**
* <code>optional bool current_player = 14;</code>
*/
public Builder clearCurrentPlayer() {
bitField0_ = (bitField0_ & ~0x00002000);
currentPlayer_ = false;
onChanged();
return this;
}
private boolean submit_ ;
/**
* <code>optional bool submit = 15;</code>
*/
public boolean hasSubmit() {
return ((bitField0_ & 0x00004000) == 0x00004000);
}
/**
* <code>optional bool submit = 15;</code>
*/
public boolean getSubmit() {
return submit_;
}
/**
* <code>optional bool submit = 15;</code>
*/
public Builder setSubmit(boolean value) {
bitField0_ |= 0x00004000;
submit_ = value;
onChanged();
return this;
}
/**
* <code>optional bool submit = 15;</code>
*/
public Builder clearSubmit() {
bitField0_ = (bitField0_ & ~0x00004000);
submit_ = false;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:com.protos.PlayerModel)
}
static {
defaultInstance = new PlayerModel(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:com.protos.PlayerModel)
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_com_protos_PlayerModel_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_com_protos_PlayerModel_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\022player_model.proto\022\ncom.protos\032\ndeck.p" +
"roto\032\nhero.proto\032\014minion.proto\032\ncard.pro" +
"to\"\344\002\n\013PlayerModel\022\014\n\004name\030\001 \002(\t\022\021\n\tplay" +
"er_id\030\002 \002(\005\022\036\n\004hero\030\003 \002(\0132\020.com.protos.H" +
"ero\022\036\n\004deck\030\004 \002(\0132\020.com.protos.Deck\022\014\n\004m" +
"ana\030\005 \001(\005\022\020\n\010max_mana\030\006 \002(\005\022\020\n\010deck_pos\030" +
"\007 \001(\005\022\026\n\016fatigue_damage\030\010 \001(\005\022#\n\007minions" +
"\030\t \003(\0132\022.com.protos.Minion\022\036\n\004hand\030\n \003(\013" +
"2\020.com.protos.Card\022\020\n\010overload\030\013 \001(\005\022\026\n\016" +
"num_cards_used\030\014 \001(\005\022\023\n\013turn_number\030\r \001(",
"\005\022\026\n\016current_player\030\016 \001(\010\022\016\n\006submit\030\017 \001(" +
"\010B\036\n\ncom.protosB\020PlayerModelProto"
};
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;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.protos.DeckProto.getDescriptor(),
com.protos.HeroProto.getDescriptor(),
com.protos.MinionProto.getDescriptor(),
com.protos.CardProto.getDescriptor(),
}, assigner);
internal_static_com_protos_PlayerModel_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_com_protos_PlayerModel_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_com_protos_PlayerModel_descriptor,
new java.lang.String[] { "Name", "PlayerId", "Hero", "Deck", "Mana", "MaxMana", "DeckPos", "FatigueDamage", "Minions", "Hand", "Overload", "NumCardsUsed", "TurnNumber", "CurrentPlayer", "Submit", });
com.protos.DeckProto.getDescriptor();
com.protos.HeroProto.getDescriptor();
com.protos.MinionProto.getDescriptor();
com.protos.CardProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}