github.com/yoheimuta/protolint@v0.49.8-0.20240515023657-4ecaebb7575d/_example/proto/simple.proto (about)

     1  syntax = "proto3";
     2  // A broken example of the official reference
     3  // See https://developers.google.com/protocol-buffers/docs/reference/proto3-spec#proto_file
     4  package examplePb;
     5  
     6  option java_package = "com.example.foo";
     7  
     8  import 'other.proto';
     9  import public "new.proto";
    10  
    11  import "google/protobuf/empty.proto";
    12  import "google/protobuf/timestamp.proto";
    13  
    14  import "myproject/other_protos.proto";
    15  import "myproject/main_protos.proto";
    16  
    17  enum enumAllowingAlias {
    18      option allow_alias = true;
    19      UNKNOWN = 0;
    20      STARTED = 1;
    21      RUNNING = 2 [(custom_option) = "hello world"];
    22  }
    23  message outer {
    24      option (my_option).a = true;
    25      // inner is an inner message.
    26      message inner {   // Level 2
    27        int64 ival = 1;
    28      }
    29      repeated inner inner_message = 2;
    30      EnumAllowingAlias enum_field =3;
    31      map<int32, string> my_map = 4;
    32    string reason_for_error = 5;
    33    string  end_of_support_version= 6;
    34      message AccountForAdmin {}
    35    message SpecialEndOfSupport {}
    36    required inner inner_message = 7;
    37    group Result = 8 {
    38      string url = 9;
    39    }
    40    repeated group Result = 10 {
    41    }
    42    repeated inner paper = 11;
    43    repeated group Regular = 12 {
    44    }
    45  }
    46  service SearchApi {
    47      rpc search (SearchRequest) returns (SearchResponse) {};
    48      rpc Search (SearchRequest) returns (SearchResponse) {};
    49  };