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

// Administers object types and value lists: reads their full definitions, adds, modifies, converts
// and removes them, and manages value list items with administrator rights.
//
// Use this interface to add, remove and modify object types and their
// contents. This interface is intended to be used with administrative
// value list operations as well. Value lists are just seen as simple object
// types.
//
// This is the administrator's side of [IRPCObjectTypes](mfiles:MFiles.IRPCObjectTypes) and
// [IRPCValueLists](mfiles:MFiles.IRPCValueLists). M-Files Admin and administrative tools call it;
// ordinary applications read the structure with the Vault API instead.
//
// | | Vault API (read side) | This service |
// | --- | --- | --- |
// | Data | [ValueList](mfiles:MFiles.ValueList): names, flags, the caller's permissions | [ValueListAdmin](mfiles:MFiles.ValueListAdmin): the same plus external database connection, column mappings, automatic permissions, aliases |
// | Rights | none | `read_all_metadata_structure` to read, `change_metadata_structure` to write |
// | Calls | [GetObjectTypes](mfiles:MFiles.IRPCObjectTypes.GetObjectTypes), [GetValueLists](mfiles:MFiles.IRPCValueLists.GetValueLists) | [GetObjectTypeDefs](mfiles:MFiles.IRPCObjectTypesAdmin.GetObjectTypeDefs), [GetValueListDefs](mfiles:MFiles.IRPCObjectTypesAdmin.GetValueListDefs) |
//
// - **Session and rights.** Every method requires a vault session. Reads need the vault right
//   `read_all_metadata_structure`; writes need `change_metadata_structure` and
//   `license_allows_modifications`. The vault role full control grants them. A normal user gets
//   "Access denied." (gRPC status `UNKNOWN`, error codes 0x800407E4 and 0x800400A9).
//   Connecting an object type to an external database also needs the server right `run_code`
//   (see [ModifyObjectType](mfiles:MFiles.IRPCObjectTypesAdmin.ModifyObjectType)).
// - **Read the definitions**:
//   [GetObjectTypeDefs](mfiles:MFiles.IRPCObjectTypesAdmin.GetObjectTypeDefs),
//   [GetValueListDefs](mfiles:MFiles.IRPCObjectTypesAdmin.GetValueListDefs),
//   [GetObjectTypeDef](mfiles:MFiles.IRPCObjectTypesAdmin.GetObjectTypeDef).
// - **Change the definitions**:
//   [AddObjectType](mfiles:MFiles.IRPCObjectTypesAdmin.AddObjectType),
//   [ModifyObjectType](mfiles:MFiles.IRPCObjectTypesAdmin.ModifyObjectType),
//   [ConvertValueListToObjectType](mfiles:MFiles.IRPCObjectTypesAdmin.ConvertValueListToObjectType),
//   [RemoveObjectType](mfiles:MFiles.IRPCObjectTypesAdmin.RemoveObjectType). Read the current
//   definition first, change it, and send the whole [ValueListAdmin](mfiles:MFiles.ValueListAdmin)
//   back.
// - **External object types** (items read from an external database or connector):
//   [ParseSQLSelectStatement](mfiles:MFiles.IRPCObjectTypesAdmin.ParseSQLSelectStatement),
//   [RefreshExternalObjectTypeColumnMappings](mfiles:MFiles.IRPCObjectTypesAdmin.RefreshExternalObjectTypeColumnMappings),
//   [GetExternalObjectTypePlugins](mfiles:MFiles.IRPCObjectTypesAdmin.GetExternalObjectTypePlugins),
//   [GetExternalObjectTypePluginConnectionInfo](mfiles:MFiles.IRPCObjectTypesAdmin.GetExternalObjectTypePluginConnectionInfo).
// - **Value list items** (not objects of real object types):
//   [AddObjectTypeItem](mfiles:MFiles.IRPCObjectTypesAdmin.AddObjectTypeItem),
//   [UpdateObjectTypeItem](mfiles:MFiles.IRPCObjectTypesAdmin.UpdateObjectTypeItem),
//   [RemoveObjectTypeItem](mfiles:MFiles.IRPCObjectTypesAdmin.RemoveObjectTypeItem),
//   [ChangeObjectTypeItemPermissions](mfiles:MFiles.IRPCObjectTypesAdmin.ChangeObjectTypeItemPermissions),
//   [ChangeObjectTypeItemIcon](mfiles:MFiles.IRPCObjectTypesAdmin.ChangeObjectTypeItemIcon),
//   [ChangeObjectTypeItemAutomaticPermissionsForObjects](mfiles:MFiles.IRPCObjectTypesAdmin.ChangeObjectTypeItemAutomaticPermissionsForObjects).
//   Users without administrator rights use the `...FromClient` methods of
//   [IRPCValueLists](mfiles:MFiles.IRPCValueLists) instead. Classes (list 1) and class groups
//   (list 2) are not items here: use [IRPCPropertyDefsAdmin](mfiles:MFiles.IRPCPropertyDefsAdmin)
//   and [IRPCDocClassGroupsAdmin](mfiles:MFiles.IRPCDocClassGroupsAdmin).
//
// **Metadata structure version.** Adding, modifying, converting and removing an object type or value list
// increments the vault's metadata structure version by one when the change commits, so clients that cache
// the structure reload it (see
// [Metadata structure version and caching](https://developer.m-files.com/APIs/gRPC-API/concepts/metadata-structure-version-and-caching/)). These methods do
// not send the `mfiles-metadata-version-bin` trailer themselves; read the new value
// with [GetMetadataStructureVersion](mfiles:MFiles.IRPCVault.GetMetadataStructureVersion) or from
// the trailer of the next call. Changing value list items does not change the metadata structure version,
// except permission changes on items of structure lists such as classes. Changes that update the
// metadata structure version fail while the vault is being archived or restored.
service IRPCObjectTypesAdmin {
	option (mfiles.api.service) = { book: "admin" level: LEVEL_SPECIALIZED title: "Object type administration" };

	// Removes an object type or value list together with its items, classes and dependent views.
	//
	// - Destroys the list's items, the classes of the object type, the views and similar elements that
	//   use it, the external locations that create objects of the type, and the type's owner, default
	//   and conflict property definitions. This cannot be undone.
	// - Requires `change_metadata_structure` and `license_allows_modifications`.
	// - Fails for built-in object types and value lists, for a type or list that owns another one, for
	//   a real object type that still has objects (destroy them first), and when other property
	//   definitions are based on the list (the error names them).
	// - For an external object type only the cached items are removed; the external database is not
	//   touched.
	// - Increments the metadata structure version.
	rpc RemoveObjectType( RemoveObjectTypeRequest ) returns ( RemoveObjectTypeResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Connects to an external database and returns the source table and columns of a SELECT
	// statement, to set up the column mappings of an external object type.
	//
	// - Requires `change_metadata_structure` and `license_allows_modifications`. The server opens the
	//   connection itself, so the call also requires the server right `run_code` (system
	//   administrator), unless the connection string matches the providers and settings that the
	//   server allows for vault administrators.
	// - An empty `connection_string` (the vault's own database) is always refused with
	//   "Access denied.".
	// - Read-only: nothing is saved. Apply the result with
	//   [ModifyObjectType](mfiles:MFiles.IRPCObjectTypesAdmin.ModifyObjectType).
	rpc ParseSQLSelectStatement( ParseSQLSelectStatementRequest ) returns ( ParseSQLSelectStatementResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Adds an item to a value list as an administrator.
	//
	// - Requires `change_metadata_structure` and `license_allows_modifications`; the list's own
	//   permissions are not checked. Users without these rights use
	//   [AddValueListItemFromClient](mfiles:MFiles.IRPCValueLists.AddValueListItemFromClient).
	// - Only for plain value lists. A real object type fails with "Not found." (create objects with
	//   [IRPCObjectOperations](mfiles:MFiles.IRPCObjectOperations)); classes (1), class groups (2) and
	//   list 18 are refused with an invalid-argument error, and external lists are refused.
	// - `has_parent` is allowed only in hierarchical lists, `has_owner` only in lists that are not
	//   hierarchical.
	// - In Traditional folders (list 4) the call returns an existing matching folder instead of adding
	//   a duplicate.
	rpc AddObjectTypeItem( AddObjectTypeItemRequest ) returns ( AddObjectTypeItemResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Deletes an item of a value list as an administrator.
	//
	// - Requires `change_metadata_structure` and `license_allows_modifications`.
	// - The item is marked deleted. Only for plain value lists: real object types fail with
	//   "Not found.", classes (1), class groups (2) and list 18 with an invalid-argument error, and
	//   external lists are refused.
	// - If the item owns items in other lists, set `allow_removing_owned_items` to true to allow
	//   removing them as well.
	rpc RemoveObjectTypeItem( RemoveObjectTypeItemRequest ) returns ( RemoveObjectTypeItemResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Updates an item of a value list (for example its name, parent or owner) as an administrator.
	//
	// - Requires `change_metadata_structure` and `license_allows_modifications`.
	// - The same list restrictions as
	//   [AddObjectTypeItem](mfiles:MFiles.IRPCObjectTypesAdmin.AddObjectTypeItem). The response is
	//   empty: read the item again to see the stored values.
	rpc UpdateObjectTypeItem( UpdateObjectTypeItemRequest ) returns ( UpdateObjectTypeItemResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Replaces the permissions (ACL) of a value list item.
	//
	// - Requires `change_metadata_structure` and `license_allows_modifications`.
	// - Only for items of plain value lists; change object permissions with the object operations.
	// - For items of the structure lists (classes, class groups, workflows, states, state
	//   transitions, external locations) the change increments the metadata structure version.
	rpc ChangeObjectTypeItemPermissions( ChangeObjectTypeItemPermissionsRequest ) returns ( ChangeObjectTypeItemPermissionsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Converts a value list, and the lists that own it or that it owns, into real object types.
	//
	// - Changes the vault's database structure; there is no method that converts back.
	// - Requires `change_metadata_structure` and `license_allows_modifications`.
	// - Stops background refreshing of the list while converting.
	// - Increments the metadata structure version.
	rpc ConvertValueListToObjectType( ConvertValueListToObjectTypeRequest ) returns ( ConvertValueListToObjectTypeResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Sets or clears the icon of a value list item.
	//
	// - Requires `change_metadata_structure` and `license_allows_modifications`.
	// - Fails with "Access denied." for lists whose items cannot have icons.
	// - Does not change the metadata structure version: clients see the new icon when they reload the list's
	//   items.
	rpc ChangeObjectTypeItemIcon( ChangeObjectTypeItemIconRequest ) returns ( ChangeObjectTypeItemIconResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Tells whether any item uses automatic permissions, in one object type or value list or in all
	// of them.
	//
	// - Requires a vault session; no vault rights are needed (a normal user's call succeeded). Read-only.
	rpc AreAutomaticPermissionsUsed( AreAutomaticPermissionsUsedRequest ) returns ( AreAutomaticPermissionsUsedResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets the full administrative definitions of all real object types.
	//
	// - Requires `read_all_metadata_structure`; a normal user gets "Access denied.". Users
	//   without the right call [GetObjectTypes](mfiles:MFiles.IRPCObjectTypes.GetObjectTypes).
	// - Returns real object types only (11 in the Sample Vault). For object types and value lists
	//   together use [GetValueListDefs](mfiles:MFiles.IRPCObjectTypesAdmin.GetValueListDefs).
	// - Names are in the session language.
	rpc GetObjectTypeDefs( GetObjectTypeDefsRequest ) returns ( GetObjectTypeDefsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets the full administrative definitions of all object types and value lists.
	//
	// - Requires `read_all_metadata_structure`; a normal user gets "Access denied.". Users
	//   without the right call [GetValueLists](mfiles:MFiles.IRPCValueLists.GetValueLists).
	// - Returns both plain value lists and real object types (29 in the Sample Vault, including the 11
	//   object types); `object_type.is_real_object_type` tells them apart.
	rpc GetValueListDefs( GetValueListDefsRequest ) returns ( GetValueListDefsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Creates a new object type or value list.
	//
	// - Requires `change_metadata_structure` and `license_allows_modifications`. An external
	//   connection string also requires the server right `run_code` (see
	//   [ModifyObjectType](mfiles:MFiles.IRPCObjectTypesAdmin.ModifyObjectType)).
	// - Creates database tables and the owner property definition of the new list.
	// - Increments the metadata structure version.
	rpc AddObjectType( AddObjectTypeRequest ) returns ( AddObjectTypeResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets the full administrative definition of one object type or value list.
	//
	// - Requires `read_all_metadata_structure`; a normal user gets "Access denied.".
	// - An unknown ID fails with "Not found.". Same data as one element of
	//   [GetValueListDefs](mfiles:MFiles.IRPCObjectTypesAdmin.GetValueListDefs).
	rpc GetObjectTypeDef( GetObjectTypeDefRequest ) returns ( GetObjectTypeDefResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Re-reads the columns of an external object type's SELECT statement, merges them with the
	// existing column mappings, and saves the object type.
	//
	// - Saves the `obj_type` you send, with refreshed `database_column_mappings`. Send the current
	//   definition from [GetObjectTypeDef](mfiles:MFiles.IRPCObjectTypesAdmin.GetObjectTypeDef):
	//   any other change in it is saved too.
	// - Columns that already had a mapping keep their target property definition and insert and update
	//   settings; new columns come back unmapped.
	// - Same rights as
	//   [ParseSQLSelectStatement](mfiles:MFiles.IRPCObjectTypesAdmin.ParseSQLSelectStatement), which it
	//   calls with the object type's connection string and SELECT statement.
	// - Unlike [ModifyObjectType](mfiles:MFiles.IRPCObjectTypesAdmin.ModifyObjectType), it does not
	//   increment the metadata structure version.
	rpc RefreshExternalObjectTypeColumnMappings( RefreshExternalObjectTypeColumnMappingsRequest ) returns ( RefreshExternalObjectTypeColumnMappingsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Sets or clears the automatic permissions that an item (a value list item or an object) gives to
	// the objects that refer to it.
	//
	// - Requires `change_metadata_structure` and `license_allows_modifications`, and read access to
	//   the item.
	// - Applying the change to existing objects runs as background tasks, returned in
	//   `async_task_ids`; follow them with
	//   [GetAsyncTask](mfiles:MFiles.IRPCBackgroundOperationsAdmin.GetAsyncTask).
	// - For classes (list 1) the change increments the metadata structure version.
	rpc ChangeObjectTypeItemAutomaticPermissionsForObjects( ChangeObjectTypeItemAutomaticPermissionsForObjectsRequest ) returns ( ChangeObjectTypeItemAutomaticPermissionsForObjectsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Lists the installed connectors (vault applications) that can provide the items of external
	// object types.
	//
	// - Requires `read_all_metadata_structure`; a normal user gets "Access denied.".
	// - Empty when no connector is installed (as in the Sample Vault).
	rpc GetExternalObjectTypePlugins( GetExternalObjectTypePluginsRequest ) returns ( GetExternalObjectTypePluginsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets the configuration domain and status message of a connector for one object type.
	//
	// - Requires `read_all_metadata_structure`. The answer comes from the connector; M-Files Admin uses
	//   it to open the connector's configuration.
	rpc GetExternalObjectTypePluginConnectionInfo( GetExternalObjectTypePluginConnectionInfoRequest ) returns ( GetExternalObjectTypePluginConnectionInfoResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Saves a changed definition of an object type or value list.
	//
	// - Requires `change_metadata_structure` and `license_allows_modifications`.
	// - Setting or changing the external database connection string, or re-enabling a disabled
	//   external connection, also requires the server right `run_code` (system administrator), unless
	//   the connection string matches the providers and settings that the server allows for vault
	//   administrators. The server connects to that data source itself.
	// - Turning separate property storage on or off for a real object type **takes the vault offline**
	//   while the property data is moved.
	// - Changes to automatic permissions are applied to existing objects by background tasks, returned
	//   in `async_task_ids`; follow them with
	//   [GetAsyncTask](mfiles:MFiles.IRPCBackgroundOperationsAdmin.GetAsyncTask).
	// - Increments the metadata structure version.
	rpc ModifyObjectType( ModifyObjectTypeRequest ) returns ( ModifyObjectTypeResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}
}

// The request of RemoveObjectType.
message RemoveObjectTypeRequest {

	// The ID of the object type to remove.
	int32 object_type = 1;
}

// The response of RemoveObjectType.
message RemoveObjectTypeResponse {
}

// The request of ParseSQLSelectStatement.
message ParseSQLSelectStatementRequest {

	// OLE DB connection string of the external database.
	string connection_string = 1;

	// The SELECT statement to parse.
	string select_statement = 2;
}

// The response of ParseSQLSelectStatement.
message ParseSQLSelectStatementResponse {

	// The name of the source table.
	string source_table = 1;

	// One mapping per column in the SELECT list, with only the source column details set; fill in the target property definitions yourself.
	repeated ObjectTypeColumnMapping putf8szcolmappings = 2;
}

// The request of AddObjectTypeItem.
message AddObjectTypeItemRequest {

	// The item to add. `item_info.obj_id.type` names the value list; the item ID and GUID are ignored and assigned by the server.
	ValueListItem vlitem = 1;
}

// The response of AddObjectTypeItem.
message AddObjectTypeItemResponse {

	// The item as stored, with its new ID, GUID and default automatic permissions.
	ValueListItem result = 1;
}

// The request of RemoveObjectTypeItem.
message RemoveObjectTypeItemRequest {

	// The item: `type` is the value list ID, `item_id.internal_id` the item ID.
	ObjID obj_id = 1;

	// True if removing the owned items of the object type item is allowed. The owned items reside in different object types.
	bool allow_removing_owned_items = 2;
}

// The response of RemoveObjectTypeItem.
message RemoveObjectTypeItemResponse {
}

// The request of UpdateObjectTypeItem.
message UpdateObjectTypeItemRequest {

	// The item with its new values; `item_info.obj_id` identifies it.
	ValueListItem utf8szvlitem = 1;
}

// The response of UpdateObjectTypeItem.
message UpdateObjectTypeItemResponse {
}

// The request of ChangeObjectTypeItemPermissions.
message ChangeObjectTypeItemPermissionsRequest {

	// The item: `type` is the value list ID, `item_id.internal_id` the item ID.
	ObjID obj_id = 1;

	// The new [AccessControlList](mfiles:MFiles.AccessControlList) of the item.
	AccessControlList utf8szacl = 2;
}

// The response of ChangeObjectTypeItemPermissions.
message ChangeObjectTypeItemPermissionsResponse {

	// True if the caller can still see the item under the new ACL.
	bool visible = 1;
}

// The request of ConvertValueListToObjectType.
message ConvertValueListToObjectTypeRequest {

	// The ID of the value list to convert.
	int32 value_list = 1;
}

// The response of ConvertValueListToObjectType.
message ConvertValueListToObjectTypeResponse {
}

// The request of ChangeObjectTypeItemIcon.
message ChangeObjectTypeItemIconRequest {

	// The item: `type` is the value list ID, `item_id.internal_id` the item ID.
	ObjID obj_id = 1;

	// The new icon, or unset to remove it.
	Bytes icon = 2;
}

// The response of ChangeObjectTypeItemIcon.
message ChangeObjectTypeItemIconResponse {
}

// The request of AreAutomaticPermissionsUsed.
message AreAutomaticPermissionsUsedRequest {

	// True to check every object type and value list; `object_type` is then ignored.
	bool all_object_types = 1;

	// The object type or value list to check when `all_object_types` is false.
	int32 object_type = 2;
}

// The response of AreAutomaticPermissionsUsed.
message AreAutomaticPermissionsUsedResponse {

	// Receives true if automatic permissions are in use.
	bool automatic_permissions_used = 1;
}

// The request of GetObjectTypeDefs.
message GetObjectTypeDefsRequest {
}

// The response of GetObjectTypeDefs.
message GetObjectTypeDefsResponse {

	// One [ValueListAdmin](mfiles:MFiles.ValueListAdmin) per object type.
	repeated ValueListAdmin object_types = 1;
}

// The request of GetValueListDefs.
message GetValueListDefsRequest {
}

// The response of GetValueListDefs.
message GetValueListDefsResponse {

	// One [ValueListAdmin](mfiles:MFiles.ValueListAdmin) per object type or value list.
	repeated ValueListAdmin object_types = 1;
}

// The request of AddObjectType.
message AddObjectTypeRequest {

	// The new object type or value list. `object_type.is_real_object_type` chooses between the two. The ID, GUID and owner property definition are ignored and assigned by the server.
	ValueListAdmin obj_type = 1;
}

// The response of AddObjectType.
message AddObjectTypeResponse {

	// The new definition with its ID, GUID and owner property definition (`object_type.owner_property_def`) set.
	ValueListAdmin obj_type_result = 1;
}

// The request of GetObjectTypeDef.
message GetObjectTypeDefRequest {

	// The ID of the object type or value list.
	int32 object_type = 1;
}

// The response of GetObjectTypeDef.
message GetObjectTypeDefResponse {

	// The definition. See [ValueListAdmin](mfiles:MFiles.ValueListAdmin).
	ValueListAdmin obj_type_result = 1;
}

// The request of RefreshExternalObjectTypeColumnMappings.
message RefreshExternalObjectTypeColumnMappingsRequest {

	// The object type's current definition; its connection string and SELECT statement are used to read the columns.
	ValueListAdmin obj_type = 1;
}

// The response of RefreshExternalObjectTypeColumnMappings.
message RefreshExternalObjectTypeColumnMappingsResponse {

	// The definition as saved, with refreshed `database_column_mappings`.
	ValueListAdmin result = 1;
}

// The request of ChangeObjectTypeItemAutomaticPermissionsForObjects.
message ChangeObjectTypeItemAutomaticPermissionsForObjectsRequest {

	// The value list item or object: `type` is the value list or object type ID, `item_id.internal_id` the item or object ID.
	ObjID obj_id = 1;

	// The new automatic permissions. Ignored when `acl_valid` is false.
	AutomaticPermissions utf8szaacl = 2;

	// False to remove the item's automatic permissions.
	bool acl_valid = 3;

	// True to make the new automatic permissions active on the referring objects, false to add them inactive. No effect when `acl_valid` is false.
	bool automatic_permissions_forced_active = 4;
}

// The response of ChangeObjectTypeItemAutomaticPermissionsForObjects.
message ChangeObjectTypeItemAutomaticPermissionsForObjectsResponse {

	// Asynchronous task identifiers, if any, related to the change.
	repeated AsyncTaskID async_task_ids = 1;
}

// The request of GetExternalObjectTypePlugins.
message GetExternalObjectTypePluginsRequest {
}

// The response of GetExternalObjectTypePlugins.
message GetExternalObjectTypePluginsResponse {

	// One [ExternalObjectTypePluginInfo](mfiles:MFiles.ExternalObjectTypePluginInfo) per installed connector.
	repeated ExternalObjectTypePluginInfo plugin_infos = 1;
}

// The request of GetExternalObjectTypePluginConnectionInfo.
message GetExternalObjectTypePluginConnectionInfoRequest {

	// The GUID of the connector, from [GetExternalObjectTypePlugins](mfiles:MFiles.IRPCObjectTypesAdmin.GetExternalObjectTypePlugins).
	string plugin_guid = 1;

	// The ID of the object type.
	int32 object_type = 2;
}

// The response of GetExternalObjectTypePluginConnectionInfo.
message GetExternalObjectTypePluginConnectionInfoResponse {

	// Domain ID for the object type connection.
	string domain_id = 1;

	// Info message about the configuration/status.
	string message = 2;
}

// The request of ModifyObjectType.
message ModifyObjectTypeRequest {

	// The complete new definition; `object_type.id` identifies the object type. Start from [GetObjectTypeDef](mfiles:MFiles.IRPCObjectTypesAdmin.GetObjectTypeDef).
	ValueListAdmin obj_type = 1;

	// True to make changed automatic permissions active on the referring objects, false to add them inactive.
	bool automatic_permissions_forced_active = 2;

	// If true, the entity (ObjectType) version is tracked by versions conflict detection feature.
	bool entity_version_checks_enabled = 3;
}

// The response of ModifyObjectType.
message ModifyObjectTypeResponse {

	// The definition as stored.
	ValueListAdmin result = 1;

	// Asynchronous task identifiers, if any, related to the change.
	repeated AsyncTaskID async_task_ids = 2;
}
