com.ursaj.hfs.message.HfsGcRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hfs-messages Show documentation
Show all versions of hfs-messages Show documentation
HFS communication messages.
// Generated by http://code.google.com/p/protostuff/ ... DO NOT EDIT!
// Generated from messages.proto
package com.ursaj.hfs.message;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import com.dyuproject.protostuff.GraphIOUtil;
import com.dyuproject.protostuff.Input;
import com.dyuproject.protostuff.Message;
import com.dyuproject.protostuff.Output;
import com.dyuproject.protostuff.Schema;
import com.dyuproject.protostuff.UninitializedMessageException;
public final class HfsGcRequest implements Externalizable, Message
{
public static Schema getSchema()
{
return SCHEMA;
}
public static HfsGcRequest getDefaultInstance()
{
return DEFAULT_INSTANCE;
}
static final HfsGcRequest DEFAULT_INSTANCE = new HfsGcRequest();
// non-private fields
// see http://developer.android.com/guide/practices/design/performance.html#package_inner
HfsUuid fromId;
public HfsGcRequest()
{
}
public HfsGcRequest(
HfsUuid fromId
)
{
this.fromId = fromId;
}
// getters and setters
// fromId
public HfsUuid getFromId()
{
return fromId;
}
public HfsGcRequest setFromId(HfsUuid fromId)
{
this.fromId = fromId;
return this;
}
// java serialization
public void readExternal(ObjectInput in) throws IOException
{
GraphIOUtil.mergeDelimitedFrom(in, this, SCHEMA);
}
public void writeExternal(ObjectOutput out) throws IOException
{
GraphIOUtil.writeDelimitedTo(out, this, SCHEMA);
}
// message method
public Schema cachedSchema()
{
return SCHEMA;
}
static final Schema SCHEMA = new Schema()
{
// schema methods
public HfsGcRequest newMessage()
{
return new HfsGcRequest();
}
public Class typeClass()
{
return HfsGcRequest.class;
}
public String messageName()
{
return HfsGcRequest.class.getSimpleName();
}
public String messageFullName()
{
return HfsGcRequest.class.getName();
}
public boolean isInitialized(HfsGcRequest message)
{
return
message.fromId != null;
}
public void mergeFrom(Input input, HfsGcRequest message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.fromId = input.mergeObject(message.fromId, HfsUuid.getSchema());
break;
default:
input.handleUnknownField(number, this);
}
}
}
public void writeTo(Output output, HfsGcRequest message) throws IOException
{
if(message.fromId == null)
throw new UninitializedMessageException(message);
output.writeObject(1, message.fromId, HfsUuid.getSchema(), false);
}
public String getFieldName(int number)
{
switch(number)
{
case 1: return "fromId";
default: return null;
}
}
public int getFieldNumber(String name)
{
final Integer number = fieldMap.get(name);
return number == null ? 0 : number.intValue();
}
final java.util.HashMap fieldMap = new java.util.HashMap();
{
fieldMap.put("fromId", 1);
}
};
}