// 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/enums.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_";

// Access control entry.
message AccessControlEntry {

	// Subject.
	AccessControlSubject subject = 1;

	// ACL data.
	uint32 data = 2;
}

// Access control list.
message AccessControlList {

	// Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist.
	int32 checked_out_to_user = 1;

	// Specifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version.
	bool is_fully_authoritative = 2;

	// Accesses the custom component of this ACL.
	AccessControlListComponent custom_component = 3;

	// Accesses the restrictive automatic components of this ACL.
	repeated AccessControlListComponentMapEntry restrictive_components = 4;

	// Secondary ACL used for latest version ACL. Not used for access check if null.
	AccessControlList secondary_access_control_list = 5;

	// Accesses the additive automatic components of this ACL.
	repeated AccessControlListComponentMapEntry additive_components = 6;
}

// Access control list component.
message AccessControlListComponent {

	// Specifies the named ACL link of this component.
	int32 named_acl_id = 1;

	// True if the component links to a named ACL (`named_acl_id`).
	bool has_named_acl = 2;

	// Specifies the current user binding of this component.
	int32 current_user_id = 3;

	// True if the component has an access control entry for the current user.
	bool has_current_user = 4;

	// The access control entry datas. The data belongs to the key in the corresponding index.
	repeated AccessControlEntry permissions = 5;

	// Overridability permission data of this ACL component.
	repeated AccessControlEntry overridability_permissions = 6;

	// Modification status of this component.
	ACCESSCONTROLLISTCOMPONENTSTATUSFLAGS status = 7;
}

// Each automatic access control list component originates from a property value
// of the object. Only value list based property values may introduce access
// control list components.
//
// These components are identified by the value list item that is the source of the
// component and the property definition in which the value list item is set.
message AccessControlListComponentKey {

	// The ID of the property that is the source of this ACL component.
	int32 property_def = 1;

	// The ID of the value list item that is the source of this ACL component.
	int32 item_id = 2;
}

// Access control list component container.
message AccessControlListComponentMapEntry {

	// Access control list component.
	AccessControlListComponentKey key = 1;

	// Access control list component.
	AccessControlListComponent component = 2;
}

// Subject data for pseudo user subjects.
message AccessControlPseudoUserSubject {

	// Indirect ID definition.
	IndirectPropertyID definition = 1;

	// Specifies the pseudo user resolution mode.
	PseudoUserResolutionMode resolution_mode = 2;

	// Concrete subject or null if one hasn't been resolved.
	AccessControlSubject concrete_subject = 3;
}

// Access control subject.
message AccessControlSubject {

	// Subject type.
	AccessControlSubjectType type = 1;

	// Subject data.
	AccessControlSubjectUnion data = 2;
}

// Union for ACL subject data depending on the subject type.
message AccessControlSubjectUnion {

	oneof data {

		// User ID.
		int32 user = 1;

		// Group ID.
		int32 user_group = 2;

		AccessControlPseudoUserSubject pseudo_user = 3;
	}
}

// ACL with names.
message ACLWithNames {

	// Access control list.
	AccessControlList acl = 1;

	// The key-name pairs that correspond the users and user groups of the ACL. Positive IDs correspond to user names while negative IDs correspond to user group names.
	repeated KeyNamePair subject_names = 2;
}

// The properties of a Convert to PDF action in a workflow state.
message ActionConvertToPDF {

	// True if the resulting PDF file should comply with archiving standards. Currently this results in PDFS using the PDF/A-1b standard.
	bool use_pdf_archiving_standard = 1;

	// 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 store_as_separate_file = 2;

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

	// 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_source_files = 4;
}

// The properties of a Send Notification action in a workflow state.
message ActionSendNotification {

	// The subject text for the notification.
	string subject = 1;

	// The message text for the notification.
	string message = 2;

	// The recipients.
	repeated UserOrUserGroupIDEx recipients = 3;
}

// Action: Set/Change ACL.
message ActionSetACL {

	// An ACL for the action. This is set to the object-specific (custom) component.
	AccessControlList acl = 1;

	// True to discard (mark deleted) possible automatic permissions of the object. If false, automatic permissions are left intact.
	bool discard_automatic_acls = 2;
}

// The properties of a Set Assignment action in a workflow state.
message ActionSetAssignment {

	// The Assigned To users.
	repeated UserOrUserGroupIDEx assigned_to_users = 1;

	// The title of the assignment.
	string title = 2;

	// The description of the assignment.
	string description = 3;

	// The Monitored By users.
	repeated UserOrUserGroupIDEx monitored_by_users = 4;

	// Deadline specified?
	bool has_deadline = 5;

	// The number of days to the deadline.
	uint32 deadline_in_days = 6;

	// Class id.
	int32 object_class = 7;
}

// The properties of a Set Assignment action in a workflow state.
message ActionSetProperties {

	// Properties.
	repeated DefaultProperty properties = 1;
}

// Struct for AddIn Settings information.
message AddInSettings {

	// The list of allowed HTTP Methods.
	repeated string allowed_methods = 1;

	// The list of allowed Cross Frame Sites.
	repeated string allowed_cross_frame_sites = 2;

	// The list of allowed HTTP Response Headers.
	repeated string allowed_headers = 3;

	// The list of Cross Origin Access Domains.
	repeated string cross_origin_access = 4;

	// True to allow the credentials, false to skip credentials.
	bool allow_credentials = 5;

	// True to Prevent XFS, false to allow XFS.
	bool prevent_xfs = 6;
}

// Struct for AddIn Settings Of Vault.
message AddInSettingsOfVault {

	// The GUID of Vault.
	string vault = 1;

	// The domain names.
	repeated string vault_domain_names = 2;

	// The settings.
	AddInSettings settings = 3;
}

// Additional folder.
message AdditionalFolder {

	// Path (e.g. "\\servername\sharename\folder").
	string path = 1;

	// Data limit in megabytes or zero if no limit.
	uint32 limit_in_mb = 2;

	// Impersonation information for accessing the folder.
	Impersonation impersonation = 3;
}

// Active Directory Service Interface Object.
message ADSIObject {

	// The name of the object.
	string name = 1;

	// The display name of the object.
	string display_name = 2;

	// The name of the object's schema class.
	string schema_class = 3;

	// The GUID of the object as stored in the underlying directory store.
	string guid = 4;

	// The object's ADsPath that uniquely identifies this object from all others.
	string path = 5;

	// The ADsPath string for the parent of the object.
	string parent_path = 6;
}

// Anonymous authentication settings.
message AnonymousAuthenticationSettings {

	// Boolean indicating whether anonymous authentication should be enabled or disabled.
	bool anonymous_authentication_enabled = 1;
}

// Anonymous login settings.
message AnonymousLoginSettings {

	// True if anonymous login is allowed.
	bool anonymous_login_allowed = 1;
}

// ApplicationBroadcastMessage class
message ApplicationBroadcastMessage {

	// ID of the task queue where this message belongs to.
	string queue_id = 1;

	// ID of this broadcast message.
	string broadcast_message_id = 2;

	// Defines the type of this message.
	string broadcast_type = 3;

	// Any type specific message payload data.
	bytes broadcast_data = 4;
}

// ApplicationTaskInfo class
message ApplicationTaskInfo {

	// ID of the task queue this task belongs to.
	string queue_id = 1;

	// ID of this task.
	string task_id = 2;

	// Current state of this task.
	ApplicationTaskState state = 3;

	// Current task specific progress amount.
	string progress = 4;

	// Defines the task type.
	string task_type = 5;

	// Any type specific task payload data.
	bytes task_data = 6;

	// The earliest time this task can be reserved for processing.
	google.protobuf.Timestamp activation_timestamp = 7;

	// The last modified timestamp.
	google.protobuf.Timestamp latest_activity_timestamp = 8;
}

// Struct for a job of archiving whole documents.
message ArchiveDocsJob {

	// Full path to the target file on server.
	string target_path = 1;

	// Impersonation information for accessing the archive target files on server.
	Impersonation impersonation = 2;

	// Bit flags that control the execution of this archiving job.
	OBJARCHIVINGFLAGS options = 3;

	// The conditions that limit the object set of this archiving job.
	SearchConditionArray object_filter = 4;

	// If indicated by OBJARCHIVINGFLAG_DELTA, only changes newer than this timestamp are archived. In UTC.
	google.protobuf.Timestamp last_run_timestamp_utc = 5;

	// The metadata structure items which will be exported.
	repeated ExportStructureItem structure_items = 6;

	// Full path to the target file on server.
	string cloud_storage_connection_string = 7;

	// Full path to the target file on server.
	string cloud_storage_password = 8;

	// Configuration id of this archiving job.
	string configuration_id = 9;
}

// Struct for the output info of a job of archiving whole documents.
message ArchiveDocsJobOutputInfo {

	// The number of archived documents.
	uint32 objects = 1;

	// The amount of archived bytes.
	int64 bytes = 2;
}

// Struct for a job of archiving old versions of documents.
message ArchiveOldVersionsJob {

	// Condition: Document is marked for archiving. False = condition not effective.
	bool must_be_marked_for_archiving = 1;

	// If bCheckedInBefore is true, specifies the condition parameter.
	google.protobuf.Timestamp must_be_checked_in_before_utc = 2;

	// Condition: At least N versions older than the current version. False = condition not effective.
	bool has_must_be_at_least_nversions_older = 3;

	// If bAtLeastNVersionsOlder is true, specifies the condition parameter.
	int32 must_be_at_least_nversions_older = 4;

	// Condition: At least N days older than the current version. False = condition not effective.
	bool has_must_be_at_least_ndays_older = 5;

	// If bAtLeastNDaysOlder is true, specifies the condition parameter.
	int32 must_be_at_least_ndays_older = 6;

	// Condition: Has no version tag. False = condition not effective.
	bool must_not_have_version_tag = 7;

	// Full path to the target file on server.
	string target_file = 8;

	// Impersonation information for accessing the archive target files on server.
	Impersonation impersonation = 9;

	// Bit flags that control the execution of this archiving job. Note: Currently only OBJARCHIVINGFLAG_OVERWRITEEXISTINGFILES, OBJARCHIVINGFLAG_DESTROYAFTERWARDS, and OBJARCHIVINGFLAG_RESETMFA are supported.
	OBJARCHIVINGFLAGS options = 10;
}

// Struct for the output info of a job of archiving old versions of documents.
message ArchiveOldVersionsJobOutputInfo {

	// The number of affected documents.
	uint32 objects = 1;

	// The number of archived document versions.
	uint32 object_versions = 2;

	// The amount of archived bytes.
	int64 bytes = 3;
}

// Class info for assignment classes.
message AssignmentClassInfo {

	// Task assignment features.
	AssignmentClassType type = 1;

	// If true, the assignment gets completed when the first assignee completes it. If false the assignment is not complete until all assignees have completed.
	bool can_any_assignee_complete_task = 2;

	// Approval assignment features.
	ElectronicSignatureSettings signature_settings_for_task_completion = 3;

	// If true, the assignment gets completed when the first assignee approves it. If false the assignment is not complete until all assignees have approved.
	bool any_assignee_approves = 4;

	// The electronic signature settings for signature that is required for completing the assignment.
	ElectronicSignatureSettings signature_settings_for_approval = 5;

	// The electronic signature settings for signature that is required for completing the assignment.
	ElectronicSignatureSettings signature_settings_for_rejetion = 6;
}

// A PropertyDef that is associated with a class.
message AssociatedPropertyDef {

	// The ID of the property definition.
	int32 property_def = 1;

	// True if objects of the class must have a value for this property.
	bool is_required = 2;
}

// Struct for an asynchronous task.
message AsyncTask {

	// Task ID.
	int64 id = 1;

	// Task type name.
	string type = 2;

	// The display string of the task definition.
	string definition = 3;

	// True if the task is currently running.
	bool is_running = 4;

	// The last time the task ran started. Zero to indicate that the task has never run (or is still running for the first time).
	google.protobuf.Timestamp last_run_started_utc = 5;

	// The last time the task ran ended. Zero to indicate that the task has never run (or is still running for the first time).
	google.protobuf.Timestamp last_run_ended_utc = 6;

	// True if the last run was successful, false otherwise.
	bool last_run_succeeded = 7;

	// Error string from the last run (if any).
	string last_run_errors = 8;

	// True if the task is canceled.
	bool canceled = 9;

	// The progress info string of the task.
	string progress_info = 10;

	// The output info string of the task.
	string output_info = 11;
}

// Struct for an asynchronous task ID.
message AsyncTaskID {

	// Task ID.
	int64 id = 1;

	// Task type name.
	string type = 2;

	// The display string of the task definition.
	string definition = 3;
}

// Options used when attaching, restoring, or copying a vault.
message AttachVaultOptions {

	// Which vault's external data connection points must be put disabled?
	ExternalConnectionOptions disable = 1;

	// Specify true if the attachment GUID should be updated. Usually, it is desirable to update the attachment GUID each time the vault is re-attached.
	bool update_attachment_guid = 2;

	// A flag that controls if attaching the vault must fail if its online operations do not start successfully. Typically this is false meaning that starting online operations can fail although attaching the vault succeeds.
	bool fail_attach_if_bring_online_fails = 3;

	// A flag that controls if file data encryption should be turned on in the vault when it is attached.
	bool enforce_file_data_encryption = 4;

	// A flag that controls if the local indexes such as dtSearch are disabled when the vault is attached.
	bool disable_local_indexes = 5;

	// If true the temporary processing location of cloud replication jobs are cleared and other replication jobs are disabled.
	bool allow_only_vault_temp_path_for_content_replication = 6;

	// If true vault's external data connection points are ignored when vault is already in msm cluster.
	bool ignore_vault_external_data_connection_points = 7;
}

// The client's authentication data in a [LogIn](mfiles:MFiles.IRPCLogin.LogIn) call: the method in
// `type` and its data in the matching member of `data`.
message AuthDataClient {

	// The authentication method. Must match the member set in `data`; unset fails with `E_INVALIDARG`. For user name and password use `AUTH_DATA_TYPE_CREDENTIALS`.
	AuthDataType type = 1;

	// The method's data. Set exactly the member that `type` names.
	AuthDataClientUnion data = 2;

	// Leave empty. Used only when the server requires client certificates.
	string certificate_proof = 3;

	// Leave false. Set only by M-Files proxies that validate client certificates themselves.
	bool is_certificate_validated = 4;
}

// The method-specific part of `AuthDataClient`. Set the member that `AuthDataClient.type` names.
message AuthDataClientUnion {

	oneof data {

		// First call of the two-step M-Files challenge login (`AUTH_DATA_TYPE_MFILES_LEG1`).
		AuthDataClientUnion.MFilesLeg1Data mfiles_leg1 = 1;

		// Second call of the two-step M-Files challenge login (`AUTH_DATA_TYPE_MFILES_LEG2`).
		AuthDataClientUnion.MFilesLeg2Data mfiles_leg2 = 2;

		// Windows authentication tokens (`AUTH_DATA_TYPE_WINDOWS`), possibly over several calls.
		AuthDataClientUnion.WindowsData windows = 3;

		// Authentication through a plug-in such as single sign-on (`AUTH_DATA_TYPE_PLUGIN`).
		AuthDataClientUnion.PluginData plugin = 4;

		// User name and password (`AUTH_DATA_TYPE_CREDENTIALS`). Completes in one call.
		Credentials credentials = 5;

		// Anonymous login (`AUTH_DATA_TYPE_ANONYMOUS`), when the vault allows it. Has no data.
		AuthDataClientUnion.AnonymousData anonymous = 6;
	}

	// Not used by any authentication method; never set it.
	message UndefinedClientData {
	}

	// First step of the M-Files challenge login: names the account and asks for a challenge.
	message MFilesLeg1Data {

		// M-Files user name.
		string user_name = 1;
	}

	// Second step of the M-Files challenge login: answers the challenge from the first step.
	message MFilesLeg2Data {

		// The identifier returned by the first step, unchanged.
		AuthenticationAttemptIdentifier authentication_attempt_identifier = 1;

		// The answer to the challenge from `AuthDataServerUnion.MFilesLeg1Data`.
		bytes response = 2;
	}

	// One step of a Windows (SSPI) authentication exchange.
	message WindowsData {

		// Unset in the first call; in later calls, the identifier from the previous response.
		AuthenticationAttemptIdentifier authentication_attempt_identifier = 1;

		// Opaque Windows authentication data.
		bytes auth_data = 2;
	}

	// Authentication through a server plug-in, for example single sign-on with an identity provider.
	//
	// Take `plugin_name` and `configuration_scope` from the `PluginInfo` that
	// [GetAuthenticationConfiguration](mfiles:MFiles.IRPCLogin.GetAuthenticationConfiguration)
	// returned. A missing `configuration_scope` fails with `E_INVALIDARG`. What `auth_data` must contain
	// depends on the plug-in.
	message PluginData {

		// Unset in the first call; in later calls, the identifier from the previous response.
		AuthenticationAttemptIdentifier authentication_attempt_identifier = 1;

		// The `name` of the plug-in configuration from `PluginInfo`.
		string plugin_name = 2;

		// The `Scope` value from `PluginInfo.system_configuration`. Required.
		string configuration_scope = 3;

		// The vault that stores the plug-in configuration (`VaultGUID` in `PluginInfo.system_configuration`), if any.
		string vault_guid = 6;

		// `PLUGIN_AUTH_DATA_FORMAT_UNENCRYPTED` (the default) or `PLUGIN_AUTH_DATA_FORMAT_RSA2048`. `PLUGIN_AUTH_DATA_FORMAT_RSA512` is refused.
		PluginAuthDataFormat data_format = 4;

		// The plug-in's input as named values, for example the token from the identity provider. Non-empty values are encrypted when `data_format` says so.
		repeated NamedValue auth_data = 5;
	}

	// Anonymous login. Has no data.
	message AnonymousData {
	}
}

// The server's part of an authentication exchange, returned by
// [LogIn](mfiles:MFiles.IRPCLogin.LogIn).
message AuthDataServer {

	// The authentication method, as in the request.
	AuthDataType type = 1;

	// Method-specific reply: a challenge, a token to pass on, or nothing.
	AuthDataServerUnion data = 2;

	// Identifies this login attempt. In multi-step methods, send it back in the next call, in the `authentication_attempt_identifier` field of the request's union member. Ignore it for `AUTH_DATA_TYPE_CREDENTIALS`.
	AuthenticationAttemptIdentifier authentication_attempt_identifier = 3;
}

// The method-specific part of `AuthDataServer`; the member matches `AuthDataServer.type`.
message AuthDataServerUnion {

	oneof data {

		// The challenge, hash algorithm and salt of the M-Files challenge login.
		AuthDataServerUnion.MFilesLeg1Data mfiles_leg1 = 1;

		// Reply to the second step of the M-Files challenge login; has no data.
		AuthDataServerUnion.MFilesLeg2Data mfiles_leg2 = 2;

		// The next Windows authentication token and whether the exchange is complete.
		AuthDataServerUnion.WindowsData windows = 3;

		// The plug-in's output and whether it has finished.
		AuthDataServerUnion.PluginData plugin = 4;

		// Reply to a user name and password login; has no data.
		AuthDataServerUnion.CredentialsData credentials = 5;

		// Reply to an anonymous login; has no data.
		AuthDataServerUnion.AnonymousData anonymous = 6;
	}

	// Not used by any authentication method; the server never returns it.
	message UndefinedServerData {
	}

	// The challenge of the M-Files challenge login, answered with
	// `AuthDataClientUnion.MFilesLeg2Data`.
	message MFilesLeg1Data {

		// The challenge to answer in the second step.
		bytes challenge = 1;

		// The algorithm the account's password is stored with.
		PasswordHashAlgorithm password_hash_algorithm = 2;

		// The salt for hashing the password with `password_hash_algorithm`.
		string password_salt = 3;
	}

	// Reply to the second step of the M-Files challenge login. Has no data.
	message MFilesLeg2Data {
	}

	// One step of a Windows (SSPI) authentication exchange.
	message WindowsData {

		// Opaque Windows authentication data.
		bytes auth_data = 1;

		// True when the login process has been completed.
		bool is_done = 2;
	}

	// The plug-in's reply in a plug-in login.
	message PluginData {

		// The plug-in's output as named values, to process before the next call.
		repeated NamedValue auth_data = 1;

		// True when the plug-in has finished authenticating.
		bool is_done = 2;
	}

	// Reply to a user name and password login. Has no data.
	message CredentialsData {
	}

	// Reply to an anonymous login. Has no data.
	message AnonymousData {
	}
}

// Identifies one login attempt that spans several [LogIn](mfiles:MFiles.IRPCLogin.LogIn) calls.
// Copy it from the response to the next request unchanged.
message AuthenticationAttemptIdentifier {

	// Short identifier, used when the client does not set `ClientCapabilities.long_authentication_attempt_identifier`.
	uint32 legacy_data = 1;

	// 32-byte identifier, used when the client sets `ClientCapabilities.long_authentication_attempt_identifier`; otherwise all zeros.
	bytes data = 2;
}

// Structure containing information about an authentication configuration to be migrated.
message AuthenticationConfigurationMigration {

	// Scope of the configuration.
	string scope = 1;

	// Name of the original configuration.
	string original_name = 2;

	// Configuration in migrated form.
	string migrated_configuration = 3;

	// Is the original configuration for Entra ID with technical credential settings included.
	bool entra_id_tech_cred = 4;
}

// The definition of an automatic value.
message AutomaticMetadataRequest {

	// The upload session IDs associated with the metadata request. If the metadata request is pointed for existing object, the existing files are used instead.
	repeated int32 upload_ids = 1;

	// The object type of object that is about to be created.
	int32 object_type_id = 2;

	// The object version if the automatic metadata request is pointed for existing object.
	ObjVer obj_ver = 3;

	// The property values of the object.
	repeated PropertyValue properties = 4;

	// List of requested metadata providers. Empty if all metadata providers are applied.
	repeated string services = 5;

	// The custom data for metadata providers.
	string custom_data = 6;

	// Files of stateless uploads (fileRef, title and extension) used like the upload session IDs. Only uploaded files with a file_ref are accepted.
	repeated UploadedFile uploaded_files = 7;
}

// The definition of an automatic value.
message AutomaticMetadataResult {

	// Property value suggestions.
	repeated PropertyValueSuggestion property_value_suggestions = 1;
}

// A struct that describes the automatic permissions for objects specification of a value list item or an object.
message AutomaticPermissions {

	// The automatic permissions for an object for which the user selects this item.
	NamedACL permissions = 1;

	// True if these automatic permissions are not private i.e. they are not directly specified for (owned by) this item but they come from somewhere else, e.g. from the default/common automatic permissions of the object type.
	bool is_default = 2;

	// If true the object/item's own permissions are used as its automatic permissions.
	bool use_object_permissions = 3;
}

// The definition of an automatic value.
message AutomaticValue {

	// Simple automatic numbering: Increment.
	int32 automatic_numbering_increment = 1;

	// Automatic numbering with VBScript: VBScript code.
	string automatic_numbering_code = 2;

	// Simple calculated value: Expression.
	string calculated_value_template = 3;

	// Calculated value with VBScript: VBScript code.
	string calculated_value_code = 4;

	// A number that specified calculation order. Properties are calculated from smallest to largest calculation order number.
	int32 calculation_order = 5;
}

// Background operation ID.
message BackgroundOperationID {

	// Operation type.
	BackgroundOperationType type = 1;

	// Specifies an ID for the operation (e.g. object type ID).
	int32 id = 2;
}

// Struct for a backup job.
message BackupJob {

	// The GUID of the vault, or GUID_NULL if defining a backup of the master database.
	string vault_guid = 1;

	// Backup type (e.g. full or differential).
	BackupType type = 2;

	// Full path to the target file on server.
	string target_file = 3;

	// Impersonation information for accessing the backup target file on server.
	Impersonation impersonation = 4;

	// If true, existing target files are overwritten. If false, backup fails if a target file already exists.
	bool overwrite_existing_files = 5;

	// Maximum size of one backup file in megabytes. If exceeded, backup will continue in a new sequentially numbered file. If zero, file size is unlimited and the backup will always consist of a single file only.
	uint32 file_size_limit_in_mb = 6;
}

// Basic document info for use with various event types.
message BasicDocInfo {

	// Object ID.
	ObjID obj_id = 1;

	// The status of this object's external ID.
	ExtIDStatus ext_id_status = 2;

	// The external ID (display ID) of this object. unset means that the external ID is the same as the internal ID.
	string ext_id = 3;

	// Object GUID.
	string object_guid = 4;

	// Bit flags that provide additional information on the object (e.g. is the object deleted or a stub).
	ITEMFLAGS flags = 5;

	// The GUID of the vault in which the object was originally created.
	string original_vault_guid = 6;

	// The original objid in the vault in which the object was originally created.
	ObjID original_obj_id = 7;

	// Document title.
	string doc_title = 8;

	// Class id.
	int32 object_class = 9;
}

// Basic document version info for use with various event types.
message BasicDocVerInfo {

	// Object version.
	ObjVer obj_ver = 1;

	// The status of this object's external ID.
	ExtIDStatus ext_id_status = 2;

	// The external ID (display ID) of this object. unset means that the external ID is the same as the internal ID.
	string ext_id = 3;

	// Object GUID.
	string object_guid = 4;

	// GUID of the object version.
	string version_guid = 5;

	// Bit flags that provide additional information on the object (e.g. is the object deleted or a stub).
	ITEMFLAGS flags = 6;

	// The GUID of the vault in which the object was originally created.
	string original_vault_guid = 7;

	// The original objid in the vault in which the object was originally created.
	ObjID original_obj_id = 8;

	// Document title.
	string doc_title = 9;

	// Class id.
	int32 object_class = 10;
}

// Basic user account info for use with various event types.
message BasicUserAccountInfo {

	// The ID of the user account.
	int32 id = 1;

	// The login name that is associated with the user account (e.g., 'DOMAIN\RobJim').
	string login_name = 2;

	// The full name of the login that is associated with the user account (e.g., 'Jim Robbins').
	string full_name = 3;

	// Bitmask of the vault roles of the user.
	VAULTROLES vaultroles = 4;
}

// Basic user group info for use with various event types.
message BasicUserGroupInfo {

	// The basic data of the user group.
	UserGroupBasic basicdata = 1;

	// The key-name pairs that correspond the members of the user group.
	repeated KeyNamePair members = 2;

	// The key-name pairs that correspond the previous members of the user group.
	repeated KeyNamePair old_members = 3;
}

// Vault login account info for use with various event types.
message BasicVaultLoginAccountInfo {

	// The login name of the account (e.g., 'DOMAIN\RobJim').
	string login_name = 1;

	// The full name of the login account (e.g., 'Jim Robbins').
	string full_name = 2;

	// The email address of the login account.
	string email = 3;

	// The license type of this login account.
	LicenseType license_type = 4;

	// The server roles of this user account.
	SRVROLES server_roles = 5;
}

// Wrapped string.
message Bytes {

	// Array of bytes.
	bytes value = 1;
}

// A structure that specifies cache file for indexing response.
message CacheFileForIndexingCollectiveResponseElement {

	// Receives the full path of the cached file. The caller owns the file.
	string full_path = 1;

	// The actual file format received.
	FileFormat file_format = 2;
}

// Cache file for indexing element.
message CacheFileForIndexingElement {

	// File info for indexing.
	FileInfoForFIX file_information = 1;

	// Specifies the requested file format to cache.
	FileFormat file_format = 2;

	// The optional subdirectory under Filedata\Temp\FIX.
	string sub_directory = 3;
}

// Certificate information.
message CertificateInfo {

	// The certificate subject.
	string issued_to = 1;

	// The party who has signed the certificate.
	string issued_by = 2;

	// The public portion of the key the certificate certifies.
	string public_key = 3;

	// The time since when the certificate is valid.
	google.protobuf.Timestamp valid_from = 4;

	// The time until when the certificate is valid.
	google.protobuf.Timestamp valid_until = 5;
}

// One stored turn of a conversation.
message ChatTurn {

	// The ID of the chat turn, assigned by the server.
	uint32 id = 1;

	// The ID of the conversation the turn belongs to.
	uint32 conv_id = 2;

	// The content of the turn as text. The server stores it as given and does not parse it; the format is up to the caller.
	string chat_turn = 3;

	// Orders the turns; newer turns have larger values. Used for paging.
	uint32 sort_key = 4;

	// When the turn was added (UTC).
	google.protobuf.Timestamp created = 5;

	// When the turn was added or last replaced (UTC).
	google.protobuf.Timestamp modified = 6;
}

// A class group: a named group of classes of one object type, used to organize class lists.
message ClassGroup {

	// The ID of the class group (an item ID in value list 2, Class groups).
	int32 id = 1;

	// The name of the group.
	string name = 2;

	// The IDs of the classes in the group.
	repeated int32 member_classes = 3;

	// The object type with which this class group is used.
	int32 object_type = 4;
}

// Evaluated permissions for current user.
message ClassPermissionsForClient {

	// The class is visible for the current user.
	bool can_user_see = 1;

	// The current user can attach new objects to this class.
	bool can_user_attach_objects = 2;
}

// Capabilities of M-Files Client.
message ClientCapabilities {

	// Property definitions can be configured searchable or unsearchable.
	bool property_def_searchability = 1;

	// Client understands unmanaged objects.
	bool unmanaged_objects = 2;

	// Client supports data push for extension authentications.
	bool extension_authentication_data_push = 3;

	// Client supports server data push for M-Files API & custom implementations.
	bool custom_api_data_push = 4;

	// Client can handle unknown or estimated file size.
	bool unknown_file_size = 5;

	// Client can handle metadata suggestions to all M-Files types.
	bool typed_metadata_suggestions = 6;

	// The client handles the long (32-byte) authentication attempt identifier in `AuthenticationAttemptIdentifier.data`.
	bool long_authentication_attempt_identifier = 7;

	// Client supports reverse grouping levels.
	bool reverse_grouping_level = 8;

	// Client supports ObjectPermissionsForClient.
	bool object_permissions_for_client = 9;

	// Properties with hierarchy for real object types supported.
	bool hierarchical_object_type_properties = 10;

	// Client supports Smart Search engine type.
	bool smart_search = 11;

	// Client supports recurring notifications.
	bool recurring_notifications = 12;

	// Client supports smart search facets.
	bool smart_search_facets = 13;

	// Client supports a vault role for managing private views.
	bool vault_role_manage_private_views = 14;

	// Client supports that all users can see deleted conflict objects.
	bool allow_all_see_deleted_conflict_objects = 15;

	// Client supports hashing passwords with advanced algorithms, including at least PBKDF2.
	bool advanced_password_hashes = 16;

	// Client supports anonymous authentication.
	bool anonymous_authentication = 17;

	// Client supports deleted/not deleted-condition in a dataset definition.
	bool dataset_deleted_condition = 18;

	// Client supports transmitting hashing passwords with the same encoding between all gRPC methods.
	bool unified_password_hashes = 19;

	// Client supports the duplicates view.
	bool duplicates_view = 20;

	// Client supports state transition time setting via state property action.
	bool property_action_state_transition_time = 21;

	// Client supports the @mentions in comment texts.
	bool at_mentions = 22;

	// Client supports additive permissions via automatic ACL components.
	bool additive_permissions_via_automatic_aclcomponents = 23;

	// Client supports vault-level optimization jobs.
	bool vault_level_optimization_jobs = 24;

	// Client supports new interface methods for visitor links.
	bool visitor_links_supported = 25;

	// Client supports multiple object types as a filter for views and advanced searches.
	bool object_type_filter_multi_select_views = 26;

	// Client supports generating authentication configuration for Azure v2.0 endpoint.
	bool generate_v2_azure_auth_conf_supported = 27;

	// Client supports structure item groups in the export job.
	bool structure_item_groups_in_export = 28;

	// Client supports Aino Search engine type.
	bool aino_search = 29;

	// Client supports conversation history.
	bool conversation_history = 30;

	// Client supports generating authentication configuration for M-Files Login Service.
	bool generate_login_service_auth_conf = 31;

	// Client supports subfolders in views.
	bool sub_folders_in_views = 32;

	// Client supports reverse references in pseudo-user ACEs (Access Control Entries).
	bool reverse_references_in_pseudo_user_aces = 33;

	// Client supports entity version numbering to track modification conflicts.
	bool entity_version_checking_supported = 34;

	// Client supports workflow descriptions.
	bool workflow_descriptions_supported = 35;

	// Client supports setting and retrieving property value metadata.
	bool property_value_metadata_supported = 36;

	// Client supports object type based grouping for relationships.
	bool object_type_grouping_for_relationships = 37;

	// Client supports draft objects in discovery results.
	bool draft_objects = 38;
}

// Describes the client software that logs in.
message ClientData {

	// The client's version, packed like `QueryVersionResponse.server_version` (`major << 48 | minor << 32 | build << 16 | patch`). May be 0. If the server administrator has set a minimum client version, older clients are refused with `E_MFILES_INCOMPATIBLE_SERVER_VERSION`.
	uint64 version = 1;

	// Features the client software handles. The server adapts some responses to them, so set only the flags your code implements; leave the rest false.
	ClientCapabilities capabilities = 2;

	// The client's language, for example `en`. For [LogInWithSession](mfiles:MFiles.IRPCLogin.LogInWithSession), empty means the language of the existing session.
	string language = 3;

	// The kind of client. Applications use `CLIENT_TYPE_SERVER_API`.
	ClientType type = 4;

	// Optional free-form name of the client application.
	string type_specifier = 5;
}

// Cloud Management API Configuration.
message CloudManagementApiConfiguration {

	// The server GUID.
	string server_guid = 1;
}

// A conversation of one user, for example with Aino.
message Conversation {

	// The ID of the conversation, assigned by the server.
	uint32 id = 1;

	// The ID of the user account that owns the conversation. Set by the server.
	uint32 user_id = 2;

	// The kind of conversation. Set when the conversation is created.
	ConversationType type = 3;

	// The title of the conversation, as plain text.
	string title = 4;

	// Orders conversations; newer conversations have larger values. Used for paging.
	uint32 sort_key = 5;

	// When the conversation was created (UTC).
	google.protobuf.Timestamp created = 6;

	// When the conversation was created or last renamed (UTC).
	google.protobuf.Timestamp modified = 7;
}

// Struct for a vault copying job.
message CopyVaultJob {

	// The GUID of the vault to copy.
	string source_vault = 1;

	// Flags that tell which data parts should be copied.
	COPYFLAGS options = 2;

	// The definition of the target vault. The GUID field is ignored. The server will generate a new GUID for the new vault.
	Vault target_vault = 3;

	// Options for controlling the attaching of the vault.
	AttachVaultOptions attach_vault_options = 4;
}

// Struct for the output info of a restore job.
message CopyVaultJobOutputInfo {

	// Receives the full definition of the new vault.
	Vault new_vault = 1;
}

// User name and password for `AUTH_DATA_TYPE_CREDENTIALS`. Sent as plain text, so use TLS.
message Credentials {

	// The login account name. Required; empty fails with `E_INVALIDARG`. For Windows accounts it may include the domain as `DOMAIN\user`.
	string username = 1;

	// The password as entered.
	string password = 2;

	// Windows accounts only. When empty, the domain is taken from `username`, then from the server's domain, then the server computer's local accounts are used.
	string domain = 3;

	// The kind of account. `CREDENTIALS_TYPE_MFILES` for M-Files accounts, `CREDENTIALS_TYPE_WINDOWS` for Windows accounts; `CREDENTIALS_TYPE_AUTOMATIC` (and the unset value) tries M-Files first, then Windows.
	CredentialsType type = 4;
}

// Struct for custom banner configuration.
message CustomBannerConfiguration {

	// The background color.
	string color = 1;

	// Array of banner content.
	repeated CustomBannerConfigurationContent content = 2;

	// The font color.
	string font_color = 3;

	// The font family.
	string font_family = 4;

	// The font type.
	string font_type = 5;
}

// Struct for custom banner configuration content.
message CustomBannerConfigurationContent {

	// The type of the custom banner content.
	string type = 1;

	// The text of the custom banner content.
	string text = 2;

	// The value of the custom banner content.
	string value = 3;
}

// Expression that can be evaluated for any document.
message DataFunctionCall {

	// The data function.
	DataFunction data_function = 1;

	// The data.
	DataFunctionUnion data = 2;
}

// Union of data functions of different type.
message DataFunctionUnion {

	oneof data {

		// Gets the year of a date or timestamp value (e.g. 2004).
		DataFunctionUnion.YearData year = 1;

		// Gets the month of a date or timestamp value (e.g. "02").
		DataFunctionUnion.MonthData month = 2;

		// Gets the year and month of a date or timestamp value (e.g. "2004-02").
		DataFunctionUnion.YearAndMonthData year_and_month = 3;

		// Gets the date part of a date or timestamp value (e.g. 2004-02-15).
		DataFunctionUnion.DateData date = 4;

		// Gets the difference of the current timestamp and a specified date or timestamp value as the number of days (e.g. 8 or -10).
		DataFunctionUnion.DaysFromData days_from = 5;

		// Gets the difference of a specified date or timestamp value and the current timestamp as the number of days (e.g. 10 or -8).
		DataFunctionUnion.DaysToData days_to = 6;

		// Gets the integer segment of a value (an integer number or a real number) based on a defined segment size.
		DataFunctionUnion.IntegerSegmentData integer_segment = 7;

		// Gets a defined amount of left characters from a text or typed value.
		DataFunctionUnion.LeftCharactersData left_characters = 8;

		// Gets an initial character group from a text or typed value.
		DataFunctionUnion.InitialCharacterGroupData initial_character_group = 9;
	}

	// Returns the data without modifying it.
	message NoOpData {
	}

	// Gets the year of a date or timestamp value (e.g. 2004).
	message YearData {
	}

	// Gets the month of a date or timestamp value (e.g. "02").
	message MonthData {
	}

	// Gets the year and month of a date or timestamp value (e.g. "2004-02").
	message YearAndMonthData {
	}

	// Gets the date part of a date or timestamp value (e.g. 2004-02-15).
	message DateData {
	}

	// Gets the difference of the current timestamp and a specified date or timestamp value as the number of days (e.g. 8 or -10).
	message DaysFromData {
	}

	// Gets the difference of a specified date or timestamp value and the current timestamp as the number of days (e.g. 10 or -8).
	message DaysToData {
	}

	// Gets the integer segment of a value (an integer number or a real number) based on a defined segment size.
	message IntegerSegmentData {

		// The size of the value range of one segment. Typically 1000.
		int32 segment_size = 1;
	}

	// Gets a defined amount of left characters from a text or typed value.
	message LeftCharactersData {

		// The number of characters to extract from the beginning of the value.
		uint32 count = 1;
	}

	// Gets an initial character group from a text or typed value.
	message InitialCharacterGroupData {

		// The locale used to form the initial character group of a string. 0 uses the locale of the server.
		uint32 lcid = 1;
	}
}

// DeclarativeMetadataStructure structure.
message DeclarativeMetadataStructure {

	// Base revision. This is meaningful only if Revision is negative, indicating that the
	// metadata structure is based on a local MFServer revision. In that case, this property
	// indicates the actual revision that the local revision is based on. It may also be zero,
	// which means that there has not been any actual revision deployed to MFServer, and the
	// local revision is based on the initial state of MFServer before any revisions have been
	// deployed.
	int32 revision = 1;

	// Actual revision-based metadata structure.
	int32 revision_base = 2;

	// An array of the ObjectTypeDecl structures.
	repeated ObjectTypeDecl object_types = 3;

	// An array of the ObjectTypeDecl structures.
	repeated ObjectTypeDecl value_lists = 4;

	// An array of the ObjectClassDecl structures.
	repeated ObjectClassDecl classes = 5;

	// An array of the ObjectClassGroupDecl structures.
	repeated ObjectClassGroupDecl class_groups = 6;

	// An array of the PropertyDefDecl structures.
	repeated PropertyDefDecl property_defs = 7;

	// An array of the WorkflowDecl structures.
	repeated WorkflowDecl workflows = 8;

	// Users and UserGroups as references.
	repeated NamedAclDecl named_acls = 9;

	// An array of the UserAccount structures.
	repeated UserAccountDecl user_accounts = 10;

	// Value list items as references.
	repeated UserGroupDecl user_groups = 11;

	// Named references for all the above elements.
	repeated ValueListItemDecl value_list_items = 12;

	// Vault languages. The entry with pwszLanguageCode="" is the default language.
	repeated MetadataStructureNamedReference named_references = 13;

	// An array of the Language structures defining the vault languages.
	repeated Language languages = 14;

	// Opaque JSON object of schema-recognized, converter-unmapped top-level properties, keyed by original property name.
	string unknown_json = 15;
}

// Struct for a default property.
message DefaultProperty {

	// PropertyDef ID.
	int32 property_def = 1;

	// True if the user is allowed to use/retain previous value
	bool allow_retaining_previous_value = 2;

	// Default property type.
	DefaultPropertyType type = 3;

	// The details as a union.
	DefaultPropertyUnion data = 4;
}

// Union for job data (depends on job type).
message DefaultPropertyUnion {

	oneof data {

		DefaultPropertyUnion.FixedValueData fixed_value = 1;

		DefaultPropertyUnion.FromHpDssXmlData from_hp_dss_xml = 2;

		DefaultPropertyUnion.FromXmlData from_xml = 3;

		DefaultPropertyUnion.FromEmailData from_email = 4;

		DefaultPropertyUnion.FromEmailHeaderData from_email_header = 5;

		DefaultPropertyUnion.FromOcrData from_ocr = 6;

		DefaultPropertyUnion.FromFilePropertyData from_file_property = 7;

		DefaultPropertyUnion.StateTransitionTimeData state_transition_time = 8;
	}

	message DptUndefinedData {
	}

	message FixedValueData {

		// Value.
		TypedValue value = 1;
	}

	message FromHpDssXmlData {

		// HPP DSS prompt name.
		string prompt_name = 1;

		// //!< True if lookup values should be treated as item IDs instead of display names.
		bool is_lookup_id = 2;

		// True if a value list item should be added if it is not found.
		bool add_missing_items = 3;
	}

	message FromXmlData {

		// XPath expression.
		string xpath = 1;

		// //!< True if lookup values should be treated as item IDs instead of display names.
		bool is_lookup_id = 2;

		// True if a value list item should be added if it is not found.
		bool add_missing_items = 3;
	}

	message FromEmailData {

		// E-mail message field.
		EmailField field = 1;

		// //!< True if lookup values should be treated as item IDs instead of display names.
		bool is_lookup_id = 2;

		// True if a value list item should be added if it is not found.
		bool add_missing_items = 3;
	}

	message FromEmailHeaderData {

		// Header field (e.g. "X-Mailer").
		string header = 1;

		// //!< True if lookup values should be treated as item IDs instead of display names.
		bool is_lookup_id = 2;

		// True if a value list item should be added if it is not found.
		bool add_missing_items = 3;
	}

	message FromOcrData {

		// OCR Block definition.
		OCRBlock block = 1;

		// //!< True if lookup values should be treated as item IDs instead of display names.
		bool is_lookup_id = 2;

		// True if a value list item should be added if it is not found.
		bool add_missing_items = 3;
	}

	message FromFilePropertyData {

		// Windows file property.
		FileProperty property = 1;

		// //!< True if lookup values should be treated as item IDs instead of display names.
		bool is_lookup_id = 2;

		// True if a value list item should be added if it is not found.
		bool add_missing_items = 3;
	}

	message StateTransitionTimeData {
	}
}

// Get subscription state information.
message DefaultReplicationConfiguration {

	// Connection String for replication via cloud.
	string connection_string = 1;
}

// Owner property def union.
message DependentPropertyDefUnion {

	oneof data {

		DependentPropertyDefUnion.FillData fill = 1;
	}

	message NothingData {
	}

	message FillData {

		// The order number of a member in ValueListItem from which a value is gathered in automatic filling.
		int32 index_for_automatic_filling = 1;
	}

	message FilterData {
	}
}

// Struct for a organizational unit of a domain.
message DirectoryItem {

	// The distinguished name of the directory item, e.g. "CN=gr01,OU=orgunit,DC=domain,DC=com"
	string distinguished_name = 1;

	// Name of the directory object as displayed in user interface.
	string display_name = 2;
}

// Struct for a document class in a vault.
message DocClass {

	// Value list item representing this document class.
	ValueListItem value_list_item = 1;

	// The default workflow of the document class, or zero if there is no default workflow.
	int32 workflow = 2;

	// The object type with which this class is used.
	int32 object_type = 3;

	// True if this is a predefined class (cannot be deleted, editing is restricted).
	bool is_predefined = 4;

	// True if the use of the workflow with this class is enforced.
	bool force_workflow = 5;

	// The ID of the property definition that represents the name of the document or other object. Typically PROPERTYDEF_TITLE (0).
	int32 name_property_def = 6;

	// Additional object type specific class content.
	ObjectTypeSpecificClassContentUnion object_type_specific_properties = 7;

	// The electronic signature settings for creating an electronic signature for new objects. Reserved for future improvements.
	ElectronicSignatureSettings signature_settings_for_new_objects = 8;

	// Semicolon-separated list of semantic aliases.
	string aliases = 9;
}

// Document info for notifications. This encapsulates all needed info of a document for notifications.
message DocumentInfoForNotifications {

	// Document information.
	ObjectVersionEx object_info = 1;

	// Document properties.
	repeated PropertyValue properties = 2;

	// Document access control list.
	ACLWithNames acl = 3;

	// Old document properties. Used with some events only.
	repeated PropertyValue old_properties = 4;

	// Document access control list. Used with some events only.
	ACLWithNames old_acl = 5;

	// ACLs for property values.
	repeated PVACL property_acls = 6;

	// ACLs for old property values.
	repeated PVACL old_property_acls = 7;

	// Translated names for lookups.
	repeated ItemNames translated_lookup_names = 8;
}

// Effective permissions.
//
// One user's access to an object as given by the object's ACL alone. Vault-level rights such as
// seeing all objects are not included.
message EffectivePermissions {

	// The user account ID.
	int32 user_id = 1;

	// What the user can do with the object according to its ACL.
	ObjectPermissionsForClient permissions = 2;
}

// Electronic signature reason/meaning pairs for fixed and predefined configuration.
message ElectronicSignaturePromptInfo {

	// Reason text for the signature. This is typically a short description such as "Authorization for Use".
	string reason = 1;

	// Meaning text for the signature. This is typically a longer description such as "I have reviewed the document and authorize it for use".
	string meaning = 2;
}

// A structure that specifies an electronic signature request
message ElectronicSignatureRequest {

	// The electronic signature context identifier.
	ElectronicSignatureContext context = 1;

	// The user to whom the operation applies. Relevant if the context indicates that the electronic signature is for assignment operation.
	int32 user_id = 2;

	// The state transition id for the electronic signature if the electronic signature was required because of a state transition (i.e. the context indicates a state transition).
	int32 state_transition_id = 3;

	// The target object of the electronic signature.
	ObjVer obj_ver = 4;

	// The title of the target object.
	string target_object_title = 5;

	// The electronic signature settings.
	ElectronicSignatureSettings settings = 6;
}

// A structure that specifies an electronic signature response
message ElectronicSignatureResponse {

	// The session id that proofs the response validity.
	bytes proof_session_id = 1;

	// The user-selected signature reason.
	string reason = 2;

	// The user-selected signature meaning.
	string meaning = 3;

	// The user feedback.
	string free_form_text = 4;
}

// Electronic signature settings.
message ElectronicSignatureSettings {

	// True if this transition requires an electronic signature.
	bool is_required = 1;

	// Option 1: static reason/meaning.
	ElectronicSignaturePromptMode prompt_mode = 2;

	// Option 2: Pre-defined reason
	ElectronicSignaturePromptInfo fixed_prompt_details = 3;

	// Option 3: Metadata-based reason/meaning.
	repeated ElectronicSignaturePromptInfo selectable_prompt_details = 4;

	// A property definition that represents items in value list. Used if the prompt mode is eesrmpmPromptModeMetadataBasedUserSelectable.
	int32 user_selectable_reason_meaning_items_property_def = 11;

	// A property definition that indicates the reason property. PROPERTYDEF_UNINITIALIZED if no reason is specified. Used if the prompt mode is eesrmpmPromptModeMetadataBasedUserSelectable.
	int32 user_selectable_reason_property_def = 12;

	// A property definition that indicates the meaning property. PROPERTYDEF_UNINITIALIZED if no meaning is specified. Used if the prompt mode is eesrmpmPromptModeMetadataBasedUserSelectable.
	int32 user_selectable_meaning_property_def = 13;

	// Common prompt details.
	bool add_metadata_reference_to_reason_meaning_item = 14;

	// True if a free-form text is prompted with the signature.
	bool prompt_free_form_text = 5;

	// Signature details.
	// boolean bFillReasonPropertyText;  //!< Optional?
	// boolean bFillMeaningPropertyText;  //!< Optional?
	int32 free_form_text_property_def = 6;

	// Additional information for the manifestation text for the signature. This is not shown to the user when signing.
	string manifestation_additional_info = 7;

	// True if the electronic signature shall be stored as a separate signature object. False to store as an embedded signature in a multi-line text property.
	bool create_separate_signature_object = 8;

	// Property definition to be used for storing the signature manifestation on the object. Ignored if bCreateSeparateSignatureObject is true.
	int32 manifestation_property_def = 9;

	// Signature identifier. Required if bCreateSeparateSignatureObject is true.
	string signature_identifier = 10;
}

// One language's values for one element's translatable fields. The same type serves every
// element kind; fields the element kind does not have are left empty. Replaces
// TranslationDecl, whose translated field was implicit in which per-field array held it.
message ElementTranslationsDecl {

	// ISO code; "" is the default language.
	string language_code = 1;

	// Singular name.
	string name = 2;

	// Plural name / value list displayed name.
	string value_list_name = 3;

	// User-facing description.
	string semantic_description_for_users = 4;
}

// Information about an empty (pending-upload) file: only the title and extension are known because the
// file content has not been uploaded yet.
message EmptyFile {

	// The title of the file.
	string title = 1;

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

// Struct for a vault optimization job.
message EncryptFileDataJob {

	// The GUID of the vault.
	string vault_guid = 1;
}

// Describes the device the client runs on. All fields are optional.
message EnvironmentData {

	// A name for the client device, such as its host name. Shown as the session's computer name. Must not start with `@{`.
	string client_name = 1;

	// The client device's time zone. Leave unset if unknown.
	TimeZoneInformation timezone = 2;

	// Free-form description of the platform, for example `Windows 11` or `Python 3.13`.
	string host_platform = 3;

	// A stable, globally unique identifier of the device. Used by M-Files clients that register devices; see [DisconnectDevice](mfiles:MFiles.IRPCLogin.DisconnectDevice).
	string device_token = 4;
}

// Struct for an error information details.
message ErrorInfo {

	// The error code (HRESULT value).
	int32 error_code = 1;
}

// Struct for a single event.
message Event {

	// The ID of the event.
	int64 id = 1;

	// The type of the event.
	EventType type = 2;

	// The category of the event.
	EventCategory category = 3;

	// The timestamp of this event.
	google.protobuf.Timestamp timestamp_utc = 4;

	// The account name of the user whose activity lead to this event. If no user (this is a system operation), this is an empty string.
	string caused_by_user = 5;

	// The full name of the user whose activity lead to this event. If no user (this is a system operation), this is an empty string.
	string caused_by_user_full_name = 6;

	// The ID of the user account whose activity lead to this event. If no user (this is a system operation), this is zero.
	int32 caused_by_user_id = 11;

	// Additional event type -specific data as a union.
	EventTypeSpecificDataUnion data = 7;

	// Tells if the notifications have been created.
	bool notification_created = 8;

	// Document info. This is valid only until the notifications have been created.
	DocumentInfoForNotifications notification_object_info = 9;

	// The data represented in XML.
	string xml_data = 10;
}

// Event Log Filter record. This is not labeled "rpc_payload" because IRPCEventsAdmin uses alias.
message EventLogFilter {

	// ID of the Event Log Filter record.
	int64 id = 1;

	// Name of the Event Log Filter record.
	string name = 2;

	// The account ID of the user who created the record
	int32 created_by_user_account = 3;

	// Information about the search conditions.
	EventLogFilterCondition condition = 4;

	// Tells if the Event Log Filter record was set as Default Filter View.
	bool default_filter_view = 5;
}

// Struct for an array of Event Log Filter Item. This is not labeled "rpc_payload" because IRPCEventsAdmin uses alias.
message EventLogFilterArray {

	// Event Log Filter items.
	repeated EventLogFilter event_log_filter_items = 1;
}

// Event Log Filter record Condition. This is not labeled "rpc_payload" because IRPCEventsAdmin uses alias.
message EventLogFilterCondition {

	// Object Type in Filter View.
	int32 object_type = 1;

	// Object ID in Filter View.
	string object_id = 2;

	// Object Name in Filter View.
	string object_name = 3;

	// Object Class in Filter View.
	int32 object_class = 4;

	// Event Types in Filter View.
	EventTypeArray event_types = 5;

	// User name in Filter View.
	string event_caused_by_user = 6;

	// Start time in Filter View.
	google.protobuf.Timestamp start_time = 7;

	// End time in Filter View.
	google.protobuf.Timestamp end_time = 8;
}

// Struct for a single event subscription.
message EventSubscription {

	// The type of the event.
	// [ switch_is( eventtype ) ] EventTypeSpecificDataUnion etsdu;  //!< Additional event type -specific data as a union.
	EventType type = 1;
}

// Struct for an array of event types.
message EventTypeArray {

	// The event types.
	repeated EventType event_types = 1;
}

// Union for event type specific data in Event.
message EventTypeSpecificDataUnion {

	oneof data {

		EventTypeSpecificDataUnion.FileAccessedData file_accessed = 1;

		EventTypeSpecificDataUnion.ObjectChangedData object_changed = 2;

		BasicDocVerInfo object_created = 3;

		EventTypeSpecificDataUnion.RolledBackData rolled_back = 4;

		BasicDocVerInfo checked_out = 5;

		BasicDocVerInfo checked_in = 6;

		BasicDocVerInfo checkout_undone = 7;

		BasicDocInfo object_deleted = 8;

		BasicDocVerInfo object_version_destroyed = 9;

		BasicDocInfo object_destroyed = 10;

		EventTypeSpecificDataUnion.LoggedInData logged_in = 11;

		EventTypeSpecificDataUnion.LoggedOutData logged_out = 12;

		EventTypeSpecificDataUnion.BackupStartedData backup_started = 13;

		EventTypeSpecificDataUnion.BackupCompletedData backup_completed = 14;

		BasicDocInfo check_in_requested = 15;

		EventTypeSpecificDataUnion.AssignedData assigned = 16;

		EventTypeSpecificDataUnion.FreeRequestData free_request = 17;

		BasicDocVerInfo assigned_to = 18;

		BasicDocVerInfo completed_by = 19;

		BasicDocVerInfo assignment_approved_by = 77;

		BasicDocVerInfo assignment_rejected_by = 78;

		BasicDocVerInfo state_changed = 20;

		EventTypeSpecificDataUnion.ObjectNotificationData object_notification = 21;

		// Information on the concerned object.
		BasicDocInfo object_undeleted = 22;

		// Information on the concerned user account.
		BasicUserAccountInfo user_added = 23;

		// Information on the concerned user account.
		BasicUserAccountInfo user_changed = 24;

		// Information on the concerned user account.
		BasicUserAccountInfo user_deleted = 25;

		// Information on the concerned user group.
		BasicUserGroupInfo user_group_added = 26;

		// Information on the concerned user group.
		BasicUserGroupInfo user_group_changed = 27;

		// Information on the concerned user group.
		BasicUserGroupInfo user_group_deleted = 28;

		EventTypeSpecificDataUnion.EventLogExportedData event_log_exported = 30;

		EventTypeSpecificDataUnion.EventLogClearedData event_log_cleared = 31;

		// The basic definition of the concerned vault.
		VaultBasic vault_restored = 32;

		// The basic definition of the concerned vault.
		VaultBasic vault_created = 33;

		// The concerned workflow state transition settings.
		StateTransitionSignatureSettingsForEvents state_transition_signature_settings_added = 34;

		// The concerned workflow state transition settings.
		StateTransitionSignatureSettingsForEvents state_transition_signature_settings_changed = 35;

		// The concerned workflow state transition settings.
		StateTransitionSignatureSettingsForEvents state_transition_signature_settings_removed = 36;

		EventTypeSpecificDataUnion.VaultVariableChangedData vault_variable_changed = 37;

		EventTypeSpecificDataUnion.VaultCopiedData vault_copied = 38;

		EventTypeSpecificDataUnion.LicensePreventedAdvancedEventLogData license_prevented_advanced_event_log = 39;

		EventTypeSpecificDataUnion.PublicLinkCreatedData public_link_created = 82;

		EventTypeSpecificDataUnion.PublicLinkFileDownloadedData public_link_file_downloaded = 83;

		EventTypeSpecificDataUnion.PublicLinkDeletedData public_link_deleted = 84;

		EventTypeSpecificDataUnion.PublicLinkAccessedData public_link_accessed = 85;

		EventTypeSpecificDataUnion.ConflictResolvedInFavorOfIncomingChangesData conflict_resolved_in_favor_of_incoming_changes = 92;

		EventTypeSpecificDataUnion.ConflictResolvedInFavorOfLocalChangesData conflict_resolved_in_favor_of_local_changes = 95;

		EventTypeSpecificDataUnion.DiscardedConflictChangesRestoredAsNewVersionData discarded_conflict_changes_restored_as_new_version = 96;

		BasicDocVerInfo user_mentioned_in_comment = 97;

		// Information on the concerned vault login account.
		BasicVaultLoginAccountInfo vault_login_account_added = 98;

		// Information on the concerned vault login account.
		BasicVaultLoginAccountInfo vault_login_account_changed = 99;

		// Information on the concerned vault login account.
		BasicVaultLoginAccountInfo vault_login_account_deleted = 100;

		// Shared-link data for the access-type-changed event.
		ExternalLinkEventData external_link_access_type_changed = 104;

		// Shared-link data for the anyone-with-the-link expiration-updated event.
		ExternalLinkEventData external_link_anyone_with_link_expiration_updated = 105;

		// Shared-link data for the visitors-added event.
		ExternalLinkEventData external_link_visitors_added = 106;

		// Shared-link data for the visitors-removed event.
		ExternalLinkEventData external_link_visitors_removed = 107;

		// Shared-link data for the visitor expiration-updated event.
		ExternalLinkEventData external_link_visitor_expiration_updated = 108;

		// Shared-link data for the accessed-by-visitor event.
		ExternalLinkEventData external_link_accessed_by_visitor = 109;

		// Shared-link data for the manage-visitors-dialog-viewed event.
		ExternalLinkEventData external_link_manage_visitors_viewed = 110;

		// Shared-link data for the visitors-viewed event.
		ExternalLinkEventData external_link_visitors_viewed = 111;
	}

	message UndefinedData {
	}

	message FileAccessedData {

		// Information about the concerned document.
		BasicDocVerInfo object_version_info = 1;

		// The name of the file accessed.
		string file_name = 2;
	}

	message ObjectChangedData {

		// Information on the changed object.
		BasicDocVerInfo object_version_info = 1;

		// Flags indicating what were changed.
		OBJECTCHANGES object_version_changes = 2;

		// Flags indicating what were changed to all versions, not only to the specified version.
		OBJECTCHANGES object_changes = 3;

		// If objectchanges specifies OBJECTCHANGE_VERSION_TAG_ADDED_REMOVED_FROM_OTHER_VERSIONS, specifies a version tag that was added to the modified version and removed from the other versions of the object.
		int32 changed_version_tag = 4;

		// Version editors information for coauthoring
		TypedValue versioneditors = 5;
	}

	message RolledBackData {

		// Information about the concerned document.
		BasicDocVerInfo object_version_info = 1;

		// The old version to which the document was rolled back.
		int32 rollback_version = 2;
	}

	message LoggedInData {

		// The session's server-level access rights.
		ServerAccess server_access = 1;

		// The session's vault-level access rights.
		VaultAccess vault_access = 2;
	}

	message LoggedOutData {
	}

	message BackupStartedData {

		// The GUID of the vault, or GUID_NULL if defining a backup of the master database.
		string vault_guid = 1;

		// The name of the vault to back up. In case of master database, this is an empty string.
		string vault_name = 2;

		// Backup type (e.g. full or differential).
		BackupType backup_type = 3;
	}

	message BackupCompletedData {

		// The GUID of the vault, or GUID_NULL if defining a backup of the master database.
		string vault_guid = 1;

		// The name of the vault to back up. In case of master database, this is an empty string.
		string vault_name = 2;

		// Backup type (e.g. full or differential).
		BackupType backup_type = 3;

		// True if the run was successful, false otherwise.
		bool succeeded = 4;

		// Error string from the last run (if any).
		string error_text = 5;
	}

	message AssignedData {

		// Information about the concerned document.
		BasicDocInfo object_info = 1;

		// An array that contains user names. This request concerns these users.
		repeated string assigned_to = 2;
	}

	message FreeRequestData {

		// Optional information about the concerned document. If the IDs are zero, there is no associated document.
		BasicDocVerInfo object_version_info = 1;

		// The subject of this request.
		string subject = 2;

		// The message of this request.
		string message = 3;
	}

	message ObjectNotificationData {

		// Information about the concerned document.
		BasicDocInfo object_info = 1;

		// An array of rule IDs.
		repeated int32 rules = 2;
	}

	message PropertyDefDeletedData {

		// The ID of the property definition.
		int32 id = 1;

		// The name of the property definition.
		string name = 2;
	}

	message EventLogExportedData {

		// The lower boundary of the ID range of the exported events. Events with an ID greater than or equal to this value were exported. -1 indicates that there was no lower boundary.
		int64 oldest_event_id = 1;

		// The upper boundary of the ID range of the exported events. Events with an ID less than or equal to this value were exported. -1 indicates that there was no upper boundary.
		int64 newest_event_id = 2;

		// If not -1, limited exported objects to this object type.
		int32 object_type_filter = 3;

		// If not -1, limited exported objects to objects of this ID.
		int32 object_id_filter = 4;
	}

	message EventLogClearedData {

		// The lower boundary of the ID range of the deleted events. Events with an ID greater than or equal to this value were deleted. -1 indicates that there was no lower boundary.
		int64 oldest_event_id = 1;

		// The upper boundary of the ID range of the deleted events. Events with an ID less than or equal to this value were deleted. -1 indicates that there was no upper boundary.
		int64 newest_event_id = 2;
	}

	message VaultVariableChangedData {

		// The name of the variable.
		string variable_name = 1;

		// The new value of the variable.
		string variable_value = 2;
	}

	message VaultCopiedData {

		// The basic definition of the source vault.
		VaultBasic source_vault_info = 1;

		// Flags that tell which data parts were copied.
		COPYFLAGS options = 2;

		// The basic definition of the target (created) vault.
		VaultBasic target_vault_info = 3;
	}

	message LicensePreventedAdvancedEventLogData {
	}

	message PublicLinkCreatedData {

		// Information about the concerned document.
		BasicDocVerInfo object_version_info = 1;

		// The name of the file.
		string file_name = 2;

		// Access key hash.
		string access_key_hash = 3;

		// Description.
		string description = 4;

		// The expiration date of the public link.
		google.protobuf.Timestamp expiration_date_utc = 5;
	}

	message PublicLinkFileDownloadedData {

		// Information about the concerned document.
		BasicDocVerInfo object_version_info = 1;

		// The name of the file accessed.
		string file_name = 2;

		// Access key hash.
		string access_key_hash = 3;

		// IP address of the downloader.
		string ip_address = 4;
	}

	message PublicLinkDeletedData {

		// Information about the concerned document.
		BasicDocVerInfo object_version_info = 1;

		// The name of the file.
		string file_name = 2;

		// Access key hash.
		string access_key_hash = 3;

		// Description.
		string description = 4;

		// The expiration date of the public link.
		google.protobuf.Timestamp expiration_date_utc = 5;
	}

	message PublicLinkAccessedData {

		// Information about the concerned document.
		BasicDocVerInfo object_version_info = 1;

		// The name of the file accessed.
		string file_name = 2;

		// Access key hash.
		string access_key_hash = 3;

		// IP address of the accessor.
		string ip_address = 4;
	}

	message ConflictResolvedInFavorOfIncomingChangesData {

		// Information about the concerned base object.
		BasicDocVerInfo base_object_version_info = 1;

		// Information on the concerned base user account.
		BasicUserAccountInfo base_user_account = 2;

		// Information about the concerned conflict object.
		BasicDocVerInfo conflict_object_version_info = 3;

		// Information on the concerned conflict user account.
		BasicUserAccountInfo conflict_user_account = 4;

		// True if the base object wins the conflict. False if the conflicting object wins.
		bool base_wins = 5;

		// True if the conflict was resolved automatically. False if it was resolved manually by the user.
		bool automatic = 6;
	}

	message ConflictResolvedInFavorOfLocalChangesData {

		// Information about the concerned base object.
		BasicDocVerInfo base_object_version_info = 1;

		// Information on the concerned base user account.
		BasicUserAccountInfo base_user_account = 2;

		// True if the conflict was resolved automatically. False if it was resolved manually by the user.
		bool automatic = 3;
	}

	message DiscardedConflictChangesRestoredAsNewVersionData {

		// Information about the concerned base object.
		BasicDocVerInfo base_object_version_info = 1;

		// Information on the concerned base user account.
		BasicUserAccountInfo base_user_account = 2;

		// Information about the concerned conflict object.
		BasicDocVerInfo conflict_object_version_info = 3;

		// Information on the concerned conflict user account.
		BasicUserAccountInfo conflict_user_account = 4;
	}

	message ObjectCreatedData {

		BasicDocVerInfo object_version_info = 1;
	}

	message CheckedOutData {

		BasicDocVerInfo object_version_info = 1;
	}

	message CheckedInData {

		BasicDocVerInfo object_version_info = 1;
	}

	message CheckoutUndoneData {

		BasicDocVerInfo object_version_info = 1;
	}

	message ObjectDeletedData {

		BasicDocInfo object_version = 1;
	}

	message ObjectVersionDestroyedData {

		BasicDocVerInfo object_version_info = 1;
	}

	message ObjectDestroyedData {

		BasicDocInfo object_version = 1;
	}

	message CheckInRequestedData {

		BasicDocInfo object_info = 1;
	}

	message AssignedToData {

		BasicDocVerInfo object_version_info = 1;
	}

	message CompletedByData {

		BasicDocVerInfo object_version_info = 1;
	}

	message AssignmentApprovedByData {

		BasicDocVerInfo object_version_info = 1;
	}

	message AssignmentRejectedByData {

		BasicDocVerInfo object_version_info = 1;
	}

	message StateChangedData {

		BasicDocVerInfo object_version_info = 1;
	}

	message ObjectUndeletedData {

		BasicDocInfo object_info = 1;
	}

	message UserAddedData {

		BasicUserAccountInfo user = 1;
	}

	message UserChangedData {

		BasicUserAccountInfo user = 1;
	}

	message UserDeletedData {

		BasicUserAccountInfo user = 1;
	}

	message UserGroupAddedData {

		BasicUserGroupInfo user_group = 1;
	}

	message UserGroupChangedData {

		BasicUserGroupInfo user_group = 1;
	}

	message UserGroupDeletedData {

		BasicUserGroupInfo user_group = 1;
	}

	message VaultRestoredData {

		VaultBasic vault_info = 1;
	}

	message VaultCreatedData {

		VaultBasic vault_info = 1;
	}

	message StateTransitionSignatureSettingsAddedData {

		StateTransitionSignatureSettingsForEvents signature_settings = 1;
	}

	message StateTransitionSignatureSettingsChangedData {

		StateTransitionSignatureSettingsForEvents signature_settings = 1;
	}

	message StateTransitionSignatureSettingsRemovedData {

		StateTransitionSignatureSettingsForEvents signature_settings = 1;
	}

	message UserMentionedInCommentData {

		BasicDocVerInfo object_version_info = 1;
	}

	message VaultLoginAccountAddedData {

		BasicVaultLoginAccountInfo vault_login_info = 1;
	}

	message VaultLoginAccountChangedData {

		BasicVaultLoginAccountInfo vault_login_info = 1;
	}

	message VaultLoginAccountDeletedData {

		BasicVaultLoginAccountInfo vault_login_info = 1;
	}

	message ExternalLinkAccessTypeChangedData {

		ExternalLinkEventData external_link_data = 1;
	}

	message ExternalLinkAnyoneWithLinkExpirationUpdatedData {

		ExternalLinkEventData external_link_data = 1;
	}

	message ExternalLinkVisitorsAddedData {

		ExternalLinkEventData external_link_data = 1;
	}

	message ExternalLinkVisitorsRemovedData {

		ExternalLinkEventData external_link_data = 1;
	}

	message ExternalLinkVisitorExpirationUpdatedData {

		ExternalLinkEventData external_link_data = 1;
	}

	message ExternalLinkAccessedByVisitorData {

		ExternalLinkEventData external_link_data = 1;
	}

	message ExternalLinkManageVisitorsViewedData {

		ExternalLinkEventData external_link_data = 1;
	}

	message ExternalLinkVisitorsViewedData {

		ExternalLinkEventData external_link_data = 1;
	}
}

// Object type node for extracted data schema.
message ExportedDataObjectType {

	// Object type or value list ID.
	int32 object_type = 1;

	// Child property definition nodes.
	repeated ExportedDataPropertyDef property_defs = 2;

	// The filtering conditions that limit the object set of this node.
	SearchConditionArray object_filter = 3;
}

// Property definition node for extracted data schema.
message ExportedDataPropertyDef {

	// Property definition ID.
	int32 property_def = 1;

	// True to export historical data as change events.
	bool export_history_as_changes = 2;

	// True to export historical data as sampled timeline.
	bool export_history_as_timeline = 3;

	// Timeline sampling interval
	ExportedDataHistoryInterval sampling_interval = 4;

	// The mode how the history start date is expressed.
	ExportedDataHistoryStartDateMode history_mode = 5;

	// Length of the period. Valid only if the start date is a fixed period.
	uint32 fixed_period_length = 6;

	// The period unit for fixed period.
	ExportedDataHistoryInterval fixed_period_unit = 7;

	// Exact start date. Valid only if the eedtstmStartDate is eedhsdmExactDate.
	google.protobuf.Timestamp starting_from_date = 8;

	// Hierarchical child property definition nodes.
	repeated ExportedDataPropertyDef child_nodes = 9;
}

// Exported data set.
message ExportedDataSet {

	// Exported data set ID.
	int32 id = 1;

	// The name of the data set.
	string name = 2;

	// Root nodes representing an object type.
	repeated ExportedDataObjectType object_types = 3;

	// Data set flags.
	EXPORTEDDATASETFLAGS options = 4;

	// The schedule of this data set extraction (a serialized Task object of Task Scheduler).
	bytes schedule = 5;

	// The database connection string.
	string database_connection_string = 6;

	// "Run as" user id for the exported data set.
	int32 run_as_user_id = 7;

	// The database schema.
	ExportedDataSetDBSchema database_schema = 8;
}

// Exported data set.
message ExportedDataSetAdmin {

	// The non-admin version of the struct.
	ExportedDataSet dataset = 1;

	// Semicolon-separated list of semantic aliases.
	string aliases = 2;
}

// A structure that specifies a single metadata structure item or a group selection of the item type.
message ExportStructureItem {

	// Metadata structure item type.
	MetadataStructureItem type = 1;

	// The group selection inside of an item type
	StructureItemGroup group_selection = 4;

	// Metadata structure item ID. This is used if the group selection is not used. Otherwise it is MFBuiltInMetadataStructureItemIDAll. Should be used if guid is GUID_NULL.
	int32 id = 2;

	// Metadata structure item GUID. If not GUID_NULL, should be used instead of lID. This is used e.g. with event handler items.
	string guid = 3;
}

// Expression that can be evaluated for any object.
//
// Set `type` and the member of `data` that matches it, for example `EXPRESSION_TYPE_PROPERTY_VALUE`
// with `data.property_value`.
//
// Indirection levels evaluate a property of a related object. For example, documents whose
// project's customer is a given customer: a property value expression for the Customer property,
// with one indirection level for the Project property. The levels are listed from the searched
// object outwards. Indirection works with property value, typed value and document ID segment
// expressions, and with the `STATUS_TYPE_OBJECT_ID` status value; other expressions with
// indirection levels fail with "Invalid search condition."
message Expression {

	// The kind of expression. Must match the member set in `data`.
	ExpressionType type = 1;

	// The expression data. Set the member that matches `type`.
	ExpressionUnion data = 2;

	// The lookups to follow before evaluating the expression, from the searched object outwards. Empty evaluates the expression on the object itself.
	repeated IndirectionLevel indirection_levels = 3;
}

// Union of expressions of different type.
//
// Set exactly one member, the one that matches `Expression.type`.
message ExpressionUnion {

	oneof data {

		// Expression for property values.
		ExpressionUnion.PropertyValueData property_value = 1;

		// Expression for document ID segments.
		ExpressionUnion.IdSegmentData id_segment = 2;

		// Expression for status values such as Document ID or CheckedOutToUser.
		ExpressionUnion.StatusValueData status_value = 3;

		// Expression for file values such as file size.
		ExpressionUnion.FileValueData file_value = 4;

		// Expression for values of specific data type. Lookup-typed values also specify the value list.
		ExpressionUnion.TypedValueData typed_value = 5;

		// Expression for values of any field (any property, file name etc.).
		ExpressionUnion.AnyFieldData any_field = 6;

		// Expression for permissions (ACL).
		ExpressionUnion.PermissionsData permissions = 7;
	}

	// Uninitialized expression, used as default value. This value is never used in actual expressions and serves only as a placeholder for uninitialized expressions.
	message UninitializedData {
	}

	// Expression for property values.
	message PropertyValueData {

		// The ID of the property definition whose value is compared, for example 0 (Name or title), 21 (Last modified) or 100 (Class).
		int32 property_def = 1;

		// Optional function applied to the value before the comparison, for example `DATA_FUNCTION_DAYS_FROM` to compare the age of a date in days. Unset compares the value as is.
		DataFunctionCall data_function = 2;

		// For hierarchical value lists: whether a match on a parent or child item also counts. Unset requires an exact match.
		ParentChildBehavior parent_child_behavior = 3;
	}

	// Expression for document ID segments.
	message IdSegmentData {

		// The size of the document ID range of one segment. Typically 1000.
		int32 segment_size = 1;
	}

	// Expression for status values such as Document ID or CheckedOutToUser.
	//
	// Value types that work with `CONDITION_TYPE_EQUAL`:
	//
	// - `STATUS_TYPE_IS_DELETED`, `STATUS_TYPE_CHECKED_OUT`: Boolean.
	// - `STATUS_TYPE_OBJECT_TYPE`: a lookup (value list -11, item = object type ID), or a multi-select
	//   lookup to match any of several object types.
	// - `STATUS_TYPE_OBJECT_ID`: integer. `CONDITION_TYPE_GREATER_THAN` also works, for paging by object
	//   ID.
	message StatusValueData {

		// The type of status information (e.g. check out user).
		StatusType type = 1;

		// Function that modifies the status value.
		DataFunctionCall data_function = 2;
	}

	// Expression for file values such as file size.
	message FileValueData {

		// The type of file information (e.g. file name).
		FileValueType type = 1;
	}

	// Expression for values of specific data type. Lookup-typed values also specify the value list.
	//
	// Matches a value in any property of the given data type. With `DATATYPE_MULTI_SELECT_LOOKUP` (or
	// `DATATYPE_LOOKUP`) and `value_list`, the condition finds objects that refer to the given item in
	// any property, single- or multi-select.
	message TypedValueData {

		// The data type of the values to match.
		Datatype datatype = 1;

		// With `DATATYPE_LOOKUP` or `DATATYPE_MULTI_SELECT_LOOKUP`, the value list or object type whose item the objects refer to. Both data types find objects that refer to the item through a lookup or a multi-select lookup property.
		int32 value_list = 2;

		// Function that modifies the typed value.
		DataFunctionCall data_function = 3;

		// Parent-child behaviour, used within hierarchic value lists.
		ParentChildBehavior parent_child_behavior = 4;
	}

	// Expression for values of any field (any property, file name etc.).
	//
	// A full-text search. Use it with `CONDITION_TYPE_CONTAINS` and a non-empty text value.
	message AnyFieldData {

		// Full-text search flags. Set `search_metadata`, `search_filedata` or both; with neither, the search fails with "Invalid search condition." See [FTSFLAGS](mfiles:MFiles.FTSFLAGS).
		FTSFLAGS options = 1;
	}

	// Expression for permissions (ACL).
	message PermissionsData {

		// A more detailed type specification of the permissions expression.
		PermissionsExpressionType type = 1;
	}
}

// Struct for a script dashboard definition.
message ExtAppDashboardDef {

	// The application identifier.
	string application_guid = 1;

	// The dashboard ID.
	string dashboard_id = 2;

	// Path to the application folder.
	string application_path = 3;

	// The dashboard name.
	string dashboard_name = 4;

	// The initial content file for the dashboard. Relative to the application path.
	string content_file = 5;

	// The event priority for this dashboard.
	int32 event_priority = 6;

	// Array of trusted contents (String).
	repeated string trusted_content_urls = 7;

	// True if the application is launched as an internal application. This relaxes some validations.
	bool internal_app = 8;

	// True to allow text selection in browser.
	bool allow_text_selection = 9;

	// Path to application's icon.
	string icon_path = 10;

	// Path to application's icon when it is selected.
	string icon_selected_path = 11;

	// The sandbox attributes.
	string sandbox_attributes = 12;
}

// Struct for a script module definition.
message ExtApplication {

	// The application identifier.
	string guid = 1;

	// The application name.
	string name = 2;

	// The application version (author set).
	string version = 3;

	// The application name.
	string description = 4;

	// The application publisher.
	string publisher = 5;

	// True if the application is enabled. Note: this is a user-specific value and is not stored with the application data. Relevant for client applications only.
	bool is_enabled = 6;

	// True if the application is optional (i.e. can be disabled). Relevant for client applications only.
	bool is_optional = 7;

	// True if this application requires system access. Relevant for client applications only.
	bool requires_system_access = 8;

	// The application checksum (hash value).
	string md5_checksum = 9;

	// The guid for the master application. GUID_NULL if there is no master application.
	string master_application = 10;

	// The application type.
	ExtApplicationType type = 11;

	// Indicates if application has been designed to work in multi-server environment.
	bool is_multi_server_compatible = 12;

	// Publishing date. Zero values if date has not been defined.
	google.protobuf.Timestamp published_at = 13;

	// The binary value of the application platfroms supported.
	int32 platforms = 14;

	// Vault application dependencies.
	repeated VaultApplicationDependency vault_app_dependencies = 15;

	// True if the application is signed and has been verified.
	bool is_signed_and_verified = 16;

	// True if the application can be deployed without vault restart. Applicable for server-side vault applications only.
	bool hot_swappable = 17;
}

// Struct for a script module definition.
message ExtApplicationDef {

	// The script application information.
	ExtApplication application = 1;

	// The script application modules and files.
	repeated ExtAppModuleDef modules = 2;

	// The script application dashboards.
	repeated ExtAppDashboardDef dashboards = 3;
}

// Struct for a script module definition.
message ExtAppModuleDef {

	// The application identifier.
	string application_guid = 1;

	// The script engine that can run this module.
	ExtAppEngine script_engine = 2;

	// Path to the application folder.
	string application_path = 3;

	// The module name.
	string module_name = 4;

	// The engine defintion for script engine that runs this module.
	string script_engine_definition = 5;

	// The event priority for this module.
	int32 event_priority = 6;

	// Tells if the module is fast-browsing compatible. Effective only for shellui modules.
	bool fast_browsing_compatible = 7;

	// Array of file names (String). Relative to the application path.
	repeated string files = 8;

	// The sandbox attributes.
	string sandbox_attributes = 9;
}

// A structure that specifies an extension authentication request
message ExtensionAuthenticationRequest {

	// The title of the target object.
	string connection_name = 1;

	// The plugins information supported by the external connection.
	repeated PluginInfo supported_plugins = 2;

	// True if login to external repository was explicitly requested by user via 'External repositories' dialog.
	bool is_explicit_login = 3;
}

// Credentials for an external system.
message ExtensionAuthenticationResponse {

	// The `name` of the authentication method, from the target's `supported_plugins`.
	string plugin_configuration = 1;

	// The credentials as named text values, as the authentication method expects them. For a user name and password, M-Files clients send `username` and `password`; for tokens, `Token` and `RefreshToken`.
	repeated NamedValue data = 2;
}

// A structure that specifies an extension authentication response for client server communication.
message ExtensionAuthenticationResponseFromClient {

	// Extension authentication response.
	ExtensionAuthenticationResponse response = 1;

	// If true, asks for the authentication later as it's defined in lTimeInterval.
	bool ask_later = 2;

	// The time interval after which we are allowed to ask for the authentication again. If equals to zero, never ask again.
	uint32 ask_later_timeout = 3;
}

// A structure that specifies an extension authentication status.
message ExtensionAuthenticationStatus {

	// The ID of the user account the credentials belong to.
	int32 user = 1;

	// `EXTENSION_AUTHENTICATION_SPECIAL_USER_TYPE_NORMAL` for a user's own credentials, or the kind of vault-wide account.
	ExtensionAuthenticationSpecialUserType user_type = 2;

	// The `id` of the target.
	string connection_name = 3;

	// The account name on the external system.
	string account = 4;

	// True if no usable credentials are stored for this user and target.
	bool is_missing = 5;
}

// A structure that specifies an extension authentication target.
message ExtensionAuthenticationTarget {

	// The identifier of the target. Pass it as `target` to the other methods of [IRPCExtensionAuthentications](mfiles:MFiles.IRPCExtensionAuthentications).
	string id = 1;

	// The display name of the target.
	string name = 2;

	// An identifier of the target's icon.
	string icon_id = 3;

	// True if each user must store their own credentials for this target.
	bool requires_user_specific_authentication = 4;

	// The authentication methods the target accepts. The `name` of the chosen one goes to `ExtensionAuthenticationResponse.plugin_configuration`.
	repeated PluginInfo supported_plugins = 5;
}

// Common additional data shared by the External Link (sharing center) audit events.
message ExternalLinkEventData {

	// Information about the shared object.
	BasicDocVerInfo object_version_info = 1;

	// The name of the shared file.
	string file_name = 2;

	// True for an "anyone with the link" share, false for a visitor link.
	bool is_anyone_access_granted = 3;

	// Link-level access rights.
	ExternalSharedLinkAccessType external_shared_link_access_type = 4;

	// Visitor emails relevant to the event; empty for an "anyone with the link" share.
	repeated string visitor_emails = 5;

	// Expiration date relevant to the event (link or visitor). FILETIME_ZERO if not applicable.
	google.protobuf.Timestamp expiration_date_utc = 6;
}

// Struct for an external location specification.
message ExternalLocation {

	// External location ID.
	int32 id = 1;

	// Description.
	string description = 2;

	// ACL for new documents.
	AccessControlList object_acl = 3;

	// Object type.
	int32 object_type = 4;

	// The properties.
	repeated DefaultProperty object_properties = 5;

	// Flags.
	EXTLOCFLAGS options = 6;

	// The delay between automatic monitoring rounds in seconds.
	uint32 update_interval = 7;

	// The type of the source.
	ExtLocType type = 8;

	// The type-specific data as a union.
	ExtLocUnion data = 9;

	// Semicolon-separated list of semantic aliases.
	string aliases = 10;
}

// Struct for an external object type plugin service information.
message ExternalObjectTypePluginInfo {

	// The service identifier.
	string guid = 1;

	// The application name.
	string name = 2;

	// The application version (author set).
	string version = 3;

	// The application description.
	string description = 4;

	// The application publisher.
	string publisher = 5;

	// The configuration domain of the service.
	string configuration_domain_id = 6;

	// The initial page to open in configuration dialog.
	string initial_page_to_open = 7;

	// The object type IDs that have a configuration.
	repeated int32 object_types = 8;
}

// Struct for external repository icon and mapping information.
message ExternalRepositoryIcon {

	// The icon ID (external repository name and icon ID).
	ExternalRepositoryID id = 1;

	// The icon as an .ICO file byte presentation.
	Bytes data = 2;
}

// Item ID in external repository.
message ExternalRepositoryID {

	// The external repository connection identifier.
	string connection = 1;

	// External ID within the scope of the connection to external system.
	string item = 2;
}

// External view.
message ExternalView {

	// The view ID in external repository.
	ExternalRepositoryID id = 1;

	// The name of the view.
	string display_name = 2;

	// The icon ID.
	string external_repository_icon_id = 3;

	// The view's parent ID in external repository. May be uninitialized if the external view does not have a parent.
	ExternalRepositoryID parent_id = 4;

	// If not null, the object representation of the folder.
	ObjectVersionExWP object_data = 5;

	// Bit flags that provide information on the folder capabilities.
	FOLDERCAPABILITYFLAGS folder_capabilities = 6;

	// If set, ACL.
	AccessControlList acl = 7;
}

// Struct for External view folder and the parent folder information of the external view.
message ExternalViewWithParentLocation {

	// The location of the External view.
	repeated Folder parent_location = 1;

	// Resulting the Exterrnal view.
	ExternalView value = 2;

	// The pinned item id is the guid key referencing this item in pinboard.
	string pinned_item_id = 3;
}

// Union for extloc type specific data in ExternalLocation.
message ExtLocUnion {

	oneof data {

		// File source definition.
		FileSource file_source = 1;

		// Mail source definition.
		MailSource mail_source = 2;
	}
}

// Extended object info, typically used as an OUT parameter in RPC methods.
message ExtObjectInfo {

	// True if any version of the object is visible to the caller.
	bool is_visible = 1;

	// Object-level information, if `is_visible` is true.
	ObjectLevelInfo object_info = 2;

	// True if the latest version of the object is visible to the caller.
	bool is_latest_version_visible = 3;

	// The latest version of the object with its properties and ACL, if `is_latest_version_visible` is true. Some methods (for example UndoCheckout) return it without property values.
	ObjectVersionExWP latest_version = 4;

	// The object version the request named, as sent. The version part may be unset.
	ObjVer original_obj_ver = 5;
}

// A file of an object version: its identity and version, name, size, times and checksum.
message File {

	// The file and its version. Pass it unchanged in an `ObjFileVer` to download the file.
	FileVer file_ver = 1;

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

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

	// The size of the file in bytes. Exact when `size_precision` is `FILE_SIZE_PRECISION_EXACT`.
	int64 size = 4;

	// How exact `size` is. Do not rely on `size` if it is `FILE_SIZE_PRECISION_UNKNOWN`.
	FileSizePrecision size_precision = 5;

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

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

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

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

	// GUID of the file.
	string guid = 10;

	// The MD5 checksum of the file as 32 lowercase hexadecimal digits, if available.
	string md5_checksum = 11;

	// True, if the file is missing.
	bool is_missing = 12;

	// True, if the file physical content is volatile. I.e. the physical content can change without the version number change, as long as the logical content is same. The file content is guaranteed to stay physically consistent within single download session only.
	bool is_content_volatile = 13;

	// Object file flags.
	OBJECTFILEFLAGS flags = 14;

	// An optional File reference (GUID) to external Master Storage API. Only used with Master Storage, otherwise empty.
	string master_storage_file_ref = 15;
}

// Request details for generating a download key for downloading files from a single object.
message FileDownloadUrlRequestData {

	// The object version to download files from with the key. Not used if uploadID is not zero or fileRef is not empty.
	ObjVer obj_ver = 1;

	// File IDs in the object version to download with the key. Not used if uploadID is not zero or fileRef is not empty.
	repeated FileID file_ids = 2;

	// The identifier of the upload operation (from UploadTempFile or UploadTempFileCommit). If this is not zero, objVer and fileIds are ignored, and the download key is generated for downloading the file uploaded in the upload operation identified by this parameter.
	int32 upload_id = 3;

	// If not empty, the file_ref of a stateless upload ended with FileUploadEnd, and the download key is generated for downloading it; objVer and fileIds are ignored. At most one of uploadID and fileRef may be set.
	string file_ref = 4;

	// The extension of the file, not including the dot (e.g. "doc"). Used with fileRef only, as a file_ref has no file name.
	string extension = 5;
}

// Identifies a file of an object across its versions.
message FileID {

	// `FILE_IDTYPE_SPECIFIC` for one file.
	FileIDType type = 1;

	// The file ID.
	int32 internal_id = 2;

	// Used only for files in external repositories. Leave empty.
	string external_repository_id = 3;
}

// File info for file data indexing.
message FileInfoForFIX {

	// File version.
	ObjFileVer obj_file_ver = 1;

	// True if the file has been destroyed and is no longer available. If true then only the objfilever member is valid.
	bool is_destroyed = 2;

	// Data file version if the file is an internal file.
	int32 data_file_version = 3;

	// The logical size of the file in bytes.
	int64 size = 4;

	// The file extension, not including the dot (e.g. "doc"). This unencoded extension may contain characters that are not allowed in file extensions in file systems.
	string extension = 5;

	// Relevance score of the object.
	float relevance_score = 6;

	// All file IDs of the object's LCI version.
	repeated FileID file_ids = 7;

	// Logical timestamp for indexing.
	LogicalTimestamp timestamp = 8;

	// If not null contains the basic object version information. The search results are returned from the server using this information with external content repositories.
	ObjectVersionExWP object_data = 9;

	// The last modified timestamp for indexing.
	google.protobuf.Timestamp last_modified_for_indexing = 10;

	// If not null contains the array of folders describing the repository path to the object version location. The search results are returned from the server using this information with external content repositories.
	FolderArray repository_path = 11;
}

// Master Storage malware verdict for a single file. Returned by
// GetFileMalwareInfo. An empty / null pwszDescription means the file is either
// clean OR the verdict is not available (vault has no SPE configured, file has no
// master-storage ref, or Master Storage was unreachable). Clients should treat
// "absence of description" as "no warning to show"; the actual security guarantee
// is enforced at download time by DownloadDefenderHelper::RunCheck.
message FileMalwareInfo {

	// Malware description from Master Storage when the file is flagged. Empty / null means "no warning".
	string description = 1;
}

// The size and checksum of the content of a download.
message FileOutline {

	// The size of the content in bytes, in the downloaded format.
	int64 size = 1;

	// The file size precision. If the file size precision is 'exact', the size can be used for reading the file content. If the precision is 'unknown', the size field should not be used at all.
	FileSizePrecision size_precision = 2;

	// The MD5 checksum as 32 hexadecimal digits, if requested; 32 zeros otherwise.
	string md5_checksum = 3;
}

// A single Purview / SPE sensitivity label attached to a file. Mirrors the
// C# FileSensitivityLabel: the string fields are nullable from the source JSON,
// so the wrapper preserves nulls instead of forcing empty strings. bHasProtection
// is a plain boolean: when the source JSON omits "hasProtection" it defaults to
// FALSE, which is the safe value for this advisory-only UX hint.
message FileSensitivityLabel {

	// Stable identifier of the label. May be null.
	string label_id = 1;

	// Human-readable display name. May be null.
	string label_name = 2;

	// Hover tooltip text. May be null.
	string tooltip = 3;

	// Color hint (e.g. "#FF0000"). May be null.
	string color = 4;

	// TRUE if the label applies encryption/rights-protection. Defaults to FALSE when absent.
	bool has_protection = 5;
}

// Result of GetSensitivityLabels. Carries the (possibly empty) list of
// Purview / SPE sensitivity labels attached to a single file. An empty array
// means any of: feature flag off, vault not SPE-enabled, file has no
// master-storage ref, unsupported extension, or Master Storage was
// unreachable / returned unparseable JSON. The client must treat "empty" as
// "show nothing" - this call is an advisory UX hint, never a security gate.
message FileSensitivityLabelInfo {

	// Labels attached to the file.
	repeated FileSensitivityLabel labels = 1;
}

// File source specific fields.
message FileSource {

	// The full path of the external location. Can be a UNC path.
	string path = 1;

	// Include filters.
	repeated string include_filters = 2;

	// Exclude filters.
	repeated string exclude_filters = 3;

	// Impersonation information for accessing the path.
	Impersonation impersonation = 4;

	// True if subfolders should be processed as well.
	bool include_subfolders = 5;

	// True to link files, false to import files.
	bool link_files = 6;

	// True if source files should be deleted after importing.
	bool delete_source_files_after_importing = 7;

	// True to convert the imported file into a searchable PDF file.
	bool convert_to_searchable_pdf = 8;

	// Empty, or a language identifier for the OCR operation (e.g. "eng" or "fin", see MLanguage.h).
	string pdf_ocr_language = 9;

	// True to read values from an XML file that has the same name as the imported file.
	bool read_property_xml_file = 10;

	// True to delete the XML file after use.
	bool delete_property_xml_file = 11;

	// Use PDF/A format. Ignored if bConvertToSearchablePDF is not true.
	bool use_pdf_archiving_standard = 12;

	// Use hyper-compression to make PDF files smaller. Ignored if bConvertToSearchablePDF is not true.
	bool use_pdf_hyper_compression = 13;
}

// Identifies one version of a file.
//
// Use the `file_ver` of a [File](mfiles:MFiles.File) returned by the server. The download methods
// and `GetFileSize` need a specific file version: `FILE_VER_TYPE_LATEST` fails with "Not found.
// (File <id>-0 not found.)". To find the latest version of a file, use `GetLatestFileVersion`.
message FileVer {

	// The file.
	FileID file_id = 1;

	// `FILE_VER_TYPE_SPECIFIC` for a file version number.
	FileVerType type = 2;

	// The file version number.
	int32 internal_version = 3;

	// Used only for files in external repositories. Leave empty.
	string external_repository_version = 4;

	// Used only for files in external repositories. Leave 0.
	int64 external_repository_sort_key = 5;
}

// This struct contains just an array of FileVers.
message FileVerArray {

	// Items.
	repeated FileVer value = 1;
}

// Struct for a single folder.
message Folder {

	// The type of the folder, for example `FOLDER_TYPE_VIEW_FOLDER` or `FOLDER_TYPE_PROPERTY_FOLDER`.
	FolderType type = 1;

	// Additional folder type -specific information as a union.
	FolderInfoUnion data = 2;
}

// This struct contains just an array of Folder structures.
message FolderArray {

	// Array of Folder structures.
	repeated Folder value = 1;
}

// Request details for generating a download key for downloading single folder contents.
message FolderContentDownloadUrlRequestData {

	// Array of folders defining the folder contents to download.
	repeated Folder folders = 1;
}

// Represents full data of a folder in M-Files.
message FolderData {

	// The type of the folder (eg. eftViewFolder).
	FolderType type = 1;

	// Additional folder type -specific data as a union.
	FolderDataUnion data = 2;

	// Array of folders describing the exact location of the folder. If null, the caller must resolve the location by walking the parent chain.
	FolderArray folder_location = 3;

	// The display name of the folder location. Describes the location (e.g. full path) rather than the actual name. Specified only if the location data is specified, too.
	string folder_location_name = 4;
}

// Union for folder type -specific data in FolderData.
message FolderDataUnion {

	oneof data {

		FolderDataUnion.ViewFolderData view_folder = 2;

		FolderDataUnion.ExternalViewFolderData external_view_folder = 6;
	}

	message UnknownFolderDataData {
	}

	message ViewFolderData {

		// The view.
		View view = 1;
	}

	message ExternalViewFolderData {

		// The external view.
		ExternalView external_view = 1;
	}
}

// Union for folder type -specific data in Folder.
message FolderInfoUnion {

	oneof data {

		// Any folder type.
		FolderInfoUnion.AnyFolderData any_folder = 1;

		// View folder type.
		FolderInfoUnion.ViewFolderData view_folder = 2;

		// Property (virtual) folder type.
		FolderInfoUnion.PropertyFolderData property_folder = 3;

		// Traditional folder type.
		FolderInfoUnion.TraditionalFolderData traditional_folder = 4;

		// Search folder (extended view folder) type.
		FolderInfoUnion.SearchFolderData search_folder = 5;

		// External view folder type.
		FolderInfoUnion.ExternalViewFolderData external_view_folder = 6;
	}

	// Unknown folder type, used as default value. This value is never used in actual folders and serves only as a placeholder for uninitialized folders.
	message UnknownFolderData {
	}

	// Any folder type.
	message AnyFolderData {
	}

	// View folder type.
	message ViewFolderData {

		// The view ID.
		int32 id = 1;
	}

	// Property (virtual) folder type.
	message PropertyFolderData {

		// The typed value that defines the identity of this property folder (e.g. a lookup value).
		TypedValue typed_value = 1;
	}

	// Traditional folder type.
	message TraditionalFolderData {

		// The traditional folder ID.
		int32 value_list_item_id = 1;
	}

	// Search folder (extended view folder) type.
	message SearchFolderData {

		// The search definition that contains the view levels and search conditions of this search folder.
		SearchDef search_definition = 1;
	}

	// External view folder type.
	message ExternalViewFolderData {

		// The view id in external repository.
		ExternalRepositoryID external_repository_folder_id = 1;
	}
}

// Folder Listing Column.
message FolderListingColumn {

	// The column ID; the property definition ID or a pseudo-ID.
	int32 id = 1;

	// Specifies whether the column is visible.
	bool is_visible = 2;

	// Specifies the column width.
	int32 width = 3;

	// Specifies the position for a visible column.
	int32 position = 4;
}

// Folder Listing Column Sorting.
message FolderListingColumnSorting {

	// The column ID to be sorted; the property definition ID or a pseudo-ID.
	int32 id = 1;

	// True to sort ascending, false to sort descending.
	bool sort_ascending = 2;
}

// Folder Listing UIState.
message FolderListingUIState {

	// The Columns.
	repeated FolderListingColumn columns = 1;

	// The ColumnSortings.
	repeated FolderListingColumnSorting column_sorting = 2;

	// The listing view mode.
	FolderListingViewMode view_mode = 3;

	// The listing item grouping mode.
	FOLDERLISTINGITEMGROUPINGMODEFLAGS item_grouping_mode = 4;

	// The listing item icon size.
	int32 icon_size = 5;

	// The results per page option.
	uint32 results_per_page = 6;
}

// A folder to create. The tree is submitted as a flat list; a node refers to its parent by list index.
message FolderTreeNode {

	// The folder name.
	string name = 1;

	// The index of the parent node in the list, or -1 for a top-level folder. Must be smaller than the node's own index (parents come first).
	int32 parent_index = 2;
}

// The result for one submitted folder. The result list has one entry per submitted node, in the same order.
message FolderTreeNodeResult {

	// True when a deleted same-named folder was restored, false when a new folder was created.
	bool restored = 1;

	// The ID of the folder.
	int32 folder_id = 2;

	// The name actually used.
	string name = 3;

	// True when the rename policy changed the name.
	bool renamed = 4;
}

// Folder UIState.
message FolderUIState {

	// The ID that describes the folder.
	UISettingsFolderID folder_id = 1;

	// Specifies shell folder type.
	ShellFolderType folder_type = 2;

	// Specifies whether the right pane is displayed.
	bool show_right_pane = 3;

	// Specifies whether the bottom pane is displayed.
	bool show_bottom_pane = 4;

	// Specifies whether the bottom pane is minimized.
	bool is_bottom_pane_minimized = 5;

	// Specifies whether the right pane is minimized.
	bool is_right_pane_minimized = 6;

	// Specifies whether the metadata editor is displayed in the right pane. If false, the metadata editor appears in the bottom pane.
	bool show_metadata_editorn_right_pane = 7;

	// Specifies whether hit highlighting in file content is enabled.
	bool is_hit_highlighting_enabled = 8;

	// Specifies the bottom pane height. The height is relative to the size of the frame window holding the bottom pane bar.
	int32 bottom_pane_height = 9;

	// Specifies the right pane width.
	int32 right_pane_width = 10;

	// Specifies whether the task area is displayed.
	bool show_task_pane = 11;

	// Specifies whether the task area is minimized.
	bool is_task_pane_minimized = 12;

	// The listing UI state.
	FolderListingUIState listing_ui_state = 13;
}

// Wrapped string.
message FullTextSearchInfo {

	// Array of languages that language analyzers support (String).
	repeated string supported_languages = 1;
}

// Wrapped string.
message FullTextSearchLanguage {

	// The primary full-text search language.
	string primary_language = 1;

	// Array of additional languages (String).
	repeated string additional_languages = 2;
}

// Extended expression (used to describe a view level, for example).
message GroupingLevel {

	// Basic data.
	Expression expression = 1;

	// True to show empty folders, false to hide them.
	bool show_folders_without_objects = 2;

	// True to show the unset folder, false to hide it.
	bool show_empty_value_folder = 3;

	// True to show the contents of the unset folder directly on this level.
	bool show_objects_with_empty_value = 4;

	// True to show the matching objects directly on this level.
	bool show_matching_values_on_this_level = 5;

	// The conditions that limit the values (property folders) of this expression.
	repeated SearchCondition property_folder_filter = 6;

	// The name of the unset folder. If unset or an empty string, the default localized name is used.
	string empty_value_folder_name = 7;

	// True if the contents of this view level should be created on-demand only.
	bool show_only_user_selected_folders = 8;

	// Folder listing algorithm used to determine matching property folders on this intermediate view level.
	FolderListingAlgorithm subfolder_algorithm = 9;

	// Bit flags that provide additional information on the extended expression.
	uint32 options_obsolete = 10;

	// Bit flags that provide additional information on the extended expression.
	EXPRESSIONEXFLAGS options = 13;

	// The ID of the object type to group-by in this view level.
	int32 expression_object_type = 11;

	// True if the result objects are referred from this view level.
	bool reference_direction = 12;
}

// Historical typed value represents a typed value at a certain moment.
message HistoricalTypedValue {

	// Historical value's timestamp.
	google.protobuf.Timestamp timestamp = 1;

	// Object's version from which the value has been originated.
	int32 version = 2;

	// The historical value.
	TypedValue value = 3;
}

// Historical typed value represents a typed value at a certain moment.
message HistoricalTypedValueArray {

	// Items.
	repeated HistoricalTypedValue value = 1;
}

// Struct for an impersonation specification.
message Impersonation {

	// Impersonation type.
	ImpersonationType type = 1;

	// Account name (e.g. DOMAIN\user).
	string account = 2;

	// Encrypted password.
	bytes encrypted_password = 3;
}

// Holds the enabled status of the index.
message IndexEnabled {

	// If true, this index is enabled.
	bool enabled = 1;

	// If true, this index is enabled for searching. The general "Enabled" setting must also be true for the index to actually be enabled for searching.
	bool enabled_for_searching = 2;

	// If true, this index is enabled for indexing. The general "Enabled" setting must also be true for the index to actually be enabled for indexing.
	bool enabled_for_indexing = 3;
}

// Description of an indexer partition.
message IndexerPartition {

	// Specifies how the indexing is partitioned.
	IndexerPartitioningRule rule = 1;

	// Zero-based identifier of the partition.
	uint32 id = 2;
}

// Rule that specifies how the indexing is partitioned / done in parallel.
message IndexerPartitioningRule {

	// The indexer partitioning mode.
	IndexerPartitioningMode mode = 1;

	// Total count of partitions / parallel indexers.
	uint32 partition_count = 2;
}

// Index for search.
message IndexForSearch {

	// The exact name or prefix of the index to use on the server. If empty, indicates the default index.
	string name = 1;

	// Identifies the search engine.
	SearchEngine search_engine = 2;
}

// Indexing request.
message IndexingRequest {

	// Control flags for the request.
	uint32 options_obsolete = 1;

	// Control flags for the request.
	INDEXINGREQUESTFLAGS options = 7;

	// Identifies the index.
	IndexName index_name = 2;

	// If not null, identifies auxiliary indexer that consumes the data.
	string auxiliary_indexer_id = 3;

	// If set, specifies how to partition the candidate objects for this caller.
	IndexerPartition partition = 4;

	// The last indexed logical timestamp. Ignored if its type is `LOGICAL_TIMESTAMP_TYPE_IGNORED`.
	LogicalTimestamp last_indexed_timestamp = 5;

	// Change Tracking version from last indexed logical timestamp.
	LogicalTimestamp last_change_tracking_timestamp = 6;

	// Defines if indexer making the request is of type internal (legacy) or external.
	IndexerLocation indexer_location = 8;
}

// Struct for array of index management operations.
message IndexManagementOperationArray {

	// An array of the IndexManagementOperation enums.
	repeated IndexManagementOperation index_management_operations = 1;
}

// Data of one index management operation.
message IndexManagementOperationData {

	// The name of the index.
	IndexName name = 1;

	// Operation to be executed.
	IndexManagementOperation operation = 2;
}

// Identifies an index within the vault.
message IndexName {

	// The name of the index configuration.
	string configuration_name = 1;

	// Identifies the external repository connection.
	string repository_connection = 2;

	// The index configuration type (e.g., Shared versus Legacy).
	IndexConfigurationType configuration_type = 3;
}

// Options of one index within the vault.
message IndexOptions {

	// The name of the index.
	IndexName name = 1;

	// The type of the data the indexer can index.
	IndexedDataType data_type = 2;

	// Identifies the search engine.
	SearchEngine search_engine = 3;

	// The enabled status of the index in the current storage.
	IndexEnabled enabled_in_storage = 4;

	// The effective enabled status.
	IndexEnabled enabled_effective = 5;

	// True, if the index is set as an active index.
	bool active = 6;

	// True, if the physical index can contain multiple repositories.
	bool multi_repository = 7;

	// Specifies notifications of the given index.
	INDEXNOTIFICATIONFLAGS notifications = 8;

	// True, if the index exists implicitly. For example, if the index is default index that exists regardless of configuration.
	bool exists_implicitly = 9;

	// Operations user is allowed to perform with this index.
	IndexManagementOperationArray allowed_operations = 10;
}

// Property definition or object type
message IndirectionLevel {

	// True if `id` is a property definition ID; false if it is an object type ID. An object type level follows a reference to an object of that type through any property.
	bool type = 1;

	// The property definition ID or object type ID to follow.
	int32 id = 2;

	// IndirectionLevel Type values.
	enum IndirectionLevelType {

		// The level is an object type (`type` false).
		INDIRECTION_LEVEL_TYPE_OBJECT_TYPE = 0;

		// The level is a property definition (`type` true).
		INDIRECTION_LEVEL_TYPE_PROPERTY_DEF = 1;
	}
}

// Indirect property ID.
message IndirectPropertyID {

	// Indirection levels.
	repeated IndirectPropertyIDLevel levels = 1;
}

// Indirect property ID level.
message IndirectPropertyIDLevel {

	// ID reference part of this level.
	IndirectPropertyIDLevelRef level_ref = 1;

	// If set, this level is bound to this particular object version.
	ObjVer obj_ver = 2;
}

// Indirect property ID level reference.
message IndirectPropertyIDLevelRef {

	// Reference type selector.
	IndirectPropertyIDLevelType type = 1;

	// ID. Semantics depend on the type selector. For eipidltPropertyDef, this is the ID of a property definition. For eipidltObjectType, this is the ID of an object type. For eipidltStateChanger, this is the ID of a workflow state (a state ID uniquely identifies the state, states of different workflows always have different IDs).
	int32 id = 2;

	// Reference direction. Either From (Forward) or To (Reverse).
	ReferenceDirection reference_direction = 3;

	// The object type whose objects establish the To direction. Ignored if the reference direction is From.
	int32 to_object_type = 4;
}

// The definition of an EventHandler struct.
message InternalEventHandler {

	// The event type the handler is associated with.
	InternalEventType event_type = 1;

	// The sort index defines the order in which the event handlers are executed in response to an event.
	int32 sort_index = 2;

	// True when this handler is active and is executed in response to events.
	bool is_active = 3;

	// Description of the event handler. A user friendly identifier for the event handler.
	string description = 4;

	// The actual code for the event handler that is executed in response an event..
	string code = 5;

	// GUID for the event handler.
	string guid = 6;
}

// Item ID. Can be used to represent any item identity, that can be located natively in M-Files or in external system. E.g. value list item id or object id.
message ItemID {

	// The ID of the object or value list item.
	int32 internal_id = 1;

	// Used only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault.
	ExternalRepositoryID external_repository_id = 2;
}

// Information about the item (value list item or object).
message ItemInfo {

	// The object id or value list item id. Includes the object type or value list id.
	ObjID obj_id = 1;

	// The name of the item.
	string name = 2;

	// The status of this item's external ID.
	ExtIDStatus external_id_status = 3;

	// The external ID (display ID) of this item. unset means that the external ID is the same as the internal ID.
	string external_id = 4;

	// GUID for the item.
	string guid = 5;

	// Bit flags that provide additional information on the item (e.g. is the object deleted).
	ITEMFLAGS options = 6;

	// The ID of the item's icon.
	string external_repository_icon_id = 7;
}

// Struct for all translated names of an item.
message ItemNames {

	// Object ID.
	ObjID obj_id = 1;

	// Translated names.
	repeated TransName translations = 2;
}

// Union for job data (depends on job type).
message JobDataUnion {

	oneof data {

		// Backup job.
		BackupJob backup = 1;

		// Restore job.
		RestoreJob restore = 2;

		// Vault copying job.
		CopyVaultJob copy_vault = 3;

		// Vault verifying job.
		VerifyVaultJob verify_vault = 4;

		// Archiving documents job.
		ArchiveDocsJob archive_objects = 5;

		// Archiving old document versions job.
		ArchiveOldVersionsJob archive_old_versions = 6;

		// Restoring documents from archive job.
		RestoreFromArchiveJob restore_from_archive = 7;

		// Optimize the vault.
		OptimizeVaultJob optimize_vault = 8;

		// Recalculate a property.
		RecalculateJob recalculate_property = 9;

		// Vault migration job.
		MigrateVaultJob migrate_vault = 10;

		// Vault file data encryption job.
		EncryptFileDataJob encrypt_file_data = 11;
	}
}

// Union for job output info data (depends on job type).
message JobOutputInfoDataUnion {

	oneof data {

		// Output info for restore job.
		RestoreJobOutputInfo restore = 2;

		// Output info for vault copying job.
		CopyVaultJobOutputInfo copy_vault = 3;

		// Output info for vault verifying job.
		VerifyVaultJobOutputInfo verify_vault = 4;

		// Output info for archiving documents job.
		ArchiveDocsJobOutputInfo archive_objects = 5;

		// Output info for archiving old document versions job.
		ArchiveOldVersionsJobOutputInfo archive_old_versions = 6;

		// Output info for restoring documents job.
		RestoreFromArchiveJobOutputInfo restore_from_archive = 7;

		// Output info for vault optimization job.
		OptimizeVaultJobOutputInfo optimize_vault = 8;
	}
}

// Key-name pair.
message KeyNamePair {

	// The unique key of the item.
	int32 key = 1;

	// The display name of the item.
	string name = 2;
}

// Language.
message Language {

	// Language ID.
	int32 id = 1;

	// The name of the language.
	string name = 2;

	// Language indentifier, e.g. the ISO 639-1 or ISO 639-2 language code such as "en" or "eng".
	string language_code = 3;
}

// Struct for the results of detecting the language of plain text.
message LanguageDetectionResult {

	// The detected language specified by ISO 639-1 Language Code.
	string language = 1;

	// The confidence of the detected language which represents a percentage.
	uint32 confidence = 2;
}

// Object version and its latest comment.
message LatestVersionComment {

	// Latest comment. The typed value is unset if no latest comment is available.
	VersionComment comment = 1;

	// True if there are multiple comments available for the object.
	bool more_comments_available = 2;
}

// Logical timestamp.
message LogicalTimestamp {

	// Logical timestamp type.
	LogicalTimestampType type = 1;

	// The data as a union.
	LogicalTimestampUnion data = 2;
}

// Wrapped LARGE_INTEGER vector.
message LogicalTimestampInteger {

	// Slot for tracking normal modifications (in FIFO order).
	LogicalTimestampIntegerSlot modifications = 1;

	// Slot for tracking normal modifications in LIFO order.
	LogicalTimestampIntegerSlot modifications_li_fo = 2;

	// Slot for tracking quick indexing of modifications.
	LogicalTimestampIntegerSlot modifications_quick_index = 3;

	// Slot for tracking ACL modifications.
	LogicalTimestampIntegerSlot acl_modifications = 4;

	// Slot for tracking destructions.
	LogicalTimestampIntegerSlot destructions = 5;

	// Slot for tracking quick indexing of destructions.
	LogicalTimestampIntegerSlot destructions_quick_index = 6;
}

// Logical timestamp int64 vector and string (two logical timestamps).
message LogicalTimestampIntegerAndString {

	// Logical timestamp as an int64 vector.
	LogicalTimestampInteger integer = 1;

	// Logical timestamp as a string.
	LogicalTimestampString string = 2;
}

// LogicalTimestampInteger slot.
message LogicalTimestampIntegerSlot {

	// Priority separation mode.
	LogicalTimestampIntegerPrioritySeparationMode mode = 1;

	// User-initiated timestamp value, or unseparated value for all changes, depending on the separation mode.
	int64 user_or_all = 2;

	// System-initiated timestamp value.
	int64 system = 3;
}

// Wrapped string.
message LogicalTimestampString {

	// Logical timestamp as a string.
	string timestamp = 1;

	// Chronological timestamp when the logical timestamp was created.
	google.protobuf.Timestamp created_at_utc = 2;
}

// Union for logical timestamp data (depends on type).
message LogicalTimestampUnion {

	oneof data {

		// Logical timestamp as an int64 vector.
		LogicalTimestampInteger integer = 2;

		// String.
		LogicalTimestampString string = 3;

		// Integer and string.
		LogicalTimestampIntegerAndString integer_and_string = 4;
	}
}

// Struct for a login.
message Login {

	// Account type (e.g. M-Files or Windows).
	AccountType account_type = 1;

	// Domain name, if acctype is eAccountTypeWindows. Otherwise unset.
	string domain_name = 2;

	// User name. Cannot be unset.
	string user_name = 3;

	// Bitmask of the server roles of the login.
	SRVROLES options = 4;

	// The full name of the user. May be unset.
	string full_name = 5;

	// The email address of the user. May be unset.
	string email_address = 6;

	// License type.
	LicenseType license_type = 7;

	// Credential type.
	CredentialType credential_type = 8;

	// Client ID, if credentialtype is eCredentialTypeTechnical. Otherwise unset.
	string client_id = 9;

	// The user identity in external system, such as Microsoft Entra (where the identity is a GUID).
	string external_id = 10;
}

// Which vault to log in to, and options for the new session.
message LoginData {

	// The host name the client used to reach the server. Optional for user name and password logins. Anonymous logins, and server-level logins on servers with vault login accounts, use it to find the vault configured for that host name.
	string server_hostname = 1;

	// The vault to log in to, as a GUID string with or without braces, in any case. Use `{00000000-0000-0000-0000-000000000000}` for a server-level session; an empty string is rejected with `E_MFILES_INVALID_VAULT_GUID_X_DESC`.
	string vault_guid = 2;

	// True for administrative tools that manage the vault rather than work with documents, as M-Files Admin does. Applications leave it false.
	bool is_administrative = 3;

	// Optional. Requests a longer idle timeout for a vault session. Honored only when it is at least the server's session timeout and at most 7 days (or the server timeout if that is longer); otherwise, and for server-level sessions, the server timeout applies. The effective value shows as `SessionData.keep_alive_interval_in_seconds`, which is half of it.
	uint32 client_session_timeout_in_seconds = 4;
}

// One selected value list item or object in a lookup value.
//
// To set a lookup, `value_list_item_info.obj_id` is enough: the value list ID (for a lookup to
// objects, the object type ID) in `type` and the item ID in `item_id.internal_id`. In values read
// from the server, `value_list_item_info` also has the item's `name`, `guid` and `external_id`, and
// `version` is `OBJ_VER_VERSION_TYPE_LATEST` with `internal_version` -1.
message Lookup {

	// The selected item. Only `obj_id` is needed when setting a value.
	ItemInfo value_list_item_info = 1;

	// The version of the selected object. The server returns `OBJ_VER_VERSION_TYPE_LATEST` (-1), meaning the latest version.
	ObjVerVersion version = 2;
}

// One list to read in a [GetLookupItems](mfiles:MFiles.IRPCValueLists.GetLookupItems) call.
message LookupItemRequest {

	// For a list connected to an external database: whether to refresh it from the database before the read. `EXT_DBREFRESH_TYPE_NONE` reads the items the vault already has.
	ExtDBRefreshType external_data_source_refresh = 1;

	// The ID of the value list or object type whose items are wanted.
	int32 value_list_id = 2;

	// The ID of the lookup property being edited, to apply its value filter (`PropertyDef.value_list_item_filter`), or -1 for no filter. Set -1 explicitly: the default 0 is a real property definition ID (Name or title).
	int32 property_def = 3;

	// Item conditions, combined with AND, on the item pseudo properties 1-8 (for example 2 = name); see the [IRPCValueLists](mfiles:MFiles.IRPCValueLists) overview. Deleted items are left out unless the condition Deleted (5) equal to true is given.
	repeated SearchCondition search_conditions = 4;

	// The maximum number of items to return. Unset or 0 returns all.
	optional uint32 results_limit = 5;
}

// The items of one list in a [GetLookupItems](mfiles:MFiles.IRPCValueLists.GetLookupItems)
// response, in the same position as its request.
message LookupItemResponse {

	// The `value_list_id` of the request.
	int32 value_list_id = 1;

	// The matching items, with permissions if the request had `include_permissions`. In hierarchical lists the parents of matching items are included.
	repeated ValueListItemData items = 2;

	// True if more items matched than `results_limit` allowed.
	bool has_more_results = 3;
}

// Single-value lookup datatype.
message LookupWithMetadata {

	// Item info (e.g. IDs (internal and external), GUID, flags, and name).
	ItemInfo value_list_item_info = 1;

	// The version number of the item. If eObjVerVersionTypeLatest, refers to the latest checked-in version of the item.
	ObjVerVersion version = 2;

	// The metadata about the typed value.
	TypedValueMetadata value_metadata = 3;
}

// Mail source specific fields.
message MailSource {

	// The e-mail protocol to use.
	MailProtocol protocol = 1;

	// The name or address of the mail server.
	string server = 2;

	// Login information for accessing the mail server.
	Impersonation impersonation = 3;

	// Mail server port.
	uint32 port = 4;

	// True to use SSL when communicating with the server.
	bool use_ssl = 5;

	// Timeout for server communication (in seconds).
	uint32 connection_timeout = 6;

	// Mailbox folder name (IMAP4 only).
	string imap_folder = 7;

	// True to delete the message after importing.
	bool delete_after_import = 8;

	// True to remove attachments from the original message on the server.
	bool remove_attachments_from_server = 9;

	// True to include attachments.
	bool include_attachments = 10;

	// True to import only messages that contain attachments.
	bool only_messages_with_attachments = 11;

	// True to convert HTML messages to plain text.
	bool convert_body_to_plain_text = 12;

	// True to save the message body into a file.
	bool save_body_to_file = 13;

	// True if the attachments should be saved as a part of the message.
	bool embed_attachments = 14;

	// The storage format in which the emails are stored.
	MailStorageFormat storage_format = 15;

	// Maximum e-mail age. After this the e-mails will be archived.
	uint32 max_email_age_in_days = 16;

	// The authentication method to use.
	MailSourceAuthType mail_source_auth_type = 17;

	// OAuth2 specific data.
	MailSourceOauth2 mail_source_oauth2 = 18;
}

// Struct for OAuth2 specific external mail source data.
message MailSourceOauth2 {

	// OAuth2 service to use.
	MailSourceOauth2Type type = 1;

	// Authentication status.
	MailSourceOauth2Status status = 2;

	// Information about the authenticated user (account name etc.).
	string user_info = 3;

	// Configuration for authentication in JSON format as name-value pairs. Use names as defined in OAuth2 standard.
	string configuration = 4;

	// Token cache. For Google OAuth2 this is in JSON format. For MSAL this is in its internal binary format.
	bytes token_cache = 5;

	// Proxy address if used.
	string proxy_address = 6;
}

// MetadataStructureAliases.
message MetadataStructureAliases {

	// StructureAlias array related to the class.
	repeated StructureAlias class_metadatas = 1;

	// StructureAlias array related to the objecttype.
	repeated StructureAlias object_types = 2;

	// StructureAlias array related to the propertydef.
	repeated StructureAlias property_defs = 3;

	// StructureAlias array related to the workflow.
	repeated StructureAlias workflows = 4;

	// StructureAlias array related to the state.
	repeated StructureAlias states = 5;

	// StructureAlias array related to the StateTransition.
	repeated StructureAlias state_transitions = 6;

	// StructureAlias array related to the NamedACL.
	repeated StructureAlias named_acls = 7;

	// StructureAlias array related to the usergroup.
	repeated StructureAlias user_groups = 8;

	// StructureAlias array related to the ValueList.
	repeated StructureAlias value_lists = 9;
}

// Struct for a metadata structure anomaly.
message MetadataStructureAnomaly {

	// The anomaly context.
	MetadataStructureContext context = 1;

	// The anomaly description.
	string description = 2;

	// The call stack of this anomaly occurrence.
	string callstack = 3;
}

// Struct for a metadata structure context.
message MetadataStructureContext {

	// The structure element type of the context.
	MetadataStructureItem context_type = 1;

	// The GUID of the source.
	string guid = 2;

	// The internal ID of the source.
	int32 id = 3;

	// The internal type ID of the source. Relevant for value list items only, otherwise ignored.
	int32 type_id = 4;

	// The name of the source.
	string name = 5;
}

// This struct contains an array of MetadataStructureItem values.
message MetadataStructureItemArray {

	// An array of the MetadataStructureItem values.
	repeated MetadataStructureItem value = 1;
}

// Struct for a named reference of a metadata structure item.
message MetadataStructureNamedReference {

	// The structure element type.
	MetadataStructureItem reference_type = 1;

	// The name part of the named reference.
	string name = 2;

	// The internal ID of the structure element.
	int32 element_id = 3;

	// The internal ID of the structure element type. Relevant for MetadataStructureItem::valueListItem only, otherwise ignored.
	int32 type_id = 4;
}

// Struct for a metadata structure resource reference. Carries the resource content either
// inline as a data URI, or as a relative path. At most one of the two is set.
message MetadataStructureResourceRef {

	// Data URI carrying the content inline.
	string uri = 1;

	// Relative path to the content.
	string path = 2;
}

// Struct for one extracted credential. The name identifies the property and field the
// credential belongs to (e.g. "external.connectionString#PASSWORD"); the reference carries
// the credential itself, inline as a data URI.
message MetadataStructureSecretRef {

	// Reference name.
	string name = 1;

	// The credential payload.
	MetadataStructureResourceRef ref = 2;
}

// Struct for a selecting out a metadata item or group of metadata itmes.
message MetadataStructureSelector {

	// A friendly name for the selector. May be used to display the reasoning for the metadata structure item selection for a human (may be included in the preview xml).
	string name = 1;

	// Optional identificator for the selector. May be used to indicate the reasoning for the metadata structure item selection for a computer (may be included in the preview xml).
	string id = 2;

	// Metadata structure item type to select.
	MetadataStructureItem item_type = 3;

	// The GUID of item to select. The primary selector. Not used it the value is GUID_NULL.
	string item_guid = 4;

	// A semantic alias of the item to select. Applied if the guid is not used. Not used if the value is empty string.
	string item_alias = 5;

	// Id of the item to select. Will be used if no guid nor alias are specified.
	int32 item_id = 6;

	// Bit flags that control the metadata structure selection.
	METADATASTRUCTURESELECTORFLAGS options = 7;
}

// Migrated object info.
message MigratedObjectInfo {

	// Extended object information.
	ExtObjectInfo object_info = 1;

	// True if the source object policy has been fulfilled after the migration.
	bool is_migration_source_object_policy_fulfilled = 2;

	// Holds an error code if IsMigrationSourceObjectPolicyFulfilled = false.
	int32 error_code = 3;
}

// Struct for a parameter set for MigrateObject.
message MigrateObjectParams {

	// The object to migrate.
	ObjID obj_id = 1;

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

	// Specifies what is done to the source object after the migration.
	MigrationSourceObjectPolicy source_object_policy = 3;
}

// Struct for a vault migration job.
message MigrateVaultJob {

	// Vault migration type (e.g. full or file data only).
	VaultMigrationType type = 1;

	// The vault to migrate. Holds information on the target database engine, for example.
	Vault target_vault = 2;
}

// Struct for a set of monitoring datapoints for the beginning of an indexing operation.
message MonitoringDatapointsForIndexingBegin {

	// If not eimUnknown, identifies the current indexing mode.
	IndexingMode batch_mode = 1;

	// If set, identifies the starting logical timestamp string. unset indicates "not applicable".
	StringValue start_position = 2;

	// If not a zero timestamp, identifies the time (in UTC) of the counter of the items to process.
	google.protobuf.Timestamp items_to_process_at = 3;

	// If not -1, specifies the total number of the items to be processed (partitioning ignored).
	int32 items_to_process_total = 4;

	// If not -1, specifies the possibly approximated number of the items to be processed partition-wise.
	int32 items_to_process = 5;
}

// Struct for a common set of monitoring datapoints for indexing.
message MonitoringDatapointsForIndexingCommon {

	// If set, specifies the index data format capabilities. unset indicates "not applicable".
	StringValue capabilities = 1;

	// If not -1, specifies the index size as item count.
	int32 index_size_as_items = 2;

	// If not -1, specifies the index size as megabytes.
	int32 index_size_as_megabytes = 3;

	// If not a zero timestamp, identifies the start time (in UTC) of the previous rebuild.
	google.protobuf.Timestamp rebuild_started_at = 4;

	// If not a zero timestamp, identifies the completion time (in UTC) of the previous rebuild. Set indexingmode to eimRebuild to indicate an ongoing rebuild.
	google.protobuf.Timestamp rebuild_completed_at = 5;
}

// Struct for a set of monitoring datapoints for the end of an indexing operation.
message MonitoringDatapointsForIndexingEnd {

	// If not eimUnknown, identifies the current indexing mode.
	IndexingMode batch_mode = 1;

	// If not -1, specifies the current batch number (starting from 1).
	int32 batch_number = 2;

	// If not a zero timestamp, identifies the start time (in UTC) of the current indexing request batch.
	google.protobuf.Timestamp batch_started_at = 3;

	// If not  a zero timestamp, identifies the abort time (in UTC) of the current indexing request batch.
	google.protobuf.Timestamp batch_aborted_at = 4;

	// If not  a zero timestamp, identifies the commit time (in UTC) of the current indexing request batch.
	google.protobuf.Timestamp batch_committed_at = 5;

	// If not 0.0, specifies the successful indexing request batch duration as seconds.
	double batch_duration_as_seconds = 6;

	// If not -1, specifies the number of the items processed during the latest batch.
	int32 batch_processed_items = 7;

	// If not -1, specifies the number of the items processed in FiFo order during the latest batch.
	int32 batch_processed_items_fi_fo = 8;

	// If not -1, specifies the number of the items processed in LiFo order during the latest batch.
	int32 batch_processed_items_li_fo = 9;

	// If not -1, specifies the number of the subitems processed during the latest batch.
	int32 batch_processed_subitems = 10;

	// If not -1, specifies the number of the items failed during the latest batch.
	int32 batch_failed_items = 11;

	// If not -1, specifies the number of the items with failed subitems during the latest batch.
	int32 batch_partial_items_with_failed_subitems = 12;

	// If not -1, specifies the number of the subitems failed during the latest batch.
	int32 batch_failed_subitems = 13;

	// If not -1, specifies the number of the items excluded during the latest batch.
	int32 batch_excluded_items = 14;

	// If not -1, specifies the number of the items with excluded subitems during the latest batch.
	int32 batch_partial_items_with_excluded_subitems = 15;

	// If not -1, specifies the number of the subitems excluded during the latest batch.
	int32 batch_excluded_subitems = 16;

	// If not a zero timestamp, identifies the latest ObjectChanged time (in UTC) of the current indexing request batch.
	google.protobuf.Timestamp batch_latest_object_changed = 17;

	// If not a zero timestamp, identifies the earliest ObjectChanged time (in UTC) of the current indexing request batch.
	google.protobuf.Timestamp batch_earliest_object_changed = 18;
}

// Struct for a monitoring indicator.
message MonitoringIndicator {

	// The indicator value.
	TaggedValue value = 1;

	// The ISO 8601 timestamp (in UTC) of the indicator value generation.
	string generated_at = 2;
}

// Struct for a monitoring indicator data.
message MonitoringIndicatorData {

	// Indicator data source.
	MonitoringSource source = 1;

	// Indicator data as a monitoring indicator array.
	repeated MonitoringIndicator indicators = 2;
}

// Struct for a monitoring source for indexing.
message MonitoringSource {

	// The context of the monitoring source.
	MonitoringContext context = 1;

	// The descriptors of the monitoring source as a tagged value array.
	repeated TaggedValue descriptors = 2;
}

// Struct for a monitoring source for indexing.
message MonitoringSourceForIndexing {

	// Identifies the index associated with the monitoring data.
	IndexName index = 1;

	// If set, identifies auxiliary indexer associated with the monitoring data.
	string auxiliary_indexer_id = 2;

	// If set, specifies the partition associated with the monitoring data.
	IndexerPartition partition = 3;
}

// Multi-value lookup datatype.
message MultiSelectLookup {

	// The selected items, each as a [Lookup](mfiles:MFiles.Lookup).
	repeated Lookup values = 1;
}

// Multi-value lookup datatype.
message MultiSelectLookupWithMetadata {

	// Items.
	repeated LookupWithMetadata values = 1;
}

// The roles this server has in current vault.
message MultiServerRoles {

	// This server takes care of VDelta generation.
	bool role_vdelta = 1;

	// Server takes care of external object type synchronization.
	bool role_external_sync = 2;

	// Server takes care of automatic state changes.
	bool role_state_change = 3;

	// Server takes care of exteral file and mail synchronization operations.
	bool role_ext_file_mon = 4;

	// Server takes care of sending notifications.
	bool role_notification_generation = 5;

	// Server takes care of running scheduled jobs.
	bool role_scheduled_jobs = 6;

	// Server takes care of user group synchronization.
	bool role_user_group_sync = 7;

	// Server takes care of nightly maintenance operations.
	bool role_nightly_maintenance = 8;

	// Server takes care of processing background tasks.
	bool role_async_tasks = 9;

	// Server takes care of optimization and indexing operations.
	bool role_optimize_and_indexing = 10;

	// Server takes care of data export.
	bool role_data_export = 11;

	// Server takes care of MFAnalytics processing for the vault.
	bool role_analytics_processing = 12;

	// Server takes care of removing conflict object operation.
	bool role_remove_conflict_object = 13;

	// True, if server takes care of cleanup operations.
	bool role_cleanup = 14;

	// True, if server does automatic versioning for Master Storage live changes.
	bool role_master_storage_version_monitor = 15;

	// True, if server runs the master storage synchronization operations.
	bool role_master_storage_sync = 16;

	// True, if server runs the Integration Platform as a Service notification processing operations.
	bool role_ipaas_notification = 17;
}

// Named ACL (= predefined permissions).
message NamedACL {

	// Named ACL ID.
	int32 id = 1;

	// The name of the named ACL.
	string name = 2;

	// The type of the NACL.
	NACLType type = 3;

	// The predefined permissions. This defines the ACL which this named ACL encapsulates.
	AccessControlList acl_for_objects = 4;

	// GUID for the NACL.
	string guid = 5;
}

// Named ACL (with additional information for admin use only).
message NamedACLAdmin {

	// Basic data.
	NamedACL named_acl = 1;

	// The permissions of this named ACL. This defines which users can see this named ACL, for example.
	AccessControlList acl = 2;

	// Semicolon-separated list of semantic aliases.
	string aliases = 3;
}

// Named ACL (with additional information for admin use only).
message NamedAclDecl {

	// Per-language translations.
	NamedACLAdmin nacl_admin = 1;

	// Per-language translations.
	repeated ElementTranslationsDecl translations = 2;

	// Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name.
	string unknown_json = 3;
}

// Struct for a named value stored in a vault.
message NamedValue {

	// The name of the value.
	string key = 1;

	// The value as a serialized bytearray.
	TypedValue value = 2;
}

// Struct for a user account in a vault.
message NamedValueArray {

	// An array of the NamedValue structures.
	repeated NamedValue value = 1;
}

// Named value namespace.
message NamedValueNamespace {

	// The name of the namespace.
	string name = 1;

	// Named value array related to the namespace.
	repeated NamedValue values = 2;
}

// Property definition (with additional information for admin use only).
message NamedValueNamespaces {

	// An array of the NamedValueNAmespace structures.
	repeated NamedValueNamespace value = 1;
}

// Struct for a single notification rule.
message NotificationRule {

	// The ID of the rule. Assigned by the server when the rule is created.
	int32 id = 1;

	// The name of the notification rule.
	string name = 2;

	// The search conditions that an object must meet for the rule to apply, combined with AND. The built-in rules include a "not deleted" condition (`STATUS_TYPE_IS_DELETED` equal to false).
	repeated SearchCondition object_filter = 3;

	// The events that trigger a notification. A single `EVENT_TYPE_OBJECT_NOTIFICATION` subscription makes the rule filter-based: it then notifies about the objects that match `object_filter`.
	repeated EventSubscription subscriptions = 4;

	// `is_enabled` turns the rule on, `send_digest` combines the day's notifications into one message, `exclude_self_triggered` leaves out events caused by the user, and `recurring` (filter-based rules only) repeats the notification for objects that still match.
	NOTIFICATIONFLAGS options = 5;

	// True for a common rule that notifies the users and groups in `recipients`; false for a private rule of its owner.
	bool is_common = 6;

	// For a common rule, the users and groups to notify. Not used by private rules.
	AccessControlList recipients = 7;

	// For filter-based rules, the days on which the rule is processed, as a bit mask: 1 Sunday, 2 Monday, 4 Tuesday, 8 Wednesday, 16 Thursday, 32 Friday, 64 Saturday. 127 means every day.
	uint32 notification_days_of_week = 8;
}

// Notification settings.
message Oauth2NotificationSettings {

	// OAuth2 specific data.
	MailSourceOauth2 mail_source = 1;

	// The address of the sender when sending notifications with OAuth2.
	string mail_from_address = 2;

	// Maximum time in seconds to wait for the OAuth2 authentication to take place.
	uint32 authentication_timeout = 3;

	// Maximum time seconds to wait for the OAuth2 mail service request to be responded.
	uint32 mail_service_timeout = 4;
}

// A class: a kind of object within one object type, with the properties its objects have.
message ObjectClass {

	// The class as an item of value list 1 (Classes). The class ID is `base_info.item_info.obj_id.item_id.internal_id` and its name `base_info.item_info.name`.
	ValueListItem base_info = 1;

	// The properties of objects of this class, each with `is_required`. Lists only property definitions the caller can see, and includes the built-in properties that every object has (such as 20 Created and 25 Created by).
	repeated AssociatedPropertyDef associated_property_defs = 2;

	// The default workflow of the document class, or zero if there is no default workflow.
	int32 default_workflow = 3;

	// The ID of the object type the class belongs to.
	int32 object_type = 4;

	// The property definition whose value is the object's name: 0 (Name or title) unless the class names its objects by another property.
	int32 name_property_def = 5;

	// True if objects of this class must use `default_workflow`.
	bool force_workflow = 6;

	// Specifies the ACL that defines the visibility and other permission settings of this class. Also specifies who can attach objects to this class.
	AccessControlList acl = 7;

	// If set, specifies the permissions for current user that defines the visibility and other permission settings of this class.
	ClassPermissionsForClient current_user_permissions = 11;

	// Settings that only some object types have; set for the assignment classes of object type 10 (Assignment).
	ObjectTypeSpecificClassContentUnion object_type_class_content = 8;

	// True if this is the default class of its object type.
	bool is_object_type_default_class = 10;
}

// Object class for declarative configuration.
message ObjectClassDecl {

	// Value list item representing this element.
	ValueListItemDecl base_info = 1;

	// Semicolon-separated list of semantic aliases.
	string aliases = 2;

	// The object type with which this class is used.
	int32 object_type = 3;

	// True if this is a predefined class (cannot be deleted, editing is restricted).
	bool is_predefined = 4;

	// PropertyDefs associated with this class.
	repeated AssociatedPropertyDef associated_property_defs = 5;

	// The ID of the property definition that represents the name of the document or other object. Typically PROPERTYDEF_TITLE (0).
	int32 name_property_def = 6;

	// The default workflow of the document class, or zero if there is no default workflow.
	int32 default_workflow = 7;

	// True if the use of the specified workflow is forced.
	bool force_workflow = 8;

	// Specifies the ACL that defines the visibility and other permission settings of this class. Also specifies who can attach objects to this class.
	AccessControlList acl = 9;

	// The electronic signature settings for creating an electronic signature for new objects. Reserved for future improvements.
	ElectronicSignatureSettings signature_settings_for_new_objects = 10;

	// Assignment class info.
	AssignmentClassInfo assignment_class_info = 11;

	// Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name.
	string unknown_json = 12;
}

// Object class for declarative configuration.
message ObjectClassGroupDecl {

	// Value list item representing this element.
	ValueListItemDecl base_info = 1;

	// Other information on the class group.
	ClassGroup object_class_group = 2;

	// Semicolon-separated list of semantic aliases.
	string aliases = 3;

	// Specifies the ACL that defines the visibility and other permission settings of this class. Also specifies who can attach objects to this class.
	AccessControlList acl = 4;

	// Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name.
	string unknown_json = 5;
}

// Object data for indexing.
message ObjectDataForIX {

	// The primary identity of the object. Also valid when the object has been destroyed.
	ObjID primary_obj_id = 1;

	// True if the object has been destroyed and is no longer available. If true then only the objidPrimary and oim members are valid.
	bool is_destroyed = 2;

	// True if the object has been skipped and cannot be indexed. If true then only the objidPrimary and oim members are valid.
	bool is_skipped = 3;

	// Contains the basic object version information, always latest checked-in version.
	ObjectVersionExWP object_version = 4;

	// The version comment history of the object excluding checkedout version.
	PropertyValue version_comment = 5;

	// Identifies the files that have been updated.
	repeated FileID updated_files = 6;

	// Additional ID aliases for the object such as the external object ID, if any, in some other system/repository/vault.
	repeated ObjID alias_obj_ids = 7;

	// Metadata information for storing the object in the index.
	ObjectIndexMetadata index_metadata = 8;

	// If not null contains the array of folders describing the repository path to the object version location.
	FolderArray repository_path = 9;

	// Aggregated DISTINCT user IDs (VALUELIST_USERS) from PROPERTYDEF_LASTMODIFIEDBY and PROPERTYDEF_VERSION_EDITORS across every checked-in version, represented as MSLOOKUP from VALUELIST_USERS. Empty when the feature flag is off or for external-repository objects.
	PropertyValue all_editors_history = 10;

	// Pre-resolved read-permission projection of this object version's ACL: one entry per component (index 0 is the custom component, the rest are automatic components in stable order), each reduced to concrete allowed/denied actor IDs with additive components merged in, deleted components removed, and pseudo-users resolved. unset if not supplied by this server; set with zero entries if supplied and the ACL resolved to no components. On the checked-out version, the checked-out-to user has already been injected into every component's allowed array; the latest-checked-in version's projection never carries that injection.
	SimpleACL acl_for_indexing = 11;
}

// Object ID info for metadata indexing.
message ObjectIndexMetadata {

	// Relevance score of the object.
	float relative_relevance_score = 1;

	// The last modified timestamp for indexing.
	google.protobuf.Timestamp last_modified_for_indexing_utc = 2;

	// Logical timestamp for indexing.
	LogicalTimestamp version_for_ix = 3;
}

// Object-level information.
message ObjectLevelInfo {

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

	// The status of this object's external ID.
	ExtIDStatus external_id_status = 2;

	// The external ID (display ID) of this object. unset means that the external ID is the same as the internal ID.
	string external_id = 3;

	// The version that is checked out. Version number 0 if the object is not checked out.
	ObjVerVersion checked_out_version = 4;

	// The ID of the user who has the object checked out.
	int32 checked_out_to_user_id = 5;

	// The user name of the user who has the object checked out.
	string checked_out_to_user_name = 6;

	// The host name of the computer to which the object was checked out.
	string checked_out_to_host_name = 7;

	// The timestamp of the moment the object was checked out.
	google.protobuf.Timestamp checked_out_at_utc = 8;

	// The latest checked-in version.
	ObjVerVersion checked_in_version = 9;

	// The time when the object was created (same as the PROPERTYDEF_CREATED propertyvalue).
	google.protobuf.Timestamp created_at_utc = 10;

	// Accessed by me timestamp. Parallel operations may cause slight inconsistencies in the returned timestamp in rare cases and the precise value shouldn't be relied upon. The observed timestamp may even roll back.
	google.protobuf.Timestamp accessed_by_me_utc = 11;

	// The object GUID, in braces. The same value as `GetObjectGUID` returns.
	string guid = 12;

	// Bit flags that provide additional information on the object (e.g. is the object deleted or a stub).
	ITEMFLAGS options = 13;

	// The GUID of the vault in which the object was originally created.
	string original_vault_guid = 14;

	// The original objid in the vault in which the object was originally created.
	ObjID original_vault_obj_id = 15;

	// Identifies the view associated with this object if any.
	ItemID associated_view_id = 16;

	// If not null, identifies the icon of the object. Currently applicable only to unmanaged objects.
	string external_repository_icon_id = 17;

	// If not null, identifies the primary view of the object that is also the default opening location of the object. Currently applicable only to unmanaged objects.
	ItemID primary_view_id = 18;

	// Bit flags that provide information on the object capabilities.
	OBJECTCAPABILITYFLAGS capabilities = 19;
}

// This struct contains status of a completed object operation.
message ObjectOperationStatus {

	// The object.
	ObjID obj_id = 1;

	// Status message.
	string message = 2;

	// Status code, HRESULT.
	int32 status = 3;
}

// Evaluated permissions for current user.
message ObjectPermissionsForClient {

	// The object is visible for the current user (provided for symmetry).
	bool can_user_see = 1;

	// The current user can edit the object.
	bool can_user_edit = 2;

	// The current user can delete the object.
	bool can_user_delete = 3;

	// The current user can change the object permissions.
	bool can_user_change_permissions = 4;
}

// A structure that specifies object versions changed notification.
message ObjectsChangedNotification {

	// The object versions that were changed.
	repeated ObjVer obj_vers = 1;
}

// Status for object which skipped indexing.
message ObjectSkippedIndexingState {

	// The object ID.
	ObjID object_id = 1;

	// The file ID or zero if not managed file.
	FileID file_id = 2;

	// The index name.
	IndexName index_name = 3;

	// Time skipped (in UTC).
	google.protobuf.Timestamp skip_time = 4;

	// Skip reason.
	ObjectSkippedIndexingReason reason = 5;
}

// Struct for objects or delta (changes to objects).
message ObjectsOrDelta {

	// True if this struct represents a delta (i.e. just the occurred changes to objects).
	bool type = 1;

	// Removed objects. This contains data only when this struct represents a delta. Otherwise it must be an empty array.
	repeated ObjID removed_objects = 2;

	// Objects. This contains inserted or updated objects if this struct represents a delta, otherwise it contains just a "normal" array of objects.
	repeated SearchResultsItem objects = 3;

	// Objects' property values.
	repeated PropertyValueArray object_property_values = 4;

	// If not empty, objects' ACLs.
	repeated AccessControlList object_acls = 5;

	// Receives the list of item group identifications ids those results were limited. The group identification id depends on how the search results were grouped. E.g. object type id.
	repeated int32 limited_item_groups = 6;

	// Continuation token for paginating search results from Master Storage.
	string continuation_token = 7;

	// True if there are additional results that can't be counted in advance.
	bool has_additional_results = 8;

	// ObjectsOrDelta Type values.
	enum ObjectsOrDeltaType {

		OBJECTS_OR_DELTA_TYPE_FULL = 0;

		OBJECTS_OR_DELTA_TYPE_DELTA = 1;
	}
}

// Struct for specifying the administrative object types and value lists, including associated data, to retrieve from the vault.
message ObjectTypeAndValueListAdminStructureRequest {

	// Requests real administrative object types from the vault.
	bool include_real_object_types = 1;
}

// Struct for an array of object type basic entries.
message ObjectTypeAndValueListAdminStructureResponse {

	// The object type and value list entries.
	repeated ValueListAdmin object_types_and_value_lists = 1;
}

// Struct for specifying the object types and value lists, including associated data, to retrieve from the vault.
message ObjectTypeAndValueListStructureRequest {

	// Requests real object types from the vault.
	bool include_real_object_types = 1;
}

// Struct for an array of object type basic entries.
message ObjectTypeAndValueListStructureResponse {

	// The object type and value list entries.
	repeated ValueList object_types_and_value_lists = 1;
}

// Object type column mapping.
message ObjectTypeColumnMapping {

	// Object type ID.
	int32 object_type = 1;

	// One-based source field ordinal.
	int32 ordinal = 2;

	// Source field name.
	string source_field = 3;

	// Source field's data type.
	uint32 data_type = 4;

	// Target property definition.
	int32 target_property_def = 5;

	// Is the source field part of insertion operations?
	bool can_insert = 6;

	// Is the source field part of update operations?
	bool can_update = 7;
}

// Object type.
message ObjectTypeDecl {

	// Object type admin data.
	ValueListAdmin ot_admin = 1;

	// The icon resource reference.
	MetadataStructureResourceRef icon = 2;

	// Per-language translations.
	repeated MetadataStructureSecretRef secrets = 3;

	// Per-language translations.
	repeated ElementTranslationsDecl translations = 4;

	// Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name.
	string unknown_json = 5;
}

// Object type's indexing definition for searching from Master Storage.
message ObjectTypeIndexingDefinition {

	// IDs of indexed value lists.
	repeated int32 indexed_value_lists = 1;

	// IDs of indexed properties.
	repeated int32 indexed_properties = 2;
}

// Evaluated permissions for current user.
message ObjectTypePermissionsForClient {

	// The object type is visible for the current user (provided for symmetry).
	bool can_user_see = 1;

	// The current user can add new items.
	bool can_user_add_new_items = 2;
}

// Search characteristics of an object type.
message ObjectTypeSearchCharacteristics {

	// Specifies whether object type is excluded from file content searches.
	bool exclude_in_entire_file_data_search = 1;

	// Specifies whether object type is excluded from metadata searches.
	bool exclude_in_entire_meta_data_search = 2;
}

// Union for event type specific data in Event.
message ObjectTypeSpecificClassContentUnion {

	oneof data {

		// Assignment-specific class settings.
		AssignmentClassInfo assignment = 10;
	}
}

// Object type's target (instances of another object type in a view) for browsing.
message ObjectTypeTargetForBrowsing {

	// The ID of the target object type.
	int32 target_object_type = 1;

	// The ID of the view collection where instances of the target object type are being browsed. This view collection resides in the predefined Built-in Views view folder.
	int32 view = 2;
}

// Object type with the property definitions that are based on the object type.
message ObjectTypeWithPropertyDefs {

	// Object type ID.
	int32 object_type = 1;

	// The IDs of those propertydefs that are based on the object type.
	repeated int32 property_defs = 2;
}

// Information about one version of an object: its version number, title, class, files and status
// flags, without the property values.
message ObjectVersion {

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

	// The version label to show, if it differs from the version number; empty otherwise.
	string display_version = 2;

	// The title (name) of the object in this version.
	string title = 3;

	// True if the object is a single-file document, which has exactly one file.
	bool is_single_file_object = 4;

	// Note: this field is deprecated. True if relationships from this object version to one or more documents exist.
	bool has_relationships_from_this = 5;

	// Note: this field is deprecated. True if relationships from one or more documents to this object version exist.
	bool has_relationships_to_this = 6;

	// True if relationships from one or more assignments to this object version exist.
	bool has_assignments = 7;

	// When the version was last modified, in UTC.
	google.protobuf.Timestamp last_modified_at_utc = 8;

	// The files of this version. Each `file_ver` can be passed to `DownloadFile_Begin`.
	repeated File files = 9;

	// Bit flags that provide additional information on the object version.
	OBJVERFLAGS object_version_flags = 10;

	// The class ID of the version.
	int32 class_id = 11;

	// The GUID of this version.
	string version_guid = 12;

	// Not filled by the object read methods; read the property values with `GetObjectVersionAndPropertiesOfMultipleObjects` or `GetProperties`.
	repeated PropertyValue base_properties = 13;

	// File ID of the primary file of a multi-file object, if the object is a multi-file object.
	FileID primary_file = 14;
}

// Struct for ObjectVersionActivity.
message ObjectVersionActivity {

	// ObjVerVersion
	ObjVerVersion version = 1;

	// The time in UTC the activity was originally created.
	google.protobuf.Timestamp version_created_at_utc = 2;

	// Information of user who created the version.
	Lookup user = 3;

	// Object version property activity array.
	repeated ObjectVersionPropertyActivity property_activities = 4;

	// Object version file activity array.
	repeated ObjectVersionFileActivity file_activities = 5;

	// Flags that tell which category are enabled for this state.
	OBJECTVERSIONACTIVITYCATEGORYFLAGS categories = 6;
}

// Object version activity request.
message ObjectVersionActivityRequest {

	// Category flags.
	OBJECTVERSIONACTIVITYCATEGORYFLAGS category_filter = 1;

	// Maximum number of object version activities to be included.
	uint32 limit = 3;

	// Starting version for object version activities. 0 or missing means no offset.
	ObjVerVersion offset_obj_ver_version = 4;
}

// Object version activity response.
message ObjectVersionActivityResponse {

	// Object version activity Array.
	repeated ObjectVersionActivity activities = 1;

	// Is true if there is more results.
	bool has_more_activities = 2;
}

// Object info, property values, ACL and object permissions for client.
message ObjectVersionData {

	// The actual resolved object version.
	ObjVer obj_ver = 1;

	// The pointer to object info. Null pointer, if data was not requested.
	ObjectVersionEx object_version = 2;

	// The pointer to property values. Null pointer, if data was not requested.
	PropertyValueArray properties = 3;

	// The pointer to ACL. Null pointer, if data was not requested.
	AccessControlList acl = 4;

	// The pointer to object permissions for client. Null pointer, if data was not requested.
	ObjectPermissionsForClient current_user_permissions = 5;

	// Property values for display, or an empty array.  Null pointer, if data was not requested.
	PropertyValueArray properties_for_display = 6;

	// List of related objects(From and To) and collection members. Null pointer, if data was not requested.
	repeated RelationshipGroup relationships = 7;

	// List of version comments. Null pointer, if data was not requested.
	VersionCommentArray comments = 8;

	// The pointer to event subscription. Null pointer, if data was not requested.
	repeated EventSubscription user_event_subscriptions = 9;

	// The pointer to object version activity.
	ObjectVersionActivityResponse object_activities = 10;

	// The pointer to latest version comment. Null pointer, if data was not requested.
	LatestVersionComment latest_version_comment = 11;
}

// Struct for a object data request details.
message ObjectVersionDataRequest {

	// Specifies the required object information.
	OBJECTDATAREQUESTFLAGS required_data_flags = 1;

	// Specifies the optional object information.
	OBJECTDATAREQUESTFLAGS optional_data_flags = 2;

	// Specifies the version type to search for.
	ObjectVersionDataRequestVersionType version_type = 3;

	// Specifies how error cases are handled during the request.
	ObjectVersionDataRequestErrorTolerance error_tolerance = 4;

	// Specifies how objects with changed identities are handled.
	ObjectVersionDataRequestIdentityType identity_type = 5;

	// Specifies the required object version activity input.
	ObjectVersionActivityRequest object_activities_parameters = 6;
}

// Struct for a object data result details.
message ObjectVersionDataResult {

	// Requested object version.
	ObjVer obj_ver = 1;

	// The pointer to the result data details. Equals to null for the failed result.
	ObjectVersionData object_data = 2;

	// The pointer to the error information. Equals to null for the successful result.
	ErrorInfo error_info = 3;
}

// Information about one version of an object (`version_info`) and about the object as a whole
// (`object_info`), such as its ID and check-out status.
message ObjectVersionEx {

	// Object Version information.
	ObjectVersion version_info = 1;

	// Object-level information.
	ObjectLevelInfo object_info = 2;
}

// Object info, property values, and ACL.
message ObjectVersionExWP {

	// Object info.
	ObjectVersionEx object_version = 1;

	// Property values, or an empty array.
	repeated PropertyValue properties = 2;

	// If set, ACL.
	AccessControlList acl = 3;

	// If set, permissions of the object version.
	ObjectPermissionsForClient current_user_permissions = 4;
}

// Object info, property values, and ACL. This structure extends ObjectVersionExWP with metadata belonging to the properties.
message ObjectVersionExWPWithMetadata {

	// Object info.
	ObjectVersionEx object_version = 1;

	// Property values, or an empty array.
	repeated PropertyValueWithMetadata properties = 2;

	// If set, ACL.
	AccessControlList acl = 3;

	// If set, permissions of the object version.
	ObjectPermissionsForClient current_user_permissions = 4;
}

// Object version file activity.
message ObjectVersionFileActivity {

	// File name.
	string file_name = 1;

	// Old File name.
	string old_file_name = 2;

	// The object file activity action type.
	OBJECTVERSIONFILEACTIVITYFLAGS action_type = 3;
}

// Object version property activity.
message ObjectVersionPropertyActivity {

	// Property definition ID.
	int32 property_def = 1;

	// property name.
	string property_name = 2;

	// The object activity type.
	OBJECTVERSIONPROPERTYACTIVITYFLAGS action_type = 3;

	// The added value to the property.
	TypedValue added_value = 4;

	// The removed value to the property.
	TypedValue removed_value = 5;
}

// Struct for object file source data in a add object with files call.
//
// Set `type` and the member of `data` that matches it, for example
// `OBJ_FILE_SOURCE_TYPE_FILE_CONTENT` with `data.file_content`. Leave the whole message unset for an
// object without files. See
// [AddObjectWithFiles](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFiles) for what each type
// requires.
message ObjFileSource {

	// Which member of `data` is used. Must match the member that is set.
	ObjFileSourceType type = 1;

	// The source data; set the member that matches `type`.
	ObjFileSourceUnion data = 2;
}

// Union for object file source type specific data in ObjFileSource.
message ObjFileSourceUnion {

	oneof data {

		// Blank template object file source.
		ObjFileSourceUnion.BlankTemplateData blank_template = 1;

		// User defined template object file source.
		ObjFileSourceUnion.UserDefinedTemplateData user_defined_template = 2;

		// Uploaded object file source.
		ObjFileSourceUnion.UploadedFileData uploaded_file = 3;

		// Uploaded object file source with multiple files.
		ObjFileSourceUnion.UploadedFilesData uploaded_files = 4;

		// Empty object file source (one or more files). Only the title and extension of each file are known;
		// there is no upload id or size because the file contents have not been uploaded yet. This type may only
		// be used when the object is created as a draft (the draft flag must be set); otherwise the request is
		// rejected.
		ObjFileSourceUnion.EmptyFilesData empty_files = 5;

		// Inline file content object file source.
		ObjFileSourceUnion.FileContentData file_content = 6;
	}

	// Undefined object file source.
	message UndefinedSourceData {
	}

	// Blank template object file source.
	message BlankTemplateData {

		// Blank template file name.
		string name = 1;
	}

	// User defined template object file source.
	message UserDefinedTemplateData {

		// User defined template object.
		ObjID obj_id = 1;
	}

	// Uploaded object file source.
	//
	// For a single-file document, the file gets the document's title at check-in; the `title` given here
	// is not kept.
	message UploadedFileData {

		// The upload session ID from UploadTempFile, committed with UploadTempFileCommit. Zero if `file_ref` is set. An upload session can be attached to one object only.
		int32 upload_id = 1;

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

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

		// The size of the uploaded content in bytes.
		int64 size = 4;

		// The `file_ref` of a stateless upload (FileUploadWhole or FileUploadEnd). Empty if `upload_id` is set. Exactly one of `upload_id` and `file_ref` must be set.
		string file_ref = 5;
	}

	// Uploaded object file source with multiple files.
	message UploadedFilesData {

		repeated UploadedFile uploaded_file_array = 1;
	}

	// Empty object file source (one or more files). Only the title and extension of each file are known;
	// there is no upload id or size because the file contents have not been uploaded yet. This type may only
	// be used when the object is created as a draft (the draft flag must be set); otherwise the request is
	// rejected.
	message EmptyFilesData {

		repeated EmptyFile empty_file_array = 1;
	}

	// Inline file content object file source.
	//
	// Only for a single-file document (Single file, 22, true) of object type 0 (Document); otherwise the
	// request fails with invalid argument. The content can be at most 10 MiB. Upload larger files first
	// and use an uploaded file source.
	message FileContentData {

		// The file name without the extension. Required. For a single-file document the file gets the document's title at check-in.
		string title = 1;

		// The file extension without the dot, for example `txt`.
		string extension = 2;

		// The file content, at most 10 MiB. May be empty.
		bytes file_data = 3;
	}
}

// Identifies one version of a file of an object.
message ObjFileVer {

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

	// The specific file version, as in `File.file_ver`.
	FileVer file_ver = 2;
}

// Identifies an object: its object type and its ID within that type.
//
// Object IDs are unique only within an object type: document 157 and project 157 are different
// objects. Both parts are needed.
message ObjID {

	// The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID).
	int32 type = 1;

	// The ID of the object within its type, in `item_id.internal_id`.
	ItemID item_id = 2;
}

// Object ID info for metadata indexing.
message ObjIDInfoForMIX {

	// Object ID.
	ObjID obj_id = 1;

	// True if the object has been destroyed and is no longer available. If true then only the objid member is valid.
	bool is_destroyed = 2;

	// Relevance score of the object.
	float relevance_score = 3;

	// The version that is currently checked out, or uninitialized if the object is not checked out.
	ObjVerVersion checked_out_version = 4;

	// The latest version that is checked in, or uninitialized if the object has no checked-in version.
	ObjVerVersion latest_checked_in_version = 5;

	// Logical timestamp for indexing.
	LogicalTimestamp version_for_mix = 6;

	// The user ID to which the object has been checked out. Zero if not checked out.
	int32 checked_out_to = 7;

	// The computer name to which the object has been checked out. Empty if not checked out.
	string checked_out_to_host_name = 8;

	// Bit flags that provide additional information on the object (e.g. is the object deleted).
	ITEMFLAGS object_flags = 9;

	// The last modified timestamp for indexing.
	google.protobuf.Timestamp last_modified_for_indexing_at_utc = 10;

	// An external object ID, if any, in some other system/repository/vault. Externality is seen quite widely, external to the object ID specified by objid. Useful e.g. when the objid member represents an unmanaged object ID because then objidExternal can represent the managed ID of the corresponding object in the vault.
	ObjID external_obj_id = 11;
}

// ObjIDPair.
message ObjIDPair {

	// The managed object ID.
	ObjID obj_id_managed = 1;

	// The unmanaged object ID.
	ObjID obj_id_unmanaged = 2;
}

// Object version or file version.
message ObjOrFileVer {

	// Object version. The version part can be -1 to indicate the latest version.
	ObjVer obj_ver = 1;

	// File version. Valid only if bIsFile is true.
	FileVer file_ver = 2;
}

// Identifies one version of an object.
//
// Most read methods need a specific version: `version.type` `OBJ_VER_VERSION_TYPE_SPECIFIC` and the
// version number in `version.internal_version`. Methods that read "the latest version" have their
// own switch for it and ignore `version`; see the
// [IRPCObjectOperations overview](mfiles:MFiles.IRPCObjectOperations). Versions returned by the
// server are always specific.
message ObjVer {

	// The object.
	ObjID obj_id = 1;

	// The version. Usually `OBJ_VER_VERSION_TYPE_SPECIFIC` with `internal_version`.
	ObjVerVersion version = 2;
}

// Object version data for metadata indexing.
message ObjVerDataForMIX {

	// Object version info.
	ObjVerInfoForMIX object_info = 1;

	// If not null contains the basic object version information. The search results are returned from the server using this information with external content repositories.
	ObjectVersionEx object_version = 2;

	// The property values of the object version.
	repeated PropertyValue properties = 3;

	// The version comment history of the object version.
	PropertyValue version_comment = 4;

	// If not null contains the array of folders describing the repository path to the object version location.
	FolderArray repository_path = 5;

	// DISTINCT user IDs (VALUELIST_USERS) from PROPERTYDEF_LASTMODIFIEDBY and PROPERTYDEF_VERSION_EDITORS across every checked-in version of this object up to and including this version, represented as MSLOOKUP from VALUELIST_USERS. Empty when the AINO-246 feature flag is off, when this entry is a skipped/destroyed placeholder, or when this object version has no editors in the vault tables yet.
	PropertyValue all_editors_history = 6;
}

// Object version info for metadata indexing.
message ObjVerInfoForMIX {

	// Object version.
	ObjVer obj_ver = 1;

	// True if the object has been skipped and cannot be indexed. If true then only the objid inside objver is valid.
	bool is_skipped = 2;

	// The status of this object's external ID.
	ExtIDStatus external_id_status = 3;

	// The external ID (display ID) of this object. unset means that the external ID is the same as the internal ID.
	string external_id = 4;

	// The original objid in the vault in which the object was originally created.
	ObjID original_obj_id = 5;

	// Object files.
	repeated File files = 6;

	// The IDs of the updated object files.
	repeated FileID updated_files = 7;

	// The version ACL.
	AccessControlList acl = 8;
}

// A version number, or a marker such as "latest", together with its type.
message ObjVerVersion {

	// What `internal_version` means. `OBJ_VER_VERSION_TYPE_SPECIFIC` for a version number.
	ObjVerVersionType type = 1;

	// The version number, starting from 1, when `type` is `OBJ_VER_VERSION_TYPE_SPECIFIC`. The server returns -1 with `OBJ_VER_VERSION_TYPE_LATEST`.
	int32 internal_version = 2;

	// Used only for objects in external repositories. Leave empty.
	string external_repository_version = 3;

	// Used only for objects in external repositories. Leave 0.
	int64 external_repository_sort_key = 4;
}

// Object version with an array of property values.
message ObjVerWithProperties {

	// Object version.
	ObjVer obj_ver = 1;

	// Properties.
	repeated PropertyValue property_values = 2;
}

// Struct for describing an OCR block.
message OCRBlock {

	// Unique ID (within a vault).
	int32 id = 1;

	// Human-friendly name of the block.
	string name = 2;

	// One-based number of page on which this block should appear. 0 can be used to indicate the first recognizable instance.
	uint32 page = 3;

	// Defines the unit of the block rectangle dimensions. Default is pixels.
	OCRBlockDimUnitType dimension_unit = 4;

	// Distance from the left of the image.
	uint32 left = 5;

	// Distance from the top of the image.
	uint32 top = 6;

	// Width of the block rectangle.
	uint32 width = 7;

	// Height of the block rectangle.
	uint32 height = 8;

	// OCR options used for this block. If unset, default settings are used.
	OCROptions options = 9;

	// Max confidence level that is acceptable for reognition. No threshold if -1.
	int32 confidence_threshold = 10;

	// Regular expression for value confirmation (not used if length is 0).
	string filter_regular_expression = 11;

	// Indicates whether recognized value lines should be collapsed into a one-line value. Default is true.
	bool remove_line_breaks = 12;

	// True if the block should be interpreted as barcode.
	bool is_barcode = 13;

	// Data type for the result.
	Datatype data_type = 14;
}

// Struct for describing the OCR result for an OCR block.
message OCRBlockResult {

	// Id of the OCR block. Negative value if there was no request block.
	int32 id = 1;

	// Defines the unit of the block rectangle dimensions. Default is pixels.
	OCRBlockDimUnitType dimension_unit = 2;

	// Distance from the left of the image.
	uint32 left = 3;

	// Distance from the top of the image.
	uint32 top = 4;

	// Width of the block rectangle.
	uint32 width = 5;

	// Height of the block rectangle.
	uint32 height = 6;

	// Confidence level (0 = most confident, 255 = least confident).
	int32 confidence = 7;

	// One-based number of the page on which this result was recognized. 0 means no recognition.
	uint32 page = 8;

	// The recognized value.
	TypedValue value = 9;
}

// Struct for OCR options.
message OCROptions {

	// Languages/character sets/dictionaries to be used as recognition hints. Can be unset.
	repeated OCRLanguageType languages = 1;

	// True if the OCR automatic language detection is to be used.
	bool ocr_automatic_language_detection = 2;
}

// OCR Page is effectively an array of OCR blocks.
message OCRPage {

	// Page number of this page.
	uint32 number = 1;

	// An array of OCR blocks.
	repeated OCRBlock blocks = 2;
}

// OCR blocks for a number of pages.
message OCRPageArray {

	// An array of OCR pages, should be ordered by the page number.
	repeated OCRPage value = 1;
}

// OCR PageResult is effectively an array of OCR block results.
message OCRPageResult {

	// Page number of this page.
	uint32 number = 1;

	// An array of OCR block results.
	repeated OCRBlockResult blocks = 2;
}

// Struct for a vault optimization job's auto-cancel options.
message OptimizeVaultAutoCancelOptions {

	// True if auto-cancel is enabled.
	bool auto_cancel = 1;

	// Day when the job is auto-cancelled.
	Weekday auto_cancel_day = 2;

	// Time when the job is auto-cancelled.
	google.protobuf.Timestamp auto_cancel_time = 3;

	// True if a cancelled optimization job can be continued on the next run.
	bool continuable = 4;
}

// The identity of a database index that the thorough optimization defragments.
message OptimizeVaultIndexKey {

	// The table or view of the index.
	string table_or_view = 1;

	// The name of the index.
	string index = 2;
}

// Struct for a vault optimization job.
message OptimizeVaultJob {

	// The GUID of the vault.
	string vault_guid = 1;

	// Flags that control the execution of this job.
	OPTIMIZEVAULTFLAGS flags = 2;

	// Auto-cancel options.
	OptimizeVaultAutoCancelOptions auto_cancel_options = 3;
}

// Struct for the output info of a job of archiving whole documents.
message OptimizeVaultJobOutputInfo {

	// Reason for cancellation.
	CancellationReason cancellation_reason = 1;

	// Step that lConsecutiveInterruptions refers to, -1 if none.
	int32 interruption_step = 2;

	// Consecutive crashes or errors at that step.
	int32 consecutive_interruptions = 3;

	// True if the job is paused until an administrator resolves it.
	bool needs_attention = 4;

	// Failure reason of the last crash or error (if any).
	string interruption_reason = 5;

	// Indexes that the run has defragmented (a set; order has no meaning).
	repeated OptimizeVaultIndexKey completed_indexes = 6;
}

// Struct for a single owner property definition.
message OwnerPropertyDef {

	// The ID of the owner property definition, or -106 if the owner property is determined automatically.
	int32 property_def = 1;

	// How this property depends on its owner property: `DEPENDENCY_RELATION_FILTER` limits its values to those that belong to the owner property's value, `DEPENDENCY_RELATION_FILL` fills it automatically from the owner property's value.
	DependencyRelation dependency_relation = 2;

	// Details of the `DEPENDENCY_RELATION_FILL` relation.
	DependentPropertyDefUnion data = 3;
}

// Information on password, possibly hashed and/or encrypted.
message PasswordInfo {

	// Password hash.
	string hash = 1;

	// Password hash algorithm.
	PasswordHashAlgorithm hash_algorithm = 2;

	// Password salt.
	string salt = 3;

	// Encryption algorithm used to protect the password hash.
	PasswordEncryption encryption = 4;
}

// Struct for Pinned object.
message PinnedObject {

	// The search result item.
	SearchResultsItem search_results_item = 1;

	// The pinned item id is the guid key referencing this item in pinboard.
	string pinned_item_id = 2;
}

// An authentication plug-in configuration.
message PluginInfo {

	// True if this is the default configuration.
	bool is_default = 1;

	// True if the plug-in can be used without a configuration scope.
	bool is_scope_independent = 2;

	// The configuration's name. Send it as `PluginData.plugin_name`.
	string name = 3;

	// The plug-in's implementation, for example `MFiles.AuthenticationProviders.OAuth`.
	string assembly_name = 4;

	// Internal to the server.
	string bridge_class_name = 5;

	// Where the configuration comes from: `Scope` (send as `PluginData.configuration_scope`) and, for vault-stored configurations, `VaultGUID`.
	NamedValueArray system_configuration = 6;

	// The plug-in's client-side settings. For an OAuth plug-in these include `AuthorizationEndpoint`, `TokenEndpoint`, `ClientID`, `Scope` and `RedirectURI`.
	NamedValueArray plugin_configuration = 7;
}

// Private key information.
message PrivateKeyInfo {

	// The public part of the key.
	string public_key = 1;
}

// A property definition: a property that objects can have, with its data type and, for lookup
// properties, the value list or object type its values come from.
message PropertyDef {

	// The property definition ID. Built-in property definitions (0 Name or title, 20 Created, 100 Class, ...) have the same ID in every vault. IDs 1-19 are never used by real property definitions.
	int32 id = 1;

	// The name of the property.
	string name = 2;

	// The tip text of this property.
	string tooltip = 3;

	// The data type of the values. Lookup properties use `DATATYPE_LOOKUP` (one item) or `DATATYPE_MULTI_SELECT_LOOKUP` (several items).
	Datatype data_type = 4;

	// Content type (sub-datatype).
	ContentType content_type = 5;

	// True for lookup properties; `value_list` then names the list. Test this flag, not `value_list != 0`: 0 is a valid list ID (the Document object type).
	bool is_based_on_value_list = 7;

	// True to allow automatic permissions via this property def.
	bool enable_automatic_permissions = 8;

	// True if this is the conflict property of the object type in `value_list`.
	bool is_conflict_reference = 9;

	// True to disallow using this property def as a grouping level in views.
	bool disallow_as_grouping_level = 10;

	// With `is_based_on_value_list`, the ID of the value list or object type whose items are the property's values.
	int32 value_list = 11;

	// A static filter on the items of `value_list`. The server applies it when this property is passed as `filtering_property_def` or `LookupItemRequest.property_def`; such conditions cannot be sent in `search_conditions` directly.
	repeated SearchCondition value_list_item_filter = 12;

	// The update behaviour of the property.
	UpdateType update_type = 13;

	// Defines the type of the automatic value of this field, if any.
	AutomaticValueType automatic_value_type = 14;

	// If set, specifies a fixed default value for this property.
	TypedValue default_value = 15;

	// If set, contains an icon in .ICO format (contains multiple sizes and color depths).
	Bytes icon = 16;

	// True if this is a predefined PropertyDef. Predefined PropertyDefs cannot be deleted and modifying them is restricted.
	bool is_predefined = 17;

	// True if this property definition can be used with all object types.
	bool allow_for_all_object_types = 18;

	// True if this is the owner property of the object type in `value_list`.
	bool is_owner = 19;

	// True if this is the default property of the object type in `value_list` (`ValueList.default_property_def`).
	bool is_default = 20;

	// For a lookup property, the property whose value limits this property's values. For example, Workflow State (39) is limited by Workflow (38). A `property_def` of -106 means that the owner property is determined automatically.
	OwnerPropertyDef owner_property_def_info = 21;

	// If `allow_for_all_object_types` is false, the object type whose objects use this property; otherwise ignored.
	int32 object_type = 22;

	// If set, specifies the ACL that defines the visibility and editability of this property in objects.
	AccessControlList acl = 23;

	// What the caller may do with values of this property: see them and edit them. Set when the property definition has permissions.
	PropertyDefPermissionsForClient property_def_permissions = 32;

	// The sorting type of value list items.
	VLSortingType value_list_sorting_type = 24;

	// True to sort in ascending order, false to sort in descending order.
	bool value_list_sort_ascending = 25;

	// How values are validated; `validation_string` holds the rule.
	ValidationType validation_type = 26;

	// The validation rule; its meaning depends on `validation_type`.
	string validation_string = 27;

	// How values are formatted; `formatting_string` holds the format.
	FormattingType formatting_type = 28;

	// The format; its meaning depends on `formatting_type`.
	string formatting_string = 29;

	// The GUID of the property definition, with braces.
	string guid = 30;

	// Flags such as `can_use_in_search`. See [PROPERTYDEFFLAGS](mfiles:MFiles.PROPERTYDEFFLAGS).
	PROPERTYDEFFLAGS options = 31;
}

// Property definition (with additional information for admin use only).
message PropertyDefAdmin {

	// Basic data.
	PropertyDef property_def = 1;

	// The definitions for automatic value generation.
	AutomaticValue automatic_value = 2;

	// The definitions for property value validation.
	Validation validation = 3;

	// Semicolon-separated list of semantic aliases for metadata mapping.
	string aliases = 4;

	// Names value namespaces related to the property definition.
	NamedValueNamespaces tags = 5;
}

// Property definition.
message PropertyDefDecl {

	// Property definition admin data.
	PropertyDefAdmin pd_admin = 1;

	// Per-language translations.
	MetadataStructureResourceRef icon = 2;

	// Per-language translations.
	repeated ElementTranslationsDecl translations = 3;

	// The automatic numbering VBScript resource reference.
	MetadataStructureResourceRef automatic_numbering_code = 4;

	// The calculated-value VBScript resource reference.
	MetadataStructureResourceRef calc_with_vbscript = 5;

	// The validation VBScript resource reference.
	MetadataStructureResourceRef validation_code = 6;

	// Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name.
	string unknown_json = 7;
}

// Evaluated permissions for current user.
message PropertyDefPermissionsForClient {

	// The property def is visible for the current user (provided for symmetry).
	bool current_user_can_see = 1;

	// The current user can edit the values.
	bool current_user_can_edit = 2;
}

// Struct for property folders or delta (changes to property folders).
message PropertyFoldersOrDelta {

	// True if this struct represents a delta (i.e. just the occurred changes to property folders).
	bool type = 1;

	// Removed property folders. This contains data only when this struct represents a delta. Otherwise it must be an empty array.
	repeated TypedValue removed_folders = 2;

	// Property folders. This contains inserted or updated property folders if this struct represents a delta, otherwise it contains just a "normal" array of property folders.
	repeated TypedValue folders = 3;

	// PropertyFoldersOrDelta Type values.
	enum PropertyFoldersOrDeltaType {

		PROPERTY_FOLDERS_OR_DELTA_TYPE_FULL = 0;

		PROPERTY_FOLDERS_OR_DELTA_TYPE_DELTA = 1;
	}
}

// Struct for property folder with parent location information.
message PropertyFolderWithParent {

	// The location of the parent folders.
	// Field with fid( 2 ) is reserved for legacy reasons and must not be re-used.
	repeated Folder parent_location = 1;

	// The value of the property.
	TypedValue value = 3;

	// The pinned item id is the guid key referencing this item in pinboard.
	string pinned_item_id = 4;

	// The last view and search conditions from the parent folder.
	View last_parent_view = 5;
}

// The value of one property: a property definition ID and a typed value.
message PropertyValue {

	// The property definition ID, for example 0 for "Name or title" or 100 for "Class".
	int32 property_def = 1;

	// The value. Its `type` must match the data type of the property definition.
	TypedValue value = 2;
}

// The property values of one object version.
message PropertyValueArray {

	// Property values.
	repeated PropertyValue value = 1;
}

// The definition of an automatic value.
message PropertyValueSuggestion {

	// The property definition ID.
	int32 property_definition_id = 1;

	// The typed value.
	TypedValue value = 2;

	// Display value for the suggestion. Can be empty.
	string display_value = 3;

	// The projected quality of the suggestion.
	float confidence = 4;

	// True if the suggestion is a fact (i.e. known to be valid for sure).
	bool is_fact = 5;

	// True if the suggestion depicts a new value for value lists.
	bool is_new_value_list_item = 6;

	// Suggestions that should be used when new object is created with this suggestion.
	repeated PropertyValueSuggestion new_value_list_item_property_suggestions = 7;

	// Rationale explaining why the suggestion is being made. Can be empty.
	string reason = 8;

	// Display name of a not-yet-created property (discovery-origin only). Empty otherwise.
	string suggested_name = 9;

	// MFDataType of the suggested new property (discovery-origin only). Zero otherwise.
	int32 suggested_data_type = 10;

	// LLM-authored extraction instruction for a discovery-origin property. Empty otherwise.
	string instruction = 11;
}

// Property value metadata namespace.
message PropertyValueWithMetadata {

	// Property definition ID.
	int32 property_def = 1;

	// The value of the property.
	TypedValueWithMetadata value = 2;
}

// Struct for a single property value ACL.
message PVACL {

	// The ACL of the property definition.
	AccessControlList property_def_acl = 1;

	// The ACLs of the value list items.
	repeated AccessControlList value_list_item_acls = 2;
}

// Struct for a property recalculation job.
message RecalculateJob {

	// The GUID of the vault.
	string vault_guid = 1;

	// Specifies the property that is updated.
	int32 property_def = 2;

	// True to recalculate unset values only.
	bool only_empty_values = 3;

	// If lPropertyDef is PROPERTYDEF_TITLE, specifies the source property (the name property of the class). Otherwise must be -1.
	int32 source_property_def = 4;

	// Specifies the class the objects of which are updated. Specify PROFILE_UNINITIALIZED to updates all objects regardless of their class.
	int32 class_filter = 5;
}

// Struct for a relationship (between objects).
message RelationshipData {

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

	// Values: From / To.
	RelationshipDirection direction = 2;

	// The relationship reason. This describes the property that made the relationship.
	int32 property = 3;

	// Below properties are not filled. In future if we need the response to have any of the below properties filled? then it can be used.
	// Below properties wont be sent in the response.
	ObjectVersionEx object_info = 4;

	// The pointer to property values. Null pointer, if data was not requested.
	PropertyValueArray properties = 5;

	// The pointer to ACL. Null pointer, if data was not requested.
	AccessControlList acl = 6;

	// The pointer to object permissions for client. Null pointer, if data was not requested.
	ObjectPermissionsForClient object_permissions = 7;

	// Property values for display, or an empty array.  Null pointer, if data was not requested.
	PropertyValueArray properties_for_display = 8;
}

// Struct for list of related objects.
message RelationshipGroup {

	// The object type whose relationships belong to this group, or -1 if the group contains relationships from all object types.
	int32 object_type = 1;

	// List of related objects.
	repeated RelationshipData related_objects = 2;

	// True if not all relationships belonging to this group could be retrieved.
	bool has_more_related_objects = 3;
}

// Contains information that is needed to create a relationship between vaults.
message RemoteRelationshipInfo {

	// Object GUID.
	string object_guid = 1;

	// Object vault GUID.
	string vault_guid = 2;

	// Obj ID. May identify the unmanaged object in the remote vault.
	ObjID obj_id = 3;

	// Object type name.
	string object_type_name = 4;

	// Object type semantic aliases.
	string object_aliases = 5;

	// Class ID.
	int32 object_class_id = 6;

	// Class name.
	string object_class_name = 7;

	// Class semantic aliases.
	string object_class_aliases = 8;

	// External ID of the object.
	string object_external_id = 9;

	// Object type GUID.
	string object_type_guid = 10;

	// Class GUID.
	string object_class_guid = 11;
}

// Struct for replication packages.
message ReplicationPackageInfo {

	// The display name of the item.
	string name = 1;

	// The status of the item.
	string status = 2;
}

// Struct for a restoring documents from archive job.
message RestoreFromArchiveJob {

	// Full path to the archive file on server.
	string source_file = 1;

	// Impersonation information for accessing the archive target file on server.
	Impersonation impersonation = 2;

	// True to restore the entire contents of the archive. False to restore a specific document only.
	bool restore_full_archive = 3;

	// If bEntireContents is false, specifies the document to restore.
	int32 restore_object_id = 4;

	// Bit flags that control the execution of this restoring job.
	OBJRESTORINGFLAGS options = 5;

	// The overriding ACL. Can be unset.
	AccessControlList acl_override = 6;

	// If not empty, specifies the metadata structure items to restore.
	repeated MetadataStructureSelector restore_structure_items = 7;

	// Transport connection string.
	string cloud_storage_connection_string = 8;

	// Package encryption password.
	string cloud_storage_password = 9;

	// Configuration id of this restoring job.
	string configuration_id = 10;
}

// Struct for the output info of a job of restoring whole documents.
message RestoreFromArchiveJobOutputInfo {

	// The summary report in a serialized format.
	bytes summary = 1;
}

// Struct for a restore job.
message RestoreJob {

	// Full path to the backup file on server (full backup).
	string full_backup_file = 1;

	// Full path to the backup file on server (differential backup, optional).
	string differential_backup_file = 2;

	// The definition of the vault. If the GUID field is GUID_NULL, the restored vault uses the GUID specified in the backup files. Otherwise, it uses the given GUID (= restore to a different identity).
	Vault target_vault = 3;

	// If true, existing target files are overwritten. If false, restore fails if a target file already exists.
	bool overwrite_existing_files = 4;

	// Impersonation information for accessing the backup file on server.
	Impersonation impersonation = 5;

	// Options for controlling the attaching of the vault.
	AttachVaultOptions vault_attach_options = 6;
}

// Struct for the output info of a restore job.
message RestoreJobOutputInfo {

	// Receives the full definition of the restored vault.
	Vault restored_vault = 1;
}

// Struct for a single RPC error info.
message RPCErrorInfo {

	// The error code (HRESULT value).
	int32 error_code = 1;

	// The name of the file.
	string file = 2;

	// The line of the file.
	string line = 3;

	// The error description.
	string description = 4;
}

// This struct contains just an array of error info structs.
message RPCErrorInfoArray {

	// Array of errors.
	repeated RPCErrorInfo value = 1;
}

// Struct for scanning and OCR options.
message ScanningAndOCROptions {

	// True if the whole client-side scanning feature is on.
	bool allow_scanning_from_clients = 1;

	// True if the OCR feature is on for the client-side.
	bool allow_client_ocr = 2;

	// True if the OCR feature is on for the server-side.
	bool allow_server_ocr = 3;

	// An array of file extensions (not including dot) for which scanning and OCR generation is allowed.
	repeated string allowed_file_extensions = 4;

	// OCR setup error code.
	uint32 ocr_setup_error_code = 5;

	// Default options for OCR.
	OCROptions ocr_options = 6;
}

// Struct for a scheduled job.
message ScheduledJob {

	// Job ID.
	int32 id = 1;

	// Job name.
	string name = 2;

	// If true, the job is enabled (runs according to the specified schedule).
	bool is_enabled = 3;

	// The schedule of this job (a serialized Task object of Task Scheduler).
	bytes schedule = 4;

	// Job type.
	JobType type = 5;

	// The job details as a union.
	JobDataUnion data = 6;

	// True if the job is temporary and thus executed only once. Temporary jobs are not scheduled so their run info should not be interpreted.
	bool is_temporary = 7;
}

// Struct for a scheduled job output info.
message ScheduledJobOutputInfo {

	// Job ID.
	int32 id = 1;

	// General output info message.
	string message = 2;

	// Job type.
	JobType type = 3;

	// The job output info details as a union.
	JobOutputInfoDataUnion data = 4;
}

// Struct for a scheduled job run info.
message ScheduledJobRunInfo {

	// True if the job is currently running.
	bool is_running = 1;

	// The next time the job will run. Zero to indicate no next run time.
	google.protobuf.Timestamp next_run_utc = 2;

	// The last time the job ran. Zero to indicate that the job has never run (or is still running for the first time).
	google.protobuf.Timestamp last_run_utc = 3;

	// True if the last run at ftLastRun was successful, false otherwise.
	bool last_run_succeeded = 4;

	// Error string from the last run (if any).
	string last_run_errors = 5;

	// True if the job is cancelled.
	bool last_run_cancelled = 6;

	// -1 or a current job step. 0 indicates the beginning. When positive, value depends on the underlying job that is being executed. Steps are numbered sequentially from 1 to forward.
	int32 current_step = 7;

	// -1 or the completion percent of a current job. This is always an estimate.
	int32 curent_step_completion = 8;

	// The output information on the job. Available only when the job is not running (e.g. bRunning and is false).
	ScheduledJobOutputInfo output = 9;
}

// A structure that specifies a single search condition.
//
// A condition compares the value of `expression`, evaluated for each object, with `value` using the
// operator `type`. Common conditions:
//
// | To find objects... | `expression` | `type` | `value` |
// | --- | --- | --- | --- |
// | that are not deleted | status value `STATUS_TYPE_IS_DELETED` | `CONDITION_TYPE_EQUAL` | Boolean `false` |
// | of an object type | status value `STATUS_TYPE_OBJECT_TYPE` | `CONDITION_TYPE_EQUAL` | lookup, value list -11, item = object type ID |
// | of a class | property value, `property_def` 100 | `CONDITION_TYPE_EQUAL` | lookup, value list 1, item = class ID |
// | of any of several classes | property value, `property_def` 100 | `CONDITION_TYPE_EQUAL` | multi-select lookup of the class IDs |
// | with an object ID | status value `STATUS_TYPE_OBJECT_ID` | `CONDITION_TYPE_EQUAL` | integer |
// | whose title contains a text | property value, `property_def` 0 | `CONDITION_TYPE_CONTAINS` | text |
// | that refer to a lookup item | property value of the lookup property | `CONDITION_TYPE_EQUAL` | lookup of the item |
// | whose property is empty | property value | `CONDITION_TYPE_EQUAL` | the property's data type, `is_null_value` true |
// | modified in the last 7 days | property value 21 with `DATA_FUNCTION_DAYS_FROM` | `CONDITION_TYPE_LESS_THAN_OR_EQUAL` | integer 7 |
// | matching a full-text search | any field, `search_metadata` and/or `search_filedata` set | `CONDITION_TYPE_CONTAINS` | text |
// | with a file name pattern | file value `FILE_VALUE_TYPE_FILE_NAME` | `CONDITION_TYPE_MATCHES_WILDCARD_PATTERN` | text such as `*.pdf` |
//
// Property and value list IDs other than the built-in ones (0 Name or title, 20 Created, 21 Last
// modified, 100 Class; value list 1 for classes, -11 for object types) differ between vaults: resolve
// them by alias or GUID first. A condition the server cannot evaluate fails with "Invalid search
// condition."
message SearchCondition {

	// The left side of the condition: what is evaluated for each object, such as a property value, a status value or any field (full-text search).
	Expression expression = 1;

	// The comparison operator.
	ConditionType type = 2;

	// The right side of the condition: the value to compare with. Its data type must suit the expression, for example a lookup for a lookup property, Boolean for `STATUS_TYPE_IS_DELETED`.
	TypedValue value = 3;
}

// The conditions of one search.
//
// All conditions of the array must match (AND). An array with no conditions matches every object the
// caller can see, deleted objects included. A typical array has the "not deleted" condition plus
// the conditions of the search. `SearchObjects`, `GetObjectCountInSearch` and `GetFacetValues`
// take exactly one array, although their fields are repeated.
message SearchConditionArray {

	// The conditions. All of them must match.
	repeated SearchCondition value = 1;
}

// Struct for a search definition.
message SearchDef {

	// The conditions that limit the object set of this search.
	repeated SearchCondition filter_conditions = 1;

	// View levels (the display hierarchy of this search).
	repeated GroupingLevel grouping_levels = 2;

	// Search flags. This affects the resulting object version set and also distinct view level values displayed inside this search.
	SearchFlags options = 3;
}

// Additional information about a completed search operation.
//
// Timing information about the search, for diagnostics only. Values that were not measured are 0
// or -1.
message SearchOutputInfo {

	// The processing time at the search engine, in milliseconds. -1 if not known.
	int32 processing_time_at_engine_in_milliseconds = 1;

	// The processing time at the search engine, including network roundtrip from MFServer, in milliseconds. -1 if not known.
	int32 processing_time_at_engine_from_mfserver_in_milliseconds = 2;

	// The total processing time at MFServer, in milliseconds. -1 if not known.
	int32 processing_time_at_mfserver_in_milliseconds = 3;

	// The total processing time at MFServer, including network roundtrip from the client, in milliseconds. -1 if not known.
	int32 processing_time_at_mfserver_from_client_in_milliseconds = 4;
}

// The number of objects found in one group of search results.
message SearchResultsCount {

	// The group that was counted: an object type ID, or -100 for all object types.
	int32 group_id = 1;

	// How to read `count`: `exact_measure` if exact, `more_than` if more objects match.
	SRCOUNTFLAGS flags = 2;

	// The number of matching objects.
	uint32 count = 3;
}

// Identifies a search results count request.
message SearchResultsCountRequest {

	// The identifier of a search results group.
	int32 group_id = 1;

	// Threshold for the count. If zero, it should be ignored. A non-zero value specifies that the caller does not request an exact count if it is greater than this threshold value. If a real count is smaller than or equal this threshold, it is reported as an exact count.
	uint32 count_threshold = 2;
}

// Information on search results item (object version info + search specific info).
message SearchResultsItem {

	// The object and the found version: object ID, version, title, class, files and status. Property values are not included.
	ObjectVersionEx object = 1;

	// The relevance score of the result. Higher is more relevant.
	int32 score = 2;

	// For an Aino search, the passage of text that matched. Empty for other searches.
	string chunk = 3;
}

// Identifies a search results page request.
//
// `SearchObjects` does not support page requests: a request that has them fails with "Not
// implemented." For paging, see [SearchObjects](mfiles:MFiles.IRPCSearch.SearchObjects).
message SearchResultsPageRequest {

	// The identifier of a search results group.
	int32 object_type = 1;

	// The zero-based index of a page.
	int32 page = 2;

	// Search results page request flags.
	SRPREQUESTFLAGS options = 3;

	// An array of ObjIDs. If the SRPREQUEST_UNSEENPAGE flag is available, these are ObjIDs to exclude. If the SRPREQUEST_SEENPAGE flag is available, these are ObjIDs to include.
	repeated ObjID seen_objects = 4;
}

// Struct for specifying sorting for search results.
//
// Unset (no rules) keeps the default order: by relevance. A request the server cannot sort fails
// with "The content can't be sorted across all pages." unless `options.allow_resorting_to_default_sort`
// is set; then the results come in the default order and the response's search status flags have
// `resorted_to_default_sort`. Sorting is not available with `SearchFlags.look_in_all_versions`.
// When more objects match than the vault's sorting limit (20,000 by default), the same rule applies
// (`resorted_to_default_sort_too_many_results`).
message SearchResultsSorting {

	// The sort rule. Exactly one rule is supported; more than one cannot be sorted.
	SortRuleValueArray rules = 1;

	// Sort flags. Set `allow_resorting_to_default_sort` to get relevance order instead of an error when the rule cannot be applied.
	SortFlags options = 2;
}

// Search options.
//
// Leave unset to search the vault's default index in `SEARCH_MODE_DEFAULT`, where the full-text
// search engine is used only for searches with a full-text (any-field) condition.
message SearchTarget {

	// The name of the search index to use. Empty uses the vault's default index. An unknown name fails with "Target index is not available."
	string index = 1;

	// Whether to prefer, require or avoid the full-text search engine. See [SearchMode](mfiles:MFiles.SearchMode).
	SearchMode mode = 2;

	// True to also search objects kept in Master Storage, where the vault supports it.
	bool search_master_storage = 3;

	// Continuation token for paging results from Master Storage. `SearchObjects` does not support it and fails with "Continuation token is not supported." when it is set together with `search_master_storage`.
	string continuation_token = 4;
}

// Struct for Web Cross origin Settings.
message SecurityAndCorsSettings {

	// The cross origin domain access for classic web.
	repeated string enable_cross_origin_web_access = 1;

	// The allowed cross-origin Header like Content-Type, X-Authentication, Access-Control-Allow-Origin.
	string cross_origin_headers = 2;

	// the allowed cross-origin Methods like PUT,POST,DELETE,GET.
	string cross_origin_methods = 3;

	// True to Prevent XFS, false to allow XFS.
	bool prevent_xfs = 4;

	// The cross-frame sites access for classic web.
	repeated string allowed_cross_frame_sites = 5;
}

// Struct for a server address.
message ServerAddress {

	// The network address (name) of the server.
	string network_address = 1;

	// The endpoint of the server.
	string endpoint = 2;

	// The protocol sequence of the server.
	string protocol_sequence = 3;
}

// Server endpoint certificate details.
message ServerCertificate {

	// Certificate id.
	int32 id = 1;

	// Certificate info.
	CertificateInfo certificate = 2;

	// Private key info.
	PrivateKeyInfo private_key = 3;
}

// gRPC endpoint settings.
message ServerCertificateChangeRequest {

	// Endpoint ID to modify. -1 to create new endpoint.
	int32 id = 1;

	// Action to perform for the certificate.
	ChangeAction certificate_action = 2;

	// Certificate to set, if the action is replace.
	string certificate = 3;

	// Action to perform for the private key.
	ChangeAction private_key_action = 4;

	// Private key to set, if the action is replace.
	string private_key = 5;
}

// The session info connected server.
message ServerData {

	// Server license serial number.
	string serial_number = 1;

	// Server deployment type.
	string deployment = 2;
}

// Server data push request details.
message ServerDataPushRequest {

	// Request type.
	ServerDataPushRequestType type = 1;

	// The actual message data.
	ServerDataPushRequestUnion data = 2;
}

// Union for various data push request data (depends on request type).
message ServerDataPushRequestUnion {

	oneof data {

		// Electronic signature request.
		ElectronicSignatureRequest electronic_signature_request = 1;

		// Extension authentication request.
		ExtensionAuthenticationRequest extension_authentication_request = 2;

		// Objects changed notification.
		ObjectsChangedNotification objects_changed_notification = 3;
	}
}

// Server data push response details.
message ServerDataPushResponse {

	// Response type.
	ServerDataPushRequestType type = 1;

	// The actual message data.
	ServerDataPushResponseUnion data = 2;

	// Possible error encountered when serving the request.
	RPCErrorInfoArray error = 3;
}

// Union for various data push response data (depends on request type).
message ServerDataPushResponseUnion {

	oneof data {

		// Electronic signature response.
		ElectronicSignatureResponse electronic_signature_request = 1;

		// Extension authentication response. Encrypted with the server public key.
		ExtensionAuthenticationResponseFromClient extension_authentication_request = 2;
	}
}

// gRPC endpoint settings.
message ServerEndpointSettings {

	// True to enable TLS on the endpoint.
	bool use_tls = 1;

	// Server certificates.
	repeated ServerCertificate server_certificates = 2;

	// True if there are pending changes on the server.
	bool has_pending_changes = 3;
}

// A structure that specifies a server health request.
message ServerHealthRequest {

	// Check that a refresh from One DB has been successfully made.
	ServerHealthItem vault_refresh_from_one_db = 1;

	// Check that all the vaults have finished the online transition.
	ServerHealthItem online_state_transition_finished_for_all_vaults = 2;

	// Check that all the vaults are in correct end state.
	ServerHealthItem all_vaults_in_correct_end_state = 3;
}

// A structure that specifies the server health results.
message ServerHealthResult {

	// True, if a refresh from One DB has been successfully made. Undefined, if One DB is not enabled for the server.
	TriStateBoolean vault_refresh_from_one_db_succeeded = 1;

	// True, if all the vaults have finished the online transition.
	TriStateBoolean online_state_transition_finished_for_all_vaults_succeeded = 2;

	// True, if all the vaults are in correct end state.
	TriStateBoolean all_vaults_in_correct_end_state_succeeded = 3;
}

// Struct for a server user account.
message ServerUser {

	// The login name that is associated with this server user (e.g. 'DOMAIN\user').
	string login_name = 1;

	// Bitmask of the server roles of the login.
	SRVROLES server_roles = 2;
}

// Capabilities of M-Files Server and the connected document vault.
//
// Each field is true when the server supports the feature. Check the relevant flag before using a
// method or field that a newer server introduced, instead of comparing version numbers.
// [GetServerCapabilities](mfiles:MFiles.IRPCLogin.GetServerCapabilities) returns the server's
// flags without a session; `SessionData.server_vault_capabilities` adds the vault's settings for the
// logged-in user (for example `facet_search`).
message ServerVaultCapabilities {

	// Vault supports in-vault login accounts.
	bool vault_login_accounts = 1;

	// Specifies whether sharing public links are allowed.
	bool public_link_sharing = 2;

	// Specifies whether sharing public links for latest versions are allowed.
	bool latest_version_public_link_sharing = 3;

	// Specifies whether facet search are allowed.
	bool facet_search = 4;

	// Specifies whether property definitions can be configured searchable or unsearchable.
	bool property_def_searchability = 5;

	// Server implements automatic metadata feature and the metadata extraction is enabled on server.
	bool automatic_metadata = 6;

	// Specifies whether file streaming is supported.
	bool file_streaming = 7;

	// Server supports search options.
	bool search_options2 = 8;

	// Server supports returning ext. application structs in json format.
	bool json_ext_applications = 9;

	// Server supports searching for value list items which are referenced by objects.
	bool search_referenced_value_list_items = 10;

	// Server supports calling the new GetTextContentForFile method with options.
	bool get_text_content_with_options = 11;

	// Server supports external repository object migration.
	bool external_repository_object_migration = 12;

	// Server supports communication with client through HTTP API.
	bool client_http_api = 13;

	// Server supports reverse grouping levels.
	bool reverse_grouping_level = 14;

	// Server supports configuration ID in export and import jobs.
	bool replication_configuration_id = 15;

	// Server supports detecting the language of plain text.
	bool detect_text_language = 16;

	// Server supports asynchronous NACL change propagation.
	bool async_nacl_change_propagation = 17;

	// Server supports object data retrieval in chunks.
	bool object_data_retrieval_in_chunks = 18;

	// Server supports retrieving asynchronous tasks.
	bool async_tasks_retrieval = 19;

	// Server supports finding duplicate files.
	bool find_duplicates = 20;

	// Server supports favoring full-text search even if no AnyField conditions exist.
	bool favor_full_text_search = 21;

	// Server supports application task queue operations.
	bool application_task_queue = 22;

	// Server supports ObjectPermissionsForClient.
	bool object_permissions_for_client = 23;

	// Server supports undeleting a user account by GUID.
	bool undelete_user_account_by_guid = 24;

	// Server supports using UserVisibleACL in searches to check users' read access to objects.
	bool use_user_visible_aclin_searches = 25;

	// Server supports conflict detection when saving named values.
	bool named_value_storage_conflict_detection = 26;

	// Properties with hierarchy for real object types supported.
	bool hierarchical_object_type_properties = 27;

	// Server supports embedding vNext UI to the SharePoint.
	bool embedded_ui_for_share_point = 28;

	// Server supports embedding vNext UI to the Salesforce.
	bool embedded_ui_for_salesforce_crm = 29;

	// Server supports asynchronous object class modification.
	bool async_modify_object_class = 30;

	// Server supports settings management.
	bool settings_manager = 31;

	// Server supports web user interface.
	bool web_user_interface = 32;

	// Server supports removing objects from "Recently Accessed by Me" -view.
	bool remove_from_recently_accessed = 33;

	// Server supports plain text password methods.
	bool plain_text_password_methods = 34;

	// Server supports OCR automatic language detection.
	bool ocr_automatic_language_detection = 35;

	// Server supports ground link feature.
	bool ground_link = 36;

	// Server supports asynchronous AACL change propagation.
	bool async_aacl_change_propagation = 37;

	// Server supports google g-suite.
	bool google_integration_supported = 38;

	// Server supports making document comparison requests.
	bool document_compare = 39;

	// Server supports full control vault user can modify code (Cloud Service Fabric Isolated Service).
	bool full_control_vault_user_can_modify_code = 40;

	// Server supports sending pre-defined broadcast messages through the vault database.
	bool broadcast_request_supported = 41;

	// Server supports embedding vNext UI to the ArcGIS.
	bool embedded_ui_for_arc_gis = 42;

	// Server supports search in external view folder.
	bool search_in_external_view_folder = 43;

	// Server supports automatic semantic aliases (advanced vault settings).
	bool automatic_semantic_alias = 44;

	// Server supports automatic online transition.
	bool automatic_online_transition = 45;

	// Server supports vault server attachment feature.
	bool vault_server_attachments = 46;

	// Server supports replication package list and remove feature.
	bool replication_package_list_and_remove = 47;

	// Does server support plugin replication for vault admins?
	bool plugin_replication_allowed_for_vault_admin = 48;

	// Server supports recurring notifications.
	bool recurring_notifications = 49;

	// Server supports removing workflows as a batch.
	bool remove_workflows = 50;

	// Server supports JSONed workflows admin interface.
	bool jsoned_workflows_admin = 51;

	// Server supports configuring TLS certificates.
	bool tls_certificates = 52;

	// Server supports transmitting AttachVaultOptions.
	bool attach_vault_options_as_json = 53;

	// Sending production telemetry data by web clients is enabled.
	bool web_client_sends_telemetry_data = 54;

	// Server supports ground link EOT feature.
	bool ground_link_eot = 55;

	// Server supports 64-bit VAULTACCESS.
	bool vault_access_rights64_bits = 56;

	// Server supports a vault role for managing private views.
	bool vault_role_manage_private_views = 57;

	// Server supports returning only vaults user has access to.
	bool exclude_vaults_user_cannot_access = 58;

	// Server supports finding duplicate of ObjVer.
	bool find_duplicates_of_obj_ver = 59;

	// Server supports adding object with files in single server call.
	bool add_object_with_files = 60;

	// Server supports accessing and setting Folder UI State of View as structure based data.
	bool folder_uistate_operations_of_view = 61;

	// Server supports long SMTP notification password.
	bool long_smtpnotification_password_supported = 62;

	// Server reports the "can change permissions" object capability.
	bool can_change_permissions_object_capability = 63;

	// Server supports adding a new version to the object based on the related deleted conflict object.
	bool add_new_version_based_on_conflict_object = 64;

	// Server can read replication packages whose names end with the full hash.
	bool reading_replication_packages_from_new_location_supported = 65;

	// Server can write replication packages whose names end with the full hash.
	bool writing_replication_packages_to_new_location_supported = 66;

	// Server supports vault health check.
	bool vault_health_check_supported = 67;

	// Server supports that all users can see deleted conflict objects.
	bool allow_all_see_deleted_conflict_objects = 68;

	// Automatic conflict resolution is enabled in the vault.
	bool automatic_conflict_resolution = 69;

	// Server supports sharing private views.
	bool share_private_views = 70;

	// Server supports storing external mail source oauth proxy information.
	bool external_mail_source_oauth_proxy_supported = 71;

	// Server supports an API to get a range of asynchronous tasks.
	bool async_tasks_range_api = 72;

	// Server supports shared link based wopi operations.
	bool shared_link_based_wopioperations = 73;

	// Server supports hashing passwords with advanced algorithms, including at least PBKDF2.
	bool advanced_password_hashes = 74;

	// Server supports anonymous authentication.
	bool anonymous_authentication_supported = 75;

	// Server supports getting default configuration for replication.
	bool get_default_replication_configuration_supported = 76;

	// `ObjectVersionDataRequest` supports an identity type.
	bool object_version_data_request_with_identity_type_supported = 77;

	// Encryption with RSA+AES is supported.
	bool rsa_aes_encryption = 78;

	// Indexer monitoring status is supported.
	bool indexer_monitoring_status = 79;

	// Green Lights supported.
	bool green_lights_supported = 80;

	// Server supports installation of signed scipts and apps by users.
	bool allow_code_modification_with_valid_signature_supported = 81;

	// The Metadata Card Configuration is delivered as a pre-resolved from a dedicated virtual NVS namespace.
	bool mdcc_resolved_on_server = 82;

	// WOPI CoAuthoring using New web is supported.
	bool new_web_wopico_authoring_supported = 83;

	// Server supports returning of vault session info.
	bool get_vault_session_info_supported = 84;

	// EvenLog Saved Searches Supported.
	bool event_log_saved_searches = 85;

	// Sys Admins can install unsigned vault applications and modify unsigned VBScripts even when the signing feature is enabled.
	bool allow_sys_admin_unsigned_code_modification_supported = 86;

	// If vault app installation can require other vault apps to be installed in the vault.
	bool vault_app_dependencies_supported = 87;

	// Server supports deleted/not deleted-condition in an exported dataset definition.
	bool dataset_deleted_condition_supported = 88;

	// Server supports transmitting hashing passwords with the same encoding between all gRPC methods.
	bool unified_password_hashes = 89;

	// Server supports SetProperties with missing required params.
	bool set_properties_with_missing_required_params_supported = 90;

	// Index management operations are enabled for the server.
	bool index_management_enabled = 91;

	// Specifies whether the server supports sorting search results.
	bool search_results_sorting = 92;

	// Server supports state transition time setting via state property action.
	bool property_action_state_transition_time = 93;

	// Server supports set new web as default client.
	bool set_new_web_as_default_client_supported = 94;

	// Server supports ignore vault's external data connection points.
	bool ignore_vault_external_data_connection_points = 95;

	// Server supports returning tasks the caller must wait before login to the vault with that user succeeds.
	bool add_user_returns_tasks_before_login = 96;

	// Server supports the new links and the Link Loading Page.
	bool m_files_link_supported = 97;

	// Server supports verification of vault app signatures.
	bool can_verify_vault_app_signature = 98;

	// Server supports allowing signed code importing even if the code import would be otherwise denied for the structure element.
	bool allow_signed_code_in_import_supported = 99;

	// Server supports real property definition based conditions in value list item searches.
	bool value_list_item_search_property_conditions = 100;

	// Server supports additive permissions via automatic ACL components.
	bool additive_permissions_via_automatic_aclcomponents = 101;

	// Server supports setting the default view from the user's filtered views.
	bool set_default_view_from_my_filtered_views_supported = 102;

	// Server supports the updated SetPropertiesEx call.
	bool set_properties_ex_supported = 103;

	// Server supports search results sorting done by search engine.
	bool search_results_sorting_by_search_engine = 104;

	// Server supports returning task hierarchy enabling waiting for all tasks matchins search conditions to complete.
	bool async_task_hierarchy_wait_supported = 105;

	// Server supports vault-level optimization jobs.
	bool vault_level_optimization_jobs = 106;

	// Server supports converting metadata card configurations between primary and configurator versions.
	bool mdcc_conversion_on_server = 107;

	// Server supports specifying a filter when requesting templates.
	bool template_request_filter_supported = 108;

	// Server supports importing views with an older last modified date and time.
	bool import_views_with_older_last_modified_supported = 109;

	// Server supports new interface methods for visitor links.
	bool visitor_links_supported = 110;

	// Server supports modern authentication (OAuth2) to send notifications.
	bool notifications_modern_authentication_supported = 111;

	// Server supports providing full metadata structure with one RPC call.
	bool get_metadata_structure_supported = 112;

	// Server supports auto-canceling optimize vault jobs.
	bool optimize_vault_job_auto_cancel = 113;

	// Server supports generating authentication configuration for Azure v2.0 endpoint.
	bool generate_v2_azure_auth_conf_supported = 114;

	// Server supports creating preview thumbnails.
	bool preview_thumbnail_supported = 115;

	// Server supports vault connection QR settings.
	bool vault_connection_qrsettings = 116;

	// Server supports the 'RunExtensionMethod' method.
	bool run_extension_method = 117;

	// Server supports structure item groups in the export job.
	bool structure_item_groups_in_export_supported = 118;

	// Server supports teams add-on.
	bool teams_add_on_supported = 119;

	// Server support all different types log-in methods through a single method.
	bool unified_login_supported = 120;

	// Server supports handling of login accounts defined as technical credentials.
	bool handling_technical_credentials_supported = 121;

	// Server supports JSONed vault basic.
	bool jsoned_vault_basic_supported = 122;

	// Server supports generating authentication configuration for M-Files Login Service.
	bool generate_login_service_auth_conf = 123;

	// Server supports new vNext based Desktop.
	bool new_desktop_supported = 124;

	// Server supports notifying greenlights joining errors and error is on.
	bool gl_comm_error = 125;

	// Server supports storing and returning recently used values for lookup properties in metadata.
	bool recently_used_values = 126;

	bool add_object_with_multiple_files = 127;

	// Server supports new GetEffectivePermissions API.
	bool new_get_effective_permissions_supported = 128;

	// Server supports subfolders in views.
	bool sub_folders_in_views = 129;

	// Server supports manually migrating Azure AD authentication configuration to Login Service.
	bool manual_aad_auth_conf_migration_supported = 130;

	// Server supports reverse references in pseudo-user ACEs (Access Control Entries).
	bool reverse_references_in_pseudo_user_aces = 131;

	// Server supports entity version numbering to track modification conflicts.
	bool entity_version_checking_supported = 132;

	// HTTP layer supports downloading folders with download URLs.
	bool folder_download_supported = 133;

	// Server supports special folder type such as history.
	bool uistate_for_special_folders_supported = 134;

	// Server supports getting the latest version comment as part of the object data.
	bool latest_comment_as_object_data_supported = 135;

	// Server supports native co-authoring.
	bool native_co_authoring_supported = 136;

	// Server supports GetWorkflowStateHistory API.
	bool workflow_state_history = 137;

	// Is logging in using M-Files accounts prohibited.
	bool block_mfiles_login = 138;

	// Server supports Cloud Management API Operations.
	bool cloud_management_api_operations = 139;

	// Server supports 'ReloadApplication' method.
	bool reload_application = 140;

	// Workflow, State and State Transition struct with user description fields.
	bool workflow_descriptions_supported = 141;

	// Server supports new GetLicenseCodeAndSerialNumber API.
	bool new_license_api = 142;

	// Server supports new WOPI discovery RPC endpoint.
	bool new_wopidiscovery_endpoint_supported = 143;

	// M-Files Web Access uses only session-based tokens.
	bool web_force_session_based_token = 144;

	// Vault supports basic-tier objects.
	bool basic_tier_objects_supported = 145;

	// Server supports the property with multiple editors for a single object version.
	bool version_editors_property_supported = 146;

	// Server supports the Check in external Changes RPC endpoint.
	bool check_in_external_changes_supported = 147;

	// Server supports Sharing center 1 feature.
	bool sharing_center1_supported = 148;

	// Server supports GetFolderContents API with request and response structures.
	bool get_folder_contents_api_request_response = 149;

	// Server supports UIX Application Schema v6.
	bool uixapplication_schema_v6_supported = 150;

	// Server supports user and group change versioning and synchronization to Change Hub.
	bool user_and_group_changes = 151;

	// Server supports native co-authoring replication.
	bool native_co_authoring_replication_supported = 152;

	// Server recognizes a vault setting that enables co-authoring for Master Storage separately from Microsoft 365.
	bool separate_desktop_co_authoring_setting = 153;

	// Server uses the gRPC-only routing for incoming requests.
	bool incoming_requests_via_grpc_only = 154;

	// Server uses the non-standard default (7780) for IIS endpoint.
	bool non_standard_default_for_iis_endpoint = 155;

	// Server supports workspace personalization.
	bool workspace_personalization_supported = 156;

	// Server supports Integration Platform.
	bool integration_platform = 157;

	// The server supports the post-operation visibility info in CheckInExternalChanges RPC function.
	bool check_in_external_changes_returns_visibility = 158;

	// Server supports GetClientSettingsByType for M-Files Desktop.
	bool get_client_settings_for_desktop_supported = 159;

	// Server supports Modular UI PDFTron integration.
	bool pdftron_modular_uisupported = 160;

	// Server supports QuerySearchAgent RPC endpoint.
	bool query_search_agent_supported = 161;

	// Server supports SetTier API and functionality.
	bool set_tier_supported = 162;

	// Server supports user group synchronization status.
	bool user_group_sync_status_supported = 163;

	// Server supports downloading content from temporary location.
	bool downloading_content_from_temp_location_supported = 164;

	// Server supports GetUIVersionInfo RPC endpoint.
	bool get_uiversion_info_supported = 165;

	// Unused.
	bool aino_search_results_summarization_supported = 166;

	// Server supports CAD file preview (DWG, DXF, DWT, DGN to PDF conversion).
	bool cad_file_preview_supported = 167;

	// Collective metadata structure interfaces IRPCDeclarativeMetadataStructureAsProtobuf and IRPCDeclarativeMetadataStructure are available.
	bool declarative_metadata_structure_supported = 168;

	// Server checks user downloads of Master Storage files against the file's malware verdict, and offers [GetFileMalwareInfo](mfiles:MFiles.IRPCObjectOperations.GetFileMalwareInfo) for advisory warnings.
	bool master_storage_malware_detection = 169;

	// Server supports KeepUploadSessionAlive RPC endpoint.
	bool keep_upload_session_alive_supported = 170;

	// Server offers GetSensitivityLabels (IRPCSensitivityLabels), which returns the Microsoft Purview sensitivity labels of files in Master Storage, for advisory label display.
	bool purview_labels = 171;

	// Server supports looking up objects by their external IDs.
	bool get_objects_by_external_ids = 172;

	// Server supports the Aino summarization agent (AI summaries with Q&A).
	bool summarization_agent_supported = 173;

	// Server supports dual preview (SharePoint Embedded preview and PDFTron) for documents in vaults that keep their files in SharePoint Embedded.
	bool dual_preview_supported = 174;

	// Server checks the external ID for co-authoring.
	bool coauthoring_external_idchecked = 175;

	// Server offers GetIndexConfigurationsForIX (IRPCIndexingDataSource2), which returns the vault's search index configuration, without secrets, to a caller who can see all objects.
	bool get_index_configurations_for_ixsupported = 176;

	// Server supports creating objects in a draft (pending-upload) state with `AddObjectWithFiles` (`draft`).
	bool draft_object_creation_supported = 177;

	// Server supports reading the program default display settings.
	bool retrieval_of_program_defaults_display_settings_supported = 178;

	// Server offers ResetFolderUIStateToDefaults (IRPCFolderUISettings), which resets a folder's UI state and returns the resulting state.
	bool reset_folder_uistate_to_defaults_supported = 179;

	// Server supports automatic check-in when an Office file is closed in Microsoft 365 co-authoring.
	bool auto_check_in_on_file_close_supported = 180;

	// Server lets vault administrators modify cloud replication jobs that carry folders, keeping the server-owned working directory and impersonation.
	bool vault_admin_edit_of_replication_job_with_working_directory_supported = 181;

	// Server supports [CreateNewObjectWithPropertyMetadata](mfiles:MFiles.IRPCObjectOperations.CreateNewObjectWithPropertyMetadata): a new object and its property value metadata in one call.
	bool create_new_object_with_property_metadata_supported = 182;

	// Server supports [AddObjectWithFilesWithPropertyMetadata](mfiles:MFiles.IRPCObjectOperations.AddObjectWithFilesWithPropertyMetadata): a new object with files and its property value metadata in one call.
	bool add_object_with_files_with_property_metadata_supported = 183;

	// Server accepts inline file content (`OBJ_FILE_SOURCE_TYPE_FILE_CONTENT`) when creating an object with files.
	bool direct_file_content_in_add_object_with_files_supported = 184;

	// Server supports [SetPropertiesWithMetadataAttributedTo](mfiles:MFiles.IRPCObjectOperations.SetPropertiesWithMetadataAttributedTo), which records automatic metadata changes as made by a built-in agent user.
	bool set_properties_with_metadata_attributed_to_supported = 185;

	// Server offers IsVaultReadyForM365StoragePermissions (IRPCUsersAdmin), which tells whether the vault's users meet the precondition for applying M-Files permissions to Microsoft 365 storage.
	bool vault_ready_for_m365_storage_permissions_supported = 186;

	// Server supports the `file_ref` uploads of [IRPCFileTransfer](mfiles:MFiles.IRPCFileTransfer) and [IRPCFileTransferStreaming](mfiles:MFiles.IRPCFileTransferStreaming). False by default in M-Files Server 26.11, where those methods answer "Not implemented.".
	bool file_upload_stateless_supported = 187;

	// Server supports requesting GetTextContentForFile content in a specific FileFormat (plain text or Markdown) and reports the format actually produced.
	bool get_text_content_with_format_supported = 188;

	// Server supports persisting reasoning metadata.
	bool persistent_reasoning_metadata_supported = 189;

	// Server supports agentic Aino retrieval.
	bool agentic_aino_supported = 190;

	// Server supports creating a whole traditional folder tree in one request (CreateFolderTree). Not reported for Ground Link proxy vaults.
	bool folder_tree_creation_supported = 191;

	// Server offers GetCurrentTimestampForIX (IRPCIndexingDataSource2), which returns the vault's current indexing position so that a crawl can start from now.
	bool get_current_timestamp_for_ixsupported = 192;

	// Server supports saving per-user folder selections for view levels (SetFolderSelection) and reporting them.
	bool select_folders_supported = 193;
}

// The session's access rights.
message SessionAccess {

	// The session's server-level access rights.
	ServerAccess server_access = 1;

	// The session's vault-level access rights.
	VaultAccess vault_access = 2;

	// The session's object-level access rights regardless of object ACLs.
	ObjectAccess object_access = 3;

	// The session's object type-level access rights regardless of object type ACLs.
	ObjectTypeAccess object_type_access = 4;

	// The session's property definition-level access rights regardless of property definition ACLs.
	PropertyDefAccess property_def_access = 5;
}

// A new session, returned by [LogIn](mfiles:MFiles.IRPCLogin.LogIn) and the other login methods.
message SessionData {

	// The session ID (48 bytes). Send it unchanged in the `mfiles-session-id-bin` metadata header of every call that needs a session.
	bytes session_id = 1;

	// The login account name, with the case stored on the server.
	string account_name = 2;

	// What the session may do on server level and in the vault, regardless of object permissions.
	SessionAccess access_rights = 3;

	// Capabilities of the server and, for vault sessions, the vault, as they apply to this user. More precise than [GetServerCapabilities](mfiles:MFiles.IRPCLogin.GetServerCapabilities).
	ServerVaultCapabilities server_vault_capabilities = 4;

	// The Windows locale ID used for sorting, for example 1033.
	uint32 locale = 5;

	// Call [KeepAlive](mfiles:MFiles.IRPCLogin.KeepAlive) at least this often. It is half of the session's idle timeout.
	uint32 keep_alive_interval_in_seconds = 6;

	// If false, not equal type comparisons are performed in pre-MF11 style in which it is enough that at least one of the left-side values does not match any of the right-side values in order to treat the left and right values unequal. If true, none of the left-side values can match any of the right-side values in order to treat the left and right values unequal i.e. pure set-based exclusion. Prefer using the new comparison style. The old behavior is provided for compatibility reasons.
	bool use_strict_set_equality_comparison = 7;

	// The edition of the server license.
	ProductMode product_mode = 8;

	// The user's identity in the vault. Unset for a server-level session.
	VaultData vault_data = 9;

	// Whether the login account is an M-Files or a Windows account.
	AccountType account_type = 10;

	// The server's license serial number and deployment type.
	ServerData server_data = 11;

	// The license the session uses.
	LicenseType license_type = 12;

	// Keep a file upload session alive at least this often (half of the upload session timeout).
	uint32 keep_upload_session_alive_interval_in_seconds = 13;
}

// Session ID.
message SESSIONID {

	// 64-byte session ID in RPC interface. 48 bytes in gRPC interface.
	bytes value = 1;
}

// Information about a session, as returned by
// [CreateUserSession](mfiles:MFiles.IRPCLogin.CreateUserSession) and in
// [VaultConnectionInfo](mfiles:MFiles.VaultConnectionInfo).
message SessionInfoServer {

	// Session ID when the login process has been completed successfully.
	bytes session_id = 1;

	// The number of seconds that can pass between KeepAlive calls before MFServer closes the session.
	uint32 keep_alive_interval_in_seconds = 2;

	// The M-Files Account ID of the logged-in user.
	int32 user_id = 3;

	// The M-Files Account name of the logged-in user.
	string account_name = 4;

	// The access rights of this session.
	SessionAccess session_access_rights = 5;

	// The user ID of this session's account, as well as the users for which the user is a substitute. The first ID in the vector is the user ID. Others are the IDs of the users for which the user is a substitute.
	repeated UserOrUserGroupID substitute_users = 6;

	// The user ID of this session's account, as well as the groups to which the user belongs either directly or indirectly. The first ID in the vector is the user ID. Others are group IDs.
	repeated UserOrUserGroupID user_and_group_memberships = 7;

	// Is the user an internal user?
	bool is_internal_user = 8;

	// If false, not equal type comparisons are performed in pre-MF11 style in which it is enough that at least one of the left-side values does not match any of the right-side values in order to treat the left and right values unequal. If true, none of the left-side values can match any of the right-side values in order to treat the left and right values unequal i.e. pure set-based exclusion. Prefer using the new comparison style. The old behavior is provided for compatibility reasons.
	bool use_strict_set_equality_comparison = 9;

	// Product mode.
	ProductMode product_mode = 10;

	// The user's language in the vault. The code and the name may be empty.
	Language language = 11;

	// The serialized time zone information (TIME_ZONE_INFORMATION) of this session.
	bytes timezone = 12;

	// The client software culture for this session.
	string client_culture = 13;

	// The ACL mode of the vault. Ignore it for a session that is not a vault session.
	ACLMode acl_mode = 14;

	// The license type of the logged-in user.
	LicenseType license_type = 15;

	// Keep a file upload session alive at least this often.
	uint32 keep_upload_session_alive_interval_in_seconds = 16;
}

// Struct for a parameter set for SetPropertiesMultiple.
//
// One object's changes in
// [SetPropertiesMultiple](mfiles:MFiles.IRPCObjectOperations.SetPropertiesMultiple). The fields
// mean the same as the fields of
// [SetPropertiesRequest](mfiles:MFiles.IRPCObjectOperations.SetProperties).
message SetPropertiesParams {

	// 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 = 1;

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

	// With `allow_modifying_checked_in_object`, true to fail if `obj_ver` is not the latest checked-in version.
	bool fail_if_not_latest_checked_in_version = 3;

	// Optional `version_guid` of the version in `obj_ver`, checked together with `fail_if_not_latest_checked_in_version`. Leave empty normally.
	string object_version_guid = 4;

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

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

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

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

	// Which ACL the server starts from when it updates the permissions; see SetProperties `acl_mode`. `ACLENFORCING_MODE_DISALLOW_CHANGES` is rejected.
	ACLEnforcingMode acl_enforcing_mode = 9;

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

// Request details for configuring server endpoint settings.
message SetServerEndpointSettingsParams {

	// True to enable TLS.
	bool use_tls = 1;

	// Server certificates to modify or add.
	repeated ServerCertificateChangeRequest modify_or_add_certificates = 2;

	// Certificates to remove.
	repeated uint32 remove_certificates = 3;
}

// Struct for set shared link recipient.
message SetSharedLinkRecipient {

	// The access key of the shared link.
	string access_key = 1;

	// The information about the shared link recipient linked to the access key to update expiration time and access type.
	SharedLinkRecipient recipient = 2;
}

// Struct for Theme configuration.
message SettingsToNotifyHttpGrpcService {

	// The client settings flags.
	CLIENTSETTINGFLAGS client_settings = 1;
}

// Struct for shared file information.
message SharedFileInfo {

	// The title of the file.
	string title = 1;

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

	// The logical size of the file in bytes.
	int64 logical_size = 3;

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

// Struct for shared link information.
message SharedLinkInfo {

	// The access key of the shared link.
	string access_key = 1;

	// The description of the shared link.
	string description = 2;

	// The creation time for the shared link. Is set by the server. Should be FILETIME_ZERO, when creating a new link.
	google.protobuf.Timestamp created_at_utc = 3;

	// The expiration time for the shared link. Use FILETIME_ZERO to indicate no expiration time.
	google.protobuf.Timestamp expires_at_utc = 4;

	// The object version referenced by the shared link.
	ObjVer obj_ver = 5;

	// The creator of this shared Link.
	int32 created_by_user = 6;

	// The file version referenced by the shared link.
	FileVer file_ver = 7;

	// Type of the shared link.
	SharedLinkType shared_link_type = 8;

	// True if any user has granted public access to the document.
	bool is_anyone_access_granted = 9;

	// The user who has granted public access to the document.
	int32 anyone_access_granted_by_user = 10;

	// Access type of the external shared link.
	ExternalSharedLinkAccessType external_shared_link_access_type = 11;

	// The user who created the shared link.
	string created_by_user_name = 12;

	// The user who granted public access.
	string anyone_access_granted_by_user_name = 13;
}

// Struct for visitor shared link recipient.
message SharedLinkRecipient {

	// The recipient email.
	string email = 1;

	// The access time for the shared link. Is set by the server.
	google.protobuf.Timestamp access_time = 2;

	// The creator of this shared Link.
	int32 created_by_user = 3;

	// Shared link notification type.
	SharedLinkNotification shared_link_notification = 4;

	// The expiration time for the shared link. Use FILETIME_ZERO to indicate no expiration time.
	google.protobuf.Timestamp expires_at_utc = 5;

	// The access type of the recipient.
	ExternalSharedLinkAccessType external_shared_link_access_type = 6;

	// The user who created the shared link.
	string created_by_user_name = 7;
}

// One pre-resolved ACL: the array of its simple components. The order is significant: index 0 is
// the object's own component and the rest are the automatic components in a stable order.
message SimpleACL {

	// Components.
	repeated SimpleACLComponent value = 1;
}

// The users and user groups that one ACL component allows or denies read access to. Additive
// automatic components have already been merged into this component, and pseudo-users have already
// been resolved to concrete users and groups, so the arrays can be applied as they are.
message SimpleACLComponent {

	// Users (positive IDs) and user groups (negative IDs) allowed read access by this component.
	repeated int32 allowed = 1;

	// Users (positive IDs) and user groups (negative IDs) denied read access by this component.
	repeated int32 denied = 2;
}

message Size {

	int32 width = 1;

	int32 height = 2;
}

// Struct for a sort rule.
message SortRule {

	// What to sort by: a property definition ID (0 or greater; the property must be searchable and not multi-line text), or a special key: -1 (name or title), -13 (created), -14 (last modified), or -102 (object ID, ascending only, not with a full-text condition).
	int32 key = 1;

	// Sort rule flags. Set `sort_descending` for descending order; the default is ascending.
	SortRuleFlags options = 2;
}

// Struct for an array of sort rules.
message SortRuleValueArray {

	// Sort rules. The first rule has the highest presedence meaning that it is the primary sort rule.
	repeated SortRule values = 1;
}

// Struct for the SQL database of a document vault.
message SQLDatabase {

	// Database engine identification.
	DBEngine engine = 1;

	// The data source i.e. the database server name where the vault's database is residing. This is specified for data service DB engines only. It is empty or unset for embedded databases such as Firebird Embedded.
	string server_name = 2;

	// The catalog i.e. the database name where the vault's data is residing. Allows the database name to differ from the vault display name. This is not specified in the Firebird case.
	string database_name = 3;

	// Impersonation information for accessing the database engine for administrative purposes. This contains SYSDBA (System Database Administrator) user name and password. If unset, the default user name and password are used.
	Impersonation system_admin_impersonation = 4;

	// Impersonation information for accessing the database engine in basic user operations that do not modify the database structure. This contains DB user name and password. If unset, the default user name and password are used.
	Impersonation basic_user_impersonation = 5;
}

// One state in a workflow.
message State {

	// State ID.
	int32 id = 1;

	// The name of the state.
	string name = 2;

	// The description of the state.
	string description = 3;

	// Flags that tell which actions are enabled for this state.
	ACTIONFLAGS options = 4;

	// The properties of the Set Permissions action.
	ActionSetACL action_set_acl = 5;

	// The properties of the Assign to User action.
	ActionSetAssignment action_assign_to_user = 6;

	// Action array.
	repeated ActionSetAssignment actions = 7;

	// The properties of the Send Notification action.
	ActionSendNotification action_send_notification = 8;

	// Action: set properties.
	ActionSetProperties action_set_properties = 9;

	// Action: convert to PDF.
	ActionConvertToPDF action_convert_to_pdf = 10;

	// Action: run VBScript code.
	string action_code = 11;

	// True if transitions involving this state must be individually allowed.
	bool restrict_transitions = 12;

	// True if state transitions require edit access to the object.
	bool transitions_require_edit_access_to_object = 13;

	// True if the in/out permissions of this state should be checked.
	bool check_in_out_acl = 14;

	// The in/out permissions of this state.
	AccessControlList in_out_acl = 15;

	// State preconditions. (rules)
	StateConditions preconditions = 16;

	// State postconditions. (rules)
	StateConditions postconditions = 17;

	// Semicolon-separated list of semantic aliases.
	string aliases = 18;

	// The user description of the state.
	string user_description = 19;

	// Flags that tell different options set for this state.
	STATEFLAGS state_flags = 20;

	// The agent action GUID of the state, or GUID_NULL if not set.
	string agent_action_guid = 21;
}

// Basic state info (for normal clients).
message StateBasic {

	// The state ID: the item ID of a Workflow State (39) value (value list 8).
	int32 id = 1;

	// The name of the state.
	string name = 2;

	// True if the caller can move an object into this state from the `current_state` given in the request. Without `current_state`, every state is true.
	bool can_current_user_select = 3;

	// Specifies if the selectable flag is affected by pseudo users. If true, the selectable flag can be trusted only if the available state transitions are requested for a specific objver.
	bool are_state_permissions_object_specific = 4;

	// The user description of the state.
	string description = 5;
}

// A structure for state rules i.e. preconditions or postconditions.
message StateConditions {

	// State condition flags.
	STATECONDFLAGS options = 1;

	// Manual criteria.
	repeated SearchCondition search_conditions = 2;

	// VBScript code.
	string code = 3;
}

// One state in a workflow.
message StateDecl {

	// Value list item representing this element.
	ValueListItemDecl base_info = 1;

	// The workflow state. The name of the state is in `base_info`, and its description in the per-language `base_info.translations`.
	State state = 2;

	// The action VBScript resource reference.
	MetadataStructureResourceRef action_code = 3;
}

// One state transition in a workflow.
message StateTransition {

	// State transition ID.
	int32 id = 1;

	// The source state.
	int32 from_state = 2;

	// The target state.
	int32 to_state = 3;

	// The evaluation order.
	int32 evaluation_order = 4;

	// The name of the state.
	string name = 5;

	// The description of the state.
	string description = 6;

	// Transition permissions.
	AccessControlList acl = 7;

	// Signature settings for this state transition.
	ElectronicSignatureSettings signature_settings = 8;

	// The selected mode for automatically triggered state transition.
	AutoStateTransitionMode trigger_mode = 9;

	// The number of days before automatically triggered state transition.
	uint32 trigger_in_days = 10;

	// The criteria for automatically triggered state transition.
	repeated SearchCondition trigger_criteria = 11;

	// The VB script for automatically triggered state transition.
	string trigger_code = 12;

	// Semicolon-separated list of semantic aliases.
	string aliases = 13;

	// An array of GUIDS of vaults where this state transition will be triggered.
	repeated string vault_guids = 14;

	// The user description of the state.
	string user_description = 15;
}

// Basic state transition info (for normal clients).
message StateTransitionBasic {

	// The transition ID: the item ID of a State transition (99) value (value list 17).
	int32 id = 1;

	// The name of the state transition.
	string name = 2;

	// From state ID.
	int32 from_state_id = 3;

	// To state ID.
	int32 to_state_id = 4;

	// True if the caller can use this transition.
	bool can_current_user_select = 5;

	// Specifies if the selectable flag is affected by pseudo users. If true, the selectable flag can be trusted only if the available state transitions are requested for a specific objver.
	bool are_state_transition_permissions_object_specific = 6;

	// The client description of the state transition.
	string description = 7;
}

// One state transition in a workflow.
message StateTransitionDecl {

	// Value list item representing this element.
	ValueListItemDecl base_info = 1;

	// Other information on the state transition.
	StateTransition transition = 2;

	// The trigger VBScript resource reference.
	MetadataStructureResourceRef trigger_code = 3;
}

// The signature settings of a state transition definition for use with various event types.
message StateTransitionSignatureSettingsForEvents {

	// The ID of the workflow.
	int32 workflow_id = 1;

	// The name of the workflow.
	string workflow_name = 2;

	// The ID of the source state.
	int32 from_state_id = 3;

	// The name of the source state.
	string from_state_name = 4;

	// The ID of the target state.
	int32 to_state_id = 5;

	// The name of the target state.
	string to_state_name = 6;

	// Reason text for the signature.
	string reason = 7;

	// Meaning text for the signature.
	string meaning = 8;

	// Additional info for the signature.
	string additional_info = 9;

	// True if the electronic signature shall be stored as a separate signature object. False to store as an embedded signature in a multi-line text property.
	bool create_separate_signature_object = 10;

	// Property definition to be used for storing the signature manifestation on the object.
	int32 manifestation_property_def_id = 11;

	// The name of the manifestation property definition.
	string manifestation_property_def_name = 12;

	// Signature identifier. Required if bCreateSeparateSignatureObject is true.
	string signature_identifier = 13;
}

// This struct contains an array of strings.
message StringArray {

	// String values.
	repeated string value = 1;
}

// Wrapped string.
message StringValue {

	// String.
	string value = 1;
}

// An union for the group parameter for the export structure item.
message StructItemGroupParameterUnion {

	oneof data {

		// Export structure item represents all view from the given user id within selected type.
		int32 views_by_selected_user = 3;

		// Export structure item represents all event handlers of a given event handler type within selected type.
		InternalEventType handlers_of_selected_event_handler_type = 4;
	}
}

// Struct for a metadata structure alias in a vault.
message StructureAlias {

	// The metadata structure item alias name.
	string alias_name = 1;

	// The metadata structure item ID.
	int32 id = 2;

	// True if the ID was allocated as new.
	bool allocated_as_new = 3;
}

// A structure that specifies a single metadata structure item.
message StructureItemGroup {

	// The type of the selected group. The value esigtNone means that an individual element is selected (or all items), instead a group of items.
	StructureItemGroupType type = 1;

	// If there can be several items in the selected group type (e.g. user id's), the value is defined here.
	StructItemGroupParameterUnion parameter = 2;
}

// Get subscription state information.
message SubscriptionInfo {

	// The network address (name) of the mAuth server.
	string authentication_server = 1;

	// The subscription info server is joined to.
	string subscription = 2;

	// The URL to the manage web.
	string manage_address = 3;

	// True if server uses OneDb.
	bool uses_one_db = 4;

	// True to allow changing the OneDb configuration.
	bool can_join = 5;

	// True if joined to subscription and not in container.
	bool is_on_prem = 6;

	// True if server is in isolated container.
	bool is_isolated = 7;
}

// Subview group for a view.
message SubviewGroup {

	// The subview ID.
	int32 view_id = 1;
}

// Specifies a date and time. Corresponds to Windows type SYSTEMTIME (https://msdn.microsoft.com/en-us/f77cdf86-0f97-4a89-b565-95b46fa7d65b).
message SystemTime {

	// The year. The valid values are 1601 through 30827.
	uint32 year = 1;

	// The month. The valid values are 1 through 12.
	uint32 month = 2;

	// The day of the week. The valid values are 0 through 6, starting with Sunday.
	uint32 day_of_week = 3;

	// The day of the month. The valid values are 1 through 31.
	uint32 day = 4;

	// The hour. The valid values are 0 through 23.
	uint32 hour = 5;

	// The minute. The valid values are 0 through 59.
	uint32 minute = 6;

	// The second. The valid values are 0 through 59.
	uint32 second = 7;

	// The millisecond. The valid values are 0 through 999.
	uint32 milliseconds = 8;
}

// Struct for a tagged value.
message TaggedValue {

	// The name of the tagged value.
	string tag = 1;

	// The value type of the tagged value.
	TaggedValueType value_type = 2;

	// The string representation of the tagged value.
	string value = 3;
}

// A template for new objects, as returned by
// [GetTemplates](mfiles:MFiles.IRPCObjectOperations.GetTemplates).
message Template {

	// The title of the template file.
	string title = 1;

	// The resource key for the title of the template file. It will be available only for blank template file.
	string title_resource = 2;

	// The file ID of the template file. It will be available only for blank templates.
	string file_template_id = 3;

	// The template object ID. It will be available only for User defined templates.
	ObjID obj_id = 4;

	// The class of the object version. For blank templates it will be always 0, For user defined templates the class id of the object will be available.
	int32 class_id = 5;

	// The icon for the template file. Currently it is not carrying any data. It will be implemented in future.
	bytes icon = 6;

	// The array of restrict to class IDs. Currently it is not carrying any data. It will be implemented in future.
	repeated uint32 restricted_to_classes = 7;
}

// Struct for Theme configuration.
message ThemeConfiguration {

	// The Web logo.
	string web_logo = 1;

	// The Web login logo.
	string web_login_logo = 2;

	// The Fav icon.
	string fav_icon = 3;

	// The Accent color.
	string accent_color = 4;
}

// Struct for thumbnail options.
message ThumbnailOptions {

	// True if the whole Thumbnails feature is on. If off, neiher the server nor the client generates thumbnails.
	bool is_thumbnail_feature_on = 1;

	// True if the client-side thumbnail generation is on. If off, the server still generates thumbnails if bThumbnailFeatureOn is true.
	bool is_client_side_generation_on = 2;

	// The size of thumbnails generated and cached by server.
	Size size = 3;

	// An array of file extensions (not including dot) for which thumbnail generation is not allowed.
	repeated string denied_file_extensions = 4;
}

// Specifies settings for a local time zone. Corresponds to Windows type TIME_ZONE_INFORMATION (https://docs.microsoft.com/en-us/windows/desktop/api/timezoneapi/ns-timezoneapi-_time_zone_information).
message TimeZoneInformation {

	// The difference between UTC and local time, in minutes.
	int32 bias_in_minutes = 1;

	// A description for standard time, max length 31.
	string standard_name = 2;

	// The local date and time when the transition from daylight saving time to standard time occurs.
	SystemTime standard_date = 3;

	// This value is added to the value of the lBias member to form the bias used during standard time.
	int32 standard_bias_in_minutes = 4;

	// A description for daylight saving time (DST), max length 31.
	string daylight_name = 5;

	// The local date and time when the transition from standard time to daylight saving time occurs.
	SystemTime daylight_date = 6;

	// This value is added to the value of the lBias member to form the bias used during daylight saving time.
	int32 daylight_bias_in_minutes = 7;
}

// Struct for traditional folders or delta (changes to traditional folders).
message TraditionalFoldersOrDelta {

	// True if this struct represents a delta (i.e. just the occurred changes to traditional folders).
	bool type = 1;

	// Removed traditional folders. This contains data only when this struct represents a delta. Otherwise it must be an empty array.
	repeated int32 removed_folders = 2;

	// Traditional folders. This contains inserted or updated traditional folders if this struct represents a delta, otherwise it contains just a "normal" array of traditional folders.
	repeated Lookup folders = 3;

	// TraditionalFoldersOrDelta Type values.
	enum TraditionalFoldersOrDeltaType {

		TRADITIONAL_FOLDERS_OR_DELTA_TYPE_FULL = 0;

		TRADITIONAL_FOLDERS_OR_DELTA_TYPE_DELTA = 1;
	}
}

// Struct for traditional folder and the parent folder information.
message TraditionalFolderWithParent {

	// The location of the traditional folder.
	repeated Folder parent_location = 1;

	// Traditional folders. This contains inserted or updated traditional folders if this struct represents a delta, otherwise it contains just a "normal" array of traditional folders.
	Lookup value = 2;

	// The pinned item id is the guid key referencing this item in pinboard.
	string pinned_item_id = 3;
}

// Translation.
message Translation {

	// Identifier.
	string id = 1;

	// The source string, or unset or an empty string.
	string source_string = 2;

	// The version of the source string, or zero.
	int32 source_version = 3;

	// The target string, or unset or an empty string.
	string target_string = 4;

	// The state of the target string, or etsNotTranslated.
	TranslationState state = 5;
}

// Struct for a single translated item name.
message TransName {

	// The language ID.
	int32 lang_id = 1;

	// The translated item name.
	string translated_item_name = 2;
}

// A value with its data type: the value of a property, or a value in a search condition.
//
// Set `type` and the member of `data` that belongs to it, for example `DATATYPE_TEXT` with
// `data.text`, `DATATYPE_MULTI_LINE_TEXT` with `data.multi_line_text`, or `DATATYPE_LOOKUP` with
// `data.lookup`. An empty value comes back with `is_null_value` true and `data` unset.
message TypedValue {

	// True if the value is empty. `data` is then unset.
	bool is_null_value = 2;

	// The data type of the value.
	Datatype type = 1;

	// The value, in the member that matches `type`. Unset for an empty value.
	TypedValueUnion data = 3;
}

// Property value metadata namespace.
//
// Metadata stored with a property value by the `...WithPropertyMetadata` and
// `...WithMetadata` methods. The server parses `confidence` as a number: when creating an object
// with CreateNewObjectWithPropertyMetadata or AddObjectWithFilesWithPropertyMetadata, a value without
// `value_metadata`, or with an empty `confidence`, fails with "Type mismatch." Metadata
// whose fields are all empty, unset or zero is not stored.
message TypedValueMetadata {

	// Who or what set the value. `PROPERTY_SET_BY_TYPE_UNDEFINED` stores nothing for this field.
	PropertySetByType set_by = 1;

	// Why the value was set, as free text. Optional.
	string reason = 2;

	// The confidence of the value as a decimal number in a string, for example `"0.9"`. Must be a number; send `"0"` when there is none. Zero or less stores no confidence.
	string confidence = 3;

	// The GUID of the batch process that set the value, in braces. Optional.
	string batch_id = 4;
}

// Union for typed value data (depends on data type).
message TypedValueUnion {

	oneof data {

		// The value of `DATATYPE_TEXT`.
		string text = 1;

		// The value of `DATATYPE_INTEGER`.
		int32 integer = 2;

		// The value of `DATATYPE_REAL_NUMBER`.
		double real_number = 3;

		// Fixed precision number.
		string decimal_number = 4;

		// The value of `DATATYPE_DATE`: midnight UTC of the date.
		google.protobuf.Timestamp date = 5;

		// Time.
		google.protobuf.Timestamp time = 6;

		// The value of `DATATYPE_TIMESTAMP`, in UTC.
		google.protobuf.Timestamp timestamp = 7;

		// The value of `DATATYPE_BOOLEAN`.
		bool boolean = 8;

		// The value of `DATATYPE_LOOKUP`: one value list item or object.
		Lookup lookup = 9;

		// The value of `DATATYPE_MULTI_SELECT_LOOKUP`: any number of value list items or objects.
		MultiSelectLookup multi_select_lookup = 10;

		// Integer (8 bytes).
		int64 integer64 = 11;

		// FILETIME (64-bit integer).
		google.protobuf.Timestamp filetime = 12;

		// The value of `DATATYPE_MULTI_LINE_TEXT`.
		string multi_line_text = 13;

		// Access Control List.
		AccessControlList acl = 14;
	}
}

// Union for typed value data (depends on data type).
message TypedValueUnionWithMetadata {

	oneof data {

		// Text.
		string text = 1;

		// Integer (4 bytes).
		int32 integer = 2;

		// Floating point number (double precision, 8 bytes).
		double real_number = 3;

		// Fixed precision number.
		string decimal_number = 4;

		// Date.
		google.protobuf.Timestamp date = 5;

		// Time.
		google.protobuf.Timestamp time = 6;

		// Timestamp.
		google.protobuf.Timestamp timestamp = 7;

		// Boolean.
		bool boolean = 8;

		// Lookup.
		LookupWithMetadata lookup = 9;

		// Multi-select lookup.
		MultiSelectLookupWithMetadata multi_select_lookup = 10;

		// Integer (8 bytes).
		int64 integer64 = 11;

		// FILETIME (64-bit integer).
		google.protobuf.Timestamp filetime = 12;

		// Multi-line text.
		string multi_line_text = 13;

		// Access Control List.
		AccessControlList acl = 14;
	}
}

// A typed value. Typically used to represent the value of a property or an evaluated expression.
message TypedValueWithMetadata {

	// Data type.
	// Note. Name of the property can't be isNull because name collision with Objective-C reserved name.
	Datatype type = 1;

	// Is the value unset.
	bool is_null_value = 2;

	// The value data as a union, if set.
	TypedValueUnionWithMetadata data = 3;

	// The metadata about the typed value. If the value is a Lookup or MSLookup, this data will be in that struct.
	TypedValueMetadata value_metadata = 4;
}

// Struct for an ID to identify the UI settings of a particular folder.
message UISettingsFolderID {

	// The type that describes the folder whose UI settings are being retrieved.
	UISettingsFolderType type = 1;

	// If not zero, specifies the view where the folder is located.
	int32 view = 2;
}

// Information about an uploaded file.
message UploadedFile {

	// The upload session ID from UploadTempFile, committed with UploadTempFileCommit. Zero if `file_ref` is set.
	int32 upload_id = 1;

	// The title of the file.
	string title = 2;

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

	// The logical size of the file in bytes.
	int64 size = 4;

	// The `file_ref` of a stateless upload (FileUploadWhole or FileUploadEnd). Empty if `upload_id` is set. Exactly one of `upload_id` and `file_ref` must be set.
	string file_ref = 5;
}

// Struct for a user account in a vault.
message UserAccount {

	// The ID of the user account.
	int32 id = 1;

	// The login name that is associated with this user account (e.g. 'DOMAIN\user').
	string login_name = 2;

	// Bitmask of the vault roles of the user.
	VAULTROLES vault_roles = 3;

	// Permissions.
	AccessControlList acl = 4;

	// The vault language of the user.
	int32 user_language = 5;

	// The user identity in external system, such as Microsoft Entra (where the identity is a GUID). Read-only.
	string external_id = 6;
}

// Struct for a user account in a vault.
message UserAccountDecl {

	// Value list item representing this element.
	ValueListItemDecl base_info = 1;

	// Semicolon-separated list of semantic aliases.
	string aliases = 2;

	// Permissions.
	AccessControlList acl = 3;

	// The login name that is associated with this user account (e.g. 'DOMAIN\user').
	string login_name = 4;
}

// Struct for a user group in a vault.
message UserGroup {

	// The basic data of the group.
	UserGroupBasic user_group = 1;

	// Is group imported from Windows domain.
	bool is_external_windows_group = 2;

	// Should memberships of this group be synchronized automatically.
	bool synchronize_memberships = 3;

	// Type of the license for logins created automatically.
	LicenseType license_type_for_new_logins = 4;

	// The name for external group. Empty if the group is not external.
	string external_group_name = 5;

	// The organizational unit for filtering the AD group searches. Empty if the group is not external.
	string organizational_unit = 6;

	// Permissions.
	AccessControlList acl = 7;

	// Semicolon-separated list of semantic aliases.
	string aliases = 8;

	// Import mode for external groups.
	ExternalGroupImportMode import_mode = 9;

	// External repository name. unset if this group doesn't represent external repository user information.
	string external_repository_name = 10;

	// ID in the external repository. unset if this group doesn't represent external repository user information.
	string external_repository_subject_id = 11;
}

// Struct for the basic info of a user group in a vault.
message UserGroupBasic {

	// The ID of the user group.
	int32 id = 1;

	// The name of the group.
	string name = 2;

	// The IDs of the members of this group (user accounts and/or user groups).
	repeated int32 members = 3;

	// User group type.
	UserGroupType type = 4;
}

// Struct for a user group in a vault.
message UserGroupDecl {

	// Value list item representing this element.
	ValueListItemDecl base_info = 1;

	// Semicolon-separated list of semantic aliases.
	string aliases = 2;

	// Permissions.
	AccessControlList acl = 3;

	// The name for external group. Empty if the group is not external.
	string external_name = 4;
}

// UserGroupSyncStatus class
message UserGroupSyncStatus {

	// The ID of the user group.
	int32 user_group_id = 1;

	// The last run timestamp.
	google.protobuf.Timestamp last_run_timestamp = 2;

	// The count of synchronized users.
	int32 synchronized_user_count = 3;

	// The count of skipped users.
	int32 skipped_user_count = 4;

	// Error string from the last run (if any).
	string last_errors = 5;
}

// User or user group ID.
message UserOrUserGroupID {

	// User type.
	UserType type = 1;

	// User or user group.
	int32 id = 2;
}

// User or user group ID (extended).
message UserOrUserGroupIDEx {

	// User type.
	UserType type = 1;

	// Additional user type -specific information as a union.
	UserOrUserGroupIDInfoUnion data = 2;
}

// Union for user type -specific data in UserOrUserGroupIDEx.
message UserOrUserGroupIDInfoUnion {

	oneof data {

		UserOrUserGroupIDInfoUnion.UserData user = 1;

		UserOrUserGroupIDInfoUnion.UserGroupData user_group = 2;

		UserOrUserGroupIDInfoUnion.WorkflowStatePseudoUserData workflow_state_pseudo_user = 3;

		UserOrUserGroupIDInfoUnion.PropertyBasedPseudoUserData property_based_pseudo_user = 4;
	}

	message UnknownUserTypeData {
	}

	message UserData {

		// User account ID.
		int32 id = 1;
	}

	message UserGroupData {

		// User group ID.
		int32 id = 1;
	}

	message WorkflowStatePseudoUserData {

		// Workflow state ID (unique alone, no workflow ID is needed).
		int32 state = 1;
	}

	message PropertyBasedPseudoUserData {

		// Indirect property ID.
		IndirectPropertyID indirect_property_ids = 1;
	}
}

// The definition of an validation struct.
message Validation {

	// A regular expression for the validation.
	string regular_expression = 1;

	// VBScript used in the validation.
	string code = 2;
}

// An object type or a value list (basic definition). Despite the name, this message describes
// both: `is_real_object_type` is true for object types, whose items are objects.
//
// Returned by [GetObjectTypes](mfiles:MFiles.IRPCObjectTypes.GetObjectTypes),
// [GetObjectType](mfiles:MFiles.IRPCObjectTypes.GetObjectType),
// [GetValueLists](mfiles:MFiles.IRPCValueLists.GetValueLists) and
// [GetValueList](mfiles:MFiles.IRPCValueLists.GetValueList). Lists that the caller is not allowed
// to see are returned with empty names and `object_type_permissions.can_user_see` false.
message ValueList {

	// The ID of the object type or value list. Object types and value lists share one ID space; property definition IDs and item IDs are separate spaces.
	int32 id = 1;

	// The singular name, for example "Customer". Empty if the caller is not allowed to see the list.
	string name_singular = 2;

	// The plural name, for example "Customers". Empty if the caller is not allowed to see the list.
	string name_plural = 3;

	// The icon in .ICO format. Filled only by GetObjectTypes and GetObjectType, and only for real object types; empty in GetValueLists and GetValueList.
	bytes icon = 4;

	// True for an object type, whose items are objects (documents, customers); false for a plain value list (Country, Classes, Users).
	bool is_real_object_type = 5;

	// True if items can have a parent item in the same list (`ValueListItem.has_parent`).
	bool is_hierarchical = 6;

	// True if every item belongs to an item of another list, the owner list (`owner_object_type`). For example, contact persons are owned by customers.
	bool has_owner = 7;

	// With `has_owner`, the ID of the owner list or object type.
	int32 owner_object_type = 8;

	// Owner property def. Subobjects of objects of this object type have this property in their meta data for describing owner relationships.
	int32 owner_property_def = 9;

	// Flags of the list, for example `can_add_items` and `is_external`. See [OBJTYPEFLAGS](mfiles:MFiles.OBJTYPEFLAGS).
	OBJTYPEFLAGS options = 10;

	// The ID of the lookup property definition that refers to items of this list by default, for example 1079 (Customer) for the Customer object type.
	int32 default_property_def = 11;

	// The propertydef IDs of those properties that cannot be entered during the creation of a new object because they are not included in the INSERT INTO statement.
	repeated int32 read_only_properties_during_insert = 12;

	// The propertydef IDs of those properties that cannot be entered during the editing of an existing object because they are not included in the UPDATE statement.
	repeated int32 read_only_properties_during_update = 13;

	// Object type targets for browsing.
	repeated ObjectTypeTargetForBrowsing targets_for_browsing = 14;

	// Specifies the ACL that defines the visibility and other permission settings of this object type. Also specifies who can add new items to this object type.
	AccessControlList acl = 15;

	// What the caller may do with the list: see it (`can_user_see`) and add items or objects (`can_user_add_new_items`). Filled by the read calls of IRPCObjectTypes and IRPCValueLists.
	ObjectTypePermissionsForClient object_type_permissions = 20;

	// Default ACL for new items/objects of this type. If unset, the global default is used (vlitems: read access to all internal users; real objects: full control for all internal users).
	AccessControlList default_acl_for_objects = 16;

	// The sorting type of value list items. NOTE: This value is not currently used but is reserved for future use. Currently, sorting order is specified on the property definition level only.
	VLSortingType vl_sorting_type_reserved = 17;

	// True to sort in ascending order, false to sort in descending order. NOTE: This value is not currently used but is reserved for future use. Currently, sorting order is specified on the property definition level only.
	bool sort_ascending_reserved = 18;

	// The GUID of the object type or value list, with braces. Resolve it to the vault's ID with [GetMetadataStructureItemIdByGUID](mfiles:MFiles.IRPCVault.GetMetadataStructureItemIdByGUID).
	string guid = 19;

	// Property definition ID of the title property for the user's preferred language.
	int32 preferred_title_property_def_id = 21;

	// If set, specifies search characteristics of the object type.
	ObjectTypeSearchCharacteristics search_characteristics = 22;

	// If set, defines the indexed value lists and properties of the object type. Used for searching from Master Storage.
	ObjectTypeIndexingDefinition indexing_definition = 23;

	// The ID of the object type specific view.
	int32 view_id = 24;
}

// Object type.
message ValueListAdmin {

	// Basic data.
	ValueList object_type = 1;

	// OLE DB connection string to the external database that contains the objects (and their properties) of this object type.
	string database_connection_string = 2;

	// SQL statement that retrieves the objects from an external database.
	string database_select_all_statement = 3;

	// SQL statement that retrieves a specific object from an external database.
	string database_select_one_statement = 4;

	// SQL statement that inserts a new object to an external database.
	string database_insert_statement = 5;

	// SQL statement that retrieves the ID of the just inserted record in the external database.
	string database_select_latest_id_statement = 6;

	// SQL statement that updates an existing object in an external database.
	string database_update_statement = 7;

	// SQL statement that deletes an object in an external database.
	string database_delete_statement = 8;

	// Column mappings.
	repeated ObjectTypeColumnMapping database_column_mappings = 9;

	// The default automatic permissions for items and objects.
	AutomaticPermissions automatic_acl_for_objects = 10;

	// Semicolon-separated list of semantic aliases.
	string aliases = 11;

	// Names value namespaces related to the object type.
	repeated NamedValueNamespace tags = 12;

	// Object type version number, used for OT modification conflicts tracking.
	uint32 version_number = 13;
}

// An item of a value list, or an object seen as an item of its object type (for example in lookup
// results).
message ValueListItem {

	// The item's identity and name: `obj_id.type` is the value list ID, `obj_id.item_id.internal_id` the item ID (unique within the list only), plus `name`, `guid`, `external_id` and flags. `options.is_deleted` marks a deleted item.
	ItemInfo item_info = 1;

	// True if the item has a parent item in the same (hierarchical) list.
	bool has_parent = 2;

	// True if the item belongs to an item of the owner list (`ValueList.owner_object_type`).
	bool has_owner = 3;

	// With `has_parent`, the item ID of the parent item; otherwise ignored.
	int32 parent_id = 4;

	// With `has_owner`, the item ID of the owner item in the owner list.
	int32 owner_id = 5;

	// The name of the owner item.
	string owner_name = 6;

	// If set, specifies the automatic permissions for an object for which the user selects this item.
	AutomaticPermissions automatic_permissions = 7;

	// If set, contains the icon of this item in .ICO format.
	Bytes icon = 8;
}

// A value list item with, on request, its permissions.
message ValueListItemData {

	// The item. See [ValueListItem](mfiles:MFiles.ValueListItem).
	ValueListItem item = 1;

	// The access control list of the item. Set only when the request had `include_permissions`.
	AccessControlList acl = 2;

	// What the caller may do with the item. Set only when the request had `include_permissions`.
	ObjectPermissionsForClient current_user_permissions = 3;
}

// Value list item structure.
message ValueListItemDecl {

	// Value list item.
	ValueListItem vlitem = 1;

	// The icon of the item.
	MetadataStructureResourceRef icon = 2;

	// Per-language translations.
	repeated ElementTranslationsDecl translations = 3;
}

// Struct for value list items delta (changes to value list items).
message ValueListItemsDelta {

	// Changed value lists.
	repeated int32 changed_value_lists = 1;
}

// Struct for a document vault.
message Vault {

	// Basic data.
	VaultBasic vault = 1;

	// The main physical folder of this vault on the server (e.g. C:\Program Files\M-Files\Server Vaults\MyVault).
	string main_data_folder = 2;

	// The specification of the additional file data folders.
	repeated AdditionalFolder additional_data_folders = 3;

	// The vault's SQL database.
	SQLDatabase database_info = 4;

	// Identifies file data storage to use. Typically specifies that the file data storage is determined automatically.
	FileDataStorage file_data_storage = 5;

	// The connection string that identifies the location, protocol, and credentials for the file data storage of this vault. For example, this might specify a storage account, a protocol, and a container name for Azure's BLOB Services. Can be unset or empty.
	string file_data_connection_string = 6;
}

// Struct for a script module definition.
message VaultApplicationDependency {

	// The application identifier.
	string guid = 1;

	// The name of the required vault application.
	string name = 2;

	// The minimum required application version.
	string version = 3;

	// True if the application is required to be at at least the minimum version.
	bool required = 4;
}

// Basic identity of a vault.
message VaultBasic {

	// The vault GUID, in braces and upper case. Use it as `LoginData.vault_guid`.
	string guid = 1;

	// The vault name shown to users.
	string display_name = 2;

	// Optional description. Often empty.
	string tooltip = 3;

	// The vault icon in .ico format, or empty.
	bytes icon = 4;

	// Host names configured for the vault, if any.
	StringArray dns_names = 5;
}

// Struct for info needed to connect to a vault.
message VaultConnectionInfo {

	// The connection mode of M-Files API.
	MFilesAPIMode connection_mode = 1;

	// Binding string to the server.
	string rpc_binding_string = 2;

	// Ignored if connectionsecuritymode is specified. RPC_C_AUTHN_LEVEL_NONE or RPC_C_AUTHN_LEVEL_PKT_PRIVACY. Specifies the minimum authentication level to use if the protocol sequence is normal RPC, such as ncacn_ip_tcp. Ignored for other protocol sequences.
	uint32 minimum_rpc_authentication_level = 3;

	// Server version string (e.g. "10.0.3757" or "10.0.3757.0").
	string server_version = 4;

	// The local computer name override used in the session.
	string client_computer_name = 5;

	// The GUID of the vault.
	string vault_guid = 6;

	// The name of the vault for display purposes.
	string vault_display_name = 7;

	// Locale used for sorting.
	uint32 locale_for_sorting = 8;

	// The session identifier.
	bytes session_id = 9;

	// General session information.
	SessionInfoServer session_info = 10;

	// The current attachment GUID of the vault.
	string attachment_guid = 11;

	// True to allow the keep-alive thread to run.
	bool enable_keep_alive = 12;

	// Capabilities of M-Files Server and the connected document vault.
	ServerVaultCapabilities server_vault_capabilities = 13;

	// Capabilities of M-Files Client that were reported for the server when the connection (session) was established.
	ClientCapabilities client_capabilities = 14;

	// Optional cookie data for gRPC connections. May contain multiple "<cookie_name>=<cookie_value>" cookies separated by newline character.
	string optional_grpc_cookies = 15;

	// Server data, including the product serial number and deployment type. Used to populate serial number and deployment type on SessionInfo.
	ServerData server_data = 16;

	// Connection security mode. Overrides dwMinimumAuthenticationLevelIfNormalRPC if specified.
	ConnectionSecurityMode connection_security_mode = 17;
}

// The logged-in user's identity and settings in the session's vault.
message VaultData {

	// The user's ID in this vault: the ID to use for the current user in properties, permissions and searches.
	int32 user_id = 1;

	// Is the user an internal user?
	bool is_internal_user = 2;

	// `user_id` first, followed by the users for whom this user is a substitute.
	repeated UserOrUserGroupID substitute_users = 3;

	// `user_id` first, followed by the user groups the user belongs to, directly or indirectly.
	repeated UserOrUserGroupID user_and_group_memberships = 4;

	// Identifies the vault's current attachment. It changes when the vault is detached and attached again or restored; a client cache keyed by it is then stale.
	string vault_attachment = 5;

	// Specifies the search engine of the vault.
	SearchEngine search_engine = 6;

	// Available indexes for searching.
	repeated IndexForSearch indexes_for_search = 7;

	// The user's language in this vault. The code and name may be empty.
	Language language = 8;

	// The time zone of this vault.
	TimeZoneInformation timezone = 9;

	// The ACL mode of the vault.
	ACLMode acl_mode = 10;

	// True if the logged-in user has a valid (well-formed GUID) external identity, e.g. from Microsoft Entra. The external ID itself is not sent to the client.
	bool is_valid_external_user = 11;
}

// Struct for an extended document vault.
message VaultEx {

	// Basic data.
	Vault vault = 1;

	// The vault type.
	VaultType vault_type = 3;

	// The address of the master server. Specified if the vault type is 'replica'.
	ServerAddress master_server_address = 2;
}

// Vaults the user can see, split by state. Returned by a server-level
// [LogIn](mfiles:MFiles.IRPCLogin.LogIn) only on servers that enable it; otherwise empty.
message VaultsAvailabilityOnServer {

	// Vaults that are online and visible to the user.
	repeated VaultBasic vaults_online = 1;

	// Vaults that are offline (for example under maintenance) and visible to the user.
	repeated VaultBasic vaults_offline = 2;

	// Online Ground Link proxy vaults.
	repeated VaultBasic ground_link_proxies_online = 3;

	// Offline Ground Link proxy vaults.
	repeated VaultBasic ground_link_proxies_offline = 4;
}

// Vault server attachment.
message VaultServerAttachment {

	// The server host name.
	string host_name = 1;

	// The server host address.
	string address = 2;

	// The server ID.
	string server_id = 3;

	// The latest timestamp this info was updated.
	google.protobuf.Timestamp latest_timestamp = 4;

	// True if this is the current vault server attachment.
	bool is_current = 5;
}

// Basic facts about the current vault session, returned by
// [GetVaultSessionInfo](mfiles:MFiles.IRPCLogin.GetVaultSessionInfo).
message VaultSessionInfo {

	// The session's ID, the same bytes as in `mfiles-session-id-bin`.
	bytes session_id = 1;

	// The server version as text, for example `26.11.16645.0`.
	string server_version = 2;

	// The GUID of the server.
	string server_id = 3;

	// The GUID of the vault.
	string vault_guid = 4;

	// The name of the vault for display purposes.
	string vault_display_name = 5;

	// The vault's current attachment GUID, as `VaultData.vault_attachment`.
	string attachment_guid = 6;

	// Whether the session has an open server push channel.
	ServerDataPushStatus server_data_push_status = 7;
}

// A single vault variable.
message VaultVariable {

	// The name of the vault variable.
	string name = 1;

	// The value of the variable in a serialized format.
	bytes value = 2;
}

// Array of vault variables.
message VaultVariableArray {

	// Array of vault variables (VaultVariable).
	repeated VaultVariable value = 1;
}

// Struct for a vault verifying job.
message VerifyVaultJob {

	// The GUID of the vault to verify.
	string vault_guid = 1;

	// True to fix detected errors.
	bool fix_errors = 2;

	// True to verify the integrity of the data files on disk.
	bool verify_file_contents = 3;
}

// Struct for the output info of a vault verifying job.
message VerifyVaultJobOutputInfo {

	// Encountered vault errors.
	repeated string errors = 1;
}

// Version comment details.
//
// Despite it's original name, this struct is reserved for version comment details.
// It should not be used for other purposes, as we want to maintain the possibility
// of adding new version comment specific fields to it in the future.
message VersionComment {

	// Object version.
	ObjVer obj_ver = 1;

	// Properties.
	repeated PropertyValue property_values = 2;
}

// This struct contains an array of object versions and related property values.
message VersionCommentArray {

	// Object version and its property values.
	repeated VersionComment value = 1;
}

// The vertical applications enabled for the vault, read from the vault's "VerticalApplications"
// advanced vault settings.
message VerticalApplications {

	// VTax vertical application is enabled for the vault.
	bool v_tax_enabled = 1;

	// VCon vertical application is enabled for the vault.
	bool v_con_enabled = 2;

	// VMan vertical application is enabled for the vault.
	bool v_man_enabled = 3;
}

// Struct for a single view.
message View {

	// The ID of the view.
	int32 id = 1;

	// The type of the view.
	ViewType type = 2;

	// The name of the view.
	string name = 3;

	// Tells if the view is admin-defined (common) or user-defined.
	bool is_common = 4;

	// Tells if the view is visible.
	bool is_visible = 5;

	// The location of the view. Valid only if bHasParent is true.
	ViewLocation location = 6;

	// The search definition that contains the view levels and search conditions of the view.
	SearchDef content_definition = 7;

	// Permissions.
	AccessControlList acl = 8;

	// Bit flags that provide additional information on the view.
	uint32 flags_obsolete = 9;

	// Bit flags that provide additional information on the view.
	VIEWFLAGS options = 11;

	// GUID for the view.
	string guid = 10;

	// View visualization information.
	ViewVisualization view_visualization = 12;
}

// One folder that SearchViewLevelFolders found.
message ViewLevelFolderSearchResult {

	// The folder, in the same form as the property folders of the level's listing. It can be saved as part of a folder selection as it is.
	TypedValue folder = 1;

	// True when the folder is in the user's folder selection for the location.
	bool is_selected = 2;
}

// Struct for a view location.
message ViewLocation {

	// Array of folders describing the parent folder of the view. The first element of the array must be a view folder. Other elements, if any, are property folders.
	repeated Folder parent_folder = 1;

	// True if the view is overlapping with a property folder.
	bool customizes_property_folder = 2;

	// The overlapped property folder. Ignored if bOverlapping is false.
	TypedValue customized_property_folder = 3;
}

// Struct for views or delta (changes to views).
message ViewsOrDelta {

	// True if this struct represents a delta (i.e. just the occurred changes to views).
	bool type = 1;

	// Removed views. This contains data only when this struct represents a delta. Otherwise it must be an empty array.
	repeated int32 removed_views = 2;

	// Views. This contains inserted or updated views if this struct represents a delta, otherwise it contains just a "normal" array of views.
	repeated View views = 3;

	// ViewsOrDelta Type values.
	enum ViewsOrDeltaType {

		VIEWS_OR_DELTA_TYPE_FULL = 0;

		VIEWS_OR_DELTA_TYPE_DELTA = 1;
	}
}

// Struct for views or delta (changes to views).
message ViewsOrDeltaEx {

	// True if this struct represents a delta (i.e. just the occurred changes to views).
	bool type = 1;

	// Removed views. This contains data only when this struct represents a delta. Otherwise it must be an empty array.
	repeated int32 removed_views = 2;

	// Invisible views. This contains data only when this struct represents a delta. Otherwise it must be an empty array.
	repeated int32 invisible_views = 3;

	// Views. This contains inserted or updated views if this struct represents a delta, otherwise it contains just a "normal" array of views.
	repeated View views = 4;

	// ViewsOrDeltaEx Type values.
	enum ViewsOrDeltaExType {

		VIEWS_OR_DELTA_EX_TYPE_FULL = 0;

		VIEWS_OR_DELTA_EX_TYPE_DELTA = 1;
	}
}

// Subview group for a view.
message ViewVisualization {

	// The subviews of the view as groups.
	repeated SubviewGroup subview_groups = 1;
}

// Struct for view folder and the parent folder information of the view.
message ViewWithParentLocation {

	// The location of the view folder.
	repeated Folder parent_location = 1;

	// Resulting the view.
	View value = 2;

	// The pinned item id is the guid key referencing this item in pinboard.
	string pinned_item_id = 3;
}

// Struct for web companion fetch task information.
message WebCompanionFetchTask {

	// ID of the web companion task record.
	int64 id = 1;

	// Vault GUID (uniquely identifies the vault).
	string guid = 2;

	// Web Companion App ID.
	string app_id = 3;

	// App secret key.
	string secret_key = 4;
}

// Struct for web companion task information information.
message WebCompanionTask {

	// Web Companion App ID.
	string app_id = 1;

	// Display string of the task data.
	string data = 2;

	// Web Companion Action type.
	WebCompanionActionType action_type = 3;
}

// Struct for web companion task information.
message WebCompanionTaskInfo {

	// The Web Companion task data.
	string data = 1;

	// Web Companion Task Action type.
	WebCompanionActionType action_type = 2;
}

// Struct for WOPI Active Users.
message WOPIActiveUsers {

	// The Username of the user.
	string username = 1;
}

// Struct for WOPI Client Additional Data.
message WOPIClientAdditionalData {

	// The Return URL.
	string return_uri = 1;

	// The Main Appp URL.
	string main_app_url = 2;

	// The WOPI Endpoint.
	string wopi_end_point = 3;

	// The Culture identifier.
	string culture_identifier = 4;

	// The action URL.
	string action_url = 5;

	// The Host edit URL.
	string host_edit_url = 6;
}

// Struct for WOPI container information.
message WOPIContainer {

	// The container access token.
	string container_access_token = 1;

	// The container name.
	string container_name = 2;

	// Object ID.
	ObjID obj_id = 3;
}

// Struct for WOPI container content.
message WOPIContainerContent {

	// Array of containers.
	repeated WOPIContainer containers = 1;

	// Array of container object files.
	repeated WOPIContainerFile container_files = 2;
}

// Struct for WOPI container file information.
message WOPIContainerFile {

	// The container access token.
	string container_access_token = 1;

	// Object ID.
	ObjID obj_id = 2;

	// Object file.
	File file = 3;
}

// Struct for WOPI file information.
message WOPIContainerInfo {

	// The container access token.
	string container_access_token = 1;

	// The container name.
	string container_name = 2;

	// The container path.
	string container_path = 3;
}

// Struct for WOPI file information.
message WOPIContainerTokenInfo {

	// The container access token.
	string container_access_token = 1;

	// The user id.
	string user_id = 2;

	// The user name.
	string user_name = 3;

	// The user's email id.
	string email_id = 4;

	// The container access token expiration time in UTC.
	google.protobuf.Timestamp expiration_time = 5;
}

// Struct for WOPI discovery.
message WOPIDiscovery {

	// The action name.
	string action_name = 1;

	// The action URL.
	string action_url = 2;
}

// Struct for WOPI file information.
message WOPIFileInfo {

	// The title of the file.
	string title = 1;

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

	// The creator of this shared Link.
	string created_by_user = 3;

	// The logical size of the file in bytes.
	int64 logical_size = 4;

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

	// The object version referenced by the shared link.
	ObjVer obj_ver = 6;

	// The file version referenced by the shared link.
	FileVer file_ver = 7;
}

// Struct for WOPI Lock file information.
message WOPILock {

	// The WOPI lock key.
	string lock = 1;
}

// Struct for WOPI User Session information.
message WOPIUserSession {

	// The WOPI vault user session key.
	string wopi_user_session_key = 1;

	// The access of the shared file.
	string wopi_accesskey = 2;

	// The WOPI Action type.
	WOPIActionType action_type = 3;

	// The user ID.
	uint32 user_account_id = 4;

	// The user Account Name.
	string user_account_name = 5;

	// The External user name.
	string external_username = 6;

	// WOPI Client Additional data.
	WOPIClientAdditionalData additional_data = 7;

	// The ObjVer of the object.
	ObjVer obj_ver = 8;

	// The FileVer of the object.
	FileVer file_ver = 9;

	// Specifies the Shared file.
	bool is_shared_file = 10;

	// Specifies the Co-authored file.
	bool is_coauthor = 11;

	// The CSRF Token.
	string csrftoken = 12;

	// The One Time Token.
	string onetimetoken = 13;

	// Specifies whether the file can be edited or not.
	bool is_edit_allowed = 14;

	// The client type (user agent) identifier.
	ClientType client_type = 15;
}

// Basic workflow.
message Workflow {

	// Workflow ID.
	int32 id = 1;

	// The name of the workflow.
	string name = 2;

	// The class this workflow can be used with.
	int32 object_class_id = 3;

	// The user description of the workflow.
	string description = 6;

	// Reserved, must be zero.
	uint32 reserved1_obsolete = 4;

	// Reserved, must be zero.
	uint32 reserved2_obsolete = 5;
}

// Workflow.
message WorkflowAdmin {

	// Basic information on the workflow.
	Workflow workflow = 1;

	// The description of the workflow.
	string description = 2;

	// The states of this workflow.
	repeated State states = 3;

	// The state transitions of this workflow.
	repeated StateTransition transitions = 4;

	// Permissions.
	AccessControlList acl = 5;

	// Semicolon-separated list of semantic aliases.
	string aliases = 6;

	// Layout data of the workflow.
	string graphical_layout_data = 7;
}

// Workflow.
message WorkflowDecl {

	// Value list item representing this element.
	ValueListItemDecl base_info = 1;

	// Other information on the workflow.
	WorkflowAdmin workflow = 2;

	// The states of this workflow.
	repeated StateDecl states = 3;

	// The state transitions of this workflow.
	repeated StateTransitionDecl transitions = 4;

	// Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name.
	string unknown_json = 5;
}

// WorkspaceSettings structure.
message WorkspaceSettings {

	// View IDs in order.
	repeated int32 view_ids = 1;
}
