<commit_before>syntax = "proto3";

package spine.server.model;

import "spine/options.proto";

option (type_url_prefix) = "type.spine.io";
option java_package = "io.spine.server.model";
option java_outer_classname = "MessageHandlerProto";
option java_multiple_files = true;

option (internal_all) = true;

import "google/protobuf/any.proto";

import "spine/base/field_path.proto";

// A message handler identifier.
//
// All the message handlers of an entity must have distinct IDs.
//
message HandlerId {

    HandlerType type = 1 [(valid) = true];

    MessageFilter filter = 2 [(required) = false, (valid) = true];
}

// A message handler type description.
//
message HandlerType {

    string message_type = 1 [(required) = true];

    string origin_type = 2;
}

// A filter to apply to a handled message.
//
message MessageFilter {

    // The path to the field.
    base.FieldPath field = 1 [(valid) = true];
<commit_msg>Document `HandlerId`.<commit_after>syntax = "proto3";

package spine.server.model;

import "spine/options.proto";

option (type_url_prefix) = "type.spine.io";
option java_package = "io.spine.server.model";
option java_outer_classname = "MessageHandlerProto";
option java_multiple_files = true;

option (internal_all) = true;

import "google/protobuf/any.proto";

import "spine/base/field_path.proto";

// A message handler identifier.
//
// All the message handlers of an entity must have distinct IDs.
//
message HandlerId {

    // The information about the handled message type.
    HandlerType type = 1 [(valid) = true];

    // The filter which the handled messages must match.
    MessageFilter filter = 2 [(required) = false, (valid) = true];
}

// A message handler type description.
//
message HandlerType {

    string message_type = 1 [(required) = true];

    string origin_type = 2;
}

// A filter to apply to a handled message.
//
message MessageFilter {

    // The path to the field.
    base.FieldPath field = 1 [(valid) = true];

{'fraction_non_alphanumeric': 0.12107396149949341, 'fraction_numerical': 0.0060790273556231, 'mean_word_length': 3.636150234741784, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7149569', 'n_tokens_mistral': 630, 'n_tokens_neox': 589, 'n_words': 194}