Program Listing for File ProductService.h
↰ Return to documentation for file (axr.sdk/services/ProductService.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/Product.h"
#include "axr.sdk/utils/StringUtils.h"
#include "axr.sdk/models/Product.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(Product)
namespace axr {
namespace sdk {
namespace services {
using namespace axr::sdk::models;
class ProductService : public ServiceBase<Product> {
public:
ProductService(std::shared_ptr<Configuration> config, std::shared_ptr<net::IApiClient> apiClient)
: ServiceBase(config, apiClient)
{}
~ProductService() {}
static const utility::char_t* ClassName()
{
return _XPLATSTR("axr::sdk::services::ProductService");
}
pplx::task<std::vector<std::shared_ptr<Product>>> 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<Product>> Create(std::shared_ptr<Product> 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<Product>> FindById(const utility::string_t& id);
#ifdef AXR_COMPILE_SERVER
pplx::task<std::shared_ptr<Product>> Update(const utility::string_t& id, std::shared_ptr<Product> obj);
pplx::task<void> Delete(const utility::string_t& id);
pplx::task<void> Truncate(const std::map<utility::string_t, utility::string_t>* searchParams = nullptr);
#endif // AXR_COMPILE_SERVER
};
} // namespace services
} // namespace axr
} // namespace sdk