Type
Package: google.protobuf
Protocol Buffers - Google’s data interchange format Copyright 2008 Google Inc. All rights reserved. https://developers.google.com/protocol-buffers/
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Types:
Enums:
- [Syntax](#syntax)
Source File: github.com/solo-io/protoc-gen-ext/external/google/protobuf/type.proto
Type
A protocol buffer message type.
"name": string
"fields": []google.protobuf.Field
"oneofs": []string
"options": []google.protobuf.Option
"sourceContext": .google.protobuf.SourceContext
"syntax": .google.protobuf.Syntax
Field | Type | Description |
---|---|---|
name |
string |
The fully qualified message name. |
fields |
[]google.protobuf.Field | The list of fields. |
oneofs |
[]string |
The list of types appearing in oneof definitions in this type. |
options |
[]google.protobuf.Option | The protocol buffer options. |
sourceContext |
.google.protobuf.SourceContext | The source context. |
syntax |
.google.protobuf.Syntax | The source syntax. |
Field
A single field of a message type.
"kind": .google.protobuf.Field.Kind
"cardinality": .google.protobuf.Field.Cardinality
"number": int
"name": string
"typeUrl": string
"oneofIndex": int
"packed": bool
"options": []google.protobuf.Option
"jsonName": string
"defaultValue": string
Field | Type | Description |
---|---|---|
kind |
.google.protobuf.Field.Kind | The field type. |
cardinality |
.google.protobuf.Field.Cardinality | The field cardinality. |
number |
int |
The field number. |
name |
string |
The field name. |
typeUrl |
string |
The field type URL, without the scheme, for message or enumeration types. Example: "type.googleapis.com/google.protobuf.Timestamp" . |
oneofIndex |
int |
The index of the field type in Type.oneofs , for message or enumeration types. The first type has index 1; zero means the type is not in the list. |
packed |
bool |
Whether to use alternative packed wire representation. |
options |
[]google.protobuf.Option | The protocol buffer options. |
jsonName |
string |
The field JSON name. |
defaultValue |
string |
The string value of the default value of this field. Proto2 syntax only. |
Kind
Basic field types.
Name | Description |
---|---|
TYPE_UNKNOWN |
Field type unknown. |
TYPE_DOUBLE |
Field type double. |
TYPE_FLOAT |
Field type float. |
TYPE_INT64 |
Field type int64. |
TYPE_UINT64 |
Field type uint64. |
TYPE_INT32 |
Field type int32. |
TYPE_FIXED64 |
Field type fixed64. |
TYPE_FIXED32 |
Field type fixed32. |
TYPE_BOOL |
Field type bool. |
TYPE_STRING |
Field type string. |
TYPE_GROUP |
Field type group. Proto2 syntax only, and deprecated. |
TYPE_MESSAGE |
Field type message. |
TYPE_BYTES |
Field type bytes. |
TYPE_UINT32 |
Field type uint32. |
TYPE_ENUM |
Field type enum. |
TYPE_SFIXED32 |
Field type sfixed32. |
TYPE_SFIXED64 |
Field type sfixed64. |
TYPE_SINT32 |
Field type sint32. |
TYPE_SINT64 |
Field type sint64. |
Cardinality
Whether a field is optional, required, or repeated.
Name | Description |
---|---|
CARDINALITY_UNKNOWN |
For fields with unknown cardinality. |
CARDINALITY_OPTIONAL |
For optional fields. |
CARDINALITY_REQUIRED |
For required fields. Proto2 syntax only. |
CARDINALITY_REPEATED |
For repeated fields. |
Enum
Enum type definition.
"name": string
"enumvalue": []google.protobuf.EnumValue
"options": []google.protobuf.Option
"sourceContext": .google.protobuf.SourceContext
"syntax": .google.protobuf.Syntax
Field | Type | Description |
---|---|---|
name |
string |
Enum type name. |
enumvalue |
[]google.protobuf.EnumValue | Enum value definitions. |
options |
[]google.protobuf.Option | Protocol buffer options. |
sourceContext |
.google.protobuf.SourceContext | The source context. |
syntax |
.google.protobuf.Syntax | The source syntax. |
EnumValue
Enum value definition.
"name": string
"number": int
"options": []google.protobuf.Option
Field | Type | Description |
---|---|---|
name |
string |
Enum value name. |
number |
int |
Enum value number. |
options |
[]google.protobuf.Option | Protocol buffer options. |
Option
A protocol buffer option, which can be attached to a message, field, enumeration, etc.
"name": string
"value": .google.protobuf.Any
Field | Type | Description |
---|---|---|
name |
string |
The option’s name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, "map_entry" . For custom options, it should be the fully-qualified name. For example, "google.api.http" . |
value |
.google.protobuf.Any | The option’s value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type. |
Syntax
Description: The syntax in which a protocol buffer element is defined.
Name | Description |
---|---|
SYNTAX_PROTO2 | Syntax proto2 . |
SYNTAX_PROTO3 | Syntax proto3 . |