Program Listing for File SnapshotService.h

Return to documentation for file (axr.sdk/services/SnapshotService.h)

// Copyright (C) AcceleratXR, Inc. All rights reserved.
//
// Author: Jean-Philippe Steinmetz <info@acceleratxr.com>
//
// NOTE: This file was auto generated by the AcceleratXR code generator.
// https://gitlab.com/AcceleratXR/Core/code_generator.git
#pragma once

#include "axr.sdk/net/IApiClient.h"
#include "axr.sdk/ServiceBase.h"
#include "axr.sdk/models/Snapshot.h"
#include "axr.sdk/utils/StringUtils.h"
#include "axr.sdk/models/Snapshot.h"
#include "axr.sdk/models/Count.h"
#include "axr.sdk/utils/EntityWatchdog.h"

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

DEFINE_ENTITYWATCHDOG_SPEC(Snapshot)

namespace axr {
namespace sdk {
namespace services {

using namespace axr::sdk::models;

class SnapshotService : public ServiceBase<Snapshot>{
public:
    SnapshotService(std::shared_ptr<Configuration> config, std::shared_ptr<net::IApiClient> apiClient)
        : ServiceBase(config, apiClient)
    {}

    ~SnapshotService() {}

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

    pplx::task<std::vector<std::shared_ptr<Snapshot>>> FindAll(const std::map<utility::string_t,utility::string_t>* searchParams = nullptr, const uint16_t startIndex = 0, const uint16_t maxResults = 1000, const utility::string_t& sortBy = _XPLATSTR(""));
#ifdef AXR_COMPILE_SERVER
    pplx::task<std::shared_ptr<Snapshot>> Create(std::shared_ptr<Snapshot> obj);
#endif // AXR_COMPILE_SERVER
    pplx::task<uint64_t> Count(const std::map<utility::string_t,utility::string_t>* searchParams = nullptr, const uint16_t startIndex = 0, const uint16_t maxResults = 1000);

    pplx::task<std::shared_ptr<Snapshot>> FindById(const utility::string_t& id);
#ifdef AXR_COMPILE_SERVER
    pplx::task<std::shared_ptr<Snapshot>> Update(const utility::string_t& id, std::shared_ptr<Snapshot> obj);

    pplx::task<void> Delete(const utility::string_t& id);
#endif // AXR_COMPILE_SERVER
    // TODO Add findDelta behavior
};

} // namespace services
} // namespace axr
} // namespace sdk