enum.proto 956 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2018 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. syntax = "proto2";
  5. package goproto.protoc.proto2;
  6. option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/proto2";
  7. // EnumType1 comment.
  8. enum EnumType1 {
  9. // EnumType1_ONE comment.
  10. ONE = 1;
  11. // EnumType1_TWO comment.
  12. TWO = 2;
  13. }
  14. enum EnumType2 {
  15. option allow_alias = true;
  16. duplicate1 = 1;
  17. duplicate2 = 1;
  18. }
  19. message EnumContainerMessage1 {
  20. // NestedEnumType1A comment.
  21. enum NestedEnumType1A {
  22. // NestedEnumType1A_VALUE comment.
  23. NESTED_1A_VALUE = 0;
  24. }
  25. enum NestedEnumType1B {
  26. NESTED_1B_VALUE = 0;
  27. }
  28. message EnumContainerMessage2 {
  29. // NestedEnumType2A comment.
  30. enum NestedEnumType2A {
  31. // NestedEnumType2A_VALUE comment.
  32. NESTED_2A_VALUE = 0;
  33. }
  34. enum NestedEnumType2B {
  35. NESTED_2B_VALUE = 0;
  36. }
  37. }
  38. }