/*
 * 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 createhow4 : XdrAble {
    public int mode;
    public fattr4 createattrs;
    public verifier4 createverf;
    public creatverfattr ch_createboth;


    public createhow4() {
    }

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

    public void xdrEncode(XdrEncodingStream xdr)
    {
        xdr.xdrEncodeInt(mode);
        switch ( mode ) {
        case createmode4.UNCHECKED4:
        case createmode4.GUARDED4:
            createattrs.xdrEncode(xdr);
            break;
        case createmode4.EXCLUSIVE4:
            createverf.xdrEncode(xdr);
            break;
        case createmode4.EXCLUSIVE4_1:
            ch_createboth.xdrEncode(xdr);
            break;
        }
    }

    public void xdrDecode(XdrDecodingStream xdr)
   {
        mode = xdr.xdrDecodeInt();
        switch ( mode ) {
        case createmode4.UNCHECKED4:
        case createmode4.GUARDED4:
            createattrs = new fattr4(xdr);
            break;
        case createmode4.EXCLUSIVE4:
            createverf = new verifier4(xdr);
            break;
        case createmode4.EXCLUSIVE4_1:
            ch_createboth = new creatverfattr(xdr);
            break;
        }
    }

}
} // End of createhow4.cs
