1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 package google.protobuf;
35 import "google/protobuf/any.proto";
36 import "google/protobuf/source_context.proto";
38 option csharp_namespace = "Google.Protobuf.WellKnownTypes";
39 option cc_enable_arenas = true;
40 option java_package = "com.google.protobuf";
41 option java_outer_classname = "TypeProto";
42 option java_multiple_files = true;
43 option objc_class_prefix = "GPB";
44 option go_package = "google.golang.org/genproto/protobuf/ptype;ptype";
46 // A protocol buffer message type.
48 // The fully qualified message name.
50 // The list of fields.
51 repeated Field fields = 2;
52 // The list of types appearing in `oneof` definitions in this type.
53 repeated string oneofs = 3;
54 // The protocol buffer options.
55 repeated Option options = 4;
56 // The source context.
57 SourceContext source_context = 5;
62 // A single field of a message type.
66 // Field type unknown.
78 // Field type fixed64.
80 // Field type fixed32.
86 // Field type group. Proto2 syntax only, and deprecated.
88 // Field type message.
96 // Field type sfixed32.
98 // Field type sfixed64.
100 // Field type sint32.
102 // Field type sint64.
106 // Whether a field is optional, required, or repeated.
108 // For fields with unknown cardinality.
109 CARDINALITY_UNKNOWN = 0;
110 // For optional fields.
111 CARDINALITY_OPTIONAL = 1;
112 // For required fields. Proto2 syntax only.
113 CARDINALITY_REQUIRED = 2;
114 // For repeated fields.
115 CARDINALITY_REPEATED = 3;
120 // The field cardinality.
121 Cardinality cardinality = 2;
126 // The field type URL, without the scheme, for message or enumeration
127 // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
129 // The index of the field type in `Type.oneofs`, for message or enumeration
130 // types. The first type has index 1; zero means the type is not in the list.
131 int32 oneof_index = 7;
132 // Whether to use alternative packed wire representation.
134 // The protocol buffer options.
135 repeated Option options = 9;
136 // The field JSON name.
137 string json_name = 10;
138 // The string value of the default value of this field. Proto2 syntax only.
139 string default_value = 11;
142 // Enum type definition.
146 // Enum value definitions.
147 repeated EnumValue enumvalue = 2;
148 // Protocol buffer options.
149 repeated Option options = 3;
150 // The source context.
151 SourceContext source_context = 4;
152 // The source syntax.
156 // Enum value definition.
160 // Enum value number.
162 // Protocol buffer options.
163 repeated Option options = 3;
166 // A protocol buffer option, which can be attached to a message, field,
169 // The option's name. For protobuf built-in options (options defined in
170 // descriptor.proto), this is the short name. For example, `"map_entry"`.
171 // For custom options, it should be the fully-qualified name. For example,
172 // `"google.api.http"`.
174 // The option's value packed in an Any message. If the value is a primitive,
175 // the corresponding wrapper type defined in google/protobuf/wrappers.proto
176 // should be used. If the value is an enum, it should be stored as an int32
177 // value using the google.protobuf.Int32Value type.
181 // The syntax in which a protocol buffer element is defined.