github.com/gogo/protobuf@v1.3.2/test/combos/marshaler/thetest.proto (about) 1 // Protocol Buffers for Go with Gadgets 2 // 3 // Copyright (c) 2013, The GoGo Authors. All rights reserved. 4 // http://github.com/gogo/protobuf 5 // 6 // Redistribution and use in source and binary forms, with or without 7 // modification, are permitted provided that the following conditions are 8 // met: 9 // 10 // * Redistributions of source code must retain the above copyright 11 // notice, this list of conditions and the following disclaimer. 12 // * Redistributions in binary form must reproduce the above 13 // copyright notice, this list of conditions and the following disclaimer 14 // in the documentation and/or other materials provided with the 15 // distribution. 16 // 17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 29 syntax = "proto2"; 30 package test; 31 32 import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 33 34 option (gogoproto.goproto_stringer_all) = false; 35 option (gogoproto.goproto_enum_prefix_all) = false; 36 option (gogoproto.goproto_getters_all) = false; 37 38 option (gogoproto.equal_all) = true; 39 option (gogoproto.verbose_equal_all) = true; 40 option (gogoproto.stringer_all) = true; 41 option (gogoproto.gostring_all) = true; 42 option (gogoproto.face_all) = true; 43 option (gogoproto.description_all) = true; 44 45 option (gogoproto.testgen_all) = true; 46 option (gogoproto.populate_all) = true; 47 option (gogoproto.benchgen_all) = true; 48 option (gogoproto.unmarshaler_all) = false; 49 option (gogoproto.marshaler_all) = true; 50 option (gogoproto.sizer_all) = true; 51 option (gogoproto.protosizer_all) = false; 52 53 option (gogoproto.goproto_enum_stringer_all) = false; 54 option (gogoproto.enum_stringer_all) = true; 55 56 option (gogoproto.unsafe_marshaler_all) = false; 57 option (gogoproto.unsafe_unmarshaler_all) = false; 58 59 option (gogoproto.compare_all) = true; 60 61 message NidOptNative { 62 optional double Field1 = 1 [(gogoproto.nullable) = false]; 63 optional float Field2 = 2 [(gogoproto.nullable) = false]; 64 optional int32 Field3 = 3 [(gogoproto.nullable) = false]; 65 optional int64 Field4 = 4 [(gogoproto.nullable) = false]; 66 optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; 67 optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; 68 optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; 69 optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; 70 optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; 71 optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; 72 optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; 73 optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; 74 optional bool Field13 = 13 [(gogoproto.nullable) = false]; 75 optional string Field14 = 14 [(gogoproto.nullable) = false]; 76 optional bytes Field15 = 15 [(gogoproto.nullable) = false]; 77 } 78 79 message NinOptNative { 80 optional double Field1 = 1; 81 optional float Field2 = 2; 82 optional int32 Field3 = 3; 83 optional int64 Field4 = 4; 84 optional uint32 Field5 = 5; 85 optional uint64 Field6 = 6; 86 optional sint32 Field7 = 7; 87 optional sint64 Field8 = 8; 88 optional fixed32 Field9 = 9; 89 optional sfixed32 Field10 = 10; 90 optional fixed64 Field11 = 11; 91 optional sfixed64 Field12 = 12; 92 optional bool Field13 = 13; 93 optional string Field14 = 14; 94 optional bytes Field15 = 15; 95 } 96 97 message NidRepNative { 98 repeated double Field1 = 1 [(gogoproto.nullable) = false]; 99 repeated float Field2 = 2 [(gogoproto.nullable) = false]; 100 repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; 101 repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; 102 repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; 103 repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; 104 repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; 105 repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; 106 repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; 107 repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; 108 repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; 109 repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; 110 repeated bool Field13 = 13 [(gogoproto.nullable) = false]; 111 repeated string Field14 = 14 [(gogoproto.nullable) = false]; 112 repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; 113 } 114 115 message NinRepNative { 116 repeated double Field1 = 1; 117 repeated float Field2 = 2; 118 repeated int32 Field3 = 3; 119 repeated int64 Field4 = 4; 120 repeated uint32 Field5 = 5; 121 repeated uint64 Field6 = 6; 122 repeated sint32 Field7 = 7; 123 repeated sint64 Field8 = 8; 124 repeated fixed32 Field9 = 9; 125 repeated sfixed32 Field10 = 10; 126 repeated fixed64 Field11 = 11; 127 repeated sfixed64 Field12 = 12; 128 repeated bool Field13 = 13; 129 repeated string Field14 = 14; 130 repeated bytes Field15 = 15; 131 } 132 133 message NidRepPackedNative { 134 repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; 135 repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; 136 repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; 137 repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; 138 repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; 139 repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; 140 repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; 141 repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; 142 repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; 143 repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; 144 repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; 145 repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; 146 repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; 147 } 148 149 message NinRepPackedNative { 150 repeated double Field1 = 1 [packed = true]; 151 repeated float Field2 = 2 [packed = true]; 152 repeated int32 Field3 = 3 [packed = true]; 153 repeated int64 Field4 = 4 [packed = true]; 154 repeated uint32 Field5 = 5 [packed = true]; 155 repeated uint64 Field6 = 6 [packed = true]; 156 repeated sint32 Field7 = 7 [packed = true]; 157 repeated sint64 Field8 = 8 [packed = true]; 158 repeated fixed32 Field9 = 9 [packed = true]; 159 repeated sfixed32 Field10 = 10 [packed = true]; 160 repeated fixed64 Field11 = 11 [packed = true]; 161 repeated sfixed64 Field12 = 12 [packed = true]; 162 repeated bool Field13 = 13 [packed = true]; 163 } 164 165 message NidOptStruct { 166 optional double Field1 = 1 [(gogoproto.nullable) = false]; 167 optional float Field2 = 2 [(gogoproto.nullable) = false]; 168 optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; 169 optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; 170 optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; 171 optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; 172 optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; 173 optional bool Field13 = 13 [(gogoproto.nullable) = false]; 174 optional string Field14 = 14 [(gogoproto.nullable) = false]; 175 optional bytes Field15 = 15 [(gogoproto.nullable) = false]; 176 } 177 178 message NinOptStruct { 179 optional double Field1 = 1; 180 optional float Field2 = 2; 181 optional NidOptNative Field3 = 3; 182 optional NinOptNative Field4 = 4; 183 optional uint64 Field6 = 6; 184 optional sint32 Field7 = 7; 185 optional NidOptNative Field8 = 8; 186 optional bool Field13 = 13; 187 optional string Field14 = 14; 188 optional bytes Field15 = 15; 189 } 190 191 message NidRepStruct { 192 repeated double Field1 = 1 [(gogoproto.nullable) = false]; 193 repeated float Field2 = 2 [(gogoproto.nullable) = false]; 194 repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; 195 repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; 196 repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; 197 repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; 198 repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; 199 repeated bool Field13 = 13 [(gogoproto.nullable) = false]; 200 repeated string Field14 = 14 [(gogoproto.nullable) = false]; 201 repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; 202 } 203 204 message NinRepStruct { 205 repeated double Field1 = 1; 206 repeated float Field2 = 2; 207 repeated NidOptNative Field3 = 3; 208 repeated NinOptNative Field4 = 4; 209 repeated uint64 Field6 = 6; 210 repeated sint32 Field7 = 7; 211 repeated NidOptNative Field8 = 8; 212 repeated bool Field13 = 13; 213 repeated string Field14 = 14; 214 repeated bytes Field15 = 15; 215 } 216 217 message NidEmbeddedStruct { 218 optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; 219 optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; 220 optional bool Field210 = 210 [(gogoproto.nullable) = false]; 221 } 222 223 message NinEmbeddedStruct { 224 optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; 225 optional NidOptNative Field200 = 200; 226 optional bool Field210 = 210; 227 } 228 229 message NidNestedStruct { 230 optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; 231 repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; 232 } 233 234 message NinNestedStruct { 235 optional NinOptStruct Field1 = 1; 236 repeated NinRepStruct Field2 = 2; 237 } 238 239 message NidOptCustom { 240 optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; 241 optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; 242 } 243 244 message CustomDash { 245 optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; 246 } 247 248 message NinOptCustom { 249 optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; 250 optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; 251 } 252 253 message NidRepCustom { 254 repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; 255 repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; 256 } 257 258 message NinRepCustom { 259 repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; 260 repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; 261 } 262 263 message NinOptNativeUnion { 264 option (gogoproto.onlyone) = true; 265 optional double Field1 = 1; 266 optional float Field2 = 2; 267 optional int32 Field3 = 3; 268 optional int64 Field4 = 4; 269 optional uint32 Field5 = 5; 270 optional uint64 Field6 = 6; 271 optional bool Field13 = 13; 272 optional string Field14 = 14; 273 optional bytes Field15 = 15; 274 } 275 276 message NinOptStructUnion { 277 option (gogoproto.onlyone) = true; 278 optional double Field1 = 1; 279 optional float Field2 = 2; 280 optional NidOptNative Field3 = 3; 281 optional NinOptNative Field4 = 4; 282 optional uint64 Field6 = 6; 283 optional sint32 Field7 = 7; 284 optional bool Field13 = 13; 285 optional string Field14 = 14; 286 optional bytes Field15 = 15; 287 } 288 289 message NinEmbeddedStructUnion { 290 option (gogoproto.onlyone) = true; 291 optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; 292 optional NinOptNative Field200 = 200; 293 optional bool Field210 = 210; 294 } 295 296 message NinNestedStructUnion { 297 option (gogoproto.onlyone) = true; 298 optional NinOptNativeUnion Field1 = 1; 299 optional NinOptStructUnion Field2 = 2; 300 optional NinEmbeddedStructUnion Field3 = 3; 301 } 302 303 message Tree { 304 option (gogoproto.onlyone) = true; 305 optional OrBranch Or = 1; 306 optional AndBranch And = 2; 307 optional Leaf Leaf = 3; 308 } 309 310 message OrBranch { 311 optional Tree Left = 1 [(gogoproto.nullable) = false]; 312 optional Tree Right = 2 [(gogoproto.nullable) = false]; 313 } 314 315 message AndBranch { 316 optional Tree Left = 1 [(gogoproto.nullable) = false]; 317 optional Tree Right = 2 [(gogoproto.nullable) = false]; 318 } 319 320 message Leaf { 321 optional int64 Value = 1 [(gogoproto.nullable) = false]; 322 optional string StrValue = 2 [(gogoproto.nullable) = false]; 323 } 324 325 message DeepTree { 326 option (gogoproto.onlyone) = true; 327 optional ADeepBranch Down = 1; 328 optional AndDeepBranch And = 2; 329 optional DeepLeaf Leaf = 3; 330 } 331 332 message ADeepBranch { 333 optional DeepTree Down = 2 [(gogoproto.nullable) = false]; 334 } 335 336 message AndDeepBranch { 337 optional DeepTree Left = 1 [(gogoproto.nullable) = false]; 338 optional DeepTree Right = 2 [(gogoproto.nullable) = false]; 339 } 340 341 message DeepLeaf { 342 optional Tree Tree = 1 [(gogoproto.nullable) = false]; 343 } 344 345 message Nil { 346 347 } 348 349 enum TheTestEnum { 350 A = 0; 351 B = 1; 352 C = 2; 353 } 354 355 enum AnotherTestEnum { 356 option (gogoproto.goproto_enum_prefix) = false; 357 D = 10; 358 E = 11; 359 } 360 361 // YetAnotherTestEnum is used to test cross-package import of custom name 362 // fields and default resolution. 363 enum YetAnotherTestEnum { 364 option (gogoproto.goproto_enum_prefix) = false; 365 AA = 0; 366 BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; 367 } 368 369 // YetAnotherTestEnum is used to test cross-package import of custom name 370 // fields and default resolution. 371 enum YetYetAnotherTestEnum { 372 option (gogoproto.goproto_enum_prefix) = true; 373 CC = 0; 374 DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; 375 } 376 377 message NidOptEnum { 378 optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; 379 } 380 381 message NinOptEnum { 382 optional TheTestEnum Field1 = 1; 383 optional YetAnotherTestEnum Field2 = 2; 384 optional YetYetAnotherTestEnum Field3 = 3; 385 } 386 387 message NidRepEnum { 388 repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; 389 repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; 390 repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; 391 } 392 393 message NinRepEnum { 394 repeated TheTestEnum Field1 = 1; 395 repeated YetAnotherTestEnum Field2 = 2; 396 repeated YetYetAnotherTestEnum Field3 = 3; 397 } 398 399 message NinOptEnumDefault { 400 option (gogoproto.goproto_getters) = true; 401 option (gogoproto.face) = false; 402 optional TheTestEnum Field1 = 1 [default=C]; 403 optional YetAnotherTestEnum Field2 = 2 [default=BB]; 404 optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; 405 } 406 407 message AnotherNinOptEnum { 408 optional AnotherTestEnum Field1 = 1; 409 optional YetAnotherTestEnum Field2 = 2; 410 optional YetYetAnotherTestEnum Field3 = 3; 411 } 412 413 message AnotherNinOptEnumDefault { 414 option (gogoproto.goproto_getters) = true; 415 option (gogoproto.face) = false; 416 optional AnotherTestEnum Field1 = 1 [default=E]; 417 optional YetAnotherTestEnum Field2 = 2 [default=BB]; 418 optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; 419 } 420 421 422 message Timer { 423 optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; 424 optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; 425 optional bytes Data = 3 [(gogoproto.nullable) = false]; 426 } 427 428 message MyExtendable { 429 option (gogoproto.face) = false; 430 optional int64 Field1 = 1; 431 extensions 100 to 199; 432 } 433 434 extend MyExtendable { 435 optional double FieldA = 100; 436 optional NinOptNative FieldB = 101; 437 optional NinEmbeddedStruct FieldC = 102; 438 repeated int64 FieldD = 104; 439 repeated NinOptNative FieldE = 105; 440 } 441 442 message OtherExtenable { 443 option (gogoproto.face) = false; 444 optional int64 Field2 = 2; 445 extensions 14 to 16; 446 optional int64 Field13 = 13; 447 extensions 10 to 12; 448 optional MyExtendable M = 1; 449 } 450 451 message NestedDefinition { 452 optional int64 Field1 = 1; 453 message NestedMessage { 454 optional fixed64 NestedField1 = 1; 455 optional NestedNestedMsg NNM = 2; 456 message NestedNestedMsg { 457 optional string NestedNestedField1 = 10; 458 } 459 } 460 enum NestedEnum { 461 TYPE_NESTED = 1; 462 } 463 optional NestedEnum EnumField = 2; 464 optional NestedMessage.NestedNestedMsg NNM = 3; 465 optional NestedMessage NM = 4; 466 } 467 468 message NestedScope { 469 optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; 470 optional NestedDefinition.NestedEnum B = 2; 471 optional NestedDefinition.NestedMessage C = 3; 472 } 473 474 message NinOptNativeDefault { 475 option (gogoproto.goproto_getters) = true; 476 option (gogoproto.face) = false; 477 optional double Field1 = 1 [default = 1234.1234]; 478 optional float Field2 = 2 [default = 1234.1234]; 479 optional int32 Field3 = 3 [default = 1234]; 480 optional int64 Field4 = 4 [default = 1234]; 481 optional uint32 Field5 = 5 [default = 1234]; 482 optional uint64 Field6 = 6 [default = 1234]; 483 optional sint32 Field7 = 7 [default = 1234]; 484 optional sint64 Field8 = 8 [default = 1234]; 485 optional fixed32 Field9 = 9 [default = 1234]; 486 optional sfixed32 Field10 = 10 [default = 1234]; 487 optional fixed64 Field11 = 11 [default = 1234]; 488 optional sfixed64 Field12 = 12 [default = 1234]; 489 optional bool Field13 = 13 [default = true]; 490 optional string Field14 = 14 [default = "1234"]; 491 optional bytes Field15 = 15; 492 } 493 494 message CustomContainer { 495 optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; 496 } 497 498 message CustomNameNidOptNative { 499 optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; 500 optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; 501 optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; 502 optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; 503 optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; 504 optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; 505 optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; 506 optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; 507 optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; 508 optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; 509 optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; 510 optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; 511 optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; 512 optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; 513 optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; 514 } 515 516 message CustomNameNinOptNative { 517 optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; 518 optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; 519 optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; 520 optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; 521 optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; 522 optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; 523 optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; 524 optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; 525 optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; 526 optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; 527 optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; 528 optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; 529 optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; 530 optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; 531 optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; 532 } 533 534 message CustomNameNinRepNative { 535 repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; 536 repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; 537 repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; 538 repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; 539 repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; 540 repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; 541 repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; 542 repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; 543 repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; 544 repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; 545 repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; 546 repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; 547 repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; 548 repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; 549 repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; 550 } 551 552 message CustomNameNinStruct { 553 optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; 554 optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; 555 optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; 556 repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; 557 optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; 558 optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; 559 optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; 560 optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; 561 optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; 562 optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; 563 } 564 565 message CustomNameCustomType { 566 optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; 567 optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; 568 repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; 569 repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; 570 } 571 572 message CustomNameNinEmbeddedStructUnion { 573 option (gogoproto.onlyone) = true; 574 optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; 575 optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; 576 optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; 577 } 578 579 message CustomNameEnum { 580 optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; 581 repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; 582 } 583 584 message NoExtensionsMap { 585 option (gogoproto.face) = false; 586 option (gogoproto.goproto_extensions_map) = false; 587 optional int64 Field1 = 1; 588 extensions 100 to 199; 589 } 590 591 extend NoExtensionsMap { 592 optional double FieldA1 = 100; 593 optional NinOptNative FieldB1 = 101; 594 optional NinEmbeddedStruct FieldC1 = 102; 595 } 596 597 message Unrecognized { 598 option (gogoproto.goproto_unrecognized) = false; 599 optional string Field1 = 1; 600 } 601 602 message UnrecognizedWithInner { 603 message Inner { 604 option (gogoproto.goproto_unrecognized) = false; 605 optional uint32 Field1 = 1; 606 } 607 608 repeated Inner embedded = 1; 609 optional string Field2 = 2; 610 } 611 612 message UnrecognizedWithEmbed { 613 message Embedded { 614 option (gogoproto.goproto_unrecognized) = false; 615 optional uint32 Field1 = 1; 616 } 617 618 optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; 619 optional string Field2 = 2; 620 } 621 622 message Node { 623 optional string Label = 1; 624 repeated Node Children = 2; 625 } 626 627 message NonByteCustomType { 628 optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; 629 } 630 631 message NidOptNonByteCustomType { 632 optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; 633 } 634 635 message NinOptNonByteCustomType { 636 optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; 637 } 638 639 message NidRepNonByteCustomType { 640 repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; 641 } 642 643 message NinRepNonByteCustomType { 644 repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; 645 } 646 647 message ProtoType { 648 optional string Field2 = 1; 649 }