• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Protocol Buffers - Google's data interchange format
2// Copyright 2008 Google Inc.  All rights reserved.
3//
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file or at
6// https://developers.google.com/open-source/licenses/bsd
7
8syntax = "proto3";
9
10package google.protobuf.python.internal;
11
12message TestProto3Optional {
13  message NestedMessage {
14    // The field name "b" fails to compile in proto1 because it conflicts with
15    // a local variable named "b" in one of the generated methods.  Doh.
16    // This file needs to compile in proto1 to test backwards-compatibility.
17    optional int32 bb = 1;
18  }
19
20  enum NestedEnum {
21    UNSPECIFIED = 0;
22    FOO = 1;
23    BAR = 2;
24    BAZ = 3;
25    NEG = -1;  // Intentionally negative.
26  }
27
28  // Singular
29  optional int32 optional_int32 = 1;
30  optional int64 optional_int64 = 2;
31  optional uint32 optional_uint32 = 3;
32  optional uint64 optional_uint64 = 4;
33  optional sint32 optional_sint32 = 5;
34  optional sint64 optional_sint64 = 6;
35  optional fixed32 optional_fixed32 = 7;
36  optional fixed64 optional_fixed64 = 8;
37  optional sfixed32 optional_sfixed32 = 9;
38  optional sfixed64 optional_sfixed64 = 10;
39  optional float optional_float = 11;
40  optional double optional_double = 12;
41  optional bool optional_bool = 13;
42  optional string optional_string = 14;
43  optional bytes optional_bytes = 15;
44
45  optional NestedMessage optional_nested_message = 18;
46  optional NestedEnum optional_nested_enum = 21;
47
48  repeated int32 repeated_int32 = 22;
49  repeated NestedMessage repeated_nested_message = 23;
50}
51