github.com/grpc-ecosystem/grpc-gateway/v2@v2.19.1/runtime/internal/examplepb/example.proto (about) 1 syntax = "proto3"; 2 3 package grpc.gateway.runtime.internal.examplepb; 4 5 import "google/protobuf/any.proto"; 6 import "google/protobuf/empty.proto"; 7 import "google/protobuf/field_mask.proto"; 8 import "google/protobuf/timestamp.proto"; 9 10 option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/runtime/internal/examplepb"; 11 12 // SimpleMessage represents a simple message sent to the Echo service. 13 message SimpleMessage { 14 string id = 1; 15 } 16 17 message ABitOfEverything { 18 // Nested is nested type. 19 message Nested { 20 // name is nested field. 21 string name = 1; 22 uint32 amount = 2; 23 // DeepEnum is one or zero. 24 enum DeepEnum { 25 // FALSE is false. 26 FALSE = 0; 27 // TRUE is true. 28 TRUE = 1; 29 } 30 // DeepEnum comment. 31 DeepEnum ok = 3; 32 } 33 Nested single_nested = 25; 34 string uuid = 1; 35 repeated Nested nested = 2; 36 float float_value = 3; 37 double double_value = 4; 38 int64 int64_value = 5; 39 uint64 uint64_value = 6; 40 int32 int32_value = 7; 41 fixed64 fixed64_value = 8; 42 fixed32 fixed32_value = 9; 43 bool bool_value = 10; 44 string string_value = 11; 45 bytes bytes_value = 29; 46 uint32 uint32_value = 13; 47 NumericEnum enum_value = 14; 48 sfixed32 sfixed32_value = 15; 49 sfixed64 sfixed64_value = 16; 50 sint32 sint32_value = 17; 51 sint64 sint64_value = 18; 52 repeated string repeated_string_value = 19; 53 oneof oneof_value { 54 google.protobuf.Empty oneof_empty = 20; 55 string oneof_string = 21; 56 } 57 map<string, NumericEnum> map_value = 22; 58 map<string, string> mapped_string_value = 23; 59 map<string, Nested> mapped_nested_value = 24; 60 string nonConventionalNameValue = 26; 61 google.protobuf.Timestamp timestamp_value = 27; 62 // repeated enum value. it is comma-separated in query 63 repeated NumericEnum repeated_enum_value = 28; 64 // repeated numeric enum comment (This comment is overridden by the field 65 // annotation) 66 repeated NumericEnum repeated_enum_annotation = 32; 67 // numeric enum comment (This comment is overridden by the field annotation) 68 NumericEnum enum_value_annotation = 33; 69 // repeated string comment (This comment is overridden by the field 70 // annotation) 71 repeated string repeated_string_annotation = 34; 72 // repeated nested object comment (This comment is overridden by the field 73 // annotation) 74 repeated Nested repeated_nested_annotation = 35; 75 // nested object comments (This comment is overridden by the field annotation) 76 Nested nested_annotation = 36; 77 int64 int64_override_type = 37; 78 google.protobuf.Any anytype = 38; 79 repeated google.protobuf.Any repeated_anytype = 39; 80 } 81 82 // NumericEnum is one or zero. 83 enum NumericEnum { 84 // ZERO means 0 85 ZERO = 0; 86 // ONE means 1 87 ONE = 1; 88 } 89 90 message ResponseBodyOut { 91 message Response { 92 string data = 1; 93 } 94 Response response = 2; 95 } 96 97 message RepeatedResponseBodyOut { 98 message Response { 99 string data = 1; 100 enum ResponseType { 101 // UNKNOWN 102 UNKNOWN = 0; 103 // A is 1 104 A = 1; 105 // B is 2 106 B = 2; 107 } 108 ResponseType type = 3; 109 } 110 repeated Response response = 2; 111 } 112 113 message UpdateMessage { 114 google.protobuf.FieldMask update_mask = 1; 115 ABitOfEverything a_bit_of_everything = 2; 116 } 117 118 message NestedOuter { 119 NestedOne one = 1; 120 } 121 122 message NestedOne { 123 NestedTwo two = 1; 124 } 125 126 message NestedTwo { 127 NestedThree three = 1; 128 } 129 130 message NestedThree { 131 bool a = 1; 132 bool b = 2; 133 } 134 135 message UpdateNestedRequest { 136 NestedOuter nested = 1; 137 google.protobuf.FieldMask update_mask = 2; 138 }