/*
 * 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 open_delegation4 : XdrAble {
    public int delegation_type;
    public open_read_delegation4 read;
    public open_write_delegation4 write;
    public open_none_delegation4 od_whynone;

    public open_delegation4() {
    }

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

    public void xdrEncode(XdrEncodingStream xdr) {
        xdr.xdrEncodeInt(delegation_type);
        switch ( delegation_type ) {
        case open_delegation_type4.OPEN_DELEGATE_NONE:
            break;
        case open_delegation_type4.OPEN_DELEGATE_READ:
            read.xdrEncode(xdr);
            break;
        case open_delegation_type4.OPEN_DELEGATE_WRITE:
            write.xdrEncode(xdr);
            break;
        case open_delegation_type4.OPEN_DELEGATE_NONE_EXT:
            od_whynone.xdrEncode(xdr);
            break;
        }
    }

    public void xdrDecode(XdrDecodingStream xdr) {
        delegation_type = xdr.xdrDecodeInt();
        switch ( delegation_type ) {
        case open_delegation_type4.OPEN_DELEGATE_NONE:
            break;
        case open_delegation_type4.OPEN_DELEGATE_READ:
            read = new open_read_delegation4(xdr);
            break;
        case open_delegation_type4.OPEN_DELEGATE_WRITE:
            write = new open_write_delegation4(xdr);
            break;
        case open_delegation_type4.OPEN_DELEGATE_NONE_EXT:
            od_whynone = new open_none_delegation4(xdr);
            break;
        }
    }

}
} // End of open_delegation4.cs
