proto-lens 0.4.0.1 → 0.7.1.7
raw patch · 25 files changed
Files
- Changelog.md +74/−0
- proto-lens-imports/google/protobuf/compiler/plugin.proto +44/−31
- proto-lens-imports/google/protobuf/descriptor.proto +534/−121
- proto-lens.cabal +58/−21
- src/Data/ProtoLens/Combinators.hs +47/−0
- src/Data/ProtoLens/Encoding.hs +32/−258
- src/Data/ProtoLens/Encoding/Bytes.hs +156/−23
- src/Data/ProtoLens/Encoding/Growing.hs +70/−0
- src/Data/ProtoLens/Encoding/Parser.hs +120/−0
- src/Data/ProtoLens/Encoding/Parser/Internal.hs +50/−0
- src/Data/ProtoLens/Encoding/Parser/Unsafe.hs +21/−0
- src/Data/ProtoLens/Encoding/Wire.hs +113/−140
- src/Data/ProtoLens/Field.hs +42/−0
- src/Data/ProtoLens/Labels.hs +38/−0
- src/Data/ProtoLens/Message.hs +27/−2
- src/Data/ProtoLens/Prism.hs +80/−0
- src/Data/ProtoLens/Service/Types.hs +6/−4
- src/Data/ProtoLens/TextFormat.hs +14/−11
- src/Data/ProtoLens/TextFormat/Parser.hs +50/−45
- src/Proto/Google/Protobuf/Compiler/Plugin.hs +0/−523
- src/Proto/Google/Protobuf/Compiler/Plugin_Fields.hs +0/−189
- src/Proto/Google/Protobuf/Descriptor.hs +0/−4907
- src/Proto/Google/Protobuf/Descriptor_Fields.hs +0/−1097
- tests/growing_test.hs +37/−0
- tests/parser_test.hs +96/−0
Changelog.md view
@@ -1,5 +1,79 @@ # Changelog for `proto-lens` +## v0.7.1.7+- Relax upper bounds for ghc-9.10.+- Bump upper bound to allow ghc-prim-0.12 (ghc-9.10.2).+- Support GHC 9.12.+- Support GHC 9.14.++## v0.7.1.2+- Support GHC 9.4++## v0.7.1.1+- Relax upper bounds for ghc-9.2++## v0.7.1.0+- Support GHC 9.0.+- Fixed parsing of UTF8 chars in text format proto string literals.+- Support all valid text format boolean field values+- Remove redundant (.&. 127) from putVarInt (#396)++## v0.7.0.0+- Support GHC 8.10.+- Add a method to `Data.ProtoLens.Message` for getting the `DescriptorProto`+ of a given message. For a simpler API, see `Data.ProtoLens.Descriptor`+ from `proto-lens-protobuf-types`.+- Bump ghc-source-gen to version 0.4.0.0.+- Bump upper bound to allow base-4.14.+- Bump upper bound to allow ghc-prim-0.6.++## v0.6.0.0++### Breaking Changes+- Bump lower bounds to base-4.10 (ghc-8.2).+- Move `Proto.Google.Protobuf.Descriptor` and+ `Proto.Google.Protobuf.Compiler.Plugin` to the `proto-lens-protobuf-types`+ package.++### Backwards-Compatible Changes+- Bump upper bound to allow profunctors-5.5.+- Support dependencies on base-4.13 (ghc-8.8) and lens-family-2.0.++## v0.5.1.0+- Add `decodeMessageDelimitedH` to decode delimited messages from a file handle+ (#61).++## v0.5.0.1+- Bump the upper bound on `profunctors` to allow 5.4.+- Bump the upper bound on `primitive` to allow 0.7.+- Allow text format protobuf strings to contain unescaped quote characters+ different from the delimiters (#320).++### Breaking Changes+- Merge the `lens-labels` library into `proto-lens`:+ - `Lens.Labels` => `Data.ProtoLens.Fields`+ - `Lens.Labels.Unwrapped` => `Data.ProtoLens.Labels`+ - `Lens.Labels.Prism` => `Data.ProtoLens.Prism`+- Simplify the API of `Data.ProtoLens.Encoding.Wire`, using a plain ADT+ rather than a GADT to represent unknown field values.+- If fields have the wrong wire type, store them in `unknownFields` rather+ than failing the parse. (#125)++### Backwards-Compatible Changes+- Merge proto-lens-combinators into the proto-lens library.+- Use generated Haskell code to encode/decode proto messages more quickly.+ In particular:+ - Add the methods `parseMessage` and `buildMessage` to `Data.ProtoLens.Message`+ - Expose an opaque `Parser` monad, which is used by the generated+ code.+ - Expose the module `Data.ProtoLens.Encoding.Bytes`, which is used+ by the generated code.+ - Various other, related performance optimizations.+- Add functionality for storing unknown fields as `Vector`s. (See the+ changelog of `proto-lens-protoc` for more details.) Exposes the+ `Growing` type for mutable vectors of growing capacity.+- Export the new function `parseMessageDelimited`. (#61)+ ## v0.4.0.1 - Bump the dependencies on `base` and `containers` to `0.4.0.1`.
proto-lens-imports/google/protobuf/compiler/plugin.proto view
@@ -1,38 +1,12 @@ // 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.+// Use of this source code is governed by a BSD-style+// license that can be found in the LICENSE file or at+// https://developers.google.com/open-source/licenses/bsd // Author: kenton@google.com (Kenton Varda) //-// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to-// change.-// // protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is // just a program that reads a CodeGeneratorRequest from stdin and writes a // CodeGeneratorResponse to stdout.@@ -45,11 +19,13 @@ // 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 csharp_namespace = "Google.Protobuf.Compiler";+option go_package = "google.golang.org/protobuf/types/pluginpb"; import "google/protobuf/descriptor.proto"; @@ -77,6 +53,11 @@ // they import. The files will appear in topological order, so each file // appears before any file that imports it. //+ // Note: the files listed in files_to_generate will include runtime-retention+ // options only, but all other files will include source-retention options.+ // The source_file_descriptors field below is available in case you need+ // source-retention options for files_to_generate.+ // // protoc guarantees that all proto_files will be written after // the fields above, even though this is not technically guaranteed by the // protobuf wire format. This theoretically could allow a plugin to stream@@ -89,9 +70,13 @@ // fully qualified. repeated FileDescriptorProto proto_file = 15; + // File descriptors with all options, including source-retention options.+ // These descriptors are only provided for the files listed in+ // files_to_generate.+ repeated FileDescriptorProto source_file_descriptors = 17;+ // The version number of protocol compiler. optional Version compiler_version = 3;- } // The plugin writes an encoded CodeGeneratorResponse to stdout.@@ -106,6 +91,29 @@ // 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;+ FEATURE_SUPPORTS_EDITIONS = 2;+ }++ // The minimum edition this plugin supports. This will be treated as an+ // Edition enum, but we want to allow unknown values. It should be specified+ // according the edition enum value, *not* the edition number. Only takes+ // effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.+ optional int32 minimum_edition = 3;++ // The maximum edition this plugin supports. This will be treated as an+ // Edition enum, but we want to allow unknown values. It should be specified+ // according the edition enum value, *not* the edition number. Only takes+ // effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.+ optional int32 maximum_edition = 4;+ // Represents a single generated file. message File { // The file name, relative to the output directory. The name must not@@ -162,6 +170,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-lens-imports/google/protobuf/descriptor.proto view
@@ -36,11 +36,11 @@ // A valid .proto file can be translated directly to a FileDescriptorProto // without any other information (e.g. without reading its imports). - 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";@@ -57,10 +57,46 @@ repeated FileDescriptorProto file = 1; } +// The full set of known editions.+enum Edition {+ // A placeholder for an unknown edition value.+ EDITION_UNKNOWN = 0;++ // A placeholder edition for specifying default behaviors *before* a feature+ // was first introduced. This is effectively an "infinite past".+ EDITION_LEGACY = 900;++ // Legacy syntax "editions". These pre-date editions, but behave much like+ // distinct editions. These can't be used to specify the edition of proto+ // files, but feature definitions must supply proto2/proto3 defaults for+ // backwards compatibility.+ EDITION_PROTO2 = 998;+ EDITION_PROTO3 = 999;++ // Editions that have been released. The specific values are arbitrary and+ // should not be depended on, but they will always be time-ordered for easy+ // comparison.+ EDITION_2023 = 1000;+ EDITION_2024 = 1001;++ // Placeholder editions for testing feature resolution. These should not be+ // used or relyed on outside of tests.+ EDITION_1_TEST_ONLY = 1;+ EDITION_2_TEST_ONLY = 2;+ EDITION_99997_TEST_ONLY = 99997;+ EDITION_99998_TEST_ONLY = 99998;+ EDITION_99999_TEST_ONLY = 99999;++ // Placeholder for specifying unbounded edition support. This should only+ // ever be used by plugins that can expect to never require any changes to+ // support a new edition.+ EDITION_MAX = 0x7FFFFFFF;+}+ // 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;@@ -85,8 +121,13 @@ optional SourceCodeInfo source_code_info = 9; // The syntax of the proto file.- // The supported values are "proto2" and "proto3".+ // The supported values are "proto2", "proto3", and "editions".+ //+ // If `edition` is present, this value must be "editions". optional string syntax = 12;++ // The edition of the proto file.+ optional Edition edition = 14; } // Describes a message type.@@ -100,8 +141,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 +156,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 +169,52 @@ // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; + message Declaration {+ // The extension number declared within the extension range.+ optional int32 number = 1;++ // The fully-qualified name of the extension field. There must be a leading+ // dot in front of the full name.+ optional string full_name = 2;++ // The fully-qualified type name of the extension field. Unlike+ // Metadata.type, Declaration.type must have a leading dot for messages+ // and enums.+ optional string type = 3;++ // If true, indicates that the number is reserved in the extension range,+ // and any extension field with the number will fail to compile. Set this+ // when a declared extension field is deleted.+ optional bool reserved = 5;++ // If true, indicates that the extension must be defined as repeated.+ // Otherwise the extension must be defined as optional.+ optional bool repeated = 6;++ reserved 4; // removed is_repeated+ }++ // For external users: DO NOT USE. We are in the process of open sourcing+ // extension declaration and executing internal cleanups before it can be+ // used externally.+ repeated Declaration declaration = 2 [retention = RETENTION_SOURCE];++ // Any features defined in the specific edition.+ optional FeatureSet features = 50;++ // The verification state of the extension range.+ enum VerificationState {+ // All the extensions of the range must be declared.+ DECLARATION = 0;+ UNVERIFIED = 1;+ }++ // The verification state of the range.+ // TODO: flip the default to DECLARATION once all empty ranges+ // are marked as UNVERIFIED.+ optional VerificationState verification = 3+ [default = UNVERIFIED, retention = RETENTION_SOURCE];+ // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; }@@ -137,42 +224,46 @@ 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+ // Group type is deprecated and not supported after google.protobuf. 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.+ // treat group fields as unknown fields. In Editions, the group wire format+ // can be enabled via the `message_encoding` feature.+ 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_REPEATED = 3;+ // The required label is only allowed in google.protobuf. In proto3 and Editions+ // it's explicitly prohibited. In Editions, the `field_presence` feature+ // can be used to get this behavior.+ LABEL_REQUIRED = 2;+ } optional string name = 1; optional int32 number = 3;@@ -197,7 +288,6 @@ // For booleans, "true" or "false". // For strings, contains the default text contents (not escaped in any way). // For bytes, contains the C escaped value. All bytes >= 128 are escaped.- // TODO(kenton): Base-64 encode? optional string default_value = 7; // If set, gives the index of a oneof in the containing type's oneof_decl@@ -211,6 +301,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 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 +347,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,12 +389,11 @@ 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]; } - // =================================================================== // Options @@ -314,7 +426,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@@ -323,42 +434,44 @@ // domain names. optional string java_package = 1; -- // If set, all the classes from the .proto file are wrapped in a single- // outer class with the given name. This applies to both Proto1- // (equivalent to the old "--one_java_file" option) and Proto2 (where- // a .proto always translates to a single class, but you may want to- // explicitly choose the class name).+ // Controls the name of the wrapper Java class generated for the .proto file.+ // That class will always contain the .proto file's getDescriptor() method as+ // well as any top-level extensions defined in the .proto file.+ // If java_multiple_files is disabled, then all the other classes from the+ // .proto file will be nested inside the single wrapper outer class. optional string java_outer_classname = 8; - // If set true, then the Java code generator will generate a separate .java+ // If enabled, then the Java code generator will generate a separate .java // file for each top-level message, enum, and service defined in the .proto- // file. Thus, these types will *not* be nested inside the outer class- // named by java_outer_classname. However, the outer class will still be+ // file. Thus, these types will *not* be nested inside the wrapper class+ // named by java_outer_classname. However, the wrapper 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]; - // If set true, then the Java2 code generator will generate code that- // throws an exception whenever an attempt is made to assign a non-UTF-8- // byte sequence to a string field.- // 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];-+ // A proto2 file can set this to true to opt in to UTF-8 checking for Java,+ // which will throw an exception if invalid UTF-8 is parsed from the wire or+ // assigned to a string field.+ //+ // TODO: clarify exactly what kinds of field types this option+ // applies to, and update these docs accordingly.+ //+ // Proto3 files already perform these checks. Setting the option explicitly to+ // false has no effect: it cannot be used to opt proto3 files out of UTF-8+ // checks.+ 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:@@ -367,8 +480,6 @@ // - Otherwise, the basename of the .proto file, without extension. optional string go_package = 11; -- // 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,21 +490,21 @@ // 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];+ reserved 42; // removed php_generic_services+ reserved "php_generic_services"; // 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 // generated classes from this .proto. There is no default.@@ -417,10 +528,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 +538,9 @@ // determining the ruby package. optional string ruby_package = 45; + // Any features defined in the specific edition.+ optional FeatureSet features = 50;+ // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. repeated UninterpretedOption uninterpreted_option = 999;@@ -458,19 +571,21 @@ // // 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]; + reserved 4, 5, 6;+ // Whether the message is an automatically generated map entry type for the // maps field. //@@ -486,7 +601,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 +612,21 @@ reserved 8; // javalite_serializable reserved 9; // javanano_as_lite + // Enable the legacy handling of JSON field name conflicts. This lowercases+ // and strips underscored from the fields before comparison in proto3 only.+ // The new behavior takes `json_name` into account and applies to proto2 as+ // well.+ //+ // This should only be used as a temporary measure against broken builds due+ // to the change in behavior for JSON field name conflicts.+ //+ // TODO This is legacy behavior we plan to remove once downstream+ // teams have had time to migrate.+ optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];++ // Any features defined in the specific edition.+ optional FeatureSet features = 12;+ // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -505,15 +635,24 @@ } message FieldOptions {+ // NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. // The ctype option instructs the C++ code generator to use a different // representation of the field than it normally would. See the specific- // options below. This option is not yet implemented in the open source- // release -- sorry, we'll try to include it in a future version!- optional CType ctype = 1 [default = STRING];+ // options below. This option is only implemented to support use of+ // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of+ // type "bytes" in the open source release.+ // TODO: make ctype actually deprecated.+ optional CType ctype = 1 [/*deprecated = true,*/ default = STRING]; enum CType { // Default mode. STRING = 0; + // The option [ctype=CORD] may be applied to a non-repeated field of type+ // "bytes". It indicates that in C++, the data should be stored in a Cord+ // instead of a string. For very large strings, this may reduce memory+ // fragmentation. It may also allow better performance when parsing from a+ // Cord, or when parsing with aliasing enabled, as the parsed Cord may then+ // alias the original buffer. CORD = 1; STRING_PIECE = 2;@@ -522,7 +661,9 @@ // a more efficient representation on the wire. Rather than repeatedly // writing the tag and type for each element, the entire array is encoded as // a single length-delimited blob. In proto3, only explicit setting it to- // false will avoid using packed encoding.+ // false will avoid using packed encoding. This option is prohibited in+ // Editions, but the `repeated_field_encoding` feature can be used to control+ // the behavior. optional bool packed = 2; // The jstype option determines the JavaScript type used for values of the@@ -565,39 +706,106 @@ // call from multiple threads concurrently, while non-const methods continue // to require exclusive access. //- //- // Note that implementations may choose not to check required fields within- // a lazy sub-message. That is, calling IsInitialized() on the outer message- // may return true even if the inner message has missing required fields.- // This is necessary because otherwise the inner message would have to be- // parsed in order to perform the check, defeating the purpose of lazy- // parsing. An implementation which chooses not to check required fields- // must be consistent about it. That is, for any particular sub-message, the- // 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];+ // Note that lazy message fields are still eagerly verified to check+ // ill-formed wireformat or missing required fields. Calling IsInitialized()+ // on the outer message would fail if the inner message has missing required+ // fields. Failed verification would result in parsing failure (except when+ // uninitialized messages are acceptable).+ optional bool lazy = 5 [default = false]; + // unverified_lazy does no correctness checks on the byte stream. This should+ // only be used where lazy with verification is prohibitive for performance+ // reasons.+ optional bool unverified_lazy = 15 [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]; + // Indicate that the field value should not be printed out when using debug+ // formats, e.g. when the field contains sensitive credentials.+ optional bool debug_redact = 16 [default = false]; + // If set to RETENTION_SOURCE, the option will be omitted from the binary.+ // Note: as of January 2023, support for this is in progress and does not yet+ // have an effect (b/264593489).+ enum OptionRetention {+ RETENTION_UNKNOWN = 0;+ RETENTION_RUNTIME = 1;+ RETENTION_SOURCE = 2;+ }++ optional OptionRetention retention = 17;++ // This indicates the types of entities that the field may apply to when used+ // as an option. If it is unset, then the field may be freely used as an+ // option on any kind of entity. Note: as of January 2023, support for this is+ // in progress and does not yet have an effect (b/264593489).+ enum OptionTargetType {+ TARGET_TYPE_UNKNOWN = 0;+ TARGET_TYPE_FILE = 1;+ TARGET_TYPE_EXTENSION_RANGE = 2;+ TARGET_TYPE_MESSAGE = 3;+ TARGET_TYPE_FIELD = 4;+ TARGET_TYPE_ONEOF = 5;+ TARGET_TYPE_ENUM = 6;+ TARGET_TYPE_ENUM_ENTRY = 7;+ TARGET_TYPE_SERVICE = 8;+ TARGET_TYPE_METHOD = 9;+ }++ repeated OptionTargetType targets = 19;++ message EditionDefault {+ optional Edition edition = 3;+ optional string value = 2; // Textproto value.+ }+ repeated EditionDefault edition_defaults = 20;++ // Any features defined in the specific edition.+ optional FeatureSet features = 21;++ // Information about the support window of a feature.+ message FeatureSupport {+ // The edition that this feature was first available in. In editions+ // earlier than this one, the default assigned to EDITION_LEGACY will be+ // used, and proto files will not be able to override it.+ optional Edition edition_introduced = 1;++ // The edition this feature becomes deprecated in. Using this after this+ // edition may trigger warnings.+ optional Edition edition_deprecated = 2;++ // The deprecation warning text if this feature is used after the edition it+ // was marked deprecated in.+ optional string deprecation_warning = 3;++ // The edition this feature is no longer available in. In editions after+ // this one, the last default assigned will be used, and proto files will+ // not be able to override it.+ optional Edition edition_removed = 4;+ }+ optional FeatureSupport feature_support = 22;+ // 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; - reserved 4; // removed jtype+ reserved 4; // removed jtype+ reserved 18; // reserve target, target_obsolete_do_not_use } message OneofOptions {+ // Any features defined in the specific edition.+ optional FeatureSet features = 1;+ // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -615,10 +823,21 @@ // 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 + // Enable the legacy handling of JSON field name conflicts. This lowercases+ // and strips underscored from the fields before comparison in proto3 only.+ // The new behavior takes `json_name` into account and applies to proto2 as+ // well.+ // TODO Remove this legacy behavior once downstream teams have+ // had time to migrate.+ optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];++ // Any features defined in the specific edition.+ optional FeatureSet features = 7;+ // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -631,8 +850,19 @@ // 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]; + // Any features defined in the specific edition.+ optional FeatureSet features = 2;++ // Indicate that fields annotated with this enum value should not be printed+ // out when using debug formats, e.g. when the field contains sensitive+ // credentials.+ optional bool debug_redact = 3 [default = false];++ // Information about the support window of a feature value.+ optional FieldOptions.FeatureSupport feature_support = 4;+ // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -642,6 +872,9 @@ message ServiceOptions { + // Any features defined in the specific edition.+ optional FeatureSet features = 34;+ // Note: Field numbers 1 through 32 are reserved for Google's internal RPC // framework. We apologize for hoarding these numbers to ourselves, but // we were already using them long before we decided to release Protocol@@ -651,7 +884,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,19 +904,22 @@ // 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]; + // Any features defined in the specific edition.+ optional FeatureSet features = 35;+ // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -691,7 +927,6 @@ extensions 1000 to max; } - // A message representing a option the parser does not recognize. This only // appears in options protos created by the compiler::Parser class. // DescriptorPool resolves these when building Descriptor objects. Therefore,@@ -702,8 +937,8 @@ // The name of the uninterpreted option. Each string represents a segment in // a dot-separated name. is_extension is true iff a segment represents an // extension (denoted with parentheses in options specs in .proto files).- // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents- // "foo.(bar.baz).qux".+ // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents+ // "foo.(bar.baz).moo". message NamePart { required string name_part = 1; required bool is_extension = 2;@@ -721,6 +956,172 @@ } // ===================================================================+// Features++// TODO Enums in C++ gencode (and potentially other languages) are+// not well scoped. This means that each of the feature enums below can clash+// with each other. The short names we've chosen maximize call-site+// readability, but leave us very open to this scenario. A future feature will+// be designed and implemented to handle this, hopefully before we ever hit a+// conflict here.+message FeatureSet {+ enum FieldPresence {+ FIELD_PRESENCE_UNKNOWN = 0;+ EXPLICIT = 1;+ IMPLICIT = 2;+ LEGACY_REQUIRED = 3;+ }+ optional FieldPresence field_presence = 1 [+ retention = RETENTION_RUNTIME,+ targets = TARGET_TYPE_FIELD,+ targets = TARGET_TYPE_FILE,+ feature_support = {+ edition_introduced: EDITION_2023,+ },+ edition_defaults = { edition: EDITION_LEGACY, value: "EXPLICIT" },+ edition_defaults = { edition: EDITION_PROTO3, value: "IMPLICIT" },+ edition_defaults = { edition: EDITION_2023, value: "EXPLICIT" }+ ];++ enum EnumType {+ ENUM_TYPE_UNKNOWN = 0;+ OPEN = 1;+ CLOSED = 2;+ }+ optional EnumType enum_type = 2 [+ retention = RETENTION_RUNTIME,+ targets = TARGET_TYPE_ENUM,+ targets = TARGET_TYPE_FILE,+ feature_support = {+ edition_introduced: EDITION_2023,+ },+ edition_defaults = { edition: EDITION_LEGACY, value: "CLOSED" },+ edition_defaults = { edition: EDITION_PROTO3, value: "OPEN" }+ ];++ enum RepeatedFieldEncoding {+ REPEATED_FIELD_ENCODING_UNKNOWN = 0;+ PACKED = 1;+ EXPANDED = 2;+ }+ optional RepeatedFieldEncoding repeated_field_encoding = 3 [+ retention = RETENTION_RUNTIME,+ targets = TARGET_TYPE_FIELD,+ targets = TARGET_TYPE_FILE,+ feature_support = {+ edition_introduced: EDITION_2023,+ },+ edition_defaults = { edition: EDITION_LEGACY, value: "EXPANDED" },+ edition_defaults = { edition: EDITION_PROTO3, value: "PACKED" }+ ];++ enum Utf8Validation {+ UTF8_VALIDATION_UNKNOWN = 0;+ VERIFY = 2;+ NONE = 3;+ reserved 1;+ }+ optional Utf8Validation utf8_validation = 4 [+ retention = RETENTION_RUNTIME,+ targets = TARGET_TYPE_FIELD,+ targets = TARGET_TYPE_FILE,+ feature_support = {+ edition_introduced: EDITION_2023,+ },+ edition_defaults = { edition: EDITION_LEGACY, value: "NONE" },+ edition_defaults = { edition: EDITION_PROTO3, value: "VERIFY" }+ ];++ enum MessageEncoding {+ MESSAGE_ENCODING_UNKNOWN = 0;+ LENGTH_PREFIXED = 1;+ DELIMITED = 2;+ }+ optional MessageEncoding message_encoding = 5 [+ retention = RETENTION_RUNTIME,+ targets = TARGET_TYPE_FIELD,+ targets = TARGET_TYPE_FILE,+ feature_support = {+ edition_introduced: EDITION_2023,+ },+ edition_defaults = { edition: EDITION_LEGACY, value: "LENGTH_PREFIXED" }+ ];++ enum JsonFormat {+ JSON_FORMAT_UNKNOWN = 0;+ ALLOW = 1;+ LEGACY_BEST_EFFORT = 2;+ }+ optional JsonFormat json_format = 6 [+ retention = RETENTION_RUNTIME,+ targets = TARGET_TYPE_MESSAGE,+ targets = TARGET_TYPE_ENUM,+ targets = TARGET_TYPE_FILE,+ feature_support = {+ edition_introduced: EDITION_2023,+ },+ edition_defaults = { edition: EDITION_LEGACY, value: "LEGACY_BEST_EFFORT" },+ edition_defaults = { edition: EDITION_PROTO3, value: "ALLOW" }+ ];++ reserved 999;++ extensions 1000 to 9994 [+ declaration = {+ number: 1000,+ full_name: ".pb.cpp",+ type: ".pb.CppFeatures"+ },+ declaration = {+ number: 1001,+ full_name: ".pb.java",+ type: ".pb.JavaFeatures"+ },+ declaration = { number: 1002, full_name: ".pb.go", type: ".pb.GoFeatures" },+ declaration = {+ number: 9990,+ full_name: ".pb.proto1",+ type: ".pb.Proto1Features"+ }+ ];++ extensions 9995 to 9999; // For internal testing+ extensions 10000; // for https://github.com/bufbuild/protobuf-es+}++// A compiled specification for the defaults of a set of features. These+// messages are generated from FeatureSet extensions and can be used to seed+// feature resolution. The resolution with this object becomes a simple search+// for the closest matching edition, followed by proto merges.+message FeatureSetDefaults {+ // A map from every known edition with a unique set of defaults to its+ // defaults. Not all editions may be contained here. For a given edition,+ // the defaults at the closest matching edition ordered at or before it should+ // be used. This field must be in strict ascending order by edition.+ message FeatureSetEditionDefault {+ optional Edition edition = 3;++ // Defaults of features that can be overridden in this edition.+ optional FeatureSet overridable_features = 4;++ // Defaults of features that can't be overridden in this edition.+ optional FeatureSet fixed_features = 5;++ reserved 1, 2;+ reserved "features";+ }+ repeated FeatureSetEditionDefault defaults = 1;++ // The minimum supported edition (inclusive) when this was constructed.+ // Editions before this will not have defaults.+ optional Edition minimum_edition = 4;++ // The maximum known edition (inclusive) when this was constructed. Editions+ // after this will not have reliable defaults.+ optional Edition maximum_edition = 5;+}++// =================================================================== // Optional source code info // Encapsulates information about the original source file from which a@@ -763,7 +1164,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@@ -775,8 +1176,8 @@ // location. // // Each element is a field number or an index. They form a path from- // the root FileDescriptorProto to the place where the definition. For- // example, this path:+ // the root FileDescriptorProto to the place where the definition appears.+ // For example, this path: // [ 4, 3, 2, 7, 1 ] // refers to: // file.message_type(3) // 4, 3@@ -794,14 +1195,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@@ -830,13 +1231,13 @@ // // Comment attached to baz. // // Another line attached to baz. //- // // Comment attached to qux.+ // // Comment attached to moo. // //- // // Another line attached to qux.- // optional double qux = 4;+ // // Another line attached to moo.+ // optional double moo = 4; // // // Detached comment for corge. This is not leading or trailing comments- // // to qux or corge because there are blank lines separating it from+ // // to moo or corge because there are blank lines separating it from // // both. // // // Detached comment for corge paragraph 2.@@ -866,7 +1267,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;@@ -876,8 +1277,20 @@ optional int32 begin = 3; // Identifies the ending offset in bytes in the generated code that- // relates to the identified offset. The end offset should be one past+ // relates to the identified object. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). optional int32 end = 4;++ // Represents the identified object's effect on the element in the original+ // .proto file.+ enum Semantic {+ // There is no effect or the effect is indescribable.+ NONE = 0;+ // The element is set or otherwise mutated.+ SET = 1;+ // An alias to the element is returned.+ ALIAS = 2;+ }+ optional Semantic semantic = 5; } }
proto-lens.cabal view
@@ -1,11 +1,11 @@--- This file has been generated from package.yaml by hpack version 0.28.2.+cabal-version: 1.12++-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack------ hash: 4f92a795e1d923f48abe676c6c1e012d63d6ee27875f160ef0f14dd0f3710ba6 name: proto-lens-version: 0.4.0.1+version: 0.7.1.7 synopsis: A lens-based implementation of protocol buffers in Haskell. description: The proto-lens library provides an API for protocol buffers using modern Haskell language and library patterns. Specifically, it provides: .@@ -23,12 +23,11 @@ license: BSD3 license-file: LICENSE build-type: Simple-cabal-version: >= 1.10 extra-source-files: Changelog.md data-files:- proto-lens-imports/google/protobuf/compiler/plugin.proto proto-lens-imports/google/protobuf/descriptor.proto+ proto-lens-imports/google/protobuf/compiler/plugin.proto source-repository head type: git@@ -38,33 +37,71 @@ library exposed-modules: Data.ProtoLens+ Data.ProtoLens.Combinators Data.ProtoLens.Default Data.ProtoLens.Encoding+ Data.ProtoLens.Encoding.Bytes+ Data.ProtoLens.Encoding.Growing+ Data.ProtoLens.Encoding.Parser+ Data.ProtoLens.Encoding.Parser.Unsafe Data.ProtoLens.Encoding.Wire+ Data.ProtoLens.Field+ Data.ProtoLens.Labels Data.ProtoLens.Message Data.ProtoLens.Message.Enum+ Data.ProtoLens.Prism Data.ProtoLens.Service.Types Data.ProtoLens.TextFormat- Proto.Google.Protobuf.Compiler.Plugin- Proto.Google.Protobuf.Compiler.Plugin_Fields- Proto.Google.Protobuf.Descriptor- Proto.Google.Protobuf.Descriptor_Fields other-modules:- Data.ProtoLens.Encoding.Bytes+ Data.ProtoLens.Encoding.Parser.Internal Data.ProtoLens.TextFormat.Parser hs-source-dirs: src build-depends:- attoparsec ==0.13.*- , base >=4.9 && <4.13- , bytestring ==0.10.*- , containers >=0.5 && <0.7- , deepseq ==1.4.*- , lens-family ==1.2.*- , lens-labels ==0.3.*+ base >=4.10 && <4.23+ , bytestring >=0.10 && <0.14+ , containers >=0.5 && <0.9+ , deepseq >=1.4 && <1.6+ , ghc-prim >=0.4 && <0.14+ , lens-family >=1.2 && <2.2 , parsec ==3.1.* , pretty ==1.1.*- , text ==1.2.*- , transformers >=0.4 && <0.6- , void ==0.7.*+ , primitive >=0.6 && <0.10+ , profunctors >=5.2 && <6.0+ , tagged ==0.8.*+ , text >=1.2 && <2.2+ , transformers >=0.4 && <0.7+ , vector >=0.11 && <0.14+ default-language: Haskell2010++test-suite growing_test+ type: exitcode-stdio-1.0+ main-is: growing_test.hs+ other-modules:+ Paths_proto_lens+ hs-source-dirs:+ tests+ build-depends:+ QuickCheck+ , base+ , proto-lens+ , tasty+ , tasty-quickcheck+ , vector+ default-language: Haskell2010++test-suite parser_test+ type: exitcode-stdio-1.0+ main-is: parser_test.hs+ other-modules:+ Paths_proto_lens+ hs-source-dirs:+ tests+ build-depends:+ QuickCheck+ , base+ , bytestring+ , proto-lens+ , tasty+ , tasty-quickcheck default-language: Haskell2010
+ src/Data/ProtoLens/Combinators.hs view
@@ -0,0 +1,47 @@+-- Copyright 2016 Google Inc. All Rights Reserved.+--+-- Use of this source code is governed by a BSD-style+-- license that can be found in the LICENSE file or at+-- https://developers.google.com/open-source/licenses/bsd++{-# LANGUAGE RankNTypes #-}+-- | An assorted collection of functions useful when working with ProtoLens+-- protocol buffers. These functions are inspired by functionality found in+-- the protobuf implementation in other languages.+module Data.ProtoLens.Combinators+ ( has+ , clear+ , make+ , modifyInState+ ) where++import Control.Monad.Trans.State (State, execState)+import Data.ProtoLens (Message(..))+import Data.Maybe (isJust)+import Lens.Family2 (LensLike, Phantom, Setter, to, (.~))++-- | Turns a 'LensLike' getting a 'Maybe' into a 'Getter' of a 'Bool'+-- that returns @True@ when the 'Maybe' is @Just@ something.+--+-- I.e., makes a getter for a 'Maybe' field that returns whether it's set.+has :: Phantom f => LensLike f a a' (Maybe b) b' -> LensLike f a a' Bool b''+has = (. to isJust)++-- | Sets the provided lens in @a@ to @Nothing@.+clear :: Setter a a' b (Maybe b') -> a -> a'+clear setter = setter .~ Nothing++-- | Creates a 'Default' and then applies the provided `State` to it. This is+-- convenient for creating complicated structures.+make :: Message msg => State msg a -> msg+make = modifyInState defMessage++-- | Allows one to modify a value in the 'State' monad. Note that this is+-- just for syntactic convenience with @do@ blocks, e.g.+--+-- @+-- newThing = modifyInState thing $ do+-- ...+-- @+modifyInState :: s -> State s a -> s+modifyInState = flip execState
src/Data/ProtoLens/Encoding.hs view
@@ -1,83 +1,33 @@--- Copyright 2016 Google Inc. All Rights Reserved.------ Use of this source code is governed by a BSD-style--- license that can be found in the LICENSE file or at--- https://developers.google.com/open-source/licenses/bsd---- | Functions for encoding and decoding protocol buffer Messages.------ TODO: Currently all operations are on strict ByteStrings;--- we should try to generalize to lazy Bytestrings as well.-{-# LANGUAGE BangPatterns #-}-{-# LANGUAGE GADTs #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE PatternGuards #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TypeApplications #-}-module Data.ProtoLens.Encoding(+{-# LANGUAGE CPP #-}+module Data.ProtoLens.Encoding ( encodeMessage, buildMessage,- buildMessageDelimited, decodeMessage,+ parseMessage, decodeMessageOrDie,+ -- ** Delimited messages+ buildMessageDelimited,+ parseMessageDelimited,+ decodeMessageDelimitedH, ) where -import Data.ProtoLens.Message-import Data.ProtoLens.Encoding.Bytes-import Data.ProtoLens.Encoding.Wire+import System.IO (Handle) -import Control.Applicative ((<|>))-import Control.Monad (guard)-import Data.Attoparsec.ByteString as Parse-import Data.Bool (bool)-import Data.Monoid ((<>))-import Data.Proxy (Proxy(Proxy))-import Data.Text.Encoding (encodeUtf8, decodeUtf8')-import Data.Text.Encoding.Error (UnicodeException(..))-import qualified Data.Text as T-import qualified Data.ByteString as B-import qualified Data.Map.Strict as Map-import Data.ByteString.Lazy.Builder as Builder-import qualified Data.ByteString.Lazy as L-import Lens.Family2 (Lens', set, over, (^.), (&))+import Data.ProtoLens.Message (Message(..))+import Data.ProtoLens.Encoding.Bytes (Parser, Builder)+import qualified Data.ProtoLens.Encoding.Bytes as Bytes --- TODO: We could be more incremental when parsing/encoding length-based fields,--- rather than forcing the whole thing. E.g., for encoding we're doing extra--- allocation by building an intermediate bytestring.+import Control.Monad.IO.Class (liftIO)+import Control.Monad.Trans.Except (runExceptT, ExceptT(..))+import qualified Data.ByteString as B+#if !MIN_VERSION_base(4,11,0)+import Data.Semigroup ((<>))+#endif -- | Decode a message from its wire format. Returns 'Left' if the decoding -- fails. decodeMessage :: Message msg => B.ByteString -> Either String msg-decodeMessage input = parseOnly (parseMessage endOfInput) input---- | Parse a message with the given ending delimiter (which will be EndGroup in--- the case of a group, and end-of-input otherwise).-parseMessage :: forall msg . Message msg => Parser () -> Parser msg-parseMessage end = (Parse.<?> T.unpack (messageName (Proxy @msg))) $ do- (msg, unsetFields) <- loop defMessage requiredFields- if Map.null unsetFields- then return $ over unknownFields reverse- $ reverseRepeatedFields fields msg- else fail $ "Missing required fields "- ++ show (map fieldDescriptorName- $ Map.elems $ unsetFields)- where- fields = fieldsByTag- addUnknown :: TaggedValue -> msg -> msg- addUnknown !f = over' unknownFields (f :)- requiredFields = Map.filter isRequired fields- loop :: msg -> Map.Map Tag (FieldDescriptor msg)- -> Parser (msg, Map.Map Tag (FieldDescriptor msg))- loop msg unsetFields = ((msg, unsetFields) <$ end)- <|> do- tv@(TaggedValue tag _) <- getTaggedValue- case Map.lookup tag fields of- Nothing -> (loop $! addUnknown tv msg) unsetFields- Just field -> do- !msg' <- parseAndAddField msg field tv- <?> fieldDescriptorName field- loop msg' $! Map.delete tag unsetFields+decodeMessage = Bytes.runParser parseMessage -- | Decode a message from its wire format. Throws an error if the decoding -- fails.@@ -86,90 +36,9 @@ Left e -> error $ "decodeMessageOrDie: " ++ e Right x -> x -runEither :: Either String a -> Parser a-runEither = either fail return--parseAndAddField :: msg- -> FieldDescriptor msg- -> TaggedValue- -> Parser msg-parseAndAddField- !msg- (FieldDescriptor _ typeDescriptor accessor)- (TaggedValue tag (WireValue wt val)) = let- getSimpleVal = case typeDescriptor of- MessageField GroupType -> do- Equal <- equalWireTypes StartGroup wt- parseMessage (endOfGroup tag)- MessageField MessageType -> do- Equal <- equalWireTypes Lengthy wt- runEither $ decodeMessage val- ScalarField f -> case fieldWireType f of- FieldWireType fieldWt _ get -> do- Equal <- equalWireTypes fieldWt wt- runEither $ get val- -- Get a block of packed values, reversed.- getPackedVals = case typeDescriptor of- MessageField _ -> fail "Messages can't be packed"- ScalarField f -> case fieldWireType f of- FieldWireType fieldWt _ get -> do- Equal <- equalWireTypes Lengthy wt- let getElt = do- wv <- getWireValue fieldWt- x <- runEither $ get wv- return $! x- runEither $ parseOnly (manyReversedTill getElt endOfInput) val- in case accessor of- PlainField _ f -> do- !x <- getSimpleVal- return $! set f x msg- OptionalField f -> do- !x <- getSimpleVal- return $! set f (Just x) msg- -- Parse either a packed or unpacked representation,- -- depending on how it was encoded.- -- Note that if fieldWt is Lengthy (e.g., "string" or- -- message) we should always parse it as unpacked.- RepeatedField _ f- -> (do- !x <- getSimpleVal- return $! over' f (x :) msg)- <|> (do- xs <- getPackedVals- return $! over' f (xs ++) msg)- <|> fail ("Expected a repeated field wire type but found "- ++ show wt)- MapField keyLens valueLens f -> do- entry <- getSimpleVal- let !key = entry ^. keyLens- let !value = entry ^. valueLens- return $! over f- (Map.insert key value)- msg---- | Strict version of 'over' that forces the old value.--- Helps prevent gross space leaks when modifying a list field.------ In particular, a naive `@over f (x :) y@ keeps the old value of @y@ around--- in a thunk, because @(:)@ isn't strict in its second argument. (Similarly--- for @(++)@.)-over' :: Lens' a b -> (b -> b) -> a -> a-over' f g = over f (\(!x) -> g x)---- | Run the parser zero or more times, until the "end" parser succeeds.--- Returns a list of the parsed elements, in reverse order.-manyReversedTill :: Parser a -> Parser b -> Parser [a]-manyReversedTill p end = loop []- where- loop xs = (end >> return xs) <|> (p >>= \x -> loop (x:xs))- -- | Encode a message to the wire format as a strict 'ByteString'. encodeMessage :: Message msg => msg -> B.ByteString-encodeMessage = L.toStrict . toLazyByteString . buildMessage---- | Encode a message to the wire format, as part of a 'Builder'.-buildMessage :: Message msg => msg -> Builder-buildMessage = foldMap putTaggedValue . messageToTaggedValues+encodeMessage = Bytes.runBuilder . buildMessage -- | Encode a message to the wire format, prefixed by its size as a VarInt, -- as part of a 'Builder'.@@ -178,113 +47,18 @@ -- format expected by some protocols. buildMessageDelimited :: Message msg => msg -> Builder buildMessageDelimited msg =- let b = L.toStrict . toLazyByteString $ buildMessage msg in- putVarInt (fromIntegral $ B.length b) <> byteString b---- | Encode a message as a sequence of key-value pairs.-messageToTaggedValues :: Message msg => msg -> [TaggedValue]-messageToTaggedValues msg =- mconcat- [ messageFieldToVals tag fieldDescr msg- | (tag, fieldDescr) <- Map.toList fieldsByTag- ]- ++ msg ^. unknownFields--messageFieldToVals :: Tag -> FieldDescriptor a -> a -> [TaggedValue]-messageFieldToVals tag (FieldDescriptor _ typeDescriptor accessor) msg =- let- embed src- = case typeDescriptor of- MessageField MessageType -> [TaggedValue tag $ WireValue Lengthy- $ encodeMessage src]- MessageField GroupType ->- TaggedValue tag (WireValue StartGroup ())- : messageToTaggedValues src- ++ [TaggedValue tag $ WireValue EndGroup ()]- ScalarField f -> case fieldWireType f of- FieldWireType wt convert _ ->- [TaggedValue tag $ WireValue wt (convert src)]- embedPacked [] = []- embedPacked src- = case typeDescriptor of- MessageField _ -> error "Messages can't be packed"- ScalarField f -> case fieldWireType f of- FieldWireType wt convert _ -> let- v = L.toStrict $ toLazyByteString- $ mconcat [putWireValue wt (convert x) | x <- src]- in [TaggedValue tag $ WireValue Lengthy v]- in case accessor of- PlainField d f- -- proto3 optional scalar field:- | Optional <- d, src == fieldDefault -> []- -- proto3 optional non-scalar field, or proto2 required field:- | otherwise -> embed src- where src = msg ^. f- -- proto2 optional field:- OptionalField f -> foldMap embed (msg ^. f)- -- Note: using 'concatMap' instead of 'foldMap' below- -- seems to allow better list fusion.- RepeatedField Unpacked f -> concatMap embed (msg ^. f)- RepeatedField Packed f -> embedPacked (msg ^. f)- MapField keyLens valueLens f ->- concatMap (\(k, v) -> embed $ defMessage- & set keyLens k- & set valueLens v)- $ Map.toList (msg ^. f)--data FieldWireType value where- FieldWireType :: WireType w -> (value -> w) -> (w -> Either String value)- -> FieldWireType value--fieldWireType :: ScalarField value -> FieldWireType value--- TODO: Don't let toEnum crash on unknown enum values.-fieldWireType EnumField = simpleFieldWireType VarInt- (fromIntegral . fromEnum)- (toEnum . fromIntegral)-fieldWireType BoolField = simpleFieldWireType VarInt (bool 0 1) (/= 0)--- Note: int{32,64} and sfixed{32,64} are stored using the signed -> unsigned--- conversion of fromIntegral.-fieldWireType Int32Field = integralFieldWireType VarInt-fieldWireType Int64Field = integralFieldWireType VarInt-fieldWireType UInt32Field = integralFieldWireType VarInt-fieldWireType UInt64Field = identityFieldWireType VarInt-fieldWireType SInt32Field = simpleFieldWireType VarInt- (fromIntegral . signedInt32ToWord)- (wordToSignedInt32 . fromIntegral)-fieldWireType SInt64Field = simpleFieldWireType VarInt- signedInt64ToWord wordToSignedInt64-fieldWireType Fixed32Field = identityFieldWireType Fixed32-fieldWireType Fixed64Field = identityFieldWireType Fixed64-fieldWireType SFixed32Field = integralFieldWireType Fixed32-fieldWireType SFixed64Field = integralFieldWireType Fixed64-fieldWireType FloatField = simpleFieldWireType Fixed32 floatToWord wordToFloat-fieldWireType DoubleField = simpleFieldWireType Fixed64- doubleToWord wordToDouble-fieldWireType StringField = FieldWireType Lengthy encodeUtf8- (stringizeError . decodeUtf8')-fieldWireType BytesField = identityFieldWireType Lengthy--endOfGroup :: Tag -> Parser ()-endOfGroup tag = do- TaggedValue tag' (WireValue wt _) <- getTaggedValue- Equal <- equalWireTypes EndGroup wt- guard (tag == tag')---- | Helper function to define a field type whose decoding operation can't fail.-simpleFieldWireType :: WireType w -> (value -> w) -> (w -> value)- -> FieldWireType value-simpleFieldWireType w f g = FieldWireType w f (return . g)---- | A simple field type which is the same as its wire type.-identityFieldWireType :: WireType w -> FieldWireType w-identityFieldWireType w = simpleFieldWireType w id id+ let b = encodeMessage msg+ in Bytes.putVarInt (fromIntegral $ B.length b) <> Bytes.putBytes b --- | A simple field type which converts to/from its wire type via--- "fromIntegral".-integralFieldWireType- :: (Integral w, Integral value) => WireType w -> FieldWireType value-integralFieldWireType w = simpleFieldWireType w fromIntegral fromIntegral+parseMessageDelimited :: Message msg => Parser msg+parseMessageDelimited = do+ len <- Bytes.getVarInt+ bytes <- Bytes.getBytes $ fromIntegral len+ either fail return $ decodeMessage bytes -stringizeError :: Either UnicodeException a -> Either String a-stringizeError (Left e) = Left (show e)-stringizeError (Right a) = Right a+-- | Same as @decodeMessage@ but for delimited messages read through a Handle+decodeMessageDelimitedH :: Message msg => Handle -> IO (Either String msg)+decodeMessageDelimitedH h = runExceptT $+ Bytes.getVarIntH h >>=+ liftIO . B.hGet h . fromIntegral >>=+ ExceptT . return . decodeMessage
src/Data/ProtoLens/Encoding/Bytes.hs view
@@ -5,64 +5,169 @@ -- https://developers.google.com/open-source/licenses/bsd {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE LambdaCase #-} -- | Utility functions for parsing and encoding individual types. module Data.ProtoLens.Encoding.Bytes(+ -- * Running encodings+ Parser,+ Builder,+ runParser,+ isolate,+ runBuilder,+ -- * Bytestrings+ getBytes,+ putBytes,+ -- * Text+ getText,+ -- * Integral types getVarInt,+ getVarIntH, putVarInt,- anyBits,+ getFixed32,+ getFixed64,+ putFixed32,+ putFixed64,+ -- * Floating-point types wordToFloat, wordToDouble, floatToWord, doubleToWord,+ -- * Signed types signedInt32ToWord, wordToSignedInt32, signedInt64ToWord, wordToSignedInt64,+ -- * Other utilities+ atEnd,+ runEither,+ (<?>),+ foldMapBuilder, ) where -import Data.Attoparsec.ByteString as Parse+import Control.Monad.IO.Class (liftIO)+import Control.Monad.Trans.Except (throwE, ExceptT) import Data.Bits-import Data.ByteString.Lazy.Builder as Builder+import Data.ByteString (ByteString)+import Data.ByteString.Builder as Builder+import qualified Data.ByteString.Builder.Internal as Internal+import qualified Data.ByteString.Lazy as L import Data.Int (Int32, Int64)-import Data.Monoid ((<>))-import Data.Word (Word32, Word64)+#if !MIN_VERSION_base(4,11,0)+import Data.Semigroup ((<>))+#endif+import qualified Data.Vector.Generic as V+import Data.Word (Word8, Word32, Word64)+import Foreign.Marshal (malloc, free)+import System.IO (Handle, hGetBuf)+#if MIN_VERSION_base(4,11,0)+import qualified GHC.Float as Float+import Foreign.Storable (peek)+#else import Foreign.Ptr (castPtr) import Foreign.Marshal.Alloc (alloca) import Foreign.Storable (Storable, peek, poke) import System.IO.Unsafe (unsafePerformIO)+#endif +import Data.ProtoLens.Encoding.Parser++-- | Constructs a strict 'ByteString' from the given 'Builder'.+runBuilder :: Builder -> ByteString+runBuilder = L.toStrict . Builder.toLazyByteString++-- | Emit a given @ByteString@.+putBytes :: ByteString -> Builder+putBytes = Builder.byteString+ -- VarInts are inherently unsigned; there are different ways of encoding -- negative numbers for int32/64 and sint32/64. getVarInt :: Parser Word64-getVarInt = loop 1 0+getVarInt = loopStart 0 1 where- loop !s !n = do- b <- anyWord8- let n' = n + s * fromIntegral (b .&. 127)- if (b .&. 128) == 0- then return $! n'- else loop (128*s) n'+ loopStart !n !s = getWord8 >>= getVarIntLoopFinish loopStart n s --- | Little-endian decoding function.-anyBits :: forall a . (Num a, FiniteBits a) => Parser a-anyBits = loop 0 0- where- size = finiteBitSize (undefined :: a)- loop !w !n- | n >= size = return w- | otherwise = do- b <- anyWord8- loop (w .|. shiftL (fromIntegral b) n) (n+8)+-- Same as getVarInt but reads from a Handle+getVarIntH :: Handle -> ExceptT String IO Word64+getVarIntH h = do+ buf <- liftIO malloc+ let loopStart !n !s =+ liftIO (hGetBuf h buf 1) >>=+ \case+ 1 -> liftIO (peek buf) >>=+ getVarIntLoopFinish loopStart n s+ _ -> throwE "Unexpected end of file"+ res <- loopStart 0 1+ liftIO $ free buf+ return res +getVarIntLoopFinish+ :: (Monad m)+ => (Word64 -> Word64 -> m Word64) -- "loop start" callback+ -> Word64+ -> Word64+ -> Word8+ -> m Word64+getVarIntLoopFinish ls !n !s !b = do+ let n' = decodeVarIntStep n s b+ if testMsb b+ then ls n' (128*s)+ else return $! n'++-- n -- result of previous step; s -- 128^{step index}; b -- step byte+decodeVarIntStep :: Word64 -> Word64 -> Word8 -> Word64+decodeVarIntStep n s b = n + s * fromIntegral (b .&. 127)++testMsb :: Word8 -> Bool+testMsb b = (b .&. 128) /= 0+ putVarInt :: Word64 -> Builder putVarInt n | n < 128 = Builder.word8 (fromIntegral n)- | otherwise = Builder.word8 (fromIntegral $ n .&. 127 .|. 128)+ | otherwise = Builder.word8 (fromIntegral $ n .|. 128) <> putVarInt (n `shiftR` 7) +getFixed32 :: Parser Word32+getFixed32 = getWord32le++getFixed64 :: Parser Word64+getFixed64 = do+ x <- getFixed32+ y <- getFixed32+ return $ fromIntegral y `shiftL` 32 + fromIntegral x++-- Note: putFixed32 and putFixed32 have added BangPatterns over the+-- standard Builders.+-- This works better when they're composed with other functions.+-- For example, consider `putFixed32 . floatToWord`.+-- Since `putFixed32` may return a continuation, it doesn't automatically+-- force the result of `floatToWord`, so the resulting Word32 must be kept+-- lazily. The extra strictness means that the Word32 will be evaluated+-- outside of the continuation, and GHC can pass it around unboxed.++putFixed32 :: Word32 -> Builder+putFixed32 !x = word32LE x++putFixed64 :: Word64 -> Builder+putFixed64 !x = word64LE x++#if MIN_VERSION_base(4,11,0)+wordToDouble :: Word64 -> Double+wordToDouble = Float.castWord64ToDouble++wordToFloat :: Word32 -> Float+wordToFloat = Float.castWord32ToFloat++doubleToWord :: Double -> Word64+doubleToWord = Float.castDoubleToWord64++floatToWord :: Float -> Word32+floatToWord = Float.castFloatToWord32++#else -- WARNING: SUPER UNSAFE! -- Helper function purely for converting between Word32/Word64 and -- Float/Double. Note that ideally we could just use unsafeCoerce, but this@@ -88,6 +193,7 @@ floatToWord :: Float -> Word32 floatToWord = cast+#endif signedInt32ToWord :: Int32 -> Word32 signedInt32ToWord n = fromIntegral $ shiftL n 1 `xor` shiftR n 31@@ -102,3 +208,30 @@ wordToSignedInt64 :: Word64 -> Int64 wordToSignedInt64 n = fromIntegral (shiftR n 1) `xor` negate (fromIntegral $ n .&. 1)++runEither :: Either String a -> Parser a+runEither = either fail return++-- | Loop over the elements of a vector and concatenate the resulting+-- @Builder@s.+--+-- This function has been hand-tuned to perform better than a naive+-- implementation using, e.g., Vector.foldr or a manual loop.+foldMapBuilder :: V.Vector v a => (a -> Builder) -> v a -> Builder+foldMapBuilder f = \v0 -> Internal.builder (loop v0)+ -- Place v0 on the right-hand side so that GHC actually inlines+ -- this function.+ where+ -- Fully-saturate the inner loop (rather than currying away `cont`+ -- and `bs`) to avoid GHC creating an intermediate continuation.+ loop v cont bs+ | V.null v = cont bs+ | otherwise = let+ !x = V.unsafeHead v+ -- lts-8.24 (ghc-8.0) doesn't inline unsafeTail well.+ -- We can remove the following bang when we bump the lower bound:+ !xs = V.unsafeTail v+ in Internal.runBuilderWith+ (f x)+ (loop xs cont) bs+{-# INLINE foldMapBuilder #-}
+ src/Data/ProtoLens/Encoding/Growing.hs view
@@ -0,0 +1,70 @@+-- | A mutable vector that grows in size.+--+-- Example usage:+--+-- > import qualified Data.ProtoLens.Encoding.Growing as Growing+-- > import qualified Data.Vector.Unboxed as V+-- > test :: IO (V.Vector Int)+-- > test = do+-- > v <- Growing.new+-- > v' <- Growing.append v 1+-- > v'' <- Growing.append v' 2+-- > v''' <- Growing.append v'' 3+-- > unsafeFreeze v'''+module Data.ProtoLens.Encoding.Growing (+ Growing,+ new,+ append,+ unsafeFreeze,+ RealWorld,+ ) where++import Control.Monad.Primitive (PrimMonad, PrimState, RealWorld)++import qualified Data.Vector.Generic as V+import qualified Data.Vector.Generic.Mutable as MV++-- | A mutable vector which can increase in capacity.+data Growing v s a = Growing+ {-# UNPACK #-} !Int+ -- The number of elements in the mutable vector+ -- that have already been set.+ !(V.Mutable v s a)+ -- TODOs for efficiency:+ -- - Try unpacking this. It's difficult as-is because+ -- V.Mutable is a type function.+ -- - MVectors support slicing, but we're not using that+ -- functionality, so we're passing around an extra unnecessary+ -- Int.++-- | Create a new empty growing vector.+new :: (PrimMonad m, V.Vector v a) => m (Growing v (PrimState m) a)+new = Growing 0 <$> MV.new 0++-- | Unsafely convert a growing vector to an immutable one without+-- copying. After this call, you may not use the growing vector+-- nor any other growing vectors that were used to produce this one.+unsafeFreeze+ :: (PrimMonad m, V.Vector v a)+ => Growing v (PrimState m) a -> m (v a)+unsafeFreeze (Growing len m) = V.unsafeFreeze (MV.take len m)++-- | Returns a new growing vector with a new element at the end.+-- Note that the return value may share storage with the input value.+-- Furthermore, calling @append@ twice on the same input may result+-- in two vectors that share the same storage.+append+ :: (PrimMonad m, V.Vector v a)+ => Growing v (PrimState m) a+ -> a+ -> m (Growing v (PrimState m) a)+append (Growing len v) x+ | len < MV.length v = do+ MV.unsafeWrite v len x+ return $ Growing (len + 1) v+ | otherwise = do+ let len' = 2 * len + 1+ v' <- MV.unsafeGrow v len'+ MV.unsafeWrite v' len x+ return $ Growing (len + 1) v'+{-# INLINE append #-}
+ src/Data/ProtoLens/Encoding/Parser.hs view
@@ -0,0 +1,120 @@+-- | A custom parsing monad, optimized for speed.+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE ScopedTypeVariables #-}+module Data.ProtoLens.Encoding.Parser+ ( Parser+ , runParser+ , atEnd+ , isolate+ , getWord8+ , getWord32le+ , getBytes+ , getText+ , (<?>)+ ) where++import Data.Bits (shiftL, (.|.))+import Data.Word (Word8, Word32)+import Data.ByteString (ByteString, packCStringLen)+import qualified Data.ByteString.Unsafe as B+import Data.Text (Text)+import Data.Text.Encoding (decodeUtf8')+import Foreign.Ptr+import Foreign.Storable+import System.IO.Unsafe (unsafePerformIO)++import Data.ProtoLens.Encoding.Parser.Internal++-- | Evaluates a parser on the given input.+--+-- If the parser does not consume all of the input, the rest of the+-- input is discarded and the parser still succeeds. Parsers may use+-- 'atEnd' to detect whether they are at the end of the input.+--+-- Values returned from actions in this monad will not hold onto the original+-- ByteString, but rather make immutable copies of subsets of its bytes.+runParser :: Parser a -> ByteString -> Either String a+runParser (Parser m) b =+ case unsafePerformIO $ B.unsafeUseAsCStringLen b+ $ \(p, len) -> m (p `plusPtr` len) (castPtr p) of+ ParseSuccess _ x -> Right x+ ParseFailure s -> Left s++-- | Returns True if there is no more input left to consume.+atEnd :: Parser Bool+atEnd = Parser $ \end pos -> return $ ParseSuccess pos (pos == end)++-- | Parse a one-byte word.+getWord8 :: Parser Word8+getWord8 = withSized 1 "getWord8: Unexpected end of input" peek++-- | Parser a 4-byte word in little-endian order.+getWord32le :: Parser Word32+getWord32le = withSized 4 "getWord32le: Unexpected end of input" $ \pos -> do+ b1 <- fromIntegral <$> peek pos+ b2 <- fromIntegral <$> peek (pos `plusPtr'` 1)+ b3 <- fromIntegral <$> peek (pos `plusPtr'` 2)+ b4 <- fromIntegral <$> peek (pos `plusPtr'` 3)+ let f b b' = b `shiftL` 8 .|. b'+ return $! f (f (f b4 b3) b2) b1++-- | Parse a sequence of zero or more bytes of the given length.+--+-- The new ByteString is an immutable copy of the bytes in the input+-- and will be managed separately on the Haskell heap from the original+-- input 'ByteString'.+--+-- Fails the parse if given a negative length.+getBytes :: Int -> Parser ByteString+getBytes n = withSized n "getBytes: Unexpected end of input"+ $ \pos -> packCStringLen (castPtr pos, n)++getText :: Int -> Parser Text+getText n = do+ r <- withSized n "getText: Unexpected end of input" $ \pos ->+ decodeUtf8' <$> B.unsafePackCStringLen (castPtr pos, n)+ either (fail . show) pure r++-- | Helper function for reading bytes from the current position and+-- advancing the pointer.+--+-- Fails the parse if given a negative length. (GHC will elide the check+-- if the length is a nonnegative constant.)+--+-- It is only safe for @f@ to peek between its argument @p@ and+-- @p `plusPtr` (len - 1)@, inclusive.+withSized :: Int -> String -> (Ptr Word8 -> IO a) -> Parser a+withSized len message f+ | len >= 0 = Parser $ \end pos ->+ let pos' = pos `plusPtr'` len+ in if pos' > end+ then return $ ParseFailure message+ else ParseSuccess pos' <$> f pos+ | otherwise = fail "withSized: negative length"+{-# INLINE withSized #-}++-- | Run the given parsing action as if there are only+-- @len@ bytes remaining. That is, once @len@ bytes have been+-- consumed, 'atEnd' will return 'True' and other actions+-- like 'getWord8' will act like there is no input remaining.+--+-- Fails the parse if given a negative length.+isolate :: Int -> Parser a -> Parser a+isolate len (Parser m)+ | len >= 0 = Parser $ \end pos ->+ let end' = pos `plusPtr` len+ in if end' > end+ then return $ ParseFailure "isolate: unexpected end of input"+ else m end' pos+ | otherwise = fail "isolate: negative length"++-- | If the parser fails, prepend an error message.+(<?>) :: Parser a -> String -> Parser a+Parser m <?> msg = Parser $ \end p -> wrap <$> m end p+ where+ wrap (ParseFailure s) = ParseFailure (msg ++ ": " ++ s)+ wrap r = r++-- | Advance a pointer. Unlike 'plusPtr', preserves the type of the input.+plusPtr' :: Ptr a -> Int -> Ptr a+plusPtr' = plusPtr
+ src/Data/ProtoLens/Encoding/Parser/Internal.hs view
@@ -0,0 +1,50 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE LambdaCase #-}+-- | Definition of the parsing monad, plus internal+-- unsafe functions.+module Data.ProtoLens.Encoding.Parser.Internal+ ( Parser(..)+ , ParseResult(..)+ ) where++import Control.Monad (ap)+import qualified Control.Monad.Fail as Fail+import Data.Word (Word8)+import Foreign.Ptr++-- | A monad for parsing an input buffer.+newtype Parser a = Parser+ { unParser :: Ptr Word8 -- End position of the input+ -> Ptr Word8 -- Current position in the input+ -> IO (ParseResult a)+ }++data ParseResult a+ = ParseSuccess+ { _newPos :: !(Ptr Word8) -- ^ New position in the input+ , unParserResult :: a+ }+ | ParseFailure String++instance Functor ParseResult where+ fmap f (ParseSuccess p x) = ParseSuccess p (f x)+ fmap _ (ParseFailure s) = ParseFailure s++instance Functor Parser where+ fmap f (Parser g) = Parser $ \end cur -> fmap f <$> g end cur++instance Applicative Parser where+ pure x = Parser $ \_ cur -> return $ ParseSuccess cur x+ (<*>) = ap++instance Monad Parser where+#if !MIN_VERSION_base(4,13,0)+ fail = Fail.fail+#endif+ return = pure+ Parser f >>= g = Parser $ \end pos -> f end pos >>= \case+ ParseSuccess pos' x -> unParser (g x) end pos'+ ParseFailure s -> return $ ParseFailure s++instance Fail.MonadFail Parser where+ fail s = Parser $ \_ _ -> return $ ParseFailure s
+ src/Data/ProtoLens/Encoding/Parser/Unsafe.hs view
@@ -0,0 +1,21 @@+module Data.ProtoLens.Encoding.Parser.Unsafe+ ( unsafeLiftIO ) where++import Data.ProtoLens.Encoding.Parser.Internal++-- | Runs an arbitrary @IO@ action inside a @Parser@.+-- The generated code uses this function to construct vectors+-- efficiently by incrementally building up mutable vectors.+--+-- NOTE: This is unsafe since @runParser@+-- is a pure function, which lets us lift arbitrary IO into+-- pure operations.+-- However, here are some guarantees that we do get:+--+-- - For each individual call to 'runParser', the action+-- wrapped by 'unsafeLiftIO' will be called exactly once.+-- - Different calls to 'unsafeLiftIO' within the same call to+-- 'runParser' will be sequenced according to their order in the Parser+-- monad.+unsafeLiftIO :: IO a -> Parser a+unsafeLiftIO m = Parser $ \_ p -> ParseSuccess p <$> m
src/Data/ProtoLens/Encoding/Wire.hs view
@@ -1,72 +1,57 @@--- Copyright 2016 Google Inc. All Rights Reserved.+-- | Module defining the individual base wire types (e.g. VarInt, Fixed64). ----- Use of this source code is governed by a BSD-style--- license that can be found in the LICENSE file or at--- https://developers.google.com/open-source/licenses/bsd--{-# LANGUAGE GADTs #-}+-- They are used to represent the @unknownFields@ within the proto message.+--+-- Upstream docs:+-- <https://developers.google.com/protocol-buffers/docs/encoding#structure>+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE PatternGuards #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE RankNTypes #-}--- | Module defining the individual base wire types (e.g. VarInt, Fixed64) and--- how to encode/decode them.-module Data.ProtoLens.Encoding.Wire(- WireType(..),- SomeWireType(..),- WireValue(..),- Tag(..),- TaggedValue(..),- getTaggedValue,- putTaggedValue,- getWireValue,- putWireValue,- Equal(..),- equalWireTypes,- decodeFieldSet,+module Data.ProtoLens.Encoding.Wire+ ( Tag(..)+ , TaggedValue(..)+ , WireValue(..)+ , FieldSet+ , splitTypeAndTag+ , joinTypeAndTag+ , parseFieldSet+ , buildFieldSet+ , buildMessageSet+ , parseTaggedValueFromWire+ , parseMessageSetTaggedValueFromWire ) where import Control.DeepSeq (NFData(..))-import Data.Attoparsec.ByteString as Parse-import Data.Bits+import Data.Bits ((.&.), (.|.), shiftL, shiftR) import qualified Data.ByteString as B-import Data.ByteString.Lazy.Builder as Builder-import Data.Monoid ((<>))-import Data.Word+#if !MIN_VERSION_base(4,11,0)+import Data.Semigroup ((<>))+#endif+import Data.Word (Word8, Word32, Word64) import Data.ProtoLens.Encoding.Bytes -data WireType a where- -- Note: all of these types are fully strict (vs, say,- -- Data.ByteString.Lazy.ByteString). If that changes, we'll- -- need to update the NFData instance.- VarInt :: WireType Word64- Fixed64 :: WireType Word64- Fixed32 :: WireType Word32- Lengthy :: WireType B.ByteString- StartGroup :: WireType ()- EndGroup :: WireType ()--instance Show (WireType a) where- show = show . wireTypeToInt----- A value read from the wire-data WireValue = forall a . WireValue !(WireType a) !a--instance Show WireValue where- show (WireValue VarInt x) = show x- show (WireValue Fixed64 x) = show x- show (WireValue Fixed32 x) = show x- show (WireValue Lengthy x) = show x- show (WireValue StartGroup x) = show x- show (WireValue EndGroup x) = show x+-- | A tag that identifies a particular field of the message when converting+-- to/from the wire format.+newtype Tag = Tag { unTag :: Int }+ deriving (Show, Eq, Ord, Num, NFData) +-- | The encoding of some unknown field on the wire.+data WireValue+ = VarInt !Word64+ | Fixed64 !Word64+ | Lengthy !B.ByteString+ | StartGroup+ | EndGroup+ | Fixed32 !Word32+ deriving (Eq, Ord) --- The wire contents of a single key-value pair in a Message.+-- | A pair of an encoded field and a value. data TaggedValue = TaggedValue !Tag !WireValue- deriving (Show, Eq, Ord)+ deriving (Eq, Ord) +type FieldSet = [TaggedValue]+ -- TaggedValue, WireValue and Tag are strict, so their NFData instances are -- trivial: instance NFData TaggedValue where@@ -75,98 +60,86 @@ instance NFData WireValue where rnf = (`seq` ()) --- | A tag that identifies a particular field of the message when converting--- to/from the wire format.-newtype Tag = Tag { unTag :: Int}- deriving (Show, Eq, Ord, Num, NFData)--data Equal a b where- -- TODO: move Eq/Ord instance somewhere else?- Equal :: (Eq a, Ord a) => Equal a a---- Assert that two wire types are the same, or fail with a message about this--- field.-{-# INLINE equalWireTypes #-}-equalWireTypes :: Monad m => WireType a -> WireType b- -> m (Equal a b)-equalWireTypes VarInt VarInt = return Equal-equalWireTypes Fixed64 Fixed64 = return Equal-equalWireTypes Fixed32 Fixed32 = return Equal-equalWireTypes Lengthy Lengthy = return Equal-equalWireTypes StartGroup StartGroup = return Equal-equalWireTypes EndGroup EndGroup = return Equal-equalWireTypes expected actual- = fail $ "Expected wire type " ++ show expected- ++ " but found " ++ show actual--instance Eq WireValue where- WireValue t v == WireValue t' v'- | Just Equal <- equalWireTypes t t'- = v == v'- | otherwise = False+buildTaggedValue :: TaggedValue -> Builder+buildTaggedValue (TaggedValue tag wv) =+ putVarInt (joinTypeAndTag tag (wireValueToInt wv))+ <> buildWireValue wv -instance Ord WireValue where- WireValue t v `compare` WireValue t' v'- | Just Equal <- equalWireTypes t t'- = v `compare` v'- | otherwise = wireTypeToInt t `compare` wireTypeToInt t'+-- builds in legacy MessageSet format.+-- See https://github.com/protocolbuffers/protobuf/blob/dec4939439d9ca2adf2bb14edccf876c2587faf2/src/google/protobuf/descriptor.proto#L444+buildTaggedValueAsMessageSet :: TaggedValue -> Builder+buildTaggedValueAsMessageSet (TaggedValue (Tag t) wv) =+ buildTaggedValue ( TaggedValue 1 StartGroup)+ <> buildTaggedValue (TaggedValue 2 (VarInt $ fromIntegral t))+ <> buildTaggedValue (TaggedValue 3 wv)+ <> buildTaggedValue (TaggedValue 1 EndGroup) -getWireValue :: WireType a -> Parser a-getWireValue VarInt = getVarInt-getWireValue Fixed64 = anyBits-getWireValue Fixed32 = anyBits-getWireValue Lengthy = getVarInt >>= Parse.take . fromIntegral-getWireValue StartGroup = return ()-getWireValue EndGroup = return ()+buildWireValue :: WireValue -> Builder+buildWireValue (VarInt w) = putVarInt w+buildWireValue (Fixed64 w) = putFixed64 w+buildWireValue (Fixed32 w) = putFixed32 w+buildWireValue (Lengthy b) =+ putVarInt (fromIntegral $ B.length b)+ <> putBytes b+buildWireValue StartGroup = mempty+buildWireValue EndGroup = mempty -putWireValue :: WireType a -> a -> Builder-putWireValue VarInt n = putVarInt n-putWireValue Fixed64 n = word64LE n-putWireValue Fixed32 n = word32LE n-putWireValue Lengthy b = putVarInt (fromIntegral $ B.length b) <> byteString b-putWireValue StartGroup _ = mempty-putWireValue EndGroup _ = mempty+wireValueToInt :: WireValue -> Word8+wireValueToInt VarInt{} = 0+wireValueToInt Fixed64{} = 1+wireValueToInt Lengthy{} = 2+wireValueToInt StartGroup{} = 3+wireValueToInt EndGroup{} = 4+wireValueToInt Fixed32{} = 5 -data SomeWireType where- SomeWireType :: WireType a -> SomeWireType+parseTaggedValue :: Parser TaggedValue+parseTaggedValue = getVarInt >>= parseTaggedValueFromWire -wireTypeToInt :: WireType a -> Word64-wireTypeToInt VarInt = 0-wireTypeToInt Fixed64 = 1-wireTypeToInt Lengthy = 2-wireTypeToInt StartGroup = 3-wireTypeToInt EndGroup = 4-wireTypeToInt Fixed32 = 5+parseTaggedValueFromWire :: Word64 -> Parser TaggedValue+parseTaggedValueFromWire t =+ let (tag, w) = splitTypeAndTag t+ in TaggedValue tag <$> case w of+ 0 -> VarInt <$> getVarInt+ 1 -> Fixed64 <$> getFixed64+ 2 -> Lengthy <$> do+ len <- getVarInt+ getBytes $ fromIntegral len+ 3 -> return StartGroup+ 4 -> return EndGroup+ 5 -> Fixed32 <$> getFixed32+ _ -> fail $ "Unknown wire type " ++ show w -intToWireType :: Word64 -> Either String SomeWireType-intToWireType 0 = Right $ SomeWireType VarInt-intToWireType 1 = Right $ SomeWireType Fixed64-intToWireType 2 = Right $ SomeWireType Lengthy-intToWireType 3 = Right $ SomeWireType StartGroup-intToWireType 4 = Right $ SomeWireType EndGroup-intToWireType 5 = Right $ SomeWireType Fixed32-intToWireType n = Left $ "Unrecognized wire type " ++ show n+parseMessageSetTaggedValueFromWire :: Word64 -> Parser TaggedValue+parseMessageSetTaggedValueFromWire t =+ parseTaggedValueFromWire t >>= \v -> case v of+ TaggedValue 1 StartGroup -> parseTaggedValue >>= \ft -> case ft of+ TaggedValue 2 (VarInt f) -> parseTaggedValue >>= \dt -> case dt of+ TaggedValue 3 (Lengthy b) -> parseTaggedValue >>= \et -> case et of+ TaggedValue 1 EndGroup -> return $ TaggedValue (Tag $ fromIntegral f) (Lengthy b)+ _ -> fail "missing end_group"+ _ -> fail "missing message"+ _ -> fail "missing field tag"+ _ -> return v -putTypeAndTag :: WireType a -> Tag -> Builder-putTypeAndTag wt (Tag tag)- = putVarInt $ wireTypeToInt wt .|. fromIntegral tag `shiftL` 3+splitTypeAndTag :: Word64 -> (Tag, Word8)+splitTypeAndTag w = (fromIntegral $ w `shiftR` 3, fromIntegral (w .&. 7)) -getTypeAndTag :: Parser (SomeWireType, Tag)-getTypeAndTag = do- n <- getVarInt- case intToWireType (n .&. 7) of- Left err -> fail err- Right wt -> return (wt, fromIntegral $ n `shiftR` 3)+joinTypeAndTag :: Tag -> Word8 -> Word64+joinTypeAndTag (Tag t) w = fromIntegral t `shiftL` 3 .|. fromIntegral w -getTaggedValue :: Parser TaggedValue-getTaggedValue = do- (SomeWireType wt, tag) <- getTypeAndTag- val <- getWireValue wt- return $ TaggedValue tag (WireValue wt val)+parseFieldSet :: Parser FieldSet+parseFieldSet = loop []+ where+ loop ws = do+ end <- atEnd+ if end+ then return $! reverse ws+ else do+ !w <- parseTaggedValue+ loop (w:ws) -putTaggedValue :: TaggedValue -> Builder-putTaggedValue (TaggedValue tag (WireValue wt val)) =- putTypeAndTag wt tag <> putWireValue wt val+buildFieldSet :: FieldSet -> Builder+buildFieldSet = mconcat . map buildTaggedValue -decodeFieldSet :: B.ByteString -> Either String [TaggedValue]-decodeFieldSet = parseOnly (manyTill getTaggedValue endOfInput)+buildMessageSet :: FieldSet -> Builder+buildMessageSet = mconcat . map buildTaggedValueAsMessageSet
+ src/Data/ProtoLens/Field.hs view
@@ -0,0 +1,42 @@+{- | An implementation of overloaded record fields. This module+enables different types in the same module to have fields of the+same name.++To use instances from this class, either:++* Enable the @OverloadedLabels@ extension and+ @import Data.ProtoLens.Labels ()@;+* Use the 'field' function along with the @TypeApplications@ extension; or,+* Import the corresponding names from the autogenerated @*_Fields@ module.++For more information, see <https://google.github.io/proto-lens/tutorial.html#field-overloading>.+-}+{-# LANGUAGE AllowAmbiguousTypes #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE FunctionalDependencies #-}+{-# LANGUAGE KindSignatures #-}+{-# LANGUAGE MagicHash #-}+{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE ScopedTypeVariables #-}+module Data.ProtoLens.Field+ ( HasField(..)+ , field+ ) where++import GHC.Prim (Proxy#, proxy#)+import GHC.TypeLits (Symbol)++-- | A lens for a given field. For example:+--+-- > view field@"abc" x+-- > set field@"abc" 42 x+field :: forall x s a f . (HasField s x a, Functor f) => (a -> f a) -> s -> f s+field = fieldOf (proxy# :: Proxy# x)++-- | A type class for lens fields.+--+-- The instance @HasField s x a@ can be understood as "@s@ has a field named @x@+-- of type @a@".+class HasField s (x :: Symbol) a | s x -> a where+ fieldOf :: Functor f => Proxy# x -> (a -> f a) -> s -> f s
+ src/Data/ProtoLens/Labels.hs view
@@ -0,0 +1,38 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MagicHash #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE UndecidableInstances #-}+#if __GLASGOW_HASKELL__ >= 802+{-# LANGUAGE ScopedTypeVariables #-}+#endif+{-# OPTIONS_GHC -fno-warn-orphans #-}++------------------------------------------------------------------------------+-- | This module provides OverloadedLabels 'IsLabel' support via an+-- orphan instance. This means a @Lens.Family.Lens@ can be referenced+-- as @#foo@ whenever we have an instance of 'Data.ProtoLens.Field.HasField'+-- with the label @"foo"@."+--+-- To use these labels, enable the @OverloadedLabels@ extension, and then+-- import:+--+-- > import Data.ProtoLens.Labels()+module Data.ProtoLens.Labels where++import GHC.OverloadedLabels (IsLabel (..))+#if __GLASGOW_HASKELL__ >= 802+import GHC.Prim (Proxy#, proxy#)+#endif++import Data.ProtoLens.Field (HasField(..))++instance (HasField s x a, p ~ (a -> f a), q ~ (s -> f s), Functor f,+ a ~ b) => IsLabel x (p -> q) where+#if __GLASGOW_HASKELL__ >= 802+ fromLabel = fieldOf (proxy# :: Proxy# x)+#else+ fromLabel x = fieldOf x+#endif
src/Data/ProtoLens/Message.hs view
@@ -29,7 +29,7 @@ MessageOrGroup(..), FieldDefault(..), MessageEnum(..),- -- * Building protocol buffers+ -- * Constructing protocol buffers build, -- * Proto registries Registry,@@ -61,6 +61,7 @@ import Lens.Family2.Unchecked (lens) import qualified Data.Semigroup as Semigroup +import Data.ProtoLens.Encoding.Bytes (Builder, Parser) import Data.ProtoLens.Encoding.Wire ( Tag(..) , TaggedValue(..)@@ -74,6 +75,20 @@ -- @"packagename.messagename"@. messageName :: Proxy msg -> T.Text + -- | The serialized protobuffer message descriptor for this type.+ --+ -- For a friendlier version which returns the actual descriptor type,+ -- use @Data.ProtoLens.Descriptor.messageDescriptor@+ -- from the @proto-lens-protobuf-types@ package.+ packedMessageDescriptor :: Proxy msg -> B.ByteString++ -- | The serialized protobuffer file message descriptor containing this type.+ --+ -- For a friendlier version which returns the actual file descriptor type,+ -- use @Data.ProtoLens.Descriptor.fileDescriptor@+ -- from the @proto-lens-protobuf-types@ package.+ packedFileDescriptor :: Proxy msg -> B.ByteString+ -- | A message with all fields set to their default values. -- -- Satisfies @encodeMessage defMessage == ""@ and @decodeMessage "" == Right defMessage@.@@ -94,9 +109,20 @@ -- | Access the unknown fields of a Message. unknownFields :: Lens' msg FieldSet + -- | Decode a message value.+ --+ -- See also the functions in "Data.ProtoLens.Encoding".+ parseMessage :: Parser msg++ -- | Encode a message value.+ --+ -- See also the functions in "Data.ProtoLens.Encoding".+ buildMessage :: msg -> Builder+ allFields :: Message msg => [FieldDescriptor msg] allFields = Map.elems fieldsByTag +-- TODO: represent FieldSet as a Vector too. type FieldSet = [TaggedValue] -- | A description of a specific field of a protocol buffer.@@ -180,7 +206,6 @@ instance FieldDefault T.Text where fieldDefault = T.empty- -- | How a given repeated field is transmitted on the wire format. data Packing = Packed | Unpacked
+ src/Data/ProtoLens/Prism.hs view
@@ -0,0 +1,80 @@+-- Copyright 2016 Google Inc. All Rights Reserved.+--+-- Use of this source code is governed by a BSD-style+-- license that can be found in the LICENSE file or at+-- https://developers.google.com/open-source/licenses/bsd++-- | This module defines the 'Prism' type and combinators. Used for building+-- 'Prism's for oneof fields.+{-# LANGUAGE RankNTypes #-}++module Data.ProtoLens.Prism+ ( Prism+ , Prism'+ , AReview+ , (#)+ , prism+ , prism'+ , _Left+ , _Right+ , _Just+ , _Nothing+ ) where++import Data.Tagged (Tagged (..))+import Data.Functor.Identity (Identity (..))+import Data.Profunctor (dimap)+import Data.Profunctor.Choice+import Data.Profunctor.Unsafe ((#.), (.#))+++------------------------------------------------------------------------------+-- Prism Internals+------------------------------------------------------------------------------+type Prism s t a b = forall p f. (Choice p, Applicative f) => p a (f b) -> p s (f t)++type Prism' s a = Prism s s a a++type Optic p f s t a b = p a (f b) -> p s (f t)++type Optic' p f s a = Optic p f s s a a++type AReview t b = Optic' Tagged Identity t b++-- | Used for constructing 'Prism' values.+--+-- @'_Just' '#' 5 == 'Just' 5@+( # ) :: AReview t b -> b -> t+( # ) p = runIdentity #. unTagged #. p .# Tagged .# Identity+infixr 8 #+++------------------------------------------------------------------------------+-- Prism Combinators+------------------------------------------------------------------------------++-- | Build a 'Control.Lens.Prism.Prism'.+--+-- @'Either' t a@ is used instead of @'Maybe' a@ to permit the types of @s@ and @t@ to differ.+--+prism :: (b -> t) -> (s -> Either t a) -> Prism s t a b+prism bt seta = dimap seta (either pure (fmap bt)) . right'+{-# INLINE prism #-}++-- | This is usually used to build a 'Prism'', when you have to use an operation like+-- 'Data.Typeable.cast' which already returns a 'Maybe'.+prism' :: (b -> s) -> (s -> Maybe a) -> Prism s s a b+prism' bs sma = prism bs (\s -> maybe (Left s) Right (sma s))+{-# INLINE prism' #-}++_Left :: Prism (Either a c) (Either b c) a b+_Left = prism Left $ either Right (Left . Right)++_Right :: Prism (Either c a) (Either c b) a b+_Right = prism Right $ either (Left . Left) Right++_Just :: Prism (Maybe a) (Maybe b) a b+_Just = prism Just $ maybe (Left Nothing) Right++_Nothing :: Prism' (Maybe a) ()+_Nothing = prism' (const Nothing) $ maybe (Just ()) (const Nothing)
src/Data/ProtoLens/Service/Types.hs view
@@ -3,7 +3,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-}-{-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-}@@ -23,8 +22,10 @@ , StreamingType (..) ) where -import Data.Kind (Constraint)+import qualified Data.ByteString as B+import Data.Kind (Constraint, Type) import Data.ProtoLens.Message (Message)+import Data.Proxy (Proxy(..)) import GHC.TypeLits @@ -53,6 +54,7 @@ type ServicePackage s :: Symbol type ServiceMethods s :: [Symbol] + packedServiceDescriptor :: Proxy s -> B.ByteString ------------------------------------------------------------------------------ -- | Data type to be used as a promoted type for 'MethodStreamingType'.@@ -82,8 +84,8 @@ , Message (MethodOutput s m) ) => HasMethodImpl s (m :: Symbol) where type MethodName s m :: Symbol- type MethodInput s m :: *- type MethodOutput s m :: *+ type MethodInput s m :: Type+ type MethodOutput s m :: Type type MethodStreamingType s m :: StreamingType
src/Data/ProtoLens/TextFormat.hs view
@@ -28,11 +28,11 @@ import Data.Bifunctor (first) import qualified Data.ByteString import Data.Char (isPrint, isAscii, chr)-import Data.Foldable (foldlM, foldl')+import Data.Foldable (foldlM)+import qualified Data.Foldable as F import qualified Data.Map as Map import Data.Maybe (catMaybes) import Data.Proxy (Proxy(Proxy))-import Data.ProtoLens.Encoding (encodeMessage, decodeMessage) import qualified Data.Set as Set import qualified Data.Text.Encoding as Text import qualified Data.Text.Lazy as Lazy@@ -45,8 +45,10 @@ import Prelude hiding ((<>)) #endif +import Data.ProtoLens.Encoding (decodeMessage, encodeMessage)+import Data.ProtoLens.Encoding.Bytes (runParser) import Data.ProtoLens.Encoding.Wire-import Data.ProtoLens.Message+import Data.ProtoLens.Message hiding (buildMessage, parseMessage) import qualified Data.ProtoLens.TextFormat.Parser as Parser -- TODO: This code is newer and missing some edge cases,@@ -185,11 +187,11 @@ boolValue False = text "false" pprintTaggedValue :: TaggedValue -> Doc-pprintTaggedValue (TaggedValue t (WireValue v x)) = case v of- VarInt -> named name $ primField x- Fixed64 -> named name $ primField x- Fixed32 -> named name $ primField x- Lengthy -> case decodeFieldSet x of+pprintTaggedValue (TaggedValue t wv) = case wv of+ VarInt x -> named name $ primField x+ Fixed64 x -> named name $ primField x+ Fixed32 x -> named name $ primField x+ Lengthy x -> case runParser parseFieldSet x of Left _ -> named name $ pprintByteString x Right ts -> pprintSubmessage name $ sep $ map pprintTaggedValue ts@@ -199,6 +201,7 @@ where name = show (unTag t) + -------------------------------------------------------------------------------- -- Parsing @@ -226,7 +229,7 @@ <$> buildMessageFromDescriptor reg defMessage fields missingFields :: forall msg . Message msg => Proxy msg -> Parser.Message -> [String]-missingFields _ = Set.toList . foldl' deleteField requiredFieldNames+missingFields _ = Set.toList . F.foldl' deleteField requiredFieldNames where requiredFieldNames :: Set.Set String requiredFieldNames = Set.fromList $ Map.keys@@ -315,8 +318,8 @@ makeScalarValue DoubleField (Parser.DoubleValue x) = Right x makeScalarValue FloatField (Parser.DoubleValue x) = Right (realToFrac x) makeScalarValue BoolField (Parser.EnumValue x)- | x == "true" = Right True- | x == "false" = Right False+ | x `elem` ["true", "True", "t"] = Right True+ | x `elem` ["false", "False", "f"] = Right False | otherwise = Left $ "Unrecognized bool value " ++ show x makeScalarValue StringField (Parser.ByteStringValue x) = Right (Text.decodeUtf8 x) makeScalarValue BytesField (Parser.ByteStringValue x) = Right x
src/Data/ProtoLens/TextFormat/Parser.hs view
@@ -6,6 +6,8 @@ -- | Helper utilities to parse the human-readable text format into a -- proto-agnostic syntax tree.+{-# LANGUAGE FlexibleContexts #-}+ module Data.ProtoLens.TextFormat.Parser ( Message , Field(..)@@ -14,23 +16,23 @@ , parser ) where -import Data.ByteString (ByteString, pack)-import Data.Char (ord, isSpace)+import Control.Applicative ((<|>), many)+import Control.Monad (liftM, liftM2, mzero, unless)+import Data.ByteString (ByteString)+import Data.ByteString.Builder (Builder, char8, charUtf8, toLazyByteString, word8)+import Data.ByteString.Lazy (toStrict)+import Data.Char (digitToInt, isSpace)+import Data.Functor (($>)) import Data.Functor.Identity (Identity) import Data.List (intercalate)-import Data.Maybe (catMaybes)-import Data.Text.Lazy (Text) import qualified Data.Text as StrictText-import Data.Word (Word8)-import Numeric (readOct, readHex)+import Data.Text.Lazy (Text) import Text.Parsec ((<?>)) import Text.Parsec.Char (alphaNum, char, hexDigit, letter, octDigit, oneOf, satisfy) import Text.Parsec.Text.Lazy (Parser)-import Text.Parsec.Combinator (choice, eof, many1, optionMaybe, sepBy1)+import Text.Parsec.Combinator (choice, eof, many1, sepBy1) import Text.Parsec.Token hiding (octal)-import Control.Applicative ((<|>), many)-import Control.Monad (liftM, liftM2, mzero) -- | A 'TokenParser' for the protobuf text format. ptp :: GenTokenParser Text () Identity@@ -53,7 +55,6 @@ , caseSensitive = True } - type Message = [Field] data Field = Field Key Value@@ -101,7 +102,7 @@ value <- naturalOrFloat ptp return $ makeNumberValue negative value parseString = liftM (ByteStringValue . mconcat)- $ many1 $ lexeme ptp $ protoStringLiteral+ $ many1 $ lexeme ptp protoStringLiteral parseEnumValue = liftM EnumValue (identifier ptp) parseMessageValue = braces ptp (parseAny <|>@@ -129,39 +130,43 @@ protoStringLiteral :: Parser ByteString protoStringLiteral = do initialQuoteChar <- char '\'' <|> char '\"'- word8s <- many stringChar+ let quoted = do+ _ <- char '\\'+ choice+ [ char 'a' $> char8 '\a'+ , char 'b' $> char8 '\b'+ , char 'f' $> char8 '\f'+ , char 'n' $> char8 '\n'+ , char 'r' $> char8 '\r'+ , char 't' $> char8 '\t'+ , char 'v' $> char8 '\v'+ , char '\\' $> char8 '\\'+ , char '\'' $> char8 '\''+ , char '\"' $> char8 '\"'+ , oneOf "xX" *> parse8BitToBuilder hexDigit 16 (1, 2)+ , oneOf "uU" *> fail "Unicode in string literals not yet supported"+ , parse8BitToBuilder octDigit 8 (1, 3)+ ]+ unquoted = charUtf8 <$> satisfy (/= initialQuoteChar)+ builders <- many $ quoted <|> unquoted _ <- char initialQuoteChar- return $ pack word8s+ return $ toStrict $ toLazyByteString $ mconcat builders where- stringChar :: Parser Word8- stringChar = nonEscape <|> stringEscape- nonEscape = fmap (fromIntegral . ord)- $ satisfy (\c -> c `notElem` "\\\'\"" && ord c < 256)- stringEscape = char '\\' >> (octal <|> hex <|> unicode <|> simple)- octal = do d0 <- octDigit- d1 <- optionMaybe octDigit- d2 <- optionMaybe octDigit- readMaybeDigits readOct [Just d0, d1, d2]- readMaybeDigits :: ReadS Word8 -> [Maybe Char] -> Parser Word8- readMaybeDigits reader- = return . (\str -> let [(v, "")] = reader str in v) . catMaybes- hex = do _ <- oneOf "xX"- d0 <- hexDigit- d1 <- optionMaybe hexDigit- readMaybeDigits readHex [Just d0, d1]- unicode = oneOf "uU" >> fail "Unicode in string literals not yet supported"- simple = choice $ map charRet [ ('a', '\a')- , ('b', '\b')- , ('f', '\f')- , ('n', '\n')- , ('r', '\r')- , ('t', '\t')- , ('v', '\v')- , ('\\', '\\')- , ('\'', '\'')- , ('\"', '\"')- ]- where- charRet :: (Char, Char) -> Parser Word8- charRet (escapeCh, ch) = do _ <- char escapeCh- return $ fromIntegral $ ord ch+ -- | Apply a parser between 'min' and 'max' times, failing otherwise.+ manyN :: Parser a -> (Int, Int) -> Parser [a]+ manyN _ (_, 0) = return []+ manyN p (0, maX) = ((:) <$> p <*> manyN p (0, maX - 1)) <|> pure []+ manyN p (miN, maX) = (:) <$> p <*> manyN p (miN - 1, maX - 1)++ -- | Parse a number in 'base' with between 'min' and 'max' digits.+ parseNum :: Parser Char -> Int -> (Int, Int) -> Parser Int+ parseNum p base range = do+ digits <- map digitToInt <$> manyN p range+ return $ foldl (\a d -> a * base + d) 0 digits++ -- | Parse a number and return a builder for the 8-bit char it represents.+ parse8BitToBuilder :: Parser Char -> Int -> (Int, Int) -> Parser Builder+ parse8BitToBuilder p base range = do+ value <- parseNum p base range+ unless (value < 256) $ fail "Escaped number is not 8-bit"+ return $ word8 $ fromIntegral value
− src/Proto/Google/Protobuf/Compiler/Plugin.hs
@@ -1,523 +0,0 @@-{- This file was auto-generated from google/protobuf/compiler/plugin.proto by the proto-lens-protoc program. -}-{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,- UndecidableInstances, GeneralizedNewtypeDeriving,- MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,- PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}-{-# OPTIONS_GHC -fno-warn-unused-imports#-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}-module Proto.Google.Protobuf.Compiler.Plugin- (CodeGeneratorRequest(), CodeGeneratorResponse(),- CodeGeneratorResponse'File(), Version())- where-import qualified Control.DeepSeq-import qualified Lens.Labels.Prism-import qualified Prelude-import qualified Data.Int-import qualified Data.Word-import qualified Data.ProtoLens-import qualified Data.ProtoLens.Message.Enum-import qualified Data.ProtoLens.Service.Types-import qualified Lens.Family2-import qualified Lens.Family2.Unchecked-import qualified Data.Text-import qualified Data.Map-import qualified Data.ByteString-import qualified Data.ByteString.Char8-import qualified Lens.Labels-import qualified Text.Read-import qualified Proto.Google.Protobuf.Descriptor--{- | Fields :-- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.fileToGenerate' @:: Lens' CodeGeneratorRequest [Data.Text.Text]@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.parameter' @:: Lens' CodeGeneratorRequest Data.Text.Text@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.maybe'parameter' @:: Lens' CodeGeneratorRequest (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.protoFile' @:: Lens' CodeGeneratorRequest- [Proto.Google.Protobuf.Descriptor.FileDescriptorProto]@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.compilerVersion' @:: Lens' CodeGeneratorRequest Version@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.maybe'compilerVersion' @:: Lens' CodeGeneratorRequest (Prelude.Maybe Version)@- -}-data CodeGeneratorRequest = CodeGeneratorRequest{_CodeGeneratorRequest'fileToGenerate- :: ![Data.Text.Text],- _CodeGeneratorRequest'parameter ::- !(Prelude.Maybe Data.Text.Text),- _CodeGeneratorRequest'protoFile ::- ![Proto.Google.Protobuf.Descriptor.FileDescriptorProto],- _CodeGeneratorRequest'compilerVersion ::- !(Prelude.Maybe Version),- _CodeGeneratorRequest'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show CodeGeneratorRequest where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' CodeGeneratorRequest "fileToGenerate"- ([Data.Text.Text])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorRequest'fileToGenerate- (\ x__ y__ -> x__{_CodeGeneratorRequest'fileToGenerate = y__}))- Prelude.id-instance Lens.Labels.HasLens' CodeGeneratorRequest "parameter"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorRequest'parameter- (\ x__ y__ -> x__{_CodeGeneratorRequest'parameter = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' CodeGeneratorRequest- "maybe'parameter"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorRequest'parameter- (\ x__ y__ -> x__{_CodeGeneratorRequest'parameter = y__}))- Prelude.id-instance Lens.Labels.HasLens' CodeGeneratorRequest "protoFile"- ([Proto.Google.Protobuf.Descriptor.FileDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorRequest'protoFile- (\ x__ y__ -> x__{_CodeGeneratorRequest'protoFile = y__}))- Prelude.id-instance Lens.Labels.HasLens' CodeGeneratorRequest- "compilerVersion"- (Version)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorRequest'compilerVersion- (\ x__ y__ -> x__{_CodeGeneratorRequest'compilerVersion = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' CodeGeneratorRequest- "maybe'compilerVersion"- (Prelude.Maybe Version)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorRequest'compilerVersion- (\ x__ y__ -> x__{_CodeGeneratorRequest'compilerVersion = y__}))- Prelude.id-instance Data.ProtoLens.Message CodeGeneratorRequest where- messageName _- = Data.Text.pack "google.protobuf.compiler.CodeGeneratorRequest"- fieldsByTag- = let fileToGenerate__field_descriptor- = Data.ProtoLens.FieldDescriptor "file_to_generate"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "fileToGenerate")))- :: Data.ProtoLens.FieldDescriptor CodeGeneratorRequest- parameter__field_descriptor- = Data.ProtoLens.FieldDescriptor "parameter"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'parameter")))- :: Data.ProtoLens.FieldDescriptor CodeGeneratorRequest- protoFile__field_descriptor- = Data.ProtoLens.FieldDescriptor "proto_file"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor- Proto.Google.Protobuf.Descriptor.FileDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "protoFile")))- :: Data.ProtoLens.FieldDescriptor CodeGeneratorRequest- compilerVersion__field_descriptor- = Data.ProtoLens.FieldDescriptor "compiler_version"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor Version)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'compilerVersion")))- :: Data.ProtoLens.FieldDescriptor CodeGeneratorRequest- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, fileToGenerate__field_descriptor),- (Data.ProtoLens.Tag 2, parameter__field_descriptor),- (Data.ProtoLens.Tag 15, protoFile__field_descriptor),- (Data.ProtoLens.Tag 3, compilerVersion__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _CodeGeneratorRequest'_unknownFields- (\ x__ y__ -> x__{_CodeGeneratorRequest'_unknownFields = y__})- defMessage- = CodeGeneratorRequest{_CodeGeneratorRequest'fileToGenerate = [],- _CodeGeneratorRequest'parameter = Prelude.Nothing,- _CodeGeneratorRequest'protoFile = [],- _CodeGeneratorRequest'compilerVersion = Prelude.Nothing,- _CodeGeneratorRequest'_unknownFields = ([])}-instance Control.DeepSeq.NFData CodeGeneratorRequest where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_CodeGeneratorRequest'_unknownFields x__)- (Control.DeepSeq.deepseq (_CodeGeneratorRequest'fileToGenerate x__)- (Control.DeepSeq.deepseq (_CodeGeneratorRequest'parameter x__)- (Control.DeepSeq.deepseq (_CodeGeneratorRequest'protoFile x__)- (Control.DeepSeq.deepseq- (_CodeGeneratorRequest'compilerVersion x__)- (())))))-{- | Fields :-- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.error' @:: Lens' CodeGeneratorResponse Data.Text.Text@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.maybe'error' @:: Lens' CodeGeneratorResponse (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.file' @:: Lens' CodeGeneratorResponse [CodeGeneratorResponse'File]@- -}-data CodeGeneratorResponse = CodeGeneratorResponse{_CodeGeneratorResponse'error- :: !(Prelude.Maybe Data.Text.Text),- _CodeGeneratorResponse'file ::- ![CodeGeneratorResponse'File],- _CodeGeneratorResponse'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show CodeGeneratorResponse where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' CodeGeneratorResponse "error"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorResponse'error- (\ x__ y__ -> x__{_CodeGeneratorResponse'error = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' CodeGeneratorResponse "maybe'error"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorResponse'error- (\ x__ y__ -> x__{_CodeGeneratorResponse'error = y__}))- Prelude.id-instance Lens.Labels.HasLens' CodeGeneratorResponse "file"- ([CodeGeneratorResponse'File])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorResponse'file- (\ x__ y__ -> x__{_CodeGeneratorResponse'file = y__}))- Prelude.id-instance Data.ProtoLens.Message CodeGeneratorResponse where- messageName _- = Data.Text.pack "google.protobuf.compiler.CodeGeneratorResponse"- fieldsByTag- = let error__field_descriptor- = Data.ProtoLens.FieldDescriptor "error"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'error")))- :: Data.ProtoLens.FieldDescriptor CodeGeneratorResponse- file__field_descriptor- = Data.ProtoLens.FieldDescriptor "file"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor CodeGeneratorResponse'File)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "file")))- :: Data.ProtoLens.FieldDescriptor CodeGeneratorResponse- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, error__field_descriptor),- (Data.ProtoLens.Tag 15, file__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _CodeGeneratorResponse'_unknownFields- (\ x__ y__ -> x__{_CodeGeneratorResponse'_unknownFields = y__})- defMessage- = CodeGeneratorResponse{_CodeGeneratorResponse'error =- Prelude.Nothing,- _CodeGeneratorResponse'file = [],- _CodeGeneratorResponse'_unknownFields = ([])}-instance Control.DeepSeq.NFData CodeGeneratorResponse where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_CodeGeneratorResponse'_unknownFields x__)- (Control.DeepSeq.deepseq (_CodeGeneratorResponse'error x__)- (Control.DeepSeq.deepseq (_CodeGeneratorResponse'file x__) (())))-{- | Fields :-- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.name' @:: Lens' CodeGeneratorResponse'File Data.Text.Text@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.maybe'name' @:: Lens' CodeGeneratorResponse'File (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.insertionPoint' @:: Lens' CodeGeneratorResponse'File Data.Text.Text@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.maybe'insertionPoint' @:: Lens' CodeGeneratorResponse'File (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.content' @:: Lens' CodeGeneratorResponse'File Data.Text.Text@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.maybe'content' @:: Lens' CodeGeneratorResponse'File (Prelude.Maybe Data.Text.Text)@- -}-data CodeGeneratorResponse'File = CodeGeneratorResponse'File{_CodeGeneratorResponse'File'name- :: !(Prelude.Maybe Data.Text.Text),- _CodeGeneratorResponse'File'insertionPoint- :: !(Prelude.Maybe Data.Text.Text),- _CodeGeneratorResponse'File'content ::- !(Prelude.Maybe Data.Text.Text),- _CodeGeneratorResponse'File'_unknownFields- :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show CodeGeneratorResponse'File where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' CodeGeneratorResponse'File "name"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorResponse'File'name- (\ x__ y__ -> x__{_CodeGeneratorResponse'File'name = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' CodeGeneratorResponse'File- "maybe'name"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorResponse'File'name- (\ x__ y__ -> x__{_CodeGeneratorResponse'File'name = y__}))- Prelude.id-instance Lens.Labels.HasLens' CodeGeneratorResponse'File- "insertionPoint"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _CodeGeneratorResponse'File'insertionPoint- (\ x__ y__ ->- x__{_CodeGeneratorResponse'File'insertionPoint = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' CodeGeneratorResponse'File- "maybe'insertionPoint"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _CodeGeneratorResponse'File'insertionPoint- (\ x__ y__ ->- x__{_CodeGeneratorResponse'File'insertionPoint = y__}))- Prelude.id-instance Lens.Labels.HasLens' CodeGeneratorResponse'File "content"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorResponse'File'content- (\ x__ y__ -> x__{_CodeGeneratorResponse'File'content = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' CodeGeneratorResponse'File- "maybe'content"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _CodeGeneratorResponse'File'content- (\ x__ y__ -> x__{_CodeGeneratorResponse'File'content = y__}))- Prelude.id-instance Data.ProtoLens.Message CodeGeneratorResponse'File where- messageName _- = Data.Text.pack- "google.protobuf.compiler.CodeGeneratorResponse.File"- fieldsByTag- = let name__field_descriptor- = Data.ProtoLens.FieldDescriptor "name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")))- :: Data.ProtoLens.FieldDescriptor CodeGeneratorResponse'File- insertionPoint__field_descriptor- = Data.ProtoLens.FieldDescriptor "insertion_point"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'insertionPoint")))- :: Data.ProtoLens.FieldDescriptor CodeGeneratorResponse'File- content__field_descriptor- = Data.ProtoLens.FieldDescriptor "content"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'content")))- :: Data.ProtoLens.FieldDescriptor CodeGeneratorResponse'File- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, name__field_descriptor),- (Data.ProtoLens.Tag 2, insertionPoint__field_descriptor),- (Data.ProtoLens.Tag 15, content__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens- _CodeGeneratorResponse'File'_unknownFields- (\ x__ y__ ->- x__{_CodeGeneratorResponse'File'_unknownFields = y__})- defMessage- = CodeGeneratorResponse'File{_CodeGeneratorResponse'File'name =- Prelude.Nothing,- _CodeGeneratorResponse'File'insertionPoint = Prelude.Nothing,- _CodeGeneratorResponse'File'content = Prelude.Nothing,- _CodeGeneratorResponse'File'_unknownFields = ([])}-instance Control.DeepSeq.NFData CodeGeneratorResponse'File where- rnf- = \ x__ ->- Control.DeepSeq.deepseq- (_CodeGeneratorResponse'File'_unknownFields x__)- (Control.DeepSeq.deepseq (_CodeGeneratorResponse'File'name x__)- (Control.DeepSeq.deepseq- (_CodeGeneratorResponse'File'insertionPoint x__)- (Control.DeepSeq.deepseq (_CodeGeneratorResponse'File'content x__)- (()))))-{- | Fields :-- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.major' @:: Lens' Version Data.Int.Int32@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.maybe'major' @:: Lens' Version (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.minor' @:: Lens' Version Data.Int.Int32@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.maybe'minor' @:: Lens' Version (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.patch' @:: Lens' Version Data.Int.Int32@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.maybe'patch' @:: Lens' Version (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.suffix' @:: Lens' Version Data.Text.Text@- * 'Proto.Google.Protobuf.Compiler.Plugin_Fields.maybe'suffix' @:: Lens' Version (Prelude.Maybe Data.Text.Text)@- -}-data Version = Version{_Version'major ::- !(Prelude.Maybe Data.Int.Int32),- _Version'minor :: !(Prelude.Maybe Data.Int.Int32),- _Version'patch :: !(Prelude.Maybe Data.Int.Int32),- _Version'suffix :: !(Prelude.Maybe Data.Text.Text),- _Version'_unknownFields :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show Version where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' Version "major" (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Version'major- (\ x__ y__ -> x__{_Version'major = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' Version "maybe'major"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Version'major- (\ x__ y__ -> x__{_Version'major = y__}))- Prelude.id-instance Lens.Labels.HasLens' Version "minor" (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Version'minor- (\ x__ y__ -> x__{_Version'minor = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' Version "maybe'minor"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Version'minor- (\ x__ y__ -> x__{_Version'minor = y__}))- Prelude.id-instance Lens.Labels.HasLens' Version "patch" (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Version'patch- (\ x__ y__ -> x__{_Version'patch = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' Version "maybe'patch"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Version'patch- (\ x__ y__ -> x__{_Version'patch = y__}))- Prelude.id-instance Lens.Labels.HasLens' Version "suffix" (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Version'suffix- (\ x__ y__ -> x__{_Version'suffix = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' Version "maybe'suffix"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Version'suffix- (\ x__ y__ -> x__{_Version'suffix = y__}))- Prelude.id-instance Data.ProtoLens.Message Version where- messageName _ = Data.Text.pack "google.protobuf.compiler.Version"- fieldsByTag- = let major__field_descriptor- = Data.ProtoLens.FieldDescriptor "major"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'major")))- :: Data.ProtoLens.FieldDescriptor Version- minor__field_descriptor- = Data.ProtoLens.FieldDescriptor "minor"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'minor")))- :: Data.ProtoLens.FieldDescriptor Version- patch__field_descriptor- = Data.ProtoLens.FieldDescriptor "patch"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'patch")))- :: Data.ProtoLens.FieldDescriptor Version- suffix__field_descriptor- = Data.ProtoLens.FieldDescriptor "suffix"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'suffix")))- :: Data.ProtoLens.FieldDescriptor Version- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, major__field_descriptor),- (Data.ProtoLens.Tag 2, minor__field_descriptor),- (Data.ProtoLens.Tag 3, patch__field_descriptor),- (Data.ProtoLens.Tag 4, suffix__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _Version'_unknownFields- (\ x__ y__ -> x__{_Version'_unknownFields = y__})- defMessage- = Version{_Version'major = Prelude.Nothing,- _Version'minor = Prelude.Nothing, _Version'patch = Prelude.Nothing,- _Version'suffix = Prelude.Nothing, _Version'_unknownFields = ([])}-instance Control.DeepSeq.NFData Version where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_Version'_unknownFields x__)- (Control.DeepSeq.deepseq (_Version'major x__)- (Control.DeepSeq.deepseq (_Version'minor x__)- (Control.DeepSeq.deepseq (_Version'patch x__)- (Control.DeepSeq.deepseq (_Version'suffix x__) (())))))
− src/Proto/Google/Protobuf/Compiler/Plugin_Fields.hs
@@ -1,189 +0,0 @@-{- This file was auto-generated from google/protobuf/compiler/plugin.proto by the proto-lens-protoc program. -}-{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,- UndecidableInstances, GeneralizedNewtypeDeriving,- MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,- PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}-{-# OPTIONS_GHC -fno-warn-unused-imports#-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}-module Proto.Google.Protobuf.Compiler.Plugin_Fields where-import qualified Prelude-import qualified Data.Int-import qualified Data.Word-import qualified Data.ProtoLens-import qualified Data.ProtoLens.Message.Enum-import qualified Data.ProtoLens.Service.Types-import qualified Lens.Family2-import qualified Lens.Family2.Unchecked-import qualified Data.Text-import qualified Data.Map-import qualified Data.ByteString-import qualified Data.ByteString.Char8-import qualified Lens.Labels-import qualified Text.Read-import qualified Proto.Google.Protobuf.Descriptor--compilerVersion ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "compilerVersion" a) =>- Lens.Family2.LensLike' f s a-compilerVersion- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "compilerVersion")-content ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "content" a) =>- Lens.Family2.LensLike' f s a-content- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "content")-error ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "error" a) =>- Lens.Family2.LensLike' f s a-error- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "error")-file ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "file" a) =>- Lens.Family2.LensLike' f s a-file- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "file")-fileToGenerate ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "fileToGenerate" a) =>- Lens.Family2.LensLike' f s a-fileToGenerate- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "fileToGenerate")-insertionPoint ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "insertionPoint" a) =>- Lens.Family2.LensLike' f s a-insertionPoint- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "insertionPoint")-major ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "major" a) =>- Lens.Family2.LensLike' f s a-major- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "major")-maybe'compilerVersion ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'compilerVersion" a) =>- Lens.Family2.LensLike' f s a-maybe'compilerVersion- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'compilerVersion")-maybe'content ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'content" a) =>- Lens.Family2.LensLike' f s a-maybe'content- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'content")-maybe'error ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'error" a) =>- Lens.Family2.LensLike' f s a-maybe'error- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'error")-maybe'insertionPoint ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'insertionPoint" a) =>- Lens.Family2.LensLike' f s a-maybe'insertionPoint- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'insertionPoint")-maybe'major ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'major" a) =>- Lens.Family2.LensLike' f s a-maybe'major- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'major")-maybe'minor ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'minor" a) =>- Lens.Family2.LensLike' f s a-maybe'minor- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'minor")-maybe'name ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'name" a) =>- Lens.Family2.LensLike' f s a-maybe'name- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")-maybe'parameter ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'parameter" a) =>- Lens.Family2.LensLike' f s a-maybe'parameter- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'parameter")-maybe'patch ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'patch" a) =>- Lens.Family2.LensLike' f s a-maybe'patch- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'patch")-maybe'suffix ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'suffix" a) =>- Lens.Family2.LensLike' f s a-maybe'suffix- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'suffix")-minor ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "minor" a) =>- Lens.Family2.LensLike' f s a-minor- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "minor")-name ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "name" a) =>- Lens.Family2.LensLike' f s a-name- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "name")-parameter ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "parameter" a) =>- Lens.Family2.LensLike' f s a-parameter- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "parameter")-patch ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "patch" a) =>- Lens.Family2.LensLike' f s a-patch- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "patch")-protoFile ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "protoFile" a) =>- Lens.Family2.LensLike' f s a-protoFile- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "protoFile")-suffix ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "suffix" a) =>- Lens.Family2.LensLike' f s a-suffix- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "suffix")
− src/Proto/Google/Protobuf/Descriptor.hs
@@ -1,4907 +0,0 @@-{- This file was auto-generated from google/protobuf/descriptor.proto by the proto-lens-protoc program. -}-{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,- UndecidableInstances, GeneralizedNewtypeDeriving,- MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,- PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}-{-# OPTIONS_GHC -fno-warn-unused-imports#-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}-module Proto.Google.Protobuf.Descriptor- (DescriptorProto(), DescriptorProto'ExtensionRange(),- DescriptorProto'ReservedRange(), EnumDescriptorProto(),- EnumDescriptorProto'EnumReservedRange(), EnumOptions(),- EnumValueDescriptorProto(), EnumValueOptions(),- ExtensionRangeOptions(), FieldDescriptorProto(),- FieldDescriptorProto'Label(..), FieldDescriptorProto'Label(),- FieldDescriptorProto'Type(..), FieldDescriptorProto'Type(),- FieldOptions(), FieldOptions'CType(..), FieldOptions'CType(),- FieldOptions'JSType(..), FieldOptions'JSType(),- FileDescriptorProto(), FileDescriptorSet(), FileOptions(),- FileOptions'OptimizeMode(..), FileOptions'OptimizeMode(),- GeneratedCodeInfo(), GeneratedCodeInfo'Annotation(),- MessageOptions(), MethodDescriptorProto(), MethodOptions(),- MethodOptions'IdempotencyLevel(..),- MethodOptions'IdempotencyLevel(), OneofDescriptorProto(),- OneofOptions(), ServiceDescriptorProto(), ServiceOptions(),- SourceCodeInfo(), SourceCodeInfo'Location(), UninterpretedOption(),- UninterpretedOption'NamePart())- where-import qualified Control.DeepSeq-import qualified Lens.Labels.Prism-import qualified Prelude-import qualified Data.Int-import qualified Data.Word-import qualified Data.ProtoLens-import qualified Data.ProtoLens.Message.Enum-import qualified Data.ProtoLens.Service.Types-import qualified Lens.Family2-import qualified Lens.Family2.Unchecked-import qualified Data.Text-import qualified Data.Map-import qualified Data.ByteString-import qualified Data.ByteString.Char8-import qualified Lens.Labels-import qualified Text.Read--{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.name' @:: Lens' DescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'name' @:: Lens' DescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.field' @:: Lens' DescriptorProto [FieldDescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.extension' @:: Lens' DescriptorProto [FieldDescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.nestedType' @:: Lens' DescriptorProto [DescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.enumType' @:: Lens' DescriptorProto [EnumDescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.extensionRange' @:: Lens' DescriptorProto [DescriptorProto'ExtensionRange]@- * 'Proto.Google.Protobuf.Descriptor_Fields.oneofDecl' @:: Lens' DescriptorProto [OneofDescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.options' @:: Lens' DescriptorProto MessageOptions@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'options' @:: Lens' DescriptorProto (Prelude.Maybe MessageOptions)@- * 'Proto.Google.Protobuf.Descriptor_Fields.reservedRange' @:: Lens' DescriptorProto [DescriptorProto'ReservedRange]@- * 'Proto.Google.Protobuf.Descriptor_Fields.reservedName' @:: Lens' DescriptorProto [Data.Text.Text]@- -}-data DescriptorProto = DescriptorProto{_DescriptorProto'name ::- !(Prelude.Maybe Data.Text.Text),- _DescriptorProto'field :: ![FieldDescriptorProto],- _DescriptorProto'extension :: ![FieldDescriptorProto],- _DescriptorProto'nestedType :: ![DescriptorProto],- _DescriptorProto'enumType :: ![EnumDescriptorProto],- _DescriptorProto'extensionRange ::- ![DescriptorProto'ExtensionRange],- _DescriptorProto'oneofDecl :: ![OneofDescriptorProto],- _DescriptorProto'options :: !(Prelude.Maybe MessageOptions),- _DescriptorProto'reservedRange ::- ![DescriptorProto'ReservedRange],- _DescriptorProto'reservedName :: ![Data.Text.Text],- _DescriptorProto'_unknownFields :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show DescriptorProto where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' DescriptorProto "name"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'name- (\ x__ y__ -> x__{_DescriptorProto'name = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' DescriptorProto "maybe'name"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'name- (\ x__ y__ -> x__{_DescriptorProto'name = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto "field"- ([FieldDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'field- (\ x__ y__ -> x__{_DescriptorProto'field = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto "extension"- ([FieldDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'extension- (\ x__ y__ -> x__{_DescriptorProto'extension = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto "nestedType"- ([DescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'nestedType- (\ x__ y__ -> x__{_DescriptorProto'nestedType = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto "enumType"- ([EnumDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'enumType- (\ x__ y__ -> x__{_DescriptorProto'enumType = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto "extensionRange"- ([DescriptorProto'ExtensionRange])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'extensionRange- (\ x__ y__ -> x__{_DescriptorProto'extensionRange = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto "oneofDecl"- ([OneofDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'oneofDecl- (\ x__ y__ -> x__{_DescriptorProto'oneofDecl = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto "options"- (MessageOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'options- (\ x__ y__ -> x__{_DescriptorProto'options = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' DescriptorProto "maybe'options"- (Prelude.Maybe MessageOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'options- (\ x__ y__ -> x__{_DescriptorProto'options = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto "reservedRange"- ([DescriptorProto'ReservedRange])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'reservedRange- (\ x__ y__ -> x__{_DescriptorProto'reservedRange = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto "reservedName"- ([Data.Text.Text])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'reservedName- (\ x__ y__ -> x__{_DescriptorProto'reservedName = y__}))- Prelude.id-instance Data.ProtoLens.Message DescriptorProto where- messageName _ = Data.Text.pack "google.protobuf.DescriptorProto"- fieldsByTag- = let name__field_descriptor- = Data.ProtoLens.FieldDescriptor "name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto- field__field_descriptor- = Data.ProtoLens.FieldDescriptor "field"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor FieldDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "field")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto- extension__field_descriptor- = Data.ProtoLens.FieldDescriptor "extension"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor FieldDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "extension")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto- nestedType__field_descriptor- = Data.ProtoLens.FieldDescriptor "nested_type"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor DescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "nestedType")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto- enumType__field_descriptor- = Data.ProtoLens.FieldDescriptor "enum_type"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor EnumDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "enumType")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto- extensionRange__field_descriptor- = Data.ProtoLens.FieldDescriptor "extension_range"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor DescriptorProto'ExtensionRange)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "extensionRange")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto- oneofDecl__field_descriptor- = Data.ProtoLens.FieldDescriptor "oneof_decl"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor OneofDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "oneofDecl")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto- options__field_descriptor- = Data.ProtoLens.FieldDescriptor "options"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor MessageOptions)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'options")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto- reservedRange__field_descriptor- = Data.ProtoLens.FieldDescriptor "reserved_range"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor DescriptorProto'ReservedRange)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "reservedRange")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto- reservedName__field_descriptor- = Data.ProtoLens.FieldDescriptor "reserved_name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "reservedName")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, name__field_descriptor),- (Data.ProtoLens.Tag 2, field__field_descriptor),- (Data.ProtoLens.Tag 6, extension__field_descriptor),- (Data.ProtoLens.Tag 3, nestedType__field_descriptor),- (Data.ProtoLens.Tag 4, enumType__field_descriptor),- (Data.ProtoLens.Tag 5, extensionRange__field_descriptor),- (Data.ProtoLens.Tag 8, oneofDecl__field_descriptor),- (Data.ProtoLens.Tag 7, options__field_descriptor),- (Data.ProtoLens.Tag 9, reservedRange__field_descriptor),- (Data.ProtoLens.Tag 10, reservedName__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _DescriptorProto'_unknownFields- (\ x__ y__ -> x__{_DescriptorProto'_unknownFields = y__})- defMessage- = DescriptorProto{_DescriptorProto'name = Prelude.Nothing,- _DescriptorProto'field = [], _DescriptorProto'extension = [],- _DescriptorProto'nestedType = [], _DescriptorProto'enumType = [],- _DescriptorProto'extensionRange = [],- _DescriptorProto'oneofDecl = [],- _DescriptorProto'options = Prelude.Nothing,- _DescriptorProto'reservedRange = [],- _DescriptorProto'reservedName = [],- _DescriptorProto'_unknownFields = ([])}-instance Control.DeepSeq.NFData DescriptorProto where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_DescriptorProto'_unknownFields x__)- (Control.DeepSeq.deepseq (_DescriptorProto'name x__)- (Control.DeepSeq.deepseq (_DescriptorProto'field x__)- (Control.DeepSeq.deepseq (_DescriptorProto'extension x__)- (Control.DeepSeq.deepseq (_DescriptorProto'nestedType x__)- (Control.DeepSeq.deepseq (_DescriptorProto'enumType x__)- (Control.DeepSeq.deepseq (_DescriptorProto'extensionRange x__)- (Control.DeepSeq.deepseq (_DescriptorProto'oneofDecl x__)- (Control.DeepSeq.deepseq (_DescriptorProto'options x__)- (Control.DeepSeq.deepseq- (_DescriptorProto'reservedRange x__)- (Control.DeepSeq.deepseq- (_DescriptorProto'reservedName x__)- (())))))))))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.start' @:: Lens' DescriptorProto'ExtensionRange Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'start' @:: Lens' DescriptorProto'ExtensionRange (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Descriptor_Fields.end' @:: Lens' DescriptorProto'ExtensionRange Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'end' @:: Lens' DescriptorProto'ExtensionRange (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Descriptor_Fields.options' @:: Lens' DescriptorProto'ExtensionRange ExtensionRangeOptions@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'options' @:: Lens' DescriptorProto'ExtensionRange- (Prelude.Maybe ExtensionRangeOptions)@- -}-data DescriptorProto'ExtensionRange = DescriptorProto'ExtensionRange{_DescriptorProto'ExtensionRange'start- ::- !(Prelude.Maybe- Data.Int.Int32),- _DescriptorProto'ExtensionRange'end- ::- !(Prelude.Maybe- Data.Int.Int32),- _DescriptorProto'ExtensionRange'options- ::- !(Prelude.Maybe- ExtensionRangeOptions),- _DescriptorProto'ExtensionRange'_unknownFields- :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show DescriptorProto'ExtensionRange where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' DescriptorProto'ExtensionRange- "start"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'ExtensionRange'start- (\ x__ y__ -> x__{_DescriptorProto'ExtensionRange'start = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' DescriptorProto'ExtensionRange- "maybe'start"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'ExtensionRange'start- (\ x__ y__ -> x__{_DescriptorProto'ExtensionRange'start = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto'ExtensionRange "end"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'ExtensionRange'end- (\ x__ y__ -> x__{_DescriptorProto'ExtensionRange'end = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' DescriptorProto'ExtensionRange- "maybe'end"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'ExtensionRange'end- (\ x__ y__ -> x__{_DescriptorProto'ExtensionRange'end = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto'ExtensionRange- "options"- (ExtensionRangeOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _DescriptorProto'ExtensionRange'options- (\ x__ y__ -> x__{_DescriptorProto'ExtensionRange'options = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' DescriptorProto'ExtensionRange- "maybe'options"- (Prelude.Maybe ExtensionRangeOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _DescriptorProto'ExtensionRange'options- (\ x__ y__ -> x__{_DescriptorProto'ExtensionRange'options = y__}))- Prelude.id-instance Data.ProtoLens.Message DescriptorProto'ExtensionRange- where- messageName _- = Data.Text.pack "google.protobuf.DescriptorProto.ExtensionRange"- fieldsByTag- = let start__field_descriptor- = Data.ProtoLens.FieldDescriptor "start"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'start")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto'ExtensionRange- end__field_descriptor- = Data.ProtoLens.FieldDescriptor "end"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'end")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto'ExtensionRange- options__field_descriptor- = Data.ProtoLens.FieldDescriptor "options"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor ExtensionRangeOptions)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'options")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto'ExtensionRange- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, start__field_descriptor),- (Data.ProtoLens.Tag 2, end__field_descriptor),- (Data.ProtoLens.Tag 3, options__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens- _DescriptorProto'ExtensionRange'_unknownFields- (\ x__ y__ ->- x__{_DescriptorProto'ExtensionRange'_unknownFields = y__})- defMessage- = DescriptorProto'ExtensionRange{_DescriptorProto'ExtensionRange'start- = Prelude.Nothing,- _DescriptorProto'ExtensionRange'end = Prelude.Nothing,- _DescriptorProto'ExtensionRange'options =- Prelude.Nothing,- _DescriptorProto'ExtensionRange'_unknownFields = ([])}-instance Control.DeepSeq.NFData DescriptorProto'ExtensionRange- where- rnf- = \ x__ ->- Control.DeepSeq.deepseq- (_DescriptorProto'ExtensionRange'_unknownFields x__)- (Control.DeepSeq.deepseq- (_DescriptorProto'ExtensionRange'start x__)- (Control.DeepSeq.deepseq (_DescriptorProto'ExtensionRange'end x__)- (Control.DeepSeq.deepseq- (_DescriptorProto'ExtensionRange'options x__)- (()))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.start' @:: Lens' DescriptorProto'ReservedRange Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'start' @:: Lens' DescriptorProto'ReservedRange (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Descriptor_Fields.end' @:: Lens' DescriptorProto'ReservedRange Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'end' @:: Lens' DescriptorProto'ReservedRange (Prelude.Maybe Data.Int.Int32)@- -}-data DescriptorProto'ReservedRange = DescriptorProto'ReservedRange{_DescriptorProto'ReservedRange'start- ::- !(Prelude.Maybe Data.Int.Int32),- _DescriptorProto'ReservedRange'end- ::- !(Prelude.Maybe Data.Int.Int32),- _DescriptorProto'ReservedRange'_unknownFields- :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show DescriptorProto'ReservedRange where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' DescriptorProto'ReservedRange "start"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'ReservedRange'start- (\ x__ y__ -> x__{_DescriptorProto'ReservedRange'start = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' DescriptorProto'ReservedRange- "maybe'start"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'ReservedRange'start- (\ x__ y__ -> x__{_DescriptorProto'ReservedRange'start = y__}))- Prelude.id-instance Lens.Labels.HasLens' DescriptorProto'ReservedRange "end"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'ReservedRange'end- (\ x__ y__ -> x__{_DescriptorProto'ReservedRange'end = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' DescriptorProto'ReservedRange- "maybe'end"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DescriptorProto'ReservedRange'end- (\ x__ y__ -> x__{_DescriptorProto'ReservedRange'end = y__}))- Prelude.id-instance Data.ProtoLens.Message DescriptorProto'ReservedRange where- messageName _- = Data.Text.pack "google.protobuf.DescriptorProto.ReservedRange"- fieldsByTag- = let start__field_descriptor- = Data.ProtoLens.FieldDescriptor "start"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'start")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto'ReservedRange- end__field_descriptor- = Data.ProtoLens.FieldDescriptor "end"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'end")))- :: Data.ProtoLens.FieldDescriptor DescriptorProto'ReservedRange- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, start__field_descriptor),- (Data.ProtoLens.Tag 2, end__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens- _DescriptorProto'ReservedRange'_unknownFields- (\ x__ y__ ->- x__{_DescriptorProto'ReservedRange'_unknownFields = y__})- defMessage- = DescriptorProto'ReservedRange{_DescriptorProto'ReservedRange'start- = Prelude.Nothing,- _DescriptorProto'ReservedRange'end = Prelude.Nothing,- _DescriptorProto'ReservedRange'_unknownFields = ([])}-instance Control.DeepSeq.NFData DescriptorProto'ReservedRange where- rnf- = \ x__ ->- Control.DeepSeq.deepseq- (_DescriptorProto'ReservedRange'_unknownFields x__)- (Control.DeepSeq.deepseq (_DescriptorProto'ReservedRange'start x__)- (Control.DeepSeq.deepseq (_DescriptorProto'ReservedRange'end x__)- (())))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.name' @:: Lens' EnumDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'name' @:: Lens' EnumDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.value' @:: Lens' EnumDescriptorProto [EnumValueDescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.options' @:: Lens' EnumDescriptorProto EnumOptions@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'options' @:: Lens' EnumDescriptorProto (Prelude.Maybe EnumOptions)@- * 'Proto.Google.Protobuf.Descriptor_Fields.reservedRange' @:: Lens' EnumDescriptorProto [EnumDescriptorProto'EnumReservedRange]@- * 'Proto.Google.Protobuf.Descriptor_Fields.reservedName' @:: Lens' EnumDescriptorProto [Data.Text.Text]@- -}-data EnumDescriptorProto = EnumDescriptorProto{_EnumDescriptorProto'name- :: !(Prelude.Maybe Data.Text.Text),- _EnumDescriptorProto'value ::- ![EnumValueDescriptorProto],- _EnumDescriptorProto'options ::- !(Prelude.Maybe EnumOptions),- _EnumDescriptorProto'reservedRange ::- ![EnumDescriptorProto'EnumReservedRange],- _EnumDescriptorProto'reservedName ::- ![Data.Text.Text],- _EnumDescriptorProto'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show EnumDescriptorProto where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' EnumDescriptorProto "name"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumDescriptorProto'name- (\ x__ y__ -> x__{_EnumDescriptorProto'name = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' EnumDescriptorProto "maybe'name"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumDescriptorProto'name- (\ x__ y__ -> x__{_EnumDescriptorProto'name = y__}))- Prelude.id-instance Lens.Labels.HasLens' EnumDescriptorProto "value"- ([EnumValueDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumDescriptorProto'value- (\ x__ y__ -> x__{_EnumDescriptorProto'value = y__}))- Prelude.id-instance Lens.Labels.HasLens' EnumDescriptorProto "options"- (EnumOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumDescriptorProto'options- (\ x__ y__ -> x__{_EnumDescriptorProto'options = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' EnumDescriptorProto "maybe'options"- (Prelude.Maybe EnumOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumDescriptorProto'options- (\ x__ y__ -> x__{_EnumDescriptorProto'options = y__}))- Prelude.id-instance Lens.Labels.HasLens' EnumDescriptorProto "reservedRange"- ([EnumDescriptorProto'EnumReservedRange])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumDescriptorProto'reservedRange- (\ x__ y__ -> x__{_EnumDescriptorProto'reservedRange = y__}))- Prelude.id-instance Lens.Labels.HasLens' EnumDescriptorProto "reservedName"- ([Data.Text.Text])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumDescriptorProto'reservedName- (\ x__ y__ -> x__{_EnumDescriptorProto'reservedName = y__}))- Prelude.id-instance Data.ProtoLens.Message EnumDescriptorProto where- messageName _- = Data.Text.pack "google.protobuf.EnumDescriptorProto"- fieldsByTag- = let name__field_descriptor- = Data.ProtoLens.FieldDescriptor "name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")))- :: Data.ProtoLens.FieldDescriptor EnumDescriptorProto- value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor EnumValueDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))- :: Data.ProtoLens.FieldDescriptor EnumDescriptorProto- options__field_descriptor- = Data.ProtoLens.FieldDescriptor "options"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor EnumOptions)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'options")))- :: Data.ProtoLens.FieldDescriptor EnumDescriptorProto- reservedRange__field_descriptor- = Data.ProtoLens.FieldDescriptor "reserved_range"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor- EnumDescriptorProto'EnumReservedRange)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "reservedRange")))- :: Data.ProtoLens.FieldDescriptor EnumDescriptorProto- reservedName__field_descriptor- = Data.ProtoLens.FieldDescriptor "reserved_name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "reservedName")))- :: Data.ProtoLens.FieldDescriptor EnumDescriptorProto- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, name__field_descriptor),- (Data.ProtoLens.Tag 2, value__field_descriptor),- (Data.ProtoLens.Tag 3, options__field_descriptor),- (Data.ProtoLens.Tag 4, reservedRange__field_descriptor),- (Data.ProtoLens.Tag 5, reservedName__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _EnumDescriptorProto'_unknownFields- (\ x__ y__ -> x__{_EnumDescriptorProto'_unknownFields = y__})- defMessage- = EnumDescriptorProto{_EnumDescriptorProto'name = Prelude.Nothing,- _EnumDescriptorProto'value = [],- _EnumDescriptorProto'options = Prelude.Nothing,- _EnumDescriptorProto'reservedRange = [],- _EnumDescriptorProto'reservedName = [],- _EnumDescriptorProto'_unknownFields = ([])}-instance Control.DeepSeq.NFData EnumDescriptorProto where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_EnumDescriptorProto'_unknownFields x__)- (Control.DeepSeq.deepseq (_EnumDescriptorProto'name x__)- (Control.DeepSeq.deepseq (_EnumDescriptorProto'value x__)- (Control.DeepSeq.deepseq (_EnumDescriptorProto'options x__)- (Control.DeepSeq.deepseq (_EnumDescriptorProto'reservedRange x__)- (Control.DeepSeq.deepseq (_EnumDescriptorProto'reservedName x__)- (()))))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.start' @:: Lens' EnumDescriptorProto'EnumReservedRange Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'start' @:: Lens' EnumDescriptorProto'EnumReservedRange- (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Descriptor_Fields.end' @:: Lens' EnumDescriptorProto'EnumReservedRange Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'end' @:: Lens' EnumDescriptorProto'EnumReservedRange- (Prelude.Maybe Data.Int.Int32)@- -}-data EnumDescriptorProto'EnumReservedRange = EnumDescriptorProto'EnumReservedRange{_EnumDescriptorProto'EnumReservedRange'start- ::- !(Prelude.Maybe- Data.Int.Int32),- _EnumDescriptorProto'EnumReservedRange'end- ::- !(Prelude.Maybe- Data.Int.Int32),- _EnumDescriptorProto'EnumReservedRange'_unknownFields- ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show EnumDescriptorProto'EnumReservedRange where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' EnumDescriptorProto'EnumReservedRange- "start"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _EnumDescriptorProto'EnumReservedRange'start- (\ x__ y__ ->- x__{_EnumDescriptorProto'EnumReservedRange'start = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' EnumDescriptorProto'EnumReservedRange- "maybe'start"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _EnumDescriptorProto'EnumReservedRange'start- (\ x__ y__ ->- x__{_EnumDescriptorProto'EnumReservedRange'start = y__}))- Prelude.id-instance Lens.Labels.HasLens' EnumDescriptorProto'EnumReservedRange- "end"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _EnumDescriptorProto'EnumReservedRange'end- (\ x__ y__ ->- x__{_EnumDescriptorProto'EnumReservedRange'end = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' EnumDescriptorProto'EnumReservedRange- "maybe'end"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _EnumDescriptorProto'EnumReservedRange'end- (\ x__ y__ ->- x__{_EnumDescriptorProto'EnumReservedRange'end = y__}))- Prelude.id-instance Data.ProtoLens.Message- EnumDescriptorProto'EnumReservedRange- where- messageName _- = Data.Text.pack- "google.protobuf.EnumDescriptorProto.EnumReservedRange"- fieldsByTag- = let start__field_descriptor- = Data.ProtoLens.FieldDescriptor "start"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'start")))- ::- Data.ProtoLens.FieldDescriptor- EnumDescriptorProto'EnumReservedRange- end__field_descriptor- = Data.ProtoLens.FieldDescriptor "end"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'end")))- ::- Data.ProtoLens.FieldDescriptor- EnumDescriptorProto'EnumReservedRange- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, start__field_descriptor),- (Data.ProtoLens.Tag 2, end__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens- _EnumDescriptorProto'EnumReservedRange'_unknownFields- (\ x__ y__ ->- x__{_EnumDescriptorProto'EnumReservedRange'_unknownFields = y__})- defMessage- = EnumDescriptorProto'EnumReservedRange{_EnumDescriptorProto'EnumReservedRange'start- = Prelude.Nothing,- _EnumDescriptorProto'EnumReservedRange'end =- Prelude.Nothing,- _EnumDescriptorProto'EnumReservedRange'_unknownFields- = ([])}-instance Control.DeepSeq.NFData- EnumDescriptorProto'EnumReservedRange- where- rnf- = \ x__ ->- Control.DeepSeq.deepseq- (_EnumDescriptorProto'EnumReservedRange'_unknownFields x__)- (Control.DeepSeq.deepseq- (_EnumDescriptorProto'EnumReservedRange'start x__)- (Control.DeepSeq.deepseq- (_EnumDescriptorProto'EnumReservedRange'end x__)- (())))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.allowAlias' @:: Lens' EnumOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'allowAlias' @:: Lens' EnumOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.deprecated' @:: Lens' EnumOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'deprecated' @:: Lens' EnumOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.uninterpretedOption' @:: Lens' EnumOptions [UninterpretedOption]@- -}-data EnumOptions = EnumOptions{_EnumOptions'allowAlias ::- !(Prelude.Maybe Prelude.Bool),- _EnumOptions'deprecated :: !(Prelude.Maybe Prelude.Bool),- _EnumOptions'uninterpretedOption :: ![UninterpretedOption],- _EnumOptions'_unknownFields :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show EnumOptions where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' EnumOptions "allowAlias"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumOptions'allowAlias- (\ x__ y__ -> x__{_EnumOptions'allowAlias = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' EnumOptions "maybe'allowAlias"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumOptions'allowAlias- (\ x__ y__ -> x__{_EnumOptions'allowAlias = y__}))- Prelude.id-instance Lens.Labels.HasLens' EnumOptions "deprecated"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumOptions'deprecated- (\ x__ y__ -> x__{_EnumOptions'deprecated = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' EnumOptions "maybe'deprecated"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumOptions'deprecated- (\ x__ y__ -> x__{_EnumOptions'deprecated = y__}))- Prelude.id-instance Lens.Labels.HasLens' EnumOptions "uninterpretedOption"- ([UninterpretedOption])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumOptions'uninterpretedOption- (\ x__ y__ -> x__{_EnumOptions'uninterpretedOption = y__}))- Prelude.id-instance Data.ProtoLens.Message EnumOptions where- messageName _ = Data.Text.pack "google.protobuf.EnumOptions"- fieldsByTag- = let allowAlias__field_descriptor- = Data.ProtoLens.FieldDescriptor "allow_alias"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'allowAlias")))- :: Data.ProtoLens.FieldDescriptor EnumOptions- deprecated__field_descriptor- = Data.ProtoLens.FieldDescriptor "deprecated"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'deprecated")))- :: Data.ProtoLens.FieldDescriptor EnumOptions- uninterpretedOption__field_descriptor- = Data.ProtoLens.FieldDescriptor "uninterpreted_option"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor UninterpretedOption)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "uninterpretedOption")))- :: Data.ProtoLens.FieldDescriptor EnumOptions- in- Data.Map.fromList- [(Data.ProtoLens.Tag 2, allowAlias__field_descriptor),- (Data.ProtoLens.Tag 3, deprecated__field_descriptor),- (Data.ProtoLens.Tag 999, uninterpretedOption__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _EnumOptions'_unknownFields- (\ x__ y__ -> x__{_EnumOptions'_unknownFields = y__})- defMessage- = EnumOptions{_EnumOptions'allowAlias = Prelude.Nothing,- _EnumOptions'deprecated = Prelude.Nothing,- _EnumOptions'uninterpretedOption = [],- _EnumOptions'_unknownFields = ([])}-instance Control.DeepSeq.NFData EnumOptions where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_EnumOptions'_unknownFields x__)- (Control.DeepSeq.deepseq (_EnumOptions'allowAlias x__)- (Control.DeepSeq.deepseq (_EnumOptions'deprecated x__)- (Control.DeepSeq.deepseq (_EnumOptions'uninterpretedOption x__)- (()))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.name' @:: Lens' EnumValueDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'name' @:: Lens' EnumValueDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.number' @:: Lens' EnumValueDescriptorProto Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'number' @:: Lens' EnumValueDescriptorProto (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Descriptor_Fields.options' @:: Lens' EnumValueDescriptorProto EnumValueOptions@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'options' @:: Lens' EnumValueDescriptorProto (Prelude.Maybe EnumValueOptions)@- -}-data EnumValueDescriptorProto = EnumValueDescriptorProto{_EnumValueDescriptorProto'name- :: !(Prelude.Maybe Data.Text.Text),- _EnumValueDescriptorProto'number ::- !(Prelude.Maybe Data.Int.Int32),- _EnumValueDescriptorProto'options ::- !(Prelude.Maybe EnumValueOptions),- _EnumValueDescriptorProto'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show EnumValueDescriptorProto where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' EnumValueDescriptorProto "name"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumValueDescriptorProto'name- (\ x__ y__ -> x__{_EnumValueDescriptorProto'name = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' EnumValueDescriptorProto "maybe'name"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumValueDescriptorProto'name- (\ x__ y__ -> x__{_EnumValueDescriptorProto'name = y__}))- Prelude.id-instance Lens.Labels.HasLens' EnumValueDescriptorProto "number"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumValueDescriptorProto'number- (\ x__ y__ -> x__{_EnumValueDescriptorProto'number = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' EnumValueDescriptorProto- "maybe'number"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumValueDescriptorProto'number- (\ x__ y__ -> x__{_EnumValueDescriptorProto'number = y__}))- Prelude.id-instance Lens.Labels.HasLens' EnumValueDescriptorProto "options"- (EnumValueOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumValueDescriptorProto'options- (\ x__ y__ -> x__{_EnumValueDescriptorProto'options = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' EnumValueDescriptorProto- "maybe'options"- (Prelude.Maybe EnumValueOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumValueDescriptorProto'options- (\ x__ y__ -> x__{_EnumValueDescriptorProto'options = y__}))- Prelude.id-instance Data.ProtoLens.Message EnumValueDescriptorProto where- messageName _- = Data.Text.pack "google.protobuf.EnumValueDescriptorProto"- fieldsByTag- = let name__field_descriptor- = Data.ProtoLens.FieldDescriptor "name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")))- :: Data.ProtoLens.FieldDescriptor EnumValueDescriptorProto- number__field_descriptor- = Data.ProtoLens.FieldDescriptor "number"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'number")))- :: Data.ProtoLens.FieldDescriptor EnumValueDescriptorProto- options__field_descriptor- = Data.ProtoLens.FieldDescriptor "options"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor EnumValueOptions)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'options")))- :: Data.ProtoLens.FieldDescriptor EnumValueDescriptorProto- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, name__field_descriptor),- (Data.ProtoLens.Tag 2, number__field_descriptor),- (Data.ProtoLens.Tag 3, options__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens- _EnumValueDescriptorProto'_unknownFields- (\ x__ y__ -> x__{_EnumValueDescriptorProto'_unknownFields = y__})- defMessage- = EnumValueDescriptorProto{_EnumValueDescriptorProto'name =- Prelude.Nothing,- _EnumValueDescriptorProto'number = Prelude.Nothing,- _EnumValueDescriptorProto'options = Prelude.Nothing,- _EnumValueDescriptorProto'_unknownFields = ([])}-instance Control.DeepSeq.NFData EnumValueDescriptorProto where- rnf- = \ x__ ->- Control.DeepSeq.deepseq- (_EnumValueDescriptorProto'_unknownFields x__)- (Control.DeepSeq.deepseq (_EnumValueDescriptorProto'name x__)- (Control.DeepSeq.deepseq (_EnumValueDescriptorProto'number x__)- (Control.DeepSeq.deepseq (_EnumValueDescriptorProto'options x__)- (()))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.deprecated' @:: Lens' EnumValueOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'deprecated' @:: Lens' EnumValueOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.uninterpretedOption' @:: Lens' EnumValueOptions [UninterpretedOption]@- -}-data EnumValueOptions = EnumValueOptions{_EnumValueOptions'deprecated- :: !(Prelude.Maybe Prelude.Bool),- _EnumValueOptions'uninterpretedOption ::- ![UninterpretedOption],- _EnumValueOptions'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show EnumValueOptions where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' EnumValueOptions "deprecated"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumValueOptions'deprecated- (\ x__ y__ -> x__{_EnumValueOptions'deprecated = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' EnumValueOptions "maybe'deprecated"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumValueOptions'deprecated- (\ x__ y__ -> x__{_EnumValueOptions'deprecated = y__}))- Prelude.id-instance Lens.Labels.HasLens' EnumValueOptions- "uninterpretedOption"- ([UninterpretedOption])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _EnumValueOptions'uninterpretedOption- (\ x__ y__ -> x__{_EnumValueOptions'uninterpretedOption = y__}))- Prelude.id-instance Data.ProtoLens.Message EnumValueOptions where- messageName _ = Data.Text.pack "google.protobuf.EnumValueOptions"- fieldsByTag- = let deprecated__field_descriptor- = Data.ProtoLens.FieldDescriptor "deprecated"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'deprecated")))- :: Data.ProtoLens.FieldDescriptor EnumValueOptions- uninterpretedOption__field_descriptor- = Data.ProtoLens.FieldDescriptor "uninterpreted_option"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor UninterpretedOption)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "uninterpretedOption")))- :: Data.ProtoLens.FieldDescriptor EnumValueOptions- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, deprecated__field_descriptor),- (Data.ProtoLens.Tag 999, uninterpretedOption__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _EnumValueOptions'_unknownFields- (\ x__ y__ -> x__{_EnumValueOptions'_unknownFields = y__})- defMessage- = EnumValueOptions{_EnumValueOptions'deprecated = Prelude.Nothing,- _EnumValueOptions'uninterpretedOption = [],- _EnumValueOptions'_unknownFields = ([])}-instance Control.DeepSeq.NFData EnumValueOptions where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_EnumValueOptions'_unknownFields x__)- (Control.DeepSeq.deepseq (_EnumValueOptions'deprecated x__)- (Control.DeepSeq.deepseq- (_EnumValueOptions'uninterpretedOption x__)- (())))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.uninterpretedOption' @:: Lens' ExtensionRangeOptions [UninterpretedOption]@- -}-data ExtensionRangeOptions = ExtensionRangeOptions{_ExtensionRangeOptions'uninterpretedOption- :: ![UninterpretedOption],- _ExtensionRangeOptions'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show ExtensionRangeOptions where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' ExtensionRangeOptions- "uninterpretedOption"- ([UninterpretedOption])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _ExtensionRangeOptions'uninterpretedOption- (\ x__ y__ ->- x__{_ExtensionRangeOptions'uninterpretedOption = y__}))- Prelude.id-instance Data.ProtoLens.Message ExtensionRangeOptions where- messageName _- = Data.Text.pack "google.protobuf.ExtensionRangeOptions"- fieldsByTag- = let uninterpretedOption__field_descriptor- = Data.ProtoLens.FieldDescriptor "uninterpreted_option"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor UninterpretedOption)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "uninterpretedOption")))- :: Data.ProtoLens.FieldDescriptor ExtensionRangeOptions- in- Data.Map.fromList- [(Data.ProtoLens.Tag 999, uninterpretedOption__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _ExtensionRangeOptions'_unknownFields- (\ x__ y__ -> x__{_ExtensionRangeOptions'_unknownFields = y__})- defMessage- = ExtensionRangeOptions{_ExtensionRangeOptions'uninterpretedOption- = [],- _ExtensionRangeOptions'_unknownFields = ([])}-instance Control.DeepSeq.NFData ExtensionRangeOptions where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_ExtensionRangeOptions'_unknownFields x__)- (Control.DeepSeq.deepseq- (_ExtensionRangeOptions'uninterpretedOption x__)- (()))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.name' @:: Lens' FieldDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'name' @:: Lens' FieldDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.number' @:: Lens' FieldDescriptorProto Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'number' @:: Lens' FieldDescriptorProto (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Descriptor_Fields.label' @:: Lens' FieldDescriptorProto FieldDescriptorProto'Label@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'label' @:: Lens' FieldDescriptorProto- (Prelude.Maybe FieldDescriptorProto'Label)@- * 'Proto.Google.Protobuf.Descriptor_Fields.type'' @:: Lens' FieldDescriptorProto FieldDescriptorProto'Type@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'type'' @:: Lens' FieldDescriptorProto- (Prelude.Maybe FieldDescriptorProto'Type)@- * 'Proto.Google.Protobuf.Descriptor_Fields.typeName' @:: Lens' FieldDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'typeName' @:: Lens' FieldDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.extendee' @:: Lens' FieldDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'extendee' @:: Lens' FieldDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.defaultValue' @:: Lens' FieldDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'defaultValue' @:: Lens' FieldDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.oneofIndex' @:: Lens' FieldDescriptorProto Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'oneofIndex' @:: Lens' FieldDescriptorProto (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Descriptor_Fields.jsonName' @:: Lens' FieldDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'jsonName' @:: Lens' FieldDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.options' @:: Lens' FieldDescriptorProto FieldOptions@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'options' @:: Lens' FieldDescriptorProto (Prelude.Maybe FieldOptions)@- -}-data FieldDescriptorProto = FieldDescriptorProto{_FieldDescriptorProto'name- :: !(Prelude.Maybe Data.Text.Text),- _FieldDescriptorProto'number ::- !(Prelude.Maybe Data.Int.Int32),- _FieldDescriptorProto'label ::- !(Prelude.Maybe FieldDescriptorProto'Label),- _FieldDescriptorProto'type' ::- !(Prelude.Maybe FieldDescriptorProto'Type),- _FieldDescriptorProto'typeName ::- !(Prelude.Maybe Data.Text.Text),- _FieldDescriptorProto'extendee ::- !(Prelude.Maybe Data.Text.Text),- _FieldDescriptorProto'defaultValue ::- !(Prelude.Maybe Data.Text.Text),- _FieldDescriptorProto'oneofIndex ::- !(Prelude.Maybe Data.Int.Int32),- _FieldDescriptorProto'jsonName ::- !(Prelude.Maybe Data.Text.Text),- _FieldDescriptorProto'options ::- !(Prelude.Maybe FieldOptions),- _FieldDescriptorProto'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show FieldDescriptorProto where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' FieldDescriptorProto "name"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'name- (\ x__ y__ -> x__{_FieldDescriptorProto'name = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FieldDescriptorProto "maybe'name"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'name- (\ x__ y__ -> x__{_FieldDescriptorProto'name = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldDescriptorProto "number"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'number- (\ x__ y__ -> x__{_FieldDescriptorProto'number = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FieldDescriptorProto "maybe'number"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'number- (\ x__ y__ -> x__{_FieldDescriptorProto'number = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldDescriptorProto "label"- (FieldDescriptorProto'Label)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'label- (\ x__ y__ -> x__{_FieldDescriptorProto'label = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FieldDescriptorProto "maybe'label"- (Prelude.Maybe FieldDescriptorProto'Label)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'label- (\ x__ y__ -> x__{_FieldDescriptorProto'label = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldDescriptorProto "type'"- (FieldDescriptorProto'Type)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'type'- (\ x__ y__ -> x__{_FieldDescriptorProto'type' = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FieldDescriptorProto "maybe'type'"- (Prelude.Maybe FieldDescriptorProto'Type)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'type'- (\ x__ y__ -> x__{_FieldDescriptorProto'type' = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldDescriptorProto "typeName"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'typeName- (\ x__ y__ -> x__{_FieldDescriptorProto'typeName = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FieldDescriptorProto "maybe'typeName"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'typeName- (\ x__ y__ -> x__{_FieldDescriptorProto'typeName = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldDescriptorProto "extendee"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'extendee- (\ x__ y__ -> x__{_FieldDescriptorProto'extendee = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FieldDescriptorProto "maybe'extendee"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'extendee- (\ x__ y__ -> x__{_FieldDescriptorProto'extendee = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldDescriptorProto "defaultValue"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'defaultValue- (\ x__ y__ -> x__{_FieldDescriptorProto'defaultValue = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FieldDescriptorProto- "maybe'defaultValue"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'defaultValue- (\ x__ y__ -> x__{_FieldDescriptorProto'defaultValue = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldDescriptorProto "oneofIndex"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'oneofIndex- (\ x__ y__ -> x__{_FieldDescriptorProto'oneofIndex = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FieldDescriptorProto- "maybe'oneofIndex"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'oneofIndex- (\ x__ y__ -> x__{_FieldDescriptorProto'oneofIndex = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldDescriptorProto "jsonName"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'jsonName- (\ x__ y__ -> x__{_FieldDescriptorProto'jsonName = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FieldDescriptorProto "maybe'jsonName"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'jsonName- (\ x__ y__ -> x__{_FieldDescriptorProto'jsonName = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldDescriptorProto "options"- (FieldOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'options- (\ x__ y__ -> x__{_FieldDescriptorProto'options = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' FieldDescriptorProto "maybe'options"- (Prelude.Maybe FieldOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldDescriptorProto'options- (\ x__ y__ -> x__{_FieldDescriptorProto'options = y__}))- Prelude.id-instance Data.ProtoLens.Message FieldDescriptorProto where- messageName _- = Data.Text.pack "google.protobuf.FieldDescriptorProto"- fieldsByTag- = let name__field_descriptor- = Data.ProtoLens.FieldDescriptor "name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")))- :: Data.ProtoLens.FieldDescriptor FieldDescriptorProto- number__field_descriptor- = Data.ProtoLens.FieldDescriptor "number"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'number")))- :: Data.ProtoLens.FieldDescriptor FieldDescriptorProto- label__field_descriptor- = Data.ProtoLens.FieldDescriptor "label"- (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::- Data.ProtoLens.FieldTypeDescriptor FieldDescriptorProto'Label)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'label")))- :: Data.ProtoLens.FieldDescriptor FieldDescriptorProto- type'__field_descriptor- = Data.ProtoLens.FieldDescriptor "type"- (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::- Data.ProtoLens.FieldTypeDescriptor FieldDescriptorProto'Type)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'type'")))- :: Data.ProtoLens.FieldDescriptor FieldDescriptorProto- typeName__field_descriptor- = Data.ProtoLens.FieldDescriptor "type_name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'typeName")))- :: Data.ProtoLens.FieldDescriptor FieldDescriptorProto- extendee__field_descriptor- = Data.ProtoLens.FieldDescriptor "extendee"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'extendee")))- :: Data.ProtoLens.FieldDescriptor FieldDescriptorProto- defaultValue__field_descriptor- = Data.ProtoLens.FieldDescriptor "default_value"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'defaultValue")))- :: Data.ProtoLens.FieldDescriptor FieldDescriptorProto- oneofIndex__field_descriptor- = Data.ProtoLens.FieldDescriptor "oneof_index"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'oneofIndex")))- :: Data.ProtoLens.FieldDescriptor FieldDescriptorProto- jsonName__field_descriptor- = Data.ProtoLens.FieldDescriptor "json_name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'jsonName")))- :: Data.ProtoLens.FieldDescriptor FieldDescriptorProto- options__field_descriptor- = Data.ProtoLens.FieldDescriptor "options"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor FieldOptions)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'options")))- :: Data.ProtoLens.FieldDescriptor FieldDescriptorProto- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, name__field_descriptor),- (Data.ProtoLens.Tag 3, number__field_descriptor),- (Data.ProtoLens.Tag 4, label__field_descriptor),- (Data.ProtoLens.Tag 5, type'__field_descriptor),- (Data.ProtoLens.Tag 6, typeName__field_descriptor),- (Data.ProtoLens.Tag 2, extendee__field_descriptor),- (Data.ProtoLens.Tag 7, defaultValue__field_descriptor),- (Data.ProtoLens.Tag 9, oneofIndex__field_descriptor),- (Data.ProtoLens.Tag 10, jsonName__field_descriptor),- (Data.ProtoLens.Tag 8, options__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _FieldDescriptorProto'_unknownFields- (\ x__ y__ -> x__{_FieldDescriptorProto'_unknownFields = y__})- defMessage- = FieldDescriptorProto{_FieldDescriptorProto'name =- Prelude.Nothing,- _FieldDescriptorProto'number = Prelude.Nothing,- _FieldDescriptorProto'label = Prelude.Nothing,- _FieldDescriptorProto'type' = Prelude.Nothing,- _FieldDescriptorProto'typeName = Prelude.Nothing,- _FieldDescriptorProto'extendee = Prelude.Nothing,- _FieldDescriptorProto'defaultValue = Prelude.Nothing,- _FieldDescriptorProto'oneofIndex = Prelude.Nothing,- _FieldDescriptorProto'jsonName = Prelude.Nothing,- _FieldDescriptorProto'options = Prelude.Nothing,- _FieldDescriptorProto'_unknownFields = ([])}-instance Control.DeepSeq.NFData FieldDescriptorProto where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_FieldDescriptorProto'_unknownFields x__)- (Control.DeepSeq.deepseq (_FieldDescriptorProto'name x__)- (Control.DeepSeq.deepseq (_FieldDescriptorProto'number x__)- (Control.DeepSeq.deepseq (_FieldDescriptorProto'label x__)- (Control.DeepSeq.deepseq (_FieldDescriptorProto'type' x__)- (Control.DeepSeq.deepseq (_FieldDescriptorProto'typeName x__)- (Control.DeepSeq.deepseq (_FieldDescriptorProto'extendee x__)- (Control.DeepSeq.deepseq (_FieldDescriptorProto'defaultValue x__)- (Control.DeepSeq.deepseq (_FieldDescriptorProto'oneofIndex x__)- (Control.DeepSeq.deepseq- (_FieldDescriptorProto'jsonName x__)- (Control.DeepSeq.deepseq- (_FieldDescriptorProto'options x__)- (())))))))))))-data FieldDescriptorProto'Label = FieldDescriptorProto'LABEL_OPTIONAL- | FieldDescriptorProto'LABEL_REQUIRED- | FieldDescriptorProto'LABEL_REPEATED- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)-instance Data.ProtoLens.FieldDefault FieldDescriptorProto'Label- where- fieldDefault = FieldDescriptorProto'LABEL_OPTIONAL-instance Data.ProtoLens.MessageEnum FieldDescriptorProto'Label- where- maybeToEnum 1 = Prelude.Just FieldDescriptorProto'LABEL_OPTIONAL- maybeToEnum 2 = Prelude.Just FieldDescriptorProto'LABEL_REQUIRED- maybeToEnum 3 = Prelude.Just FieldDescriptorProto'LABEL_REPEATED- maybeToEnum _ = Prelude.Nothing- showEnum FieldDescriptorProto'LABEL_OPTIONAL = "LABEL_OPTIONAL"- showEnum FieldDescriptorProto'LABEL_REQUIRED = "LABEL_REQUIRED"- showEnum FieldDescriptorProto'LABEL_REPEATED = "LABEL_REPEATED"- readEnum "LABEL_OPTIONAL"- = Prelude.Just FieldDescriptorProto'LABEL_OPTIONAL- readEnum "LABEL_REQUIRED"- = Prelude.Just FieldDescriptorProto'LABEL_REQUIRED- readEnum "LABEL_REPEATED"- = Prelude.Just FieldDescriptorProto'LABEL_REPEATED- readEnum _ = Prelude.Nothing-instance Prelude.Enum FieldDescriptorProto'Label where- toEnum k__- = Prelude.maybe- (Prelude.error- ((Prelude.++) "toEnum: unknown value for enum Label: "- (Prelude.show k__)))- Prelude.id- (Data.ProtoLens.maybeToEnum k__)- fromEnum FieldDescriptorProto'LABEL_OPTIONAL = 1- fromEnum FieldDescriptorProto'LABEL_REQUIRED = 2- fromEnum FieldDescriptorProto'LABEL_REPEATED = 3- succ FieldDescriptorProto'LABEL_REPEATED- = Prelude.error- "FieldDescriptorProto'Label.succ: bad argument FieldDescriptorProto'LABEL_REPEATED. This value would be out of bounds."- succ FieldDescriptorProto'LABEL_OPTIONAL- = FieldDescriptorProto'LABEL_REQUIRED- succ FieldDescriptorProto'LABEL_REQUIRED- = FieldDescriptorProto'LABEL_REPEATED- pred FieldDescriptorProto'LABEL_OPTIONAL- = Prelude.error- "FieldDescriptorProto'Label.pred: bad argument FieldDescriptorProto'LABEL_OPTIONAL. This value would be out of bounds."- pred FieldDescriptorProto'LABEL_REQUIRED- = FieldDescriptorProto'LABEL_OPTIONAL- pred FieldDescriptorProto'LABEL_REPEATED- = FieldDescriptorProto'LABEL_REQUIRED- enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom- enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo- enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen- enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo-instance Prelude.Bounded FieldDescriptorProto'Label where- minBound = FieldDescriptorProto'LABEL_OPTIONAL- maxBound = FieldDescriptorProto'LABEL_REPEATED-instance Control.DeepSeq.NFData FieldDescriptorProto'Label where- rnf x__ = Prelude.seq x__ (())-data FieldDescriptorProto'Type = FieldDescriptorProto'TYPE_DOUBLE- | FieldDescriptorProto'TYPE_FLOAT- | FieldDescriptorProto'TYPE_INT64- | FieldDescriptorProto'TYPE_UINT64- | FieldDescriptorProto'TYPE_INT32- | FieldDescriptorProto'TYPE_FIXED64- | FieldDescriptorProto'TYPE_FIXED32- | FieldDescriptorProto'TYPE_BOOL- | FieldDescriptorProto'TYPE_STRING- | FieldDescriptorProto'TYPE_GROUP- | FieldDescriptorProto'TYPE_MESSAGE- | FieldDescriptorProto'TYPE_BYTES- | FieldDescriptorProto'TYPE_UINT32- | FieldDescriptorProto'TYPE_ENUM- | FieldDescriptorProto'TYPE_SFIXED32- | FieldDescriptorProto'TYPE_SFIXED64- | FieldDescriptorProto'TYPE_SINT32- | FieldDescriptorProto'TYPE_SINT64- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)-instance Data.ProtoLens.FieldDefault FieldDescriptorProto'Type- where- fieldDefault = FieldDescriptorProto'TYPE_DOUBLE-instance Data.ProtoLens.MessageEnum FieldDescriptorProto'Type where- maybeToEnum 1 = Prelude.Just FieldDescriptorProto'TYPE_DOUBLE- maybeToEnum 2 = Prelude.Just FieldDescriptorProto'TYPE_FLOAT- maybeToEnum 3 = Prelude.Just FieldDescriptorProto'TYPE_INT64- maybeToEnum 4 = Prelude.Just FieldDescriptorProto'TYPE_UINT64- maybeToEnum 5 = Prelude.Just FieldDescriptorProto'TYPE_INT32- maybeToEnum 6 = Prelude.Just FieldDescriptorProto'TYPE_FIXED64- maybeToEnum 7 = Prelude.Just FieldDescriptorProto'TYPE_FIXED32- maybeToEnum 8 = Prelude.Just FieldDescriptorProto'TYPE_BOOL- maybeToEnum 9 = Prelude.Just FieldDescriptorProto'TYPE_STRING- maybeToEnum 10 = Prelude.Just FieldDescriptorProto'TYPE_GROUP- maybeToEnum 11 = Prelude.Just FieldDescriptorProto'TYPE_MESSAGE- maybeToEnum 12 = Prelude.Just FieldDescriptorProto'TYPE_BYTES- maybeToEnum 13 = Prelude.Just FieldDescriptorProto'TYPE_UINT32- maybeToEnum 14 = Prelude.Just FieldDescriptorProto'TYPE_ENUM- maybeToEnum 15 = Prelude.Just FieldDescriptorProto'TYPE_SFIXED32- maybeToEnum 16 = Prelude.Just FieldDescriptorProto'TYPE_SFIXED64- maybeToEnum 17 = Prelude.Just FieldDescriptorProto'TYPE_SINT32- maybeToEnum 18 = Prelude.Just FieldDescriptorProto'TYPE_SINT64- maybeToEnum _ = Prelude.Nothing- showEnum FieldDescriptorProto'TYPE_DOUBLE = "TYPE_DOUBLE"- showEnum FieldDescriptorProto'TYPE_FLOAT = "TYPE_FLOAT"- showEnum FieldDescriptorProto'TYPE_INT64 = "TYPE_INT64"- showEnum FieldDescriptorProto'TYPE_UINT64 = "TYPE_UINT64"- showEnum FieldDescriptorProto'TYPE_INT32 = "TYPE_INT32"- showEnum FieldDescriptorProto'TYPE_FIXED64 = "TYPE_FIXED64"- showEnum FieldDescriptorProto'TYPE_FIXED32 = "TYPE_FIXED32"- showEnum FieldDescriptorProto'TYPE_BOOL = "TYPE_BOOL"- showEnum FieldDescriptorProto'TYPE_STRING = "TYPE_STRING"- showEnum FieldDescriptorProto'TYPE_GROUP = "TYPE_GROUP"- showEnum FieldDescriptorProto'TYPE_MESSAGE = "TYPE_MESSAGE"- showEnum FieldDescriptorProto'TYPE_BYTES = "TYPE_BYTES"- showEnum FieldDescriptorProto'TYPE_UINT32 = "TYPE_UINT32"- showEnum FieldDescriptorProto'TYPE_ENUM = "TYPE_ENUM"- showEnum FieldDescriptorProto'TYPE_SFIXED32 = "TYPE_SFIXED32"- showEnum FieldDescriptorProto'TYPE_SFIXED64 = "TYPE_SFIXED64"- showEnum FieldDescriptorProto'TYPE_SINT32 = "TYPE_SINT32"- showEnum FieldDescriptorProto'TYPE_SINT64 = "TYPE_SINT64"- readEnum "TYPE_DOUBLE"- = Prelude.Just FieldDescriptorProto'TYPE_DOUBLE- readEnum "TYPE_FLOAT"- = Prelude.Just FieldDescriptorProto'TYPE_FLOAT- readEnum "TYPE_INT64"- = Prelude.Just FieldDescriptorProto'TYPE_INT64- readEnum "TYPE_UINT64"- = Prelude.Just FieldDescriptorProto'TYPE_UINT64- readEnum "TYPE_INT32"- = Prelude.Just FieldDescriptorProto'TYPE_INT32- readEnum "TYPE_FIXED64"- = Prelude.Just FieldDescriptorProto'TYPE_FIXED64- readEnum "TYPE_FIXED32"- = Prelude.Just FieldDescriptorProto'TYPE_FIXED32- readEnum "TYPE_BOOL" = Prelude.Just FieldDescriptorProto'TYPE_BOOL- readEnum "TYPE_STRING"- = Prelude.Just FieldDescriptorProto'TYPE_STRING- readEnum "TYPE_GROUP"- = Prelude.Just FieldDescriptorProto'TYPE_GROUP- readEnum "TYPE_MESSAGE"- = Prelude.Just FieldDescriptorProto'TYPE_MESSAGE- readEnum "TYPE_BYTES"- = Prelude.Just FieldDescriptorProto'TYPE_BYTES- readEnum "TYPE_UINT32"- = Prelude.Just FieldDescriptorProto'TYPE_UINT32- readEnum "TYPE_ENUM" = Prelude.Just FieldDescriptorProto'TYPE_ENUM- readEnum "TYPE_SFIXED32"- = Prelude.Just FieldDescriptorProto'TYPE_SFIXED32- readEnum "TYPE_SFIXED64"- = Prelude.Just FieldDescriptorProto'TYPE_SFIXED64- readEnum "TYPE_SINT32"- = Prelude.Just FieldDescriptorProto'TYPE_SINT32- readEnum "TYPE_SINT64"- = Prelude.Just FieldDescriptorProto'TYPE_SINT64- readEnum _ = Prelude.Nothing-instance Prelude.Enum FieldDescriptorProto'Type where- toEnum k__- = Prelude.maybe- (Prelude.error- ((Prelude.++) "toEnum: unknown value for enum Type: "- (Prelude.show k__)))- Prelude.id- (Data.ProtoLens.maybeToEnum k__)- fromEnum FieldDescriptorProto'TYPE_DOUBLE = 1- fromEnum FieldDescriptorProto'TYPE_FLOAT = 2- fromEnum FieldDescriptorProto'TYPE_INT64 = 3- fromEnum FieldDescriptorProto'TYPE_UINT64 = 4- fromEnum FieldDescriptorProto'TYPE_INT32 = 5- fromEnum FieldDescriptorProto'TYPE_FIXED64 = 6- fromEnum FieldDescriptorProto'TYPE_FIXED32 = 7- fromEnum FieldDescriptorProto'TYPE_BOOL = 8- fromEnum FieldDescriptorProto'TYPE_STRING = 9- fromEnum FieldDescriptorProto'TYPE_GROUP = 10- fromEnum FieldDescriptorProto'TYPE_MESSAGE = 11- fromEnum FieldDescriptorProto'TYPE_BYTES = 12- fromEnum FieldDescriptorProto'TYPE_UINT32 = 13- fromEnum FieldDescriptorProto'TYPE_ENUM = 14- fromEnum FieldDescriptorProto'TYPE_SFIXED32 = 15- fromEnum FieldDescriptorProto'TYPE_SFIXED64 = 16- fromEnum FieldDescriptorProto'TYPE_SINT32 = 17- fromEnum FieldDescriptorProto'TYPE_SINT64 = 18- succ FieldDescriptorProto'TYPE_SINT64- = Prelude.error- "FieldDescriptorProto'Type.succ: bad argument FieldDescriptorProto'TYPE_SINT64. This value would be out of bounds."- succ FieldDescriptorProto'TYPE_DOUBLE- = FieldDescriptorProto'TYPE_FLOAT- succ FieldDescriptorProto'TYPE_FLOAT- = FieldDescriptorProto'TYPE_INT64- succ FieldDescriptorProto'TYPE_INT64- = FieldDescriptorProto'TYPE_UINT64- succ FieldDescriptorProto'TYPE_UINT64- = FieldDescriptorProto'TYPE_INT32- succ FieldDescriptorProto'TYPE_INT32- = FieldDescriptorProto'TYPE_FIXED64- succ FieldDescriptorProto'TYPE_FIXED64- = FieldDescriptorProto'TYPE_FIXED32- succ FieldDescriptorProto'TYPE_FIXED32- = FieldDescriptorProto'TYPE_BOOL- succ FieldDescriptorProto'TYPE_BOOL- = FieldDescriptorProto'TYPE_STRING- succ FieldDescriptorProto'TYPE_STRING- = FieldDescriptorProto'TYPE_GROUP- succ FieldDescriptorProto'TYPE_GROUP- = FieldDescriptorProto'TYPE_MESSAGE- succ FieldDescriptorProto'TYPE_MESSAGE- = FieldDescriptorProto'TYPE_BYTES- succ FieldDescriptorProto'TYPE_BYTES- = FieldDescriptorProto'TYPE_UINT32- succ FieldDescriptorProto'TYPE_UINT32- = FieldDescriptorProto'TYPE_ENUM- succ FieldDescriptorProto'TYPE_ENUM- = FieldDescriptorProto'TYPE_SFIXED32- succ FieldDescriptorProto'TYPE_SFIXED32- = FieldDescriptorProto'TYPE_SFIXED64- succ FieldDescriptorProto'TYPE_SFIXED64- = FieldDescriptorProto'TYPE_SINT32- succ FieldDescriptorProto'TYPE_SINT32- = FieldDescriptorProto'TYPE_SINT64- pred FieldDescriptorProto'TYPE_DOUBLE- = Prelude.error- "FieldDescriptorProto'Type.pred: bad argument FieldDescriptorProto'TYPE_DOUBLE. This value would be out of bounds."- pred FieldDescriptorProto'TYPE_FLOAT- = FieldDescriptorProto'TYPE_DOUBLE- pred FieldDescriptorProto'TYPE_INT64- = FieldDescriptorProto'TYPE_FLOAT- pred FieldDescriptorProto'TYPE_UINT64- = FieldDescriptorProto'TYPE_INT64- pred FieldDescriptorProto'TYPE_INT32- = FieldDescriptorProto'TYPE_UINT64- pred FieldDescriptorProto'TYPE_FIXED64- = FieldDescriptorProto'TYPE_INT32- pred FieldDescriptorProto'TYPE_FIXED32- = FieldDescriptorProto'TYPE_FIXED64- pred FieldDescriptorProto'TYPE_BOOL- = FieldDescriptorProto'TYPE_FIXED32- pred FieldDescriptorProto'TYPE_STRING- = FieldDescriptorProto'TYPE_BOOL- pred FieldDescriptorProto'TYPE_GROUP- = FieldDescriptorProto'TYPE_STRING- pred FieldDescriptorProto'TYPE_MESSAGE- = FieldDescriptorProto'TYPE_GROUP- pred FieldDescriptorProto'TYPE_BYTES- = FieldDescriptorProto'TYPE_MESSAGE- pred FieldDescriptorProto'TYPE_UINT32- = FieldDescriptorProto'TYPE_BYTES- pred FieldDescriptorProto'TYPE_ENUM- = FieldDescriptorProto'TYPE_UINT32- pred FieldDescriptorProto'TYPE_SFIXED32- = FieldDescriptorProto'TYPE_ENUM- pred FieldDescriptorProto'TYPE_SFIXED64- = FieldDescriptorProto'TYPE_SFIXED32- pred FieldDescriptorProto'TYPE_SINT32- = FieldDescriptorProto'TYPE_SFIXED64- pred FieldDescriptorProto'TYPE_SINT64- = FieldDescriptorProto'TYPE_SINT32- enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom- enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo- enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen- enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo-instance Prelude.Bounded FieldDescriptorProto'Type where- minBound = FieldDescriptorProto'TYPE_DOUBLE- maxBound = FieldDescriptorProto'TYPE_SINT64-instance Control.DeepSeq.NFData FieldDescriptorProto'Type where- rnf x__ = Prelude.seq x__ (())-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.ctype' @:: Lens' FieldOptions FieldOptions'CType@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'ctype' @:: Lens' FieldOptions (Prelude.Maybe FieldOptions'CType)@- * 'Proto.Google.Protobuf.Descriptor_Fields.packed' @:: Lens' FieldOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'packed' @:: Lens' FieldOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.jstype' @:: Lens' FieldOptions FieldOptions'JSType@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'jstype' @:: Lens' FieldOptions (Prelude.Maybe FieldOptions'JSType)@- * 'Proto.Google.Protobuf.Descriptor_Fields.lazy' @:: Lens' FieldOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'lazy' @:: Lens' FieldOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.deprecated' @:: Lens' FieldOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'deprecated' @:: Lens' FieldOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.weak' @:: Lens' FieldOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'weak' @:: Lens' FieldOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.uninterpretedOption' @:: Lens' FieldOptions [UninterpretedOption]@- -}-data FieldOptions = FieldOptions{_FieldOptions'ctype ::- !(Prelude.Maybe FieldOptions'CType),- _FieldOptions'packed :: !(Prelude.Maybe Prelude.Bool),- _FieldOptions'jstype :: !(Prelude.Maybe FieldOptions'JSType),- _FieldOptions'lazy :: !(Prelude.Maybe Prelude.Bool),- _FieldOptions'deprecated :: !(Prelude.Maybe Prelude.Bool),- _FieldOptions'weak :: !(Prelude.Maybe Prelude.Bool),- _FieldOptions'uninterpretedOption :: ![UninterpretedOption],- _FieldOptions'_unknownFields :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show FieldOptions where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' FieldOptions "ctype"- (FieldOptions'CType)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'ctype- (\ x__ y__ -> x__{_FieldOptions'ctype = y__}))- (Data.ProtoLens.maybeLens FieldOptions'STRING)-instance Lens.Labels.HasLens' FieldOptions "maybe'ctype"- (Prelude.Maybe FieldOptions'CType)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'ctype- (\ x__ y__ -> x__{_FieldOptions'ctype = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldOptions "packed" (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'packed- (\ x__ y__ -> x__{_FieldOptions'packed = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FieldOptions "maybe'packed"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'packed- (\ x__ y__ -> x__{_FieldOptions'packed = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldOptions "jstype"- (FieldOptions'JSType)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'jstype- (\ x__ y__ -> x__{_FieldOptions'jstype = y__}))- (Data.ProtoLens.maybeLens FieldOptions'JS_NORMAL)-instance Lens.Labels.HasLens' FieldOptions "maybe'jstype"- (Prelude.Maybe FieldOptions'JSType)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'jstype- (\ x__ y__ -> x__{_FieldOptions'jstype = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldOptions "lazy" (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'lazy- (\ x__ y__ -> x__{_FieldOptions'lazy = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FieldOptions "maybe'lazy"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'lazy- (\ x__ y__ -> x__{_FieldOptions'lazy = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldOptions "deprecated"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'deprecated- (\ x__ y__ -> x__{_FieldOptions'deprecated = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FieldOptions "maybe'deprecated"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'deprecated- (\ x__ y__ -> x__{_FieldOptions'deprecated = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldOptions "weak" (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'weak- (\ x__ y__ -> x__{_FieldOptions'weak = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FieldOptions "maybe'weak"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'weak- (\ x__ y__ -> x__{_FieldOptions'weak = y__}))- Prelude.id-instance Lens.Labels.HasLens' FieldOptions "uninterpretedOption"- ([UninterpretedOption])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FieldOptions'uninterpretedOption- (\ x__ y__ -> x__{_FieldOptions'uninterpretedOption = y__}))- Prelude.id-instance Data.ProtoLens.Message FieldOptions where- messageName _ = Data.Text.pack "google.protobuf.FieldOptions"- fieldsByTag- = let ctype__field_descriptor- = Data.ProtoLens.FieldDescriptor "ctype"- (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::- Data.ProtoLens.FieldTypeDescriptor FieldOptions'CType)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'ctype")))- :: Data.ProtoLens.FieldDescriptor FieldOptions- packed__field_descriptor- = Data.ProtoLens.FieldDescriptor "packed"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'packed")))- :: Data.ProtoLens.FieldDescriptor FieldOptions- jstype__field_descriptor- = Data.ProtoLens.FieldDescriptor "jstype"- (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::- Data.ProtoLens.FieldTypeDescriptor FieldOptions'JSType)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'jstype")))- :: Data.ProtoLens.FieldDescriptor FieldOptions- lazy__field_descriptor- = Data.ProtoLens.FieldDescriptor "lazy"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'lazy")))- :: Data.ProtoLens.FieldDescriptor FieldOptions- deprecated__field_descriptor- = Data.ProtoLens.FieldDescriptor "deprecated"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'deprecated")))- :: Data.ProtoLens.FieldDescriptor FieldOptions- weak__field_descriptor- = Data.ProtoLens.FieldDescriptor "weak"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'weak")))- :: Data.ProtoLens.FieldDescriptor FieldOptions- uninterpretedOption__field_descriptor- = Data.ProtoLens.FieldDescriptor "uninterpreted_option"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor UninterpretedOption)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "uninterpretedOption")))- :: Data.ProtoLens.FieldDescriptor FieldOptions- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, ctype__field_descriptor),- (Data.ProtoLens.Tag 2, packed__field_descriptor),- (Data.ProtoLens.Tag 6, jstype__field_descriptor),- (Data.ProtoLens.Tag 5, lazy__field_descriptor),- (Data.ProtoLens.Tag 3, deprecated__field_descriptor),- (Data.ProtoLens.Tag 10, weak__field_descriptor),- (Data.ProtoLens.Tag 999, uninterpretedOption__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _FieldOptions'_unknownFields- (\ x__ y__ -> x__{_FieldOptions'_unknownFields = y__})- defMessage- = FieldOptions{_FieldOptions'ctype = Prelude.Nothing,- _FieldOptions'packed = Prelude.Nothing,- _FieldOptions'jstype = Prelude.Nothing,- _FieldOptions'lazy = Prelude.Nothing,- _FieldOptions'deprecated = Prelude.Nothing,- _FieldOptions'weak = Prelude.Nothing,- _FieldOptions'uninterpretedOption = [],- _FieldOptions'_unknownFields = ([])}-instance Control.DeepSeq.NFData FieldOptions where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_FieldOptions'_unknownFields x__)- (Control.DeepSeq.deepseq (_FieldOptions'ctype x__)- (Control.DeepSeq.deepseq (_FieldOptions'packed x__)- (Control.DeepSeq.deepseq (_FieldOptions'jstype x__)- (Control.DeepSeq.deepseq (_FieldOptions'lazy x__)- (Control.DeepSeq.deepseq (_FieldOptions'deprecated x__)- (Control.DeepSeq.deepseq (_FieldOptions'weak x__)- (Control.DeepSeq.deepseq (_FieldOptions'uninterpretedOption x__)- (()))))))))-data FieldOptions'CType = FieldOptions'STRING- | FieldOptions'CORD- | FieldOptions'STRING_PIECE- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)-instance Data.ProtoLens.FieldDefault FieldOptions'CType where- fieldDefault = FieldOptions'STRING-instance Data.ProtoLens.MessageEnum FieldOptions'CType where- maybeToEnum 0 = Prelude.Just FieldOptions'STRING- maybeToEnum 1 = Prelude.Just FieldOptions'CORD- maybeToEnum 2 = Prelude.Just FieldOptions'STRING_PIECE- maybeToEnum _ = Prelude.Nothing- showEnum FieldOptions'STRING = "STRING"- showEnum FieldOptions'CORD = "CORD"- showEnum FieldOptions'STRING_PIECE = "STRING_PIECE"- readEnum "STRING" = Prelude.Just FieldOptions'STRING- readEnum "CORD" = Prelude.Just FieldOptions'CORD- readEnum "STRING_PIECE" = Prelude.Just FieldOptions'STRING_PIECE- readEnum _ = Prelude.Nothing-instance Prelude.Enum FieldOptions'CType where- toEnum k__- = Prelude.maybe- (Prelude.error- ((Prelude.++) "toEnum: unknown value for enum CType: "- (Prelude.show k__)))- Prelude.id- (Data.ProtoLens.maybeToEnum k__)- fromEnum FieldOptions'STRING = 0- fromEnum FieldOptions'CORD = 1- fromEnum FieldOptions'STRING_PIECE = 2- succ FieldOptions'STRING_PIECE- = Prelude.error- "FieldOptions'CType.succ: bad argument FieldOptions'STRING_PIECE. This value would be out of bounds."- succ FieldOptions'STRING = FieldOptions'CORD- succ FieldOptions'CORD = FieldOptions'STRING_PIECE- pred FieldOptions'STRING- = Prelude.error- "FieldOptions'CType.pred: bad argument FieldOptions'STRING. This value would be out of bounds."- pred FieldOptions'CORD = FieldOptions'STRING- pred FieldOptions'STRING_PIECE = FieldOptions'CORD- enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom- enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo- enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen- enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo-instance Prelude.Bounded FieldOptions'CType where- minBound = FieldOptions'STRING- maxBound = FieldOptions'STRING_PIECE-instance Control.DeepSeq.NFData FieldOptions'CType where- rnf x__ = Prelude.seq x__ (())-data FieldOptions'JSType = FieldOptions'JS_NORMAL- | FieldOptions'JS_STRING- | FieldOptions'JS_NUMBER- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)-instance Data.ProtoLens.FieldDefault FieldOptions'JSType where- fieldDefault = FieldOptions'JS_NORMAL-instance Data.ProtoLens.MessageEnum FieldOptions'JSType where- maybeToEnum 0 = Prelude.Just FieldOptions'JS_NORMAL- maybeToEnum 1 = Prelude.Just FieldOptions'JS_STRING- maybeToEnum 2 = Prelude.Just FieldOptions'JS_NUMBER- maybeToEnum _ = Prelude.Nothing- showEnum FieldOptions'JS_NORMAL = "JS_NORMAL"- showEnum FieldOptions'JS_STRING = "JS_STRING"- showEnum FieldOptions'JS_NUMBER = "JS_NUMBER"- readEnum "JS_NORMAL" = Prelude.Just FieldOptions'JS_NORMAL- readEnum "JS_STRING" = Prelude.Just FieldOptions'JS_STRING- readEnum "JS_NUMBER" = Prelude.Just FieldOptions'JS_NUMBER- readEnum _ = Prelude.Nothing-instance Prelude.Enum FieldOptions'JSType where- toEnum k__- = Prelude.maybe- (Prelude.error- ((Prelude.++) "toEnum: unknown value for enum JSType: "- (Prelude.show k__)))- Prelude.id- (Data.ProtoLens.maybeToEnum k__)- fromEnum FieldOptions'JS_NORMAL = 0- fromEnum FieldOptions'JS_STRING = 1- fromEnum FieldOptions'JS_NUMBER = 2- succ FieldOptions'JS_NUMBER- = Prelude.error- "FieldOptions'JSType.succ: bad argument FieldOptions'JS_NUMBER. This value would be out of bounds."- succ FieldOptions'JS_NORMAL = FieldOptions'JS_STRING- succ FieldOptions'JS_STRING = FieldOptions'JS_NUMBER- pred FieldOptions'JS_NORMAL- = Prelude.error- "FieldOptions'JSType.pred: bad argument FieldOptions'JS_NORMAL. This value would be out of bounds."- pred FieldOptions'JS_STRING = FieldOptions'JS_NORMAL- pred FieldOptions'JS_NUMBER = FieldOptions'JS_STRING- enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom- enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo- enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen- enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo-instance Prelude.Bounded FieldOptions'JSType where- minBound = FieldOptions'JS_NORMAL- maxBound = FieldOptions'JS_NUMBER-instance Control.DeepSeq.NFData FieldOptions'JSType where- rnf x__ = Prelude.seq x__ (())-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.name' @:: Lens' FileDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'name' @:: Lens' FileDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.package' @:: Lens' FileDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'package' @:: Lens' FileDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.dependency' @:: Lens' FileDescriptorProto [Data.Text.Text]@- * 'Proto.Google.Protobuf.Descriptor_Fields.publicDependency' @:: Lens' FileDescriptorProto [Data.Int.Int32]@- * 'Proto.Google.Protobuf.Descriptor_Fields.weakDependency' @:: Lens' FileDescriptorProto [Data.Int.Int32]@- * 'Proto.Google.Protobuf.Descriptor_Fields.messageType' @:: Lens' FileDescriptorProto [DescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.enumType' @:: Lens' FileDescriptorProto [EnumDescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.service' @:: Lens' FileDescriptorProto [ServiceDescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.extension' @:: Lens' FileDescriptorProto [FieldDescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.options' @:: Lens' FileDescriptorProto FileOptions@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'options' @:: Lens' FileDescriptorProto (Prelude.Maybe FileOptions)@- * 'Proto.Google.Protobuf.Descriptor_Fields.sourceCodeInfo' @:: Lens' FileDescriptorProto SourceCodeInfo@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'sourceCodeInfo' @:: Lens' FileDescriptorProto (Prelude.Maybe SourceCodeInfo)@- * 'Proto.Google.Protobuf.Descriptor_Fields.syntax' @:: Lens' FileDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'syntax' @:: Lens' FileDescriptorProto (Prelude.Maybe Data.Text.Text)@- -}-data FileDescriptorProto = FileDescriptorProto{_FileDescriptorProto'name- :: !(Prelude.Maybe Data.Text.Text),- _FileDescriptorProto'package ::- !(Prelude.Maybe Data.Text.Text),- _FileDescriptorProto'dependency :: ![Data.Text.Text],- _FileDescriptorProto'publicDependency ::- ![Data.Int.Int32],- _FileDescriptorProto'weakDependency ::- ![Data.Int.Int32],- _FileDescriptorProto'messageType ::- ![DescriptorProto],- _FileDescriptorProto'enumType ::- ![EnumDescriptorProto],- _FileDescriptorProto'service ::- ![ServiceDescriptorProto],- _FileDescriptorProto'extension ::- ![FieldDescriptorProto],- _FileDescriptorProto'options ::- !(Prelude.Maybe FileOptions),- _FileDescriptorProto'sourceCodeInfo ::- !(Prelude.Maybe SourceCodeInfo),- _FileDescriptorProto'syntax ::- !(Prelude.Maybe Data.Text.Text),- _FileDescriptorProto'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show FileDescriptorProto where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' FileDescriptorProto "name"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'name- (\ x__ y__ -> x__{_FileDescriptorProto'name = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileDescriptorProto "maybe'name"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'name- (\ x__ y__ -> x__{_FileDescriptorProto'name = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto "package"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'package- (\ x__ y__ -> x__{_FileDescriptorProto'package = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileDescriptorProto "maybe'package"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'package- (\ x__ y__ -> x__{_FileDescriptorProto'package = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto "dependency"- ([Data.Text.Text])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'dependency- (\ x__ y__ -> x__{_FileDescriptorProto'dependency = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto- "publicDependency"- ([Data.Int.Int32])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'publicDependency- (\ x__ y__ -> x__{_FileDescriptorProto'publicDependency = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto "weakDependency"- ([Data.Int.Int32])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'weakDependency- (\ x__ y__ -> x__{_FileDescriptorProto'weakDependency = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto "messageType"- ([DescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'messageType- (\ x__ y__ -> x__{_FileDescriptorProto'messageType = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto "enumType"- ([EnumDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'enumType- (\ x__ y__ -> x__{_FileDescriptorProto'enumType = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto "service"- ([ServiceDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'service- (\ x__ y__ -> x__{_FileDescriptorProto'service = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto "extension"- ([FieldDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'extension- (\ x__ y__ -> x__{_FileDescriptorProto'extension = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto "options"- (FileOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'options- (\ x__ y__ -> x__{_FileDescriptorProto'options = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' FileDescriptorProto "maybe'options"- (Prelude.Maybe FileOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'options- (\ x__ y__ -> x__{_FileDescriptorProto'options = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto "sourceCodeInfo"- (SourceCodeInfo)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'sourceCodeInfo- (\ x__ y__ -> x__{_FileDescriptorProto'sourceCodeInfo = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' FileDescriptorProto- "maybe'sourceCodeInfo"- (Prelude.Maybe SourceCodeInfo)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'sourceCodeInfo- (\ x__ y__ -> x__{_FileDescriptorProto'sourceCodeInfo = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileDescriptorProto "syntax"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'syntax- (\ x__ y__ -> x__{_FileDescriptorProto'syntax = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileDescriptorProto "maybe'syntax"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorProto'syntax- (\ x__ y__ -> x__{_FileDescriptorProto'syntax = y__}))- Prelude.id-instance Data.ProtoLens.Message FileDescriptorProto where- messageName _- = Data.Text.pack "google.protobuf.FileDescriptorProto"- fieldsByTag- = let name__field_descriptor- = Data.ProtoLens.FieldDescriptor "name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- package__field_descriptor- = Data.ProtoLens.FieldDescriptor "package"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'package")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- dependency__field_descriptor- = Data.ProtoLens.FieldDescriptor "dependency"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "dependency")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- publicDependency__field_descriptor- = Data.ProtoLens.FieldDescriptor "public_dependency"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "publicDependency")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- weakDependency__field_descriptor- = Data.ProtoLens.FieldDescriptor "weak_dependency"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "weakDependency")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- messageType__field_descriptor- = Data.ProtoLens.FieldDescriptor "message_type"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor DescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "messageType")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- enumType__field_descriptor- = Data.ProtoLens.FieldDescriptor "enum_type"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor EnumDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "enumType")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- service__field_descriptor- = Data.ProtoLens.FieldDescriptor "service"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor ServiceDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "service")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- extension__field_descriptor- = Data.ProtoLens.FieldDescriptor "extension"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor FieldDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "extension")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- options__field_descriptor- = Data.ProtoLens.FieldDescriptor "options"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor FileOptions)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'options")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- sourceCodeInfo__field_descriptor- = Data.ProtoLens.FieldDescriptor "source_code_info"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor SourceCodeInfo)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'sourceCodeInfo")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- syntax__field_descriptor- = Data.ProtoLens.FieldDescriptor "syntax"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'syntax")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorProto- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, name__field_descriptor),- (Data.ProtoLens.Tag 2, package__field_descriptor),- (Data.ProtoLens.Tag 3, dependency__field_descriptor),- (Data.ProtoLens.Tag 10, publicDependency__field_descriptor),- (Data.ProtoLens.Tag 11, weakDependency__field_descriptor),- (Data.ProtoLens.Tag 4, messageType__field_descriptor),- (Data.ProtoLens.Tag 5, enumType__field_descriptor),- (Data.ProtoLens.Tag 6, service__field_descriptor),- (Data.ProtoLens.Tag 7, extension__field_descriptor),- (Data.ProtoLens.Tag 8, options__field_descriptor),- (Data.ProtoLens.Tag 9, sourceCodeInfo__field_descriptor),- (Data.ProtoLens.Tag 12, syntax__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _FileDescriptorProto'_unknownFields- (\ x__ y__ -> x__{_FileDescriptorProto'_unknownFields = y__})- defMessage- = FileDescriptorProto{_FileDescriptorProto'name = Prelude.Nothing,- _FileDescriptorProto'package = Prelude.Nothing,- _FileDescriptorProto'dependency = [],- _FileDescriptorProto'publicDependency = [],- _FileDescriptorProto'weakDependency = [],- _FileDescriptorProto'messageType = [],- _FileDescriptorProto'enumType = [],- _FileDescriptorProto'service = [],- _FileDescriptorProto'extension = [],- _FileDescriptorProto'options = Prelude.Nothing,- _FileDescriptorProto'sourceCodeInfo = Prelude.Nothing,- _FileDescriptorProto'syntax = Prelude.Nothing,- _FileDescriptorProto'_unknownFields = ([])}-instance Control.DeepSeq.NFData FileDescriptorProto where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_FileDescriptorProto'_unknownFields x__)- (Control.DeepSeq.deepseq (_FileDescriptorProto'name x__)- (Control.DeepSeq.deepseq (_FileDescriptorProto'package x__)- (Control.DeepSeq.deepseq (_FileDescriptorProto'dependency x__)- (Control.DeepSeq.deepseq- (_FileDescriptorProto'publicDependency x__)- (Control.DeepSeq.deepseq (_FileDescriptorProto'weakDependency x__)- (Control.DeepSeq.deepseq (_FileDescriptorProto'messageType x__)- (Control.DeepSeq.deepseq (_FileDescriptorProto'enumType x__)- (Control.DeepSeq.deepseq (_FileDescriptorProto'service x__)- (Control.DeepSeq.deepseq- (_FileDescriptorProto'extension x__)- (Control.DeepSeq.deepseq- (_FileDescriptorProto'options x__)- (Control.DeepSeq.deepseq- (_FileDescriptorProto'sourceCodeInfo x__)- (Control.DeepSeq.deepseq- (_FileDescriptorProto'syntax x__)- (())))))))))))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.file' @:: Lens' FileDescriptorSet [FileDescriptorProto]@- -}-data FileDescriptorSet = FileDescriptorSet{_FileDescriptorSet'file- :: ![FileDescriptorProto],- _FileDescriptorSet'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show FileDescriptorSet where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' FileDescriptorSet "file"- ([FileDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileDescriptorSet'file- (\ x__ y__ -> x__{_FileDescriptorSet'file = y__}))- Prelude.id-instance Data.ProtoLens.Message FileDescriptorSet where- messageName _ = Data.Text.pack "google.protobuf.FileDescriptorSet"- fieldsByTag- = let file__field_descriptor- = Data.ProtoLens.FieldDescriptor "file"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor FileDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "file")))- :: Data.ProtoLens.FieldDescriptor FileDescriptorSet- in- Data.Map.fromList [(Data.ProtoLens.Tag 1, file__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _FileDescriptorSet'_unknownFields- (\ x__ y__ -> x__{_FileDescriptorSet'_unknownFields = y__})- defMessage- = FileDescriptorSet{_FileDescriptorSet'file = [],- _FileDescriptorSet'_unknownFields = ([])}-instance Control.DeepSeq.NFData FileDescriptorSet where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_FileDescriptorSet'_unknownFields x__)- (Control.DeepSeq.deepseq (_FileDescriptorSet'file x__) (()))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.javaPackage' @:: Lens' FileOptions Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'javaPackage' @:: Lens' FileOptions (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.javaOuterClassname' @:: Lens' FileOptions Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'javaOuterClassname' @:: Lens' FileOptions (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.javaMultipleFiles' @:: Lens' FileOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'javaMultipleFiles' @:: Lens' FileOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.javaGenerateEqualsAndHash' @:: Lens' FileOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'javaGenerateEqualsAndHash' @:: Lens' FileOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.javaStringCheckUtf8' @:: Lens' FileOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'javaStringCheckUtf8' @:: Lens' FileOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.optimizeFor' @:: Lens' FileOptions FileOptions'OptimizeMode@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'optimizeFor' @:: Lens' FileOptions (Prelude.Maybe FileOptions'OptimizeMode)@- * 'Proto.Google.Protobuf.Descriptor_Fields.goPackage' @:: Lens' FileOptions Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'goPackage' @:: Lens' FileOptions (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.ccGenericServices' @:: Lens' FileOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'ccGenericServices' @:: Lens' FileOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.javaGenericServices' @:: Lens' FileOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'javaGenericServices' @:: Lens' FileOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.pyGenericServices' @:: Lens' FileOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'pyGenericServices' @:: Lens' FileOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.phpGenericServices' @:: Lens' FileOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'phpGenericServices' @:: Lens' FileOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.deprecated' @:: Lens' FileOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'deprecated' @:: Lens' FileOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.ccEnableArenas' @:: Lens' FileOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'ccEnableArenas' @:: Lens' FileOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.objcClassPrefix' @:: Lens' FileOptions Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'objcClassPrefix' @:: Lens' FileOptions (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.csharpNamespace' @:: Lens' FileOptions Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'csharpNamespace' @:: Lens' FileOptions (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.swiftPrefix' @:: Lens' FileOptions Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'swiftPrefix' @:: Lens' FileOptions (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.phpClassPrefix' @:: Lens' FileOptions Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'phpClassPrefix' @:: Lens' FileOptions (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.phpNamespace' @:: Lens' FileOptions Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'phpNamespace' @:: Lens' FileOptions (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.phpMetadataNamespace' @:: Lens' FileOptions Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'phpMetadataNamespace' @:: Lens' FileOptions (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.rubyPackage' @:: Lens' FileOptions Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'rubyPackage' @:: Lens' FileOptions (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.uninterpretedOption' @:: Lens' FileOptions [UninterpretedOption]@- -}-data FileOptions = FileOptions{_FileOptions'javaPackage ::- !(Prelude.Maybe Data.Text.Text),- _FileOptions'javaOuterClassname :: !(Prelude.Maybe Data.Text.Text),- _FileOptions'javaMultipleFiles :: !(Prelude.Maybe Prelude.Bool),- _FileOptions'javaGenerateEqualsAndHash ::- !(Prelude.Maybe Prelude.Bool),- _FileOptions'javaStringCheckUtf8 :: !(Prelude.Maybe Prelude.Bool),- _FileOptions'optimizeFor ::- !(Prelude.Maybe FileOptions'OptimizeMode),- _FileOptions'goPackage :: !(Prelude.Maybe Data.Text.Text),- _FileOptions'ccGenericServices :: !(Prelude.Maybe Prelude.Bool),- _FileOptions'javaGenericServices :: !(Prelude.Maybe Prelude.Bool),- _FileOptions'pyGenericServices :: !(Prelude.Maybe Prelude.Bool),- _FileOptions'phpGenericServices :: !(Prelude.Maybe Prelude.Bool),- _FileOptions'deprecated :: !(Prelude.Maybe Prelude.Bool),- _FileOptions'ccEnableArenas :: !(Prelude.Maybe Prelude.Bool),- _FileOptions'objcClassPrefix :: !(Prelude.Maybe Data.Text.Text),- _FileOptions'csharpNamespace :: !(Prelude.Maybe Data.Text.Text),- _FileOptions'swiftPrefix :: !(Prelude.Maybe Data.Text.Text),- _FileOptions'phpClassPrefix :: !(Prelude.Maybe Data.Text.Text),- _FileOptions'phpNamespace :: !(Prelude.Maybe Data.Text.Text),- _FileOptions'phpMetadataNamespace ::- !(Prelude.Maybe Data.Text.Text),- _FileOptions'rubyPackage :: !(Prelude.Maybe Data.Text.Text),- _FileOptions'uninterpretedOption :: ![UninterpretedOption],- _FileOptions'_unknownFields :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show FileOptions where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' FileOptions "javaPackage"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaPackage- (\ x__ y__ -> x__{_FileOptions'javaPackage = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions "maybe'javaPackage"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaPackage- (\ x__ y__ -> x__{_FileOptions'javaPackage = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "javaOuterClassname"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaOuterClassname- (\ x__ y__ -> x__{_FileOptions'javaOuterClassname = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions- "maybe'javaOuterClassname"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaOuterClassname- (\ x__ y__ -> x__{_FileOptions'javaOuterClassname = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "javaMultipleFiles"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaMultipleFiles- (\ x__ y__ -> x__{_FileOptions'javaMultipleFiles = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FileOptions "maybe'javaMultipleFiles"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaMultipleFiles- (\ x__ y__ -> x__{_FileOptions'javaMultipleFiles = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions- "javaGenerateEqualsAndHash"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaGenerateEqualsAndHash- (\ x__ y__ -> x__{_FileOptions'javaGenerateEqualsAndHash = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions- "maybe'javaGenerateEqualsAndHash"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaGenerateEqualsAndHash- (\ x__ y__ -> x__{_FileOptions'javaGenerateEqualsAndHash = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "javaStringCheckUtf8"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaStringCheckUtf8- (\ x__ y__ -> x__{_FileOptions'javaStringCheckUtf8 = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FileOptions- "maybe'javaStringCheckUtf8"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaStringCheckUtf8- (\ x__ y__ -> x__{_FileOptions'javaStringCheckUtf8 = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "optimizeFor"- (FileOptions'OptimizeMode)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'optimizeFor- (\ x__ y__ -> x__{_FileOptions'optimizeFor = y__}))- (Data.ProtoLens.maybeLens FileOptions'SPEED)-instance Lens.Labels.HasLens' FileOptions "maybe'optimizeFor"- (Prelude.Maybe FileOptions'OptimizeMode)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'optimizeFor- (\ x__ y__ -> x__{_FileOptions'optimizeFor = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "goPackage"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'goPackage- (\ x__ y__ -> x__{_FileOptions'goPackage = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions "maybe'goPackage"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'goPackage- (\ x__ y__ -> x__{_FileOptions'goPackage = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "ccGenericServices"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'ccGenericServices- (\ x__ y__ -> x__{_FileOptions'ccGenericServices = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FileOptions "maybe'ccGenericServices"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'ccGenericServices- (\ x__ y__ -> x__{_FileOptions'ccGenericServices = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "javaGenericServices"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaGenericServices- (\ x__ y__ -> x__{_FileOptions'javaGenericServices = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FileOptions- "maybe'javaGenericServices"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'javaGenericServices- (\ x__ y__ -> x__{_FileOptions'javaGenericServices = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "pyGenericServices"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'pyGenericServices- (\ x__ y__ -> x__{_FileOptions'pyGenericServices = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FileOptions "maybe'pyGenericServices"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'pyGenericServices- (\ x__ y__ -> x__{_FileOptions'pyGenericServices = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "phpGenericServices"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'phpGenericServices- (\ x__ y__ -> x__{_FileOptions'phpGenericServices = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FileOptions- "maybe'phpGenericServices"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'phpGenericServices- (\ x__ y__ -> x__{_FileOptions'phpGenericServices = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "deprecated"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'deprecated- (\ x__ y__ -> x__{_FileOptions'deprecated = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FileOptions "maybe'deprecated"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'deprecated- (\ x__ y__ -> x__{_FileOptions'deprecated = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "ccEnableArenas"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'ccEnableArenas- (\ x__ y__ -> x__{_FileOptions'ccEnableArenas = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' FileOptions "maybe'ccEnableArenas"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'ccEnableArenas- (\ x__ y__ -> x__{_FileOptions'ccEnableArenas = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "objcClassPrefix"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'objcClassPrefix- (\ x__ y__ -> x__{_FileOptions'objcClassPrefix = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions "maybe'objcClassPrefix"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'objcClassPrefix- (\ x__ y__ -> x__{_FileOptions'objcClassPrefix = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "csharpNamespace"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'csharpNamespace- (\ x__ y__ -> x__{_FileOptions'csharpNamespace = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions "maybe'csharpNamespace"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'csharpNamespace- (\ x__ y__ -> x__{_FileOptions'csharpNamespace = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "swiftPrefix"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'swiftPrefix- (\ x__ y__ -> x__{_FileOptions'swiftPrefix = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions "maybe'swiftPrefix"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'swiftPrefix- (\ x__ y__ -> x__{_FileOptions'swiftPrefix = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "phpClassPrefix"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'phpClassPrefix- (\ x__ y__ -> x__{_FileOptions'phpClassPrefix = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions "maybe'phpClassPrefix"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'phpClassPrefix- (\ x__ y__ -> x__{_FileOptions'phpClassPrefix = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "phpNamespace"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'phpNamespace- (\ x__ y__ -> x__{_FileOptions'phpNamespace = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions "maybe'phpNamespace"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'phpNamespace- (\ x__ y__ -> x__{_FileOptions'phpNamespace = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "phpMetadataNamespace"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'phpMetadataNamespace- (\ x__ y__ -> x__{_FileOptions'phpMetadataNamespace = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions- "maybe'phpMetadataNamespace"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'phpMetadataNamespace- (\ x__ y__ -> x__{_FileOptions'phpMetadataNamespace = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "rubyPackage"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'rubyPackage- (\ x__ y__ -> x__{_FileOptions'rubyPackage = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' FileOptions "maybe'rubyPackage"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'rubyPackage- (\ x__ y__ -> x__{_FileOptions'rubyPackage = y__}))- Prelude.id-instance Lens.Labels.HasLens' FileOptions "uninterpretedOption"- ([UninterpretedOption])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FileOptions'uninterpretedOption- (\ x__ y__ -> x__{_FileOptions'uninterpretedOption = y__}))- Prelude.id-instance Data.ProtoLens.Message FileOptions where- messageName _ = Data.Text.pack "google.protobuf.FileOptions"- fieldsByTag- = let javaPackage__field_descriptor- = Data.ProtoLens.FieldDescriptor "java_package"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaPackage")))- :: Data.ProtoLens.FieldDescriptor FileOptions- javaOuterClassname__field_descriptor- = Data.ProtoLens.FieldDescriptor "java_outer_classname"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaOuterClassname")))- :: Data.ProtoLens.FieldDescriptor FileOptions- javaMultipleFiles__field_descriptor- = Data.ProtoLens.FieldDescriptor "java_multiple_files"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaMultipleFiles")))- :: Data.ProtoLens.FieldDescriptor FileOptions- javaGenerateEqualsAndHash__field_descriptor- = Data.ProtoLens.FieldDescriptor "java_generate_equals_and_hash"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaGenerateEqualsAndHash")))- :: Data.ProtoLens.FieldDescriptor FileOptions- javaStringCheckUtf8__field_descriptor- = Data.ProtoLens.FieldDescriptor "java_string_check_utf8"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaStringCheckUtf8")))- :: Data.ProtoLens.FieldDescriptor FileOptions- optimizeFor__field_descriptor- = Data.ProtoLens.FieldDescriptor "optimize_for"- (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::- Data.ProtoLens.FieldTypeDescriptor FileOptions'OptimizeMode)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'optimizeFor")))- :: Data.ProtoLens.FieldDescriptor FileOptions- goPackage__field_descriptor- = Data.ProtoLens.FieldDescriptor "go_package"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'goPackage")))- :: Data.ProtoLens.FieldDescriptor FileOptions- ccGenericServices__field_descriptor- = Data.ProtoLens.FieldDescriptor "cc_generic_services"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'ccGenericServices")))- :: Data.ProtoLens.FieldDescriptor FileOptions- javaGenericServices__field_descriptor- = Data.ProtoLens.FieldDescriptor "java_generic_services"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaGenericServices")))- :: Data.ProtoLens.FieldDescriptor FileOptions- pyGenericServices__field_descriptor- = Data.ProtoLens.FieldDescriptor "py_generic_services"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'pyGenericServices")))- :: Data.ProtoLens.FieldDescriptor FileOptions- phpGenericServices__field_descriptor- = Data.ProtoLens.FieldDescriptor "php_generic_services"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'phpGenericServices")))- :: Data.ProtoLens.FieldDescriptor FileOptions- deprecated__field_descriptor- = Data.ProtoLens.FieldDescriptor "deprecated"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'deprecated")))- :: Data.ProtoLens.FieldDescriptor FileOptions- ccEnableArenas__field_descriptor- = Data.ProtoLens.FieldDescriptor "cc_enable_arenas"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'ccEnableArenas")))- :: Data.ProtoLens.FieldDescriptor FileOptions- objcClassPrefix__field_descriptor- = Data.ProtoLens.FieldDescriptor "objc_class_prefix"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'objcClassPrefix")))- :: Data.ProtoLens.FieldDescriptor FileOptions- csharpNamespace__field_descriptor- = Data.ProtoLens.FieldDescriptor "csharp_namespace"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'csharpNamespace")))- :: Data.ProtoLens.FieldDescriptor FileOptions- swiftPrefix__field_descriptor- = Data.ProtoLens.FieldDescriptor "swift_prefix"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'swiftPrefix")))- :: Data.ProtoLens.FieldDescriptor FileOptions- phpClassPrefix__field_descriptor- = Data.ProtoLens.FieldDescriptor "php_class_prefix"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'phpClassPrefix")))- :: Data.ProtoLens.FieldDescriptor FileOptions- phpNamespace__field_descriptor- = Data.ProtoLens.FieldDescriptor "php_namespace"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'phpNamespace")))- :: Data.ProtoLens.FieldDescriptor FileOptions- phpMetadataNamespace__field_descriptor- = Data.ProtoLens.FieldDescriptor "php_metadata_namespace"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'phpMetadataNamespace")))- :: Data.ProtoLens.FieldDescriptor FileOptions- rubyPackage__field_descriptor- = Data.ProtoLens.FieldDescriptor "ruby_package"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'rubyPackage")))- :: Data.ProtoLens.FieldDescriptor FileOptions- uninterpretedOption__field_descriptor- = Data.ProtoLens.FieldDescriptor "uninterpreted_option"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor UninterpretedOption)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "uninterpretedOption")))- :: Data.ProtoLens.FieldDescriptor FileOptions- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, javaPackage__field_descriptor),- (Data.ProtoLens.Tag 8, javaOuterClassname__field_descriptor),- (Data.ProtoLens.Tag 10, javaMultipleFiles__field_descriptor),- (Data.ProtoLens.Tag 20,- javaGenerateEqualsAndHash__field_descriptor),- (Data.ProtoLens.Tag 27, javaStringCheckUtf8__field_descriptor),- (Data.ProtoLens.Tag 9, optimizeFor__field_descriptor),- (Data.ProtoLens.Tag 11, goPackage__field_descriptor),- (Data.ProtoLens.Tag 16, ccGenericServices__field_descriptor),- (Data.ProtoLens.Tag 17, javaGenericServices__field_descriptor),- (Data.ProtoLens.Tag 18, pyGenericServices__field_descriptor),- (Data.ProtoLens.Tag 42, phpGenericServices__field_descriptor),- (Data.ProtoLens.Tag 23, deprecated__field_descriptor),- (Data.ProtoLens.Tag 31, ccEnableArenas__field_descriptor),- (Data.ProtoLens.Tag 36, objcClassPrefix__field_descriptor),- (Data.ProtoLens.Tag 37, csharpNamespace__field_descriptor),- (Data.ProtoLens.Tag 39, swiftPrefix__field_descriptor),- (Data.ProtoLens.Tag 40, phpClassPrefix__field_descriptor),- (Data.ProtoLens.Tag 41, phpNamespace__field_descriptor),- (Data.ProtoLens.Tag 44, phpMetadataNamespace__field_descriptor),- (Data.ProtoLens.Tag 45, rubyPackage__field_descriptor),- (Data.ProtoLens.Tag 999, uninterpretedOption__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _FileOptions'_unknownFields- (\ x__ y__ -> x__{_FileOptions'_unknownFields = y__})- defMessage- = FileOptions{_FileOptions'javaPackage = Prelude.Nothing,- _FileOptions'javaOuterClassname = Prelude.Nothing,- _FileOptions'javaMultipleFiles = Prelude.Nothing,- _FileOptions'javaGenerateEqualsAndHash = Prelude.Nothing,- _FileOptions'javaStringCheckUtf8 = Prelude.Nothing,- _FileOptions'optimizeFor = Prelude.Nothing,- _FileOptions'goPackage = Prelude.Nothing,- _FileOptions'ccGenericServices = Prelude.Nothing,- _FileOptions'javaGenericServices = Prelude.Nothing,- _FileOptions'pyGenericServices = Prelude.Nothing,- _FileOptions'phpGenericServices = Prelude.Nothing,- _FileOptions'deprecated = Prelude.Nothing,- _FileOptions'ccEnableArenas = Prelude.Nothing,- _FileOptions'objcClassPrefix = Prelude.Nothing,- _FileOptions'csharpNamespace = Prelude.Nothing,- _FileOptions'swiftPrefix = Prelude.Nothing,- _FileOptions'phpClassPrefix = Prelude.Nothing,- _FileOptions'phpNamespace = Prelude.Nothing,- _FileOptions'phpMetadataNamespace = Prelude.Nothing,- _FileOptions'rubyPackage = Prelude.Nothing,- _FileOptions'uninterpretedOption = [],- _FileOptions'_unknownFields = ([])}-instance Control.DeepSeq.NFData FileOptions where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_FileOptions'_unknownFields x__)- (Control.DeepSeq.deepseq (_FileOptions'javaPackage x__)- (Control.DeepSeq.deepseq (_FileOptions'javaOuterClassname x__)- (Control.DeepSeq.deepseq (_FileOptions'javaMultipleFiles x__)- (Control.DeepSeq.deepseq- (_FileOptions'javaGenerateEqualsAndHash x__)- (Control.DeepSeq.deepseq (_FileOptions'javaStringCheckUtf8 x__)- (Control.DeepSeq.deepseq (_FileOptions'optimizeFor x__)- (Control.DeepSeq.deepseq (_FileOptions'goPackage x__)- (Control.DeepSeq.deepseq (_FileOptions'ccGenericServices x__)- (Control.DeepSeq.deepseq- (_FileOptions'javaGenericServices x__)- (Control.DeepSeq.deepseq- (_FileOptions'pyGenericServices x__)- (Control.DeepSeq.deepseq- (_FileOptions'phpGenericServices x__)- (Control.DeepSeq.deepseq- (_FileOptions'deprecated x__)- (Control.DeepSeq.deepseq- (_FileOptions'ccEnableArenas x__)- (Control.DeepSeq.deepseq- (_FileOptions'objcClassPrefix x__)- (Control.DeepSeq.deepseq- (_FileOptions'csharpNamespace x__)- (Control.DeepSeq.deepseq- (_FileOptions'swiftPrefix x__)- (Control.DeepSeq.deepseq- (_FileOptions'phpClassPrefix x__)- (Control.DeepSeq.deepseq- (_FileOptions'phpNamespace- x__)- (Control.DeepSeq.deepseq- (_FileOptions'phpMetadataNamespace- x__)- (Control.DeepSeq.deepseq- (_FileOptions'rubyPackage- x__)- (Control.DeepSeq.deepseq- (_FileOptions'uninterpretedOption- x__)- (()))))))))))))))))))))))-data FileOptions'OptimizeMode = FileOptions'SPEED- | FileOptions'CODE_SIZE- | FileOptions'LITE_RUNTIME- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)-instance Data.ProtoLens.FieldDefault FileOptions'OptimizeMode where- fieldDefault = FileOptions'SPEED-instance Data.ProtoLens.MessageEnum FileOptions'OptimizeMode where- maybeToEnum 1 = Prelude.Just FileOptions'SPEED- maybeToEnum 2 = Prelude.Just FileOptions'CODE_SIZE- maybeToEnum 3 = Prelude.Just FileOptions'LITE_RUNTIME- maybeToEnum _ = Prelude.Nothing- showEnum FileOptions'SPEED = "SPEED"- showEnum FileOptions'CODE_SIZE = "CODE_SIZE"- showEnum FileOptions'LITE_RUNTIME = "LITE_RUNTIME"- readEnum "SPEED" = Prelude.Just FileOptions'SPEED- readEnum "CODE_SIZE" = Prelude.Just FileOptions'CODE_SIZE- readEnum "LITE_RUNTIME" = Prelude.Just FileOptions'LITE_RUNTIME- readEnum _ = Prelude.Nothing-instance Prelude.Enum FileOptions'OptimizeMode where- toEnum k__- = Prelude.maybe- (Prelude.error- ((Prelude.++) "toEnum: unknown value for enum OptimizeMode: "- (Prelude.show k__)))- Prelude.id- (Data.ProtoLens.maybeToEnum k__)- fromEnum FileOptions'SPEED = 1- fromEnum FileOptions'CODE_SIZE = 2- fromEnum FileOptions'LITE_RUNTIME = 3- succ FileOptions'LITE_RUNTIME- = Prelude.error- "FileOptions'OptimizeMode.succ: bad argument FileOptions'LITE_RUNTIME. This value would be out of bounds."- succ FileOptions'SPEED = FileOptions'CODE_SIZE- succ FileOptions'CODE_SIZE = FileOptions'LITE_RUNTIME- pred FileOptions'SPEED- = Prelude.error- "FileOptions'OptimizeMode.pred: bad argument FileOptions'SPEED. This value would be out of bounds."- pred FileOptions'CODE_SIZE = FileOptions'SPEED- pred FileOptions'LITE_RUNTIME = FileOptions'CODE_SIZE- enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom- enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo- enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen- enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo-instance Prelude.Bounded FileOptions'OptimizeMode where- minBound = FileOptions'SPEED- maxBound = FileOptions'LITE_RUNTIME-instance Control.DeepSeq.NFData FileOptions'OptimizeMode where- rnf x__ = Prelude.seq x__ (())-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.annotation' @:: Lens' GeneratedCodeInfo [GeneratedCodeInfo'Annotation]@- -}-data GeneratedCodeInfo = GeneratedCodeInfo{_GeneratedCodeInfo'annotation- :: ![GeneratedCodeInfo'Annotation],- _GeneratedCodeInfo'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show GeneratedCodeInfo where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' GeneratedCodeInfo "annotation"- ([GeneratedCodeInfo'Annotation])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _GeneratedCodeInfo'annotation- (\ x__ y__ -> x__{_GeneratedCodeInfo'annotation = y__}))- Prelude.id-instance Data.ProtoLens.Message GeneratedCodeInfo where- messageName _ = Data.Text.pack "google.protobuf.GeneratedCodeInfo"- fieldsByTag- = let annotation__field_descriptor- = Data.ProtoLens.FieldDescriptor "annotation"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor GeneratedCodeInfo'Annotation)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "annotation")))- :: Data.ProtoLens.FieldDescriptor GeneratedCodeInfo- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, annotation__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _GeneratedCodeInfo'_unknownFields- (\ x__ y__ -> x__{_GeneratedCodeInfo'_unknownFields = y__})- defMessage- = GeneratedCodeInfo{_GeneratedCodeInfo'annotation = [],- _GeneratedCodeInfo'_unknownFields = ([])}-instance Control.DeepSeq.NFData GeneratedCodeInfo where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_GeneratedCodeInfo'_unknownFields x__)- (Control.DeepSeq.deepseq (_GeneratedCodeInfo'annotation x__) (()))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.path' @:: Lens' GeneratedCodeInfo'Annotation [Data.Int.Int32]@- * 'Proto.Google.Protobuf.Descriptor_Fields.sourceFile' @:: Lens' GeneratedCodeInfo'Annotation Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'sourceFile' @:: Lens' GeneratedCodeInfo'Annotation (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.begin' @:: Lens' GeneratedCodeInfo'Annotation Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'begin' @:: Lens' GeneratedCodeInfo'Annotation (Prelude.Maybe Data.Int.Int32)@- * 'Proto.Google.Protobuf.Descriptor_Fields.end' @:: Lens' GeneratedCodeInfo'Annotation Data.Int.Int32@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'end' @:: Lens' GeneratedCodeInfo'Annotation (Prelude.Maybe Data.Int.Int32)@- -}-data GeneratedCodeInfo'Annotation = GeneratedCodeInfo'Annotation{_GeneratedCodeInfo'Annotation'path- :: ![Data.Int.Int32],- _GeneratedCodeInfo'Annotation'sourceFile- :: !(Prelude.Maybe Data.Text.Text),- _GeneratedCodeInfo'Annotation'begin- :: !(Prelude.Maybe Data.Int.Int32),- _GeneratedCodeInfo'Annotation'end- :: !(Prelude.Maybe Data.Int.Int32),- _GeneratedCodeInfo'Annotation'_unknownFields- :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show GeneratedCodeInfo'Annotation where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' GeneratedCodeInfo'Annotation "path"- ([Data.Int.Int32])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _GeneratedCodeInfo'Annotation'path- (\ x__ y__ -> x__{_GeneratedCodeInfo'Annotation'path = y__}))- Prelude.id-instance Lens.Labels.HasLens' GeneratedCodeInfo'Annotation- "sourceFile"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _GeneratedCodeInfo'Annotation'sourceFile- (\ x__ y__ -> x__{_GeneratedCodeInfo'Annotation'sourceFile = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' GeneratedCodeInfo'Annotation- "maybe'sourceFile"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _GeneratedCodeInfo'Annotation'sourceFile- (\ x__ y__ -> x__{_GeneratedCodeInfo'Annotation'sourceFile = y__}))- Prelude.id-instance Lens.Labels.HasLens' GeneratedCodeInfo'Annotation "begin"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _GeneratedCodeInfo'Annotation'begin- (\ x__ y__ -> x__{_GeneratedCodeInfo'Annotation'begin = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' GeneratedCodeInfo'Annotation- "maybe'begin"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _GeneratedCodeInfo'Annotation'begin- (\ x__ y__ -> x__{_GeneratedCodeInfo'Annotation'begin = y__}))- Prelude.id-instance Lens.Labels.HasLens' GeneratedCodeInfo'Annotation "end"- (Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _GeneratedCodeInfo'Annotation'end- (\ x__ y__ -> x__{_GeneratedCodeInfo'Annotation'end = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' GeneratedCodeInfo'Annotation- "maybe'end"- (Prelude.Maybe Data.Int.Int32)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _GeneratedCodeInfo'Annotation'end- (\ x__ y__ -> x__{_GeneratedCodeInfo'Annotation'end = y__}))- Prelude.id-instance Data.ProtoLens.Message GeneratedCodeInfo'Annotation where- messageName _- = Data.Text.pack "google.protobuf.GeneratedCodeInfo.Annotation"- fieldsByTag- = let path__field_descriptor- = Data.ProtoLens.FieldDescriptor "path"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "path")))- :: Data.ProtoLens.FieldDescriptor GeneratedCodeInfo'Annotation- sourceFile__field_descriptor- = Data.ProtoLens.FieldDescriptor "source_file"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'sourceFile")))- :: Data.ProtoLens.FieldDescriptor GeneratedCodeInfo'Annotation- begin__field_descriptor- = Data.ProtoLens.FieldDescriptor "begin"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'begin")))- :: Data.ProtoLens.FieldDescriptor GeneratedCodeInfo'Annotation- end__field_descriptor- = Data.ProtoLens.FieldDescriptor "end"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'end")))- :: Data.ProtoLens.FieldDescriptor GeneratedCodeInfo'Annotation- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, path__field_descriptor),- (Data.ProtoLens.Tag 2, sourceFile__field_descriptor),- (Data.ProtoLens.Tag 3, begin__field_descriptor),- (Data.ProtoLens.Tag 4, end__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens- _GeneratedCodeInfo'Annotation'_unknownFields- (\ x__ y__ ->- x__{_GeneratedCodeInfo'Annotation'_unknownFields = y__})- defMessage- = GeneratedCodeInfo'Annotation{_GeneratedCodeInfo'Annotation'path =- [],- _GeneratedCodeInfo'Annotation'sourceFile = Prelude.Nothing,- _GeneratedCodeInfo'Annotation'begin = Prelude.Nothing,- _GeneratedCodeInfo'Annotation'end = Prelude.Nothing,- _GeneratedCodeInfo'Annotation'_unknownFields = ([])}-instance Control.DeepSeq.NFData GeneratedCodeInfo'Annotation where- rnf- = \ x__ ->- Control.DeepSeq.deepseq- (_GeneratedCodeInfo'Annotation'_unknownFields x__)- (Control.DeepSeq.deepseq (_GeneratedCodeInfo'Annotation'path x__)- (Control.DeepSeq.deepseq- (_GeneratedCodeInfo'Annotation'sourceFile x__)- (Control.DeepSeq.deepseq (_GeneratedCodeInfo'Annotation'begin x__)- (Control.DeepSeq.deepseq (_GeneratedCodeInfo'Annotation'end x__)- (())))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.messageSetWireFormat' @:: Lens' MessageOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'messageSetWireFormat' @:: Lens' MessageOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.noStandardDescriptorAccessor' @:: Lens' MessageOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'noStandardDescriptorAccessor' @:: Lens' MessageOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.deprecated' @:: Lens' MessageOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'deprecated' @:: Lens' MessageOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.mapEntry' @:: Lens' MessageOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'mapEntry' @:: Lens' MessageOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.uninterpretedOption' @:: Lens' MessageOptions [UninterpretedOption]@- -}-data MessageOptions = MessageOptions{_MessageOptions'messageSetWireFormat- :: !(Prelude.Maybe Prelude.Bool),- _MessageOptions'noStandardDescriptorAccessor ::- !(Prelude.Maybe Prelude.Bool),- _MessageOptions'deprecated :: !(Prelude.Maybe Prelude.Bool),- _MessageOptions'mapEntry :: !(Prelude.Maybe Prelude.Bool),- _MessageOptions'uninterpretedOption :: ![UninterpretedOption],- _MessageOptions'_unknownFields :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show MessageOptions where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' MessageOptions "messageSetWireFormat"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MessageOptions'messageSetWireFormat- (\ x__ y__ -> x__{_MessageOptions'messageSetWireFormat = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' MessageOptions- "maybe'messageSetWireFormat"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MessageOptions'messageSetWireFormat- (\ x__ y__ -> x__{_MessageOptions'messageSetWireFormat = y__}))- Prelude.id-instance Lens.Labels.HasLens' MessageOptions- "noStandardDescriptorAccessor"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _MessageOptions'noStandardDescriptorAccessor- (\ x__ y__ ->- x__{_MessageOptions'noStandardDescriptorAccessor = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' MessageOptions- "maybe'noStandardDescriptorAccessor"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _MessageOptions'noStandardDescriptorAccessor- (\ x__ y__ ->- x__{_MessageOptions'noStandardDescriptorAccessor = y__}))- Prelude.id-instance Lens.Labels.HasLens' MessageOptions "deprecated"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MessageOptions'deprecated- (\ x__ y__ -> x__{_MessageOptions'deprecated = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' MessageOptions "maybe'deprecated"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MessageOptions'deprecated- (\ x__ y__ -> x__{_MessageOptions'deprecated = y__}))- Prelude.id-instance Lens.Labels.HasLens' MessageOptions "mapEntry"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MessageOptions'mapEntry- (\ x__ y__ -> x__{_MessageOptions'mapEntry = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' MessageOptions "maybe'mapEntry"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MessageOptions'mapEntry- (\ x__ y__ -> x__{_MessageOptions'mapEntry = y__}))- Prelude.id-instance Lens.Labels.HasLens' MessageOptions "uninterpretedOption"- ([UninterpretedOption])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MessageOptions'uninterpretedOption- (\ x__ y__ -> x__{_MessageOptions'uninterpretedOption = y__}))- Prelude.id-instance Data.ProtoLens.Message MessageOptions where- messageName _ = Data.Text.pack "google.protobuf.MessageOptions"- fieldsByTag- = let messageSetWireFormat__field_descriptor- = Data.ProtoLens.FieldDescriptor "message_set_wire_format"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'messageSetWireFormat")))- :: Data.ProtoLens.FieldDescriptor MessageOptions- noStandardDescriptorAccessor__field_descriptor- = Data.ProtoLens.FieldDescriptor "no_standard_descriptor_accessor"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'noStandardDescriptorAccessor")))- :: Data.ProtoLens.FieldDescriptor MessageOptions- deprecated__field_descriptor- = Data.ProtoLens.FieldDescriptor "deprecated"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'deprecated")))- :: Data.ProtoLens.FieldDescriptor MessageOptions- mapEntry__field_descriptor- = Data.ProtoLens.FieldDescriptor "map_entry"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'mapEntry")))- :: Data.ProtoLens.FieldDescriptor MessageOptions- uninterpretedOption__field_descriptor- = Data.ProtoLens.FieldDescriptor "uninterpreted_option"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor UninterpretedOption)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "uninterpretedOption")))- :: Data.ProtoLens.FieldDescriptor MessageOptions- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, messageSetWireFormat__field_descriptor),- (Data.ProtoLens.Tag 2,- noStandardDescriptorAccessor__field_descriptor),- (Data.ProtoLens.Tag 3, deprecated__field_descriptor),- (Data.ProtoLens.Tag 7, mapEntry__field_descriptor),- (Data.ProtoLens.Tag 999, uninterpretedOption__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _MessageOptions'_unknownFields- (\ x__ y__ -> x__{_MessageOptions'_unknownFields = y__})- defMessage- = MessageOptions{_MessageOptions'messageSetWireFormat =- Prelude.Nothing,- _MessageOptions'noStandardDescriptorAccessor = Prelude.Nothing,- _MessageOptions'deprecated = Prelude.Nothing,- _MessageOptions'mapEntry = Prelude.Nothing,- _MessageOptions'uninterpretedOption = [],- _MessageOptions'_unknownFields = ([])}-instance Control.DeepSeq.NFData MessageOptions where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_MessageOptions'_unknownFields x__)- (Control.DeepSeq.deepseq (_MessageOptions'messageSetWireFormat x__)- (Control.DeepSeq.deepseq- (_MessageOptions'noStandardDescriptorAccessor x__)- (Control.DeepSeq.deepseq (_MessageOptions'deprecated x__)- (Control.DeepSeq.deepseq (_MessageOptions'mapEntry x__)- (Control.DeepSeq.deepseq (_MessageOptions'uninterpretedOption x__)- (()))))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.name' @:: Lens' MethodDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'name' @:: Lens' MethodDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.inputType' @:: Lens' MethodDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'inputType' @:: Lens' MethodDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.outputType' @:: Lens' MethodDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'outputType' @:: Lens' MethodDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.options' @:: Lens' MethodDescriptorProto MethodOptions@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'options' @:: Lens' MethodDescriptorProto (Prelude.Maybe MethodOptions)@- * 'Proto.Google.Protobuf.Descriptor_Fields.clientStreaming' @:: Lens' MethodDescriptorProto Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'clientStreaming' @:: Lens' MethodDescriptorProto (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.serverStreaming' @:: Lens' MethodDescriptorProto Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'serverStreaming' @:: Lens' MethodDescriptorProto (Prelude.Maybe Prelude.Bool)@- -}-data MethodDescriptorProto = MethodDescriptorProto{_MethodDescriptorProto'name- :: !(Prelude.Maybe Data.Text.Text),- _MethodDescriptorProto'inputType ::- !(Prelude.Maybe Data.Text.Text),- _MethodDescriptorProto'outputType ::- !(Prelude.Maybe Data.Text.Text),- _MethodDescriptorProto'options ::- !(Prelude.Maybe MethodOptions),- _MethodDescriptorProto'clientStreaming ::- !(Prelude.Maybe Prelude.Bool),- _MethodDescriptorProto'serverStreaming ::- !(Prelude.Maybe Prelude.Bool),- _MethodDescriptorProto'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show MethodDescriptorProto where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' MethodDescriptorProto "name"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'name- (\ x__ y__ -> x__{_MethodDescriptorProto'name = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' MethodDescriptorProto "maybe'name"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'name- (\ x__ y__ -> x__{_MethodDescriptorProto'name = y__}))- Prelude.id-instance Lens.Labels.HasLens' MethodDescriptorProto "inputType"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'inputType- (\ x__ y__ -> x__{_MethodDescriptorProto'inputType = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' MethodDescriptorProto- "maybe'inputType"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'inputType- (\ x__ y__ -> x__{_MethodDescriptorProto'inputType = y__}))- Prelude.id-instance Lens.Labels.HasLens' MethodDescriptorProto "outputType"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'outputType- (\ x__ y__ -> x__{_MethodDescriptorProto'outputType = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' MethodDescriptorProto- "maybe'outputType"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'outputType- (\ x__ y__ -> x__{_MethodDescriptorProto'outputType = y__}))- Prelude.id-instance Lens.Labels.HasLens' MethodDescriptorProto "options"- (MethodOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'options- (\ x__ y__ -> x__{_MethodDescriptorProto'options = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' MethodDescriptorProto "maybe'options"- (Prelude.Maybe MethodOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'options- (\ x__ y__ -> x__{_MethodDescriptorProto'options = y__}))- Prelude.id-instance Lens.Labels.HasLens' MethodDescriptorProto- "clientStreaming"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'clientStreaming- (\ x__ y__ -> x__{_MethodDescriptorProto'clientStreaming = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' MethodDescriptorProto- "maybe'clientStreaming"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'clientStreaming- (\ x__ y__ -> x__{_MethodDescriptorProto'clientStreaming = y__}))- Prelude.id-instance Lens.Labels.HasLens' MethodDescriptorProto- "serverStreaming"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'serverStreaming- (\ x__ y__ -> x__{_MethodDescriptorProto'serverStreaming = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' MethodDescriptorProto- "maybe'serverStreaming"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodDescriptorProto'serverStreaming- (\ x__ y__ -> x__{_MethodDescriptorProto'serverStreaming = y__}))- Prelude.id-instance Data.ProtoLens.Message MethodDescriptorProto where- messageName _- = Data.Text.pack "google.protobuf.MethodDescriptorProto"- fieldsByTag- = let name__field_descriptor- = Data.ProtoLens.FieldDescriptor "name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")))- :: Data.ProtoLens.FieldDescriptor MethodDescriptorProto- inputType__field_descriptor- = Data.ProtoLens.FieldDescriptor "input_type"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'inputType")))- :: Data.ProtoLens.FieldDescriptor MethodDescriptorProto- outputType__field_descriptor- = Data.ProtoLens.FieldDescriptor "output_type"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'outputType")))- :: Data.ProtoLens.FieldDescriptor MethodDescriptorProto- options__field_descriptor- = Data.ProtoLens.FieldDescriptor "options"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor MethodOptions)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'options")))- :: Data.ProtoLens.FieldDescriptor MethodDescriptorProto- clientStreaming__field_descriptor- = Data.ProtoLens.FieldDescriptor "client_streaming"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'clientStreaming")))- :: Data.ProtoLens.FieldDescriptor MethodDescriptorProto- serverStreaming__field_descriptor- = Data.ProtoLens.FieldDescriptor "server_streaming"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'serverStreaming")))- :: Data.ProtoLens.FieldDescriptor MethodDescriptorProto- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, name__field_descriptor),- (Data.ProtoLens.Tag 2, inputType__field_descriptor),- (Data.ProtoLens.Tag 3, outputType__field_descriptor),- (Data.ProtoLens.Tag 4, options__field_descriptor),- (Data.ProtoLens.Tag 5, clientStreaming__field_descriptor),- (Data.ProtoLens.Tag 6, serverStreaming__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _MethodDescriptorProto'_unknownFields- (\ x__ y__ -> x__{_MethodDescriptorProto'_unknownFields = y__})- defMessage- = MethodDescriptorProto{_MethodDescriptorProto'name =- Prelude.Nothing,- _MethodDescriptorProto'inputType = Prelude.Nothing,- _MethodDescriptorProto'outputType = Prelude.Nothing,- _MethodDescriptorProto'options = Prelude.Nothing,- _MethodDescriptorProto'clientStreaming = Prelude.Nothing,- _MethodDescriptorProto'serverStreaming = Prelude.Nothing,- _MethodDescriptorProto'_unknownFields = ([])}-instance Control.DeepSeq.NFData MethodDescriptorProto where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_MethodDescriptorProto'_unknownFields x__)- (Control.DeepSeq.deepseq (_MethodDescriptorProto'name x__)- (Control.DeepSeq.deepseq (_MethodDescriptorProto'inputType x__)- (Control.DeepSeq.deepseq (_MethodDescriptorProto'outputType x__)- (Control.DeepSeq.deepseq (_MethodDescriptorProto'options x__)- (Control.DeepSeq.deepseq- (_MethodDescriptorProto'clientStreaming x__)- (Control.DeepSeq.deepseq- (_MethodDescriptorProto'serverStreaming x__)- (())))))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.deprecated' @:: Lens' MethodOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'deprecated' @:: Lens' MethodOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.idempotencyLevel' @:: Lens' MethodOptions MethodOptions'IdempotencyLevel@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'idempotencyLevel' @:: Lens' MethodOptions (Prelude.Maybe MethodOptions'IdempotencyLevel)@- * 'Proto.Google.Protobuf.Descriptor_Fields.uninterpretedOption' @:: Lens' MethodOptions [UninterpretedOption]@- -}-data MethodOptions = MethodOptions{_MethodOptions'deprecated ::- !(Prelude.Maybe Prelude.Bool),- _MethodOptions'idempotencyLevel ::- !(Prelude.Maybe MethodOptions'IdempotencyLevel),- _MethodOptions'uninterpretedOption :: ![UninterpretedOption],- _MethodOptions'_unknownFields :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show MethodOptions where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' MethodOptions "deprecated"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodOptions'deprecated- (\ x__ y__ -> x__{_MethodOptions'deprecated = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' MethodOptions "maybe'deprecated"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodOptions'deprecated- (\ x__ y__ -> x__{_MethodOptions'deprecated = y__}))- Prelude.id-instance Lens.Labels.HasLens' MethodOptions "idempotencyLevel"- (MethodOptions'IdempotencyLevel)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodOptions'idempotencyLevel- (\ x__ y__ -> x__{_MethodOptions'idempotencyLevel = y__}))- (Data.ProtoLens.maybeLens MethodOptions'IDEMPOTENCY_UNKNOWN)-instance Lens.Labels.HasLens' MethodOptions- "maybe'idempotencyLevel"- (Prelude.Maybe MethodOptions'IdempotencyLevel)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodOptions'idempotencyLevel- (\ x__ y__ -> x__{_MethodOptions'idempotencyLevel = y__}))- Prelude.id-instance Lens.Labels.HasLens' MethodOptions "uninterpretedOption"- ([UninterpretedOption])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _MethodOptions'uninterpretedOption- (\ x__ y__ -> x__{_MethodOptions'uninterpretedOption = y__}))- Prelude.id-instance Data.ProtoLens.Message MethodOptions where- messageName _ = Data.Text.pack "google.protobuf.MethodOptions"- fieldsByTag- = let deprecated__field_descriptor- = Data.ProtoLens.FieldDescriptor "deprecated"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'deprecated")))- :: Data.ProtoLens.FieldDescriptor MethodOptions- idempotencyLevel__field_descriptor- = Data.ProtoLens.FieldDescriptor "idempotency_level"- (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::- Data.ProtoLens.FieldTypeDescriptor MethodOptions'IdempotencyLevel)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'idempotencyLevel")))- :: Data.ProtoLens.FieldDescriptor MethodOptions- uninterpretedOption__field_descriptor- = Data.ProtoLens.FieldDescriptor "uninterpreted_option"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor UninterpretedOption)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "uninterpretedOption")))- :: Data.ProtoLens.FieldDescriptor MethodOptions- in- Data.Map.fromList- [(Data.ProtoLens.Tag 33, deprecated__field_descriptor),- (Data.ProtoLens.Tag 34, idempotencyLevel__field_descriptor),- (Data.ProtoLens.Tag 999, uninterpretedOption__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _MethodOptions'_unknownFields- (\ x__ y__ -> x__{_MethodOptions'_unknownFields = y__})- defMessage- = MethodOptions{_MethodOptions'deprecated = Prelude.Nothing,- _MethodOptions'idempotencyLevel = Prelude.Nothing,- _MethodOptions'uninterpretedOption = [],- _MethodOptions'_unknownFields = ([])}-instance Control.DeepSeq.NFData MethodOptions where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_MethodOptions'_unknownFields x__)- (Control.DeepSeq.deepseq (_MethodOptions'deprecated x__)- (Control.DeepSeq.deepseq (_MethodOptions'idempotencyLevel x__)- (Control.DeepSeq.deepseq (_MethodOptions'uninterpretedOption x__)- (()))))-data MethodOptions'IdempotencyLevel = MethodOptions'IDEMPOTENCY_UNKNOWN- | MethodOptions'NO_SIDE_EFFECTS- | MethodOptions'IDEMPOTENT- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)-instance Data.ProtoLens.FieldDefault MethodOptions'IdempotencyLevel- where- fieldDefault = MethodOptions'IDEMPOTENCY_UNKNOWN-instance Data.ProtoLens.MessageEnum MethodOptions'IdempotencyLevel- where- maybeToEnum 0 = Prelude.Just MethodOptions'IDEMPOTENCY_UNKNOWN- maybeToEnum 1 = Prelude.Just MethodOptions'NO_SIDE_EFFECTS- maybeToEnum 2 = Prelude.Just MethodOptions'IDEMPOTENT- maybeToEnum _ = Prelude.Nothing- showEnum MethodOptions'IDEMPOTENCY_UNKNOWN = "IDEMPOTENCY_UNKNOWN"- showEnum MethodOptions'NO_SIDE_EFFECTS = "NO_SIDE_EFFECTS"- showEnum MethodOptions'IDEMPOTENT = "IDEMPOTENT"- readEnum "IDEMPOTENCY_UNKNOWN"- = Prelude.Just MethodOptions'IDEMPOTENCY_UNKNOWN- readEnum "NO_SIDE_EFFECTS"- = Prelude.Just MethodOptions'NO_SIDE_EFFECTS- readEnum "IDEMPOTENT" = Prelude.Just MethodOptions'IDEMPOTENT- readEnum _ = Prelude.Nothing-instance Prelude.Enum MethodOptions'IdempotencyLevel where- toEnum k__- = Prelude.maybe- (Prelude.error- ((Prelude.++) "toEnum: unknown value for enum IdempotencyLevel: "- (Prelude.show k__)))- Prelude.id- (Data.ProtoLens.maybeToEnum k__)- fromEnum MethodOptions'IDEMPOTENCY_UNKNOWN = 0- fromEnum MethodOptions'NO_SIDE_EFFECTS = 1- fromEnum MethodOptions'IDEMPOTENT = 2- succ MethodOptions'IDEMPOTENT- = Prelude.error- "MethodOptions'IdempotencyLevel.succ: bad argument MethodOptions'IDEMPOTENT. This value would be out of bounds."- succ MethodOptions'IDEMPOTENCY_UNKNOWN- = MethodOptions'NO_SIDE_EFFECTS- succ MethodOptions'NO_SIDE_EFFECTS = MethodOptions'IDEMPOTENT- pred MethodOptions'IDEMPOTENCY_UNKNOWN- = Prelude.error- "MethodOptions'IdempotencyLevel.pred: bad argument MethodOptions'IDEMPOTENCY_UNKNOWN. This value would be out of bounds."- pred MethodOptions'NO_SIDE_EFFECTS- = MethodOptions'IDEMPOTENCY_UNKNOWN- pred MethodOptions'IDEMPOTENT = MethodOptions'NO_SIDE_EFFECTS- enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom- enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo- enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen- enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo-instance Prelude.Bounded MethodOptions'IdempotencyLevel where- minBound = MethodOptions'IDEMPOTENCY_UNKNOWN- maxBound = MethodOptions'IDEMPOTENT-instance Control.DeepSeq.NFData MethodOptions'IdempotencyLevel- where- rnf x__ = Prelude.seq x__ (())-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.name' @:: Lens' OneofDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'name' @:: Lens' OneofDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.options' @:: Lens' OneofDescriptorProto OneofOptions@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'options' @:: Lens' OneofDescriptorProto (Prelude.Maybe OneofOptions)@- -}-data OneofDescriptorProto = OneofDescriptorProto{_OneofDescriptorProto'name- :: !(Prelude.Maybe Data.Text.Text),- _OneofDescriptorProto'options ::- !(Prelude.Maybe OneofOptions),- _OneofDescriptorProto'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show OneofDescriptorProto where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' OneofDescriptorProto "name"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _OneofDescriptorProto'name- (\ x__ y__ -> x__{_OneofDescriptorProto'name = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' OneofDescriptorProto "maybe'name"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _OneofDescriptorProto'name- (\ x__ y__ -> x__{_OneofDescriptorProto'name = y__}))- Prelude.id-instance Lens.Labels.HasLens' OneofDescriptorProto "options"- (OneofOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _OneofDescriptorProto'options- (\ x__ y__ -> x__{_OneofDescriptorProto'options = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' OneofDescriptorProto "maybe'options"- (Prelude.Maybe OneofOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _OneofDescriptorProto'options- (\ x__ y__ -> x__{_OneofDescriptorProto'options = y__}))- Prelude.id-instance Data.ProtoLens.Message OneofDescriptorProto where- messageName _- = Data.Text.pack "google.protobuf.OneofDescriptorProto"- fieldsByTag- = let name__field_descriptor- = Data.ProtoLens.FieldDescriptor "name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")))- :: Data.ProtoLens.FieldDescriptor OneofDescriptorProto- options__field_descriptor- = Data.ProtoLens.FieldDescriptor "options"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor OneofOptions)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'options")))- :: Data.ProtoLens.FieldDescriptor OneofDescriptorProto- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, name__field_descriptor),- (Data.ProtoLens.Tag 2, options__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _OneofDescriptorProto'_unknownFields- (\ x__ y__ -> x__{_OneofDescriptorProto'_unknownFields = y__})- defMessage- = OneofDescriptorProto{_OneofDescriptorProto'name =- Prelude.Nothing,- _OneofDescriptorProto'options = Prelude.Nothing,- _OneofDescriptorProto'_unknownFields = ([])}-instance Control.DeepSeq.NFData OneofDescriptorProto where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_OneofDescriptorProto'_unknownFields x__)- (Control.DeepSeq.deepseq (_OneofDescriptorProto'name x__)- (Control.DeepSeq.deepseq (_OneofDescriptorProto'options x__) (())))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.uninterpretedOption' @:: Lens' OneofOptions [UninterpretedOption]@- -}-data OneofOptions = OneofOptions{_OneofOptions'uninterpretedOption- :: ![UninterpretedOption],- _OneofOptions'_unknownFields :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show OneofOptions where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' OneofOptions "uninterpretedOption"- ([UninterpretedOption])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _OneofOptions'uninterpretedOption- (\ x__ y__ -> x__{_OneofOptions'uninterpretedOption = y__}))- Prelude.id-instance Data.ProtoLens.Message OneofOptions where- messageName _ = Data.Text.pack "google.protobuf.OneofOptions"- fieldsByTag- = let uninterpretedOption__field_descriptor- = Data.ProtoLens.FieldDescriptor "uninterpreted_option"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor UninterpretedOption)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "uninterpretedOption")))- :: Data.ProtoLens.FieldDescriptor OneofOptions- in- Data.Map.fromList- [(Data.ProtoLens.Tag 999, uninterpretedOption__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _OneofOptions'_unknownFields- (\ x__ y__ -> x__{_OneofOptions'_unknownFields = y__})- defMessage- = OneofOptions{_OneofOptions'uninterpretedOption = [],- _OneofOptions'_unknownFields = ([])}-instance Control.DeepSeq.NFData OneofOptions where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_OneofOptions'_unknownFields x__)- (Control.DeepSeq.deepseq (_OneofOptions'uninterpretedOption x__)- (()))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.name' @:: Lens' ServiceDescriptorProto Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'name' @:: Lens' ServiceDescriptorProto (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.method' @:: Lens' ServiceDescriptorProto [MethodDescriptorProto]@- * 'Proto.Google.Protobuf.Descriptor_Fields.options' @:: Lens' ServiceDescriptorProto ServiceOptions@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'options' @:: Lens' ServiceDescriptorProto (Prelude.Maybe ServiceOptions)@- -}-data ServiceDescriptorProto = ServiceDescriptorProto{_ServiceDescriptorProto'name- :: !(Prelude.Maybe Data.Text.Text),- _ServiceDescriptorProto'method ::- ![MethodDescriptorProto],- _ServiceDescriptorProto'options ::- !(Prelude.Maybe ServiceOptions),- _ServiceDescriptorProto'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show ServiceDescriptorProto where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' ServiceDescriptorProto "name"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _ServiceDescriptorProto'name- (\ x__ y__ -> x__{_ServiceDescriptorProto'name = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' ServiceDescriptorProto "maybe'name"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _ServiceDescriptorProto'name- (\ x__ y__ -> x__{_ServiceDescriptorProto'name = y__}))- Prelude.id-instance Lens.Labels.HasLens' ServiceDescriptorProto "method"- ([MethodDescriptorProto])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _ServiceDescriptorProto'method- (\ x__ y__ -> x__{_ServiceDescriptorProto'method = y__}))- Prelude.id-instance Lens.Labels.HasLens' ServiceDescriptorProto "options"- (ServiceOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _ServiceDescriptorProto'options- (\ x__ y__ -> x__{_ServiceDescriptorProto'options = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)-instance Lens.Labels.HasLens' ServiceDescriptorProto- "maybe'options"- (Prelude.Maybe ServiceOptions)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _ServiceDescriptorProto'options- (\ x__ y__ -> x__{_ServiceDescriptorProto'options = y__}))- Prelude.id-instance Data.ProtoLens.Message ServiceDescriptorProto where- messageName _- = Data.Text.pack "google.protobuf.ServiceDescriptorProto"- fieldsByTag- = let name__field_descriptor- = Data.ProtoLens.FieldDescriptor "name"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")))- :: Data.ProtoLens.FieldDescriptor ServiceDescriptorProto- method__field_descriptor- = Data.ProtoLens.FieldDescriptor "method"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor MethodDescriptorProto)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "method")))- :: Data.ProtoLens.FieldDescriptor ServiceDescriptorProto- options__field_descriptor- = Data.ProtoLens.FieldDescriptor "options"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor ServiceOptions)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'options")))- :: Data.ProtoLens.FieldDescriptor ServiceDescriptorProto- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, name__field_descriptor),- (Data.ProtoLens.Tag 2, method__field_descriptor),- (Data.ProtoLens.Tag 3, options__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens- _ServiceDescriptorProto'_unknownFields- (\ x__ y__ -> x__{_ServiceDescriptorProto'_unknownFields = y__})- defMessage- = ServiceDescriptorProto{_ServiceDescriptorProto'name =- Prelude.Nothing,- _ServiceDescriptorProto'method = [],- _ServiceDescriptorProto'options = Prelude.Nothing,- _ServiceDescriptorProto'_unknownFields = ([])}-instance Control.DeepSeq.NFData ServiceDescriptorProto where- rnf- = \ x__ ->- Control.DeepSeq.deepseq- (_ServiceDescriptorProto'_unknownFields x__)- (Control.DeepSeq.deepseq (_ServiceDescriptorProto'name x__)- (Control.DeepSeq.deepseq (_ServiceDescriptorProto'method x__)- (Control.DeepSeq.deepseq (_ServiceDescriptorProto'options x__)- (()))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.deprecated' @:: Lens' ServiceOptions Prelude.Bool@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'deprecated' @:: Lens' ServiceOptions (Prelude.Maybe Prelude.Bool)@- * 'Proto.Google.Protobuf.Descriptor_Fields.uninterpretedOption' @:: Lens' ServiceOptions [UninterpretedOption]@- -}-data ServiceOptions = ServiceOptions{_ServiceOptions'deprecated ::- !(Prelude.Maybe Prelude.Bool),- _ServiceOptions'uninterpretedOption :: ![UninterpretedOption],- _ServiceOptions'_unknownFields :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show ServiceOptions where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' ServiceOptions "deprecated"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _ServiceOptions'deprecated- (\ x__ y__ -> x__{_ServiceOptions'deprecated = y__}))- (Data.ProtoLens.maybeLens Prelude.False)-instance Lens.Labels.HasLens' ServiceOptions "maybe'deprecated"- (Prelude.Maybe Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _ServiceOptions'deprecated- (\ x__ y__ -> x__{_ServiceOptions'deprecated = y__}))- Prelude.id-instance Lens.Labels.HasLens' ServiceOptions "uninterpretedOption"- ([UninterpretedOption])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _ServiceOptions'uninterpretedOption- (\ x__ y__ -> x__{_ServiceOptions'uninterpretedOption = y__}))- Prelude.id-instance Data.ProtoLens.Message ServiceOptions where- messageName _ = Data.Text.pack "google.protobuf.ServiceOptions"- fieldsByTag- = let deprecated__field_descriptor- = Data.ProtoLens.FieldDescriptor "deprecated"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'deprecated")))- :: Data.ProtoLens.FieldDescriptor ServiceOptions- uninterpretedOption__field_descriptor- = Data.ProtoLens.FieldDescriptor "uninterpreted_option"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor UninterpretedOption)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "uninterpretedOption")))- :: Data.ProtoLens.FieldDescriptor ServiceOptions- in- Data.Map.fromList- [(Data.ProtoLens.Tag 33, deprecated__field_descriptor),- (Data.ProtoLens.Tag 999, uninterpretedOption__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _ServiceOptions'_unknownFields- (\ x__ y__ -> x__{_ServiceOptions'_unknownFields = y__})- defMessage- = ServiceOptions{_ServiceOptions'deprecated = Prelude.Nothing,- _ServiceOptions'uninterpretedOption = [],- _ServiceOptions'_unknownFields = ([])}-instance Control.DeepSeq.NFData ServiceOptions where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_ServiceOptions'_unknownFields x__)- (Control.DeepSeq.deepseq (_ServiceOptions'deprecated x__)- (Control.DeepSeq.deepseq (_ServiceOptions'uninterpretedOption x__)- (())))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.location' @:: Lens' SourceCodeInfo [SourceCodeInfo'Location]@- -}-data SourceCodeInfo = SourceCodeInfo{_SourceCodeInfo'location ::- ![SourceCodeInfo'Location],- _SourceCodeInfo'_unknownFields :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show SourceCodeInfo where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' SourceCodeInfo "location"- ([SourceCodeInfo'Location])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _SourceCodeInfo'location- (\ x__ y__ -> x__{_SourceCodeInfo'location = y__}))- Prelude.id-instance Data.ProtoLens.Message SourceCodeInfo where- messageName _ = Data.Text.pack "google.protobuf.SourceCodeInfo"- fieldsByTag- = let location__field_descriptor- = Data.ProtoLens.FieldDescriptor "location"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor SourceCodeInfo'Location)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "location")))- :: Data.ProtoLens.FieldDescriptor SourceCodeInfo- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, location__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _SourceCodeInfo'_unknownFields- (\ x__ y__ -> x__{_SourceCodeInfo'_unknownFields = y__})- defMessage- = SourceCodeInfo{_SourceCodeInfo'location = [],- _SourceCodeInfo'_unknownFields = ([])}-instance Control.DeepSeq.NFData SourceCodeInfo where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_SourceCodeInfo'_unknownFields x__)- (Control.DeepSeq.deepseq (_SourceCodeInfo'location x__) (()))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.path' @:: Lens' SourceCodeInfo'Location [Data.Int.Int32]@- * 'Proto.Google.Protobuf.Descriptor_Fields.span' @:: Lens' SourceCodeInfo'Location [Data.Int.Int32]@- * 'Proto.Google.Protobuf.Descriptor_Fields.leadingComments' @:: Lens' SourceCodeInfo'Location Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'leadingComments' @:: Lens' SourceCodeInfo'Location (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.trailingComments' @:: Lens' SourceCodeInfo'Location Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'trailingComments' @:: Lens' SourceCodeInfo'Location (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.leadingDetachedComments' @:: Lens' SourceCodeInfo'Location [Data.Text.Text]@- -}-data SourceCodeInfo'Location = SourceCodeInfo'Location{_SourceCodeInfo'Location'path- :: ![Data.Int.Int32],- _SourceCodeInfo'Location'span ::- ![Data.Int.Int32],- _SourceCodeInfo'Location'leadingComments ::- !(Prelude.Maybe Data.Text.Text),- _SourceCodeInfo'Location'trailingComments ::- !(Prelude.Maybe Data.Text.Text),- _SourceCodeInfo'Location'leadingDetachedComments- :: ![Data.Text.Text],- _SourceCodeInfo'Location'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show SourceCodeInfo'Location where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' SourceCodeInfo'Location "path"- ([Data.Int.Int32])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _SourceCodeInfo'Location'path- (\ x__ y__ -> x__{_SourceCodeInfo'Location'path = y__}))- Prelude.id-instance Lens.Labels.HasLens' SourceCodeInfo'Location "span"- ([Data.Int.Int32])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _SourceCodeInfo'Location'span- (\ x__ y__ -> x__{_SourceCodeInfo'Location'span = y__}))- Prelude.id-instance Lens.Labels.HasLens' SourceCodeInfo'Location- "leadingComments"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _SourceCodeInfo'Location'leadingComments- (\ x__ y__ -> x__{_SourceCodeInfo'Location'leadingComments = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' SourceCodeInfo'Location- "maybe'leadingComments"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _SourceCodeInfo'Location'leadingComments- (\ x__ y__ -> x__{_SourceCodeInfo'Location'leadingComments = y__}))- Prelude.id-instance Lens.Labels.HasLens' SourceCodeInfo'Location- "trailingComments"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _SourceCodeInfo'Location'trailingComments- (\ x__ y__ ->- x__{_SourceCodeInfo'Location'trailingComments = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' SourceCodeInfo'Location- "maybe'trailingComments"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _SourceCodeInfo'Location'trailingComments- (\ x__ y__ ->- x__{_SourceCodeInfo'Location'trailingComments = y__}))- Prelude.id-instance Lens.Labels.HasLens' SourceCodeInfo'Location- "leadingDetachedComments"- ([Data.Text.Text])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _SourceCodeInfo'Location'leadingDetachedComments- (\ x__ y__ ->- x__{_SourceCodeInfo'Location'leadingDetachedComments = y__}))- Prelude.id-instance Data.ProtoLens.Message SourceCodeInfo'Location where- messageName _- = Data.Text.pack "google.protobuf.SourceCodeInfo.Location"- fieldsByTag- = let path__field_descriptor- = Data.ProtoLens.FieldDescriptor "path"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "path")))- :: Data.ProtoLens.FieldDescriptor SourceCodeInfo'Location- span__field_descriptor- = Data.ProtoLens.FieldDescriptor "span"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "span")))- :: Data.ProtoLens.FieldDescriptor SourceCodeInfo'Location- leadingComments__field_descriptor- = Data.ProtoLens.FieldDescriptor "leading_comments"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'leadingComments")))- :: Data.ProtoLens.FieldDescriptor SourceCodeInfo'Location- trailingComments__field_descriptor- = Data.ProtoLens.FieldDescriptor "trailing_comments"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'trailingComments")))- :: Data.ProtoLens.FieldDescriptor SourceCodeInfo'Location- leadingDetachedComments__field_descriptor- = Data.ProtoLens.FieldDescriptor "leading_detached_comments"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "leadingDetachedComments")))- :: Data.ProtoLens.FieldDescriptor SourceCodeInfo'Location- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, path__field_descriptor),- (Data.ProtoLens.Tag 2, span__field_descriptor),- (Data.ProtoLens.Tag 3, leadingComments__field_descriptor),- (Data.ProtoLens.Tag 4, trailingComments__field_descriptor),- (Data.ProtoLens.Tag 6, leadingDetachedComments__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens- _SourceCodeInfo'Location'_unknownFields- (\ x__ y__ -> x__{_SourceCodeInfo'Location'_unknownFields = y__})- defMessage- = SourceCodeInfo'Location{_SourceCodeInfo'Location'path = [],- _SourceCodeInfo'Location'span = [],- _SourceCodeInfo'Location'leadingComments = Prelude.Nothing,- _SourceCodeInfo'Location'trailingComments = Prelude.Nothing,- _SourceCodeInfo'Location'leadingDetachedComments = [],- _SourceCodeInfo'Location'_unknownFields = ([])}-instance Control.DeepSeq.NFData SourceCodeInfo'Location where- rnf- = \ x__ ->- Control.DeepSeq.deepseq- (_SourceCodeInfo'Location'_unknownFields x__)- (Control.DeepSeq.deepseq (_SourceCodeInfo'Location'path x__)- (Control.DeepSeq.deepseq (_SourceCodeInfo'Location'span x__)- (Control.DeepSeq.deepseq- (_SourceCodeInfo'Location'leadingComments x__)- (Control.DeepSeq.deepseq- (_SourceCodeInfo'Location'trailingComments x__)- (Control.DeepSeq.deepseq- (_SourceCodeInfo'Location'leadingDetachedComments x__)- (()))))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.name' @:: Lens' UninterpretedOption [UninterpretedOption'NamePart]@- * 'Proto.Google.Protobuf.Descriptor_Fields.identifierValue' @:: Lens' UninterpretedOption Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'identifierValue' @:: Lens' UninterpretedOption (Prelude.Maybe Data.Text.Text)@- * 'Proto.Google.Protobuf.Descriptor_Fields.positiveIntValue' @:: Lens' UninterpretedOption Data.Word.Word64@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'positiveIntValue' @:: Lens' UninterpretedOption (Prelude.Maybe Data.Word.Word64)@- * 'Proto.Google.Protobuf.Descriptor_Fields.negativeIntValue' @:: Lens' UninterpretedOption Data.Int.Int64@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'negativeIntValue' @:: Lens' UninterpretedOption (Prelude.Maybe Data.Int.Int64)@- * 'Proto.Google.Protobuf.Descriptor_Fields.doubleValue' @:: Lens' UninterpretedOption Prelude.Double@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'doubleValue' @:: Lens' UninterpretedOption (Prelude.Maybe Prelude.Double)@- * 'Proto.Google.Protobuf.Descriptor_Fields.stringValue' @:: Lens' UninterpretedOption Data.ByteString.ByteString@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'stringValue' @:: Lens' UninterpretedOption- (Prelude.Maybe Data.ByteString.ByteString)@- * 'Proto.Google.Protobuf.Descriptor_Fields.aggregateValue' @:: Lens' UninterpretedOption Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.maybe'aggregateValue' @:: Lens' UninterpretedOption (Prelude.Maybe Data.Text.Text)@- -}-data UninterpretedOption = UninterpretedOption{_UninterpretedOption'name- :: ![UninterpretedOption'NamePart],- _UninterpretedOption'identifierValue ::- !(Prelude.Maybe Data.Text.Text),- _UninterpretedOption'positiveIntValue ::- !(Prelude.Maybe Data.Word.Word64),- _UninterpretedOption'negativeIntValue ::- !(Prelude.Maybe Data.Int.Int64),- _UninterpretedOption'doubleValue ::- !(Prelude.Maybe Prelude.Double),- _UninterpretedOption'stringValue ::- !(Prelude.Maybe Data.ByteString.ByteString),- _UninterpretedOption'aggregateValue ::- !(Prelude.Maybe Data.Text.Text),- _UninterpretedOption'_unknownFields ::- !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show UninterpretedOption where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' UninterpretedOption "name"- ([UninterpretedOption'NamePart])- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'name- (\ x__ y__ -> x__{_UninterpretedOption'name = y__}))- Prelude.id-instance Lens.Labels.HasLens' UninterpretedOption "identifierValue"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'identifierValue- (\ x__ y__ -> x__{_UninterpretedOption'identifierValue = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' UninterpretedOption- "maybe'identifierValue"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'identifierValue- (\ x__ y__ -> x__{_UninterpretedOption'identifierValue = y__}))- Prelude.id-instance Lens.Labels.HasLens' UninterpretedOption- "positiveIntValue"- (Data.Word.Word64)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'positiveIntValue- (\ x__ y__ -> x__{_UninterpretedOption'positiveIntValue = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' UninterpretedOption- "maybe'positiveIntValue"- (Prelude.Maybe Data.Word.Word64)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'positiveIntValue- (\ x__ y__ -> x__{_UninterpretedOption'positiveIntValue = y__}))- Prelude.id-instance Lens.Labels.HasLens' UninterpretedOption- "negativeIntValue"- (Data.Int.Int64)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'negativeIntValue- (\ x__ y__ -> x__{_UninterpretedOption'negativeIntValue = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' UninterpretedOption- "maybe'negativeIntValue"- (Prelude.Maybe Data.Int.Int64)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'negativeIntValue- (\ x__ y__ -> x__{_UninterpretedOption'negativeIntValue = y__}))- Prelude.id-instance Lens.Labels.HasLens' UninterpretedOption "doubleValue"- (Prelude.Double)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'doubleValue- (\ x__ y__ -> x__{_UninterpretedOption'doubleValue = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' UninterpretedOption- "maybe'doubleValue"- (Prelude.Maybe Prelude.Double)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'doubleValue- (\ x__ y__ -> x__{_UninterpretedOption'doubleValue = y__}))- Prelude.id-instance Lens.Labels.HasLens' UninterpretedOption "stringValue"- (Data.ByteString.ByteString)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'stringValue- (\ x__ y__ -> x__{_UninterpretedOption'stringValue = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' UninterpretedOption- "maybe'stringValue"- (Prelude.Maybe Data.ByteString.ByteString)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'stringValue- (\ x__ y__ -> x__{_UninterpretedOption'stringValue = y__}))- Prelude.id-instance Lens.Labels.HasLens' UninterpretedOption "aggregateValue"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'aggregateValue- (\ x__ y__ -> x__{_UninterpretedOption'aggregateValue = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)-instance Lens.Labels.HasLens' UninterpretedOption- "maybe'aggregateValue"- (Prelude.Maybe Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'aggregateValue- (\ x__ y__ -> x__{_UninterpretedOption'aggregateValue = y__}))- Prelude.id-instance Data.ProtoLens.Message UninterpretedOption where- messageName _- = Data.Text.pack "google.protobuf.UninterpretedOption"- fieldsByTag- = let name__field_descriptor- = Data.ProtoLens.FieldDescriptor "name"- (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::- Data.ProtoLens.FieldTypeDescriptor UninterpretedOption'NamePart)- (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "name")))- :: Data.ProtoLens.FieldDescriptor UninterpretedOption- identifierValue__field_descriptor- = Data.ProtoLens.FieldDescriptor "identifier_value"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'identifierValue")))- :: Data.ProtoLens.FieldDescriptor UninterpretedOption- positiveIntValue__field_descriptor- = Data.ProtoLens.FieldDescriptor "positive_int_value"- (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'positiveIntValue")))- :: Data.ProtoLens.FieldDescriptor UninterpretedOption- negativeIntValue__field_descriptor- = Data.ProtoLens.FieldDescriptor "negative_int_value"- (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'negativeIntValue")))- :: Data.ProtoLens.FieldDescriptor UninterpretedOption- doubleValue__field_descriptor- = Data.ProtoLens.FieldDescriptor "double_value"- (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Double)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'doubleValue")))- :: Data.ProtoLens.FieldDescriptor UninterpretedOption- stringValue__field_descriptor- = Data.ProtoLens.FieldDescriptor "string_value"- (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::- Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'stringValue")))- :: Data.ProtoLens.FieldDescriptor UninterpretedOption- aggregateValue__field_descriptor- = Data.ProtoLens.FieldDescriptor "aggregate_value"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'aggregateValue")))- :: Data.ProtoLens.FieldDescriptor UninterpretedOption- in- Data.Map.fromList- [(Data.ProtoLens.Tag 2, name__field_descriptor),- (Data.ProtoLens.Tag 3, identifierValue__field_descriptor),- (Data.ProtoLens.Tag 4, positiveIntValue__field_descriptor),- (Data.ProtoLens.Tag 5, negativeIntValue__field_descriptor),- (Data.ProtoLens.Tag 6, doubleValue__field_descriptor),- (Data.ProtoLens.Tag 7, stringValue__field_descriptor),- (Data.ProtoLens.Tag 8, aggregateValue__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens _UninterpretedOption'_unknownFields- (\ x__ y__ -> x__{_UninterpretedOption'_unknownFields = y__})- defMessage- = UninterpretedOption{_UninterpretedOption'name = [],- _UninterpretedOption'identifierValue = Prelude.Nothing,- _UninterpretedOption'positiveIntValue = Prelude.Nothing,- _UninterpretedOption'negativeIntValue = Prelude.Nothing,- _UninterpretedOption'doubleValue = Prelude.Nothing,- _UninterpretedOption'stringValue = Prelude.Nothing,- _UninterpretedOption'aggregateValue = Prelude.Nothing,- _UninterpretedOption'_unknownFields = ([])}-instance Control.DeepSeq.NFData UninterpretedOption where- rnf- = \ x__ ->- Control.DeepSeq.deepseq (_UninterpretedOption'_unknownFields x__)- (Control.DeepSeq.deepseq (_UninterpretedOption'name x__)- (Control.DeepSeq.deepseq (_UninterpretedOption'identifierValue x__)- (Control.DeepSeq.deepseq- (_UninterpretedOption'positiveIntValue x__)- (Control.DeepSeq.deepseq- (_UninterpretedOption'negativeIntValue x__)- (Control.DeepSeq.deepseq (_UninterpretedOption'doubleValue x__)- (Control.DeepSeq.deepseq (_UninterpretedOption'stringValue x__)- (Control.DeepSeq.deepseq (_UninterpretedOption'aggregateValue x__)- (()))))))))-{- | Fields :-- * 'Proto.Google.Protobuf.Descriptor_Fields.namePart' @:: Lens' UninterpretedOption'NamePart Data.Text.Text@- * 'Proto.Google.Protobuf.Descriptor_Fields.isExtension' @:: Lens' UninterpretedOption'NamePart Prelude.Bool@- -}-data UninterpretedOption'NamePart = UninterpretedOption'NamePart{_UninterpretedOption'NamePart'namePart- :: !Data.Text.Text,- _UninterpretedOption'NamePart'isExtension- :: !Prelude.Bool,- _UninterpretedOption'NamePart'_unknownFields- :: !Data.ProtoLens.FieldSet}- deriving (Prelude.Eq, Prelude.Ord)-instance Prelude.Show UninterpretedOption'NamePart where- showsPrec _ __x __s- = Prelude.showChar '{'- (Prelude.showString (Data.ProtoLens.showMessageShort __x)- (Prelude.showChar '}' __s))-instance Lens.Labels.HasLens' UninterpretedOption'NamePart- "namePart"- (Data.Text.Text)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens _UninterpretedOption'NamePart'namePart- (\ x__ y__ -> x__{_UninterpretedOption'NamePart'namePart = y__}))- Prelude.id-instance Lens.Labels.HasLens' UninterpretedOption'NamePart- "isExtension"- (Prelude.Bool)- where- lensOf' _- = (Prelude..)- (Lens.Family2.Unchecked.lens- _UninterpretedOption'NamePart'isExtension- (\ x__ y__ ->- x__{_UninterpretedOption'NamePart'isExtension = y__}))- Prelude.id-instance Data.ProtoLens.Message UninterpretedOption'NamePart where- messageName _- = Data.Text.pack "google.protobuf.UninterpretedOption.NamePart"- fieldsByTag- = let namePart__field_descriptor- = Data.ProtoLens.FieldDescriptor "name_part"- (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.PlainField Data.ProtoLens.Required- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "namePart")))- :: Data.ProtoLens.FieldDescriptor UninterpretedOption'NamePart- isExtension__field_descriptor- = Data.ProtoLens.FieldDescriptor "is_extension"- (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.PlainField Data.ProtoLens.Required- (Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "isExtension")))- :: Data.ProtoLens.FieldDescriptor UninterpretedOption'NamePart- in- Data.Map.fromList- [(Data.ProtoLens.Tag 1, namePart__field_descriptor),- (Data.ProtoLens.Tag 2, isExtension__field_descriptor)]- unknownFields- = Lens.Family2.Unchecked.lens- _UninterpretedOption'NamePart'_unknownFields- (\ x__ y__ ->- x__{_UninterpretedOption'NamePart'_unknownFields = y__})- defMessage- = UninterpretedOption'NamePart{_UninterpretedOption'NamePart'namePart- = Data.ProtoLens.fieldDefault,- _UninterpretedOption'NamePart'isExtension =- Data.ProtoLens.fieldDefault,- _UninterpretedOption'NamePart'_unknownFields = ([])}-instance Control.DeepSeq.NFData UninterpretedOption'NamePart where- rnf- = \ x__ ->- Control.DeepSeq.deepseq- (_UninterpretedOption'NamePart'_unknownFields x__)- (Control.DeepSeq.deepseq- (_UninterpretedOption'NamePart'namePart x__)- (Control.DeepSeq.deepseq- (_UninterpretedOption'NamePart'isExtension x__)- (())))
− src/Proto/Google/Protobuf/Descriptor_Fields.hs
@@ -1,1097 +0,0 @@-{- This file was auto-generated from google/protobuf/descriptor.proto by the proto-lens-protoc program. -}-{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,- UndecidableInstances, GeneralizedNewtypeDeriving,- MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,- PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}-{-# OPTIONS_GHC -fno-warn-unused-imports#-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}-module Proto.Google.Protobuf.Descriptor_Fields where-import qualified Prelude-import qualified Data.Int-import qualified Data.Word-import qualified Data.ProtoLens-import qualified Data.ProtoLens.Message.Enum-import qualified Data.ProtoLens.Service.Types-import qualified Lens.Family2-import qualified Lens.Family2.Unchecked-import qualified Data.Text-import qualified Data.Map-import qualified Data.ByteString-import qualified Data.ByteString.Char8-import qualified Lens.Labels-import qualified Text.Read--aggregateValue ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "aggregateValue" a) =>- Lens.Family2.LensLike' f s a-aggregateValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "aggregateValue")-allowAlias ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "allowAlias" a) =>- Lens.Family2.LensLike' f s a-allowAlias- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "allowAlias")-annotation ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "annotation" a) =>- Lens.Family2.LensLike' f s a-annotation- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "annotation")-begin ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "begin" a) =>- Lens.Family2.LensLike' f s a-begin- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "begin")-ccEnableArenas ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "ccEnableArenas" a) =>- Lens.Family2.LensLike' f s a-ccEnableArenas- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "ccEnableArenas")-ccGenericServices ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "ccGenericServices" a) =>- Lens.Family2.LensLike' f s a-ccGenericServices- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "ccGenericServices")-clientStreaming ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "clientStreaming" a) =>- Lens.Family2.LensLike' f s a-clientStreaming- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "clientStreaming")-csharpNamespace ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "csharpNamespace" a) =>- Lens.Family2.LensLike' f s a-csharpNamespace- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "csharpNamespace")-ctype ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "ctype" a) =>- Lens.Family2.LensLike' f s a-ctype- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "ctype")-defaultValue ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "defaultValue" a) =>- Lens.Family2.LensLike' f s a-defaultValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "defaultValue")-dependency ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "dependency" a) =>- Lens.Family2.LensLike' f s a-dependency- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "dependency")-deprecated ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "deprecated" a) =>- Lens.Family2.LensLike' f s a-deprecated- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "deprecated")-doubleValue ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "doubleValue" a) =>- Lens.Family2.LensLike' f s a-doubleValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "doubleValue")-end ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "end" a) =>- Lens.Family2.LensLike' f s a-end- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "end")-enumType ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "enumType" a) =>- Lens.Family2.LensLike' f s a-enumType- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "enumType")-extendee ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "extendee" a) =>- Lens.Family2.LensLike' f s a-extendee- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "extendee")-extension ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "extension" a) =>- Lens.Family2.LensLike' f s a-extension- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "extension")-extensionRange ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "extensionRange" a) =>- Lens.Family2.LensLike' f s a-extensionRange- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "extensionRange")-field ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "field" a) =>- Lens.Family2.LensLike' f s a-field- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "field")-file ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "file" a) =>- Lens.Family2.LensLike' f s a-file- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "file")-goPackage ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "goPackage" a) =>- Lens.Family2.LensLike' f s a-goPackage- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "goPackage")-idempotencyLevel ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "idempotencyLevel" a) =>- Lens.Family2.LensLike' f s a-idempotencyLevel- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "idempotencyLevel")-identifierValue ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "identifierValue" a) =>- Lens.Family2.LensLike' f s a-identifierValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "identifierValue")-inputType ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "inputType" a) =>- Lens.Family2.LensLike' f s a-inputType- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "inputType")-isExtension ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "isExtension" a) =>- Lens.Family2.LensLike' f s a-isExtension- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "isExtension")-javaGenerateEqualsAndHash ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "javaGenerateEqualsAndHash" a) =>- Lens.Family2.LensLike' f s a-javaGenerateEqualsAndHash- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "javaGenerateEqualsAndHash")-javaGenericServices ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "javaGenericServices" a) =>- Lens.Family2.LensLike' f s a-javaGenericServices- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "javaGenericServices")-javaMultipleFiles ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "javaMultipleFiles" a) =>- Lens.Family2.LensLike' f s a-javaMultipleFiles- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "javaMultipleFiles")-javaOuterClassname ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "javaOuterClassname" a) =>- Lens.Family2.LensLike' f s a-javaOuterClassname- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "javaOuterClassname")-javaPackage ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "javaPackage" a) =>- Lens.Family2.LensLike' f s a-javaPackage- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "javaPackage")-javaStringCheckUtf8 ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "javaStringCheckUtf8" a) =>- Lens.Family2.LensLike' f s a-javaStringCheckUtf8- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "javaStringCheckUtf8")-jsonName ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "jsonName" a) =>- Lens.Family2.LensLike' f s a-jsonName- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "jsonName")-jstype ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "jstype" a) =>- Lens.Family2.LensLike' f s a-jstype- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "jstype")-label ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "label" a) =>- Lens.Family2.LensLike' f s a-label- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "label")-lazy ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "lazy" a) =>- Lens.Family2.LensLike' f s a-lazy- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "lazy")-leadingComments ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "leadingComments" a) =>- Lens.Family2.LensLike' f s a-leadingComments- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "leadingComments")-leadingDetachedComments ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "leadingDetachedComments" a) =>- Lens.Family2.LensLike' f s a-leadingDetachedComments- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "leadingDetachedComments")-location ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "location" a) =>- Lens.Family2.LensLike' f s a-location- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "location")-mapEntry ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "mapEntry" a) =>- Lens.Family2.LensLike' f s a-mapEntry- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "mapEntry")-maybe'aggregateValue ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'aggregateValue" a) =>- Lens.Family2.LensLike' f s a-maybe'aggregateValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'aggregateValue")-maybe'allowAlias ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'allowAlias" a) =>- Lens.Family2.LensLike' f s a-maybe'allowAlias- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'allowAlias")-maybe'begin ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'begin" a) =>- Lens.Family2.LensLike' f s a-maybe'begin- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'begin")-maybe'ccEnableArenas ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'ccEnableArenas" a) =>- Lens.Family2.LensLike' f s a-maybe'ccEnableArenas- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'ccEnableArenas")-maybe'ccGenericServices ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'ccGenericServices" a) =>- Lens.Family2.LensLike' f s a-maybe'ccGenericServices- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'ccGenericServices")-maybe'clientStreaming ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'clientStreaming" a) =>- Lens.Family2.LensLike' f s a-maybe'clientStreaming- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'clientStreaming")-maybe'csharpNamespace ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'csharpNamespace" a) =>- Lens.Family2.LensLike' f s a-maybe'csharpNamespace- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'csharpNamespace")-maybe'ctype ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'ctype" a) =>- Lens.Family2.LensLike' f s a-maybe'ctype- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'ctype")-maybe'defaultValue ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'defaultValue" a) =>- Lens.Family2.LensLike' f s a-maybe'defaultValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'defaultValue")-maybe'deprecated ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'deprecated" a) =>- Lens.Family2.LensLike' f s a-maybe'deprecated- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'deprecated")-maybe'doubleValue ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'doubleValue" a) =>- Lens.Family2.LensLike' f s a-maybe'doubleValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'doubleValue")-maybe'end ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'end" a) =>- Lens.Family2.LensLike' f s a-maybe'end- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'end")-maybe'extendee ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'extendee" a) =>- Lens.Family2.LensLike' f s a-maybe'extendee- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'extendee")-maybe'goPackage ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'goPackage" a) =>- Lens.Family2.LensLike' f s a-maybe'goPackage- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'goPackage")-maybe'idempotencyLevel ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'idempotencyLevel" a) =>- Lens.Family2.LensLike' f s a-maybe'idempotencyLevel- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'idempotencyLevel")-maybe'identifierValue ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'identifierValue" a) =>- Lens.Family2.LensLike' f s a-maybe'identifierValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'identifierValue")-maybe'inputType ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'inputType" a) =>- Lens.Family2.LensLike' f s a-maybe'inputType- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'inputType")-maybe'javaGenerateEqualsAndHash ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'javaGenerateEqualsAndHash" a) =>- Lens.Family2.LensLike' f s a-maybe'javaGenerateEqualsAndHash- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaGenerateEqualsAndHash")-maybe'javaGenericServices ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'javaGenericServices" a) =>- Lens.Family2.LensLike' f s a-maybe'javaGenericServices- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaGenericServices")-maybe'javaMultipleFiles ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'javaMultipleFiles" a) =>- Lens.Family2.LensLike' f s a-maybe'javaMultipleFiles- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaMultipleFiles")-maybe'javaOuterClassname ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'javaOuterClassname" a) =>- Lens.Family2.LensLike' f s a-maybe'javaOuterClassname- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaOuterClassname")-maybe'javaPackage ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'javaPackage" a) =>- Lens.Family2.LensLike' f s a-maybe'javaPackage- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'javaPackage")-maybe'javaStringCheckUtf8 ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'javaStringCheckUtf8" a) =>- Lens.Family2.LensLike' f s a-maybe'javaStringCheckUtf8- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'javaStringCheckUtf8")-maybe'jsonName ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'jsonName" a) =>- Lens.Family2.LensLike' f s a-maybe'jsonName- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'jsonName")-maybe'jstype ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'jstype" a) =>- Lens.Family2.LensLike' f s a-maybe'jstype- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'jstype")-maybe'label ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'label" a) =>- Lens.Family2.LensLike' f s a-maybe'label- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'label")-maybe'lazy ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'lazy" a) =>- Lens.Family2.LensLike' f s a-maybe'lazy- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'lazy")-maybe'leadingComments ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'leadingComments" a) =>- Lens.Family2.LensLike' f s a-maybe'leadingComments- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'leadingComments")-maybe'mapEntry ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'mapEntry" a) =>- Lens.Family2.LensLike' f s a-maybe'mapEntry- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'mapEntry")-maybe'messageSetWireFormat ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'messageSetWireFormat" a) =>- Lens.Family2.LensLike' f s a-maybe'messageSetWireFormat- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'messageSetWireFormat")-maybe'name ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'name" a) =>- Lens.Family2.LensLike' f s a-maybe'name- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'name")-maybe'negativeIntValue ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'negativeIntValue" a) =>- Lens.Family2.LensLike' f s a-maybe'negativeIntValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'negativeIntValue")-maybe'noStandardDescriptorAccessor ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'noStandardDescriptorAccessor"- a) =>- Lens.Family2.LensLike' f s a-maybe'noStandardDescriptorAccessor- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'noStandardDescriptorAccessor")-maybe'number ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'number" a) =>- Lens.Family2.LensLike' f s a-maybe'number- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'number")-maybe'objcClassPrefix ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'objcClassPrefix" a) =>- Lens.Family2.LensLike' f s a-maybe'objcClassPrefix- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'objcClassPrefix")-maybe'oneofIndex ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'oneofIndex" a) =>- Lens.Family2.LensLike' f s a-maybe'oneofIndex- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'oneofIndex")-maybe'optimizeFor ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'optimizeFor" a) =>- Lens.Family2.LensLike' f s a-maybe'optimizeFor- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'optimizeFor")-maybe'options ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'options" a) =>- Lens.Family2.LensLike' f s a-maybe'options- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'options")-maybe'outputType ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'outputType" a) =>- Lens.Family2.LensLike' f s a-maybe'outputType- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'outputType")-maybe'package ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'package" a) =>- Lens.Family2.LensLike' f s a-maybe'package- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'package")-maybe'packed ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'packed" a) =>- Lens.Family2.LensLike' f s a-maybe'packed- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'packed")-maybe'phpClassPrefix ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'phpClassPrefix" a) =>- Lens.Family2.LensLike' f s a-maybe'phpClassPrefix- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'phpClassPrefix")-maybe'phpGenericServices ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'phpGenericServices" a) =>- Lens.Family2.LensLike' f s a-maybe'phpGenericServices- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'phpGenericServices")-maybe'phpMetadataNamespace ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'phpMetadataNamespace" a) =>- Lens.Family2.LensLike' f s a-maybe'phpMetadataNamespace- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'phpMetadataNamespace")-maybe'phpNamespace ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'phpNamespace" a) =>- Lens.Family2.LensLike' f s a-maybe'phpNamespace- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'phpNamespace")-maybe'positiveIntValue ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'positiveIntValue" a) =>- Lens.Family2.LensLike' f s a-maybe'positiveIntValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'positiveIntValue")-maybe'pyGenericServices ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'pyGenericServices" a) =>- Lens.Family2.LensLike' f s a-maybe'pyGenericServices- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'pyGenericServices")-maybe'rubyPackage ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'rubyPackage" a) =>- Lens.Family2.LensLike' f s a-maybe'rubyPackage- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'rubyPackage")-maybe'serverStreaming ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'serverStreaming" a) =>- Lens.Family2.LensLike' f s a-maybe'serverStreaming- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'serverStreaming")-maybe'sourceCodeInfo ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'sourceCodeInfo" a) =>- Lens.Family2.LensLike' f s a-maybe'sourceCodeInfo- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'sourceCodeInfo")-maybe'sourceFile ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'sourceFile" a) =>- Lens.Family2.LensLike' f s a-maybe'sourceFile- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'sourceFile")-maybe'start ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'start" a) =>- Lens.Family2.LensLike' f s a-maybe'start- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'start")-maybe'stringValue ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'stringValue" a) =>- Lens.Family2.LensLike' f s a-maybe'stringValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'stringValue")-maybe'swiftPrefix ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'swiftPrefix" a) =>- Lens.Family2.LensLike' f s a-maybe'swiftPrefix- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'swiftPrefix")-maybe'syntax ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'syntax" a) =>- Lens.Family2.LensLike' f s a-maybe'syntax- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'syntax")-maybe'trailingComments ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "maybe'trailingComments" a) =>- Lens.Family2.LensLike' f s a-maybe'trailingComments- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "maybe'trailingComments")-maybe'type' ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'type'" a) =>- Lens.Family2.LensLike' f s a-maybe'type'- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'type'")-maybe'typeName ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'typeName" a) =>- Lens.Family2.LensLike' f s a-maybe'typeName- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'typeName")-maybe'weak ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "maybe'weak" a) =>- Lens.Family2.LensLike' f s a-maybe'weak- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'weak")-messageSetWireFormat ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "messageSetWireFormat" a) =>- Lens.Family2.LensLike' f s a-messageSetWireFormat- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "messageSetWireFormat")-messageType ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "messageType" a) =>- Lens.Family2.LensLike' f s a-messageType- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "messageType")-method ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "method" a) =>- Lens.Family2.LensLike' f s a-method- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "method")-name ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "name" a) =>- Lens.Family2.LensLike' f s a-name- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "name")-namePart ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "namePart" a) =>- Lens.Family2.LensLike' f s a-namePart- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "namePart")-negativeIntValue ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "negativeIntValue" a) =>- Lens.Family2.LensLike' f s a-negativeIntValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "negativeIntValue")-nestedType ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "nestedType" a) =>- Lens.Family2.LensLike' f s a-nestedType- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "nestedType")-noStandardDescriptorAccessor ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "noStandardDescriptorAccessor" a) =>- Lens.Family2.LensLike' f s a-noStandardDescriptorAccessor- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "noStandardDescriptorAccessor")-number ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "number" a) =>- Lens.Family2.LensLike' f s a-number- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "number")-objcClassPrefix ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "objcClassPrefix" a) =>- Lens.Family2.LensLike' f s a-objcClassPrefix- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "objcClassPrefix")-oneofDecl ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "oneofDecl" a) =>- Lens.Family2.LensLike' f s a-oneofDecl- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "oneofDecl")-oneofIndex ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "oneofIndex" a) =>- Lens.Family2.LensLike' f s a-oneofIndex- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "oneofIndex")-optimizeFor ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "optimizeFor" a) =>- Lens.Family2.LensLike' f s a-optimizeFor- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "optimizeFor")-options ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "options" a) =>- Lens.Family2.LensLike' f s a-options- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "options")-outputType ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "outputType" a) =>- Lens.Family2.LensLike' f s a-outputType- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "outputType")-package ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "package" a) =>- Lens.Family2.LensLike' f s a-package- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "package")-packed ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "packed" a) =>- Lens.Family2.LensLike' f s a-packed- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "packed")-path ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "path" a) =>- Lens.Family2.LensLike' f s a-path- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "path")-phpClassPrefix ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "phpClassPrefix" a) =>- Lens.Family2.LensLike' f s a-phpClassPrefix- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "phpClassPrefix")-phpGenericServices ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "phpGenericServices" a) =>- Lens.Family2.LensLike' f s a-phpGenericServices- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "phpGenericServices")-phpMetadataNamespace ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "phpMetadataNamespace" a) =>- Lens.Family2.LensLike' f s a-phpMetadataNamespace- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "phpMetadataNamespace")-phpNamespace ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "phpNamespace" a) =>- Lens.Family2.LensLike' f s a-phpNamespace- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "phpNamespace")-positiveIntValue ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "positiveIntValue" a) =>- Lens.Family2.LensLike' f s a-positiveIntValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "positiveIntValue")-publicDependency ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "publicDependency" a) =>- Lens.Family2.LensLike' f s a-publicDependency- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "publicDependency")-pyGenericServices ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "pyGenericServices" a) =>- Lens.Family2.LensLike' f s a-pyGenericServices- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "pyGenericServices")-reservedName ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "reservedName" a) =>- Lens.Family2.LensLike' f s a-reservedName- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "reservedName")-reservedRange ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "reservedRange" a) =>- Lens.Family2.LensLike' f s a-reservedRange- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "reservedRange")-rubyPackage ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "rubyPackage" a) =>- Lens.Family2.LensLike' f s a-rubyPackage- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "rubyPackage")-serverStreaming ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "serverStreaming" a) =>- Lens.Family2.LensLike' f s a-serverStreaming- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "serverStreaming")-service ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "service" a) =>- Lens.Family2.LensLike' f s a-service- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "service")-sourceCodeInfo ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "sourceCodeInfo" a) =>- Lens.Family2.LensLike' f s a-sourceCodeInfo- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "sourceCodeInfo")-sourceFile ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "sourceFile" a) =>- Lens.Family2.LensLike' f s a-sourceFile- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "sourceFile")-span ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "span" a) =>- Lens.Family2.LensLike' f s a-span- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "span")-start ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "start" a) =>- Lens.Family2.LensLike' f s a-start- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "start")-stringValue ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "stringValue" a) =>- Lens.Family2.LensLike' f s a-stringValue- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "stringValue")-swiftPrefix ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "swiftPrefix" a) =>- Lens.Family2.LensLike' f s a-swiftPrefix- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "swiftPrefix")-syntax ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "syntax" a) =>- Lens.Family2.LensLike' f s a-syntax- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "syntax")-trailingComments ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "trailingComments" a) =>- Lens.Family2.LensLike' f s a-trailingComments- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "trailingComments")-type' ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "type'" a) =>- Lens.Family2.LensLike' f s a-type'- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "type'")-typeName ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "typeName" a) =>- Lens.Family2.LensLike' f s a-typeName- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "typeName")-uninterpretedOption ::- forall f s a .- (Prelude.Functor f,- Lens.Labels.HasLens' s "uninterpretedOption" a) =>- Lens.Family2.LensLike' f s a-uninterpretedOption- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) ::- (Lens.Labels.Proxy#) "uninterpretedOption")-value ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "value" a) =>- Lens.Family2.LensLike' f s a-value- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")-weak ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "weak" a) =>- Lens.Family2.LensLike' f s a-weak- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "weak")-weakDependency ::- forall f s a .- (Prelude.Functor f, Lens.Labels.HasLens' s "weakDependency" a) =>- Lens.Family2.LensLike' f s a-weakDependency- = Lens.Labels.lensOf'- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "weakDependency")
+ tests/growing_test.hs view
@@ -0,0 +1,37 @@+-- | Unit and property tests for Data.ProtoLens.Encoding.Growing.+module Main (main) where++import Control.Monad (void)+import Control.Monad.ST+import Data.Foldable (foldlM)+import qualified Data.Vector.Unboxed as V+import Test.QuickCheck+import Test.Tasty (defaultMain, testGroup)+import Test.Tasty.QuickCheck (testProperty)++import Data.ProtoLens.Encoding.Growing++main :: IO ()+main = defaultMain $ testGroup "tests"+ [ testProperty "fromList" testFromList+ , testProperty "unchanged" testUnchanged+ ]++testFromList :: [Int] -> Property+testFromList xs = fromListGrowing xs === V.fromList xs++fromListGrowing :: V.Unbox a => [a] -> V.Vector a+fromListGrowing xs0 = runST (new >>= fill xs0 >>= unsafeFreeze)++fill :: V.Unbox a => [a] -> Growing V.Vector s a -> ST s (Growing V.Vector s a)+fill xs v = foldlM append v xs++-- Test a weak form of immutability: filling in more values (which may or may+-- not cause reallocations) doesn't affect the current value.+testUnchanged :: [Int] -> [Int] -> Property+testUnchanged xs ys =+ let xs' = runST (do+ v <- new >>= fill xs+ void $ fill ys v+ unsafeFreeze v)+ in xs' === V.fromList xs
+ tests/parser_test.hs view
@@ -0,0 +1,96 @@+-- | Unit and property tests for our custom parsing monad.+module Main (main) where++import qualified Data.ByteString as B+import Data.Either (isLeft)++import Test.QuickCheck+import Test.Tasty (defaultMain, testGroup, TestTree)+import Test.Tasty.QuickCheck (testProperty)++import Data.ProtoLens.Encoding.Bytes+import Data.ProtoLens.Encoding.Parser++main :: IO ()+main = defaultMain $ testGroup "tests"+ [ testGroup "Parser" testParser+ , testGroup "getWord8" testGetWord8+ , testGroup "getBytes" testGetBytes+ , testGroup "getWord32le" testGetWord32le+ , testGroup "failure" testFailure+ , testGroup "isolate" testIsolate+ ]++testParser :: [TestTree]+testParser =+ -- Test out the Applicative instance by using "traverse" to read the same number of bytes+ -- as in the input.+ -- "traverse (const f) g" runs f once for every element of g.+ [ testProperty "traverse" $ \ws -> runParser (traverse (const getWord8) ws)+ (B.pack ws)+ === Right ws+ ]++testGetWord8 :: [TestTree]+testGetWord8 =+ [ testProperty "atEnd" $ \ws -> runParser atEnd (B.pack ws) === Right (null ws)+ , testProperty "manyTillEnd"+ $ \ws -> runParser (manyTillEnd getWord8) (B.pack ws) === Right ws+ ]++testGetBytes :: [TestTree]+testGetBytes =+ [ testProperty "many"+ $ \ws -> let+ packed = map B.pack ws+ in runParser (mapM (getBytes . B.length) packed) (B.concat packed)+ === Right packed+ , testProperty "negative length"+ $ \n ws -> n < 0 ==> counterexampleF isLeft+ (runParser (getBytes n) $ B.pack ws)+ ]++testGetWord32le :: [TestTree]+testGetWord32le =+ [ testProperty "align"+ $ \ws -> length ws `mod` 4 /= 0 ==>+ counterexampleF isLeft (runParser (manyTillEnd getWord32le) (B.pack ws))+ , testProperty "manyTillEnd" $ \ws ->+ runParser (manyTillEnd getWord32le) (runBuilder $ foldMap putFixed32 ws)+ === Right ws+ ]++testFailure :: [TestTree]+testFailure =+ [ testProperty "fail-fast" $ \bs ->+ runParser (fail "abcde") (B.pack bs)+ === (Left "abcde" :: Either String ())+ , testProperty "<?>" $ \bs ->+ runParser (fail "abcde" <?> "fghij") (B.pack bs)+ === (Left "fghij: abcde" :: Either String ())+ ]++testIsolate :: [TestTree]+testIsolate =+ [ testProperty "many" $ \bs bs' ->+ runParser ((,) <$> isolate (length bs) (manyTillEnd getWord8) <*>+ manyTillEnd getWord8)+ (B.pack (bs ++ bs'))+ == Right (bs, bs')+ , testProperty "negative length" $ \n ws ->+ n < 0 ==> counterexampleF isLeft $ runParser (isolate n getWord8) $ B.pack ws+ ]++-- Since this is a test, just implement the slow stack-heavy way.+manyTillEnd :: Parser a -> Parser [a]+manyTillEnd p = do+ end <- atEnd+ if end+ then return []+ else do+ x <- p+ xs <- manyTillEnd p+ return $ x : xs++counterexampleF :: (Testable prop, Show a) => (a -> prop) -> a -> Property+counterexampleF f x = counterexample (show x) $ f x