// M-Files Server gRPC API 26.11. Generated from the M-Files Server IDL; do not edit.
// Documentation: https://developer.m-files.com/APIs/gRPC-API/
syntax = "proto3";

package MFiles;

import "google/protobuf/timestamp.proto";
import "mfiles/api/annotations.proto";
import "mfiles/enums.proto";
import "mfiles/structs.proto";

option csharp_namespace = "MFiles.Grpc";
option go_package = "github.com/M-Files/mfiles-grpc-api/go/mfiles;mfiles";
option java_multiple_files = true;
option java_package = "com.mfiles.grpc";
option objc_class_prefix = "MF_";

// An interface for handling documents and files
//
// Provides methods for adding, modifying and removing objects.
// Includes version control operations as well, such as checkout and check-in.
//
// Everything you do with individual objects: read their versions, properties and files, create
// them, change them, and manage their lifecycle. To find objects in the first place, use
// [SearchObjects](mfiles:MFiles.IRPCSearch.SearchObjects).
//
// | Job | Method |
// | --- | --- |
// | Read the latest version and properties of one or many objects | [GetObjectVersionAndPropertiesOfMultipleObjects](mfiles:MFiles.IRPCObjectOperations.GetObjectVersionAndPropertiesOfMultipleObjects) |
// | Read one object, latest or a specific version | [GetObjectInfoAndProperties](mfiles:MFiles.IRPCObjectOperations.GetObjectInfoAndProperties) |
// | Read selected data (properties, ACL, permissions, relationships, comments) per object | [GetObjectDataOfMultipleObjects](mfiles:MFiles.IRPCObjectOperations.GetObjectDataOfMultipleObjects) |
// | Read the properties of a known, specific version | [GetProperties](mfiles:MFiles.IRPCObjectOperations.GetProperties) |
// | Resolve the latest version number | [GetLatestObjectVersion](mfiles:MFiles.IRPCObjectOperations.GetLatestObjectVersion) |
// | List the versions of an object | [GetObjectHistory](mfiles:MFiles.IRPCObjectOperations.GetObjectHistory) |
// | Download a file | [DownloadFile_Begin](mfiles:MFiles.IRPCObjectOperations.DownloadFile_Begin), [DownloadFile_ReadBlock](mfiles:MFiles.IRPCObjectOperations.DownloadFile_ReadBlock) |
// | Get the text of a file (plain text or Markdown) | [GetTextContentForFileWithFormat](mfiles:MFiles.IRPCObjectOperations.GetTextContentForFileWithFormat) |
// | Upload content for a new object | [UploadTempFile](mfiles:MFiles.IRPCObjectOperations.UploadTempFile), [UploadTempFileCommit](mfiles:MFiles.IRPCObjectOperations.UploadTempFileCommit) |
// | Create an object, with or without files | [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles), [AddObject](mfiles:MFiles.IRPCObjectOperations.AddObject) |
// | Change properties | [SetProperties](mfiles:MFiles.IRPCObjectOperations.SetProperties), [SetPropertiesMultiple](mfiles:MFiles.IRPCObjectOperations.SetPropertiesMultiple) |
// | Check out, check in, undo a check-out | [CheckOut](mfiles:MFiles.IRPCObjectOperations.CheckOut), [CheckIn](mfiles:MFiles.IRPCObjectOperations.CheckIn), [UndoCheckout](mfiles:MFiles.IRPCObjectOperations.UndoCheckout) |
// | Add a file to an object | [AddObjectFile](mfiles:MFiles.IRPCObjectOperations.AddObjectFile) |
// | Workflow states and transitions | [GetWorkflowStates](mfiles:MFiles.IRPCObjectOperations.GetWorkflowStates), [GetWorkflowStatesAndTransitions](mfiles:MFiles.IRPCObjectOperations.GetWorkflowStatesAndTransitions) |
// | What the caller may do with an object | [GetEffectivePermissions](mfiles:MFiles.IRPCObjectOperations.GetEffectivePermissions) |
// | Delete, undelete, destroy | [RemoveObject](mfiles:MFiles.IRPCObjectOperations.RemoveObject), [UndeleteObject](mfiles:MFiles.IRPCObjectOperations.UndeleteObject), [DestroyObject](mfiles:MFiles.IRPCObjectOperations.DestroyObject) |
//
// The other methods are batch variants of the ones above (`...Multiple`), history and version
// comments, duplicate detection (`Find...Duplicates`), objects from external repositories
// (`...External...`, `...Promote...`, `...Unmanaged...`), and helpers for M-Files client features
// such as document comparison and external editing.
//
// **Versions.** Most read methods take an [ObjVer](mfiles:MFiles.ObjVer) and need a *specific*
// version (`OBJ_VER_VERSION_TYPE_SPECIFIC` with `internal_version`). `GetProperties`,
// `GetPropertiesOfMultipleObjects`, `GetObjectFiles`, `GetRelationshipsForObject` and
// `GetLatestVersionCommentOfMultipleObjects` answer "Not found." to the `OBJ_VER_VERSION_TYPE_LATEST`
// marker. To read the latest version, either use a method that has its own "latest" switch
// (`GetObjectVersionAndPropertiesOfMultipleObjects`, `GetObjectInfoAndProperties`,
// `GetObjectDataOfMultipleObjects`, `GetObjectInfo`), or resolve the number first with
// `GetLatestObjectVersion`. The same applies to files: [FileVer](mfiles:MFiles.FileVer) must name a
// specific file version.
//
// **Checked-out objects.** "Latest" means the latest checked-in version. A version that is
// checked out is returned only to the user who has it checked out, and only where the request says
// so (`allow_checked_out`, `OBJECT_VERSION_DATA_REQUEST_VERSION_TYPE_LATEST_VERSIONS`), except
// `GetObjectInfo`, which always returns it to that user.
//
// **Creating objects: always set `acl`.** `AddObjectWithFiles`, `AddObject` and the other creating
// methods store the ACL you send; they do not compute one from the class. An unset `acl` gives the
// new object an empty ACL: once it is checked in, only users with the vault-level right to see all
// objects can see it, not even its creator. Send a named ACL, for example
// `acl { custom_component { has_named_acl: true named_acl_id: -1 } }` ("Full control for all
// internal users"); see [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles).
//
// **Files.** The object's version information ([ObjectVersion](mfiles:MFiles.ObjectVersion)
// `files`) already lists its files with their `file_ver`, size and MD5 checksum, so after reading
// an object you can download its files without calling `GetObjectFiles`. `DownloadFile`,
// `DownloadFileWithDownloadID`, `DownloadFileWithDownloadKey`, `GetFileDownloadUrl` and
// `GetFileDownloadUrl2` serve the HTTP gateway and answer "Not implemented." over native gRPC.
//
// **Errors.** Errors arrive with gRPC status `UNKNOWN` and the M-Files error message as the status
// details. A missing object or version is "Not found." (0x8004000B). An object the caller is not
// allowed to read is "Access denied." (0x800407E4) for most methods, but "Not found." for
// `GetObjectInfoAndProperties`, and `GetObjectHistory` returns an empty list for it.
//
// Background:
// [Objects and versions](https://developer.m-files.com/APIs/gRPC-API/concepts/objects-and-versions/),
// [Properties and values](https://developer.m-files.com/APIs/gRPC-API/concepts/properties-and-values/),
// [Permissions](https://developer.m-files.com/APIs/gRPC-API/concepts/permissions/),
// [Workflows](https://developer.m-files.com/APIs/gRPC-API/concepts/workflows/) and
// [Files](https://developer.m-files.com/APIs/gRPC-API/runtime/files/).
service IRPCObjectOperations {
	option (mfiles.api.service) = { book: "vault" level: LEVEL_CORE title: "Objects, versions, properties and files" };

	// Reads a block of a file from a download session.
	//
	// `block_size` is at most 4 MiB (4194304 bytes); a larger value fails with "The parameter is
	// incorrect. (Block size exceeded the limit of 4194304 bytes.)". The server returns `block_size`
	// bytes, or fewer at the end of the file; an `offset` at or past the end returns no data. Blocks can
	// be read in any order and read again.
	//
	// When the last block has been read and the file was read in order from offset 0, the server
	// closes the download session; a later read fails with "Not found. (The specified download session
	// <id> does not exist.)". Otherwise close it with
	// [DownloadFile_Stop](mfiles:MFiles.IRPCObjectOperations.DownloadFile_Stop).
	//
	// The session also serves the downloads opened by
	// [DownloadTempFileFromUpload_Begin](mfiles:MFiles.IRPCObjectOperations.DownloadTempFileFromUpload_Begin).
	rpc DownloadFile_ReadBlock( DownloadFile_ReadBlockRequest ) returns ( DownloadFile_ReadBlockResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION highlighted: true };
	}

	// Uploads a block of a file to a temporary upload session on the server. The upload can then be
	// used as the content of a new object.
	//
	// Upload a file in one or more calls:
	//
	// 1. The first call has `upload_id` 0, `offset` 0 and the `total_size_in_bytes` of the file. It
	//    returns the new `upload_id`.
	// 2. Further calls pass that `upload_id` and the `offset` of their block.
	// 3. [UploadTempFileCommit](mfiles:MFiles.IRPCObjectOperations.UploadTempFileCommit) completes the
	//    upload.
	//
	// The committed upload can be used by
	// [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles) (`files` with
	// `OBJ_FILE_SOURCE_TYPE_UPLOADED_FILE` or `..._UPLOADED_FILES` and the `upload_id`), which consumes
	// it, and by [DownloadTempFileFromUpload_Begin](mfiles:MFiles.IRPCObjectOperations.DownloadTempFileFromUpload_Begin)
	// and [GetTextContentForTemporaryFile](mfiles:MFiles.IRPCObjectOperations.GetTextContentForTemporaryFile).
	// An upload that is not committed cannot be used ("The process cannot access the file because it is
	// being used by another process.").
	//
	// **Session.** The upload belongs to the calling login session, on the server that received the
	// first block; another login session gets "Not found. (The specified upload session <id> does not
	// exist.)". An upload that is not used for about 10 minutes (server default) is removed: call
	// [KeepUploadSessionAlive](mfiles:MFiles.IRPCObjectOperations.KeepUploadSessionAlive) at the interval
	// given in `SessionData.keep_upload_session_alive_interval_in_seconds` if you keep it longer.
	// Remove uploads you do not use with
	// [RemoveUploadSession](mfiles:MFiles.IRPCObjectOperations.RemoveUploadSession). Anonymous sessions
	// cannot upload.
	//
	// Each request is limited by the server's maximum gRPC message size (48 MiB by default).
	rpc UploadTempFile( UploadTempFileRequest ) returns ( UploadTempFileResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION highlighted: true };
	}

	// Gets the signature settings for a state transition.
	//
	// Tells whether a state transition requires an electronic signature and what the signature must
	// contain. Give `state_transition_id`, or -1 and the `from_state` and `to_state`. `found` is true if
	// the transition exists. Signing is done with the `signature` field of
	// [SetProperties](mfiles:MFiles.IRPCObjectOperations.SetProperties).
	rpc GetStateTransitionSignatureSettings( GetStateTransitionSignatureSettingsRequest ) returns ( GetStateTransitionSignatureSettingsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Removes an upload and its temporary file.
	//
	// Removing an upload that does not exist, for example one already consumed by
	// [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles), succeeds.
	rpc RemoveUploadSession( RemoveUploadSessionRequest ) returns ( RemoveUploadSessionResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Completes an upload made with UploadTempFile.
	//
	// `logical_size` must equal the number of bytes uploaded. Otherwise the call fails with "File size
	// mismatch." (0x8004003D) and the server **removes the upload**, so it must be uploaded again.
	// Commit only once: a second commit of the same upload also fails with "File size mismatch." and
	// removes it. The response is empty; the upload is used by its `upload_id`.
	rpc UploadTempFileCommit( UploadTempFileCommitRequest ) returns ( UploadTempFileCommitResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION highlighted: true };
	}

	// Creates a new object without files.
	//
	// Same as [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles) without a file
	// source: the same required properties apply. **Set `acl`**: an unset `acl` gives the object an
	// empty ACL, and once it is checked in only users with the vault-level right to see all objects can
	// see it, not even its creator. A document created this way has no
	// files, so Single file (22) must be false; true fails with "Cannot set document to single-file
	// mode." Use AddObjectWithFiles to create a document with files.
	rpc AddObject( AddObjectRequest ) returns ( AddObjectResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Creates a single-file document from inline file content and checks it in. Older form; prefer
	// AddObjectWithFiles with an inline file source.
	//
	// The document is always checked in. Single file (22) must be set to true in `properties`.
	rpc AddSingleFileDocument_SingleStep( AddSingleFileDocument_SingleStepRequest ) returns ( AddSingleFileDocument_SingleStepResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Creates a single-file document from inline file content. Older form; prefer AddObjectWithFiles
	// with an inline file source.
	//
	// Single file (22) must be set to true in `properties`. `check_in: false` is allowed only with
	// empty `file_data`; with content it fails with invalid argument.
	rpc AddSingleFileDocument_SingleStep2( AddSingleFileDocument_SingleStep2Request ) returns ( AddSingleFileDocument_SingleStep2Response ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Creates a single-file document from inline file content and returns its file version. Older
	// form; prefer AddObjectWithFiles with an inline file source.
	//
	// Single file (22) must be set to true in `properties`: without it the call fails with "The
	// mandatory property value "Single file" is missing." `check_in: false` is allowed only with empty
	// `file_data`; with content it fails with invalid argument. The file title is the
	// document's title.
	rpc AddSingleFileDocument_SingleStep3( AddSingleFileDocument_SingleStep3Request ) returns ( AddSingleFileDocument_SingleStep3Response ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Checks out one object.
	//
	// Checking out creates a new version (latest checked-in version + 1) that only the caller can
	// change. [GetLatestObjectVersion](mfiles:MFiles.IRPCObjectOperations.GetLatestObjectVersion)
	// returns the checked-out version only with `allow_checked_out: true`.
	// The check-out is bound to the user and to
	// the computer name of the session, which is `environment_data.client_name` of the
	// [LogIn](mfiles:MFiles.IRPCLogin.LogIn) call: another session of the same user with a different
	// `client_name` fails with "The object was checked out to another computer (<name>)."
	//
	// Errors: "The object is already checked out." if the caller already has it checked out,
	// "The object is checked out to another user." if someone else does.
	//
	// You rarely need CheckOut for metadata changes:
	// [SetProperties](mfiles:MFiles.IRPCObjectOperations.SetProperties) with
	// `allow_modifying_checked_in_object` checks out, changes and checks in in one call. Check out
	// explicitly to make several changes (properties and files) into one new version.
	rpc CheckOut( CheckOutRequest ) returns ( CheckOutResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Checks out several objects in one call.
	//
	// Each object behaves as in [CheckOut](mfiles:MFiles.IRPCObjectOperations.CheckOut).
	// `checked_out_versions` and `previous_versions` are in the order of `obj_ids`.
	rpc CheckOutMultiple( CheckOutMultipleRequest ) returns ( CheckOutMultipleResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Checks in one object.
	//
	// `obj_ver` must name the checked-out version by number. The `OBJ_VER_VERSION_TYPE_LATEST` marker
	// fails with "Not found. Invalid object version: -1", and the latest checked-in version fails with
	// "... the version you are attempting to access is not the current checked-out version."
	// Get the checked-out version number from the CheckOut response or from
	// [GetLatestObjectVersion](mfiles:MFiles.IRPCObjectOperations.GetLatestObjectVersion) with
	// `allow_checked_out: true`.
	//
	// If nothing was changed since the check-out, the server undoes the check-out instead of creating a
	// version: the latest version stays the one before the check-out. Properties sent in
	// `properties` are set before check-in and count as a change. Set a version comment by sending
	// Comment (33, multi-line text) in `properties`.
	//
	// Files added with [AddObjectFile](mfiles:MFiles.IRPCObjectOperations.AddObjectFile) whose content was
	// never uploaded and committed are dropped at check-in.
	//
	// Check in from a session of the same user with the same `client_name` as the one that checked
	// the object out; see [CheckOut](mfiles:MFiles.IRPCObjectOperations.CheckOut).
	rpc CheckIn( CheckInRequest ) returns ( CheckInResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Checks in several objects in one call.
	//
	// Each object behaves as in [CheckIn](mfiles:MFiles.IRPCObjectOperations.CheckIn): `obj_vers` must
	// name the checked-out versions by number. The same `properties` are set on every object before
	// check-in.
	rpc CheckInMultiple( CheckInMultipleRequest ) returns ( CheckInMultipleResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Undoes the checkout of one object.
	//
	// Discards the checked-out version and all changes made to it; the latest checked-in version becomes
	// the latest version again. For a new object that has never been checked in, undoing the check-out
	// discards the whole object.
	//
	// `obj_ver` must name the checked-out version by number; the LATEST marker fails with "Not found.
	// Invalid object version: -1". Undoing a check-out of an object that is not checked out
	// fails with "The object is not checked out."
	//
	// Without `force`, only the user who checked the object out can undo the check-out, from the same
	// computer. With `force`, the user can undo their own check-out from any computer, and a user with
	// the vault-level right to force undo check-out (`force_undo_checkout`) can undo anyone's check-out.
	rpc UndoCheckout( UndoCheckoutRequest ) returns ( UndoCheckoutResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Undoes the check-out of several objects in one call.
	//
	// Each object behaves as in [UndoCheckout](mfiles:MFiles.IRPCObjectOperations.UndoCheckout).
	rpc UndoCheckoutMultiple( UndoCheckoutMultipleRequest ) returns ( UndoCheckoutMultipleResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the property values of one specific object version.
	//
	// `obj_ver` must name a specific version (`OBJ_VER_VERSION_TYPE_SPECIFIC` and `internal_version`).
	// The `OBJ_VER_VERSION_TYPE_LATEST` marker, `OBJ_VER_VERSION_TYPE_ANY` and an unset version all fail
	// with "Not found." (0x8004000B). To read the latest properties, use
	// [GetObjectVersionAndPropertiesOfMultipleObjects](mfiles:MFiles.IRPCObjectOperations.GetObjectVersionAndPropertiesOfMultipleObjects)
	// with `latest_versions` true, or get the version number from
	// [GetLatestObjectVersion](mfiles:MFiles.IRPCObjectOperations.GetLatestObjectVersion) first.
	//
	// A caller who cannot read the object gets "Access denied." (0x800407E4).
	rpc GetProperties( GetPropertiesRequest ) returns ( GetPropertiesResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Gets the property values of several specific object versions.
	//
	// Like [GetProperties](mfiles:MFiles.IRPCObjectOperations.GetProperties) for many versions: each
	// item of `objvers` must name a specific version, and the whole call fails with "Not found." if any
	// of them is missing. `properties[i]` belongs to `objvers[i]`.
	rpc GetPropertiesOfMultipleObjects( GetPropertiesOfMultipleObjectsRequest ) returns ( GetPropertiesOfMultipleObjectsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// If the object is currently checked in, a new checked-in version is created.
	// If the object is currently checked out, the changes are applied to the checked-out version.
	//
	// Changes several objects in one transaction. Each entry in `properties` has the same meaning as the
	// fields of [SetProperties](mfiles:MFiles.IRPCObjectOperations.SetProperties), with the same rules
	// for versions, removal and check-out. If any entry fails, nothing is changed. Name each
	// object only once: two entries for the same object fail with "Not found."
	//
	// `results` is in the order of `properties`.
	rpc SetPropertiesMultiple( SetPropertiesMultipleRequest ) returns ( SetPropertiesMultipleResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Sets one property value of an object version.
	//
	// For ordinary properties the object must be checked out to the caller; on a checked-in version the
	// call fails with "The object is not checked out." Properties that belong to a single
	// version, such as Comment (33), can also be set on a checked-in version, including an older one;
	// this needs more than edit access: a normal user got "You do not have sufficient access rights to
	// change the property "Comment" in checked-in versions." where a vault administrator succeeded, and no
	// new version was created. Use
	// [SetProperties](mfiles:MFiles.IRPCObjectOperations.SetProperties) for ordinary changes.
	rpc UpdateProperty( UpdatePropertyRequest ) returns ( UpdatePropertyResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Removes one property value from an object version.
	//
	// The same rules as [UpdateProperty](mfiles:MFiles.IRPCObjectOperations.UpdateProperty) apply,
	// also to Comment (33). Properties the class requires cannot be removed.
	rpc RemoveProperty( RemovePropertyRequest ) returns ( RemovePropertyResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Sets a property that belongs to the object as a whole rather than to one version.
	rpc SetObjectLevelProperty( SetObjectLevelPropertyRequest ) returns ( SetObjectLevelPropertyResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Overwrites the creation and last modification information (who and when) of a checked-out object.
	//
	// This is a specific method for updating the creation and last modification info of an object.
	// The operation requires full control of vault and the object must be checked out.
	// The creation related information can be updated only for the first version of the object before it is
	// checked in.
	//
	// Requires the vault-level right to change the full control role, normally held by vault
	// administrators. Used by migration and import tools.
	rpc UpdateObjectModificationInfo( UpdateObjectModificationInfoRequest ) returns ( UpdateObjectModificationInfoResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Adds and removes objects from the favorites collection of the user.
	//
	// Changes the caller's Favorites.
	rpc SetFavoritesMultiple( SetFavoritesMultipleRequest ) returns ( SetFavoritesMultipleResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the version information of one object without its property values.
	//
	// With `latest_version` true, the caller gets the latest checked-in version, or the checked-out
	// version if the object is checked out to the caller. With `latest_version` false, `version` must be
	// a specific version. A caller who cannot read the object gets "Access denied." (0x800407E4).
	rpc GetObjectInfo( GetObjectInfoRequest ) returns ( GetObjectInfoResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Checks user's access to an object based on an ACL.
	//
	// Evaluates an ACL for the caller without touching any object, for example a named ACL's
	// `acl_for_objects` before using it (for example, `has_access` true for "Full control for all internal
	// users", false for a named ACL of a group the user is not in).
	rpc CheckAccess( CheckAccessRequest ) returns ( CheckAccessResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the permissions (ACL) of an object version.
	//
	// The caller must be able to read the object version. The named ACL link is in
	// `acl.custom_component.named_acl_id`.
	rpc GetSecurity( GetSecurityRequest ) returns ( GetSecurityResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the permissions (ACL) of several object versions, in the order of `obj_vers`.
	rpc GetSecurityOfMultipleObjects( GetSecurityOfMultipleObjectsRequest ) returns ( GetSecurityOfMultipleObjectsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Changes the security settings of an object.
	//
	// Replaces the ACL of the object version in place: no check-out is needed and no new version is
	// created. `obj_ver` must name a version by number; the LATEST marker fails with "Not
	// found." Set `options.change_acl_in_all_versions` to change every version.
	//
	// To give the object a named ACL, send that named ACL's `acl_for_objects` from
	// [GetNamedACLs](mfiles:MFiles.IRPCNamedACLs.GetNamedACLs), as for
	// [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles).
	//
	// The caller can remove their own access: the call succeeds and
	// `is_specified_version_still_visible` is false. Set
	// `options.require_read_access_after_operation` to prevent that: the call then fails with "The user
	// is about to lose the requested read access."
	rpc ChangeSecurity( ChangeSecurityRequest ) returns ( ChangeSecurityResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Adds new document file to a document.
	//
	// Adds a file record to a checked-out object; the content is uploaded separately. On a checked-in
	// object the call fails with "The object is not checked out." The sequence that works:
	//
	// 1. [CheckOut](mfiles:MFiles.IRPCObjectOperations.CheckOut) the object.
	// 2. AddObjectFile with the checked-out version: returns `file_ver`.
	// 3. [UploadFile](mfiles:MFiles.IRPCObjectOperations.UploadFile) with `upload_id: 0`, the object,
	//    `file { file_ver, title, extension, size }` and the content, then
	//    [UploadFileCommit](mfiles:MFiles.IRPCObjectOperations.UploadFileCommit) with the returned
	//    `upload_id` and the same `file`.
	// 4. [CheckIn](mfiles:MFiles.IRPCObjectOperations.CheckIn).
	//
	// A file whose content is never committed is dropped at check-in. To create a new document with
	// files, use
	// [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles) instead.
	rpc AddObjectFile( AddObjectFileRequest ) returns ( AddObjectFileResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Removes a file from a document.
	//
	// The object must be checked out to the caller; `file_ver` is the file's version in the checked-out
	// version (check-out gives the files new file versions). The only file of a single-file document
	// cannot be removed: "The document is in single-file mode." Set Single file (22) to false first.
	rpc RemoveObjectFile( RemoveObjectFileRequest ) returns ( RemoveObjectFileResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Renames a document file.
	//
	// The object must be checked out to the caller. Changes the file's title and extension, not its
	// content.
	rpc RenameObjectFile( RenameObjectFileRequest ) returns ( RenameObjectFileResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the files of a specific object version.
	//
	// `obj_ver` must name a specific version; the `OBJ_VER_VERSION_TYPE_LATEST` marker fails with "Not
	// found.". You often do not need this call: the version information returned by the read methods
	// ([ObjectVersion](mfiles:MFiles.ObjectVersion) `files`) already contains the same list. Pass a
	// returned `File.file_ver` to
	// [DownloadFile_Begin](mfiles:MFiles.IRPCObjectOperations.DownloadFile_Begin) to download the file.
	//
	// A caller who cannot read the object gets "Access denied.".
	rpc GetObjectFiles( GetObjectFilesRequest ) returns ( GetObjectFilesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Uploads a block of new content for an existing file of an object that is checked out to the
	// caller.
	//
	// Works like [UploadTempFile](mfiles:MFiles.IRPCObjectOperations.UploadTempFile): the first call has
	// `upload_id` 0 and `offset` 0, later calls pass the returned `upload_id`. Complete the upload with
	// [UploadFileCommit](mfiles:MFiles.IRPCObjectOperations.UploadFileCommit), which replaces the
	// content of the file. To create a new object with files, use `UploadTempFile` and
	// [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles) instead.
	rpc UploadFile( UploadFileRequest ) returns ( UploadFileResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Completes an upload made with UploadFile and stores it as the new content of the file.
	//
	// The object must be checked out to the caller, and the caller needs edit access to it.
	// `file.size` must equal the number of bytes uploaded ("File size mismatch." otherwise) and
	// `file.size_precision` must be `FILE_SIZE_PRECISION_EXACT`. If `obj_id` is set, it must be the
	// object that owns the file ("The parameter is incorrect. (Object ID mismatch.)"). The title and
	// extension in `file` are ignored; rename a file with `RenameObjectFile`. The upload is removed
	// after the commit, also when the commit fails.
	rpc UploadFileCommit( UploadFileCommitRequest ) returns ( UploadFileCommitResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the size of a specific file version in bytes.
	//
	// The same value as `File.size` in the version information. `obj_file_ver.file_ver` must name a
	// specific file version; `FILE_VER_TYPE_LATEST` fails with "Not found. (File <id>-0 not found.)".
	rpc GetFileSize( GetFileSizeRequest ) returns ( GetFileSizeResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the files of a checked-out object version for modification by an event handler. Used by
	// server-side vault applications; requires the vault-level right to edit and delete all objects.
	rpc GetObjectFilesForModificationInEventHandler( GetObjectFilesForModificationInEventHandlerRequest ) returns ( GetObjectFilesForModificationInEventHandlerResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Removes one object i.e. marks it deleted.
	//
	// Marks the object deleted; [UndeleteObject](mfiles:MFiles.IRPCObjectOperations.UndeleteObject)
	// restores it, [DestroyObject](mfiles:MFiles.IRPCObjectOperations.DestroyObject) removes it for good.
	// A deleted object disappears from normal reads and searches: reading it as a normal user fails with
	// "Not found.", changing it fails with "The object has been removed. (ID: <id>)", and deleting it
	// again fails the same way. Requires a license that allows modifications.
	rpc RemoveObject( RemoveObjectRequest ) returns ( RemoveObjectResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Marks several objects deleted in one transaction.
	//
	// If any object fails (for example one that does not exist), none is deleted.
	rpc RemoveObjects( RemoveObjectsRequest ) returns ( RemoveObjectsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Undeletes a previously removed object.
	//
	// Restores an object deleted with [RemoveObject](mfiles:MFiles.IRPCObjectOperations.RemoveObject).
	// Requires the vault-level right to undelete objects (`undelete_objects`): a normal user gets "Access
	// denied." An object that is not deleted fails with "The object is not in deleted state."
	rpc UndeleteObject( UndeleteObjectRequest ) returns ( UndeleteObjectResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Restores several deleted objects. Requires the vault-level right to undelete objects.
	rpc UndeleteObjects( UndeleteObjectsRequest ) returns ( UndeleteObjectsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Permanently destroys an object, or one version of it.
	//
	// Destroying cannot be undone. Requires the vault-level right to destroy objects (`destroy_objects`):
	// a normal user gets "Access denied." The object does not need to be deleted first.
	//
	// * Whole object: `all_versions: true` and `version.type: OBJ_VER_VERSION_TYPE_ALL`. Leaving
	//   `version` unset fails with "The parameter is incorrect."
	// * One version: `all_versions: false` and `version` with `OBJ_VER_VERSION_TYPE_SPECIFIC` and the
	//   number. The latest checked-in version cannot be destroyed: "Destroying the latest checked-in
	//   version of an object is not allowed."
	rpc DestroyObject( DestroyObjectRequest ) returns ( DestroyObjectResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Permanently destroys several objects with all their versions. Requires the vault-level right to
	// destroy objects.
	rpc DestroyObjects( DestroyObjectsRequest ) returns ( DestroyObjectsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Permanently destroys specific object versions.
	//
	// Each entry must name a version by number; the LATEST marker fails with "The parameter is
	// incorrect." The latest checked-in version cannot be destroyed. The call is all or nothing: if one
	// version cannot be destroyed (for example it no longer exists), none is. Requires the
	// vault-level right to destroy objects.
	rpc DestroyObjectVersions( DestroyObjectVersionsRequest ) returns ( DestroyObjectVersionsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Lists the existing versions of an object, oldest first.
	//
	// Each item is a specific version number. Versions that have been destroyed are not listed, so the
	// numbers can have gaps and the first one need not be 1. The version that is checked out to the
	// caller is included.
	//
	// A caller who cannot read the object gets an empty list, not an error. A missing object gives "Not
	// found.". For version information per version, use
	// [GetObjectHistory2](mfiles:MFiles.IRPCObjectOperations.GetObjectHistory2).
	rpc GetObjectHistory( GetObjectHistoryRequest ) returns ( GetObjectHistoryResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Lists the existing versions of an object with their version information, oldest first.
	//
	// Like [GetObjectHistory](mfiles:MFiles.IRPCObjectOperations.GetObjectHistory), but each item is the
	// full version information, including the files of the version. The `base_properties` of the
	// versions are not filled; read properties with
	// [GetProperties](mfiles:MFiles.IRPCObjectOperations.GetProperties).
	rpc GetObjectHistory2( GetObjectHistory2Request ) returns ( GetObjectHistory2Response ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the number and GUID of the latest version of an object.
	//
	// The cheapest way to turn an object ID into a specific version for the methods that do not accept
	// the latest-version marker. The returned version is `OBJ_VER_VERSION_TYPE_SPECIFIC`. A caller who
	// cannot read the object gets "Access denied." (0x800407E4).
	rpc GetLatestObjectVersion( GetLatestObjectVersionRequest ) returns ( GetLatestObjectVersionResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the latest version of a file and the object version it belongs to.
	//
	// Use the returned `pobjver` and `file_version` to build an [ObjFileVer](mfiles:MFiles.ObjFileVer) for downloading.
	rpc GetLatestFileVersion( GetLatestFileVersionRequest ) returns ( GetLatestFileVersionResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Adds the specified tag to the document version. If the tag already exists in the
	// specified target version, this method does nothing. Other tags are not affected.
	//
	// Optionally, this method can clear the specified tag from the other versions of
	// the target document.
	rpc AddVersionTag( AddVersionTagRequest ) returns ( AddVersionTagResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Replaces the version tags of an object version with the given set; an empty `tags` clears them.
	rpc ModifyVersionTags( ModifyVersionTagsRequest ) returns ( ModifyVersionTagsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Rolls back to an older version. Creates a new version that is a copy of the specified old version.
	//
	// Creates a new version that is a copy of the given older version; the versions in between are kept.
	rpc Rollback( RollbackRequest ) returns ( RollbackResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the version comments of an object up to a given version, oldest first.
	//
	// `obj_ver` must name a specific version, or have `internal_version` -1 for the whole history. The
	// `OBJ_VER_VERSION_TYPE_LATEST` marker fails with "The parameter is incorrect.".
	rpc GetVersionCommentHistory( GetVersionCommentHistoryRequest ) returns ( GetVersionCommentHistoryResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the latest version comment of several objects.
	//
	// Each item of `obj_vers` must name a specific version; the `OBJ_VER_VERSION_TYPE_LATEST` marker and
	// version -1 fail with "Not found.".
	rpc GetLatestVersionCommentOfMultipleObjects( GetLatestVersionCommentOfMultipleObjectsRequest ) returns ( GetLatestVersionCommentOfMultipleObjectsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets all the workflows in a format suitable for client.
	//
	// Returns the workflows the user can see, each with its ID, name and `object_class_id`. In the Sample
	// Vault: workflow 106 "Reviewing drawings" with class 88.
	rpc GetWorkflowsForClient( GetWorkflowsForClientRequest ) returns ( GetWorkflowsForClientResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the caller's event subscriptions for an object.
	rpc GetDocEventSubscriptions( GetDocEventSubscriptionsRequest ) returns ( GetDocEventSubscriptionsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Replaces the caller's event subscriptions for an object.
	rpc SetDocEventSubscriptions( SetDocEventSubscriptionsRequest ) returns ( SetDocEventSubscriptionsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the GUID of an object.
	//
	// The GUID is returned in braces and upper case, for example
	// `{ABE2580B-3D96-45D0-8A8A-38BFFC6E43E5}`, the same value as `ObjectLevelInfo.guid` in the version
	// information. The reverse lookup is
	// [GetObjIDByGUID](mfiles:MFiles.IRPCObjectOperations.GetObjIDByGUID).
	rpc GetObjectGUID( GetObjectGUIDRequest ) returns ( GetObjectGUIDResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Sets the Object GUID of the specified object. NOTE: In general, the identity of an object should remain unchanged. Use this method in special circumstances only.
	//
	// Requires the vault-level right to edit and delete all objects.
	rpc SetObjectGUID( SetObjectGUIDRequest ) returns ( SetObjectGUIDResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the object ID of the object that has the given object GUID.
	//
	// The GUID is accepted with or without braces and in any letter case. A string that is not a GUID
	// fails with "The parameter is incorrect."; an unknown GUID with "Not found.".
	rpc GetObjIDByGUID( GetObjIDByGUIDRequest ) returns ( GetObjIDByGUIDResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Prepares a PDF rendition of a file version and reports its size, extension and timestamp.
	//
	// Supports `FILE_FORMAT_PDF` and `FILE_FORMAT_DISPLAY_ONLY_PDF`; the text formats fail with "The
	// requested file format ... is not supported.". Calling it is optional:
	// [DownloadFile_Begin](mfiles:MFiles.IRPCObjectOperations.DownloadFile_Begin) prepares the
	// rendition itself.
	rpc PrepareFile( PrepareFileRequest ) returns ( PrepareFileResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Opens a download session for a file version and returns its ID, the content size and, on
	// request, its MD5 checksum.
	//
	// Downloading a file takes three calls:
	//
	// 1. `DownloadFile_Begin` with the file's `obj_file_ver` and `prepare_file_for_downloading` true.
	// 2. [DownloadFile_ReadBlock](mfiles:MFiles.IRPCObjectOperations.DownloadFile_ReadBlock) with the
	//    returned `download_id`, from offset 0, until a block shorter than requested comes back. Blocks
	//    are at most 4 MiB.
	// 3. [DownloadFile_Stop](mfiles:MFiles.IRPCObjectOperations.DownloadFile_Stop). When the whole
	//    file was read in order from the start, the server has already closed the session; the call
	//    still succeeds, so always make it.
	//
	// Take `obj_file_ver.file_ver` from the version information of the object
	// ([File](mfiles:MFiles.File) `file_ver`). It must be a specific file version:
	// `FILE_VER_TYPE_LATEST` fails with "Not found. (File <id>-0 not found.)".
	//
	// **Formats.** `FILE_FORMAT_NATIVE` downloads the file as stored. `FILE_FORMAT_PDF` and
	// `FILE_FORMAT_DISPLAY_ONLY_PDF` download a PDF rendition that the server creates if needed (for
	// example from Office files); `file_outline.size` is then the size of the PDF. `FILE_FORMAT_PLAIN_TEXT`
	// and `FILE_FORMAT_MARKDOWN` are not supported here ("The requested file format ... is not
	// supported."); use
	// [GetTextContentForFileWithFormat](mfiles:MFiles.IRPCObjectOperations.GetTextContentForFileWithFormat).
	//
	// **Checksum.** `file_outline.md5_checksum` is filled only when `need_checksum` is true; otherwise it
	// is 32 zeros. For the PDF formats the server currently returns the checksum of the native file,
	// not of the PDF, so do not verify a PDF download against it.
	//
	// **Session.** A download session belongs to the login session that opened it, on the server that
	// opened it. An unused session is closed after about 10 minutes (server default).
	rpc DownloadFile_Begin( DownloadFile_BeginRequest ) returns ( DownloadFile_BeginResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Converts the specified object file to PDF format.
	//
	// The object must be checked out to the caller; on a checked-in object the call fails with "The
	// object is not checked out." With `leave_original`, the PDF is added as a separate file;
	// on a single-file document this turns the document into a multi-file document. Without
	// it, the file is replaced by the PDF. Check the object in afterwards.
	rpc ConvertToPDF( ConvertToPDFRequest ) returns ( ConvertToPDFResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Creates a stub object that stands for an object in another vault. Used by replication and
	// cross-vault relationships; not for applications.
	rpc AddStubObject( AddStubObjectRequest ) returns ( AddStubObjectResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Resolves a replication conflict between an object and its conflict object. Used by replication
	// tools and M-Files clients; not for applications.
	rpc ResolveConflict( ResolveConflictRequest ) returns ( ResolveConflictResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets what another vault needs to create a stub of this object, or to find a matching object.
	// Used by replication and cross-vault relationships; not for applications.
	rpc GetRemoteRelationshipSourceInfo( GetRemoteRelationshipSourceInfoRequest ) returns ( GetRemoteRelationshipSourceInfoResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Finds the local object that matches an object of another vault, or the information for creating a
	// stub of it. Used by replication and cross-vault relationships; not for applications.
	rpc GetRemoteRelationshipTargetInfo( GetRemoteRelationshipTargetInfoRequest ) returns ( GetRemoteRelationshipTargetInfoResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the version information and the property values of one object, either its latest version
	// or a specific version.
	//
	// With `latest_version` true the server returns the latest checked-in version; `doc_version` is
	// ignored. With `allow_checked_out` also true, a caller who has the object checked out gets the
	// checked-out version instead.
	//
	// With `latest_version` false, `doc_version` must be a specific version
	// (`OBJ_VER_VERSION_TYPE_SPECIFIC`); the `OBJ_VER_VERSION_TYPE_LATEST` marker fails with "Not found.
	// Invalid object version: -1".
	//
	// The call fails with "Not found." (0x8004000B) when the object or version does not exist, when the
	// object ID has the wrong object type, and also when the caller is not allowed to read the object.
	// To read several objects in one call, or to tolerate missing ones, use
	// [GetObjectVersionAndPropertiesOfMultipleObjects](mfiles:MFiles.IRPCObjectOperations.GetObjectVersionAndPropertiesOfMultipleObjects).
	rpc GetObjectInfoAndProperties( GetObjectInfoAndPropertiesRequest ) returns ( GetObjectInfoAndPropertiesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Gets the version information and the property values of several objects in one call. The
	// preferred way to read objects.
	//
	// `objects[i]` and `properties[i]` belong to the same object.
	//
	// **Latest versions.** With `latest_versions` true the version part of each `obj_vers` item is
	// ignored: the `OBJ_VER_VERSION_TYPE_LATEST` marker or an unset version both work. Each object may
	// appear only once ("The parameter is incorrect. (Duplicate objects.)").
	//
	// **Specific versions.** With `latest_versions` false every item must name a specific version; the
	// `OBJ_VER_VERSION_TYPE_LATEST` marker fails with "The parameter is incorrect.".
	//
	// **Missing objects.** By default the whole call fails with "Not found." if any object or version
	// does not exist or cannot be read by the caller. With `allow_missing_object_versions` true those
	// items are left out of the response, so the response can be shorter than the request and its
	// positions do not match the request. Match the results by `object_info.obj_id`.
	//
	// The server does not cap the number of objects in a request.
	rpc GetObjectVersionAndPropertiesOfMultipleObjects( GetObjectVersionAndPropertiesOfMultipleObjectsRequest ) returns ( GetObjectVersionAndPropertiesOfMultipleObjectsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Writes the object's metadata into the properties embedded in its files (for formats that support
	// it).
	//
	// An unset `file_id` part updates all files. With `fail_on_unsupported_file`, a file format that
	// cannot carry embedded metadata fails the call.
	rpc UpdateMetadataInFile( UpdateMetadataInFileRequest ) returns ( UpdateMetadataInFileResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the objects that a specific object version refers to, or that refer to it.
	//
	// `obj_ver` must name a specific version; the `OBJ_VER_VERSION_TYPE_LATEST` marker fails with "Not
	// found.". `mode` selects the direction: `RELATIONSHIPS_MODE_FROM` (objects this version refers to),
	// `RELATIONSHIPS_MODE_TO` (objects that refer to it) or `RELATIONSHIPS_MODE_ALL`.
	rpc GetRelationshipsForObject( GetRelationshipsForObjectRequest ) returns ( GetRelationshipsForObjectResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Promotes objects of an external repository (unmanaged objects) to managed M-Files objects by giving
	// them metadata.
	rpc PromoteUnmanagedObject( PromoteUnmanagedObjectRequest ) returns ( PromoteUnmanagedObjectResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Closes a download session.
	//
	// Closing a session that does not exist, for example one the server already closed after the last
	// block was read, succeeds.
	rpc DownloadFile_Stop( DownloadFile_StopRequest ) returns ( DownloadFile_StopResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION highlighted: true };
	}

	// Sets the external ID of an object.
	//
	// Requires the vault-level right to edit and delete all objects.
	rpc SetExternalObjectID( SetExternalObjectIDRequest ) returns ( SetExternalObjectIDResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets automatic metadata from the vault's metadata providers, for an object about to be created
	// (from its uploaded files) or for an existing object version.
	rpc GetAutomaticMetadata( GetAutomaticMetadataRequest ) returns ( GetAutomaticMetadataResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP
	// gateway.
	//
	// To download a file over gRPC, use
	// [DownloadFile_Begin](mfiles:MFiles.IRPCObjectOperations.DownloadFile_Begin) and
	// [DownloadFile_ReadBlock](mfiles:MFiles.IRPCObjectOperations.DownloadFile_ReadBlock).
	rpc DownloadFile( DownloadFileRequest ) returns ( DownloadFileResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets the plain text content of a file uploaded with UploadTempFile.
	//
	// The upload must be committed with
	// [UploadTempFileCommit](mfiles:MFiles.IRPCObjectOperations.UploadTempFileCommit) first, and it must
	// belong to the calling login session.
	rpc GetTextContentForTemporaryFile( GetTextContentForTemporaryFileRequest ) returns ( GetTextContentForTemporaryFileResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets the identities and view IDs of unmanaged items of an external repository. Used by M-Files
	// clients; not for applications.
	rpc GetIdentitiesAndViewsOfMultipleUnmanagedReducedItems( GetIdentitiesAndViewsOfMultipleUnmanagedReducedItemsRequest ) returns ( GetIdentitiesAndViewsOfMultipleUnmanagedReducedItemsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the managed object ID of an object that had the given unmanaged ID before it was promoted.
	rpc ResolveManagedIDOfPromotedObject( ResolveManagedIDOfPromotedObjectRequest ) returns ( ResolveManagedIDOfPromotedObjectResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Removes the M-Files metadata from promoted objects, turning them back into unmanaged objects of
	// their external repository.
	//
	// Requires the vault-level right to destroy objects.
	rpc DemoteObjects( DemoteObjectsRequest ) returns ( DemoteObjectsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP
	// gateway.
	rpc DownloadFileWithDownloadID( DownloadFileWithDownloadIDRequest ) returns ( DownloadFileWithDownloadIDResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets the states and transitions of several workflows in one call, in a compressed binary form,
	// with the user's rights checked.
	//
	// Used by M-Files clients; see
	// [GetMultipleWorkflowStatesAndTransitions](mfiles:MFiles.IRPCObjectOperations.GetMultipleWorkflowStatesAndTransitions).
	rpc GetMultipleWorkflowStatesAndTransitionsWithRightsCheck( GetMultipleWorkflowStatesAndTransitionsWithRightsCheckRequest ) returns ( GetMultipleWorkflowStatesAndTransitionsWithRightsCheckResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the states and transitions of several workflows in one call, in a compressed binary form.
	//
	// Used by M-Files clients to fill their caches. The results are serialized and possibly compressed
	// byte arrays, not protobuf messages; use
	// [GetWorkflowStatesAndTransitions](mfiles:MFiles.IRPCObjectOperations.GetWorkflowStatesAndTransitions)
	// instead.
	rpc GetMultipleWorkflowStatesAndTransitions( GetMultipleWorkflowStatesAndTransitionsRequest ) returns ( GetMultipleWorkflowStatesAndTransitionsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP
	// gateway.
	rpc GetFileDownloadUrl( GetFileDownloadUrlRequest ) returns ( GetFileDownloadUrlResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP
	// gateway.
	rpc DownloadFileWithDownloadKey( DownloadFileWithDownloadKeyRequest ) returns ( DownloadFileWithDownloadKeyResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Starts or stops following the specified object. While the object is being followed, the current user will be notified if the object changes.
	//
	// Starts (`follow_state: true`) or stops (`false`) following the object for the caller.
	rpc FollowObject( FollowObjectRequest ) returns ( FollowObjectResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the plain text content of a file version.
	//
	// Prefer [GetTextContentForFileWithFormat](mfiles:MFiles.IRPCObjectOperations.GetTextContentForFileWithFormat),
	// which can also return Markdown. With `options.useplaintextcache` the server returns the text it
	// uses for full-text indexing, which can differ from a fresh extraction.
	rpc GetTextContentForFile( GetTextContentForFileRequest ) returns ( GetTextContentForFileResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Migrates a promoted object. Requires full control of the vault; used by migration tools.
	rpc MigrateObject( MigrateObjectRequest ) returns ( MigrateObjectResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the template objects of an object type, with the Additional classes value of each.
	rpc GetTemplateObjectsForObjectType( GetTemplateObjectsForObjectTypeRequest ) returns ( GetTemplateObjectsForObjectTypeResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Detects the language of a plain text.
	rpc DetectTextLanguage( DetectTextLanguageRequest ) returns ( DetectTextLanguageResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets selected data of several objects: version information, properties, ACL, the caller's
	// permissions, relationships, version comments and more, with a result or an error per object.
	//
	// Choose this method when you need more than properties, or when you want a per-object error
	// instead of a failed or shortened response.
	//
	// **Results.** `results` has exactly one item per requested object, in the request order.
	// `results[i].obj_ver` repeats the request; `results[i].object_data.obj_ver` is the version that
	// was actually read. A result has either `object_data` or `error_info`.
	//
	// **What is returned.** Only the data named in `data_request.required_data_flags` or
	// `optional_data_flags`. With no flags at all, `object_data` holds only the resolved `obj_ver`,
	// which is a cheap way to resolve the latest versions of many objects. If required data is
	// missing, the object gets `error_info` instead. Relationships, collection members and version
	// comments were returned only when requested in `required_data_flags`.
	//
	// **Versions.** `data_request.version_type` defaults to
	// `OBJECT_VERSION_DATA_REQUEST_VERSION_TYPE_SPECIFIC_VERSIONS`, which needs specific versions in
	// `obj_vers`; the `OBJ_VER_VERSION_TYPE_LATEST` marker then fails with "The parameter is incorrect.".
	// Use `OBJECT_VERSION_DATA_REQUEST_VERSION_TYPE_LATEST_VERSIONS` (includes a version checked out to
	// the caller) or `OBJECT_VERSION_DATA_REQUEST_VERSION_TYPE_LATEST_CHECKED_IN_VERSIONS` to read the
	// latest versions. An object or version may appear only once ("Duplicate object IDs or
	// versions.").
	//
	// **Errors.** With the default error tolerance the whole call fails if any object is missing. With
	// `OBJECT_VERSION_DATA_REQUEST_ERROR_TOLERANCE_ALLOW_MISSING_OBJECT_VERSIONS`, an object that does
	// not exist or that the caller cannot read gets `error_info.error_code` 0x8004000B ("Not found.")
	// and no `object_data`.
	rpc GetObjectDataOfMultipleObjects( GetObjectDataOfMultipleObjectsRequest ) returns ( GetObjectDataOfMultipleObjectsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Finds files in the vault with the same content as the given file version.
	rpc FindFileDuplicates( FindFileDuplicatesRequest ) returns ( FindFileDuplicatesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Finds file versions in the vault by MD5 checksum.
	rpc FindFilesByChecksum( FindFilesByChecksumRequest ) returns ( FindFilesByChecksumResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Removes the specified objects from being shown in 'Recently Accessed by Me'.
	//
	// `object_count` must equal the number of `remove_objects`; otherwise the call fails with "The
	// parameter is incorrect. (ObjectCount does not match array size)". With `remove_all`,
	// the whole list is cleared.
	rpc RemoveFromRecentlyAccessed( RemoveFromRecentlyAccessedRequest ) returns ( RemoveFromRecentlyAccessedResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets a URL of a page that shows the differences between two document files in the vault.
	rpc GetDocumentComparisonUrl( GetDocumentComparisonUrlRequest ) returns ( GetDocumentComparisonUrlResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets a URL of a page that shows the differences between a document file in the vault and an
	// uploaded temporary file.
	rpc GetDocumentComparisonWithTempFileUrl( GetDocumentComparisonWithTempFileUrlRequest ) returns ( GetDocumentComparisonWithTempFileUrlResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Tells whether document comparison is available in the vault.
	rpc GetDocumentComparisonEnabled( GetDocumentComparisonEnabledRequest ) returns ( GetDocumentComparisonEnabledResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Lists promoted objects of an external repository. Requires full control of the vault; the maximum
	// result count must be 1 to 1000.
	rpc GetPromotedObjects( GetPromotedObjectsRequest ) returns ( GetPromotedObjectsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Tells whether a file with the given content (checksum) already exists in the vault.
	rpc HasFileDuplicates( HasFileDuplicatesRequest ) returns ( HasFileDuplicatesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Finds files in the vault with the same content as the files of the given object version.
	rpc FindFileDuplicatesOfObjVer( FindFileDuplicatesOfObjVerRequest ) returns ( FindFileDuplicatesOfObjVerResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Resolves a replication conflict by adding the conflict object's content as a new version of the
	// base object. Used by M-Files clients; not for applications.
	rpc CopyConflictObjectAsNewVersionToBaseObject( CopyConflictObjectAsNewVersionToBaseObjectRequest ) returns ( CopyConflictObjectAsNewVersionToBaseObjectResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Finds all groups of duplicate files in the vault.
	rpc FindVaultDuplicates( FindVaultDuplicatesRequest ) returns ( FindVaultDuplicatesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Adds, replaces or removes property values of an object.
	//
	// **Checked-in objects.** With `allow_modifying_checked_in_object: true`, the server checks the
	// object out, applies the change and checks it in, creating exactly one new version. Without it, a
	// checked-in object fails with "The object is not checked out." Every such call creates a new
	// version, even when the values do not change.
	//
	// **Checked-out objects.** If the caller has the object checked out, `obj_ver` must name the
	// checked-out version; the change goes to that version and no new version is created. Naming the
	// checked-in version of an object checked out to the caller fails ("... not the current
	// checked-out version."), and an object checked out to someone else fails with "The object is
	// checked out to another user."
	//
	// **Targeting a version.** `obj_ver` must name a version by number: the
	// `OBJ_VER_VERSION_TYPE_LATEST` marker fails with "The parameter is incorrect." For a
	// checked-in object, the server always changes the latest version, whatever number you send (even a
	// number that does not exist yet), unless `fail_if_newer_version_exists` is true: then a number other
	// than the latest checked-in version fails with "There is a newer version of this object on the
	// server." Use it for optimistic concurrency: read the version, then write with
	// `fail_if_newer_version_exists`.
	//
	// **Adding, replacing and removing.**
	//
	// * Values in `properties` are added or replace the existing value of the same property definition.
	//   All other properties stay as they are.
	// * To empty a property, send it with `is_null_value: true` (and its `type`).
	// * `remove` removes property values from the object. Properties that the object's class lists
	//   cannot be removed, not even optional ones: the call fails with "The property "<name>" cannot be
	//   removed from the object." Set them empty instead.
	// * `remove_unspecified_properties: true` makes `properties` the full set: every property not in it
	//   and not listed by the class is removed. Class-listed properties stay (with their values or
	//   empty), as do the properties the server maintains. The full set must still include the Class
	//   (100) property, otherwise the call fails with "Class was not specified."; an empty full set
	//   fails with invalid argument. Rarely what you want.
	//
	// **Single-file documents.** Changing the title of a single-file document with
	// `allow_modifying_checked_in_object` also renames its file.
	//
	// **Workflow.** Change the workflow state by setting Workflow State (39), a lookup into value list 8,
	// or by setting State transition (99), a lookup into value list 17 with a transition ID from
	// [GetWorkflowStatesAndTransitions](mfiles:MFiles.IRPCObjectOperations.GetWorkflowStatesAndTransitions).
	// A state change that the workflow does not allow fails with "Access denied. The state transition
	// "<from> -> <to>" is not allowed." If you change Workflow (38), set the state as well:
	// the server does not clear or replace a state of the previous workflow. A transition that
	// requires an electronic signature needs `signature`: the session ID of a second
	// [LogIn](mfiles:MFiles.IRPCLogin.LogIn) of the same user, made less than 15 seconds earlier; the
	// server logs that session out. See
	// [GetStateTransitionSignatureSettings](mfiles:MFiles.IRPCObjectOperations.GetStateTransitionSignatureSettings).
	//
	// **Permissions.** The caller needs edit access to the object; the server makes an exception that
	// lets an assignee mark an assignment complete. `allow_missing_required_properties`
	// requires the vault-level right to change the metadata structure and takes effect only if the vault
	// allows objects with empty required fields.
	//
	// Use [SetPropertiesMultiple](mfiles:MFiles.IRPCObjectOperations.SetPropertiesMultiple) to change
	// several objects in one transaction.
	rpc SetProperties( SetPropertiesRequest ) returns ( SetPropertiesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Migrates and promotes objects. Requires full control of the vault; used by migration tools.
	rpc MigrateObjects( MigrateObjectsRequest ) returns ( MigrateObjectsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Finds duplicate email objects in the vault.
	rpc FindEmailDuplicates( FindEmailDuplicatesRequest ) returns ( FindEmailDuplicatesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the templates of an object type, optionally only those of one class or matching keywords.
	rpc GetTemplates( GetTemplatesRequest ) returns ( GetTemplatesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the effective permissions of a document.
	//
	// Lists every user of the vault who has any access to the object version through its ACL, with
	// their read, edit, delete and change-permissions access. Users without any access are left out, and
	// vault-level rights such as seeing all objects are not counted: an object with an empty ACL returns
	// an empty list even though administrators can see it. The caller must be able to read the
	// object.
	rpc GetEffectivePermissions( GetEffectivePermissionsRequest ) returns ( GetEffectivePermissionsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP
	// gateway.
	rpc GetFileDownloadUrl2( GetFileDownloadUrlRequest2 ) returns ( GetFileDownloadUrlResponse2 ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Copies existing file versions into new uploads, for example to create a new object with a copy
	// of a file.
	//
	// Each copy is an upload like one made with
	// [UploadTempFile](mfiles:MFiles.IRPCObjectOperations.UploadTempFile) and
	// [UploadTempFileCommit](mfiles:MFiles.IRPCObjectOperations.UploadTempFileCommit), so it can be
	// passed to [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles). Remove the
	// copies you do not use with
	// [RemoveUploadSession](mfiles:MFiles.IRPCObjectOperations.RemoveUploadSession).
	rpc UploadExistingFiles( UploadExistingFilesRequest ) returns ( UploadExistingFilesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets the information a client needs to open a file in an external editing system (SharePoint
	// Embedded).
	//
	// Used by M-Files clients with SharePoint Embedded storage.
	rpc GetExternalEditingDetails( GetExternalEditingDetailsRequest ) returns ( GetExternalEditingDetailsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Relays file or object operations to Master Storage. Internal to M-Files; not for applications.
	rpc RelayMasterStorageOperations( RelayMasterStorageOperationsRequest ) returns ( RelayMasterStorageOperationsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets the workflow state history of an object.
	//
	// Returns the versions of the object in which the workflow state changed, oldest first, each with
	// its property values. `obj_ver` can be the LATEST marker. `max_history_states_to_return`
	// 0 returns all; `more_history_states_available` tells whether the list was cut.
	rpc GetWorkflowStateHistory( GetWorkflowStateHistoryRequest ) returns ( GetWorkflowStateHistoryResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets the states of the given workflow in the appropriate order.
	//
	// Returns the states of a workflow in their configured order. An unknown or hidden workflow returns
	// an empty list, not an error. The workflow IDs are in Workflow (38) values and in
	// [GetWorkflowsForClient](mfiles:MFiles.IRPCObjectOperations.GetWorkflowsForClient).
	//
	// `can_current_user_select` is computed against `current_state`: without it every state is
	// selectable. To change an object's state, set Workflow State (39) with
	// [SetProperties](mfiles:MFiles.IRPCObjectOperations.SetProperties).
	rpc GetWorkflowStates( GetWorkflowStatesRequest ) returns ( GetWorkflowStatesResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Gets the states and transitions of the given workflow.
	//
	// Returns all states of the workflow and the transitions out of `current_state`. Without
	// `current_state`, `transitions` is empty, even if `obj_ver` is set. Each transition's
	// `id` can be set as State transition (99), a lookup into value list 17, with
	// [SetProperties](mfiles:MFiles.IRPCObjectOperations.SetProperties); setting Workflow State (39) to
	// the target state works too. An unknown workflow returns empty lists.
	//
	// Example from the Sample Vault: workflow 102 with `current_state` 108 returned all five states,
	// with the two reachable ones and the current one selectable, and the two transitions from state 108.
	rpc GetWorkflowStatesAndTransitions( GetWorkflowStatesAndTransitionsRequest ) returns ( GetWorkflowStatesAndTransitionsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Creates new versions of objects whose files were changed in an external editing system
	// (SharePoint Embedded co-authoring). No version is created for an object without changes.
	//
	// Used by M-Files clients with SharePoint Embedded storage.
	rpc CheckInExternalChanges( CheckInExternalChangesRequest ) returns ( CheckInExternalChangesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets a property value and its metadata.
	rpc GetPropertyValueWithMetadata( GetPropertyValueWithMetadataRequest ) returns ( GetPropertyValueWithMetadataResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Like GetObjectInfoAndProperties, but each property value also carries its value metadata.
	//
	// Takes the same parameters as
	// [GetObjectInfoAndProperties](mfiles:MFiles.IRPCObjectOperations.GetObjectInfoAndProperties)
	// and behaves the same way. Each returned value also has `value_metadata`; for values without such
	// metadata the server returns `confidence` "-1".
	rpc GetObjectInfoAndPropertiesWithMetadata( GetObjectInfoAndPropertiesWithMetadataRequest ) returns ( GetObjectInfoAndPropertiesWithMetadataResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Creates, updates or deletes the object that mirrors an item of an external system, identified by
	// its external ID.
	//
	// With `deleted: true` the object is deleted instead; the deletion is not sent back to the external
	// system. Not available on servers where the feature is not enabled (fails with not implemented).
	rpc AddOrUpdateExternalObject( AddOrUpdateExternalObjectRequest ) returns ( AddOrUpdateExternalObjectResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Adds, replaces or removes property values of an object, also storing metadata about each value.
	//
	// Same request fields and rules as
	// [SetProperties](mfiles:MFiles.IRPCObjectOperations.SetProperties); each value also carries
	// `value_metadata` (see [TypedValueMetadata](mfiles:MFiles.TypedValueMetadata)).
	rpc SetPropertiesWithMetadata( SetPropertiesWithMetadataRequest ) returns ( SetPropertiesWithMetadataResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Changes the metadata of property values without changing the values.
	rpc SetPropertyValueMetadata( SetPropertyValueMetadataRequest ) returns ( SetPropertyValueMetadataResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Moves objects between storage tiers.
	//
	// Requires full control of the vault. Objects that could not be moved are listed in `failed`.
	rpc SetTier( SetTierRequest ) returns ( SetTierResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Opens a download session for a committed upload, to read it back or as a PDF, without creating
	// an object.
	//
	// Pass the `upload_id` of an upload committed with
	// [UploadTempFileCommit](mfiles:MFiles.IRPCObjectOperations.UploadTempFileCommit); an uncommitted
	// upload fails. Read the content with
	// [DownloadFile_ReadBlock](mfiles:MFiles.IRPCObjectOperations.DownloadFile_ReadBlock).
	// `FILE_FORMAT_PDF` returns a PDF rendition of the upload (for example to preview a document before
	// it is created); `file_extension` is then "pdf". The download session ends with the upload.
	rpc DownloadTempFileFromUpload_Begin( DownloadTempFileFromUpload_BeginRequest ) returns ( DownloadTempFileFromUpload_BeginResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets the malware scanning verdict of a file, as an advisory hint for a user interface.
	//
	// Used by the M-Files clients to warn before a download. An empty `malware_info.description` means
	// the file is clean or no verdict is available, for example when the vault does not scan files.
	rpc GetFileMalwareInfo( GetFileMalwareInfoRequest ) returns ( GetFileMalwareInfoResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Keeps an upload from being removed for inactivity.
	//
	// Supported when [ServerVaultCapabilities](mfiles:MFiles.ServerVaultCapabilities)
	// `keep_upload_session_alive_supported` is true; otherwise the call fails with "Not implemented.".
	// Call it at the interval given in `SessionData.keep_upload_session_alive_interval_in_seconds` of
	// the login response while you hold an upload that you have not used yet. A removed or consumed
	// upload gives "Not found. (The specified upload session <id> does not exist.)".
	rpc KeepUploadSessionAlive( KeepUploadSessionAliveRequest ) returns ( KeepUploadSessionAliveResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Finds objects of one object type by their external IDs.
	//
	// Matches only objects that have an external ID of their own (for example one set with
	// `SetExternalObjectID`), not the display IDs that equal the internal ID. IDs that match nothing,
	// and objects the caller cannot read, are left out without
	// an error, so the response can be shorter than the request. Each match is returned as the latest
	// version of the object.
	rpc GetObjectsByExternalIds( GetObjectsByExternalIdsRequest ) returns ( GetObjectsByExternalIdsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Creates a new object, optionally with its files, and optionally checks it in.
	//
	// This is the general way to create an object. One call creates the object checked out, attaches
	// the files, runs the creation event handlers and, if `check_in` is true, checks the object in. All
	// of it happens in one transaction: if any step fails, no object is created (the object ID
	// that was reserved for it is not reused).
	//
	// **Required properties.** Send at least:
	//
	// | Property definition | ID | Notes |
	// |---|---|---|
	// | Class | 100 | A lookup into value list 1 (classes). Without it: "Class was not specified." |
	// | Name or title | 0 | Or the property the class names as its name property (`name_property_def`). |
	// | Single file | 22 | Required for documents (object type 0) and other types that can have files. |
	// | Required properties of the class | | `is_required` in the class's `associated_property_defs`. |
	//
	// A missing required property fails with "The mandatory property value "<name>" is missing." Get the
	// class and its required properties with
	// [GetObjectClassesAndGroups](mfiles:MFiles.IRPCPropertyDefs.GetObjectClassesAndGroups). The server
	// fills the automatic properties (Created, Created by, Last modified, ...) itself.
	//
	// **Set `acl`.** The server stores the ACL you send as the object's permissions. If `acl` is unset,
	// the object gets an empty ACL: after check-in only users with a vault-level right to see all objects
	// can see it, and not even its creator. To give the object ordinary permissions, send the
	// `acl_for_objects` of a named ACL from
	// [GetNamedACLs](mfiles:MFiles.IRPCNamedACLs.GetNamedACLs) (call it with `include_builtin: true`),
	// for example ID -1, "Full control for all internal users". For a named ACL that does not depend
	// on the current user, a link alone is enough:
	// `acl { custom_component { has_named_acl: true named_acl_id: -1 } }`. A link alone to the
	// built-in "Only for me" (-20) leaves the object without permissions; send its full
	// `acl_for_objects`, which names the user.
	//
	// **Single-file documents.** With Single file (22) true, the object must end up with exactly one
	// file: true without a file source fails with "Cannot set document to single-file mode." At
	// check-in, the file of a single-file document takes the object's title as its file title; the
	// `title` given in the file source is not kept.
	//
	// **File sources** (`files.type` and the matching `files.data` member):
	//
	// * `OBJ_FILE_SOURCE_TYPE_FILE_CONTENT` with `file_content`: the file bytes inline in the request.
	//   The simplest way to create a document with one file. Only for a single-file document of object
	//   type 0 (Document); otherwise the call fails with invalid argument. At most 10 MiB; `title` is
	//   required.
	// * `OBJ_FILE_SOURCE_TYPE_UPLOADED_FILE` with `uploaded_file`, or `OBJ_FILE_SOURCE_TYPE_UPLOADED_FILES`
	//   with `uploaded_files`: content uploaded first. Give either `upload_id` (from
	//   [UploadTempFile](mfiles:MFiles.IRPCObjectOperations.UploadTempFile) followed by
	//   [UploadTempFileCommit](mfiles:MFiles.IRPCObjectOperations.UploadTempFileCommit)) or `file_ref`
	//   (from [FileUploadWhole](mfiles:MFiles.IRPCFileTransferStreaming.FileUploadWhole) or
	//   [FileUploadEnd](mfiles:MFiles.IRPCFileTransfer.FileUploadEnd), on servers that report
	//   `ServerVaultCapabilities.file_upload_stateless_supported`; stateless uploads are switched off by
	//   default in M-Files Server 26.11). An upload session that was not committed fails ("The process
	//   cannot access the file because it is being used by another process."), and an upload is
	//   consumed by the object
	//   it is attached to: a second object cannot use the same `upload_id`.
	// * `OBJ_FILE_SOURCE_TYPE_BLANK_TEMPLATE` (`blank_template.name`) or
	//   `OBJ_FILE_SOURCE_TYPE_USER_DEFINED_TEMPLATE` (`user_defined_template.obj_id`, a template object,
	//   see [GetTemplates](mfiles:MFiles.IRPCObjectOperations.GetTemplates)): the file is copied from a
	//   template.
	// * `OBJ_FILE_SOURCE_TYPE_EMPTY_FILES` with `empty_files`: files with a title and extension but no
	//   content yet. Only together with `draft: true`.
	// * `files` unset or `OBJ_FILE_SOURCE_TYPE_UNDEFINED`: no files. Set Single file (22) to false.
	//
	// **The response.** `is_visible_to_user` tells whether the creator could see the new object before
	// it was checked in. When the checked-in object is not visible to the caller (for example because
	// `acl` was unset), `created_object` carries only the object ID and version number, with no
	// properties, files or title. Read the object again with
	// [GetObjectInfoAndProperties](mfiles:MFiles.IRPCObjectOperations.GetObjectInfoAndProperties) when
	// you need its full state.
	//
	// **Workflow.** The class's default workflow is not applied by the server when the class does not
	// force a workflow: send Workflow (38) and Workflow State (39) yourself.
	// A state of another workflow wins: the server sets Workflow (38) to
	// the state's workflow. Sending only a state also sets the workflow; sending only a workflow leaves
	// the state empty.
	//
	// **Permissions.** The user needs the vault-level right to create objects and a license that allows
	// modifications.
	rpc AddObjectWithFiles( AddObjectWithFilesRequest ) returns ( AddObjectWithFilesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Clears the draft (pending-upload) flag on an object, leaving it checked out. Used when
	// the file upload has completed and the object should become a normal checked-out object without
	// being checked in. Never checks the object in; a safe no-op on a non-draft.
	//
	// Completes the draft flow of
	// [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles) (`draft: true`): after
	// the file content has been uploaded, this clears the draft flag. The object stays checked out; check
	// it in with [CheckIn](mfiles:MFiles.IRPCObjectOperations.CheckIn).
	rpc SetObjectActive( SetObjectActiveRequest ) returns ( SetObjectActiveResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Creates a new object without files, storing metadata about each property value.
	//
	// Every value must carry `value_metadata` with a numeric `confidence` string (for example `"0"`);
	// otherwise the call fails with "Type mismatch." The required properties and the `acl`
	// pitfall are the same as for
	// [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles).
	rpc CreateNewObjectWithPropertyMetadata( CreateNewObjectWithPropertyMetadataRequest ) returns ( CreateNewObjectWithPropertyMetadataResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Creates a new object with files, storing metadata about each property value (who or what set it,
	// why, and with what confidence).
	//
	// Behaves like [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles) (the same
	// server implementation), with the same required properties, ACL and file sources.
	// Every value must carry `value_metadata` with a
	// numeric `confidence` string: a value without `value_metadata`, or with an empty `confidence`, fails
	// with "Type mismatch." Use `confidence: "0"` or `"-1"` when there is no confidence to
	// record; zero or less stores no confidence. Metadata whose fields are all empty or zero is not
	// stored. See [TypedValueMetadata](mfiles:MFiles.TypedValueMetadata).
	rpc AddObjectWithFilesWithPropertyMetadata( AddObjectWithFilesWithPropertyMetadataRequest ) returns ( AddObjectWithFilesWithPropertyMetadataResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Destroys the old versions of an object that match search conditions, and returns how many were
	// destroyed.
	//
	// The newest version is never destroyed, and when the object is checked out both the checked-out
	// version and the latest checked-in version are kept, whoever has the object checked out; conditions
	// cannot override this. `conditions` must not be empty. Check a condition set first with
	// [CountObjectVersionsMatchingConditions](mfiles:MFiles.IRPCObjectOperations.CountObjectVersionsMatchingConditions):
	// destruction cannot be undone. If `more_versions_remain` is true, call again. Requires the
	// vault-level right to destroy objects. Not available on servers where the feature is not enabled
	// (the call fails with not implemented).
	rpc DestroyObjectVersionsByConditions( DestroyObjectVersionsByConditionsRequest ) returns ( DestroyObjectVersionsByConditionsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Counts the versions of an object that DestroyObjectVersionsByConditions would destroy with the
	// same inputs, without destroying anything.
	//
	// Uses the same selection and the same rules for kept versions as
	// [DestroyObjectVersionsByConditions](mfiles:MFiles.IRPCObjectOperations.DestroyObjectVersionsByConditions).
	// Requires the vault-level right to destroy objects.
	rpc CountObjectVersionsMatchingConditions( CountObjectVersionsMatchingConditionsRequest ) returns ( CountObjectVersionsMatchingConditionsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Sets property values with metadata and records the change as made by a built-in agent user.
	//
	// Used by M-Files automatic metadata features. `attributed_to_user_id` names the built-in agent user;
	// 0 records no attribution.
	rpc SetPropertiesWithMetadataAttributedTo( SetPropertiesWithMetadataAttributedToRequest ) returns ( SetPropertiesWithMetadataAttributedToResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the text content of a file version as plain text or Markdown, and reports which format was
	// produced.
	//
	// Supported when the server's [ServerVaultCapabilities](mfiles:MFiles.ServerVaultCapabilities)
	// `get_text_content_with_format_supported` is true. Request `FILE_FORMAT_MARKDOWN` or
	// `FILE_FORMAT_PLAIN_TEXT`; any other format returns plain text. Always read `format_produced`: it
	// tells the format of `text_content`, which can be plain text even if Markdown was requested.
	rpc GetTextContentForFileWithFormat( GetTextContentForFileWithFormatRequest ) returns ( GetTextContentForFileWithFormatResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets a URL of a page that shows the differences between a document file in the vault and a
	// stateless upload identified by its `file_ref`.
	//
	// Fails with not implemented on servers that do not support stateless uploads.
	rpc GetComparisonUrlOfUploadedFile( GetComparisonUrlOfUploadedFileRequest ) returns ( GetComparisonUrlOfUploadedFileResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}
}

// The request of DownloadFile_ReadBlock.
message DownloadFile_ReadBlockRequest {

	// From `DownloadFile_Begin` or `DownloadTempFileFromUpload_Begin`.
	int32 download_id = 1;

	// The number of bytes to read, at most 4194304 (4 MiB).
	uint32 block_size = 2;

	// The byte offset to read from.
	int64 offset = 3;
}

// The response of DownloadFile_ReadBlock.
message DownloadFile_ReadBlockResponse {

	// The bytes read. Shorter than `block_size` at the end of the file; empty past the end.
	bytes data = 1;
}

// The request of UploadTempFile.
message UploadTempFileRequest {

	// 0 to start a new upload; the returned ID for the following blocks.
	int32 upload_id = 1;

	// The size of the whole file. Read only in the first call.
	int64 total_size_in_bytes = 2;

	// The position of this block in the file. Must be 0 in the first call. Use multiples of 4096 bytes for all blocks but the last.
	int64 offset = 3;

	// The bytes of this block.
	bytes data = 4;

	// The file name extension of the upload, without the dot (for example "pdf"). Set it in the first call. `DownloadTempFileFromUpload_Begin` returns it as `file_extension`.
	StringValue temp_extension = 5;
}

// The response of UploadTempFile.
message UploadTempFileResponse {

	// The ID of the upload.
	int32 upload_id = 1;
}

// The request of GetStateTransitionSignatureSettings.
message GetStateTransitionSignatureSettingsRequest {

	// StateTransition ID. Ignored if -1.
	int32 state_transition_id = 1;

	// FromState ID. Ignored if lStateTransitionID is given.
	int32 from_state = 2;

	// ToState ID. Ignored if lStateTransitionID is given.
	int32 to_state = 3;
}

// The response of GetStateTransitionSignatureSettings.
message GetStateTransitionSignatureSettingsResponse {

	// Receives true if the state transition was found.
	bool found = 1;

	// Receives the signature settings.
	ElectronicSignatureSettings settings = 2;
}

// The request of RemoveUploadSession.
message RemoveUploadSessionRequest {

	// The identifier of this upload operation.
	int32 upload_id = 1;
}

// The response of RemoveUploadSession.
message RemoveUploadSessionResponse {
}

// The request of UploadTempFileCommit.
message UploadTempFileCommitRequest {

	// The ID from `UploadTempFile`.
	int32 upload_id = 1;

	// The total number of bytes uploaded.
	int64 logical_size = 2;

	// Leave 0.
	int64 low_digest = 3;

	// Not checked by this method; leave 0.
	int64 high_digest = 4;
}

// The response of UploadTempFileCommit.
message UploadTempFileCommitResponse {
}

// The request of AddObject.
message AddObjectRequest {

	// The object type of the new object (0 for documents).
	int32 obj_type = 1;

	// Property values of the new object. Include Class (100), the name property and the properties the class requires; Single file (22) must be false for documents.
	repeated PropertyValue properties = 2;

	// The permissions of the new object. Unset gives an empty ACL; see [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles).
	AccessControlList acl = 3;

	// Flags that control this operation.
	OBJECTOPFLAGS object_flags = 4;

	// True to check the new object in; false leaves it checked out to the caller.
	bool check_in = 5;
}

// The response of AddObject.
message AddObjectResponse {

	// True if the latest version of the new object is visible to the caller.
	bool latest_visible = 1;

	// The new object version with its properties and ACL, if `latest_visible` is true.
	ObjectVersionExWP object_info = 2;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 3;
}

// The request of AddSingleFileDocument_SingleStep.
message AddSingleFileDocument_SingleStepRequest {

	// The object type of the new document.
	int32 obj_type = 1;

	// Properties of the new document (represented by PropertyValue structs).
	repeated PropertyValue properties = 2;

	// The ACL for the new document.
	AccessControlList acl = 3;

	// File extension, not including the dot ( e.g. "doc" ).
	string file_extension = 4;

	// The time in UTC the file was originally created.
	google.protobuf.Timestamp creation_time = 5;

	// The time in UTC the file was last accessed (e.g. read).
	google.protobuf.Timestamp last_access_time = 6;

	// The time in UTC the file was last written to.
	google.protobuf.Timestamp last_write_time = 7;

	// The time in UTC the file was last written to or its attributes were changed.
	google.protobuf.Timestamp change_time = 8;

	// File contents.
	bytes file_data = 9;

	// Flags that control this operation.
	OBJECTOPFLAGS object_flags = 10;
}

// The response of AddSingleFileDocument_SingleStep.
message AddSingleFileDocument_SingleStepResponse {

	// Receives the ID of the new document.
	int32 document_id = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of AddSingleFileDocument_SingleStep2.
message AddSingleFileDocument_SingleStep2Request {

	// The object type of the new document.
	int32 object_type = 1;

	// Properties of the new document (represented by PropertyValue structs).
	repeated PropertyValue properties = 2;

	// The ACL for the new document.
	AccessControlList acl = 3;

	// File extension, not including the dot ( e.g. "doc" ).
	string file_extension = 4;

	// The time in UTC the file was originally created.
	google.protobuf.Timestamp creation_time = 5;

	// The time in UTC the file was last accessed (e.g. read).
	google.protobuf.Timestamp last_access_time = 6;

	// The time in UTC the file was last written to.
	google.protobuf.Timestamp last_write_time = 7;

	// The time in UTC the file was last written to or its attributes were changed.
	google.protobuf.Timestamp change_time = 8;

	// File contents.
	bytes file_data = 9;

	// Flags that control this operation.
	OBJECTOPFLAGS object_flags = 10;

	// If true, the document is checked in immediately, otherwise the document is left to checked-out state.
	bool check_in = 11;
}

// The response of AddSingleFileDocument_SingleStep2.
message AddSingleFileDocument_SingleStep2Response {

	// True if the latest version of the document is visible after the operation.
	bool is_latest_visible = 1;

	// The information, properties and ACL of the latest version of the new document, if `is_latest_visible` is true.
	ObjectVersionExWP object_info = 2;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 3;
}

// The request of AddSingleFileDocument_SingleStep3.
message AddSingleFileDocument_SingleStep3Request {

	// The object type of the new document.
	int32 object_type = 1;

	// Properties of the new document (represented by PropertyValue structs).
	repeated PropertyValue properties = 2;

	// The ACL for the new document.
	AccessControlList acl = 3;

	// File extension, not including the dot ( e.g. "doc" ).
	string file_extension = 4;

	// The time in UTC the file was originally created.
	google.protobuf.Timestamp creation_time = 5;

	// The time in UTC the file was last accessed (e.g. read).
	google.protobuf.Timestamp last_access_time = 6;

	// The time in UTC the file was last written to.
	google.protobuf.Timestamp last_write_time = 7;

	// The time in UTC the file was last written to or its attributes were changed.
	google.protobuf.Timestamp change_time = 8;

	// File contents.
	bytes file_data = 9;

	// Flags that control this operation.
	OBJECTOPFLAGS object_flags = 10;

	// If true, the document is checked in immediately, otherwise the document is left to checked-out state.
	bool check_in = 11;
}

// The response of AddSingleFileDocument_SingleStep3.
message AddSingleFileDocument_SingleStep3Response {

	// True if the latest version of the document is visible after the operation.
	bool is_latest_visible = 1;

	// The information, properties and ACL of the latest version of the new document, if `is_latest_visible` is true.
	ObjectVersionExWP object_info = 2;

	// Always receives the file version. (represented by FileVer struct.)
	FileVer file_ver = 3;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 4;
}

// The request of CheckOut.
message CheckOutRequest {

	// The object to check out. The latest checked-in version is checked out.
	ObjID obj_id = 1;
}

// The response of CheckOut.
message CheckOutResponse {

	// The checked-out version: its version number is the one to pass to SetProperties, AddObjectFile and CheckIn.
	ObjectVersionExWP object_info = 1;

	// The checked-in version the check-out started from.
	ObjectVersionEx previous_version = 2;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 3;
}

// The request of CheckOutMultiple.
message CheckOutMultipleRequest {

	// Objects.
	repeated ObjID obj_ids = 1;
}

// The response of CheckOutMultiple.
message CheckOutMultipleResponse {

	// Results.
	repeated ObjectVersionExWP checked_out_versions = 1;

	// Results.
	repeated ObjectVersionEx previous_versions = 2;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 3;
}

// The request of CheckIn.
message CheckInRequest {

	// The checked-out version, by number. The LATEST marker is not accepted.
	ObjVer obj_ver = 1;

	// Property values to add or replace before check-in, for example a version comment in Comment (33). Leave empty to check in as is.
	repeated PropertyValue properties = 2;

	// Flags that control this operation.
	OBJECTOPFLAGS object_flags = 3;
}

// The response of CheckIn.
message CheckInResponse {

	// The object after check-in, with its latest version, properties and ACL.
	ExtObjectInfo object_info = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of CheckInMultiple.
message CheckInMultipleRequest {

	// Object versions.
	repeated ObjVer obj_vers = 1;

	// The properties to add/replace. (represented by PropertyValueArray array )
	repeated PropertyValue properties = 2;

	// Flags that control this operation.
	OBJECTOPFLAGS options = 3;
}

// The response of CheckInMultiple.
message CheckInMultipleResponse {

	// Results.
	repeated ExtObjectInfo results = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of UndoCheckout.
message UndoCheckoutRequest {

	// The checked-out version, by number. The LATEST marker is not accepted.
	ObjVer obj_ver = 1;

	// True to undo a check-out made from another computer, or by another user (requires the vault-level right to force undo check-out).
	bool force = 2;
}

// The response of UndoCheckout.
message UndoCheckoutResponse {

	// The object after the operation. Its `latest_version` carries no property values.
	ExtObjectInfo object_info = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of UndoCheckoutMultiple.
message UndoCheckoutMultipleRequest {

	// Object versions.
	repeated ObjVer obj_vers = 1;

	// If true, undo checkout is performed even if the document was not checked out to the caller (if the caller has sufficient rights).
	bool force = 2;
}

// The response of UndoCheckoutMultiple.
message UndoCheckoutMultipleResponse {

	// Results.
	repeated ExtObjectInfo results = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of GetProperties.
message GetPropertiesRequest {

	// Leave unset or use `CALL_IMPORTANCE_NORMAL`.
	CallImportance callimp = 1;

	// The object and a specific version of it. The latest-version marker is not accepted.
	ObjVer obj_ver = 2;
}

// The response of GetProperties.
message GetPropertiesResponse {

	// The property values of the version.
	repeated PropertyValue properties = 1;
}

// The request of GetPropertiesOfMultipleObjects.
message GetPropertiesOfMultipleObjectsRequest {

	// Leave unset or use `CALL_IMPORTANCE_NORMAL`.
	CallImportance callimp = 1;

	// Specific object versions. The latest-version marker is not accepted.
	repeated ObjVer objvers = 2;
}

// The response of GetPropertiesOfMultipleObjects.
message GetPropertiesOfMultipleObjectsResponse {

	// The property values of each version, in the request order.
	repeated PropertyValueArray properties = 1;
}

// The request of SetPropertiesMultiple.
message SetPropertiesMultipleRequest {

	// One set of changes per object; see [SetPropertiesParams](mfiles:MFiles.SetPropertiesParams). Each object at most once.
	repeated SetPropertiesParams properties = 1;
}

// The response of SetPropertiesMultiple.
message SetPropertiesMultipleResponse {

	// The objects after the change, in the order of `properties`.
	repeated ExtObjectInfo results = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of UpdateProperty.
message UpdatePropertyRequest {

	// The object version to set the property of.
	ObjVer obj_ver = 1;

	// The updated property.
	PropertyValue property = 2;

	// Flags that control this operation.
	OBJECTOPFLAGS object_flags = 3;
}

// The response of UpdateProperty.
message UpdatePropertyResponse {

	// The information, properties, and ACL of the modified version of the object after the operation.
	ObjectVersionExWP object_info = 1;

	// True if the latest version of the document is visible after the operation.
	bool is_latest_visible = 2;

	// The latest version of the object after the operation, if `is_latest_visible` is true.
	ObjectVersionEx latest_version = 3;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 4;
}

// The request of RemoveProperty.
message RemovePropertyRequest {

	// The object version to remove the property of.
	ObjVer obj_ver = 1;

	// The property to remove.
	int32 property_id = 2;

	// Flags that control this operation.
	OBJECTOPFLAGS object_flags = 3;
}

// The response of RemoveProperty.
message RemovePropertyResponse {

	// The information, properties, and ACL of the modified version of the object after the operation.
	ObjectVersionExWP object_info = 1;

	// True if the latest version of the document is visible after the operation.
	bool is_latest_visible = 2;

	// The latest version of the object after the operation, if `is_latest_visible` is true.
	ObjectVersionEx latest_version = 3;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 4;
}

// The request of SetObjectLevelProperty.
message SetObjectLevelPropertyRequest {

	// The object ID.
	ObjID obj_id = 1;

	// The new property.
	PropertyValue property = 2;

	// Flags that control this operation.
	OBJECTOPFLAGS options = 3;
}

// The response of SetObjectLevelProperty.
message SetObjectLevelPropertyResponse {

	// Information about the object after the operation. (represented by ExtObjectInfo struct.)
	ExtObjectInfo result = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of UpdateObjectModificationInfo.
message UpdateObjectModificationInfoRequest {

	// The object version to set the values of.
	ObjVer obj_ver = 1;

	// The properties to add/replace arrau.
	repeated PropertyValue properties = 2;

	// Flags that control this operation.
	OBJECTOPFLAGS object_flags = 3;
}

// The response of UpdateObjectModificationInfo.
message UpdateObjectModificationInfoResponse {

	// The information, properties, and ACL of the modified version of the object after the operation.
	ObjectVersionExWP object_info = 1;

	// True if the latest version of the document is visible after the operation.
	bool is_latest_visible = 2;

	// The latest version of the object after the operation, if `is_latest_visible` is true.
	ObjectVersionEx latest_version = 3;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 4;
}

// The request of SetFavoritesMultiple.
message SetFavoritesMultipleRequest {

	// The objects that are added to the Favorites collection.
	repeated ObjID add_objects = 1;

	// The objects that are removed from the Favorites collection.
	repeated ObjID remove_objects = 2;

	// True if the specified set of favorite objects should replace the existing collection. In this case the removed objects are also included in the return values.
	bool remove_all = 3;
}

// The response of SetFavoritesMultiple.
message SetFavoritesMultipleResponse {

	// Results.
	repeated ExtObjectInfo affected_objects = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of GetObjectInfo.
message GetObjectInfoRequest {

	// The object.
	ObjID obj_id = 1;

	// True to read the latest version, false to read `version`.
	bool latest_version = 2;

	// The specific version to read when `latest_version` is false.
	ObjVerVersion version = 3;
}

// The response of GetObjectInfo.
message GetObjectInfoResponse {

	// The version information, including the files of the version.
	ObjectVersionEx object_info = 1;
}

// The request of CheckAccess.
message CheckAccessRequest {

	// The object's ACL.
	AccessControlList acl = 1;

	// The object-level access requirements that must be fulfilled.
	ObjectAccess required_access = 2;
}

// The response of CheckAccess.
message CheckAccessResponse {

	// Receives true if the user has the required access based on the given ACL.
	bool has_access = 1;
}

// The request of GetSecurity.
message GetSecurityRequest {

	// The object version.
	ObjVer obj_ver = 1;
}

// The response of GetSecurity.
message GetSecurityResponse {

	// The ACL of the document version.
	AccessControlList acl = 1;
}

// The request of GetSecurityOfMultipleObjects.
message GetSecurityOfMultipleObjectsRequest {

	// Object versions.
	repeated ObjVer obj_vers = 1;
}

// The response of GetSecurityOfMultipleObjects.
message GetSecurityOfMultipleObjectsResponse {

	// The ACLs of object versions.
	repeated AccessControlList acls = 1;
}

// The request of ChangeSecurity.
message ChangeSecurityRequest {

	// The object version, by number.
	ObjVer obj_ver = 1;

	// The new ACL.
	AccessControlList acl = 2;

	// `change_acl_in_all_versions` applies the ACL to every version; `require_read_access_after_operation` and the other `require_...` flags make the call fail if the caller would lose that access.
	OBJECTOPFLAGS options = 3;
}

// The response of ChangeSecurity.
message ChangeSecurityResponse {

	// False if the caller can no longer see the version.
	bool is_specified_version_still_visible = 1;

	// Document info after this operation.
	ObjectVersionEx specified_version = 2;

	// Information about the object after the operation.
	ExtObjectInfo result = 3;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 4;
}

// The request of AddObjectFile.
message AddObjectFileRequest {

	// The checked-out version, by number.
	ObjVer obj_ver = 1;

	// The file name without the extension.
	string title = 2;

	// The file extension without the dot, for example `pdf`.
	string extension = 3;

	// The file's original creation time, if known. Optional.
	google.protobuf.Timestamp created_at_utc = 4;

	// The file's last access time, if known. Optional.
	google.protobuf.Timestamp accessed_at_utc = 5;

	// The file's last write time, if known. Optional.
	google.protobuf.Timestamp written_at_utc = 6;

	// The file's last change time, if known. Optional.
	google.protobuf.Timestamp changed_at_utc = 7;

	// True to let the server update the object's Last modified timestamp from this change.
	bool can_update_object_last_modified_timestamp = 8;
}

// The response of AddObjectFile.
message AddObjectFileResponse {

	// The new file's ID and version; pass it to UploadFile as `file.file_ver`.
	FileVer file_ver = 1;

	// The checked-out version after the operation, with its files.
	ObjectVersionEx result = 2;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 3;
}

// The request of RemoveObjectFile.
message RemoveObjectFileRequest {

	// The object version.
	ObjVer obj_ver = 1;

	// The file version.
	FileVer file_ver = 2;
}

// The response of RemoveObjectFile.
message RemoveObjectFileResponse {

	// The checked-out version after the operation.
	ObjectVersionEx object_version = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of RenameObjectFile.
message RenameObjectFileRequest {

	// The object version.
	ObjVer obj_ver = 1;

	// The file to be renamed.
	FileVer file_ver = 2;

	// The new title of the file.
	string title = 3;

	// The new extension of the file, not including the dot (e.g. "doc").
	string extension = 4;
}

// The response of RenameObjectFile.
message RenameObjectFileResponse {

	// The checked-out version after the operation.
	ObjectVersionEx object_version = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of GetObjectFiles.
message GetObjectFilesRequest {

	// The object and a specific version of it.
	ObjVer obj_ver = 1;
}

// The response of GetObjectFiles.
message GetObjectFilesResponse {

	// The files of the version, with their IDs, versions, sizes and MD5 checksums.
	repeated File files = 1;
}

// The request of UploadFile.
message UploadFileRequest {

	// 0 to start a new upload; the returned ID for the following blocks.
	int32 upload_id = 1;

	// The object that owns the file.
	ObjID obj_id = 2;

	// The file to replace, as returned for the checked-out version: at least `file_ver`, and the new `size` with `size_precision` `FILE_SIZE_PRECISION_EXACT`.
	File file = 3;

	// The position of this block in the file. Must be 0 in the first call. Use multiples of 4096 bytes for all blocks but the last.
	int64 offset = 4;

	// The bytes of this block.
	bytes data = 5;
}

// The response of UploadFile.
message UploadFileResponse {

	// Receives the identifier of this upload operation.
	int32 upload_id = 1;
}

// The request of UploadFileCommit.
message UploadFileCommitRequest {

	// The ID from `UploadFile`.
	int32 upload_id = 1;

	// The object that owns the file.
	ObjID obj_id = 2;

	// The file and its new size. `title` and `extension` are ignored.
	File file = 3;

	// If not zero, specifies the low-order part of the MD5 checksum of the uploaded file.
	int64 low_digest = 4;

	// If not zero, specifies the high-order part of the MD5 checksum of the uploaded file.
	int64 high_digest = 5;
}

// The response of UploadFileCommit.
message UploadFileCommitResponse {

	// True if `after_upload` is filled.
	bool object_info_available = 1;

	// The version information of the object after the upload, if `object_info_available` is true.
	ObjectVersionEx after_upload = 2;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 3;
}

// The request of GetFileSize.
message GetFileSizeRequest {

	// The file version.
	ObjFileVer obj_file_ver = 1;
}

// The response of GetFileSize.
message GetFileSizeResponse {

	// The size of the file.
	int64 file_size = 1;
}

// The request of GetObjectFilesForModificationInEventHandler.
message GetObjectFilesForModificationInEventHandlerRequest {

	// The object version.
	ObjVer obj_ver = 1;
}

// The response of GetObjectFilesForModificationInEventHandler.
message GetObjectFilesForModificationInEventHandlerResponse {

	// Results.
	repeated File files = 1;
}

// The request of RemoveObject.
message RemoveObjectRequest {

	// The object to delete.
	ObjID obj_id = 1;
}

// The response of RemoveObject.
message RemoveObjectResponse {

	// The object after the operation; `is_visible` is false for users who cannot see deleted objects.
	ExtObjectInfo object = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of RemoveObjects.
message RemoveObjectsRequest {

	// Objects.
	repeated ObjID obj_ids = 1;
}

// The response of RemoveObjects.
message RemoveObjectsResponse {

	// Results.
	repeated ExtObjectInfo deleted_objects = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of UndeleteObject.
message UndeleteObjectRequest {

	// The object ID.
	ObjID obj_id = 1;
}

// The response of UndeleteObject.
message UndeleteObjectResponse {

	// Information about the object after the operation.
	ExtObjectInfo ext_object_info = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of UndeleteObjects.
message UndeleteObjectsRequest {

	// Objects.
	repeated ObjID obj_ids = 1;
}

// The response of UndeleteObjects.
message UndeleteObjectsResponse {

	// Results.
	repeated ExtObjectInfo ext_object_infos = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of DestroyObject.
message DestroyObjectRequest {

	// The object.
	ObjID obj_id = 1;

	// True to destroy the whole object; false to destroy the version in `version`.
	bool all_versions = 2;

	// `OBJ_VER_VERSION_TYPE_ALL` when `all_versions` is true; otherwise the version number to destroy with `OBJ_VER_VERSION_TYPE_SPECIFIC`.
	ObjVerVersion version = 3;
}

// The response of DestroyObject.
message DestroyObjectResponse {

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 1;
}

// The request of DestroyObjects.
message DestroyObjectsRequest {

	// Objects.
	repeated ObjID obj_ids = 1;
}

// The response of DestroyObjects.
message DestroyObjectsResponse {

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 1;
}

// The request of DestroyObjectVersions.
message DestroyObjectVersionsRequest {

	// Objects.
	repeated ObjVer obj_vers = 1;
}

// The response of DestroyObjectVersions.
message DestroyObjectVersionsResponse {

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 1;
}

// The request of GetObjectHistory.
message GetObjectHistoryRequest {

	// The object.
	ObjID obj_id = 1;
}

// The response of GetObjectHistory.
message GetObjectHistoryResponse {

	// The versions, oldest first, as specific versions.
	repeated ObjVerVersion versions = 1;
}

// The request of GetObjectHistory2.
message GetObjectHistory2Request {

	// The object.
	ObjID obj_id = 1;
}

// The response of GetObjectHistory2.
message GetObjectHistory2Response {

	// The version information of each version, oldest first.
	repeated ObjectVersionEx results = 1;
}

// The request of GetLatestObjectVersion.
message GetLatestObjectVersionRequest {

	// The object ID.
	ObjID obj_id = 1;

	// True to get the checked-out version when the object is checked out to the caller. Otherwise, and for objects checked out to another user, the latest checked-in version.
	bool allow_checked_out = 2;
}

// The response of GetLatestObjectVersion.
message GetLatestObjectVersionResponse {

	// The latest version, as a specific version.
	ObjVerVersion object_version = 1;

	// The GUID of that version.
	string version_guid = 2;
}

// The request of GetLatestFileVersion.
message GetLatestFileVersionRequest {

	// The file, as `File.file_ver.file_id`.
	FileID file_id = 1;

	// True to get the file version of the checked-out version when the object is checked out to the caller.
	bool allow_checked_out = 2;
}

// The response of GetLatestFileVersion.
message GetLatestFileVersionResponse {

	// The latest file version number.
	int32 file_version = 1;

	// The specific object version that contains that file version.
	ObjVer pobjver = 2;
}

// The request of AddVersionTag.
message AddVersionTagRequest {

	// The object version.
	ObjVer obj_ver = 1;

	// The ID of the version tag to add.
	int32 tag = 2;

	// If true, this tag is cleared from the other versions of this document if it exists in them.
	bool clear_this_tag_from_other_versions = 3;
}

// The response of AddVersionTag.
message AddVersionTagResponse {

	// Information of the modified document version after the operation.
	ObjectVersionEx modified_object = 1;

	// Receives the property values of the modified document version after the operation.
	repeated PropertyValue modified_properties = 2;

	// True if the latest version of the document is visible after the operation.
	bool is_latest_visible = 3;

	// The latest version of the object after the operation, if `is_latest_visible` is true.
	ObjectVersionEx latest_version = 4;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 5;
}

// The request of ModifyVersionTags.
message ModifyVersionTagsRequest {

	// The object version.
	ObjVer obj_ver = 1;

	// The new set of version tag IDs. Empty clears the tags of the version.
	repeated int32 tags = 2;
}

// The response of ModifyVersionTags.
message ModifyVersionTagsResponse {

	// Information of the modified document version after the operation.
	ObjectVersionEx modified_object = 1;

	// Receives the property values of the modified document version after the operation.
	repeated PropertyValue modified_properties = 2;

	// True if the latest version of the document is visible after the operation.
	bool is_latest_visible = 3;

	// The latest version of the object after the operation, if `is_latest_visible` is true.
	ObjectVersionEx latest_version = 4;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 5;
}

// The request of Rollback.
message RollbackRequest {

	// The object.
	ObjID obj_id = 1;

	// The version to copy, with `OBJ_VER_VERSION_TYPE_SPECIFIC` and its number.
	ObjVerVersion rollback_version = 2;
}

// The response of Rollback.
message RollbackResponse {

	// Information about the object after the operation.
	ExtObjectInfo ext_object_info = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of GetVersionCommentHistory.
message GetVersionCommentHistoryRequest {

	// The object version for which the version comment history is gathered. The version comment history includes this version and any older versions. If the version part is -1, the version comment history of the whole object is returned.
	ObjVer obj_ver = 1;
}

// The response of GetVersionCommentHistory.
message GetVersionCommentHistoryResponse {

	// Results in ascending order.
	repeated VersionComment comments = 1;
}

// The request of GetLatestVersionCommentOfMultipleObjects.
message GetLatestVersionCommentOfMultipleObjectsRequest {

	// Objects.
	repeated ObjVer obj_vers = 1;
}

// The response of GetLatestVersionCommentOfMultipleObjects.
message GetLatestVersionCommentOfMultipleObjectsResponse {

	// Receives the latest comments of the objects.
	repeated LatestVersionComment comments = 1;
}

// The request of GetWorkflowsForClient.
message GetWorkflowsForClientRequest {
}

// The response of GetWorkflowsForClient.
message GetWorkflowsForClientResponse {

	// Results Array.
	repeated Workflow workflows = 1;
}

// The request of GetDocEventSubscriptions.
message GetDocEventSubscriptionsRequest {

	// The object ID. (represented by ObjID struct.)
	ObjID obj_id = 1;
}

// The response of GetDocEventSubscriptions.
message GetDocEventSubscriptionsResponse {

	// Receives the results.
	repeated EventSubscription subscriptions = 1;
}

// The request of SetDocEventSubscriptions.
message SetDocEventSubscriptionsRequest {

	// The object ID. (represented by ObjID struct.)
	ObjID obj_id = 1;

	// Event subscriptions.
	repeated EventSubscription utf8szeventsubs = 2;
}

// The response of SetDocEventSubscriptions.
message SetDocEventSubscriptionsResponse {
}

// The request of GetObjectGUID.
message GetObjectGUIDRequest {

	// The object.
	ObjID obj_id = 1;
}

// The response of GetObjectGUID.
message GetObjectGUIDResponse {

	// The object GUID, in braces.
	string pguid = 1;
}

// The request of SetObjectGUID.
message SetObjectGUIDRequest {

	// The object ID. (represented by ObjID struct.)
	ObjID obj_id = 1;

	// The new Object GUID for the specified object.
	string guid = 2;
}

// The response of SetObjectGUID.
message SetObjectGUIDResponse {

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 1;
}

// The request of GetObjIDByGUID.
message GetObjIDByGUIDRequest {

	// The object GUID, as returned by `GetObjectGUID` or `ObjectLevelInfo.guid`.
	string guid = 1;
}

// The response of GetObjIDByGUID.
message GetObjIDByGUIDResponse {

	// The object type and ID of the object.
	ObjID obj_id = 1;
}

// The request of PrepareFile.
message PrepareFileRequest {

	// The object and the specific file version.
	ObjFileVer file_ver = 1;

	// `FILE_FORMAT_PDF` or `FILE_FORMAT_DISPLAY_ONLY_PDF`.
	FileFormat fileformat = 2;
}

// The response of PrepareFile.
message PrepareFileResponse {

	// True if the rendition is available.
	bool available = 1;

	// The extension of the rendition, for example "pdf".
	string extension = 2;

	// The size of the rendition in bytes.
	int64 file_size = 3;

	// The UTC timestamp of the prepared file.
	google.protobuf.Timestamp last_write_time = 4;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 5;
}

// The request of DownloadFile_Begin.
message DownloadFile_BeginRequest {

	// The object and the specific file version, as in `File.file_ver`.
	ObjFileVer obj_file_ver = 1;

	// `FILE_FORMAT_NATIVE` (default), `FILE_FORMAT_PDF` or `FILE_FORMAT_DISPLAY_ONLY_PDF`.
	FileFormat format = 2;

	// Must be true to download. False only checks the caller's access and records the file as accessed; `download_id` is then 0.
	bool prepare_file_for_downloading = 3;

	// True to get the MD5 checksum of the native file in `file_outline.md5_checksum`.
	bool need_checksum = 4;
}

// The response of DownloadFile_Begin.
message DownloadFile_BeginResponse {

	// The download session for `DownloadFile_ReadBlock` and `DownloadFile_Stop`. 0 if `prepare_file_for_downloading` was false.
	int32 download_id = 1;

	// The size of the content to download, in the requested format, and the checksum if requested.
	FileOutline file_outline = 2;

	// The version information of the object that owns the file.
	ObjectVersionEx ov_ex = 3;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 4;
}

// The request of ConvertToPDF.
message ConvertToPDFRequest {

	// The file version.
	ObjVer obj_ver = 1;

	// The file id. If the file id part is empty / -1 then all files of the object version are converted.
	FileID file_id = 2;

	// True if the resulting PDF file should be stored as a separate file, with the same title as the original file but with the .pdf extension.
	bool leave_original = 3;

	// True if overwriting an existing target file with the same name is allowed. Effective only if bStoreAsSeparateFile is true.
	bool overwrite = 4;

	// True if the resulting PDF file should comply with the PDF/A-1b standard.
	bool pdfa1b = 5;

	// If true, the operation fails if the source file is in unsupported format. If false, the operation silently skips unsupported source files.
	bool fail_on_unsupported = 6;
}

// The response of ConvertToPDF.
message ConvertToPDFResponse {

	// The checked-out version after the conversion.
	ObjectVersionEx object_version = 1;

	// Receives true if the conversion from the source file format (based on the extension and actual content format detection) is supported. If false, the conversion is not supported and the caller should not attempt to use the target file.
	bool success = 2;

	// Receives an array of file versions of the PDF files in the object version.
	repeated FileVer files = 3;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 4;
}

// The request of AddStubObject.
message AddStubObjectRequest {

	// The object type of the new object.
	int32 obj_type = 1;

	// The explicit internal ID of the new object if defined, -1 for automatic ID numbering.
	int32 explicit_object_id = 2;

	// Properties of the new object or empty if not specified.
	repeated PropertyValue prop_vals = 3;

	// The ACL for the new object.
	AccessControlList utf8szacl = 4;

	// Flags that control this operation.
	OBJECTOPFLAGS objopflags = 5;

	// If true, the object is checked in immediately, otherwise the object is left to checked-out state.
	bool check_in = 6;

	// GUID for the stub object.
	string guid = 7;
}

// The response of AddStubObject.
message AddStubObjectResponse {

	// True if the latest version of the object is visible after the operation.
	bool latest_visible = 1;

	// The information, properties and ACL of the latest version of the object, if `latest_visible` is true.
	ObjectVersionExWP latest = 2;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 3;
}

// The request of ResolveConflict.
message ResolveConflictRequest {

	// The target object.
	ObjID obj_idtarget = 1;

	// True to resolve in favor of the target object, discard otherwise.
	bool keep_this = 2;

	// True to determine the affected objects without actual resolution.
	bool preview = 3;

	// True to require intended objects for a non-preview invocation.
	bool require_intended_objects = 4;

	// IDs of the objects intended to be affected (including the target).
	repeated ExtObjectInfo ext_object_infos_intended = 5;
}

// The response of ResolveConflict.
message ResolveConflictResponse {

	// Receives the info about the affected objects as JSOn array.
	repeated ExtObjectInfo ext_object_infos = 1;

	// True if the indicated objects were really affected (as opposed to just returning the info).
	bool resolved = 2;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 3;
}

// The request of GetRemoteRelationshipSourceInfo.
message GetRemoteRelationshipSourceInfoRequest {

	// Partially filled information about the object. The JSON represents RemoteRelationshipInfo structure.
	RemoteRelationshipInfo partial_data = 1;
}

// The response of GetRemoteRelationshipSourceInfo.
message GetRemoteRelationshipSourceInfoResponse {

	// Receives info about the object for creating relationship to another vault. The JSON represents RemoteRelationshipInfo structure.
	RemoteRelationshipInfo filled_data = 1;
}

// The request of GetRemoteRelationshipTargetInfo.
message GetRemoteRelationshipTargetInfoRequest {

	// Info about the object in the remote vault. The JSON represents RemoteRelationshipInfo structure.
	RemoteRelationshipInfo remote_ = 1;
}

// The response of GetRemoteRelationshipTargetInfo.
message GetRemoteRelationshipTargetInfoResponse {

	// True if the object exists already in the local vault, false if it needs to be created.
	bool found = 1;

	// Receives info about the object in the local vault. The JSON represents RemoteRelationshipInfo structure.
	RemoteRelationshipInfo local_ = 2;
}

// The request of GetObjectInfoAndProperties.
message GetObjectInfoAndPropertiesRequest {

	// The object: object type ID in `type`, object ID in `item_id.internal_id`.
	ObjID obj_id = 1;

	// True to read the latest checked-in version (or the caller's checked-out version, see `allow_checked_out`). False to read the version in `doc_version`.
	bool latest_version = 2;

	// Used with `latest_version`. True to get the checked-out version when the object is checked out to the caller. A version checked out to another user is never returned.
	bool allow_checked_out = 3;

	// The specific version to read when `latest_version` is false (`OBJ_VER_VERSION_TYPE_SPECIFIC` and `internal_version`). Ignored when `latest_version` is true.
	ObjVerVersion doc_version = 4;
}

// The response of GetObjectInfoAndProperties.
message GetObjectInfoAndPropertiesResponse {

	// The version information of the returned version, including its files.
	ObjectVersionEx object_info = 1;

	// The property values of the returned version.
	repeated PropertyValue property_array = 2;
}

// The request of GetObjectVersionAndPropertiesOfMultipleObjects.
message GetObjectVersionAndPropertiesOfMultipleObjectsRequest {

	// The objects to read. With `latest_versions` true, only `obj_id` is used.
	repeated ObjVer obj_vers = 1;

	// True to read the latest checked-in version of each object (see `allow_checked_out`). False to read the specific versions in `obj_vers`.
	bool latest_versions = 2;

	// Used with `latest_versions`. True to get the checked-out version of the objects that are checked out to the caller. A version checked out to another user is never returned.
	bool allow_checked_out = 3;

	// True to leave out the objects that do not exist or that the caller cannot read, instead of failing the whole call. The response is then shorter than the request.
	bool allow_missing_object_versions = 4;
}

// The response of GetObjectVersionAndPropertiesOfMultipleObjects.
message GetObjectVersionAndPropertiesOfMultipleObjectsResponse {

	// The version information of each returned object, including its files.
	repeated ObjectVersionEx objects = 1;

	// The property values of each returned object, in the same order as `objects`.
	repeated PropertyValueArray properties = 2;
}

// The request of UpdateMetadataInFile.
message UpdateMetadataInFileRequest {

	// The object version.
	ObjVer obj_ver = 1;

	// The file which is updated. IF the file part of the ID is empty then all files are updated.
	FileID file_id = 2;

	// If true, throw an exception if a file for which embedded metadata is not supported is encountered.
	bool fail_on_unsupported_file = 3;
}

// The response of UpdateMetadataInFile.
message UpdateMetadataInFileResponse {

	// Receives information about the latest version of the document after the operation.
	ObjectVersionEx object_info = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of GetRelationshipsForObject.
message GetRelationshipsForObjectRequest {

	// A specific object version.
	ObjVer obj_ver = 1;

	// The desired relationships.
	RelationshipsMode mode = 2;
}

// The response of GetRelationshipsForObject.
message GetRelationshipsForObjectResponse {

	// The objects this version refers to.
	repeated ObjectVersionEx relationships_from = 1;

	// The objects that refer to this version.
	repeated ObjectVersionEx relationships_to = 2;
}

// The request of PromoteUnmanagedObject.
message PromoteUnmanagedObjectRequest {

	// Parameters (one set of parameters per object).
	repeated SetPropertiesParams properties = 1;

	// If true, the object is checked in immediately, otherwise the object is left to checked-out state.
	bool check_in = 2;
}

// The response of PromoteUnmanagedObject.
message PromoteUnmanagedObjectResponse {

	// Results.
	repeated ExtObjectInfo promoted_objects = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of DownloadFile_Stop.
message DownloadFile_StopRequest {

	// The ID of the download session.
	int32 download_id = 1;
}

// The response of DownloadFile_Stop.
message DownloadFile_StopResponse {
}

// The request of SetExternalObjectID.
message SetExternalObjectIDRequest {

	// The object ID. (represented by ObjID struct.)
	ObjID obj_id = 1;

	// The new external ID for the specified object.
	string ext_id = 2;
}

// The response of SetExternalObjectID.
message SetExternalObjectIDResponse {

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 1;
}

// The request of GetAutomaticMetadata.
message GetAutomaticMetadataRequest {

	// The automatic metadata extraction request.
	AutomaticMetadataRequest request = 1;
}

// The response of GetAutomaticMetadata.
message GetAutomaticMetadataResponse {

	// Receives the automatic metadata.
	AutomaticMetadataResult response = 1;
}

// The request of DownloadFile.
message DownloadFileRequest {

	// Object version.
	ObjVer obj_ver = 1;

	// File ID.
	FileID file_id = 2;

	// Specifies the file format to download.
	FileFormat format = 3;
}

// The response of DownloadFile.
message DownloadFileResponse {
}

// The request of GetTextContentForTemporaryFile.
message GetTextContentForTemporaryFileRequest {

	// The `upload_id` from `UploadTempFile`.
	int32 upload_session_id = 1;
}

// The response of GetTextContentForTemporaryFile.
message GetTextContentForTemporaryFileResponse {

	// Plaintext content.
	string text_content = 1;
}

// The request of GetIdentitiesAndViewsOfMultipleUnmanagedReducedItems.
message GetIdentitiesAndViewsOfMultipleUnmanagedReducedItemsRequest {

	// Object IDs (managed or unmanaged) (represented by ObjIDArray struct.)
	repeated ObjID obj_ids = 1;

	// True if the method is allowed to return less results than requested. This can happen if the user does not have access to all of the objects.
	bool allow_missing_object_versions = 2;
}

// The response of GetIdentitiesAndViewsOfMultipleUnmanagedReducedItems.
message GetIdentitiesAndViewsOfMultipleUnmanagedReducedItemsResponse {

	// Receives the managed object IDs of the requested objects with read access (represented by ObjID struct.)
	repeated ObjID objects = 1;

	// Receives the unmanaged object versions for requested objects with read access (represented by ObjVer struct.)
	repeated ObjVer obj_vers = 2;

	// Receives the primary view IDs for the requested objects with read access (represented by ItemID struct.)
	repeated ItemID view_ids = 3;
}

// The request of ResolveManagedIDOfPromotedObject.
message ResolveManagedIDOfPromotedObjectRequest {

	// Object ID of unmanaged object. (represented by ObjID struct.)
	ObjID obj_id = 1;
}

// The response of ResolveManagedIDOfPromotedObject.
message ResolveManagedIDOfPromotedObjectResponse {

	// The ObjID of the managed object.
	ObjID id_managed = 1;
}

// The request of DemoteObjects.
message DemoteObjectsRequest {

	// Objects.
	repeated ObjID obj_ids = 1;
}

// The response of DemoteObjects.
message DemoteObjectsResponse {

	// Results.
	repeated ExtObjectInfo ext_object_infos = 1;
}

// The request of DownloadFileWithDownloadID.
message DownloadFileWithDownloadIDRequest {

	// Download session identifier.
	int32 download_id = 1;

	// True if the content is expected to be displayed inline in the browser.
	bool content_disposition_inline = 2;
}

// The response of DownloadFileWithDownloadID.
message DownloadFileWithDownloadIDResponse {
}

// The request of GetMultipleWorkflowStatesAndTransitionsWithRightsCheck.
message GetMultipleWorkflowStatesAndTransitionsWithRightsCheckRequest {

	// The IDs of the workflows.
	repeated int32 workflow_ids = 1;
}

// The response of GetMultipleWorkflowStatesAndTransitionsWithRightsCheck.
message GetMultipleWorkflowStatesAndTransitionsWithRightsCheckResponse {

	// States. Compressed, unless pulUncompressedStatesLength is -1.
	bytes states = 1;

	// Receives the length of the uncompressed data. Set to -1 if pbytesData is not compressed.
	uint32 uncompressed_states_length = 2;

	// Transitions. Compressed, unless pulUncompressedTransitionsLength is -1.
	bytes transitions = 3;

	// Receives the length of the uncompressed data. Set to -1 if pbytesData is not compressed.
	uint32 uncompressed_transitions_length = 4;
}

// The request of GetMultipleWorkflowStatesAndTransitions.
message GetMultipleWorkflowStatesAndTransitionsRequest {

	// The IDs of the workflows.
	repeated int32 workflow_ids = 1;

	// If the pointer is not unset, it points to a struct that specifies the current state of the object(s). If the pointer is unset, the bSelectable flags of all returned states will be true because transition rights cannot be checked in that case.
	TypedValue current_state = 2;
}

// The response of GetMultipleWorkflowStatesAndTransitions.
message GetMultipleWorkflowStatesAndTransitionsResponse {

	// States. Compressed, unless pulUncompressedStatesLength is -1.
	bytes states = 1;

	// Receives the length of the uncompressed data. Set to -1 if pbytesData is not compressed.
	uint32 uncompressed_states_length = 2;

	// Transitions. Compressed, unless pulUncompressedTransitionsLength is -1.
	bytes transitions = 3;

	// Receives the length of the uncompressed data. Set to -1 if pbytesData is not compressed.
	uint32 uncompressed_transitions_length = 4;
}

// The request of GetFileDownloadUrl.
message GetFileDownloadUrlRequest {

	// Object version.
	ObjVer obj_ver = 1;

	// File ID.
	FileID file_id = 2;

	// An optional key-value pairs for additional data from the caller. Can be empty.
	repeated NamedValue additional_data = 3;
}

// The response of GetFileDownloadUrl.
message GetFileDownloadUrlResponse {

	// URL that can be used to download the file.
	string url = 1;
}

// The request of DownloadFileWithDownloadKey.
message DownloadFileWithDownloadKeyRequest {

	// Contains identifier that will be used to locate the file.
	StringValue download_key = 1;

	// Specifies the file format to download.
	FileFormat format = 2;

	// True if the content is expected to be displayed inline in the browser.
	bool content_disposition_inline = 3;

	// True if the caller wants to receive the checksum of the file. Will be returned in the response headers.
	bool need_checksum = 4;
}

// The response of DownloadFileWithDownloadKey.
message DownloadFileWithDownloadKeyResponse {
}

// The request of FollowObject.
message FollowObjectRequest {

	// The object ID.
	ObjID obj_id = 1;

	// True if the objects should be followed, false if not followed.
	bool follow_state = 2;
}

// The response of FollowObject.
message FollowObjectResponse {
}

// The request of GetTextContentForFile.
message GetTextContentForFileRequest {

	// The object and the specific file version.
	ObjFileVer obj_file_ver = 1;

	// Not used. Set `options` instead.
	uint32 options_obsolete = 2;

	// Extraction flags. Leave unset for a fresh extraction.
	TEXTCONTENTEXTRACTIONFLAGS options = 3;
}

// The response of GetTextContentForFile.
message GetTextContentForFileResponse {

	// Receives the plain text content of the file version.
	string text_content = 1;
}

// The request of MigrateObject.
message MigrateObjectRequest {

	// Parameters.
	MigrateObjectParams params = 1;
}

// The response of MigrateObject.
message MigrateObjectResponse {

	// Results.
	MigratedObjectInfo object_info = 1;
}

// The request of GetTemplateObjectsForObjectType.
message GetTemplateObjectsForObjectTypeRequest {

	// The ID of the object type to get template objects of same type.
	int32 object_type = 1;
}

// The response of GetTemplateObjectsForObjectType.
message GetTemplateObjectsForObjectTypeResponse {

	// Resulting template objects objectversioninfo.
	repeated ObjectVersionEx template_objects = 1;

	// Resulting Addtional classes property value of each template objects.
	repeated PropertyValue addtional_classes_of_objects = 2;
}

// The request of DetectTextLanguage.
message DetectTextLanguageRequest {

	// The plain text input.
	string text_content = 1;
}

// The response of DetectTextLanguage.
message DetectTextLanguageResponse {

	// Structure containing the language and detection confidence.
	LanguageDetectionResult language_detection_result = 1;
}

// The request of GetObjectDataOfMultipleObjects.
message GetObjectDataOfMultipleObjectsRequest {

	// The objects. With a latest version type, only `obj_id` is used.
	repeated ObjVer obj_vers = 1;

	// What to return, which versions to read and how to handle missing objects. Set at least `required_data_flags` or `optional_data_flags`, and `version_type`.
	ObjectVersionDataRequest data_request = 2;
}

// The response of GetObjectDataOfMultipleObjects.
message GetObjectDataOfMultipleObjectsResponse {

	// One result per requested object, in the request order.
	repeated ObjectVersionDataResult results = 1;
}

// The request of FindFileDuplicates.
message FindFileDuplicatesRequest {

	// The obj file version.
	ObjFileVer obj_file_ver = 1;

	// True if the results should include duplicates which are other versions of the same file.
	bool include_versions_of_this_file = 2;

	// True if the results should exclude duplicates which belong to deleted objects.
	bool exclude_files_from_deleted_objects = 3;
}

// The response of FindFileDuplicates.
message FindFileDuplicatesResponse {

	// Results.
	repeated ObjID obj_ids = 1;
}

// The request of FindFilesByChecksum.
message FindFilesByChecksumRequest {

	// Specifies the low-order part of the MD5 checksum.
	int64 low_digest = 1;

	// Specifies the high-order part of the MD5 checksum.
	int64 high_digest = 2;

	// True if the results should exclude duplicates which belong to deleted objects.
	bool exclude_files_from_deleted_objects = 3;
}

// The response of FindFilesByChecksum.
message FindFilesByChecksumResponse {

	// Results.
	repeated ObjID obj_ids = 1;
}

// The request of RemoveFromRecentlyAccessed.
message RemoveFromRecentlyAccessedRequest {

	// The number of entries in `remove_objects`. Must match it.
	int32 object_count = 1;

	// The objects to remove from the caller's Recently accessed list.
	repeated ObjID remove_objects = 2;

	// True to clear the whole list.
	bool remove_all = 3;
}

// The response of RemoveFromRecentlyAccessed.
message RemoveFromRecentlyAccessedResponse {
}

// The request of GetDocumentComparisonUrl.
message GetDocumentComparisonUrlRequest {

	// The object and file version to compare.
	ObjFileVer obj_file_ver_original = 1;

	// The object and file version to compare with.
	ObjFileVer obj_file_ver_modified = 2;

	// The language to use for localization of the compare UI.
	string language = 3;

	// True if the download options should be enabled in the compare UI, false otherwise.
	bool allow_download = 4;
}

// The response of GetDocumentComparisonUrl.
message GetDocumentComparisonUrlResponse {

	// Receives the document comparison URL.
	string compare_url = 1;
}

// The request of GetDocumentComparisonWithTempFileUrl.
message GetDocumentComparisonWithTempFileUrlRequest {

	// The object and file version to compare.
	ObjFileVer obj_file_ver_original = 1;

	// Upload session ID.
	int32 upload_session_id = 2;

	// The file name to display in the compare UI for the temporarily uploaded file.
	string upload_file_name = 3;

	// The language to use for localization of the compare UI.
	string language = 4;

	// True if the download options should be enabled in the compare UI, false otherwise.
	bool allow_download = 5;
}

// The response of GetDocumentComparisonWithTempFileUrl.
message GetDocumentComparisonWithTempFileUrlResponse {

	// Receives the document comparison URL.
	string compare_url = 1;
}

// The request of GetDocumentComparisonEnabled.
message GetDocumentComparisonEnabledRequest {
}

// The response of GetDocumentComparisonEnabled.
message GetDocumentComparisonEnabledResponse {

	// Receives true if the document comparison feature is enabled.
	bool enabled = 1;
}

// The request of GetPromotedObjects.
message GetPromotedObjectsRequest {

	// If not null or empty, the external repository name.
	string external_repository = 1;

	// The last seen object ID. Returns only objects that are after this object when ordered by managed object ID (object type, ID).
	ObjID obj_id_last_seen = 2;

	// The maximum number of results to return.
	uint32 max_result_count = 3;
}

// The response of GetPromotedObjects.
message GetPromotedObjectsResponse {

	// Receives the managed and unmanaged object IDs of the promoted objects. Ordered by managed object ID (object type, ID).
	repeated ObjIDPair obj_id_pairs = 1;
}

// The request of HasFileDuplicates.
message HasFileDuplicatesRequest {

	// The obj file version.
	ObjFileVer obj_file_ver = 1;
}

// The response of HasFileDuplicates.
message HasFileDuplicatesResponse {

	// True, if the file version has duplicates.
	bool has_duplicates = 1;
}

// The request of FindFileDuplicatesOfObjVer.
message FindFileDuplicatesOfObjVerRequest {

	// The obj version.
	ObjVer obj_ver = 1;

	// True if the results should exclude duplicates which belong to deleted objects.
	bool exclude_files_from_deleted_objects = 2;
}

// The response of FindFileDuplicatesOfObjVer.
message FindFileDuplicatesOfObjVerResponse {

	// Results.
	repeated ObjID obj_ids = 1;
}

// The request of CopyConflictObjectAsNewVersionToBaseObject.
message CopyConflictObjectAsNewVersionToBaseObjectRequest {

	// The latest base object versiuon on which the new version is created. (represented by ObjVer struct.)
	ObjVer base_obj_ver = 1;

	// The related conflict object latest version. Can be a deleted object. (represented by ObjVer struct.)
	ObjVer conflict_obj_ver = 2;
}

// The response of CopyConflictObjectAsNewVersionToBaseObject.
message CopyConflictObjectAsNewVersionToBaseObjectResponse {

	// Information about the object after the operation.
	ExtObjectInfo ext_object_info = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of FindVaultDuplicates.
message FindVaultDuplicatesRequest {

	// True if the results should exclude duplicates which belong to deleted objects.
	bool exclude_files_from_deleted_objects = 1;
}

// The response of FindVaultDuplicates.
message FindVaultDuplicatesResponse {

	// Results.
	repeated ObjVer obj_vers = 1;
}

// The request of SetProperties.
message SetPropertiesRequest {

	// The session ID of a second LogIn of the same user, made less than 15 seconds before this call, when a workflow state transition requires an electronic signature. Unset otherwise.
	SESSIONID signature = 1;

	// The version to change, by number: the checked-out version if the caller has the object checked out, otherwise the latest checked-in version. The LATEST marker is not accepted.
	ObjVer obj_ver = 2;

	// True to change a checked-in object: the server checks it out, applies the change and checks it in as one new version. Without it the object must be checked out to the caller.
	bool allow_modifying_checked_in_object = 3;

	// True to allow the object to lack required properties. Requires the vault-level right to change the metadata structure and a vault setting that allows it.
	bool allow_missing_required_properties = 12;

	// With `allow_modifying_checked_in_object`, true to fail if `obj_ver` is not the latest checked-in version. Without it, the change goes to the latest version whatever version you name.
	bool fail_if_newer_version_exists = 4;

	// Optional `version_guid` of the version in `obj_ver`. With `fail_if_newer_version_exists`, the call also fails if that version has been replaced (for example by replication conflict resolution). Leave empty normally.
	string version_guid = 5;

	// Property values to add or replace. Other properties stay unchanged.
	repeated PropertyValue properties = 6;

	// True to treat `properties` as the full set and remove every other property the class does not list. `properties` must then include Class (100). Leave false.
	bool remove_unspecified_properties = 7;

	// Property definition IDs to remove. Properties listed by the class cannot be removed; set them empty instead.
	repeated int32 remove = 8;

	// Optional extra checks, for example `disallow_name_change` or `require_edit_access_after_operation`.
	OBJECTOPFLAGS object_flags = 9;

	// Which ACL the server starts from when it updates the object's permissions. The default, `ACLENFORCING_MODE_USE_PREVIOUS`, uses the object's current ACL; `ACLENFORCING_MODE_USE_PROVIDED` uses `acl`; `ACLENFORCING_MODE_RESET_TO_DEFAULT` uses the ACL calculated from the properties. `ACLENFORCING_MODE_DISALLOW_CHANGES` is rejected as invalid argument.
	ACLEnforcingMode acl_mode = 10;

	// The permissions to use with `ACLENFORCING_MODE_USE_PROVIDED`. Unset otherwise.
	AccessControlList acl = 11;
}

// The response of SetProperties.
message SetPropertiesResponse {

	// The object after the change: its latest version with properties and ACL. `original_obj_ver` echoes the requested version.
	ExtObjectInfo object_info = 1;

	// Information about objects that were also updated during the operation. (represented by ObjectVersionEx structs.)
	repeated ObjectVersionEx updated_objects = 2;
}

// The request of MigrateObjects.
message MigrateObjectsRequest {

	// Parameters.
	repeated MigrateObjectParams params = 1;

	// If true, object can be set to have missing required parameters.
	bool allow_missing_required_properties = 2;
}

// The response of MigrateObjects.
message MigrateObjectsResponse {

	// Results.
	repeated MigratedObjectInfo object_info = 1;
}

// The request of FindEmailDuplicates.
message FindEmailDuplicatesRequest {

	// The message ID.
	string message_id = 1;
}

// The response of FindEmailDuplicates.
message FindEmailDuplicatesResponse {

	// Results.
	repeated ObjID obj_ids = 1;
}

// A structure that specifies the request type for the GetTemplates method.
message GetTemplatesRequest {

	// The object type of the templates.
	int32 object_type_id = 1;

	// Optional class ID for fetching the templates of a specific class.
	optional int32 class_id = 2;

	// The search keywords for the templates.
	repeated string search_keywords = 3;
}

// A structure that specifies the response type for the GetTemplates method.
message GetTemplatesResponse {

	// Templates.
	repeated Template templates = 1;
}

// Requests effective permissions.
message GetEffectivePermissionsRequest {

	// The object version, by number.
	ObjVer obj_ver = 1;
}

// Response for effective permissions request.
message GetEffectivePermissionsResponse {

	// One entry per user with any access, by user ID.
	repeated EffectivePermissions permissions = 1;
}

// Request details for generating a download key for downloading multiple files.
message GetFileDownloadUrlRequest2 {

	// Download requests.
	repeated FileDownloadUrlRequestData download_requests = 1;
}

// Response details for generating a download key for downloading multiple files.
message GetFileDownloadUrlResponse2 {

	// The download URL.
	string url = 1;
}

// Request details for creating temporary file uploads from existing files.
message UploadExistingFilesRequest {

	// The files to copy, each as object and specific file version.
	repeated ObjFileVer obj_file_vers = 1;

	// True to get the copies in `file_refs` instead of `upload_ids`. In a vault without stateless uploads they are the upload IDs as decimal strings.
	bool return_file_refs = 2;
}

// Response with temporary file upload ids created from existing files.
message UploadExistingFilesResponse {

	// An array of temporary file ids. Empty if returnFileRefs was requested.
	repeated int32 upload_ids = 1;

	// If returnFileRefs was requested, the copies in the order of the requested files: file_refs of stateless uploads if the vault supports them, otherwise the upload IDs in decimal.
	repeated string file_refs = 2;
}

// The request of GetExternalEditingDetails.
message GetExternalEditingDetailsRequest {

	// The object whose file's authoring details you want.
	ObjVer obj_ver = 1;

	// The file version whose authoring details you want.
	FileVer file_ver = 2;
}

// The response of GetExternalEditingDetails.
message GetExternalEditingDetailsResponse {

	// Specifies the system used to edit the file. Opaque to the server, tells the client how the data can be used. eg. "SharePointEmbedded"
	string external_type = 1;

	// Data the client can use to open the document. Interpretation depends on externalType. eg. in SharePointEmbedded this is the url of the document.
	string external_data = 2;

	// Data the client can use to preview the document. Interpretation depends on externalType. eg. in SharePointEmbedded this is the preview url of the document.
	string external_preview_data = 3;

	// Indicates if the external file has changes which are not versioned in M-Files.
	bool has_unversioned_changes = 4;

	// The last modified timestamp of the latest external version.
	string last_modified_of_latest_change = 5;
}

// The request of RelayMasterStorageOperations.
message RelayMasterStorageOperationsRequest {

	// The object which is relayed to Master Storage.
	ObjVer obj_ver = 1;

	// The file version which is relayed to Master Storage.
	FileVer file_ver = 2;

	// If true, returns information required for starting a co-authoring session to the client.
	bool get_external_editing_details = 3;

	// If true, returns information required for previewing document having co-authoring capabilities to the client.
	bool get_external_preview_details = 4;

	// If true, returns information like version id, last modified datetime and file size related to external version.
	bool get_external_version_data = 5;

	// If true, returns labels (e.g. sensitivity / retention) attached to the file in Master Storage.
	bool get_labels = 6;
}

// The response of RelayMasterStorageOperations.
message RelayMasterStorageOperationsResponse {

	// Specifies the system used to edit the file. Opaque to the server, tells the client how the data can be used. eg. "SharePointEmbedded". Populated when request has getExternalEditingDetails or getExternalPreviewDetails flag set to true.
	string external_type = 1;

	// Data the client can use to open the document. Interpretation depends on externalType. eg. in SharePointEmbedded this is the url of the document. Populated when request has getExternalEditingDetails flag set to true.
	string external_data = 2;

	// Data the client can use to preview the document. Interpretation depends on externalType. eg. in SharePointEmbedded this is the preview url of the document. Populated when request has getExternalPreviewDetails flag set to true.
	string external_preview_data = 3;

	// Indicates if the external file has changes which are not versioned in M-Files. Populated when request has getExternalVersionData set to true.
	bool has_unversioned_changes = 4;

	// The last modified timestamp of the latest external version. Populated when request has getExternalVersionData set to true.
	string last_modified_of_latest_change = 5;

	// Labels attached to the file in Master Storage. The server is opaque to the contents, but in practice the format is the SPE FileSensitivityLabelInfo shape -- the dedicated GetSensitivityLabels path parses the same payload into that struct, so callers should assume the SPE shape rather than genuine free-form. Populated when request has getLabels flag set to true.
	string labels = 6;
}

// Request for getting workflow state history of an object.
message GetWorkflowStateHistoryRequest {

	// The object version.
	ObjVer obj_ver = 1;

	// The maximum number of states to return. Zero indicates no limit.
	uint32 max_history_states_to_return = 2;
}

// Response for getting workflow state history of an object.
message GetWorkflowStateHistoryResponse {

	// Object version and its property values.
	repeated ObjVerWithProperties history_states = 1;

	// True if there are more history states available.
	bool more_history_states_available = 2;
}

// Request for getting workflow states.
message GetWorkflowStatesRequest {

	// The workflow, the item ID of a Workflow (38) value.
	int32 workflow_id = 1;

	// The object's current state as a lookup value into value list 8 (states). Set it to get `can_current_user_select` for the transitions from this state; unset marks every state selectable.
	TypedValue current_state = 2;

	// The object the states are for. Needed only when transition permissions depend on the object (`are_state_permissions_object_specific`). It does not replace `current_state`.
	ObjVer obj_ver = 3;
}

// Response for getting workflow states.
message GetWorkflowStatesResponse {

	// States.
	repeated StateBasic results = 1;
}

// Request for getting workflow states and transitions.
message GetWorkflowStatesAndTransitionsRequest {

	// The workflow, the item ID of a Workflow (38) value.
	int32 workflow_id = 1;

	// The object's current state as a lookup value into value list 8. Required to get any transitions.
	TypedValue current_state = 2;

	// The object the transitions are for. Needed only when permissions depend on the object.
	ObjVer obj_ver = 3;
}

// Request for getting workflow states and transitions.
message GetWorkflowStatesAndTransitionsResponse {

	// All states of the workflow, in order.
	repeated StateBasic states = 1;

	// The transitions out of `current_state`; empty if it is unset.
	repeated StateTransitionBasic transitions = 2;
}

// A structure that specifies check in external changes request.
message CheckInExternalChangesRequest {

	// An array of ObjIDs.
	repeated ObjID obj_ids = 1;
}

message CheckInExternalChangesResponse {

	// Array contains object information for latest checked in version after operation. New object version is not created, if no changes are detected.
	repeated ObjectVersionEx updated_objects = 1;

	// Array contains object results for the checked in objects after the operation.
	repeated ExtObjectInfo object_results = 2;
}

// The request of GetPropertyValueWithMetadata.
message GetPropertyValueWithMetadataRequest {

	// The object version.
	ObjVer obj_ver = 1;

	// The property to add metadata to.
	int32 property_def = 2;
}

// The response of GetPropertyValueWithMetadata.
message GetPropertyValueWithMetadataResponse {

	// Receives the property value with metadata.
	PropertyValueWithMetadata prop_val_with_metadata = 1;
}

// The request of GetObjectInfoAndPropertiesWithMetadata.
message GetObjectInfoAndPropertiesWithMetadataRequest {

	// The object ID.
	ObjID obj_id = 1;

	// True to get the latest version. False to get the version specified by lDocVersion.
	bool latest_version = 2;

	// True if a checked-out document version can be returned if the document is currently checked out to this user. Ignored if bLatestVersion is false. Note that even if this parameter is true, the method never returns a version that is checked out to some other user.
	bool allow_checked_out = 3;

	// The ID of the DocumentVersion. Ignored if bLatestVersion is true.
	ObjVerVersion doc_version = 4;
}

// The response of GetObjectInfoAndPropertiesWithMetadata.
message GetObjectInfoAndPropertiesWithMetadataResponse {

	// Receives the object version data (when found and visible). Note that when requesting the latest version, its ID parts (document ID and version ID) are always returned whenever the latest version exists although it's not visible to the user.
	ObjectVersionEx object_info = 1;

	// Receives the object version properties (when found and visible).
	repeated PropertyValueWithMetadata property_array = 2;
}

// A structure that specifies add or update external object request.
message AddOrUpdateExternalObjectRequest {

	// The external ID of the object to update or create.
	string ext_id = 1;

	// The object ID of the object to update. Object type is required. Use id -1 if unknown, then extid is used.
	ObjID obj_id = 2;

	// Properties of the new object.
	repeated PropertyValue properties = 3;

	// True to delete the object identified by `ext_id` or `obj_id` instead of adding or updating it. The deletion is not sent back to the external system, where the change came from.
	bool deleted = 4;
}

// A structure that specifies add or update external object response.
message AddOrUpdateExternalObjectResponse {

	// The information, properties, and ACL of the latest version of the object after the operation.
	ObjectVersionExWP object_info = 1;
}

// The request of SetPropertiesWithMetadata.
message SetPropertiesWithMetadataRequest {

	// The electronic signature that might be required by a workflow state transition operation.
	SESSIONID signature = 1;

	// The object version to set the properties of. (represented by ObjVer struct.)
	ObjVer obj_ver = 2;

	// If true, modifying a checked-in document is possible. The server automatically checks out, modifies and checks in the document.
	bool allow_modifying_checked_in_object = 3;

	// If true, object can be set to have missing required parameters.
	bool allow_missing_required_properties = 12;

	// If bAllowModifyingCheckedInDoc is true, this parameter defines if the method should fail if there already is a checked-in version that is newer than lDocVersion.
	bool fail_if_newer_version_exists = 4;

	// If not GUID_NULL, specifies the ObjVersionGUID of the version to set the properties of. The server will use this GUID for additional checks if bFailIfNotLatestCheckedInVersion is true.
	string version_guid = 5;

	// The properties to add/replace.
	repeated PropertyValueWithMetadata properties = 6;

	// True if ppropvalSet contains the full set of properties. Other existing properties will be removed.
	bool remove_unspecified_properties = 7;

	// The properties to remove (property definition IDs).
	repeated int32 remove = 8;

	// Flags that control this operation.
	OBJECTOPFLAGS object_flags = 9;

	// ACL enforcing mode.
	ACLEnforcingMode acl_mode = 10;

	// The provided ACL. Can be unset.
	AccessControlList acl = 11;
}

// The response of SetPropertiesWithMetadata.
message SetPropertiesWithMetadataResponse {

	// Receives the object version data (when found and visible). Note that when requesting the latest version, its ID parts (document ID and version ID) are always returned whenever the latest version exists although it's not visible to the user.
	ObjectVersionEx object_info = 1;

	// Receives the object version properties (when found and visible).
	repeated PropertyValueWithMetadata property_array = 2;
}

// The request of SetPropertyValueMetadata.
message SetPropertyValueMetadataRequest {

	// The object version to set the properties of. (represented by ObjVer struct.)
	ObjVer obj_ver = 1;

	// The properties to add/replace.
	repeated PropertyValueWithMetadata property = 2;
}

// The response of SetPropertyValueMetadata.
message SetPropertyValueMetadataResponse {

	// Receives the object version data (when found and visible). Note that when requesting the latest version, its ID parts (document ID and version ID) are always returned whenever the latest version exists although it's not visible to the user.
	ObjectVersionEx object_info = 1;

	// Receives the object version properties (when found and visible).
	repeated PropertyValueWithMetadata property_array = 2;
}

// A request structure for SetTier RPC call. It contains all request data.
message SetTierRequest {

	// Objects to set the tier for.
	repeated ObjID objects = 1;

	// True to force undo checkout for checked out objects.
	bool force_undo_checkout = 2;

	// True if objects can be skipped (e.g. when preconditions aren't met).
	bool can_skip = 3;

	// The storage tier to set.
	StorageTier storage_tier = 4;

	// True if the response should contain result data.
	bool output_result_data = 5;
}

// A response structure for SetTier RPC call. It contains all response data.
message SetTierResponse {

	// Objects that failed (tier couldn't be set).
	repeated ObjectOperationStatus failed = 1;

	// Resulting object information if requested.
	repeated ExtObjectInfo results = 2;
}

// The request of DownloadTempFileFromUpload_Begin.
message DownloadTempFileFromUpload_BeginRequest {

	// The ID of a committed upload. 0 if `file_ref` is set.
	int32 upload_id = 1;

	// `FILE_FORMAT_NATIVE` (default) or `FILE_FORMAT_PDF`.
	FileFormat file_format = 2;

	// The `file_ref` of an upload completed with `FileUploadEnd`, instead of `upload_id`. Set exactly one of the two.
	string file_ref = 3;

	// The file name extension, without the dot. Used only with `file_ref`.
	string extension = 4;
}

// The response of DownloadTempFileFromUpload_Begin.
message DownloadTempFileFromUpload_BeginResponse {

	// The download session for `DownloadFile_ReadBlock`.
	int32 download_id = 1;

	// The size of the content to download, in bytes.
	int64 file_size = 2;

	// The extension of the content to download; empty if the upload has none.
	string file_extension = 3;
}

// The request of GetFileMalwareInfo.
message GetFileMalwareInfoRequest {

	// The file to check,. Only pwszMasterStorageFileRef is read.
	File file = 1;
}

// The response of GetFileMalwareInfo.
message GetFileMalwareInfoResponse {

	// Malware verdict. Empty description = clean / no info available.
	FileMalwareInfo malware_info = 1;
}

// The request of KeepUploadSessionAlive.
message KeepUploadSessionAliveRequest {

	// The upload session ID to keep alive.
	int32 upload_id = 1;
}

// The response of KeepUploadSessionAlive.
message KeepUploadSessionAliveResponse {
}

// A request structure for GetObjectsByExternalIds RPC call. It contains all request data.
message GetObjectsByExternalIdsRequest {

	// The external IDs to look up. Duplicates are ignored.
	repeated string external_ids = 1;

	// The object type of the objects.
	int32 object_type_id = 2;
}

// A response structure for GetObjectsByExternalIds RPC call. It contains all response data.
message GetObjectsByExternalIdsResponse {

	// The matching objects the caller can read.
	repeated ObjVer obj_vers = 1;
}

// The request of AddObjectWithFiles.
message AddObjectWithFilesRequest {

	// The object type of the new object: 0 for documents, or the ID of another object type from [GetObjectTypes](mfiles:MFiles.IRPCObjectTypes.GetObjectTypes).
	int32 object_type_id = 1;

	// Property values of the new object. Include Class (100), the name property (usually Name or title, 0), Single file (22) for types that can have files, and the properties the class requires. Values need no `value_metadata` here.
	repeated PropertyValue properties = 2;

	// The permissions of the new object. If unset, the object gets an empty ACL and becomes invisible to its creator after check-in. Send a named ACL's `acl_for_objects`, or a link to a named ACL in `custom_component`.
	AccessControlList acl = 3;

	// Optional extra checks; for example `require_read_access_after_operation` makes the call fail if the caller could not see the object afterwards.
	OBJECTOPFLAGS options = 4;

	// True to check the new object in. False leaves it checked out to the caller, visible only to the caller until checked in; [UndoCheckout](mfiles:MFiles.IRPCObjectOperations.UndoCheckout) then discards the whole object.
	bool check_in = 5;

	// Where the files of the new object come from. Unset for an object without files.
	ObjFileSource files = 6;

	// True to create the object checked out and flagged as a draft whose file content is uploaded later (used with `OBJ_FILE_SOURCE_TYPE_EMPTY_FILES`). Leave `check_in` false; clear the flag with [SetObjectActive](mfiles:MFiles.IRPCObjectOperations.SetObjectActive).
	bool draft = 7;
}

// The response of AddObjectWithFiles.
message AddObjectWithFilesResponse {

	// True if the caller could see the new object before check-in. It does not guarantee that `created_object` is complete; see the remarks.
	bool is_visible_to_user = 1;

	// The new object version with its properties and ACL. If the checked-in object is not visible to the caller, only its ID and version number are set.
	ObjectVersionExWP created_object = 2;

	// Information about objects that were also updated during the operation.
	repeated ObjectVersionEx updated_objects = 3;
}

// A request structure for the SetObjectActive RPC call. It contains all request data.
// Identifies the draft object whose draft (pending-upload) flag is cleared.
message SetObjectActiveRequest {

	// The draft object version to make active.
	ObjVer obj_ver = 1;
}

// The response of SetObjectActive.
message SetObjectActiveResponse {

	// The object after clearing the draft flag (still checked out), with its properties and ACL.
	ObjectVersionExWP updated_object = 1;
}

// A request structure for the CreateNewObjectWithPropertyMetadata RPC call. Creates a new
// object in a single call, storing the property-related metadata (metametadata) carried
// alongside each property value in addition to the value itself.
message CreateNewObjectWithPropertyMetadataRequest {

	// The object type of the new object.
	int32 object_type_id = 1;

	// Property values of the new object, each with `value_metadata` (required, with a numeric `confidence`).
	repeated PropertyValueWithMetadata properties_with_metadata = 2;

	// The permissions of the new object. Unset gives an empty ACL; see [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles).
	AccessControlList acl = 3;

	// Flags that control this operation.
	OBJECTOPFLAGS options = 4;

	// If true, the object is checked in immediately, otherwise the object is left checked out.
	bool check_in = 5;

	// If true, the object can be created with missing required properties.
	bool allow_missing_required_properties = 6;
}

// A response structure for the CreateNewObjectWithPropertyMetadata RPC call.
message CreateNewObjectWithPropertyMetadataResponse {

	// True if the latest version of the object is visible after the operation.
	bool is_visible_to_user = 1;

	// If set (i.e. isVisibleToUser is true), the information, properties, and ACL of the latest version of the object after the operation.
	ObjectVersionExWP created_object = 2;
}

// A request structure for the AddObjectWithFilesWithPropertyMetadata RPC call. Identical to
// AddObjectWithFilesRequest except that properties carry per-value metadata (metametadata),
// which is stored as OVPV_META rows alongside the object.
message AddObjectWithFilesWithPropertyMetadataRequest {

	// The object type of the new object.
	int32 object_type_id = 1;

	// Property values of the new object, each with `value_metadata` (required, with a numeric `confidence`).
	repeated PropertyValueWithMetadata properties_with_metadata = 2;

	// The permissions of the new object. Unset gives an empty ACL; see [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles).
	AccessControlList acl = 3;

	// Flags that control this operation.
	OBJECTOPFLAGS options = 4;

	// If true, the object is checked in immediately, otherwise the object is left checked out.
	bool check_in = 5;

	// File source.
	ObjFileSource files = 6;

	// If true, the object is created checked out and flagged as a draft, allowing its file content to be uploaded later. Default false.
	bool draft = 7;
}

// A response structure for the AddObjectWithFilesWithPropertyMetadata RPC call. Same shape as
// AddObjectWithFilesResponse.
message AddObjectWithFilesWithPropertyMetadataResponse {

	// True if the latest version of the object is visible after the operation.
	bool is_visible_to_user = 1;

	// If set (i.e. isVisibleToUser is true), the information, properties, and ACL of the latest version of the object after the operation.
	ObjectVersionExWP created_object = 2;

	// Information about objects that were also updated during the operation.
	repeated ObjectVersionEx updated_objects = 3;
}

// The request of DestroyObjectVersionsByConditions: the object and the conditions a version must
// match to be destroyed. The conditions only select candidates: the newest version, and for a
// checked-out object the checked-out version and the latest checked-in version, are always kept.
message DestroyObjectVersionsByConditionsRequest {

	// The object whose versions are destroyed.
	ObjID obj_id = 1;

	// The conditions a version must match to be destroyed. Must not be empty.
	repeated SearchCondition conditions = 2;

	// The most versions this call destroys. Zero or less means no limit, so set a limit deliberately.
	int32 max_versions_to_destroy = 3;
}

// The response of DestroyObjectVersionsByConditions: the number of versions destroyed, and whether
// more matching versions remain.
message DestroyObjectVersionsByConditionsResponse {

	// The number of versions destroyed by this call.
	int32 destroyed_version_count = 1;

	// True if more matching versions remained; call again to continue.
	bool more_versions_remain = 2;
}

// The request of CountObjectVersionsMatchingConditions. It has the same fields as
// DestroyObjectVersionsByConditionsRequest.
message CountObjectVersionsMatchingConditionsRequest {

	// The object whose versions are counted.
	ObjID obj_id = 1;

	// The conditions a version must match to be destroyed. Must not be empty.
	repeated SearchCondition conditions = 2;
}

// The response of CountObjectVersionsMatchingConditions: the number of versions that
// DestroyObjectVersionsByConditions would destroy with the same inputs. Nothing is destroyed.
message CountObjectVersionsMatchingConditionsResponse {

	// The number of versions that would be destroyed.
	int32 matching_version_count = 1;
}

// The request of SetPropertiesWithMetadataAttributedTo.
message SetPropertiesWithMetadataAttributedToRequest {

	// The object version for which the properties belong to.
	ObjVer object_version = 1;

	// Whether to allow modifying a checked-in object (automatic checkout and checkin).
	bool allow_modifying_checked_in_object = 2;

	// Whether to allow missing required properties on the set.
	bool allow_missing_required_properties = 3;

	// The property values with metadata to set.
	repeated PropertyValueWithMetadata property_values = 4;

	// Built-in agent user ID to attribute the change to, or 0 for no attribution.
	int32 attributed_to_user_id = 5;
}

// The response of SetPropertiesWithMetadataAttributedTo.
message SetPropertiesWithMetadataAttributedToResponse {

	// The object version and properties (with metadata) after the operation.
	ObjectVersionExWPWithMetadata object_version = 1;
}

// The request of GetTextContentForFileWithFormat: the file version and the requested text format.
message GetTextContentForFileWithFormatRequest {

	// The object and the specific file version.
	ObjFileVer obj_file_ver = 1;

	// Extraction flags. Leave unset for a fresh extraction.
	TEXTCONTENTEXTRACTIONFLAGS option_flags = 2;

	// `FILE_FORMAT_MARKDOWN` or `FILE_FORMAT_PLAIN_TEXT`.
	FileFormat requested_format = 3;
}

// The response of GetTextContentForFileWithFormat: the text and the format it was produced in.
message GetTextContentForFileWithFormatResponse {

	// The text, in the format given in `format_produced`.
	string text_content = 1;

	// The format of `text_content`.
	FileFormat format_produced = 2;
}

// The request of GetComparisonUrlOfUploadedFile.
message GetComparisonUrlOfUploadedFileRequest {

	// The object and file version to compare.
	ObjFileVer obj_file_ver_original = 1;

	// The file_ref of a stateless upload ended with FileUploadEnd, to compare with.
	string file_ref = 2;

	// The file name of the uploaded file to display in the compare UI. Must include the extension, as a file_ref has no file name.
	string file_name = 3;

	// The language to use for localization of the compare UI.
	string language = 4;

	// True if the download options should be enabled in the compare UI, false otherwise.
	bool allow_download = 5;
}

// The response of GetComparisonUrlOfUploadedFile.
message GetComparisonUrlOfUploadedFileResponse {

	// The document comparison URL.
	string compare_url = 1;
}
