<commit_before>package ammo.protocol;

option java_package = "edu.vu.isis.ammo.core.pb";

/**
*  Android device to Gateway protocol.
*  
*  In all cases...
*  
*  data : is not defined by the gateway protocols but by specific application protocols.
*   
*  mime_type : a type specification providing enough information to identify the data 
*              so that the proper readers will be invoked or notified.
*   e.g. application/vnd.ammo.incident
*        application/vnd.tigr.report
*    It is the responsibility of a plug-in to mutate these mime types as needed for other uses.
*    
*  uri : when used serves as a unique identifier for the data being sent.
*    It includes the name of the source type and an optional tuple id.
*    If the tuple id is missing the receiver must force uniqueness itself.
*/

enum MessageScope {
  GLOBAL = 0;
  LOCAL = 1;
}

/**
* When data is to be sent to the Gateway for distribution.
* 
* uri : is a unique identifier of the primary source of the data.
* scope : the scope of this message (used to determine how many gateways
*         to send this message to in a multiple-gateway configuration).
*/
message DataMessage {
  required string uri = 1;
  optional string mime_type = 3;
  optional bytes data = 2;
  optional MessageScope scope = 4 [default = GLOBAL];
}

message TerseMessage {
  optional byte mime_type = 1;
  optional bytes data = 2;
}
<commit_msg>changed byte to int in AmmoMessages.proto, proto does not have a byte type<commit_after>package ammo.protocol;

option java_package = "edu.vu.isis.ammo.core.pb";

/**
*  Android device to Gateway protocol.
*  
*  In all cases...
*  
*  data : is not defined by the gateway protocols but by specific application protocols.
*   
*  mime_type : a type specification providing enough information to identify the data 
*              so that the proper readers will be invoked or notified.
*   e.g. application/vnd.ammo.incident
*        application/vnd.tigr.report
*    It is the responsibility of a plug-in to mutate these mime types as needed for other uses.
*    
*  uri : when used serves as a unique identifier for the data being sent.
*    It includes the name of the source type and an optional tuple id.
*    If the tuple id is missing the receiver must force uniqueness itself.
*/

enum MessageScope {
  GLOBAL = 0;
  LOCAL = 1;
}

/**
* When data is to be sent to the Gateway for distribution.
* 
* uri : is a unique identifier of the primary source of the data.
* scope : the scope of this message (used to determine how many gateways
*         to send this message to in a multiple-gateway configuration).
*/
message DataMessage {
  required string uri = 1;
  optional string mime_type = 3;
  optional bytes data = 2;
  optional MessageScope scope = 4 [default = GLOBAL];
}

message TerseMessage {
  optional int32 mime_type = 1;	/* protobuf does not have byte, but small encoding is compact regardless of type */
  optional bytes data = 2;
}

{'fraction_non_alphanumeric': 0.06935047361299053, 'fraction_numerical': 0.006089309878213802, 'mean_word_length': 3.14726507713885, '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': '1332703', 'n_tokens_mistral': 862, 'n_tokens_neox': 821, 'n_words': 395}