/*
 * 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
 */
using NFSLibrary.Protocols.Commons;
using org.acplt.oncrpc;

namespace NFSLibrary.Protocols.V2.RPC
{
    public class CreateArguments : XdrAble
    {
        private ItemOperationArguments _where;
        private CreateAttributes _attributes;

        public CreateArguments()
        { }

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

        public void xdrEncode(XdrEncodingStream xdr)
        {
            this._where.xdrEncode(xdr);
            this._attributes.xdrEncode(xdr);
        }

        public void xdrDecode(XdrDecodingStream xdr)
        {
            this._where = new ItemOperationArguments(xdr);
            this._attributes = new CreateAttributes(xdr);
        }

        public ItemOperationArguments Where
        {
            get
            { return this._where; }
            set
            { this._where = value; }
        }

        public CreateAttributes Attributes
        {
            get
            { return this._attributes; }
            set
            { this._attributes = value; }
        }
    }

    public class CreateAttributes : XdrAble
    {
        private NFSPermission _mode;
        private int _uid;
        private int _gid;
        private int _size;
        private NFSTimeValue _atime;
        private NFSTimeValue _mtime;

        public CreateAttributes()
        { }

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

        public void xdrEncode(XdrEncodingStream xdr)
        {
            xdr.xdrEncodeInt(this._mode.Mode);
            xdr.xdrEncodeInt(this._uid);
            xdr.xdrEncodeInt(this._gid);
            xdr.xdrEncodeInt(this._size);
            this._atime.xdrEncode(xdr);
            this._mtime.xdrEncode(xdr);
        }

        public void xdrDecode(XdrDecodingStream xdr)
        {
            this._mode.Mode = xdr.xdrDecodeInt();
            this._uid = xdr.xdrDecodeInt();
            this._gid = xdr.xdrDecodeInt();
            this._size = xdr.xdrDecodeInt();
            this._atime = new NFSTimeValue(xdr);
            this._mtime = new NFSTimeValue(xdr);
        }

        public NFSPermission Mode
        {
            get
            { return this._mode; }
            set
            { this._mode = value; }
        }

        public int UserID
        {
            get
            { return this._uid; }
            set
            { this._uid = value; }
        }

        public int GroupID
        {
            get
            { return this._gid; }
            set
            { this._gid = value; }
        }

        public int Size
        {
            get
            { return this._size; }
            set
            { this._size = value; }
        }

        public NFSTimeValue LastAccessedTime
        {
            get
            { return this._atime; }
            set
            { this._atime = value; }
        }

        public NFSTimeValue ModifiedTime
        {
            get
            { return this._mtime; }
            set
            { this._mtime = value; }
        }
    }
    // End of createargs.cs
}