packages feed

proto-lens-protobuf-types 0.7.1.3 → 0.7.2.0

raw patch · 6 files changed

+717/−6 lines, 6 files

Files

Changelog.md view
@@ -1,5 +1,8 @@ # Changelog for `proto-lens-protobuf-types` +## v0.7.2.0+- Add support for additional well known types+ ## v0.7.1.2 - Add protobuf struct types (#438) 
proto-lens-protobuf-types.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           proto-lens-protobuf-types-version:        0.7.1.3+version:        0.7.2.0 synopsis:       Basic protocol buffer message types. description:    This package provides bindings standard protocol message types, for use with the proto-lens library. category:       Data@@ -20,13 +20,17 @@ extra-source-files:     Changelog.md     proto-src/google/protobuf/any.proto+    proto-src/google/protobuf/api.proto     proto-src/google/protobuf/compiler/plugin.proto     proto-src/google/protobuf/descriptor.proto     proto-src/google/protobuf/duration.proto     proto-src/google/protobuf/empty.proto-    proto-src/google/protobuf/wrappers.proto+    proto-src/google/protobuf/field_mask.proto+    proto-src/google/protobuf/source_context.proto     proto-src/google/protobuf/struct.proto     proto-src/google/protobuf/timestamp.proto+    proto-src/google/protobuf/type.proto+    proto-src/google/protobuf/wrappers.proto  source-repository head   type: git@@ -45,6 +49,8 @@       Data.ProtoLens.Descriptor       Proto.Google.Protobuf.Any       Proto.Google.Protobuf.Any_Fields+      Proto.Google.Protobuf.Api+      Proto.Google.Protobuf.Api_Fields       Proto.Google.Protobuf.Compiler.Plugin       Proto.Google.Protobuf.Compiler.Plugin_Fields       Proto.Google.Protobuf.Descriptor@@ -53,15 +59,23 @@       Proto.Google.Protobuf.Duration_Fields       Proto.Google.Protobuf.Empty       Proto.Google.Protobuf.Empty_Fields-      Proto.Google.Protobuf.Wrappers-      Proto.Google.Protobuf.Wrappers_Fields+      Proto.Google.Protobuf.FieldMask+      Proto.Google.Protobuf.FieldMask_Fields+      Proto.Google.Protobuf.SourceContext+      Proto.Google.Protobuf.SourceContext_Fields       Proto.Google.Protobuf.Struct       Proto.Google.Protobuf.Struct_Fields       Proto.Google.Protobuf.Timestamp       Proto.Google.Protobuf.Timestamp_Fields+      Proto.Google.Protobuf.Type+      Proto.Google.Protobuf.Type_Fields+      Proto.Google.Protobuf.Wrappers+      Proto.Google.Protobuf.Wrappers_Fields   autogen-modules:       Proto.Google.Protobuf.Any       Proto.Google.Protobuf.Any_Fields+      Proto.Google.Protobuf.Api+      Proto.Google.Protobuf.Api_Fields       Proto.Google.Protobuf.Compiler.Plugin       Proto.Google.Protobuf.Compiler.Plugin_Fields       Proto.Google.Protobuf.Descriptor@@ -70,12 +84,18 @@       Proto.Google.Protobuf.Duration_Fields       Proto.Google.Protobuf.Empty       Proto.Google.Protobuf.Empty_Fields-      Proto.Google.Protobuf.Wrappers-      Proto.Google.Protobuf.Wrappers_Fields+      Proto.Google.Protobuf.FieldMask+      Proto.Google.Protobuf.FieldMask_Fields+      Proto.Google.Protobuf.SourceContext+      Proto.Google.Protobuf.SourceContext_Fields       Proto.Google.Protobuf.Struct       Proto.Google.Protobuf.Struct_Fields       Proto.Google.Protobuf.Timestamp       Proto.Google.Protobuf.Timestamp_Fields+      Proto.Google.Protobuf.Type+      Proto.Google.Protobuf.Type_Fields+      Proto.Google.Protobuf.Wrappers+      Proto.Google.Protobuf.Wrappers_Fields   hs-source-dirs:       src   build-tool-depends:
+ proto-src/google/protobuf/api.proto view
@@ -0,0 +1,208 @@+// 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.++syntax = "proto3";++package google.protobuf;++import "google/protobuf/source_context.proto";+import "google/protobuf/type.proto";++option csharp_namespace = "Google.Protobuf.WellKnownTypes";+option java_package = "com.google.protobuf";+option java_outer_classname = "ApiProto";+option java_multiple_files = true;+option objc_class_prefix = "GPB";+option go_package = "google.golang.org/protobuf/types/known/apipb";++// Api is a light-weight descriptor for an API Interface.+//+// Interfaces are also described as "protocol buffer services" in some contexts,+// such as by the "service" keyword in a .proto file, but they are different+// from API Services, which represent a concrete implementation of an interface+// as opposed to simply a description of methods and bindings. They are also+// sometimes simply referred to as "APIs" in other contexts, such as the name of+// this message itself. See https://cloud.google.com/apis/design/glossary for+// detailed terminology.+message Api {+  // The fully qualified name of this interface, including package name+  // followed by the interface's simple name.+  string name = 1;++  // The methods of this interface, in unspecified order.+  repeated Method methods = 2;++  // Any metadata attached to the interface.+  repeated Option options = 3;++  // A version string for this interface. If specified, must have the form+  // `major-version.minor-version`, as in `1.10`. If the minor version is+  // omitted, it defaults to zero. If the entire version field is empty, the+  // major version is derived from the package name, as outlined below. If the+  // field is not empty, the version in the package name will be verified to be+  // consistent with what is provided here.+  //+  // The versioning schema uses [semantic+  // versioning](http://semver.org) where the major version number+  // indicates a breaking change and the minor version an additive,+  // non-breaking change. Both version numbers are signals to users+  // what to expect from different versions, and should be carefully+  // chosen based on the product plan.+  //+  // The major version is also reflected in the package name of the+  // interface, which must end in `v<major-version>`, as in+  // `google.feature.v1`. For major versions 0 and 1, the suffix can+  // be omitted. Zero major versions must only be used for+  // experimental, non-GA interfaces.+  //+  //+  string version = 4;++  // Source context for the protocol buffer service represented by this+  // message.+  SourceContext source_context = 5;++  // Included interfaces. See [Mixin][].+  repeated Mixin mixins = 6;++  // The source syntax of the service.+  Syntax syntax = 7;+}++// Method represents a method of an API interface.+message Method {+  // The simple name of this method.+  string name = 1;++  // A URL of the input message type.+  string request_type_url = 2;++  // If true, the request is streamed.+  bool request_streaming = 3;++  // The URL of the output message type.+  string response_type_url = 4;++  // If true, the response is streamed.+  bool response_streaming = 5;++  // Any metadata attached to the method.+  repeated Option options = 6;++  // The source syntax of this method.+  Syntax syntax = 7;+}++// Declares an API Interface to be included in this interface. The including+// interface must redeclare all the methods from the included interface, but+// documentation and options are inherited as follows:+//+// - If after comment and whitespace stripping, the documentation+//   string of the redeclared method is empty, it will be inherited+//   from the original method.+//+// - Each annotation belonging to the service config (http,+//   visibility) which is not set in the redeclared method will be+//   inherited.+//+// - If an http annotation is inherited, the path pattern will be+//   modified as follows. Any version prefix will be replaced by the+//   version of the including interface plus the [root][] path if+//   specified.+//+// Example of a simple mixin:+//+//     package google.acl.v1;+//     service AccessControl {+//       // Get the underlying ACL object.+//       rpc GetAcl(GetAclRequest) returns (Acl) {+//         option (google.api.http).get = "/v1/{resource=**}:getAcl";+//       }+//     }+//+//     package google.storage.v2;+//     service Storage {+//       rpc GetAcl(GetAclRequest) returns (Acl);+//+//       // Get a data record.+//       rpc GetData(GetDataRequest) returns (Data) {+//         option (google.api.http).get = "/v2/{resource=**}";+//       }+//     }+//+// Example of a mixin configuration:+//+//     apis:+//     - name: google.storage.v2.Storage+//       mixins:+//       - name: google.acl.v1.AccessControl+//+// The mixin construct implies that all methods in `AccessControl` are+// also declared with same name and request/response types in+// `Storage`. A documentation generator or annotation processor will+// see the effective `Storage.GetAcl` method after inheriting+// documentation and annotations as follows:+//+//     service Storage {+//       // Get the underlying ACL object.+//       rpc GetAcl(GetAclRequest) returns (Acl) {+//         option (google.api.http).get = "/v2/{resource=**}:getAcl";+//       }+//       ...+//     }+//+// Note how the version in the path pattern changed from `v1` to `v2`.+//+// If the `root` field in the mixin is specified, it should be a+// relative path under which inherited HTTP paths are placed. Example:+//+//     apis:+//     - name: google.storage.v2.Storage+//       mixins:+//       - name: google.acl.v1.AccessControl+//         root: acls+//+// This implies the following inherited HTTP annotation:+//+//     service Storage {+//       // Get the underlying ACL object.+//       rpc GetAcl(GetAclRequest) returns (Acl) {+//         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";+//       }+//       ...+//     }+message Mixin {+  // The fully qualified name of the interface which is included.+  string name = 1;++  // If non-empty specifies a path under which inherited HTTP paths+  // are rooted.+  string root = 2;+}
+ proto-src/google/protobuf/field_mask.proto view
@@ -0,0 +1,245 @@+// 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.++syntax = "proto3";++package google.protobuf;++option csharp_namespace = "Google.Protobuf.WellKnownTypes";+option java_package = "com.google.protobuf";+option java_outer_classname = "FieldMaskProto";+option java_multiple_files = true;+option objc_class_prefix = "GPB";+option go_package = "google.golang.org/protobuf/types/known/fieldmaskpb";+option cc_enable_arenas = true;++// `FieldMask` represents a set of symbolic field paths, for example:+//+//     paths: "f.a"+//     paths: "f.b.d"+//+// Here `f` represents a field in some root message, `a` and `b`+// fields in the message found in `f`, and `d` a field found in the+// message in `f.b`.+//+// Field masks are used to specify a subset of fields that should be+// returned by a get operation or modified by an update operation.+// Field masks also have a custom JSON encoding (see below).+//+// # Field Masks in Projections+//+// When used in the context of a projection, a response message or+// sub-message is filtered by the API to only contain those fields as+// specified in the mask. For example, if the mask in the previous+// example is applied to a response message as follows:+//+//     f {+//       a : 22+//       b {+//         d : 1+//         x : 2+//       }+//       y : 13+//     }+//     z: 8+//+// The result will not contain specific values for fields x,y and z+// (their value will be set to the default, and omitted in proto text+// output):+//+//+//     f {+//       a : 22+//       b {+//         d : 1+//       }+//     }+//+// A repeated field is not allowed except at the last position of a+// paths string.+//+// If a FieldMask object is not present in a get operation, the+// operation applies to all fields (as if a FieldMask of all fields+// had been specified).+//+// Note that a field mask does not necessarily apply to the+// top-level response message. In case of a REST get operation, the+// field mask applies directly to the response, but in case of a REST+// list operation, the mask instead applies to each individual message+// in the returned resource list. In case of a REST custom method,+// other definitions may be used. Where the mask applies will be+// clearly documented together with its declaration in the API.  In+// any case, the effect on the returned resource/resources is required+// behavior for APIs.+//+// # Field Masks in Update Operations+//+// A field mask in update operations specifies which fields of the+// targeted resource are going to be updated. The API is required+// to only change the values of the fields as specified in the mask+// and leave the others untouched. If a resource is passed in to+// describe the updated values, the API ignores the values of all+// fields not covered by the mask.+//+// If a repeated field is specified for an update operation, new values will+// be appended to the existing repeated field in the target resource. Note that+// a repeated field is only allowed in the last position of a `paths` string.+//+// If a sub-message is specified in the last position of the field mask for an+// update operation, then new value will be merged into the existing sub-message+// in the target resource.+//+// For example, given the target message:+//+//     f {+//       b {+//         d: 1+//         x: 2+//       }+//       c: [1]+//     }+//+// And an update message:+//+//     f {+//       b {+//         d: 10+//       }+//       c: [2]+//     }+//+// then if the field mask is:+//+//  paths: ["f.b", "f.c"]+//+// then the result will be:+//+//     f {+//       b {+//         d: 10+//         x: 2+//       }+//       c: [1, 2]+//     }+//+// An implementation may provide options to override this default behavior for+// repeated and message fields.+//+// In order to reset a field's value to the default, the field must+// be in the mask and set to the default value in the provided resource.+// Hence, in order to reset all fields of a resource, provide a default+// instance of the resource and set all fields in the mask, or do+// not provide a mask as described below.+//+// If a field mask is not present on update, the operation applies to+// all fields (as if a field mask of all fields has been specified).+// Note that in the presence of schema evolution, this may mean that+// fields the client does not know and has therefore not filled into+// the request will be reset to their default. If this is unwanted+// behavior, a specific service may require a client to always specify+// a field mask, producing an error if not.+//+// As with get operations, the location of the resource which+// describes the updated values in the request message depends on the+// operation kind. In any case, the effect of the field mask is+// required to be honored by the API.+//+// ## Considerations for HTTP REST+//+// The HTTP kind of an update operation which uses a field mask must+// be set to PATCH instead of PUT in order to satisfy HTTP semantics+// (PUT must only be used for full updates).+//+// # JSON Encoding of Field Masks+//+// In JSON, a field mask is encoded as a single string where paths are+// separated by a comma. Fields name in each path are converted+// to/from lower-camel naming conventions.+//+// As an example, consider the following message declarations:+//+//     message Profile {+//       User user = 1;+//       Photo photo = 2;+//     }+//     message User {+//       string display_name = 1;+//       string address = 2;+//     }+//+// In proto a field mask for `Profile` may look as such:+//+//     mask {+//       paths: "user.display_name"+//       paths: "photo"+//     }+//+// In JSON, the same mask is represented as below:+//+//     {+//       mask: "user.displayName,photo"+//     }+//+// # Field Masks and Oneof Fields+//+// Field masks treat fields in oneofs just as regular fields. Consider the+// following message:+//+//     message SampleMessage {+//       oneof test_oneof {+//         string name = 4;+//         SubMessage sub_message = 9;+//       }+//     }+//+// The field mask can be:+//+//     mask {+//       paths: "name"+//     }+//+// Or:+//+//     mask {+//       paths: "sub_message"+//     }+//+// Note that oneof type names ("test_oneof" in this case) cannot be used in+// paths.+//+// ## Field Mask Verification+//+// The implementation of any API method which has a FieldMask type field in the+// request should verify the included field paths, and return an+// `INVALID_ARGUMENT` error if any path is unmappable.+message FieldMask {+  // The set of field mask paths.+  repeated string paths = 1;+}
+ proto-src/google/protobuf/source_context.proto view
@@ -0,0 +1,48 @@+// 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.++syntax = "proto3";++package google.protobuf;++option csharp_namespace = "Google.Protobuf.WellKnownTypes";+option java_package = "com.google.protobuf";+option java_outer_classname = "SourceContextProto";+option java_multiple_files = true;+option objc_class_prefix = "GPB";+option go_package = "google.golang.org/protobuf/types/known/sourcecontextpb";++// `SourceContext` represents information about the source of a+// protobuf element, like the file in which it is defined.+message SourceContext {+  // The path-qualified name of the .proto file that contained the associated+  // protobuf element.  For example: `"google/protobuf/source_context.proto"`.+  string file_name = 1;+}
+ proto-src/google/protobuf/type.proto view
@@ -0,0 +1,187 @@+// 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.++syntax = "proto3";++package google.protobuf;++import "google/protobuf/any.proto";+import "google/protobuf/source_context.proto";++option csharp_namespace = "Google.Protobuf.WellKnownTypes";+option cc_enable_arenas = true;+option java_package = "com.google.protobuf";+option java_outer_classname = "TypeProto";+option java_multiple_files = true;+option objc_class_prefix = "GPB";+option go_package = "google.golang.org/protobuf/types/known/typepb";++// A protocol buffer message type.+message Type {+  // The fully qualified message name.+  string name = 1;+  // The list of fields.+  repeated Field fields = 2;+  // The list of types appearing in `oneof` definitions in this type.+  repeated string oneofs = 3;+  // The protocol buffer options.+  repeated Option options = 4;+  // The source context.+  SourceContext source_context = 5;+  // The source syntax.+  Syntax syntax = 6;+}++// A single field of a message type.+message Field {+  // Basic field types.+  enum Kind {+    // Field type unknown.+    TYPE_UNKNOWN = 0;+    // Field type double.+    TYPE_DOUBLE = 1;+    // Field type float.+    TYPE_FLOAT = 2;+    // Field type int64.+    TYPE_INT64 = 3;+    // Field type uint64.+    TYPE_UINT64 = 4;+    // Field type int32.+    TYPE_INT32 = 5;+    // Field type fixed64.+    TYPE_FIXED64 = 6;+    // Field type fixed32.+    TYPE_FIXED32 = 7;+    // Field type bool.+    TYPE_BOOL = 8;+    // Field type string.+    TYPE_STRING = 9;+    // Field type group. Proto2 syntax only, and deprecated.+    TYPE_GROUP = 10;+    // Field type message.+    TYPE_MESSAGE = 11;+    // Field type bytes.+    TYPE_BYTES = 12;+    // Field type uint32.+    TYPE_UINT32 = 13;+    // Field type enum.+    TYPE_ENUM = 14;+    // Field type sfixed32.+    TYPE_SFIXED32 = 15;+    // Field type sfixed64.+    TYPE_SFIXED64 = 16;+    // Field type sint32.+    TYPE_SINT32 = 17;+    // Field type sint64.+    TYPE_SINT64 = 18;+  }++  // Whether a field is optional, required, or repeated.+  enum Cardinality {+    // For fields with unknown cardinality.+    CARDINALITY_UNKNOWN = 0;+    // For optional fields.+    CARDINALITY_OPTIONAL = 1;+    // For required fields. Proto2 syntax only.+    CARDINALITY_REQUIRED = 2;+    // For repeated fields.+    CARDINALITY_REPEATED = 3;+  }++  // The field type.+  Kind kind = 1;+  // The field cardinality.+  Cardinality cardinality = 2;+  // The field number.+  int32 number = 3;+  // The field name.+  string name = 4;+  // The field type URL, without the scheme, for message or enumeration+  // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.+  string type_url = 6;+  // 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.+  int32 oneof_index = 7;+  // Whether to use alternative packed wire representation.+  bool packed = 8;+  // The protocol buffer options.+  repeated Option options = 9;+  // The field JSON name.+  string json_name = 10;+  // The string value of the default value of this field. Proto2 syntax only.+  string default_value = 11;+}++// Enum type definition.+message Enum {+  // Enum type name.+  string name = 1;+  // Enum value definitions.+  repeated EnumValue enumvalue = 2;+  // Protocol buffer options.+  repeated Option options = 3;+  // The source context.+  SourceContext source_context = 4;+  // The source syntax.+  Syntax syntax = 5;+}++// Enum value definition.+message EnumValue {+  // Enum value name.+  string name = 1;+  // Enum value number.+  int32 number = 2;+  // Protocol buffer options.+  repeated Option options = 3;+}++// A protocol buffer option, which can be attached to a message, field,+// enumeration, etc.+message Option {+  // 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"`.+  string name = 1;+  // 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.+  Any value = 2;+}++// The syntax in which a protocol buffer element is defined.+enum Syntax {+  // Syntax `proto2`.+  SYNTAX_PROTO2 = 0;+  // Syntax `proto3`.+  SYNTAX_PROTO3 = 1;+}