proto-lens-protobuf-types 0.7.0.0 → 0.7.1.0
raw patch · 10 files changed
+180/−106 lines, 10 filesdep ~basedep ~lens-familynew-uploader
Dependency ranges changed: base, lens-family
Files
- Changelog.md +4/−0
- proto-lens-protobuf-types.cabal +5/−7
- proto-src/google/protobuf/any.proto +8/−4
- proto-src/google/protobuf/compiler/plugin.proto +17/−1
- proto-src/google/protobuf/descriptor.proto +96/−70
- proto-src/google/protobuf/duration.proto +2/−3
- proto-src/google/protobuf/empty.proto +1/−1
- proto-src/google/protobuf/timestamp.proto +31/−19
- proto-src/google/protobuf/wrappers.proto +6/−1
- src/Data/ProtoLens/Descriptor.hs +10/−0
Changelog.md view
@@ -1,5 +1,9 @@ # Changelog for `proto-lens-protobuf-types` +## v0.7.1.0+- Support GHC 9.0.+- Add ServiceDescriptor to generated services (#409)+ ## v0.7.0.0 - Add the module `Data.ProtoLens.Descriptor`. It exposes `messageDescriptor`, which makes it easier to get the descriptor proto for a given message type.
proto-lens-protobuf-types.cabal view
@@ -1,13 +1,11 @@ cabal-version: 2.0 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack------ hash: a8f93d2a40c305e2b4e5e09a48bbae810f2adaec8fbc8e7c3a731c2bb525627b name: proto-lens-protobuf-types-version: 0.7.0.0+version: 0.7.1.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@@ -37,7 +35,7 @@ custom-setup setup-depends: Cabal- , base >=4.10 && <4.15+ , base >=4.10 && <4.16 , proto-lens-setup ==0.4.* library@@ -78,8 +76,8 @@ build-tool-depends: proto-lens-protoc:proto-lens-protoc build-depends:- base >=4.10 && <4.15- , lens-family >=1.2 && <2.1+ base >=4.10 && <4.16+ , lens-family >=1.2 && <2.2 , proto-lens ==0.7.* , proto-lens-runtime ==0.7.* , text ==1.2.*
proto-src/google/protobuf/any.proto view
@@ -33,7 +33,7 @@ package google.protobuf; option csharp_namespace = "Google.Protobuf.WellKnownTypes";-option go_package = "github.com/golang/protobuf/ptypes/any";+option go_package = "google.golang.org/protobuf/types/known/anypb"; option java_package = "com.google.protobuf"; option java_outer_classname = "AnyProto"; option java_multiple_files = true;@@ -77,10 +77,13 @@ // Example 4: Pack and unpack a message in Go // // foo := &pb.Foo{...}-// any, err := ptypes.MarshalAny(foo)+// any, err := anypb.New(foo)+// if err != nil {+// ...+// } // ... // foo := &pb.Foo{}-// if err := ptypes.UnmarshalAny(any, foo); err != nil {+// if err := any.UnmarshalTo(foo); err != nil { // ... // } //@@ -121,7 +124,8 @@ // message Any { // A URL/resource name that uniquely identifies the type of the serialized- // protocol buffer message. The last segment of the URL's path must represent+ // protocol buffer message. This string must contain at least+ // one "/" character. The last segment of the URL's path must represent // the fully qualified name of the type (as in // `path/google.protobuf.Duration`). The name should be in a canonical form // (e.g., leading "." is not accepted).
proto-src/google/protobuf/compiler/plugin.proto view
@@ -45,11 +45,12 @@ // flag "--${NAME}_out" is passed to protoc. syntax = "proto2";+ package google.protobuf.compiler; option java_package = "com.google.protobuf.compiler"; option java_outer_classname = "PluginProtos"; -option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go";+option go_package = "google.golang.org/protobuf/types/pluginpb"; import "google/protobuf/descriptor.proto"; @@ -106,6 +107,16 @@ // exiting with a non-zero status code. optional string error = 1; + // A bitmask of supported features that the code generator supports.+ // This is a bitwise "or" of values from the Feature enum.+ optional uint64 supported_features = 2;++ // Sync with code_generator.h.+ enum Feature {+ FEATURE_NONE = 0;+ FEATURE_PROTO3_OPTIONAL = 1;+ }+ // Represents a single generated file. message File { // The file name, relative to the output directory. The name must not@@ -162,6 +173,11 @@ // The file contents. optional string content = 15;++ // Information describing the file content being inserted. If an insertion+ // point is used, this information will be appropriately offset and inserted+ // into the code generation metadata for the generated files.+ optional GeneratedCodeInfo generated_code_info = 16; } repeated File file = 15; }
proto-src/google/protobuf/descriptor.proto view
@@ -40,7 +40,8 @@ syntax = "proto2"; package google.protobuf;-option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";++option go_package = "google.golang.org/protobuf/types/descriptorpb"; option java_package = "com.google.protobuf"; option java_outer_classname = "DescriptorProtos"; option csharp_namespace = "Google.Protobuf.Reflection";@@ -59,8 +60,8 @@ // Describes a complete .proto file. message FileDescriptorProto {- optional string name = 1; // file name, relative to root of source tree- optional string package = 2; // e.g. "foo", "foo.bar", etc.+ optional string name = 1; // file name, relative to root of source tree+ optional string package = 2; // e.g. "foo", "foo.bar", etc. // Names of files imported by this file. repeated string dependency = 3;@@ -100,8 +101,8 @@ repeated EnumDescriptorProto enum_type = 4; message ExtensionRange {- optional int32 start = 1;- optional int32 end = 2;+ optional int32 start = 1; // Inclusive.+ optional int32 end = 2; // Exclusive. optional ExtensionRangeOptions options = 3; }@@ -115,8 +116,8 @@ // fields or extension ranges in the same message. Reserved ranges may // not overlap. message ReservedRange {- optional int32 start = 1; // Inclusive.- optional int32 end = 2; // Exclusive.+ optional int32 start = 1; // Inclusive.+ optional int32 end = 2; // Exclusive. } repeated ReservedRange reserved_range = 9; // Reserved field names, which may not be used by fields in the same message.@@ -128,6 +129,7 @@ // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; + // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; }@@ -137,42 +139,42 @@ enum Type { // 0 is reserved for errors. // Order is weird for historical reasons.- TYPE_DOUBLE = 1;- TYPE_FLOAT = 2;+ TYPE_DOUBLE = 1;+ TYPE_FLOAT = 2; // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if // negative values are likely.- TYPE_INT64 = 3;- TYPE_UINT64 = 4;+ TYPE_INT64 = 3;+ TYPE_UINT64 = 4; // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if // negative values are likely.- TYPE_INT32 = 5;- TYPE_FIXED64 = 6;- TYPE_FIXED32 = 7;- TYPE_BOOL = 8;- TYPE_STRING = 9;+ TYPE_INT32 = 5;+ TYPE_FIXED64 = 6;+ TYPE_FIXED32 = 7;+ TYPE_BOOL = 8;+ TYPE_STRING = 9; // Tag-delimited aggregate. // Group type is deprecated and not supported in proto3. However, Proto3 // implementations should still be able to parse the group wire format and // treat group fields as unknown fields.- TYPE_GROUP = 10;- TYPE_MESSAGE = 11; // Length-delimited aggregate.+ TYPE_GROUP = 10;+ TYPE_MESSAGE = 11; // Length-delimited aggregate. // New in version 2.- TYPE_BYTES = 12;- TYPE_UINT32 = 13;- TYPE_ENUM = 14;- TYPE_SFIXED32 = 15;- TYPE_SFIXED64 = 16;- TYPE_SINT32 = 17; // Uses ZigZag encoding.- TYPE_SINT64 = 18; // Uses ZigZag encoding.- };+ TYPE_BYTES = 12;+ TYPE_UINT32 = 13;+ TYPE_ENUM = 14;+ TYPE_SFIXED32 = 15;+ TYPE_SFIXED64 = 16;+ TYPE_SINT32 = 17; // Uses ZigZag encoding.+ TYPE_SINT64 = 18; // Uses ZigZag encoding.+ } enum Label { // 0 is reserved for errors- LABEL_OPTIONAL = 1;- LABEL_REQUIRED = 2;- LABEL_REPEATED = 3;- };+ LABEL_OPTIONAL = 1;+ LABEL_REQUIRED = 2;+ LABEL_REPEATED = 3;+ } optional string name = 1; optional int32 number = 3;@@ -211,6 +213,29 @@ optional string json_name = 10; optional FieldOptions options = 8;++ // If true, this is a proto3 "optional". When a proto3 field is optional, it+ // tracks presence regardless of field type.+ //+ // When proto3_optional is true, this field must be belong to a oneof to+ // signal to old proto3 clients that presence is tracked for this field. This+ // oneof is known as a "synthetic" oneof, and this field must be its sole+ // member (each proto3 optional field gets its own synthetic oneof). Synthetic+ // oneofs exist in the descriptor only, and do not generate any API. Synthetic+ // oneofs must be ordered after all "real" oneofs.+ //+ // For message fields, proto3_optional doesn't create any semantic change,+ // since non-repeated message fields always track presence. However it still+ // indicates the semantic detail of whether the user wrote "optional" or not.+ // This can be useful for round-tripping the .proto file. For consistency we+ // give message fields a synthetic oneof also, even though it is not required+ // to track presence. This is especially important because the parser can't+ // tell if a field is a message or an enum, so it must always create a+ // synthetic oneof.+ //+ // Proto2 optional fields do not set this flag, because they already indicate+ // optional with `LABEL_OPTIONAL`.+ optional bool proto3_optional = 17; } // Describes a oneof.@@ -234,8 +259,8 @@ // is inclusive such that it can appropriately represent the entire int32 // domain. message EnumReservedRange {- optional int32 start = 1; // Inclusive.- optional int32 end = 2; // Inclusive.+ optional int32 start = 1; // Inclusive.+ optional int32 end = 2; // Inclusive. } // Range of reserved numeric values. Reserved numeric values may not be used@@ -276,9 +301,9 @@ optional MethodOptions options = 4; // Identifies if client streams multiple client messages- optional bool client_streaming = 5 [default=false];+ optional bool client_streaming = 5 [default = false]; // Identifies if server streams multiple server messages- optional bool server_streaming = 6 [default=false];+ optional bool server_streaming = 6 [default = false]; } @@ -314,7 +339,6 @@ // If this turns out to be popular, a web service will be set up // to automatically assign option numbers. - message FileOptions { // Sets the Java package where classes generated from this .proto will be@@ -337,7 +361,7 @@ // named by java_outer_classname. However, the outer class will still be // generated to contain the file's getDescriptor() method as well as any // top-level extensions defined in the file.- optional bool java_multiple_files = 10 [default=false];+ optional bool java_multiple_files = 10 [default = false]; // This option does nothing. optional bool java_generate_equals_and_hash = 20 [deprecated=true];@@ -348,17 +372,17 @@ // Message reflection will do the same. // However, an extension field still accepts non-UTF-8 byte sequences. // This option has no effect on when used with the lite runtime.- optional bool java_string_check_utf8 = 27 [default=false];+ optional bool java_string_check_utf8 = 27 [default = false]; // Generated classes can be optimized for speed or code size. enum OptimizeMode {- SPEED = 1; // Generate complete code for parsing, serialization,- // etc.- CODE_SIZE = 2; // Use ReflectionOps to implement these methods.- LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.+ SPEED = 1; // Generate complete code for parsing, serialization,+ // etc.+ CODE_SIZE = 2; // Use ReflectionOps to implement these methods.+ LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. }- optional OptimizeMode optimize_for = 9 [default=SPEED];+ optional OptimizeMode optimize_for = 9 [default = SPEED]; // Sets the Go package where structs generated from this .proto will be // placed. If omitted, the Go package will be derived from the following:@@ -369,6 +393,7 @@ + // Should generic services be generated in each language? "Generic" services // are not specific to any particular RPC system. They are generated by the // main code generators in each language (without additional plugins).@@ -379,20 +404,20 @@ // that generate code specific to your particular RPC system. Therefore, // these default to false. Old code which depends on generic services should // explicitly set them to true.- optional bool cc_generic_services = 16 [default=false];- optional bool java_generic_services = 17 [default=false];- optional bool py_generic_services = 18 [default=false];- optional bool php_generic_services = 42 [default=false];+ optional bool cc_generic_services = 16 [default = false];+ optional bool java_generic_services = 17 [default = false];+ optional bool py_generic_services = 18 [default = false];+ optional bool php_generic_services = 42 [default = false]; // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations // for everything in the file, or it will be completely ignored; in the very // least, this is a formalization for deprecating files.- optional bool deprecated = 23 [default=false];+ optional bool deprecated = 23 [default = false]; // Enables the use of arenas for the proto messages in this file. This applies // only to generated classes for C++.- optional bool cc_enable_arenas = 31 [default=false];+ optional bool cc_enable_arenas = 31 [default = true]; // Sets the objective c class prefix which is prepended to all objective c@@ -417,10 +442,9 @@ // determining the namespace. optional string php_namespace = 41; - // Use this option to change the namespace of php generated metadata classes.- // Default is empty. When this option is empty, the proto file name will be used- // for determining the namespace.+ // Default is empty. When this option is empty, the proto file name will be+ // used for determining the namespace. optional string php_metadata_namespace = 44; // Use this option to change the package of ruby generated classes. Default@@ -428,6 +452,7 @@ // determining the ruby package. optional string ruby_package = 45; + // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. repeated UninterpretedOption uninterpreted_option = 999;@@ -458,18 +483,18 @@ // // Because this is an option, the above two restrictions are not enforced by // the protocol compiler.- optional bool message_set_wire_format = 1 [default=false];+ optional bool message_set_wire_format = 1 [default = false]; // Disables the generation of the standard "descriptor()" accessor, which can // conflict with a field of the same name. This is meant to make migration // from proto1 easier; new code should avoid fields named "descriptor".- optional bool no_standard_descriptor_accessor = 2 [default=false];+ optional bool no_standard_descriptor_accessor = 2 [default = false]; // Is this message deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the message, or it will be completely ignored; in the very least, // this is a formalization for deprecating messages.- optional bool deprecated = 3 [default=false];+ optional bool deprecated = 3 [default = false]; // Whether the message is an automatically generated map entry type for the // maps field.@@ -486,7 +511,7 @@ // // Implementations may choose not to generate the map_entry=true message, but // use a native map in the target language to hold the keys and values.- // The reflection APIs in such implementions still need to work as+ // The reflection APIs in such implementations still need to work as // if the field is a repeated message field. // // NOTE: Do not set the option in .proto files. Always use the maps syntax@@ -497,6 +522,7 @@ reserved 8; // javalite_serializable reserved 9; // javanano_as_lite + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -576,16 +602,16 @@ // implementation must either *always* check its required fields, or *never* // check its required fields, regardless of whether or not the message has // been parsed.- optional bool lazy = 5 [default=false];+ optional bool lazy = 5 [default = false]; // Is this field deprecated? // Depending on the target platform, this can emit Deprecated annotations // for accessors, or it will be completely ignored; in the very least, this // is a formalization for deprecating fields.- optional bool deprecated = 3 [default=false];+ optional bool deprecated = 3 [default = false]; // For Google-internal migration only. Do not use.- optional bool weak = 10 [default=false];+ optional bool weak = 10 [default = false]; // The parser stores options it doesn't recognize here. See above.@@ -615,7 +641,7 @@ // Depending on the target platform, this can emit Deprecated annotations // for the enum, or it will be completely ignored; in the very least, this // is a formalization for deprecating enums.- optional bool deprecated = 3 [default=false];+ optional bool deprecated = 3 [default = false]; reserved 5; // javanano_as_lite @@ -631,7 +657,7 @@ // Depending on the target platform, this can emit Deprecated annotations // for the enum value, or it will be completely ignored; in the very least, // this is a formalization for deprecating enum values.- optional bool deprecated = 1 [default=false];+ optional bool deprecated = 1 [default = false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999;@@ -651,7 +677,7 @@ // Depending on the target platform, this can emit Deprecated annotations // for the service, or it will be completely ignored; in the very least, // this is a formalization for deprecating services.- optional bool deprecated = 33 [default=false];+ optional bool deprecated = 33 [default = false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999;@@ -671,18 +697,18 @@ // Depending on the target platform, this can emit Deprecated annotations // for the method, or it will be completely ignored; in the very least, // this is a formalization for deprecating methods.- optional bool deprecated = 33 [default=false];+ optional bool deprecated = 33 [default = false]; // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, // or neither? HTTP based RPC implementation may choose GET verb for safe // methods, and PUT verb for idempotent methods instead of the default POST. enum IdempotencyLevel { IDEMPOTENCY_UNKNOWN = 0;- NO_SIDE_EFFECTS = 1; // implies idempotent- IDEMPOTENT = 2; // idempotent, but may have side effects+ NO_SIDE_EFFECTS = 1; // implies idempotent+ IDEMPOTENT = 2; // idempotent, but may have side effects }- optional IdempotencyLevel idempotency_level =- 34 [default=IDEMPOTENCY_UNKNOWN];+ optional IdempotencyLevel idempotency_level = 34+ [default = IDEMPOTENCY_UNKNOWN]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999;@@ -763,7 +789,7 @@ // beginning of the "extend" block and is shared by all extensions within // the block. // - Just because a location's span is a subset of some other location's span- // does not mean that it is a descendent. For example, a "group" defines+ // does not mean that it is a descendant. For example, a "group" defines // both a type and a field in a single declaration. Thus, the locations // corresponding to the type and field and their components will overlap. // - Code which tries to interpret locations should probably be designed to@@ -794,14 +820,14 @@ // [ 4, 3, 2, 7 ] // this path refers to the whole field declaration (from the beginning // of the label to the terminating semicolon).- repeated int32 path = 1 [packed=true];+ repeated int32 path = 1 [packed = true]; // Always has exactly three or four elements: start line, start column, // end line (optional, otherwise assumed same as start line), end column. // These are packed into a single field for efficiency. Note that line // and column numbers are zero-based -- typically you will want to add // 1 to each before displaying to a user.- repeated int32 span = 2 [packed=true];+ repeated int32 span = 2 [packed = true]; // If this SourceCodeInfo represents a complete declaration, these are any // comments appearing before and after the declaration which appear to be@@ -866,7 +892,7 @@ message Annotation { // Identifies the element in the original source .proto file. This field // is formatted the same as SourceCodeInfo.Location.path.- repeated int32 path = 1 [packed=true];+ repeated int32 path = 1 [packed = true]; // Identifies the filesystem path to the original source .proto. optional string source_file = 2;
proto-src/google/protobuf/duration.proto view
@@ -34,7 +34,7 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes"; option cc_enable_arenas = true;-option go_package = "github.com/golang/protobuf/ptypes/duration";+option go_package = "google.golang.org/protobuf/types/known/durationpb"; option java_package = "com.google.protobuf"; option java_outer_classname = "DurationProto"; option java_multiple_files = true;@@ -61,7 +61,7 @@ // if (duration.seconds < 0 && duration.nanos > 0) { // duration.seconds += 1; // duration.nanos -= 1000000000;-// } else if (durations.seconds > 0 && duration.nanos < 0) {+// } else if (duration.seconds > 0 && duration.nanos < 0) { // duration.seconds -= 1; // duration.nanos += 1000000000; // }@@ -101,7 +101,6 @@ // // message Duration {- // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
proto-src/google/protobuf/empty.proto view
@@ -33,7 +33,7 @@ package google.protobuf; option csharp_namespace = "Google.Protobuf.WellKnownTypes";-option go_package = "github.com/golang/protobuf/ptypes/empty";+option go_package = "google.golang.org/protobuf/types/known/emptypb"; option java_package = "com.google.protobuf"; option java_outer_classname = "EmptyProto"; option java_multiple_files = true;
proto-src/google/protobuf/timestamp.proto view
@@ -34,24 +34,26 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes"; option cc_enable_arenas = true;-option go_package = "github.com/golang/protobuf/ptypes/timestamp";+option go_package = "google.golang.org/protobuf/types/known/timestamppb"; option java_package = "com.google.protobuf"; option java_outer_classname = "TimestampProto"; option java_multiple_files = true; option objc_class_prefix = "GPB"; -// A Timestamp represents a point in time independent of any time zone-// or calendar, represented as seconds and fractions of seconds at-// nanosecond resolution in UTC Epoch time. It is encoded using the-// Proleptic Gregorian Calendar which extends the Gregorian calendar-// backwards to year one. It is encoded assuming all minutes are 60-// seconds long, i.e. leap seconds are "smeared" so that no leap second-// table is needed for interpretation. Range is from-// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.-// By restricting to that range, we ensure that we can convert to-// and from RFC 3339 date strings.-// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).+// A Timestamp represents a point in time independent of any time zone or local+// calendar, encoded as a count of seconds and fractions of seconds at+// nanosecond resolution. The count is relative to an epoch at UTC midnight on+// January 1, 1970, in the proleptic Gregorian calendar which extends the+// Gregorian calendar backwards to year one. //+// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap+// second table is needed for interpretation, using a [24-hour linear+// smear](https://developers.google.com/time/smear).+//+// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By+// restricting to that range, we ensure that we can convert to and from [RFC+// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.+// // # Examples // // Example 1: Compute Timestamp from POSIX `time()`.@@ -89,8 +91,17 @@ // .setNanos((int) ((millis % 1000) * 1000000)).build(); // //-// Example 5: Compute Timestamp from current time in Python.+// Example 5: Compute Timestamp from Java `Instant.now()`. //+// Instant now = Instant.now();+//+// Timestamp timestamp =+// Timestamp.newBuilder().setSeconds(now.getEpochSecond())+// .setNanos(now.getNano()).build();+//+//+// Example 6: Compute Timestamp from current time in Python.+// // timestamp = Timestamp() // timestamp.GetCurrentTime() //@@ -111,17 +122,18 @@ // 01:30 UTC on January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the-// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]+// standard+// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted-// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)-// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one-// can use the Joda Time's [`ISODateTimeFormat.dateTime()`](-// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--+// to this format using+// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with+// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use+// the Joda Time's [`ISODateTimeFormat.dateTime()`](+// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D // ) to obtain a formatter capable of generating timestamps in this format. // // message Timestamp {- // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive.
proto-src/google/protobuf/wrappers.proto view
@@ -32,6 +32,11 @@ // for embedding primitives in the `google.protobuf.Any` type and for places // where we need to distinguish between the absence of a primitive // typed field and its default value.+//+// These wrappers have no meaningful use within repeated fields as they lack+// the ability to detect presence on individual elements.+// These wrappers have no meaningful use within a map or a oneof since+// individual entries of a map or fields of a oneof can already detect presence. syntax = "proto3"; @@ -39,7 +44,7 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes"; option cc_enable_arenas = true;-option go_package = "github.com/golang/protobuf/ptypes/wrappers";+option go_package = "google.golang.org/protobuf/types/known/wrapperspb"; option java_package = "com.google.protobuf"; option java_outer_classname = "WrappersProto"; option java_multiple_files = true;
src/Data/ProtoLens/Descriptor.hs view
@@ -5,10 +5,12 @@ module Data.ProtoLens.Descriptor ( DescriptorProto , messageDescriptor+ , serviceDescriptor , fileDescriptor ) where import Data.ProtoLens+import Data.ProtoLens.Service.Types import Data.Proxy (Proxy(..)) import Proto.Google.Protobuf.Descriptor @@ -23,6 +25,14 @@ -- in proto-lens-protoc; and furthermore proto decoding is robust -- to unknown/missing fields. messageDescriptor = decodeMessageOrDie $ packedMessageDescriptor (Proxy @a)++-- | The protocol buffer service descriptor for a given service.+--+-- This function should be used with @TypeApplications@, e.g.:+--+-- > serviceDescriptor @SomeService+serviceDescriptor :: forall a . Service a => ServiceDescriptorProto+serviceDescriptor = decodeMessageOrDie $ packedServiceDescriptor (Proxy @a) -- | The protocol buffer file descriptor containing a given type. --