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

// Receives the progress and status data points that the M-Files indexing service reports about
// each index of the vault.
//
// This interface provides access for providing datapoints for the monitoring purposes.
//
// **For M-Files components only.** The M-Files indexing service (the indexer process that M-Files
// Server runs for the vault's search indexes) pushes data points here while it indexes.
// Applications should not call it.
//
// - **Caller and authentication:** the indexer logs in to the vault with Windows authentication as
//   an internal process of M-Files Server, under the server's own service account, and so has the
//   system administrator server role.
// - **Rights:** every method requires a vault session whose login has the system administrator
//   server role (server right `log_in_to_any_vault`) and the vault rights
//   `change_metadata_structure`, `see_all_objects` and `license_allows_modifications`. A vault
//   administrator without the server role is denied.
// - **Data:** the server stores the data points in the vault per index (`source`) and uses them for
//   the indexing indicators that
//   [GetIndicators](mfiles:MFiles.IRPCMonitoringStatus.GetIndicators) reports.
//   Read indexing status through [IRPCMonitoringStatus](mfiles:MFiles.IRPCMonitoringStatus).
// - **Order of calls:** [PushDatapointsForIndexingCommon](mfiles:MFiles.IRPCMonitoringDatapointsSink.PushDatapointsForIndexingCommon)
//   for index-level data, then for each indexing batch
//   [PushDatapointsForIndexingBegin](mfiles:MFiles.IRPCMonitoringDatapointsSink.PushDatapointsForIndexingBegin)
//   and [PushDatapointsForIndexingEnd](mfiles:MFiles.IRPCMonitoringDatapointsSink.PushDatapointsForIndexingEnd).
//   [ClearDatapointsForIndexing](mfiles:MFiles.IRPCMonitoringDatapointsSink.ClearDatapointsForIndexing)
//   removes the stored data points of an index.
service IRPCMonitoringDatapointsSink {
	option (mfiles.api.service) = { book: "integration" level: LEVEL_SPECIALIZED title: "Monitoring data points" };

	// Deletes the stored indexing data points of one index.
	//
	// **For M-Files components only.** The M-Files indexing service calls it. Applications should not
	// call it.
	// - Deletes the stored data points of the index.
	// - Requires the system administrator server role (server right `log_in_to_any_vault`) and the
	//   vault rights `change_metadata_structure`, `see_all_objects` and `license_allows_modifications`.
	rpc ClearDatapointsForIndexing( ClearDatapointsForIndexingRequest ) returns ( ClearDatapointsForIndexingResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION internal: true };
	}

	// Stores index-level data points of one index: data format capabilities, index size and the times
	// of the last rebuild.
	//
	// **For M-Files components only.** The M-Files indexing service calls it. Applications should not
	// call it.
	// - Requires the system administrator server role (server right `log_in_to_any_vault`) and the
	//   vault rights `change_metadata_structure`, `see_all_objects` and `license_allows_modifications`.
	rpc PushDatapointsForIndexingCommon( PushDatapointsForIndexingCommonRequest ) returns ( PushDatapointsForIndexingCommonResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION internal: true };
	}

	// Stores the data points of the start of an indexing batch: the indexing mode, the start position
	// and the number of items to process.
	//
	// **For M-Files components only.** The M-Files indexing service calls it. Applications should not
	// call it.
	// - Requires the system administrator server role (server right `log_in_to_any_vault`) and the
	//   vault rights `change_metadata_structure`, `see_all_objects` and `license_allows_modifications`.
	rpc PushDatapointsForIndexingBegin( PushDatapointsForIndexingBeginRequest ) returns ( PushDatapointsForIndexingBeginResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION internal: true };
	}

	// Stores the data points of the end of an indexing batch: timing, item counts and failures.
	//
	// **For M-Files components only.** The M-Files indexing service calls it. Applications should not
	// call it.
	// - Requires the system administrator server role (server right `log_in_to_any_vault`) and the
	//   vault rights `change_metadata_structure`, `see_all_objects` and `license_allows_modifications`.
	rpc PushDatapointsForIndexingEnd( PushDatapointsForIndexingEndRequest ) returns ( PushDatapointsForIndexingEndResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION internal: true };
	}
}

// The request of ClearDatapointsForIndexing.
message ClearDatapointsForIndexingRequest {

	// The monitoring data source.
	MonitoringSourceForIndexing source = 1;
}

// The response of ClearDatapointsForIndexing.
message ClearDatapointsForIndexingResponse {
}

// The request of PushDatapointsForIndexingCommon.
message PushDatapointsForIndexingCommonRequest {

	// The monitoring data source.
	MonitoringSourceForIndexing source = 1;

	// The monitoring datapoints.
	MonitoringDatapointsForIndexingCommon datapoints = 2;
}

// The response of PushDatapointsForIndexingCommon.
message PushDatapointsForIndexingCommonResponse {
}

// The request of PushDatapointsForIndexingBegin.
message PushDatapointsForIndexingBeginRequest {

	// The monitoring data source.
	MonitoringSourceForIndexing source = 1;

	// The monitoring datapoints.
	MonitoringDatapointsForIndexingBegin datapoints = 2;
}

// The response of PushDatapointsForIndexingBegin.
message PushDatapointsForIndexingBeginResponse {
}

// The request of PushDatapointsForIndexingEnd.
message PushDatapointsForIndexingEndRequest {

	// The monitoring data source.
	MonitoringSourceForIndexing source = 1;

	// The monitoring datapoints.
	MonitoringDatapointsForIndexingEnd datapoints = 2;
}

// The response of PushDatapointsForIndexingEnd.
message PushDatapointsForIndexingEndResponse {
}
