Files
zeekay 83d7ffa4d7 Regenerate against the current cloud document
The lock sat at 574d1f1d while the product moved on. The team surface
stopped at rooms — no messages path, no way to open one — so anything
built on this client had to reach past it with its own HTTP calls, which
is the duplication a generated client exists to prevent.
2026-09-01 02:22:09 -07:00

137 lines
7.4 KiB
C++

/**
* Hanzo Cloud API
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* SpaceApi.h
*
*
*/
#ifndef HANZO_API_SpaceApi_H_
#define HANZO_API_SpaceApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/DriveIn.h"
#include "hanzo/model/DriveItem.h"
#include "hanzo/model/DriveList.h"
#include "hanzo/model/FileList.h"
#include "hanzo/model/SpaceHealth.h"
#include "hanzo/model/SpaceIn.h"
#include "hanzo/model/SpaceItem.h"
#include "hanzo/model/SpaceList.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class SpaceApi
{
public:
explicit SpaceApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~SpaceApi();
/// <summary>
/// Removes an EMPTY drive and answers 204.
/// </summary>
/// <remarks>
/// Removes an EMPTY drive and answers 204. A drive holding files is 409 rather than a cascade: deleting an org&#39;s files behind a single drive call is not a thing this surface will do silently. A drive or space the caller&#39;s org does not own is the same 404 an unknown name gives. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing deleted, and the debit lands only once the drive is gone.
/// </remarks>
/// <param name="space">Space is the space&#39;s name, from the path.</param>
/// <param name="drive">Drive is the drive&#39;s name, from the path.</param>
pplx::task<void> deleteSpaceBySpaceDrivesByDrive(
utility::string_t space,
utility::string_t drive
) const;
/// <summary>
/// Lists a space&#39;s drives.
/// </summary>
/// <remarks>
/// Lists a space&#39;s drives. Listing the drives IS listing the space&#39;s root folder, because a drive is the first segment of a key and nothing else — so the two can never disagree the way a drives table and the keys under it would. A space the caller&#39;s org does not own is the same 404 an unknown name gives. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing read, and the debit lands only once the listing has succeeded.
/// </remarks>
/// <param name="space">Space is the space&#39;s name, from the path.</param>
pplx::task<std::shared_ptr<DriveList>> getSpaceBySpaceDrives(
utility::string_t space
) const;
/// <summary>
/// Lists one folder level of a drive.
/// </summary>
/// <remarks>
/// Lists one folder level of a drive. Folder-style by default: sub-folders come back as folder entries, which is the file-manager view. &#x60;?recursive&#x3D;true&#x60; lists every file flat under the folder instead. Names are RELATIVE to &#x60;?folder&#x3D;&#x60;, and the listing is bounded so a huge drive cannot exhaust memory — Total is what came back, not what the drive holds. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing read, and the debit lands only once the listing has succeeded.
/// </remarks>
/// <param name="space">Space is the space to list in, from the path.</param>
/// <param name="drive">Drive is the drive to list, from the path.</param>
/// <param name="folder"> (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="recursive"> (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
pplx::task<std::shared_ptr<FileList>> getSpaceBySpaceDrivesByDriveFiles(
utility::string_t space,
utility::string_t drive,
boost::optional<utility::string_t> folder,
boost::optional<utility::string_t> recursive
) const;
/// <summary>
/// Health reports whether this deployment can serve spaces, drives and files.
/// </summary>
/// <remarks>
/// Health reports whether this deployment can serve spaces, drives and files. It is a REAL probe rather than a constant: 200 when object-store credentials are present, so the store is reachable in principle, and 503 with the reason when they are not. It is deliberately NOT gated — liveness has to be probe-able without a token — so it is the one operation here that names no space and bills nothing.
/// </remarks>
pplx::task<std::shared_ptr<SpaceHealth>> getSpaceHealth(
) const;
/// <summary>
/// Lists the caller org&#39;s own spaces.
/// </summary>
/// <remarks>
/// Lists the caller org&#39;s own spaces. Only the caller&#39;s: every space is physically named under a per-org prefix and the listing strips that prefix, so another org&#39;s spaces are not in the answer at all. Another org&#39;s space is not refused but INVISIBLE, so this cannot be used to learn that a name is taken elsewhere. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing done, and the debit lands only once the work has succeeded.
/// </remarks>
pplx::task<std::shared_ptr<SpaceList>> getSpaceSpaces(
) const;
/// <summary>
/// Makes a new drive in a space and answers 201 with it.
/// </summary>
/// <remarks>
/// Makes a new drive in a space and answers 201 with it. A drive is a PREFIX and not a bucket, so making one writes a zero-byte marker at \&quot;&lt;name&gt;/\&quot; — which is what makes an empty drive visible to a listing that has no other key to find. A name already taken in the space is 409. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing created, and the debit lands only once the drive exists.
/// </remarks>
/// <param name="space">Space is the space to create the drive in, from the path. It carries NO &#x60;url:\&quot;-\&quot;&#x60;, unlike the field below it, and the difference is the whole reason both tags are written out: zip&#39;s binder skips a field tagged \&quot;-\&quot; for EVERY URL source, path params included, so a path-borne value that carried it would arrive empty and the create would refuse a perfectly good address.</param>
/// <param name="driveIn"></param>
pplx::task<std::shared_ptr<DriveItem>> postSpaceBySpaceDrives(
utility::string_t space,
std::shared_ptr<DriveIn> driveIn
) const;
/// <summary>
/// Makes a new space for the caller&#39;s org and answers 201 with it.
/// </summary>
/// <remarks>
/// Makes a new space for the caller&#39;s org and answers 201 with it. The one bucket a space&#39;s files live in is derived from the caller&#39;s VALIDATED org, so an org can only ever create inside its own namespace and no request field can redirect that. A name already taken in the org is 409. Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing created, and the debit lands only once the space exists.
/// </remarks>
/// <param name="spaceIn"></param>
pplx::task<std::shared_ptr<SpaceItem>> postSpaceSpaces(
std::shared_ptr<SpaceIn> spaceIn
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_SpaceApi_H_ */