Files
moloapp/src/anthropic/admin/services/environments.h
T

78 lines
2.9 KiB
C++

// GENERATED by src/anthropic/admin/tools/check_spec.py --emit. Do not edit by hand:
// the table is verified against the SDK source and the reference pages.
#pragma once
// environments calls of the Anthropic API (one class per resource group). Every
// method is one row of calls.cpp; mutating and destructive ones are marked.
#include <memory>
#include <string>
#include "anthropic/admin/resource.h"
namespace molo::anthropic::admin {
// group environments
class Environments : public Resource {
public:
explicit Environments(std::shared_ptr<Gateway> gateway)
: Resource(std::move(gateway), Auth::kPlatform) {}
// POST /v1/environments/{environment_id}/archive DESTRUCTIVE
Json archive(const std::string& environment_id) const;
// POST /v1/environments MUTATES
Json create(const Json& body) const;
// DELETE /v1/environments/{environment_id} DESTRUCTIVE
Json destroy(const std::string& environment_id) const;
// GET /v1/environments
Json list(const Query& query = Query()) const;
Walk list_all(const Query& query = Query(), std::size_t max_pages = Caps::kMaxPages) const;
// GET /v1/environments/{environment_id}
Json get(const std::string& environment_id) const;
// POST /v1/environments/{environment_id} MUTATES
Json update(const std::string& environment_id, const Json& body) const;
};
// group environments.work
class EnvironmentsWork : public Resource {
public:
explicit EnvironmentsWork(std::shared_ptr<Gateway> gateway)
: Resource(std::move(gateway), Auth::kPlatform) {}
// POST /v1/environments/{environment_id}/work/{work_id}/ack MUTATES
Json ack(const std::string& environment_id, const std::string& work_id) const;
// POST /v1/environments/{environment_id}/work/{work_id}/heartbeat MUTATES
Json heartbeat(const std::string& environment_id, const std::string& work_id, const Query& query = Query()) const;
// GET /v1/environments/{environment_id}/work
Json list(const std::string& environment_id, const Query& query = Query()) const;
Walk list_all(const std::string& environment_id, const Query& query = Query(), std::size_t max_pages = Caps::kMaxPages) const;
// GET /v1/environments/{environment_id}/work/poll
Json poll(const std::string& environment_id, const Query& query = Query()) const;
// GET /v1/environments/{environment_id}/work/{work_id}
Json get(const std::string& environment_id, const std::string& work_id) const;
// GET /v1/environments/{environment_id}/work/stats
Json stats(const std::string& environment_id) const;
// POST /v1/environments/{environment_id}/work/{work_id}/stop DESTRUCTIVE
Json stop(const std::string& environment_id, const std::string& work_id, const Json& body) const;
// POST /v1/environments/{environment_id}/work/{work_id} MUTATES
Json update(const std::string& environment_id, const std::string& work_id, const Json& body) const;
};
} // namespace molo::anthropic::admin