/*
 * 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 state_protect4_a : XdrAble {
  public int spa_how;
    public state_protect_ops4 spa_mach_ops;
    public ssv_sp_parms4 spa_ssv_parms;


    public state_protect4_a() {
    }

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

    public void xdrEncode(XdrEncodingStream xdr)
 {
        xdr.xdrEncodeInt(spa_how);
        switch ( spa_how ) {
        case state_protect_how4.SP4_NONE:
            break;
        case state_protect_how4.SP4_MACH_CRED:
            spa_mach_ops.xdrEncode(xdr);
            break;
        case state_protect_how4.SP4_SSV:
            spa_ssv_parms.xdrEncode(xdr);
            break;
        }
    }

    public void xdrDecode(XdrDecodingStream xdr)
 {
        spa_how = xdr.xdrDecodeInt();
        switch ( spa_how ) {
        case state_protect_how4.SP4_NONE:
            break;
        case state_protect_how4.SP4_MACH_CRED:
            spa_mach_ops = new state_protect_ops4(xdr);
            break;
        case state_protect_how4.SP4_SSV:
            spa_ssv_parms = new ssv_sp_parms4(xdr);
            break;
        }
    }
}
} // End of state_protect4_a.cs
