/*
 * 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.V3.RPC
{
    public class FileAttributes : XdrAble
    {
        private NFSItemTypes _type;
        private NFSPermission _mode;
        private int _nlink;
        private int _uid;
        private int _gid;
        private long _size;
        private long _used;
        private SpecInformation _rdev;
        private long _fsid;
        private long _fileid;
        private NFSTimeValue _atime;
        private NFSTimeValue _mtime;
        private NFSTimeValue _ctime;

        public FileAttributes()
        { }

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

        public void xdrEncode(XdrEncodingStream xdr)
        {
            xdr.xdrEncodeInt((int)this._type);
            xdr.xdrEncodeInt(this._mode.Mode);
            xdr.xdrEncodeInt(this._nlink);
            xdr.xdrEncodeInt(this._uid);
            xdr.xdrEncodeInt(this._gid);
            xdr.xdrEncodeLong(this._size);
            xdr.xdrEncodeLong(this._used);
            this._rdev.xdrEncode(xdr);
            xdr.xdrEncodeLong(this._fsid);
            xdr.xdrEncodeLong(this._fileid);
            this._atime.xdrEncode(xdr);
            this._mtime.xdrEncode(xdr);
            this._ctime.xdrEncode(xdr);
        }

        public void xdrDecode(XdrDecodingStream xdr)
        {
            this._type = (NFSItemTypes)xdr.xdrDecodeInt();

            this._mode = new NFSPermission();
            this._mode.Mode = xdr.xdrDecodeInt();

            this._nlink = xdr.xdrDecodeInt();
            this._uid = xdr.xdrDecodeInt();
            this._gid = xdr.xdrDecodeInt();
            this._size = xdr.xdrDecodeLong();
            this._used = xdr.xdrDecodeLong();
            
            this._rdev = new SpecInformation();
            this._rdev.xdrDecode(xdr);
            
            this._fsid = xdr.xdrDecodeLong();
            this._fileid = xdr.xdrDecodeLong();
            this._atime = new NFSTimeValue(xdr);
            this._mtime = new NFSTimeValue(xdr);
            this._ctime = new NFSTimeValue(xdr);
        }

        public NFSItemTypes Type
        {
            get
            { return this._type; }
        }

        public NFSPermission Mode
        {
            get
            { return this._mode; }
        }

        public int Link
        {
            get
            { return this._nlink; }
        }

        public int UserID
        {
            get
            { return this._uid; }
        }

        public int GroupID
        {
            get
            { return this._gid; }
        }

        public long Size
        {
            get
            { return this._size; }
        }

        public long Used
        {
            get
            { return this._used; }
        }

        public SpecInformation BlockInfo
        {
            get
            { return this._rdev; }
        }

        public long FSID
        {
            get
            { return this._fsid; }
        }

        public long FileID
        {
            get
            { return this._fileid; }
        }

        public NFSTimeValue LastAccessedTime
        {
            get
            { return this._atime; }
        }

        public NFSTimeValue ModifiedTime
        {
            get
            { return this._mtime; }
        }

        public NFSTimeValue CreateTime
        {
            get
            { return this._ctime; }
        }
    }
    // End of fattr3.cs
}