All Downloads are FREE. Search and download functionalities are using the official Maven repository.

yamcs.api.annotations.proto Maven / Gradle / Ivy

There is a newer version: 5.10.9
Show newest version
syntax = "proto2";

package yamcs.api;

import "google/protobuf/descriptor.proto";

option java_multiple_files = true;
option java_outer_classname = "AnnotationsProto";
option java_package = "org.yamcs.api";

extend google.protobuf.ServiceOptions {
  // Short, human-friendly label describing this service.
  // This is a hint to programs that process proto
  // definitions (example: document generation).
  //
  // Example:
  //
  //   service MdbApi {
  //     option (yamcs.api.label) = "MDB";
  //   }
  optional string label = 2048;
}

extend google.protobuf.MethodOptions {
  optional HttpRoute route = 6433;
  optional WebSocketTopic websocket = 6443;
}

extend google.protobuf.FieldOptions {
  repeated FieldBehavior field_behavior = 6533;
}

message HttpRoute {

  oneof pattern {
    // Maps to HTTP GET. Used for listing and getting information about
    // resources.
    string get = 1;

    // Maps to HTTP PUT. Used for replacing a resource.
    string put = 2;

    // Maps to HTTP POST. Used for creating a resource or performing an action.
    string post = 3;

    // Maps to HTTP DELETE. Used for deleting a resource.
    string delete = 4;

    // Maps to HTTP PATCH. Used for updating a resource.
    string patch = 5;
  }
  optional bool deprecated = 6;

  // Name of the field in the request message that maps to the request body
  // The special value "*" indicates that the request message as a whole
  // represents the body (excepting route params).
  optional string body = 7;
  
  optional int32 max_body_size = 8;
  
  // Set true if the execution of the route is expected to take a long time
  // (more than 0.5 seconds). It will be offloaded to a worker thread.
  // Leave false if the route uses its own threading mechanism (most of the
  // routes should do that).
  optional bool offloaded = 9;
  
  // Name of the field in the response message where a user-specified field
  // mask is applied to. If this indicates a repeated field, the field mask
  // is applied to each of those messages.
  // If unspecified, Yamcs will try to derive this itself.
  optional string field_mask_root = 10;

  repeated HttpRoute additional_bindings = 11;

  // Human-friendly log message format.
  optional string log = 12;

  // Optional method label. This is a hint to programs that process
  // proto definitions (example: document generation), intended for
  // when the camel-case method name does not give a good result.
  optional string label = 13;
}

message WebSocketTopic {

  optional string topic = 1;
  optional bool deprecated = 2;
  
  repeated WebSocketTopic additional_bindings = 3;

  // Optional method label. This is a hint to programs that process
  // proto definitions (example: document generation), intended for
  // when the camel-case method name does not give a good result.
  optional string label = 4;
}

enum FieldBehavior {
  // Default. Do not use.
  FIELD_BEHAVIOR_UNSPECIFIED = 0;

  // Marks a field as secret. Services, such as audit logging, may use
  // this as a hint for masking or hiding this field.
  SECRET = 1;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy