// 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 "mfiles/api/annotations.proto";
import "mfiles/enums.proto";
import "mfiles/structs.proto";

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

// An interface for vault-level information and operations.
//
// Provides methods for miscellaneous vault-level operations.
//
// Vault-level lookups that most applications need right after login: the vault's own identity,
// turning stable identifiers (GUIDs and aliases) into the vault's numeric IDs, listing users and
// user groups, and detecting changes to the metadata structure.
//
// All methods need a vault session (`LogIn` with a vault GUID); a server-level session fails with
// `E_MFILES_LOGIN_REQUIRED`.
//
// | Job | Methods |
// |---|---|
// | Which vault am I in? | `GetVault` |
// | Resolve a GUID to an ID | `GetMetadataStructureItemIdByGUID` |
// | Resolve an alias to an ID | `GetMetadataStructureItemIdByAlias`, `GetAllMetadataStructureItemIdswithAliases`, `GetMetadataStructureItemIdsByAliases` |
// | List users and groups | `GetUsersAndUserContainers`, `GetUsersAndUserGroupsList`, `GetUsersAndUserGroups` |
// | Groups of a user | `GetGroupsOfUserOrGroup` |
// | Has the structure changed? | `GetMetadataStructureVersion` |
//
// **IDs are per vault.** Object types, property definitions, classes, workflows, states and other
// structure items get their numeric IDs from the vault, so the same item can have different IDs in
// different vaults. Resolve them at run time from a GUID or an alias (set by the vault
// administrator) instead of hard-coding IDs, and cache the result together with the metadata
// structure version.
//
// **Caching.** Most methods return the vault's metadata structure version in the
// `mfiles-metadata-version-bin` trailer (4 bytes, a little-endian `int32`). When the number changes,
// cached structure lookups are stale. Call
// [GetMetadataStructureVersion](mfiles:MFiles.IRPCVault.GetMetadataStructureVersion) to check it
// without other work. See
// [Metadata structure version and caching](https://developer.m-files.com/APIs/gRPC-API/concepts/metadata-structure-version-and-caching/)
// and, for aliases and GUIDs,
// [Vault and metadata structure](https://developer.m-files.com/APIs/gRPC-API/concepts/vault-and-metadata-structure/).
//
// **JSON in `bytes` fields.** `GetUsersAndUserGroups`, the `...OrDelta` methods and
// `GetMetadataStructureItemIdsByAliases*` return JSON text in `bytes` fields, zlib-compressed unless
// the matching length field is 4294967295. Prefer the typed alternatives named in each method.
//
// Server push (`SendPushDataResponse`, `SendPushDataPendingHeartbeat`, `NotifyDataPushEvent`) and
// multi-server methods (`GetVaultServerAttachments`, `GetServerRoles`, `BroadcastRequest`) are for
// M-Files' own clients and servers.
service IRPCVault {
	option (mfiles.api.service) = { book: "vault" level: LEVEL_CORE title: "Vault information" };

	// Finds the vault-specific ID of a metadata structure item (object type, property definition,
	// class, workflow, ...) from its GUID.
	//
	// Use this to resolve structure items by GUID instead of hard-coding their vault-specific IDs.
	//
	// Supported `item_type` values: `OBJECT_TYPE`, `VALUE_LIST`, `PROPERTY_DEF`, `OBJECT_CLASS`,
	// `CLASS_GROUP`, `WORKFLOW`, `STATE`, `STATE_TRANSITION`, `NAMED_ACL`, `USER`, `USER_GROUP` and
	// `VIEW_DEF` (all prefixed `METADATA_STRUCTURE_ITEM_`). Object types and value lists are one
	// collection: `OBJECT_TYPE` and `VALUE_LIST` both find either kind.
	//
	// A GUID that matches nothing of the given type returns `is_found` false and `id` 0. An all-zero or
	// malformed GUID, and `METADATA_STRUCTURE_ITEM_VALUE_LIST_ITEM`, fail with `E_INVALIDARG`.
	//
	// The result is cacheable; the response carries the metadata structure version in the
	// `mfiles-metadata-version-bin` trailer.
	rpc GetMetadataStructureItemIdByGUID( GetMetadataStructureItemIdByGUIDRequest ) returns ( GetMetadataStructureItemIdByGUIDResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Finds the vault-specific ID of a metadata structure item from one of its aliases.
	//
	// Aliases are names that the vault administrator gives to structure items so that code can refer
	// to them, for example `PD.InvoiceNumber`. One item can have several aliases.
	//
	// Matching ignores case and leading and trailing spaces. When no item, or more than one item, of
	// the given type has the alias, `id` is -1; for `METADATA_STRUCTURE_ITEM_NAMED_ACL` it is -1000,
	// because -1 is a valid named ACL ID.
	//
	// Supported `item_type` values: `OBJECT_TYPE`, `VALUE_LIST`, `PROPERTY_DEF`, `OBJECT_CLASS`,
	// `WORKFLOW`, `STATE`, `STATE_TRANSITION`, `NAMED_ACL` and `USER_GROUP` (all prefixed
	// `METADATA_STRUCTURE_ITEM_`). Object types and value lists are one collection: `OBJECT_TYPE` and
	// `VALUE_LIST` both search both. Other types and an empty alias fail with `E_INVALIDARG`.
	//
	// To resolve many aliases, fetch them all at once with
	// [GetAllMetadataStructureItemIdswithAliases](mfiles:MFiles.IRPCVault.GetAllMetadataStructureItemIdswithAliases)
	// and cache the result with the metadata structure version.
	rpc GetMetadataStructureItemIdByAlias( GetMetadataStructureItemIdByAliasRequest ) returns ( GetMetadataStructureItemIdByAliasResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Sends a response for server data push. This is a response for request received with RequestPushDataAsync call (with non-zero request id). This call completes the push data cycle.
	//
	// Part of server data push, used by M-Files clients that open a push channel with
	// [OpenServerDataPush](mfiles:MFiles.IRPCServerDataPush.OpenServerDataPush). Sends the client's
	// answer to a push request that expects one; `response_id` is the ID of that request.
	rpc SendPushDataResponse( SendPushDataResponseRequest ) returns ( SendPushDataResponseResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION returns_metadata_structure_version: true };
	}

	// Sends a heartbeat signal as an early response for server data push (with non-zero request id). If the client cannot provide final response in 20 seconds, the client should be sending a heartbeat signal for server that prevents server from terminating the request.
	//
	// Part of server data push. A client that needs more time to answer a push request sends this
	// within 20 seconds, and again as needed, so that the server keeps waiting for
	// [SendPushDataResponse](mfiles:MFiles.IRPCVault.SendPushDataResponse).
	rpc SendPushDataPendingHeartbeat( SendPushDataPendingHeartbeatRequest ) returns ( SendPushDataPendingHeartbeatResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION returns_metadata_structure_version: true };
	}

	// Gets all translations of the vault's metadata structure names as one JSON document.
	//
	// Requires the rights to change the metadata structure and to see all objects; other users get an
	// access-denied error. Used by M-Files administration tools. The JSON nests objects by the four
	// parts of each translation ID and maps
	// language IDs to the translated strings.
	rpc GetAllTranslations( GetAllTranslationsRequest ) returns ( GetAllTranslationsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the report access credentials for this vault. The credentials are encrypted with the provided public key.
	//
	// Used by M-Files reporting components. Requires a server license that includes reporting;
	// otherwise fails with `E_MFILES_NO_LICENSE_FOR_REPORTING`. The credentials are encrypted with the
	// caller's public key.
	rpc GetReportAccessCredentials( GetReportAccessCredentialsRequest ) returns ( GetReportAccessCredentialsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION returns_metadata_structure_version: true };
	}

	// Gets the names of all users and user groups in one list, with group IDs negated.
	//
	// Convenient for a picker: users have positive `key` values (the user ID), groups negative values
	// (minus the group ID). For example group 102 appears as `-102`.
	rpc GetUsersAndUserGroupsList( GetUsersAndUserGroupsListRequest ) returns ( GetUsersAndUserGroupsListResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the vault's normal user groups with their members.
	//
	// [GetUserContainers](mfiles:MFiles.IRPCVault.GetUserContainers) returns groups of all types.
	rpc GetUserGroups( GetUserGroupsRequest ) returns ( GetUserGroupsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets one user group with its members.
	rpc GetUserGroup( GetUserGroupRequest ) returns ( GetUserGroupResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the user groups that a user or a user group belongs to.
	rpc GetGroupsOfUserOrGroup( GetGroupsOfUserOrGroupRequest ) returns ( GetGroupsOfUserOrGroupResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets all unambiguous alias-to-ID mappings of one kind of metadata structure item, or of all
	// kinds, as JSON.
	//
	// `unambiguous_aliases_only` must be true; false fails with `E_NOTIMPL`. Aliases used by more than
	// one item of the same kind are left out.
	//
	// `data` is UTF-8 JSON followed by one NUL byte. If `uncompressed_length` is 4294967295 the bytes
	// are the JSON as is; otherwise they are zlib-compressed (`zlib.decompress` in Python) and
	// `uncompressed_length` is the decompressed size including the NUL. The JSON maps the item kind to
	// an object of alias-to-ID pairs; kinds without aliases are left out, so an empty vault gives `{}`:
	//
	// ```json
	// {"PropertyDef": {"PD.InvoiceNumber": 1021}, "Class": {"CL.Invoice": 5}}
	// ```
	//
	// Kind names: `ObjectType`, `ValueList`, `PropertyDef`, `Class`, `Workflow`, `State`,
	// `StateTransition`, `NamedACL`, `UserGroup`. Aliases keep the case the administrator gave them.
	// Object types and value lists are one collection, so with `METADATA_STRUCTURE_ITEM_ALL` an alias of
	// either appears under both `ObjectType` and `ValueList`.
	//
	// [GetAllMetadataStructureItemIdswithAliases](mfiles:MFiles.IRPCVault.GetAllMetadataStructureItemIdswithAliases)
	// returns the same data as typed messages and is easier to use.
	rpc GetMetadataStructureItemIdsByAliases( GetMetadataStructureItemIdsByAliasesRequest ) returns ( GetMetadataStructureItemIdsByAliasesResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Gets all users and normal user groups of the vault as JSON.
	//
	// Prefer [GetUsersAndUserContainers](mfiles:MFiles.IRPCVault.GetUsersAndUserContainers), which
	// returns the same kind of data as typed messages.
	//
	// `users` and `groups` are UTF-8 JSON arrays followed by one NUL byte, each zlib-compressed unless
	// its length field is 4294967295. Users are `{"key": <user ID>, "name": "<full name>"}`; groups
	// are `{"id": ..., "name": ..., "members": [<user IDs and group IDs>], "type": "normal"}`. Only
	// normal user groups are included.
	rpc GetUsersAndUserGroups( GetUsersAndUserGroupsRequest ) returns ( GetUsersAndUserGroupsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Gets alias-to-ID mappings of several kinds of metadata structure item as JSON, with the option to
	// exclude kinds.
	//
	// Works like
	// [GetMetadataStructureItemIdsByAliases](mfiles:MFiles.IRPCVault.GetMetadataStructureItemIdsByAliases),
	// with the same JSON format and compression, but takes lists of kinds. `unambiguous_aliases_only`
	// must be true. Excluding `METADATA_STRUCTURE_ITEM_ALL` fails with `E_INVALIDARG`.
	rpc GetMetadataStructureItemIdsByAliases_Compressed( GetMetadataStructureItemIdsByAliases_CompressedRequest ) returns ( GetMetadataStructureItemIdsByAliases_CompressedResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets users and normal user groups as JSON, or only the changes since a version the caller
	// already has.
	//
	// Used by M-Files clients to keep a local copy of the user lists; applications usually call
	// [GetUsersAndUserContainers](mfiles:MFiles.IRPCVault.GetUsersAndUserContainers) instead.
	//
	// Send 0 for both versions to get everything. Later, send the `current_..._version_on_server`
	// values you received with `allow_receiving_delta` true: if nothing changed, the JSON is an empty
	// delta (`{"isDelta":true,"removedUsers":[],"users":[]}` for users). `users` and `groups` are
	// NUL-terminated UTF-8 JSON objects, zlib-compressed unless their length field is 4294967295.
	rpc GetUsersAndUserGroupsOrDelta( GetUsersAndUserGroupsOrDeltaRequest ) returns ( GetUsersAndUserGroupsOrDeltaResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets all user groups of the vault, of all group types, with their members.
	rpc GetUserContainers( GetUserContainersRequest ) returns ( GetUserContainersResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets all users and all user groups of the vault.
	//
	// The typed way to list users and groups. `users` gives each user's ID (`key`) and full name;
	// `groups` gives each group with its members (user IDs and group IDs). Includes groups of all
	// types, unlike [GetUserGroups](mfiles:MFiles.IRPCVault.GetUserGroups).
	rpc GetUsersAndUserContainers( GetUsersAndUserContainersRequest ) returns ( GetUsersAndUserContainersResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets users and user groups of all types as JSON, or only the changes since a version the caller
	// already has.
	//
	// Works like
	// [GetUsersAndUserGroupsOrDelta](mfiles:MFiles.IRPCVault.GetUsersAndUserGroupsOrDelta) but includes
	// groups of all types. Used by M-Files clients; applications usually call
	// [GetUsersAndUserContainers](mfiles:MFiles.IRPCVault.GetUsersAndUserContainers) instead.
	rpc GetUsersAndUserContainersOrDelta( GetUsersAndUserContainersOrDeltaRequest ) returns ( GetUsersAndUserContainersOrDeltaResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets metadata structure item IDs and related aliases or GUIDs which are used in Metadata card configuration value. Created for HttpServer.
	//
	// Used by M-Files clients to resolve the aliases and GUIDs that the vault's metadata card
	// configuration refers to. Returns UTF-8 JSON that maps item kinds to alias-or-GUID-to-ID pairs
	// (`{}` when there are none). Applications rarely need it.
	rpc GetMetadataStructureItemIdsFromMDCardConfiguration( GetMetadataStructureItemIdsFromMDCardConfigurationRequest ) returns ( GetMetadataStructureItemIdsFromMDCardConfigurationResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the servers this vault is attached to.
	//
	// Used by M-Files in multi-server deployments; applications rarely need it. Lists the servers the
	// vault is attached to; on a single server the list has one entry with `is_current` true.
	rpc GetVaultServerAttachments( GetVaultServerAttachmentsRequest ) returns ( GetVaultServerAttachmentsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION returns_metadata_structure_version: true };
	}

	// Broadcasts a vault level request.
	//
	// Used by M-Files administration tools. Requires full control of the vault. The only request type,
	// `BROADCAST_REQUEST_TYPE_RESTART_VAULT`, restarts the vault on all servers and waits for the restart
	// on this server. Other values fail with `E_INVALIDARG`.
	rpc BroadcastRequest( BroadcastRequestRequest ) returns ( BroadcastRequestResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION returns_metadata_structure_version: true };
	}

	// Gets the multi-server roles this server has with the vault.
	//
	// Used by M-Files in multi-server deployments to see which background roles this server runs for
	// the vault; applications rarely need it.
	rpc GetServerRoles( GetServerRolesRequest ) returns ( GetServerRolesResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets all unambiguous alias-to-ID mappings of one kind of metadata structure item, or of all
	// kinds, as typed lists.
	//
	// The typed form of
	// [GetMetadataStructureItemIdsByAliases](mfiles:MFiles.IRPCVault.GetMetadataStructureItemIdsByAliases):
	// one list per kind in `metadata_structure_aliases`, each entry an alias and its ID. Lists of kinds
	// without aliases are empty. `unambiguous_aliases_only` must be true; false fails with
	// `E_NOTIMPL`. Fetch once and cache with the metadata structure version.
	rpc GetAllMetadataStructureItemIdswithAliases( GetAllMetadataStructureItemIdswithAliasesRequest ) returns ( GetAllMetadataStructureItemIdswithAliasesResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the vault's real object types (not value lists), with icons, in one call.
	//
	// Set `object_type_and_value_list_request.include_real_object_types` to true; with false, or with
	// no request part set, the lists come back empty. Value lists are not returned by this method; use
	// the object types and value lists services for those. The administrative request part requires the
	// right to see the full metadata structure and fails with `E_MFILES_ACCESS_DENIED` otherwise.
	rpc GetMetadataStructure( GetMetadataStructureRequest ) returns ( GetMetadataStructureResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Gets the GUID, display name and other basic data of the session's vault.
	//
	// Requires a vault session. `tooltip`, `icon` and `dns_names` are often empty. The response
	// carries the metadata structure version in the `mfiles-metadata-version-bin` trailer.
	rpc GetVault( GetVaultRequest ) returns ( GetVaultResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Gets the version numbers of the vault's metadata structure and of its property definitions.
	//
	// A cheap check for structure changes. `metadata_structure_version` is the same number that other
	// methods return in the `mfiles-metadata-version-bin` trailer. This method itself sends no
	// trailer.
	rpc GetMetadataStructureVersion( GetMetadataStructureVersionRequest ) returns ( GetMetadataStructureVersionResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION highlighted: true };
	}

	// Notify for server data push message change. In multi-server mode this is broadcast to all nodes and node that has client channel open can continue operation.
	//
	// Part of server data push, used by M-Files clients and servers in multi-server deployments to
	// pass a push event to the server that holds the client's push channel. Applications rarely need
	// it.
	rpc NotifyDataPushEvent( NotifyDataPushEventRequest ) returns ( NotifyDataPushEventResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}
}

// The request of GetMetadataStructureItemIdByGUID.
message GetMetadataStructureItemIdByGUIDRequest {

	// The kind of item to look for. The method description lists the supported values.
	MetadataStructureItem item_type = 1;

	// The item's GUID, with or without braces, in any case, for example `{9725854F-4A75-403F-A364-F390A67A0535}`.
	string guid = 2;
}

// The response of GetMetadataStructureItemIdByGUID.
message GetMetadataStructureItemIdByGUIDResponse {

	// True if an item of `item_type` has this GUID.
	bool is_found = 1;

	// The item's ID in this vault. 0 when `is_found` is false.
	int32 id = 2;
}

// The request of GetMetadataStructureItemIdByAlias.
message GetMetadataStructureItemIdByAliasRequest {

	// The kind of item to look for. The method description lists the supported values.
	MetadataStructureItem item_type = 1;

	// One alias, without the `;` that separates an item's aliases. Case does not matter.
	string alias = 2;
}

// The response of GetMetadataStructureItemIdByAlias.
message GetMetadataStructureItemIdByAliasResponse {

	// The item's ID, or -1 (-1000 for named ACLs) if no item or several items of `item_type` have the alias.
	int32 id = 1;
}

// The request of SendPushDataResponse.
message SendPushDataResponseRequest {

	// The response id, should match with the request id that was received from of the RequestPushDataAsync call.
	int32 response_id = 1;

	// The response data for previous callback.
	string response_json = 2;
}

// The response of SendPushDataResponse.
message SendPushDataResponseResponse {
}

// The request of SendPushDataPendingHeartbeat.
message SendPushDataPendingHeartbeatRequest {

	// The response id, should match with the request id that was received from of the RequestPushDataAsync call.
	int32 response_id = 1;
}

// The response of SendPushDataPendingHeartbeat.
message SendPushDataPendingHeartbeatResponse {
}

// The request of GetAllTranslations.
message GetAllTranslationsRequest {
}

// The response of GetAllTranslations.
message GetAllTranslationsResponse {

	// Receives the output object.
	string output_json = 1;
}

// The request of GetReportAccessCredentials.
message GetReportAccessCredentialsRequest {

	// The public key as a BLOB for encrypting the credentials.
	bytes public_key = 1;
}

// The response of GetReportAccessCredentials.
message GetReportAccessCredentialsResponse {

	// Receives the report access credentials (represented by Impersonation sturct).
	Impersonation pimpersonation = 1;
}

// The request of GetUsersAndUserGroupsList.
message GetUsersAndUserGroupsListRequest {
}

// The response of GetUsersAndUserGroupsList.
message GetUsersAndUserGroupsListResponse {

	// Users (positive `key` = user ID) followed by user groups (negative `key` = minus the group ID).
	repeated KeyNamePair users_and_user_groups = 1;
}

// The request of GetUserGroups.
message GetUserGroupsRequest {
}

// The response of GetUserGroups.
message GetUserGroupsResponse {

	// User groups (represented by UserGroupBasic structs).
	repeated UserGroupBasic groups = 1;
}

// The request of GetUserGroup.
message GetUserGroupRequest {

	// The ID of the user group (positive).
	int32 user_group = 1;
}

// The response of GetUserGroup.
message GetUserGroupResponse {

	// The user group, with its name, type and members.
	UserGroupBasic putf8szugb = 1;
}

// The request of GetGroupsOfUserOrGroup.
message GetGroupsOfUserOrGroupRequest {

	// The ID of the user, or of the user group when `is_group` is true.
	int32 user_or_group_id = 1;

	// True if `user_or_group_id` is a user group ID; false (default) for a user ID.
	bool is_group = 2;
}

// The response of GetGroupsOfUserOrGroup.
message GetGroupsOfUserOrGroupResponse {

	// User groups (represented by UserGroupBasic structs).
	repeated UserGroupBasic groups = 1;
}

// The request of GetMetadataStructureItemIdsByAliases.
message GetMetadataStructureItemIdsByAliasesRequest {

	// The kind of item, or `METADATA_STRUCTURE_ITEM_ALL` for every kind that can have aliases.
	MetadataStructureItem emsi = 1;

	// Must be true; false fails with `E_NOTIMPL`.
	bool unambiguous_aliases_only = 2;
}

// The response of GetMetadataStructureItemIdsByAliases.
message GetMetadataStructureItemIdsByAliasesResponse {

	// NUL-terminated UTF-8 JSON, zlib-compressed unless `uncompressed_length` is 4294967295. The method description shows the format.
	bytes data = 1;

	// Size of the decompressed `data`, or 4294967295 if `data` is not compressed.
	uint32 uncompressed_length = 2;
}

// The request of GetUsersAndUserGroups.
message GetUsersAndUserGroupsRequest {
}

// The response of GetUsersAndUserGroups.
message GetUsersAndUserGroupsResponse {

	// NUL-terminated JSON array of users (`key`, `name`), zlib-compressed unless `uncompressed_users_length` is 4294967295.
	bytes users = 1;

	// Size of the decompressed `users`, or 4294967295 if `users` is not compressed.
	uint32 uncompressed_users_length = 2;

	// NUL-terminated JSON array of user groups (`id`, `name`, `members`, `type`), zlib-compressed unless `uncompressed_groups_length` is 4294967295.
	bytes groups = 3;

	// Size of the decompressed `groups`, or 4294967295 if `groups` is not compressed.
	uint32 uncompressed_groups_length = 4;
}

// The request of GetMetadataStructureItemIdsByAliases_Compressed.
message GetMetadataStructureItemIdsByAliases_CompressedRequest {

	// The kinds of item to return. A single `METADATA_STRUCTURE_ITEM_ALL` means every kind that can have aliases.
	repeated MetadataStructureItem msi_array_included = 1;

	// Optional. Kinds to leave out, typically together with `METADATA_STRUCTURE_ITEM_ALL` in `msi_array_included`.
	MetadataStructureItemArray msi_array_excluded = 2;

	// Must be true; false fails with `E_NOTIMPL`.
	bool unambiguous_aliases_only = 3;
}

// The response of GetMetadataStructureItemIdsByAliases_Compressed.
message GetMetadataStructureItemIdsByAliases_CompressedResponse {

	// NUL-terminated UTF-8 JSON, zlib-compressed unless `uncompressed_length` is 4294967295.
	bytes data = 1;

	// Size of the decompressed `data`, or 4294967295 if `data` is not compressed.
	uint32 uncompressed_length = 2;
}

// The request of GetUsersAndUserGroupsOrDelta.
message GetUsersAndUserGroupsOrDeltaRequest {

	// The users version from your previous call, or 0 to get all users.
	int64 callers_current_users_version = 1;

	// The user groups version from your previous call, or 0 to get all groups.
	int64 callers_current_user_groups_version = 2;

	// True to accept only the changes since the versions given.
	bool allow_receiving_delta = 3;
}

// The response of GetUsersAndUserGroupsOrDelta.
message GetUsersAndUserGroupsOrDeltaResponse {

	// The current users version. Send it in the next call.
	int64 current_users_version_on_server = 1;

	// The current user groups version. Send it in the next call.
	int64 current_user_groups_version_on_server = 2;

	// NUL-terminated JSON object (`isDelta`, `removedUsers`, `users`), zlib-compressed unless `uncompressed_users_length` is 4294967295.
	bytes users = 3;

	// Size of the decompressed `users`, or 4294967295 if not compressed.
	uint32 uncompressed_users_length = 4;

	// NUL-terminated JSON object with the groups or their changes, zlib-compressed unless `uncompressed_groups_length` is 4294967295.
	bytes groups = 5;

	// Size of the decompressed `groups`, or 4294967295 if not compressed.
	uint32 uncompressed_groups_length = 6;
}

// The request of GetUserContainers.
message GetUserContainersRequest {
}

// The response of GetUserContainers.
message GetUserContainersResponse {

	// User groups (represented by UserGroupBasic structs).
	repeated UserGroupBasic groups = 1;
}

// The request of GetUsersAndUserContainers.
message GetUsersAndUserContainersRequest {
}

// The response of GetUsersAndUserContainers.
message GetUsersAndUserContainersResponse {

	// The users: `key` is the user ID, `name` the full name.
	repeated KeyNamePair users = 1;

	// The user groups with their members.
	repeated UserGroupBasic groups = 2;
}

// The request of GetUsersAndUserContainersOrDelta.
message GetUsersAndUserContainersOrDeltaRequest {

	// The users version from your previous call, or 0 to get all users.
	int64 callers_current_users_version = 1;

	// The user groups version from your previous call, or 0 to get all groups.
	int64 callers_current_user_groups_version = 2;

	// True to accept only the changes since the versions given.
	bool allow_receiving_delta = 3;
}

// The response of GetUsersAndUserContainersOrDelta.
message GetUsersAndUserContainersOrDeltaResponse {

	// Receives the current version of the Users value list's data on the server. If this is the same as the one specified by the caller, no users are returned.
	int64 current_users_version_on_server = 1;

	// Receives the current version of the User Groups value list's data on the server. If this is the same as the one specified by the caller, no user groups are returned.
	int64 current_user_groups_version_on_server = 2;

	// NUL-terminated JSON object (`isDelta`, `removedUsers`, `users`), zlib-compressed unless `uncompressed_users_length` is 4294967295.
	bytes users = 3;

	// Size of the decompressed `users`, or 4294967295 if not compressed.
	uint32 uncompressed_users_length = 4;

	// NUL-terminated JSON object with the groups or their changes, zlib-compressed unless `uncompressed_groups_length` is 4294967295.
	bytes groups = 5;

	// Size of the decompressed `groups`, or 4294967295 if not compressed.
	uint32 uncompressed_groups_length = 6;
}

// The request of GetMetadataStructureItemIdsFromMDCardConfiguration.
message GetMetadataStructureItemIdsFromMDCardConfigurationRequest {
}

// The response of GetMetadataStructureItemIdsFromMDCardConfiguration.
message GetMetadataStructureItemIdsFromMDCardConfigurationResponse {

	// Receives the output object.
	bytes item_ids = 1;
}

// The request of GetVaultServerAttachments.
message GetVaultServerAttachmentsRequest {
}

// The response of GetVaultServerAttachments.
message GetVaultServerAttachmentsResponse {

	// Receives the vault server attachments.
	repeated VaultServerAttachment vault_server_attachments = 1;
}

// The request of BroadcastRequest.
message BroadcastRequestRequest {

	// The broadcast request type.
	BroadcastRequestType request_type = 1;

	// The optional custom data that can be attached to the request.
	string request_data = 2;
}

// The response of BroadcastRequest.
message BroadcastRequestResponse {
}

// The request of GetServerRoles.
message GetServerRolesRequest {
}

// The response of GetServerRoles.
message GetServerRolesResponse {

	// Receives the server roles struct.
	MultiServerRoles server_roles = 1;
}

// The request of GetAllMetadataStructureItemIdswithAliases.
message GetAllMetadataStructureItemIdswithAliasesRequest {

	// The kind of item, or `METADATA_STRUCTURE_ITEM_ALL` for every kind that can have aliases.
	MetadataStructureItem emsi = 1;

	// Must be true. Aliases used by more than one item of the same kind are left out.
	bool unambiguous_aliases_only = 2;
}

// The response of GetAllMetadataStructureItemIdswithAliases.
message GetAllMetadataStructureItemIdswithAliasesResponse {

	// Receives the output object.
	MetadataStructureAliases metadata_structure_aliases = 1;
}

// A structure that specifies the request type for the GetMetadataStructure method.
message GetMetadataStructureRequest {

	// Requests the specified object types and value lists from the server when set.
	ObjectTypeAndValueListStructureRequest object_type_and_value_list_request = 1;

	// Requests the specified administrative object types and value lists from the server when set.
	ObjectTypeAndValueListAdminStructureRequest object_type_and_value_list_admin_request = 2;
}

// A structure that specifies the response type for the GetzMetadataStructure method.
message GetMetadataStructureResponse {

	// Receives the object types and value lists if they were requested.
	ObjectTypeAndValueListStructureResponse object_type_and_value_list_response = 1;

	// Receives the administrative object types and value lists if they were requested.
	ObjectTypeAndValueListAdminStructureResponse object_type_and_value_list_admin_response = 2;
}

// A structure that specifies get vault request.
message GetVaultRequest {
}

// A structure that specifies get vault response.
message GetVaultResponse {

	// The vault the session is logged in to.
	VaultBasic vault = 1;
}

// The request of GetMetadataStructureVersion.
message GetMetadataStructureVersionRequest {
}

// A structure that specifies the response type for the GetMetadataStructureVersion method.
message GetMetadataStructureVersionResponse {

	// The vault's metadata structure version. When it differs from the value your cache was built with, refresh cached structure data.
	int32 metadata_structure_version = 1;

	// The version of the vault's property definitions.
	int32 property_defs_version = 2;
}

// A structure that specifies notify data push event request.
message NotifyDataPushEventRequest {

	// The request id, should match with the request id that was received from of the RequestPushDataAsync call.
	int32 request_id = 1;

	// The notify type. 0 = unknown, 1 = request, 2 = response, 3 = hearbeat.
	ServerDataPushNotifyType notify_type = 2;
}

// The response of NotifyDataPushEvent. Has no data.
message NotifyDataPushEventResponse {
}
