/*
 * Automatically generated by jrpcgen 1.0.7 on 29.11.2012
 * jrpcgen is part of the "Remote Tea.Net" ONC/RPC package for C#
 * See http://remotetea.sourceforge.net for details
 */
namespace NFSLibrary.Protocols.V4.RPC{
using org.acplt.oncrpc;

public class createtype4 : XdrAble {
    public int type;
    public linktext4 linkdata;
    public specdata4 devdata;

    public createtype4() {
    }

    public createtype4(XdrDecodingStream xdr) {
        xdrDecode(xdr);
    }

    public void xdrEncode(XdrEncodingStream xdr) {
        xdr.xdrEncodeInt(type);
        switch ( type ) {
        case nfs_ftype4.NF4LNK:
            linkdata.xdrEncode(xdr);
            break;
        case nfs_ftype4.NF4BLK:
        case nfs_ftype4.NF4CHR:
            devdata.xdrEncode(xdr);
            break;
        case nfs_ftype4.NF4SOCK:
        case nfs_ftype4.NF4FIFO:
        case nfs_ftype4.NF4DIR:
            break;
        default:
            break;
        }
    }

    public void xdrDecode(XdrDecodingStream xdr) {
        type = xdr.xdrDecodeInt();
        switch ( type ) {
        case nfs_ftype4.NF4LNK:
            linkdata = new linktext4(xdr);
            break;
        case nfs_ftype4.NF4BLK:
        case nfs_ftype4.NF4CHR:
            devdata = new specdata4(xdr);
            break;
        case nfs_ftype4.NF4SOCK:
        case nfs_ftype4.NF4FIFO:
        case nfs_ftype4.NF4DIR:
            break;
        default:
            break;
        }
    }

}
} // End of createtype4.cs
