Program Listing for File Leaderboard.h

Return to documentation for file (axr.sdk/models/Leaderboard.h)

// Copyright (C) AcceleratXR, Inc. All rights reserved.
//
// Author: Jean-Philippe Steinmetz <info@acceleratxr.com>
#pragma once

#include "axr.sdk/EntityBase.h"
#include "axr.sdk/StringEnum.h"

#include <cpprest/details/basic_types.h>
#include <vector>

namespace axr {
namespace sdk {
namespace models {

class Leaderboard : public EntityBase
{
public:
    class SortDirection : public StringEnum<SortDirection>
    {
    public:
        static const SortDirection* ASCENDING;
        static const SortDirection* DESCENDING;

    private:
        SortDirection(const utility::char_t* value)
            : StringEnum(value)
        {
        }
    };

    class UpdateMethod : public StringEnum<UpdateMethod>
    {
    public:
        static const UpdateMethod* BEST;
        static const UpdateMethod* FIRST;
        static const UpdateMethod* LAST;
        static const UpdateMethod* SUM;

    private:
        UpdateMethod(const utility::char_t* value)
            : StringEnum(value)
        {
        }

        static std::map<utility::string_t, const UpdateMethod*> s_values;
    };

    Leaderboard() {}
    Leaderboard(const Leaderboard& value) : EntityBase(value) {}
    Leaderboard(Leaderboard&& value) : EntityBase(value) {}
    virtual ~Leaderboard() {}

    // Object overrides

    virtual Leaderboard& SetProperties(const std::map<utility::string_t, Variant>& value) override
    {
        Object::SetProperties(value);
        return *this;
    }

    virtual Leaderboard& SetProperties(std::map<utility::string_t, Variant>&& value) override
    {
        Object::SetProperties(value);
        return *this;
    }

    virtual Leaderboard& SetProperty(const utility::char_t* name, const Variant& value) override
    {
        Object::SetProperty(name, value);
        return*this;
    }

    virtual Leaderboard& SetProperty(const utility::string_t& name, const Variant& value) override
    {
        Object::SetProperty(name, value);
        return*this;
    }

    virtual Leaderboard& SetRemoteUrl(const utility::string_t& url) override
    {
        Object::SetRemoteUrl(url);
        return *this;
    }

    // EntityBase overrides

    virtual Leaderboard& SetUid(const utility::string_t& value) override
    {
        EntityBase::SetUid(value);
        return *this;
    }

    virtual Leaderboard& SetDateCreated(const datetime& value) override
    {
        EntityBase::SetDateCreated(value);
        return *this;
    }

    virtual Leaderboard& SetDateModified(const datetime& value) override
    {
        EntityBase::SetDateModified(value);
        return *this;
    }

    virtual Leaderboard& SetVersion(const uint64_t value) override
    {
        EntityBase::SetVersion(value);
        return *this;
    }

    static const utility::char_t* ClassName()
    {
        return _XPLATSTR("axr::sdk::models::Leaderboard");
    }

    void Validate() override;

    // Leaderboard members

    utility::string_t GetName() const;
#ifdef AXR_COMPILE_SERVER
    Leaderboard& SetName(const utility::string_t& value);
#endif // AXR_COMPILE_SERVER
    utility::string_t GetDescription() const;
#ifdef AXR_COMPILE_SERVER
    Leaderboard& SetDescription(const utility::string_t& value);
#endif // AXR_COMPILE_SERVER
    utility::string_t GetIcon() const;
#ifdef AXR_COMPILE_SERVER
    Leaderboard& SetIcon(const utility::string_t& value);
#endif // AXR_COMPILE_SERVER
    utility::string_t GetProductUid() const;
#ifdef AXR_COMPILE_SERVER
    Leaderboard& SetProductUid(const utility::string_t& value);
#endif // AXR_COMPILE_SERVER
    utility::string_t GetRankingSchedule() const;
#ifdef AXR_COMPILE_SERVER
    Leaderboard& SetRankingSchedule(const utility::string_t& value);
#endif // AXR_COMPILE_SERVER
    utility::string_t GetResetSchedule() const;
#ifdef AXR_COMPILE_SERVER
    Leaderboard& SetResetSchedule(const utility::string_t& value);
#endif // AXR_COMPILE_SERVER
    const SortDirection* GetSort() const;
#ifdef AXR_COMPILE_SERVER
    Leaderboard& SetSort(const SortDirection* value);
#endif // AXR_COMPILE_SERVER
    utility::string_t GetSortBy() const;
#ifdef AXR_COMPILE_SERVER
    Leaderboard& SetSortBy(const utility::string_t& value);
#endif // AXR_COMPILE_SERVER
    const UpdateMethod* GetUpdateMethod() const;
#ifdef AXR_COMPILE_SERVER
    Leaderboard& SetUpdateMethod(const UpdateMethod* value);
#endif // AXR_COMPILE_SERVER
};

} // namespace models
} // namespace axr
} // namespace sdk