Sha256: 840f60d2500d0442bdf79f242d212c1f07d7dfcbccfba705154b3a9101b33183

Contents?: true

Size: 1.9 KB

Versions: 12

Compression:

Stored size: 1.9 KB

Contents

syntax = "proto2";

package test;

enum StatusType {
  PENDING = 0;
  ENABLED = 1;
  DISABLED = 2;
  DELETED = 3;
}

message ResourceFindRequest {
  required string name = 1;
  optional bool active = 2;
  repeated string widgets = 3;
  repeated bytes widget_bytes = 4;
}

message ResourceSleepRequest {
  optional int32 sleep = 1;
}

message Resource {
  extensions 100 to max;

  required string name = 1;
  optional int64 date_created = 2;
  optional StatusType status = 3;
  repeated StatusType repeated_enum = 4;
}

message ResourceWithRequiredField {
  required string foo_is_required = 1;
}

message Searchable {
  enum SearchType {
    FLAT = 1;
    NESTED = 2;
  }

  extend test.Resource {
    optional bool ext_is_searchable = 100;
    optional bool ext_is_hidden = 101;
    optional Searchable.SearchType ext_search_type = 102 [default=FLAT];
  }
}

message MessageParent {
  message MessageChild {
    optional string child1 = 1;
  }
}

message Nested {
  extensions 100 to 110;

  optional string name = 1;
  optional Resource resource = 2;
  repeated Resource multiple_resources = 3;
  optional StatusType status = 4;

  message NestedLevelOne {
    extensions 100 to 101;
    optional bool level_one = 1 [default=true];

    extend Resource {
      optional bool ext_nested_in_level_one = 105;
      optional bool ext_dup_field = 106;
    }
  }

  extend NestedLevelOne {
    optional bool ext_nested_level_one = 100;
  }

//  extend Resource {
//    optional bool ext_dup_field = 107;
//  }
}

extend Nested {
  optional string foo = 100;
  optional int64 bar = 101;
}

extend Nested.NestedLevelOne {
  optional bool ext_nested_level_one_outer = 101;
}

service ResourceService {
  rpc Find (ResourceFindRequest) returns (Resource);
  rpc FindWithRpcFailed (ResourceFindRequest) returns (Resource);
  rpc FindWithSleep (ResourceSleepRequest) returns (Resource);
  rpc FindNotImplemented (ResourceFindRequest) returns (Resource);
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
protobuf-3.6.12 spec/support/protos/resource.proto
protobuf-3.6.11 spec/support/protos/resource.proto
protobuf-3.6.10 spec/support/protos/resource.proto
protobuf-3.7.0.pre2 spec/support/protos/resource.proto
protobuf-3.6.9 spec/support/protos/resource.proto
protobuf-3.7.0.pre1 spec/support/protos/resource.proto
protobuf-3.7.0.pre0 spec/support/protos/resource.proto
protobuf-3.6.7 spec/support/protos/resource.proto
protobuf-3.6.6 spec/support/protos/resource.proto
protobuf-3.6.2 spec/support/protos/resource.proto
protobuf-3.6.1 spec/support/protos/resource.proto
protobuf-3.6.0 spec/support/protos/resource.proto