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

// Server-wide administration: master database backup and restore, vault backups, server activity,
// gRPC endpoint certificates, notification (e-mail) settings, server users and the M-Files Manage
// subscription.
//
// Use this interface to perform administrative server-level operations
// such as backing up and restoring the master database.
//
// This is the service behind the server-level nodes of M-Files Admin. Almost every method needs a
// login with the **system administrator** server role; only a few are open to other users. An
// application rarely needs it; automation scripts that back up vaults or read the server activity
// can use it.
//
// **Sessions and rights.** A server-level session is enough (log in with `login_data.vault_guid` =
// `{00000000-0000-0000-0000-000000000000}`); a vault session works as well, except where a method
// says it needs one. Server rights ([ServerAccess](mfiles:MFiles.ServerAccess)) are granted only to
// logins with the system administrator server role; a vault administrator does not have them. A
// missing server right fails with "Access denied. You do not have the server-level access
// rights required by this operation." (error codes 0x800400A8 and 0x800407E4).
//
// - **Back up and restore**:
//   [BackUp](mfiles:MFiles.IRPCServerAdmin.BackUp) (vault or master database, runs as a job),
//   [BackUpMasterDB](mfiles:MFiles.IRPCServerAdmin.BackUpMasterDB),
//   [RestoreMasterDB](mfiles:MFiles.IRPCServerAdmin.RestoreMasterDB).
// - **Server activity** (the M-Files Admin dashboard):
//   [GetServerActivityAsJSON](mfiles:MFiles.IRPCServerAdmin.GetServerActivityAsJSON),
//   [ResetServerActivityBuffer](mfiles:MFiles.IRPCServerAdmin.ResetServerActivityBuffer).
// - **Vault database performance test** (vault session):
//   [BeginPerformanceMeasurementsAsJSON](mfiles:MFiles.IRPCServerAdmin.BeginPerformanceMeasurementsAsJSON),
//   then
//   [GetPerformanceMeasurementsAsJSON](mfiles:MFiles.IRPCServerAdmin.GetPerformanceMeasurementsAsJSON)
//   until done, then
//   [EndPerformanceMeasurementsAsJSON](mfiles:MFiles.IRPCServerAdmin.EndPerformanceMeasurementsAsJSON).
// - **gRPC endpoint TLS and certificate**:
//   [GetServerEndpointSettings](mfiles:MFiles.IRPCServerAdmin.GetServerEndpointSettings),
//   [SetServerEndpointSettings](mfiles:MFiles.IRPCServerAdmin.SetServerEndpointSettings).
// - **Notification e-mail settings**:
//   [GetNotificationSettings](mfiles:MFiles.IRPCServerAdmin.GetNotificationSettings),
//   [SetNotificationSettings](mfiles:MFiles.IRPCServerAdmin.SetNotificationSettings).
// - **Server users** (server roles assigned to account names):
//   [GetServerUsers](mfiles:MFiles.IRPCServerAdmin.GetServerUsers),
//   [UpsertServerUser](mfiles:MFiles.IRPCServerAdmin.UpsertServerUser),
//   [RemoveServerUser](mfiles:MFiles.IRPCServerAdmin.RemoveServerUser).
// - **M-Files Manage subscription**:
//   [GetSubscriptionInfo](mfiles:MFiles.IRPCServerAdmin.GetSubscriptionInfo),
//   [JoinSubscriptionTest](mfiles:MFiles.IRPCServerAdmin.JoinSubscriptionTest),
//   [JoinSubscription](mfiles:MFiles.IRPCServerAdmin.JoinSubscription),
//   [ConnectToCloud](mfiles:MFiles.IRPCServerAdmin.ConnectToCloud).
// - **Process control**: [Shutdown](mfiles:MFiles.IRPCServerAdmin.Shutdown).
//
// Login accounts are managed with [IRPCLoginsAdmin](mfiles:MFiles.IRPCLoginsAdmin), scheduled jobs
// with [IRPCScheduledJobsAdmin](mfiles:MFiles.IRPCScheduledJobsAdmin).
service IRPCServerAdmin {
	option (mfiles.api.service) = { book: "admin" level: LEVEL_SPECIALIZED title: "Server administration" };

	// Stops the M-Files Server process.
	//
	// - Stops the whole server: every session and every vault on it becomes unavailable until the
	//   service is started again. The call returns before the server has stopped.
	// - Requires the system administrator server role (server right `shutdown`).
	rpc Shutdown( ShutdownRequest ) returns ( ShutdownResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Obsolete. Always returns false.
	//
	// - Requires the system administrator server role (server right `shutdown`); other callers get
	//   "Access denied.".
	rpc IsRunningOnNT4( IsRunningOnNT4Request ) returns ( IsRunningOnNT4Response ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets recent server activity (connections, slowest calls, object changes, views, background
	// processes) as a JSON document, for the M-Files Admin server activity dashboard.
	//
	// - Any session can call it, but the result is limited to what the caller administers:
	//   - a login without server rights sees only the vaults in which it has full control of the
	//     vault; a caller who administers no vault gets empty lists;
	//   - a system administrator sees all vaults and the server-level activity.
	// - The input and output JSON formats are those of M-Files Admin and are not otherwise documented.
	//   The server reads `isShowingOnlyUserActivities` (default true) from the parameters; `{}` is a
	//   valid parameter document.
	// - Reads an in-memory buffer; clear it with
	//   [ResetServerActivityBuffer](mfiles:MFiles.IRPCServerAdmin.ResetServerActivityBuffer).
	rpc GetServerActivityAsJSON( GetServerActivityAsJSONRequest ) returns ( GetServerActivityAsJSONResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Clears the server's in-memory activity buffer that
	// [GetServerActivityAsJSON](mfiles:MFiles.IRPCServerAdmin.GetServerActivityAsJSON) reads.
	//
	// - Clears the activity collected so far for all vaults and all users.
	// - Requires the system administrator server role (server right `log_in_to_any_vault`, or
	//   `manage_vaults` when the license limits the administrator's rights to vaults).
	rpc ResetServerActivityBuffer( ResetServerActivityBufferRequest ) returns ( ResetServerActivityBufferResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Starts a database performance measurement in the session's vault and returns its ID.
	//
	// - Starts a background operation and returns when it has started; poll the results with
	//   [GetPerformanceMeasurementsAsJSON](mfiles:MFiles.IRPCServerAdmin.GetPerformanceMeasurementsAsJSON)
	//   and stop it with
	//   [EndPerformanceMeasurementsAsJSON](mfiles:MFiles.IRPCServerAdmin.EndPerformanceMeasurementsAsJSON).
	// - Requires a vault session with the vault right `change_full_control_role` (vault administrators
	//   have it). A server-level session fails with "Login required.".
	// - The measurement belongs to the session: starting a new one removes any earlier measurement of
	//   the same session.
	rpc BeginPerformanceMeasurementsAsJSON( BeginPerformanceMeasurementsAsJSONRequest ) returns ( BeginPerformanceMeasurementsAsJSONResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Stops and removes a performance measurement started with
	// [BeginPerformanceMeasurementsAsJSON](mfiles:MFiles.IRPCServerAdmin.BeginPerformanceMeasurementsAsJSON).
	//
	// - Requires a vault session with the vault right `change_full_control_role`, in the session that
	//   started the measurement.
	rpc EndPerformanceMeasurementsAsJSON( EndPerformanceMeasurementsAsJSONRequest ) returns ( EndPerformanceMeasurementsAsJSONResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets the current results of a vault database performance measurement as JSON.
	//
	// - Requires a vault session with the vault right `change_full_control_role`. Without it the call
	//   fails with "Access denied." ; a server-level session fails
	//   with "Login required.".
	// - An unknown or ended measurement ID fails with "Not found.".
	// - The JSON format is that of M-Files Admin's vault information page and is not otherwise
	//   documented.
	rpc GetPerformanceMeasurementsAsJSON( GetPerformanceMeasurementsAsJSONRequest ) returns ( GetPerformanceMeasurementsAsJSONResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Backs up the server's master database to a file on the server, and returns when the backup is
	// complete.
	//
	// - Requires the system administrator server role (server right `backup_master_database`).
	// - The path is on the server computer. The file is written as the account in
	//   `utf8szimpersonation` (the server's own account when it is the system account).
	// - Runs synchronously. To run it as a cancellable job instead, use
	//   [BackUp](mfiles:MFiles.IRPCServerAdmin.BackUp) with a `BackupJob` whose `vault_guid` is the null
	//   GUID.
	rpc BackUpMasterDB( BackUpMasterDBRequest ) returns ( BackUpMasterDBResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Replaces the server's master database with a master database backup file on the server.
	//
	// - Destructive: the current master database content is replaced by the backup.
	// - Requires the system administrator server role (server right `restore_master_database`).
	// - Fails if the file is not a master database backup.
	rpc RestoreMasterDB( RestoreMasterDBRequest ) returns ( RestoreMasterDBResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Starts a backup of a vault or of the master database as a server job and returns the job ID.
	//
	// - Starts a background job and returns before it completes. The ID is a scheduled job ID: follow
	//   it with [GetScheduledJob](mfiles:MFiles.IRPCScheduledJobsAdmin.GetScheduledJob), cancel it with
	//   [CancelScheduledJob](mfiles:MFiles.IRPCScheduledJobsAdmin.CancelScheduledJob), and remove the
	//   job with [RemoveScheduledJob](mfiles:MFiles.IRPCScheduledJobsAdmin.RemoveScheduledJob) when it
	//   has finished (M-Files Admin does this).
	// - Requires the system administrator server role: server right `backup_vaults` for a vault,
	//   `backup_master_database` when `backupjob.vault_guid` is the null GUID.
	// - For a vault, the call first waits for the vault to finish any ongoing online/offline change.
	rpc BackUp( BackUpRequest ) returns ( BackUpResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets the TLS setting and the certificate of the server's gRPC endpoint.
	//
	// - Requires the system administrator server role (server right `shutdown`). Denied for other
	//   callers.
	// - Also fails with the same access denied error when certificate management has been disabled
	//   on the server.
	// - Fails with "Not implemented." if more than one certificate is stored.
	// - Only the public parts of the certificate and key are returned.
	rpc GetServerEndpointSettings( GetServerEndpointSettingsRequest ) returns ( GetServerEndpointSettingsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Changes the TLS setting and the certificate of the server's gRPC endpoint and restarts the
	// endpoint.
	//
	// - Requires the system administrator server role (server right `shutdown`), and certificate
	//   management must not be disabled on the server (see
	//   [GetServerEndpointSettings](mfiles:MFiles.IRPCServerAdmin.GetServerEndpointSettings)).
	// - Returns before the change is applied: the server applies it in the background right after the
	//   call and restarts the gRPC endpoint, which drops open connections. Errors in that step do not
	//   reach the caller; they are written to the server's event log. Read the result back with
	//   [GetServerEndpointSettings](mfiles:MFiles.IRPCServerAdmin.GetServerEndpointSettings).
	// - A new certificate must come with its private key.
	rpc SetServerEndpointSettings( SetServerEndpointSettingsRequest ) returns ( SetServerEndpointSettingsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets whether and how the server is connected to an M-Files Manage subscription.
	//
	// - Any session can call it; no server right is needed.
	// - The server asks M-Files Manage for the information, so the call needs network access from the
	//   server; if M-Files Manage cannot be reached, a server that is not yet joined returns
	//   `can_join` false.
	rpc GetSubscriptionInfo( GetSubscriptionInfoRequest ) returns ( GetSubscriptionInfoResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Joins the server to an M-Files Manage subscription.
	//
	// - Changes how the server is managed. Test first with
	//   [JoinSubscriptionTest](mfiles:MFiles.IRPCServerAdmin.JoinSubscriptionTest).
	// - Requires the system administrator server role (server rights `edit_server_properties`,
	//   `manage_logins` and `shutdown`).
	// - Fails with "Access denied." if the server already uses M-Files Manage
	//   (`SubscriptionInfo.uses_one_db`).
	rpc JoinSubscription( JoinSubscriptionRequest ) returns ( JoinSubscriptionResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets the server users: account names with server roles that are stored separately from login
	// accounts.
	//
	// - Any session can call it. Without the server right `manage_logins` the list is empty; the call
	//   does not fail.
	// - M-Files Admin shows these under "Server Users" on on-premises servers whose login accounts come
	//   from M-Files Manage.
	rpc GetServerUsers( GetServerUsersRequest ) returns ( GetServerUsersResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Adds a server user or changes the server roles of an existing one.
	//
	// - Requires the system administrator server role (server right `manage_logins`).
	// - The server user is matched by `login_name`.
	rpc UpsertServerUser( UpsertServerUserRequest ) returns ( UpsertServerUserResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Removes a server user, that is, the server roles stored for an account name.
	//
	// - Requires the system administrator server role (server right `manage_logins`).
	rpc RemoveServerUser( RemoveServerUserRequest ) returns ( RemoveServerUserResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Tells the server to fetch its licenses and login accounts from M-Files Manage so that it can
	// start attaching its vaults.
	//
	// **For M-Files components only.** Used for servers that run in M-Files Cloud containers.
	// Applications should not call it.
	// - Requires the system administrator server role (server rights `edit_server_properties`,
	//   `manage_logins` and `shutdown`).
	rpc ConnectToCloud( ConnectToCloudRequest ) returns ( ConnectToCloudResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION internal: true };
	}

	// Sets the server's notification settings: whether notifications are on, the daily digest time,
	// and the SMTP or OAuth 2.0 mail settings used to send them.
	//
	// - Requires the system administrator server role (server right `edit_server_properties`).
	// - Replaces all settings; read them first with
	//   [GetNotificationSettings](mfiles:MFiles.IRPCServerAdmin.GetNotificationSettings).
	// - Validation (each fails with "The parameter is incorrect." and a description): the digest hour
	//   must be 0-23 and the minute 0-59; with `MAIL_SOURCE_AUTH_TYPE_BASIC`, `smtp_server` and a
	//   non-zero `smtp_port` are required; with `MAIL_SOURCE_AUTH_TYPE_OAUTH2`, `oauth2_settings` is
	//   required.
	// - `mail_source_auth_type` `MAIL_SOURCE_AUTH_TYPE_NONE` without `oauth2_settings` is treated as
	//   basic SMTP authentication (for older clients); with `oauth2_settings` it fails.
	rpc SetNotificationSettings( SetNotificationSettingsRequest ) returns ( SetNotificationSettingsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Gets the server's notification settings and mail-sending configuration (without the SMTP
	// password).
	//
	// - Requires the system administrator server role (server right `edit_server_properties`).
	//   Denied for other callers.
	// - `oauth2_settings` is set only when OAuth 2.0 settings are stored.
	rpc GetNotificationSettings( GetNotificationSettingsRequest ) returns ( GetNotificationSettingsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}

	// Checks whether the server could join an M-Files Manage subscription, and lists the vaults that
	// would prevent it.
	//
	// - Does not join; use [JoinSubscription](mfiles:MFiles.IRPCServerAdmin.JoinSubscription) for that.
	// - Requires the system administrator server role (server rights `edit_server_properties`,
	//   `manage_logins` and `shutdown`).
	// - Fails with "Access denied." if the server already uses M-Files Manage.
	// - If M-Files Manage does not recognize the test request, the call succeeds with empty lists.
	rpc JoinSubscriptionTest( JoinSubscriptionTestRequest ) returns ( JoinSubscriptionTestResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION };
	}
}

// The request of Shutdown.
message ShutdownRequest {
}

// The response of Shutdown.
message ShutdownResponse {
}

// The request of IsRunningOnNT4.
message IsRunningOnNT4Request {
}

// The response of IsRunningOnNT4.
message IsRunningOnNT4Response {

	// Always false.
	bool running_on_nt4 = 1;
}

// The request of GetServerActivityAsJSON.
message GetServerActivityAsJSONRequest {

	// Query parameters as a JSON object, for example `{}`.
	string parameters_as_json = 1;
}

// The response of GetServerActivityAsJSON.
message GetServerActivityAsJSONResponse {

	// The activity as a JSON object (`connections`, `functionCalls`, `objectModifications`, `views`, `backgroundProcesses`, and totals).
	string output_as_json = 1;
}

// The request of ResetServerActivityBuffer.
message ResetServerActivityBufferRequest {
}

// The response of ResetServerActivityBuffer.
message ResetServerActivityBufferResponse {
}

// The request of BeginPerformanceMeasurementsAsJSON.
message BeginPerformanceMeasurementsAsJSONRequest {
}

// The response of BeginPerformanceMeasurementsAsJSON.
message BeginPerformanceMeasurementsAsJSONResponse {

	// The ID of the measurement, for the Get and End calls.
	int32 background_op_id = 1;
}

// The request of EndPerformanceMeasurementsAsJSON.
message EndPerformanceMeasurementsAsJSONRequest {

	// The ID returned by [BeginPerformanceMeasurementsAsJSON](mfiles:MFiles.IRPCServerAdmin.BeginPerformanceMeasurementsAsJSON).
	int32 background_op_id = 1;
}

// The response of EndPerformanceMeasurementsAsJSON.
message EndPerformanceMeasurementsAsJSONResponse {
}

// The request of GetPerformanceMeasurementsAsJSON.
message GetPerformanceMeasurementsAsJSONRequest {

	// The ID returned by [BeginPerformanceMeasurementsAsJSON](mfiles:MFiles.IRPCServerAdmin.BeginPerformanceMeasurementsAsJSON).
	int32 background_op_id = 1;
}

// The response of GetPerformanceMeasurementsAsJSON.
message GetPerformanceMeasurementsAsJSONResponse {

	// The measurement results as a JSON document.
	string results_as_json_ = 1;
}

// The request of BackUpMasterDB.
message BackUpMasterDBRequest {

	// Full path of the backup file on the server computer.
	string target_file = 1;

	// The account used to write the backup file. See [Impersonation](mfiles:MFiles.Impersonation).
	Impersonation utf8szimpersonation = 2;

	// True to overwrite existing files; false fails if a target file exists.
	bool overwrite_existing_files = 3;

	// The maximum size of one backup file in megabytes; larger backups continue in sequentially numbered files. 0 means a single file of any size.
	uint32 file_size_limit_in_mb = 4;
}

// The response of BackUpMasterDB.
message BackUpMasterDBResponse {
}

// The request of RestoreMasterDB.
message RestoreMasterDBRequest {

	// Full path of the master database backup file on the server computer.
	string source_file = 1;

	// The account used to read the backup file. See [Impersonation](mfiles:MFiles.Impersonation).
	Impersonation utf8szimpersonation = 2;
}

// The response of RestoreMasterDB.
message RestoreMasterDBResponse {
}

// The request of BackUp.
message BackUpRequest {

	// What to back up and where. Set `vault_guid` to the vault, or to `{00000000-0000-0000-0000-000000000000}` for the master database. See [BackupJob](mfiles:MFiles.BackupJob).
	BackupJob backupjob = 1;
}

// The response of BackUp.
message BackUpResponse {

	// The ID of the scheduled job that runs the backup.
	int32 task_id = 1;
}

// The request of GetServerEndpointSettings.
message GetServerEndpointSettingsRequest {
}

// The response of GetServerEndpointSettings.
message GetServerEndpointSettingsResponse {

	// Whether TLS is enabled, the stored certificate, and whether changes are waiting to be applied (`has_pending_changes`). See [ServerEndpointSettings](mfiles:MFiles.ServerEndpointSettings).
	ServerEndpointSettings server_endpoint_info = 1;
}

// The request of SetServerEndpointSettings.
message SetServerEndpointSettingsRequest {

	// The new settings: `use_tls`, certificates to add or change, and IDs of certificates to remove. See [SetServerEndpointSettingsParams](mfiles:MFiles.SetServerEndpointSettingsParams).
	SetServerEndpointSettingsParams value = 1;
}

// The response of SetServerEndpointSettings.
message SetServerEndpointSettingsResponse {
}

// The request of GetSubscriptionInfo.
message GetSubscriptionInfoRequest {
}

// The response of GetSubscriptionInfo.
message GetSubscriptionInfoResponse {

	// The subscription the server is joined to and related flags. See [SubscriptionInfo](mfiles:MFiles.SubscriptionInfo).
	SubscriptionInfo subscription_info = 1;
}

// The request of JoinSubscription.
message JoinSubscriptionRequest {

	// The access token from M-Files Manage that authorizes joining.
	string token = 1;

	// The ID of the subscription to join.
	string subscription_id = 2;
}

// The response of JoinSubscription.
message JoinSubscriptionResponse {

	// The subscription information after joining.
	SubscriptionInfo subscription_info = 1;
}

// The request of GetServerUsers.
message GetServerUsersRequest {
}

// The response of GetServerUsers.
message GetServerUsersResponse {

	// The server users, each an account name and its server roles. See [ServerUser](mfiles:MFiles.ServerUser).
	repeated ServerUser serverusers = 1;
}

// The request of UpsertServerUser.
message UpsertServerUserRequest {

	// The account name and its server roles. See [ServerUser](mfiles:MFiles.ServerUser).
	ServerUser serveruser = 1;
}

// The response of UpsertServerUser.
message UpsertServerUserResponse {
}

// The request of RemoveServerUser.
message RemoveServerUserRequest {

	// The `login_name` of the server user to remove.
	string account_name = 1;
}

// The response of RemoveServerUser.
message RemoveServerUserResponse {
}

// The request of ConnectToCloud.
message ConnectToCloudRequest {
}

// The response of ConnectToCloud.
message ConnectToCloudResponse {
}

// A structure that specifies the request type for the SetNotificationSettings method.
message SetNotificationSettingsRequest {

	// Tells if the notifications are enabled.
	bool notifications_enabled = 1;

	// The hour (UTC, 0-23) when the daily digest messages are sent.
	uint32 digest_notification_message_hour_utc = 2;

	// The minute (0-59) when the daily digest messages are sent.
	uint32 digest_notification_message_minute_utc = 3;

	// The SMTP server for delivering notifications. Can be an IP address or a DNS name.
	string smtp_server = 4;

	// Parameters for SMTP connection.
	SMTPConnectionParameters smtp_connection_parameters = 5;

	// User name for SMTP authentication.
	string smtp_auth_username = 6;

	// The SMTP password, encrypted with the server's public key ([GetPublicKey](mfiles:MFiles.IRPCLogin.GetPublicKey)). Append five padding characters to the password before encrypting: the server removes the last five characters after decrypting. Used only when `smtp_password_set` is true.
	string smtp_auth_password_enc = 7;

	// True to set the SMTP password from `smtp_auth_password_enc`.
	bool smtp_password_set = 8;

	// The address of the sender when sending notifications.
	string smtp_mail_from_address = 9;

	// The display name of the sender when sending notifications.
	string smtp_mail_from_display_name = 10;

	// The port the SMTP server is listening.
	uint32 smtp_port = 11;

	// `MAIL_SOURCE_AUTH_TYPE_BASIC` for SMTP or `MAIL_SOURCE_AUTH_TYPE_OAUTH2` for OAuth 2.0 (then set `oauth2_settings`).
	MailSourceAuthType mail_source_auth_type = 12;

	// OAuth2 specific data.
	Oauth2NotificationSettings oauth2_settings = 13;
}

// The response of SetNotificationSettings.
message SetNotificationSettingsResponse {
}

// The request of GetNotificationSettings.
message GetNotificationSettingsRequest {
}

// A structure that specifies the response type for the GetNotificationSettings method.
message GetNotificationSettingsResponse {

	// Tells if the notifications are enabled.
	bool notifications_enabled = 1;

	// The hour (UTC, 0-23) when the daily digest messages are sent.
	uint32 digest_notification_message_hour_utc = 2;

	// The minute (0-59) when the daily digest messages are sent.
	uint32 digest_notification_message_minute_utc = 3;

	// The SMTP server for delivering notifications. Can be an IP address or a DNS name.
	string smtp_server = 4;

	// Parameters for SMTP connection.
	SMTPConnectionParameters smtp_connection_parameters = 5;

	// User name for SMTP authentication.
	string smtp_auth_username = 6;

	// The address of the sender when sending notifications.
	string smtp_mail_from_address = 7;

	// The display name of the sender when sending notifications.
	string smtp_mail_from_display_name = 8;

	// The port the SMTP server is listening.
	uint32 smtp_port = 9;

	// The authentication method to use.
	MailSourceAuthType mail_source_auth_type = 10;

	// OAuth2 specific data.
	Oauth2NotificationSettings oauth2_settings = 11;
}

// A structure that specifies join subscription test request.
message JoinSubscriptionTestRequest {

	// The access token from M-Files Manage that authorizes joining.
	string token = 1;

	// The ID of the subscription to test.
	string subscription_id = 2;
}

// A structure that specifies join subscription test response.
message JoinSubscriptionTestResponse {

	// Array of already attached vaults.
	repeated VaultBasic preventing_vaults = 1;

	// Array of vaults with reserved GUID in another subscription.
	repeated VaultBasic foreign_vaults = 2;
}
