// This file is generated by kconfig_compiler_kf6 from openxchangeresource.kcfg.
// All changes you do to this file will be lost.
#ifndef SETTINGS_H
#define SETTINGS_H

#include <kconfigskeleton.h>
#include <QCoreApplication>
#include <QDebug>

class Settings : public KConfigSkeleton
{
  public:

    static Settings *self();
    static void instance(const QString& cfgfilename);
    static void instance(KSharedConfig::Ptr config);
    ~Settings() override;

    /**
      Set Server URL
    */
    static
    void setBaseUrl( const QString & v )
    {
      if (!self()->isBaseUrlImmutable())
        self()->mBaseUrl = v;
    }

    /**
      Get Server URL
    */
    static
    QString baseUrl()
    {
      return self()->mBaseUrl;
    }

    /**
      Is Server URL Immutable
    */
    static
    bool isBaseUrlImmutable()
    {
      return self()->isImmutable( QStringLiteral( "BaseUrl" ) );
    }

    /**
      Get Item object corresponding to BaseUrl()
    */
    ItemString *baseUrlItem()
    {
      return mBaseUrlItem;
    }

    /**
      Set Username
    */
    static
    void setUsername( const QString & v )
    {
      if (!self()->isUsernameImmutable())
        self()->mUsername = v;
    }

    /**
      Get Username
    */
    static
    QString username()
    {
      return self()->mUsername;
    }

    /**
      Is Username Immutable
    */
    static
    bool isUsernameImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Username" ) );
    }

    /**
      Get Item object corresponding to Username()
    */
    ItemString *usernameItem()
    {
      return mUsernameItem;
    }

    /**
      Set Password
    */
    static
    void setPassword( const QString & v )
    {
      if (!self()->isPasswordImmutable())
        self()->mPassword = v;
    }

    /**
      Get Password
    */
    static
    QString password()
    {
      return self()->mPassword;
    }

    /**
      Is Password Immutable
    */
    static
    bool isPasswordImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Password" ) );
    }

    /**
      Get Item object corresponding to Password()
    */
    ItemPassword *passwordItem()
    {
      return mPasswordItem;
    }

    /**
      Set Use incremental updates
    */
    static
    void setUseIncrementalUpdates( bool v )
    {
      if (!self()->isUseIncrementalUpdatesImmutable())
        self()->mUseIncrementalUpdates = v;
    }

    /**
      Get Use incremental updates
    */
    static
    bool useIncrementalUpdates()
    {
      return self()->mUseIncrementalUpdates;
    }

    /**
      Is Use incremental updates Immutable
    */
    static
    bool isUseIncrementalUpdatesImmutable()
    {
      return self()->isImmutable( QStringLiteral( "UseIncrementalUpdates" ) );
    }

    /**
      Get Item object corresponding to UseIncrementalUpdates()
    */
    ItemBool *useIncrementalUpdatesItem()
    {
      return mUseIncrementalUpdatesItem;
    }

    /**
      Set FoldersLastSync
    */
    static
    void setFoldersLastSync( quint64 v )
    {
      if (!self()->isFoldersLastSyncImmutable())
        self()->mFoldersLastSync = v;
    }

    /**
      Get FoldersLastSync
    */
    static
    quint64 foldersLastSync()
    {
      return self()->mFoldersLastSync;
    }

    /**
      Is FoldersLastSync Immutable
    */
    static
    bool isFoldersLastSyncImmutable()
    {
      return self()->isImmutable( QStringLiteral( "FoldersLastSync" ) );
    }

    /**
      Get Item object corresponding to FoldersLastSync()
    */
    ItemULongLong *foldersLastSyncItem()
    {
      return mFoldersLastSyncItem;
    }

    /**
      Set ObjectsLastSync
    */
    static
    void setObjectsLastSync( const QString & v )
    {
      if (!self()->isObjectsLastSyncImmutable())
        self()->mObjectsLastSync = v;
    }

    /**
      Get ObjectsLastSync
    */
    static
    QString objectsLastSync()
    {
      return self()->mObjectsLastSync;
    }

    /**
      Is ObjectsLastSync Immutable
    */
    static
    bool isObjectsLastSyncImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ObjectsLastSync" ) );
    }

    /**
      Get Item object corresponding to ObjectsLastSync()
    */
    ItemString *objectsLastSyncItem()
    {
      return mObjectsLastSyncItem;
    }

  protected:
    Settings(KSharedConfig::Ptr config);
    friend class SettingsHelper;


    // General
    QString mBaseUrl;
    QString mUsername;
    QString mPassword;
    bool mUseIncrementalUpdates;
    quint64 mFoldersLastSync;
    QString mObjectsLastSync;

  private:
    ItemString *mBaseUrlItem;
    ItemString *mUsernameItem;
    ItemPassword *mPasswordItem;
    ItemBool *mUseIncrementalUpdatesItem;
    ItemULongLong *mFoldersLastSyncItem;
    ItemString *mObjectsLastSyncItem;
};

#endif

