//Auto-generated by kalyptus. DO NOT EDIT.
namespace Akonadi {
    using Kimono;
    using System;
    using Qyoto;
    using System.Collections.Generic;
    /// <remarks>
    ///  Entity is the common base class for Item and Collection that provides
    ///  unique IDs and attributes handling.
    ///  This class is not meant to be used directly, use Item or Collection instead.
    /// </remarks>        <author> Tobias Koenig <tokoe@kde.org>
    ///  </author>
    ///         <short> The base class for Item and Collection. </short>
    [SmokeClass("Akonadi::Entity")]
    public class Entity : Object, IDisposable {
        protected SmokeInvocation interceptor = null;
        private IntPtr smokeObject;
        protected Entity(Type dummy) {}
        protected void CreateProxy() {
            interceptor = new SmokeInvocation(typeof(Entity), this);
        }
        private static SmokeInvocation staticInterceptor = null;
        static Entity() {
            staticInterceptor = new SmokeInvocation(typeof(Entity), null);
        }
        /// <remarks>
        ///  Describes the options that can be passed to access attributes.
        ///      </remarks>        <short>    Describes the options that can be passed to access attributes.</short>
        public enum CreateOption {
            AddIfMissing = 0,
        }
        // Akonadi::Entity* Entity(Akonadi::EntityPrivate* arg1); >>>> NOT CONVERTED
        /// <remarks>
        ///  Sets the unique <code>identifier</code> of the entity.
        ///      </remarks>        <short>    Sets the unique <code>identifier</code> of the entity.</short>
        public void SetId(long identifier) {
            interceptor.Invoke("setId$", "setId(qint64)", typeof(void), typeof(long), identifier);
        }
        /// <remarks>
        ///  Returns the unique identifier of the entity.
        ///      </remarks>        <short>    Returns the unique identifier of the entity.</short>
        public long Id() {
            return (long) interceptor.Invoke("id", "id() const", typeof(long));
        }
        /// <remarks>
        ///  Sets the remote <code>id</code> of the entity.
        ///      </remarks>        <short>    Sets the remote <code>id</code> of the entity.</short>
        public void SetRemoteId(string id) {
            interceptor.Invoke("setRemoteId$", "setRemoteId(const QString&)", typeof(void), typeof(string), id);
        }
        /// <remarks>
        ///  Returns the remote id of the entity.
        ///      </remarks>        <short>    Returns the remote id of the entity.</short>
        public string RemoteId() {
            return (string) interceptor.Invoke("remoteId", "remoteId() const", typeof(string));
        }
        /// <remarks>
        ///  Returns whether the entity is valid.
        ///      </remarks>        <short>    Returns whether the entity is valid.</short>
        public bool IsValid() {
            return (bool) interceptor.Invoke("isValid", "isValid() const", typeof(bool));
        }
        /// <remarks>
        ///  Returns whether the entity's id equals the
        ///  id of the <code>other</code> entity.
        ///      </remarks>        <short>    Returns whether the entity's id equals the  id of the <code>other</code> entity.</short>
        public override bool Equals(object o) {
            if (!(o is Entity)) { return false; }
            return this == (Entity) o;
        }
        public override int GetHashCode() {
            return interceptor.GetHashCode();
        }
        /// <remarks>
        ///  Adds an attribute to the entity.
        ///  If an attribute of the same type name already exists, it is deleted and
        ///  replaced with the new one.
        /// <param> name="attribute" The new attribute.
        /// </param> @note The entity takes the ownership of the attribute.
        ///      </remarks>        <short>    Adds an attribute to the entity.</short>
        public void AddAttribute(Akonadi.Attribute attribute) {
            interceptor.Invoke("addAttribute#", "addAttribute(Akonadi::Attribute*)", typeof(void), typeof(Akonadi.Attribute), attribute);
        }
        /// <remarks>
        ///  Removes and deletes the attribute of the given type <code>name.</code>
        ///      </remarks>        <short>    Removes and deletes the attribute of the given type <code>name.</code></short>
        public void RemoveAttribute(QByteArray name) {
            interceptor.Invoke("removeAttribute#", "removeAttribute(const QByteArray&)", typeof(void), typeof(QByteArray), name);
        }
        /// <remarks>
        ///  Returns <code>true</code> if the entity has an attribute of the given type <code>name</code>,
        ///  false otherwise.
        ///      </remarks>        <short>    Returns @c true if the entity has an attribute of the given type <code>name</code>,  false otherwise.</short>
        public bool HasAttribute(QByteArray name) {
            return (bool) interceptor.Invoke("hasAttribute#", "hasAttribute(const QByteArray&) const", typeof(bool), typeof(QByteArray), name);
        }
        /// <remarks>
        ///  Returns a list of all attributes of the entity.
        ///      </remarks>        <short>    Returns a list of all attributes of the entity.</short>
        public List<Akonadi.Attribute> Attributes() {
            return (List<Akonadi.Attribute>) interceptor.Invoke("attributes", "attributes() const", typeof(List<Akonadi.Attribute>));
        }
        /// <remarks>
        ///  Removes and deletes all attributes of the entity.
        ///      </remarks>        <short>    Removes and deletes all attributes of the entity.</short>
        public void ClearAttributes() {
            interceptor.Invoke("clearAttributes", "clearAttributes()", typeof(void));
        }
        /// <remarks>
        ///  Returns the attribute of the given type <code>name</code> if available, 0 otherwise.
        ///      </remarks>        <short>    Returns the attribute of the given type <code>name</code> if available, 0 otherwise.</short>
        public Akonadi.Attribute Attribute(QByteArray name) {
            return (Akonadi.Attribute) interceptor.Invoke("attribute#", "attribute(const QByteArray&) const", typeof(Akonadi.Attribute), typeof(QByteArray), name);
        }
        /// <remarks>
        ///  Creates an entity from an <code>other</code> entity.
        ///      </remarks>        <short>    Creates an entity from an <code>other</code> entity.</short>
        public Entity(Akonadi.Entity other) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("Entity#", "Entity(const Akonadi::Entity&)", typeof(void), typeof(Akonadi.Entity), other);
        }
        ~Entity() {
            interceptor.Invoke("~Entity", "~Entity()", typeof(void));
        }
        public void Dispose() {
            interceptor.Invoke("~Entity", "~Entity()", typeof(void));
        }
        public static bool operator==(Entity lhs, Akonadi.Entity other) {
            return (bool) staticInterceptor.Invoke("operator==#", "operator==(const Akonadi::Entity&) const", typeof(bool), typeof(Entity), lhs, typeof(Akonadi.Entity), other);
        }
        public static bool operator!=(Entity lhs, Akonadi.Entity other) {
            return !(bool) staticInterceptor.Invoke("operator==#", "operator==(const Akonadi::Entity&) const", typeof(bool), typeof(Entity), lhs, typeof(Akonadi.Entity), other);
        }
    }
}
