go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/milo/ui/src/proto/google/protobuf/descriptor.pb.ts (about)

     1  /* eslint-disable */
     2  import Long from "long";
     3  import _m0 from "protobufjs/minimal";
     4  
     5  export const protobufPackage = "google.protobuf";
     6  
     7  /**
     8   * The protocol compiler can output a FileDescriptorSet containing the .proto
     9   * files it parses.
    10   */
    11  export interface FileDescriptorSet {
    12    readonly file: readonly FileDescriptorProto[];
    13  }
    14  
    15  /** Describes a complete .proto file. */
    16  export interface FileDescriptorProto {
    17    /** file name, relative to root of source tree */
    18    readonly name: string;
    19    /** e.g. "foo", "foo.bar", etc. */
    20    readonly package: string;
    21    /** Names of files imported by this file. */
    22    readonly dependency: readonly string[];
    23    /** Indexes of the public imported files in the dependency list above. */
    24    readonly publicDependency: readonly number[];
    25    /**
    26     * Indexes of the weak imported files in the dependency list.
    27     * For Google-internal migration only. Do not use.
    28     */
    29    readonly weakDependency: readonly number[];
    30    /** All top-level definitions in this file. */
    31    readonly messageType: readonly DescriptorProto[];
    32    readonly enumType: readonly EnumDescriptorProto[];
    33    readonly service: readonly ServiceDescriptorProto[];
    34    readonly extension: readonly FieldDescriptorProto[];
    35    readonly options:
    36      | FileOptions
    37      | undefined;
    38    /**
    39     * This field contains optional information about the original source code.
    40     * You may safely remove this entire field without harming runtime
    41     * functionality of the descriptors -- the information is needed only by
    42     * development tools.
    43     */
    44    readonly sourceCodeInfo:
    45      | SourceCodeInfo
    46      | undefined;
    47    /**
    48     * The syntax of the proto file.
    49     * The supported values are "proto2" and "proto3".
    50     */
    51    readonly syntax: string;
    52  }
    53  
    54  /** Describes a message type. */
    55  export interface DescriptorProto {
    56    readonly name: string;
    57    readonly field: readonly FieldDescriptorProto[];
    58    readonly extension: readonly FieldDescriptorProto[];
    59    readonly nestedType: readonly DescriptorProto[];
    60    readonly enumType: readonly EnumDescriptorProto[];
    61    readonly extensionRange: readonly DescriptorProto_ExtensionRange[];
    62    readonly oneofDecl: readonly OneofDescriptorProto[];
    63    readonly options: MessageOptions | undefined;
    64    readonly reservedRange: readonly DescriptorProto_ReservedRange[];
    65    /**
    66     * Reserved field names, which may not be used by fields in the same message.
    67     * A given name may only be reserved once.
    68     */
    69    readonly reservedName: readonly string[];
    70  }
    71  
    72  export interface DescriptorProto_ExtensionRange {
    73    /** Inclusive. */
    74    readonly start: number;
    75    /** Exclusive. */
    76    readonly end: number;
    77    readonly options: ExtensionRangeOptions | undefined;
    78  }
    79  
    80  /**
    81   * Range of reserved tag numbers. Reserved tag numbers may not be used by
    82   * fields or extension ranges in the same message. Reserved ranges may
    83   * not overlap.
    84   */
    85  export interface DescriptorProto_ReservedRange {
    86    /** Inclusive. */
    87    readonly start: number;
    88    /** Exclusive. */
    89    readonly end: number;
    90  }
    91  
    92  export interface ExtensionRangeOptions {
    93    /** The parser stores options it doesn't recognize here. See above. */
    94    readonly uninterpretedOption: readonly UninterpretedOption[];
    95  }
    96  
    97  /** Describes a field within a message. */
    98  export interface FieldDescriptorProto {
    99    readonly name: string;
   100    readonly number: number;
   101    readonly label: FieldDescriptorProto_Label;
   102    /**
   103     * If type_name is set, this need not be set.  If both this and type_name
   104     * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
   105     */
   106    readonly type: FieldDescriptorProto_Type;
   107    /**
   108     * For message and enum types, this is the name of the type.  If the name
   109     * starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
   110     * rules are used to find the type (i.e. first the nested types within this
   111     * message are searched, then within the parent, on up to the root
   112     * namespace).
   113     */
   114    readonly typeName: string;
   115    /**
   116     * For extensions, this is the name of the type being extended.  It is
   117     * resolved in the same manner as type_name.
   118     */
   119    readonly extendee: string;
   120    /**
   121     * For numeric types, contains the original text representation of the value.
   122     * For booleans, "true" or "false".
   123     * For strings, contains the default text contents (not escaped in any way).
   124     * For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
   125     */
   126    readonly defaultValue: string;
   127    /**
   128     * If set, gives the index of a oneof in the containing type's oneof_decl
   129     * list.  This field is a member of that oneof.
   130     */
   131    readonly oneofIndex: number;
   132    /**
   133     * JSON name of this field. The value is set by protocol compiler. If the
   134     * user has set a "json_name" option on this field, that option's value
   135     * will be used. Otherwise, it's deduced from the field's name by converting
   136     * it to camelCase.
   137     */
   138    readonly jsonName: string;
   139    readonly options:
   140      | FieldOptions
   141      | undefined;
   142    /**
   143     * If true, this is a proto3 "optional". When a proto3 field is optional, it
   144     * tracks presence regardless of field type.
   145     *
   146     * When proto3_optional is true, this field must be belong to a oneof to
   147     * signal to old proto3 clients that presence is tracked for this field. This
   148     * oneof is known as a "synthetic" oneof, and this field must be its sole
   149     * member (each proto3 optional field gets its own synthetic oneof). Synthetic
   150     * oneofs exist in the descriptor only, and do not generate any API. Synthetic
   151     * oneofs must be ordered after all "real" oneofs.
   152     *
   153     * For message fields, proto3_optional doesn't create any semantic change,
   154     * since non-repeated message fields always track presence. However it still
   155     * indicates the semantic detail of whether the user wrote "optional" or not.
   156     * This can be useful for round-tripping the .proto file. For consistency we
   157     * give message fields a synthetic oneof also, even though it is not required
   158     * to track presence. This is especially important because the parser can't
   159     * tell if a field is a message or an enum, so it must always create a
   160     * synthetic oneof.
   161     *
   162     * Proto2 optional fields do not set this flag, because they already indicate
   163     * optional with `LABEL_OPTIONAL`.
   164     */
   165    readonly proto3Optional: boolean;
   166  }
   167  
   168  export enum FieldDescriptorProto_Type {
   169    /**
   170     * DOUBLE - 0 is reserved for errors.
   171     * Order is weird for historical reasons.
   172     */
   173    DOUBLE = 1,
   174    FLOAT = 2,
   175    /**
   176     * INT64 - Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT64 if
   177     * negative values are likely.
   178     */
   179    INT64 = 3,
   180    UINT64 = 4,
   181    /**
   182     * INT32 - Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT32 if
   183     * negative values are likely.
   184     */
   185    INT32 = 5,
   186    FIXED64 = 6,
   187    FIXED32 = 7,
   188    BOOL = 8,
   189    STRING = 9,
   190    /**
   191     * GROUP - Tag-delimited aggregate.
   192     * Group type is deprecated and not supported in proto3. However, Proto3
   193     * implementations should still be able to parse the group wire format and
   194     * treat group fields as unknown fields.
   195     */
   196    GROUP = 10,
   197    /** MESSAGE - Length-delimited aggregate. */
   198    MESSAGE = 11,
   199    /** BYTES - New in version 2. */
   200    BYTES = 12,
   201    UINT32 = 13,
   202    ENUM = 14,
   203    SFIXED32 = 15,
   204    SFIXED64 = 16,
   205    /** SINT32 - Uses ZigZag encoding. */
   206    SINT32 = 17,
   207    /** SINT64 - Uses ZigZag encoding. */
   208    SINT64 = 18,
   209  }
   210  
   211  export function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type {
   212    switch (object) {
   213      case 1:
   214      case "TYPE_DOUBLE":
   215        return FieldDescriptorProto_Type.DOUBLE;
   216      case 2:
   217      case "TYPE_FLOAT":
   218        return FieldDescriptorProto_Type.FLOAT;
   219      case 3:
   220      case "TYPE_INT64":
   221        return FieldDescriptorProto_Type.INT64;
   222      case 4:
   223      case "TYPE_UINT64":
   224        return FieldDescriptorProto_Type.UINT64;
   225      case 5:
   226      case "TYPE_INT32":
   227        return FieldDescriptorProto_Type.INT32;
   228      case 6:
   229      case "TYPE_FIXED64":
   230        return FieldDescriptorProto_Type.FIXED64;
   231      case 7:
   232      case "TYPE_FIXED32":
   233        return FieldDescriptorProto_Type.FIXED32;
   234      case 8:
   235      case "TYPE_BOOL":
   236        return FieldDescriptorProto_Type.BOOL;
   237      case 9:
   238      case "TYPE_STRING":
   239        return FieldDescriptorProto_Type.STRING;
   240      case 10:
   241      case "TYPE_GROUP":
   242        return FieldDescriptorProto_Type.GROUP;
   243      case 11:
   244      case "TYPE_MESSAGE":
   245        return FieldDescriptorProto_Type.MESSAGE;
   246      case 12:
   247      case "TYPE_BYTES":
   248        return FieldDescriptorProto_Type.BYTES;
   249      case 13:
   250      case "TYPE_UINT32":
   251        return FieldDescriptorProto_Type.UINT32;
   252      case 14:
   253      case "TYPE_ENUM":
   254        return FieldDescriptorProto_Type.ENUM;
   255      case 15:
   256      case "TYPE_SFIXED32":
   257        return FieldDescriptorProto_Type.SFIXED32;
   258      case 16:
   259      case "TYPE_SFIXED64":
   260        return FieldDescriptorProto_Type.SFIXED64;
   261      case 17:
   262      case "TYPE_SINT32":
   263        return FieldDescriptorProto_Type.SINT32;
   264      case 18:
   265      case "TYPE_SINT64":
   266        return FieldDescriptorProto_Type.SINT64;
   267      default:
   268        throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type");
   269    }
   270  }
   271  
   272  export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string {
   273    switch (object) {
   274      case FieldDescriptorProto_Type.DOUBLE:
   275        return "TYPE_DOUBLE";
   276      case FieldDescriptorProto_Type.FLOAT:
   277        return "TYPE_FLOAT";
   278      case FieldDescriptorProto_Type.INT64:
   279        return "TYPE_INT64";
   280      case FieldDescriptorProto_Type.UINT64:
   281        return "TYPE_UINT64";
   282      case FieldDescriptorProto_Type.INT32:
   283        return "TYPE_INT32";
   284      case FieldDescriptorProto_Type.FIXED64:
   285        return "TYPE_FIXED64";
   286      case FieldDescriptorProto_Type.FIXED32:
   287        return "TYPE_FIXED32";
   288      case FieldDescriptorProto_Type.BOOL:
   289        return "TYPE_BOOL";
   290      case FieldDescriptorProto_Type.STRING:
   291        return "TYPE_STRING";
   292      case FieldDescriptorProto_Type.GROUP:
   293        return "TYPE_GROUP";
   294      case FieldDescriptorProto_Type.MESSAGE:
   295        return "TYPE_MESSAGE";
   296      case FieldDescriptorProto_Type.BYTES:
   297        return "TYPE_BYTES";
   298      case FieldDescriptorProto_Type.UINT32:
   299        return "TYPE_UINT32";
   300      case FieldDescriptorProto_Type.ENUM:
   301        return "TYPE_ENUM";
   302      case FieldDescriptorProto_Type.SFIXED32:
   303        return "TYPE_SFIXED32";
   304      case FieldDescriptorProto_Type.SFIXED64:
   305        return "TYPE_SFIXED64";
   306      case FieldDescriptorProto_Type.SINT32:
   307        return "TYPE_SINT32";
   308      case FieldDescriptorProto_Type.SINT64:
   309        return "TYPE_SINT64";
   310      default:
   311        throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type");
   312    }
   313  }
   314  
   315  export enum FieldDescriptorProto_Label {
   316    /** OPTIONAL - 0 is reserved for errors */
   317    OPTIONAL = 1,
   318    REQUIRED = 2,
   319    REPEATED = 3,
   320  }
   321  
   322  export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label {
   323    switch (object) {
   324      case 1:
   325      case "LABEL_OPTIONAL":
   326        return FieldDescriptorProto_Label.OPTIONAL;
   327      case 2:
   328      case "LABEL_REQUIRED":
   329        return FieldDescriptorProto_Label.REQUIRED;
   330      case 3:
   331      case "LABEL_REPEATED":
   332        return FieldDescriptorProto_Label.REPEATED;
   333      default:
   334        throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label");
   335    }
   336  }
   337  
   338  export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string {
   339    switch (object) {
   340      case FieldDescriptorProto_Label.OPTIONAL:
   341        return "LABEL_OPTIONAL";
   342      case FieldDescriptorProto_Label.REQUIRED:
   343        return "LABEL_REQUIRED";
   344      case FieldDescriptorProto_Label.REPEATED:
   345        return "LABEL_REPEATED";
   346      default:
   347        throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label");
   348    }
   349  }
   350  
   351  /** Describes a oneof. */
   352  export interface OneofDescriptorProto {
   353    readonly name: string;
   354    readonly options: OneofOptions | undefined;
   355  }
   356  
   357  /** Describes an enum type. */
   358  export interface EnumDescriptorProto {
   359    readonly name: string;
   360    readonly value: readonly EnumValueDescriptorProto[];
   361    readonly options:
   362      | EnumOptions
   363      | undefined;
   364    /**
   365     * Range of reserved numeric values. Reserved numeric values may not be used
   366     * by enum values in the same enum declaration. Reserved ranges may not
   367     * overlap.
   368     */
   369    readonly reservedRange: readonly EnumDescriptorProto_EnumReservedRange[];
   370    /**
   371     * Reserved enum value names, which may not be reused. A given name may only
   372     * be reserved once.
   373     */
   374    readonly reservedName: readonly string[];
   375  }
   376  
   377  /**
   378   * Range of reserved numeric values. Reserved values may not be used by
   379   * entries in the same enum. Reserved ranges may not overlap.
   380   *
   381   * Note that this is distinct from DescriptorProto.ReservedRange in that it
   382   * is inclusive such that it can appropriately represent the entire int32
   383   * domain.
   384   */
   385  export interface EnumDescriptorProto_EnumReservedRange {
   386    /** Inclusive. */
   387    readonly start: number;
   388    /** Inclusive. */
   389    readonly end: number;
   390  }
   391  
   392  /** Describes a value within an enum. */
   393  export interface EnumValueDescriptorProto {
   394    readonly name: string;
   395    readonly number: number;
   396    readonly options: EnumValueOptions | undefined;
   397  }
   398  
   399  /** Describes a service. */
   400  export interface ServiceDescriptorProto {
   401    readonly name: string;
   402    readonly method: readonly MethodDescriptorProto[];
   403    readonly options: ServiceOptions | undefined;
   404  }
   405  
   406  /** Describes a method of a service. */
   407  export interface MethodDescriptorProto {
   408    readonly name: string;
   409    /**
   410     * Input and output type names.  These are resolved in the same way as
   411     * FieldDescriptorProto.type_name, but must refer to a message type.
   412     */
   413    readonly inputType: string;
   414    readonly outputType: string;
   415    readonly options:
   416      | MethodOptions
   417      | undefined;
   418    /** Identifies if client streams multiple client messages */
   419    readonly clientStreaming: boolean;
   420    /** Identifies if server streams multiple server messages */
   421    readonly serverStreaming: boolean;
   422  }
   423  
   424  export interface FileOptions {
   425    /**
   426     * Sets the Java package where classes generated from this .proto will be
   427     * placed.  By default, the proto package is used, but this is often
   428     * inappropriate because proto packages do not normally start with backwards
   429     * domain names.
   430     */
   431    readonly javaPackage: string;
   432    /**
   433     * Controls the name of the wrapper Java class generated for the .proto file.
   434     * That class will always contain the .proto file's getDescriptor() method as
   435     * well as any top-level extensions defined in the .proto file.
   436     * If java_multiple_files is disabled, then all the other classes from the
   437     * .proto file will be nested inside the single wrapper outer class.
   438     */
   439    readonly javaOuterClassname: string;
   440    /**
   441     * If enabled, then the Java code generator will generate a separate .java
   442     * file for each top-level message, enum, and service defined in the .proto
   443     * file.  Thus, these types will *not* be nested inside the wrapper class
   444     * named by java_outer_classname.  However, the wrapper class will still be
   445     * generated to contain the file's getDescriptor() method as well as any
   446     * top-level extensions defined in the file.
   447     */
   448    readonly javaMultipleFiles: boolean;
   449    /**
   450     * This option does nothing.
   451     *
   452     * @deprecated
   453     */
   454    readonly javaGenerateEqualsAndHash: boolean;
   455    /**
   456     * If set true, then the Java2 code generator will generate code that
   457     * throws an exception whenever an attempt is made to assign a non-UTF-8
   458     * byte sequence to a string field.
   459     * Message reflection will do the same.
   460     * However, an extension field still accepts non-UTF-8 byte sequences.
   461     * This option has no effect on when used with the lite runtime.
   462     */
   463    readonly javaStringCheckUtf8: boolean;
   464    readonly optimizeFor: FileOptions_OptimizeMode;
   465    /**
   466     * Sets the Go package where structs generated from this .proto will be
   467     * placed. If omitted, the Go package will be derived from the following:
   468     *   - The basename of the package import path, if provided.
   469     *   - Otherwise, the package statement in the .proto file, if present.
   470     *   - Otherwise, the basename of the .proto file, without extension.
   471     */
   472    readonly goPackage: string;
   473    /**
   474     * Should generic services be generated in each language?  "Generic" services
   475     * are not specific to any particular RPC system.  They are generated by the
   476     * main code generators in each language (without additional plugins).
   477     * Generic services were the only kind of service generation supported by
   478     * early versions of google.protobuf.
   479     *
   480     * Generic services are now considered deprecated in favor of using plugins
   481     * that generate code specific to your particular RPC system.  Therefore,
   482     * these default to false.  Old code which depends on generic services should
   483     * explicitly set them to true.
   484     */
   485    readonly ccGenericServices: boolean;
   486    readonly javaGenericServices: boolean;
   487    readonly pyGenericServices: boolean;
   488    readonly phpGenericServices: boolean;
   489    /**
   490     * Is this file deprecated?
   491     * Depending on the target platform, this can emit Deprecated annotations
   492     * for everything in the file, or it will be completely ignored; in the very
   493     * least, this is a formalization for deprecating files.
   494     */
   495    readonly deprecated: boolean;
   496    /**
   497     * Enables the use of arenas for the proto messages in this file. This applies
   498     * only to generated classes for C++.
   499     */
   500    readonly ccEnableArenas: boolean;
   501    /**
   502     * Sets the objective c class prefix which is prepended to all objective c
   503     * generated classes from this .proto. There is no default.
   504     */
   505    readonly objcClassPrefix: string;
   506    /** Namespace for generated classes; defaults to the package. */
   507    readonly csharpNamespace: string;
   508    /**
   509     * By default Swift generators will take the proto package and CamelCase it
   510     * replacing '.' with underscore and use that to prefix the types/symbols
   511     * defined. When this options is provided, they will use this value instead
   512     * to prefix the types/symbols defined.
   513     */
   514    readonly swiftPrefix: string;
   515    /**
   516     * Sets the php class prefix which is prepended to all php generated classes
   517     * from this .proto. Default is empty.
   518     */
   519    readonly phpClassPrefix: string;
   520    /**
   521     * Use this option to change the namespace of php generated classes. Default
   522     * is empty. When this option is empty, the package name will be used for
   523     * determining the namespace.
   524     */
   525    readonly phpNamespace: string;
   526    /**
   527     * Use this option to change the namespace of php generated metadata classes.
   528     * Default is empty. When this option is empty, the proto file name will be
   529     * used for determining the namespace.
   530     */
   531    readonly phpMetadataNamespace: string;
   532    /**
   533     * Use this option to change the package of ruby generated classes. Default
   534     * is empty. When this option is not set, the package name will be used for
   535     * determining the ruby package.
   536     */
   537    readonly rubyPackage: string;
   538    /**
   539     * The parser stores options it doesn't recognize here.
   540     * See the documentation for the "Options" section above.
   541     */
   542    readonly uninterpretedOption: readonly UninterpretedOption[];
   543  }
   544  
   545  /** Generated classes can be optimized for speed or code size. */
   546  export enum FileOptions_OptimizeMode {
   547    /** SPEED - Generate complete code for parsing, serialization, */
   548    SPEED = 1,
   549    /** CODE_SIZE - etc. */
   550    CODE_SIZE = 2,
   551    /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */
   552    LITE_RUNTIME = 3,
   553  }
   554  
   555  export function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode {
   556    switch (object) {
   557      case 1:
   558      case "SPEED":
   559        return FileOptions_OptimizeMode.SPEED;
   560      case 2:
   561      case "CODE_SIZE":
   562        return FileOptions_OptimizeMode.CODE_SIZE;
   563      case 3:
   564      case "LITE_RUNTIME":
   565        return FileOptions_OptimizeMode.LITE_RUNTIME;
   566      default:
   567        throw new globalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode");
   568    }
   569  }
   570  
   571  export function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string {
   572    switch (object) {
   573      case FileOptions_OptimizeMode.SPEED:
   574        return "SPEED";
   575      case FileOptions_OptimizeMode.CODE_SIZE:
   576        return "CODE_SIZE";
   577      case FileOptions_OptimizeMode.LITE_RUNTIME:
   578        return "LITE_RUNTIME";
   579      default:
   580        throw new globalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode");
   581    }
   582  }
   583  
   584  export interface MessageOptions {
   585    /**
   586     * Set true to use the old proto1 MessageSet wire format for extensions.
   587     * This is provided for backwards-compatibility with the MessageSet wire
   588     * format.  You should not use this for any other reason:  It's less
   589     * efficient, has fewer features, and is more complicated.
   590     *
   591     * The message must be defined exactly as follows:
   592     *   message Foo {
   593     *     option message_set_wire_format = true;
   594     *     extensions 4 to max;
   595     *   }
   596     * Note that the message cannot have any defined fields; MessageSets only
   597     * have extensions.
   598     *
   599     * All extensions of your type must be singular messages; e.g. they cannot
   600     * be int32s, enums, or repeated messages.
   601     *
   602     * Because this is an option, the above two restrictions are not enforced by
   603     * the protocol compiler.
   604     */
   605    readonly messageSetWireFormat: boolean;
   606    /**
   607     * Disables the generation of the standard "descriptor()" accessor, which can
   608     * conflict with a field of the same name.  This is meant to make migration
   609     * from proto1 easier; new code should avoid fields named "descriptor".
   610     */
   611    readonly noStandardDescriptorAccessor: boolean;
   612    /**
   613     * Is this message deprecated?
   614     * Depending on the target platform, this can emit Deprecated annotations
   615     * for the message, or it will be completely ignored; in the very least,
   616     * this is a formalization for deprecating messages.
   617     */
   618    readonly deprecated: boolean;
   619    /**
   620     * Whether the message is an automatically generated map entry type for the
   621     * maps field.
   622     *
   623     * For maps fields:
   624     *     map<KeyType, ValueType> map_field = 1;
   625     * The parsed descriptor looks like:
   626     *     message MapFieldEntry {
   627     *         option map_entry = true;
   628     *         optional KeyType key = 1;
   629     *         optional ValueType value = 2;
   630     *     }
   631     *     repeated MapFieldEntry map_field = 1;
   632     *
   633     * Implementations may choose not to generate the map_entry=true message, but
   634     * use a native map in the target language to hold the keys and values.
   635     * The reflection APIs in such implementations still need to work as
   636     * if the field is a repeated message field.
   637     *
   638     * NOTE: Do not set the option in .proto files. Always use the maps syntax
   639     * instead. The option should only be implicitly set by the proto compiler
   640     * parser.
   641     */
   642    readonly mapEntry: boolean;
   643    /** The parser stores options it doesn't recognize here. See above. */
   644    readonly uninterpretedOption: readonly UninterpretedOption[];
   645  }
   646  
   647  export interface FieldOptions {
   648    /**
   649     * The ctype option instructs the C++ code generator to use a different
   650     * representation of the field than it normally would.  See the specific
   651     * options below.  This option is not yet implemented in the open source
   652     * release -- sorry, we'll try to include it in a future version!
   653     */
   654    readonly ctype: FieldOptions_CType;
   655    /**
   656     * The packed option can be enabled for repeated primitive fields to enable
   657     * a more efficient representation on the wire. Rather than repeatedly
   658     * writing the tag and type for each element, the entire array is encoded as
   659     * a single length-delimited blob. In proto3, only explicit setting it to
   660     * false will avoid using packed encoding.
   661     */
   662    readonly packed: boolean;
   663    /**
   664     * The jstype option determines the JavaScript type used for values of the
   665     * field.  The option is permitted only for 64 bit integral and fixed types
   666     * (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING
   667     * is represented as JavaScript string, which avoids loss of precision that
   668     * can happen when a large value is converted to a floating point JavaScript.
   669     * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
   670     * use the JavaScript "number" type.  The behavior of the default option
   671     * JS_NORMAL is implementation dependent.
   672     *
   673     * This option is an enum to permit additional types to be added, e.g.
   674     * goog.math.Integer.
   675     */
   676    readonly jstype: FieldOptions_JSType;
   677    /**
   678     * Should this field be parsed lazily?  Lazy applies only to message-type
   679     * fields.  It means that when the outer message is initially parsed, the
   680     * inner message's contents will not be parsed but instead stored in encoded
   681     * form.  The inner message will actually be parsed when it is first accessed.
   682     *
   683     * This is only a hint.  Implementations are free to choose whether to use
   684     * eager or lazy parsing regardless of the value of this option.  However,
   685     * setting this option true suggests that the protocol author believes that
   686     * using lazy parsing on this field is worth the additional bookkeeping
   687     * overhead typically needed to implement it.
   688     *
   689     * This option does not affect the public interface of any generated code;
   690     * all method signatures remain the same.  Furthermore, thread-safety of the
   691     * interface is not affected by this option; const methods remain safe to
   692     * call from multiple threads concurrently, while non-const methods continue
   693     * to require exclusive access.
   694     *
   695     * Note that implementations may choose not to check required fields within
   696     * a lazy sub-message.  That is, calling IsInitialized() on the outer message
   697     * may return true even if the inner message has missing required fields.
   698     * This is necessary because otherwise the inner message would have to be
   699     * parsed in order to perform the check, defeating the purpose of lazy
   700     * parsing.  An implementation which chooses not to check required fields
   701     * must be consistent about it.  That is, for any particular sub-message, the
   702     * implementation must either *always* check its required fields, or *never*
   703     * check its required fields, regardless of whether or not the message has
   704     * been parsed.
   705     *
   706     * As of 2021, lazy does no correctness checks on the byte stream during
   707     * parsing.  This may lead to crashes if and when an invalid byte stream is
   708     * finally parsed upon access.
   709     *
   710     * TODO(b/211906113):  Enable validation on lazy fields.
   711     */
   712    readonly lazy: boolean;
   713    /**
   714     * unverified_lazy does no correctness checks on the byte stream. This should
   715     * only be used where lazy with verification is prohibitive for performance
   716     * reasons.
   717     */
   718    readonly unverifiedLazy: boolean;
   719    /**
   720     * Is this field deprecated?
   721     * Depending on the target platform, this can emit Deprecated annotations
   722     * for accessors, or it will be completely ignored; in the very least, this
   723     * is a formalization for deprecating fields.
   724     */
   725    readonly deprecated: boolean;
   726    /** For Google-internal migration only. Do not use. */
   727    readonly weak: boolean;
   728    /** The parser stores options it doesn't recognize here. See above. */
   729    readonly uninterpretedOption: readonly UninterpretedOption[];
   730  }
   731  
   732  export enum FieldOptions_CType {
   733    /** STRING - Default mode. */
   734    STRING = 0,
   735    CORD = 1,
   736    STRING_PIECE = 2,
   737  }
   738  
   739  export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType {
   740    switch (object) {
   741      case 0:
   742      case "STRING":
   743        return FieldOptions_CType.STRING;
   744      case 1:
   745      case "CORD":
   746        return FieldOptions_CType.CORD;
   747      case 2:
   748      case "STRING_PIECE":
   749        return FieldOptions_CType.STRING_PIECE;
   750      default:
   751        throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType");
   752    }
   753  }
   754  
   755  export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string {
   756    switch (object) {
   757      case FieldOptions_CType.STRING:
   758        return "STRING";
   759      case FieldOptions_CType.CORD:
   760        return "CORD";
   761      case FieldOptions_CType.STRING_PIECE:
   762        return "STRING_PIECE";
   763      default:
   764        throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType");
   765    }
   766  }
   767  
   768  export enum FieldOptions_JSType {
   769    /** JS_NORMAL - Use the default type. */
   770    JS_NORMAL = 0,
   771    /** JS_STRING - Use JavaScript strings. */
   772    JS_STRING = 1,
   773    /** JS_NUMBER - Use JavaScript numbers. */
   774    JS_NUMBER = 2,
   775  }
   776  
   777  export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType {
   778    switch (object) {
   779      case 0:
   780      case "JS_NORMAL":
   781        return FieldOptions_JSType.JS_NORMAL;
   782      case 1:
   783      case "JS_STRING":
   784        return FieldOptions_JSType.JS_STRING;
   785      case 2:
   786      case "JS_NUMBER":
   787        return FieldOptions_JSType.JS_NUMBER;
   788      default:
   789        throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType");
   790    }
   791  }
   792  
   793  export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string {
   794    switch (object) {
   795      case FieldOptions_JSType.JS_NORMAL:
   796        return "JS_NORMAL";
   797      case FieldOptions_JSType.JS_STRING:
   798        return "JS_STRING";
   799      case FieldOptions_JSType.JS_NUMBER:
   800        return "JS_NUMBER";
   801      default:
   802        throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType");
   803    }
   804  }
   805  
   806  export interface OneofOptions {
   807    /** The parser stores options it doesn't recognize here. See above. */
   808    readonly uninterpretedOption: readonly UninterpretedOption[];
   809  }
   810  
   811  export interface EnumOptions {
   812    /**
   813     * Set this option to true to allow mapping different tag names to the same
   814     * value.
   815     */
   816    readonly allowAlias: boolean;
   817    /**
   818     * Is this enum deprecated?
   819     * Depending on the target platform, this can emit Deprecated annotations
   820     * for the enum, or it will be completely ignored; in the very least, this
   821     * is a formalization for deprecating enums.
   822     */
   823    readonly deprecated: boolean;
   824    /** The parser stores options it doesn't recognize here. See above. */
   825    readonly uninterpretedOption: readonly UninterpretedOption[];
   826  }
   827  
   828  export interface EnumValueOptions {
   829    /**
   830     * Is this enum value deprecated?
   831     * Depending on the target platform, this can emit Deprecated annotations
   832     * for the enum value, or it will be completely ignored; in the very least,
   833     * this is a formalization for deprecating enum values.
   834     */
   835    readonly deprecated: boolean;
   836    /** The parser stores options it doesn't recognize here. See above. */
   837    readonly uninterpretedOption: readonly UninterpretedOption[];
   838  }
   839  
   840  export interface ServiceOptions {
   841    /**
   842     * Is this service deprecated?
   843     * Depending on the target platform, this can emit Deprecated annotations
   844     * for the service, or it will be completely ignored; in the very least,
   845     * this is a formalization for deprecating services.
   846     */
   847    readonly deprecated: boolean;
   848    /** The parser stores options it doesn't recognize here. See above. */
   849    readonly uninterpretedOption: readonly UninterpretedOption[];
   850  }
   851  
   852  export interface MethodOptions {
   853    /**
   854     * Is this method deprecated?
   855     * Depending on the target platform, this can emit Deprecated annotations
   856     * for the method, or it will be completely ignored; in the very least,
   857     * this is a formalization for deprecating methods.
   858     */
   859    readonly deprecated: boolean;
   860    readonly idempotencyLevel: MethodOptions_IdempotencyLevel;
   861    /** The parser stores options it doesn't recognize here. See above. */
   862    readonly uninterpretedOption: readonly UninterpretedOption[];
   863  }
   864  
   865  /**
   866   * Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
   867   * or neither? HTTP based RPC implementation may choose GET verb for safe
   868   * methods, and PUT verb for idempotent methods instead of the default POST.
   869   */
   870  export enum MethodOptions_IdempotencyLevel {
   871    IDEMPOTENCY_UNKNOWN = 0,
   872    /** NO_SIDE_EFFECTS - implies idempotent */
   873    NO_SIDE_EFFECTS = 1,
   874    /** IDEMPOTENT - idempotent, but may have side effects */
   875    IDEMPOTENT = 2,
   876  }
   877  
   878  export function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel {
   879    switch (object) {
   880      case 0:
   881      case "IDEMPOTENCY_UNKNOWN":
   882        return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN;
   883      case 1:
   884      case "NO_SIDE_EFFECTS":
   885        return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS;
   886      case 2:
   887      case "IDEMPOTENT":
   888        return MethodOptions_IdempotencyLevel.IDEMPOTENT;
   889      default:
   890        throw new globalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel");
   891    }
   892  }
   893  
   894  export function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string {
   895    switch (object) {
   896      case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN:
   897        return "IDEMPOTENCY_UNKNOWN";
   898      case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS:
   899        return "NO_SIDE_EFFECTS";
   900      case MethodOptions_IdempotencyLevel.IDEMPOTENT:
   901        return "IDEMPOTENT";
   902      default:
   903        throw new globalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel");
   904    }
   905  }
   906  
   907  /**
   908   * A message representing a option the parser does not recognize. This only
   909   * appears in options protos created by the compiler::Parser class.
   910   * DescriptorPool resolves these when building Descriptor objects. Therefore,
   911   * options protos in descriptor objects (e.g. returned by Descriptor::options(),
   912   * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
   913   * in them.
   914   */
   915  export interface UninterpretedOption {
   916    readonly name: readonly UninterpretedOption_NamePart[];
   917    /**
   918     * The value of the uninterpreted option, in whatever type the tokenizer
   919     * identified it as during parsing. Exactly one of these should be set.
   920     */
   921    readonly identifierValue: string;
   922    readonly positiveIntValue: string;
   923    readonly negativeIntValue: string;
   924    readonly doubleValue: number;
   925    readonly stringValue: Uint8Array;
   926    readonly aggregateValue: string;
   927  }
   928  
   929  /**
   930   * The name of the uninterpreted option.  Each string represents a segment in
   931   * a dot-separated name.  is_extension is true iff a segment represents an
   932   * extension (denoted with parentheses in options specs in .proto files).
   933   * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
   934   * "foo.(bar.baz).moo".
   935   */
   936  export interface UninterpretedOption_NamePart {
   937    readonly namePart: string;
   938    readonly isExtension: boolean;
   939  }
   940  
   941  /**
   942   * Encapsulates information about the original source file from which a
   943   * FileDescriptorProto was generated.
   944   */
   945  export interface SourceCodeInfo {
   946    /**
   947     * A Location identifies a piece of source code in a .proto file which
   948     * corresponds to a particular definition.  This information is intended
   949     * to be useful to IDEs, code indexers, documentation generators, and similar
   950     * tools.
   951     *
   952     * For example, say we have a file like:
   953     *   message Foo {
   954     *     optional string foo = 1;
   955     *   }
   956     * Let's look at just the field definition:
   957     *   optional string foo = 1;
   958     *   ^       ^^     ^^  ^  ^^^
   959     *   a       bc     de  f  ghi
   960     * We have the following locations:
   961     *   span   path               represents
   962     *   [a,i)  [ 4, 0, 2, 0 ]     The whole field definition.
   963     *   [a,b)  [ 4, 0, 2, 0, 4 ]  The label (optional).
   964     *   [c,d)  [ 4, 0, 2, 0, 5 ]  The type (string).
   965     *   [e,f)  [ 4, 0, 2, 0, 1 ]  The name (foo).
   966     *   [g,h)  [ 4, 0, 2, 0, 3 ]  The number (1).
   967     *
   968     * Notes:
   969     * - A location may refer to a repeated field itself (i.e. not to any
   970     *   particular index within it).  This is used whenever a set of elements are
   971     *   logically enclosed in a single code segment.  For example, an entire
   972     *   extend block (possibly containing multiple extension definitions) will
   973     *   have an outer location whose path refers to the "extensions" repeated
   974     *   field without an index.
   975     * - Multiple locations may have the same path.  This happens when a single
   976     *   logical declaration is spread out across multiple places.  The most
   977     *   obvious example is the "extend" block again -- there may be multiple
   978     *   extend blocks in the same scope, each of which will have the same path.
   979     * - A location's span is not always a subset of its parent's span.  For
   980     *   example, the "extendee" of an extension declaration appears at the
   981     *   beginning of the "extend" block and is shared by all extensions within
   982     *   the block.
   983     * - Just because a location's span is a subset of some other location's span
   984     *   does not mean that it is a descendant.  For example, a "group" defines
   985     *   both a type and a field in a single declaration.  Thus, the locations
   986     *   corresponding to the type and field and their components will overlap.
   987     * - Code which tries to interpret locations should probably be designed to
   988     *   ignore those that it doesn't understand, as more types of locations could
   989     *   be recorded in the future.
   990     */
   991    readonly location: readonly SourceCodeInfo_Location[];
   992  }
   993  
   994  export interface SourceCodeInfo_Location {
   995    /**
   996     * Identifies which part of the FileDescriptorProto was defined at this
   997     * location.
   998     *
   999     * Each element is a field number or an index.  They form a path from
  1000     * the root FileDescriptorProto to the place where the definition occurs.
  1001     * For example, this path:
  1002     *   [ 4, 3, 2, 7, 1 ]
  1003     * refers to:
  1004     *   file.message_type(3)  // 4, 3
  1005     *       .field(7)         // 2, 7
  1006     *       .name()           // 1
  1007     * This is because FileDescriptorProto.message_type has field number 4:
  1008     *   repeated DescriptorProto message_type = 4;
  1009     * and DescriptorProto.field has field number 2:
  1010     *   repeated FieldDescriptorProto field = 2;
  1011     * and FieldDescriptorProto.name has field number 1:
  1012     *   optional string name = 1;
  1013     *
  1014     * Thus, the above path gives the location of a field name.  If we removed
  1015     * the last element:
  1016     *   [ 4, 3, 2, 7 ]
  1017     * this path refers to the whole field declaration (from the beginning
  1018     * of the label to the terminating semicolon).
  1019     */
  1020    readonly path: readonly number[];
  1021    /**
  1022     * Always has exactly three or four elements: start line, start column,
  1023     * end line (optional, otherwise assumed same as start line), end column.
  1024     * These are packed into a single field for efficiency.  Note that line
  1025     * and column numbers are zero-based -- typically you will want to add
  1026     * 1 to each before displaying to a user.
  1027     */
  1028    readonly span: readonly number[];
  1029    /**
  1030     * If this SourceCodeInfo represents a complete declaration, these are any
  1031     * comments appearing before and after the declaration which appear to be
  1032     * attached to the declaration.
  1033     *
  1034     * A series of line comments appearing on consecutive lines, with no other
  1035     * tokens appearing on those lines, will be treated as a single comment.
  1036     *
  1037     * leading_detached_comments will keep paragraphs of comments that appear
  1038     * before (but not connected to) the current element. Each paragraph,
  1039     * separated by empty lines, will be one comment element in the repeated
  1040     * field.
  1041     *
  1042     * Only the comment content is provided; comment markers (e.g. //) are
  1043     * stripped out.  For block comments, leading whitespace and an asterisk
  1044     * will be stripped from the beginning of each line other than the first.
  1045     * Newlines are included in the output.
  1046     *
  1047     * Examples:
  1048     *
  1049     *   optional int32 foo = 1;  // Comment attached to foo.
  1050     *   // Comment attached to bar.
  1051     *   optional int32 bar = 2;
  1052     *
  1053     *   optional string baz = 3;
  1054     *   // Comment attached to baz.
  1055     *   // Another line attached to baz.
  1056     *
  1057     *   // Comment attached to moo.
  1058     *   //
  1059     *   // Another line attached to moo.
  1060     *   optional double moo = 4;
  1061     *
  1062     *   // Detached comment for corge. This is not leading or trailing comments
  1063     *   // to moo or corge because there are blank lines separating it from
  1064     *   // both.
  1065     *
  1066     *   // Detached comment for corge paragraph 2.
  1067     *
  1068     *   optional string corge = 5;
  1069     *   /* Block comment attached
  1070     *    * to corge.  Leading asterisks
  1071     *    * will be removed. * /
  1072     *   /* Block comment attached to
  1073     *    * grault. * /
  1074     *   optional int32 grault = 6;
  1075     *
  1076     *   // ignored detached comments.
  1077     */
  1078    readonly leadingComments: string;
  1079    readonly trailingComments: string;
  1080    readonly leadingDetachedComments: readonly string[];
  1081  }
  1082  
  1083  /**
  1084   * Describes the relationship between generated code and its original source
  1085   * file. A GeneratedCodeInfo message is associated with only one generated
  1086   * source file, but may contain references to different source .proto files.
  1087   */
  1088  export interface GeneratedCodeInfo {
  1089    /**
  1090     * An Annotation connects some span of text in generated code to an element
  1091     * of its generating .proto file.
  1092     */
  1093    readonly annotation: readonly GeneratedCodeInfo_Annotation[];
  1094  }
  1095  
  1096  export interface GeneratedCodeInfo_Annotation {
  1097    /**
  1098     * Identifies the element in the original source .proto file. This field
  1099     * is formatted the same as SourceCodeInfo.Location.path.
  1100     */
  1101    readonly path: readonly number[];
  1102    /** Identifies the filesystem path to the original source .proto. */
  1103    readonly sourceFile: string;
  1104    /**
  1105     * Identifies the starting offset in bytes in the generated code
  1106     * that relates to the identified object.
  1107     */
  1108    readonly begin: number;
  1109    /**
  1110     * Identifies the ending offset in bytes in the generated code that
  1111     * relates to the identified offset. The end offset should be one past
  1112     * the last relevant byte (so the length of the text = end - begin).
  1113     */
  1114    readonly end: number;
  1115  }
  1116  
  1117  function createBaseFileDescriptorSet(): FileDescriptorSet {
  1118    return { file: [] };
  1119  }
  1120  
  1121  export const FileDescriptorSet = {
  1122    encode(message: FileDescriptorSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  1123      for (const v of message.file) {
  1124        FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim();
  1125      }
  1126      return writer;
  1127    },
  1128  
  1129    decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorSet {
  1130      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  1131      let end = length === undefined ? reader.len : reader.pos + length;
  1132      const message = createBaseFileDescriptorSet() as any;
  1133      while (reader.pos < end) {
  1134        const tag = reader.uint32();
  1135        switch (tag >>> 3) {
  1136          case 1:
  1137            if (tag !== 10) {
  1138              break;
  1139            }
  1140  
  1141            message.file.push(FileDescriptorProto.decode(reader, reader.uint32()));
  1142            continue;
  1143        }
  1144        if ((tag & 7) === 4 || tag === 0) {
  1145          break;
  1146        }
  1147        reader.skipType(tag & 7);
  1148      }
  1149      return message;
  1150    },
  1151  
  1152    fromJSON(object: any): FileDescriptorSet {
  1153      return {
  1154        file: globalThis.Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) : [],
  1155      };
  1156    },
  1157  
  1158    toJSON(message: FileDescriptorSet): unknown {
  1159      const obj: any = {};
  1160      if (message.file?.length) {
  1161        obj.file = message.file.map((e) => FileDescriptorProto.toJSON(e));
  1162      }
  1163      return obj;
  1164    },
  1165  
  1166    create<I extends Exact<DeepPartial<FileDescriptorSet>, I>>(base?: I): FileDescriptorSet {
  1167      return FileDescriptorSet.fromPartial(base ?? ({} as any));
  1168    },
  1169    fromPartial<I extends Exact<DeepPartial<FileDescriptorSet>, I>>(object: I): FileDescriptorSet {
  1170      const message = createBaseFileDescriptorSet() as any;
  1171      message.file = object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || [];
  1172      return message;
  1173    },
  1174  };
  1175  
  1176  function createBaseFileDescriptorProto(): FileDescriptorProto {
  1177    return {
  1178      name: "",
  1179      package: "",
  1180      dependency: [],
  1181      publicDependency: [],
  1182      weakDependency: [],
  1183      messageType: [],
  1184      enumType: [],
  1185      service: [],
  1186      extension: [],
  1187      options: undefined,
  1188      sourceCodeInfo: undefined,
  1189      syntax: "",
  1190    };
  1191  }
  1192  
  1193  export const FileDescriptorProto = {
  1194    encode(message: FileDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  1195      if (message.name !== "") {
  1196        writer.uint32(10).string(message.name);
  1197      }
  1198      if (message.package !== "") {
  1199        writer.uint32(18).string(message.package);
  1200      }
  1201      for (const v of message.dependency) {
  1202        writer.uint32(26).string(v!);
  1203      }
  1204      writer.uint32(82).fork();
  1205      for (const v of message.publicDependency) {
  1206        writer.int32(v);
  1207      }
  1208      writer.ldelim();
  1209      writer.uint32(90).fork();
  1210      for (const v of message.weakDependency) {
  1211        writer.int32(v);
  1212      }
  1213      writer.ldelim();
  1214      for (const v of message.messageType) {
  1215        DescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim();
  1216      }
  1217      for (const v of message.enumType) {
  1218        EnumDescriptorProto.encode(v!, writer.uint32(42).fork()).ldelim();
  1219      }
  1220      for (const v of message.service) {
  1221        ServiceDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim();
  1222      }
  1223      for (const v of message.extension) {
  1224        FieldDescriptorProto.encode(v!, writer.uint32(58).fork()).ldelim();
  1225      }
  1226      if (message.options !== undefined) {
  1227        FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim();
  1228      }
  1229      if (message.sourceCodeInfo !== undefined) {
  1230        SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim();
  1231      }
  1232      if (message.syntax !== "") {
  1233        writer.uint32(98).string(message.syntax);
  1234      }
  1235      return writer;
  1236    },
  1237  
  1238    decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorProto {
  1239      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  1240      let end = length === undefined ? reader.len : reader.pos + length;
  1241      const message = createBaseFileDescriptorProto() as any;
  1242      while (reader.pos < end) {
  1243        const tag = reader.uint32();
  1244        switch (tag >>> 3) {
  1245          case 1:
  1246            if (tag !== 10) {
  1247              break;
  1248            }
  1249  
  1250            message.name = reader.string();
  1251            continue;
  1252          case 2:
  1253            if (tag !== 18) {
  1254              break;
  1255            }
  1256  
  1257            message.package = reader.string();
  1258            continue;
  1259          case 3:
  1260            if (tag !== 26) {
  1261              break;
  1262            }
  1263  
  1264            message.dependency.push(reader.string());
  1265            continue;
  1266          case 10:
  1267            if (tag === 80) {
  1268              message.publicDependency.push(reader.int32());
  1269  
  1270              continue;
  1271            }
  1272  
  1273            if (tag === 82) {
  1274              const end2 = reader.uint32() + reader.pos;
  1275              while (reader.pos < end2) {
  1276                message.publicDependency.push(reader.int32());
  1277              }
  1278  
  1279              continue;
  1280            }
  1281  
  1282            break;
  1283          case 11:
  1284            if (tag === 88) {
  1285              message.weakDependency.push(reader.int32());
  1286  
  1287              continue;
  1288            }
  1289  
  1290            if (tag === 90) {
  1291              const end2 = reader.uint32() + reader.pos;
  1292              while (reader.pos < end2) {
  1293                message.weakDependency.push(reader.int32());
  1294              }
  1295  
  1296              continue;
  1297            }
  1298  
  1299            break;
  1300          case 4:
  1301            if (tag !== 34) {
  1302              break;
  1303            }
  1304  
  1305            message.messageType.push(DescriptorProto.decode(reader, reader.uint32()));
  1306            continue;
  1307          case 5:
  1308            if (tag !== 42) {
  1309              break;
  1310            }
  1311  
  1312            message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32()));
  1313            continue;
  1314          case 6:
  1315            if (tag !== 50) {
  1316              break;
  1317            }
  1318  
  1319            message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32()));
  1320            continue;
  1321          case 7:
  1322            if (tag !== 58) {
  1323              break;
  1324            }
  1325  
  1326            message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32()));
  1327            continue;
  1328          case 8:
  1329            if (tag !== 66) {
  1330              break;
  1331            }
  1332  
  1333            message.options = FileOptions.decode(reader, reader.uint32());
  1334            continue;
  1335          case 9:
  1336            if (tag !== 74) {
  1337              break;
  1338            }
  1339  
  1340            message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32());
  1341            continue;
  1342          case 12:
  1343            if (tag !== 98) {
  1344              break;
  1345            }
  1346  
  1347            message.syntax = reader.string();
  1348            continue;
  1349        }
  1350        if ((tag & 7) === 4 || tag === 0) {
  1351          break;
  1352        }
  1353        reader.skipType(tag & 7);
  1354      }
  1355      return message;
  1356    },
  1357  
  1358    fromJSON(object: any): FileDescriptorProto {
  1359      return {
  1360        name: isSet(object.name) ? globalThis.String(object.name) : "",
  1361        package: isSet(object.package) ? globalThis.String(object.package) : "",
  1362        dependency: globalThis.Array.isArray(object?.dependency)
  1363          ? object.dependency.map((e: any) => globalThis.String(e))
  1364          : [],
  1365        publicDependency: globalThis.Array.isArray(object?.publicDependency)
  1366          ? object.publicDependency.map((e: any) => globalThis.Number(e))
  1367          : [],
  1368        weakDependency: globalThis.Array.isArray(object?.weakDependency)
  1369          ? object.weakDependency.map((e: any) => globalThis.Number(e))
  1370          : [],
  1371        messageType: globalThis.Array.isArray(object?.messageType)
  1372          ? object.messageType.map((e: any) => DescriptorProto.fromJSON(e))
  1373          : [],
  1374        enumType: globalThis.Array.isArray(object?.enumType)
  1375          ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e))
  1376          : [],
  1377        service: globalThis.Array.isArray(object?.service)
  1378          ? object.service.map((e: any) => ServiceDescriptorProto.fromJSON(e))
  1379          : [],
  1380        extension: globalThis.Array.isArray(object?.extension)
  1381          ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e))
  1382          : [],
  1383        options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,
  1384        sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,
  1385        syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : "",
  1386      };
  1387    },
  1388  
  1389    toJSON(message: FileDescriptorProto): unknown {
  1390      const obj: any = {};
  1391      if (message.name !== "") {
  1392        obj.name = message.name;
  1393      }
  1394      if (message.package !== "") {
  1395        obj.package = message.package;
  1396      }
  1397      if (message.dependency?.length) {
  1398        obj.dependency = message.dependency;
  1399      }
  1400      if (message.publicDependency?.length) {
  1401        obj.publicDependency = message.publicDependency.map((e) => Math.round(e));
  1402      }
  1403      if (message.weakDependency?.length) {
  1404        obj.weakDependency = message.weakDependency.map((e) => Math.round(e));
  1405      }
  1406      if (message.messageType?.length) {
  1407        obj.messageType = message.messageType.map((e) => DescriptorProto.toJSON(e));
  1408      }
  1409      if (message.enumType?.length) {
  1410        obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e));
  1411      }
  1412      if (message.service?.length) {
  1413        obj.service = message.service.map((e) => ServiceDescriptorProto.toJSON(e));
  1414      }
  1415      if (message.extension?.length) {
  1416        obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e));
  1417      }
  1418      if (message.options !== undefined) {
  1419        obj.options = FileOptions.toJSON(message.options);
  1420      }
  1421      if (message.sourceCodeInfo !== undefined) {
  1422        obj.sourceCodeInfo = SourceCodeInfo.toJSON(message.sourceCodeInfo);
  1423      }
  1424      if (message.syntax !== "") {
  1425        obj.syntax = message.syntax;
  1426      }
  1427      return obj;
  1428    },
  1429  
  1430    create<I extends Exact<DeepPartial<FileDescriptorProto>, I>>(base?: I): FileDescriptorProto {
  1431      return FileDescriptorProto.fromPartial(base ?? ({} as any));
  1432    },
  1433    fromPartial<I extends Exact<DeepPartial<FileDescriptorProto>, I>>(object: I): FileDescriptorProto {
  1434      const message = createBaseFileDescriptorProto() as any;
  1435      message.name = object.name ?? "";
  1436      message.package = object.package ?? "";
  1437      message.dependency = object.dependency?.map((e) => e) || [];
  1438      message.publicDependency = object.publicDependency?.map((e) => e) || [];
  1439      message.weakDependency = object.weakDependency?.map((e) => e) || [];
  1440      message.messageType = object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || [];
  1441      message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || [];
  1442      message.service = object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || [];
  1443      message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || [];
  1444      message.options = (object.options !== undefined && object.options !== null)
  1445        ? FileOptions.fromPartial(object.options)
  1446        : undefined;
  1447      message.sourceCodeInfo = (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null)
  1448        ? SourceCodeInfo.fromPartial(object.sourceCodeInfo)
  1449        : undefined;
  1450      message.syntax = object.syntax ?? "";
  1451      return message;
  1452    },
  1453  };
  1454  
  1455  function createBaseDescriptorProto(): DescriptorProto {
  1456    return {
  1457      name: "",
  1458      field: [],
  1459      extension: [],
  1460      nestedType: [],
  1461      enumType: [],
  1462      extensionRange: [],
  1463      oneofDecl: [],
  1464      options: undefined,
  1465      reservedRange: [],
  1466      reservedName: [],
  1467    };
  1468  }
  1469  
  1470  export const DescriptorProto = {
  1471    encode(message: DescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  1472      if (message.name !== "") {
  1473        writer.uint32(10).string(message.name);
  1474      }
  1475      for (const v of message.field) {
  1476        FieldDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim();
  1477      }
  1478      for (const v of message.extension) {
  1479        FieldDescriptorProto.encode(v!, writer.uint32(50).fork()).ldelim();
  1480      }
  1481      for (const v of message.nestedType) {
  1482        DescriptorProto.encode(v!, writer.uint32(26).fork()).ldelim();
  1483      }
  1484      for (const v of message.enumType) {
  1485        EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim();
  1486      }
  1487      for (const v of message.extensionRange) {
  1488        DescriptorProto_ExtensionRange.encode(v!, writer.uint32(42).fork()).ldelim();
  1489      }
  1490      for (const v of message.oneofDecl) {
  1491        OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim();
  1492      }
  1493      if (message.options !== undefined) {
  1494        MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim();
  1495      }
  1496      for (const v of message.reservedRange) {
  1497        DescriptorProto_ReservedRange.encode(v!, writer.uint32(74).fork()).ldelim();
  1498      }
  1499      for (const v of message.reservedName) {
  1500        writer.uint32(82).string(v!);
  1501      }
  1502      return writer;
  1503    },
  1504  
  1505    decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto {
  1506      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  1507      let end = length === undefined ? reader.len : reader.pos + length;
  1508      const message = createBaseDescriptorProto() as any;
  1509      while (reader.pos < end) {
  1510        const tag = reader.uint32();
  1511        switch (tag >>> 3) {
  1512          case 1:
  1513            if (tag !== 10) {
  1514              break;
  1515            }
  1516  
  1517            message.name = reader.string();
  1518            continue;
  1519          case 2:
  1520            if (tag !== 18) {
  1521              break;
  1522            }
  1523  
  1524            message.field.push(FieldDescriptorProto.decode(reader, reader.uint32()));
  1525            continue;
  1526          case 6:
  1527            if (tag !== 50) {
  1528              break;
  1529            }
  1530  
  1531            message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32()));
  1532            continue;
  1533          case 3:
  1534            if (tag !== 26) {
  1535              break;
  1536            }
  1537  
  1538            message.nestedType.push(DescriptorProto.decode(reader, reader.uint32()));
  1539            continue;
  1540          case 4:
  1541            if (tag !== 34) {
  1542              break;
  1543            }
  1544  
  1545            message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32()));
  1546            continue;
  1547          case 5:
  1548            if (tag !== 42) {
  1549              break;
  1550            }
  1551  
  1552            message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32()));
  1553            continue;
  1554          case 8:
  1555            if (tag !== 66) {
  1556              break;
  1557            }
  1558  
  1559            message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32()));
  1560            continue;
  1561          case 7:
  1562            if (tag !== 58) {
  1563              break;
  1564            }
  1565  
  1566            message.options = MessageOptions.decode(reader, reader.uint32());
  1567            continue;
  1568          case 9:
  1569            if (tag !== 74) {
  1570              break;
  1571            }
  1572  
  1573            message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32()));
  1574            continue;
  1575          case 10:
  1576            if (tag !== 82) {
  1577              break;
  1578            }
  1579  
  1580            message.reservedName.push(reader.string());
  1581            continue;
  1582        }
  1583        if ((tag & 7) === 4 || tag === 0) {
  1584          break;
  1585        }
  1586        reader.skipType(tag & 7);
  1587      }
  1588      return message;
  1589    },
  1590  
  1591    fromJSON(object: any): DescriptorProto {
  1592      return {
  1593        name: isSet(object.name) ? globalThis.String(object.name) : "",
  1594        field: globalThis.Array.isArray(object?.field)
  1595          ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e))
  1596          : [],
  1597        extension: globalThis.Array.isArray(object?.extension)
  1598          ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e))
  1599          : [],
  1600        nestedType: globalThis.Array.isArray(object?.nestedType)
  1601          ? object.nestedType.map((e: any) => DescriptorProto.fromJSON(e))
  1602          : [],
  1603        enumType: globalThis.Array.isArray(object?.enumType)
  1604          ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e))
  1605          : [],
  1606        extensionRange: globalThis.Array.isArray(object?.extensionRange)
  1607          ? object.extensionRange.map((e: any) => DescriptorProto_ExtensionRange.fromJSON(e))
  1608          : [],
  1609        oneofDecl: globalThis.Array.isArray(object?.oneofDecl)
  1610          ? object.oneofDecl.map((e: any) => OneofDescriptorProto.fromJSON(e))
  1611          : [],
  1612        options: isSet(object.options) ? MessageOptions.fromJSON(object.options) : undefined,
  1613        reservedRange: globalThis.Array.isArray(object?.reservedRange)
  1614          ? object.reservedRange.map((e: any) => DescriptorProto_ReservedRange.fromJSON(e))
  1615          : [],
  1616        reservedName: globalThis.Array.isArray(object?.reservedName)
  1617          ? object.reservedName.map((e: any) => globalThis.String(e))
  1618          : [],
  1619      };
  1620    },
  1621  
  1622    toJSON(message: DescriptorProto): unknown {
  1623      const obj: any = {};
  1624      if (message.name !== "") {
  1625        obj.name = message.name;
  1626      }
  1627      if (message.field?.length) {
  1628        obj.field = message.field.map((e) => FieldDescriptorProto.toJSON(e));
  1629      }
  1630      if (message.extension?.length) {
  1631        obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e));
  1632      }
  1633      if (message.nestedType?.length) {
  1634        obj.nestedType = message.nestedType.map((e) => DescriptorProto.toJSON(e));
  1635      }
  1636      if (message.enumType?.length) {
  1637        obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e));
  1638      }
  1639      if (message.extensionRange?.length) {
  1640        obj.extensionRange = message.extensionRange.map((e) => DescriptorProto_ExtensionRange.toJSON(e));
  1641      }
  1642      if (message.oneofDecl?.length) {
  1643        obj.oneofDecl = message.oneofDecl.map((e) => OneofDescriptorProto.toJSON(e));
  1644      }
  1645      if (message.options !== undefined) {
  1646        obj.options = MessageOptions.toJSON(message.options);
  1647      }
  1648      if (message.reservedRange?.length) {
  1649        obj.reservedRange = message.reservedRange.map((e) => DescriptorProto_ReservedRange.toJSON(e));
  1650      }
  1651      if (message.reservedName?.length) {
  1652        obj.reservedName = message.reservedName;
  1653      }
  1654      return obj;
  1655    },
  1656  
  1657    create<I extends Exact<DeepPartial<DescriptorProto>, I>>(base?: I): DescriptorProto {
  1658      return DescriptorProto.fromPartial(base ?? ({} as any));
  1659    },
  1660    fromPartial<I extends Exact<DeepPartial<DescriptorProto>, I>>(object: I): DescriptorProto {
  1661      const message = createBaseDescriptorProto() as any;
  1662      message.name = object.name ?? "";
  1663      message.field = object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || [];
  1664      message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || [];
  1665      message.nestedType = object.nestedType?.map((e) => DescriptorProto.fromPartial(e)) || [];
  1666      message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || [];
  1667      message.extensionRange = object.extensionRange?.map((e) => DescriptorProto_ExtensionRange.fromPartial(e)) || [];
  1668      message.oneofDecl = object.oneofDecl?.map((e) => OneofDescriptorProto.fromPartial(e)) || [];
  1669      message.options = (object.options !== undefined && object.options !== null)
  1670        ? MessageOptions.fromPartial(object.options)
  1671        : undefined;
  1672      message.reservedRange = object.reservedRange?.map((e) => DescriptorProto_ReservedRange.fromPartial(e)) || [];
  1673      message.reservedName = object.reservedName?.map((e) => e) || [];
  1674      return message;
  1675    },
  1676  };
  1677  
  1678  function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange {
  1679    return { start: 0, end: 0, options: undefined };
  1680  }
  1681  
  1682  export const DescriptorProto_ExtensionRange = {
  1683    encode(message: DescriptorProto_ExtensionRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  1684      if (message.start !== 0) {
  1685        writer.uint32(8).int32(message.start);
  1686      }
  1687      if (message.end !== 0) {
  1688        writer.uint32(16).int32(message.end);
  1689      }
  1690      if (message.options !== undefined) {
  1691        ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim();
  1692      }
  1693      return writer;
  1694    },
  1695  
  1696    decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange {
  1697      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  1698      let end = length === undefined ? reader.len : reader.pos + length;
  1699      const message = createBaseDescriptorProto_ExtensionRange() as any;
  1700      while (reader.pos < end) {
  1701        const tag = reader.uint32();
  1702        switch (tag >>> 3) {
  1703          case 1:
  1704            if (tag !== 8) {
  1705              break;
  1706            }
  1707  
  1708            message.start = reader.int32();
  1709            continue;
  1710          case 2:
  1711            if (tag !== 16) {
  1712              break;
  1713            }
  1714  
  1715            message.end = reader.int32();
  1716            continue;
  1717          case 3:
  1718            if (tag !== 26) {
  1719              break;
  1720            }
  1721  
  1722            message.options = ExtensionRangeOptions.decode(reader, reader.uint32());
  1723            continue;
  1724        }
  1725        if ((tag & 7) === 4 || tag === 0) {
  1726          break;
  1727        }
  1728        reader.skipType(tag & 7);
  1729      }
  1730      return message;
  1731    },
  1732  
  1733    fromJSON(object: any): DescriptorProto_ExtensionRange {
  1734      return {
  1735        start: isSet(object.start) ? globalThis.Number(object.start) : 0,
  1736        end: isSet(object.end) ? globalThis.Number(object.end) : 0,
  1737        options: isSet(object.options) ? ExtensionRangeOptions.fromJSON(object.options) : undefined,
  1738      };
  1739    },
  1740  
  1741    toJSON(message: DescriptorProto_ExtensionRange): unknown {
  1742      const obj: any = {};
  1743      if (message.start !== 0) {
  1744        obj.start = Math.round(message.start);
  1745      }
  1746      if (message.end !== 0) {
  1747        obj.end = Math.round(message.end);
  1748      }
  1749      if (message.options !== undefined) {
  1750        obj.options = ExtensionRangeOptions.toJSON(message.options);
  1751      }
  1752      return obj;
  1753    },
  1754  
  1755    create<I extends Exact<DeepPartial<DescriptorProto_ExtensionRange>, I>>(base?: I): DescriptorProto_ExtensionRange {
  1756      return DescriptorProto_ExtensionRange.fromPartial(base ?? ({} as any));
  1757    },
  1758    fromPartial<I extends Exact<DeepPartial<DescriptorProto_ExtensionRange>, I>>(
  1759      object: I,
  1760    ): DescriptorProto_ExtensionRange {
  1761      const message = createBaseDescriptorProto_ExtensionRange() as any;
  1762      message.start = object.start ?? 0;
  1763      message.end = object.end ?? 0;
  1764      message.options = (object.options !== undefined && object.options !== null)
  1765        ? ExtensionRangeOptions.fromPartial(object.options)
  1766        : undefined;
  1767      return message;
  1768    },
  1769  };
  1770  
  1771  function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange {
  1772    return { start: 0, end: 0 };
  1773  }
  1774  
  1775  export const DescriptorProto_ReservedRange = {
  1776    encode(message: DescriptorProto_ReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  1777      if (message.start !== 0) {
  1778        writer.uint32(8).int32(message.start);
  1779      }
  1780      if (message.end !== 0) {
  1781        writer.uint32(16).int32(message.end);
  1782      }
  1783      return writer;
  1784    },
  1785  
  1786    decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange {
  1787      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  1788      let end = length === undefined ? reader.len : reader.pos + length;
  1789      const message = createBaseDescriptorProto_ReservedRange() as any;
  1790      while (reader.pos < end) {
  1791        const tag = reader.uint32();
  1792        switch (tag >>> 3) {
  1793          case 1:
  1794            if (tag !== 8) {
  1795              break;
  1796            }
  1797  
  1798            message.start = reader.int32();
  1799            continue;
  1800          case 2:
  1801            if (tag !== 16) {
  1802              break;
  1803            }
  1804  
  1805            message.end = reader.int32();
  1806            continue;
  1807        }
  1808        if ((tag & 7) === 4 || tag === 0) {
  1809          break;
  1810        }
  1811        reader.skipType(tag & 7);
  1812      }
  1813      return message;
  1814    },
  1815  
  1816    fromJSON(object: any): DescriptorProto_ReservedRange {
  1817      return {
  1818        start: isSet(object.start) ? globalThis.Number(object.start) : 0,
  1819        end: isSet(object.end) ? globalThis.Number(object.end) : 0,
  1820      };
  1821    },
  1822  
  1823    toJSON(message: DescriptorProto_ReservedRange): unknown {
  1824      const obj: any = {};
  1825      if (message.start !== 0) {
  1826        obj.start = Math.round(message.start);
  1827      }
  1828      if (message.end !== 0) {
  1829        obj.end = Math.round(message.end);
  1830      }
  1831      return obj;
  1832    },
  1833  
  1834    create<I extends Exact<DeepPartial<DescriptorProto_ReservedRange>, I>>(base?: I): DescriptorProto_ReservedRange {
  1835      return DescriptorProto_ReservedRange.fromPartial(base ?? ({} as any));
  1836    },
  1837    fromPartial<I extends Exact<DeepPartial<DescriptorProto_ReservedRange>, I>>(
  1838      object: I,
  1839    ): DescriptorProto_ReservedRange {
  1840      const message = createBaseDescriptorProto_ReservedRange() as any;
  1841      message.start = object.start ?? 0;
  1842      message.end = object.end ?? 0;
  1843      return message;
  1844    },
  1845  };
  1846  
  1847  function createBaseExtensionRangeOptions(): ExtensionRangeOptions {
  1848    return { uninterpretedOption: [] };
  1849  }
  1850  
  1851  export const ExtensionRangeOptions = {
  1852    encode(message: ExtensionRangeOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  1853      for (const v of message.uninterpretedOption) {
  1854        UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
  1855      }
  1856      return writer;
  1857    },
  1858  
  1859    decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions {
  1860      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  1861      let end = length === undefined ? reader.len : reader.pos + length;
  1862      const message = createBaseExtensionRangeOptions() as any;
  1863      while (reader.pos < end) {
  1864        const tag = reader.uint32();
  1865        switch (tag >>> 3) {
  1866          case 999:
  1867            if (tag !== 7994) {
  1868              break;
  1869            }
  1870  
  1871            message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
  1872            continue;
  1873        }
  1874        if ((tag & 7) === 4 || tag === 0) {
  1875          break;
  1876        }
  1877        reader.skipType(tag & 7);
  1878      }
  1879      return message;
  1880    },
  1881  
  1882    fromJSON(object: any): ExtensionRangeOptions {
  1883      return {
  1884        uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
  1885          ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
  1886          : [],
  1887      };
  1888    },
  1889  
  1890    toJSON(message: ExtensionRangeOptions): unknown {
  1891      const obj: any = {};
  1892      if (message.uninterpretedOption?.length) {
  1893        obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
  1894      }
  1895      return obj;
  1896    },
  1897  
  1898    create<I extends Exact<DeepPartial<ExtensionRangeOptions>, I>>(base?: I): ExtensionRangeOptions {
  1899      return ExtensionRangeOptions.fromPartial(base ?? ({} as any));
  1900    },
  1901    fromPartial<I extends Exact<DeepPartial<ExtensionRangeOptions>, I>>(object: I): ExtensionRangeOptions {
  1902      const message = createBaseExtensionRangeOptions() as any;
  1903      message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
  1904      return message;
  1905    },
  1906  };
  1907  
  1908  function createBaseFieldDescriptorProto(): FieldDescriptorProto {
  1909    return {
  1910      name: "",
  1911      number: 0,
  1912      label: 1,
  1913      type: 1,
  1914      typeName: "",
  1915      extendee: "",
  1916      defaultValue: "",
  1917      oneofIndex: 0,
  1918      jsonName: "",
  1919      options: undefined,
  1920      proto3Optional: false,
  1921    };
  1922  }
  1923  
  1924  export const FieldDescriptorProto = {
  1925    encode(message: FieldDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  1926      if (message.name !== "") {
  1927        writer.uint32(10).string(message.name);
  1928      }
  1929      if (message.number !== 0) {
  1930        writer.uint32(24).int32(message.number);
  1931      }
  1932      if (message.label !== 1) {
  1933        writer.uint32(32).int32(message.label);
  1934      }
  1935      if (message.type !== 1) {
  1936        writer.uint32(40).int32(message.type);
  1937      }
  1938      if (message.typeName !== "") {
  1939        writer.uint32(50).string(message.typeName);
  1940      }
  1941      if (message.extendee !== "") {
  1942        writer.uint32(18).string(message.extendee);
  1943      }
  1944      if (message.defaultValue !== "") {
  1945        writer.uint32(58).string(message.defaultValue);
  1946      }
  1947      if (message.oneofIndex !== 0) {
  1948        writer.uint32(72).int32(message.oneofIndex);
  1949      }
  1950      if (message.jsonName !== "") {
  1951        writer.uint32(82).string(message.jsonName);
  1952      }
  1953      if (message.options !== undefined) {
  1954        FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim();
  1955      }
  1956      if (message.proto3Optional === true) {
  1957        writer.uint32(136).bool(message.proto3Optional);
  1958      }
  1959      return writer;
  1960    },
  1961  
  1962    decode(input: _m0.Reader | Uint8Array, length?: number): FieldDescriptorProto {
  1963      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  1964      let end = length === undefined ? reader.len : reader.pos + length;
  1965      const message = createBaseFieldDescriptorProto() as any;
  1966      while (reader.pos < end) {
  1967        const tag = reader.uint32();
  1968        switch (tag >>> 3) {
  1969          case 1:
  1970            if (tag !== 10) {
  1971              break;
  1972            }
  1973  
  1974            message.name = reader.string();
  1975            continue;
  1976          case 3:
  1977            if (tag !== 24) {
  1978              break;
  1979            }
  1980  
  1981            message.number = reader.int32();
  1982            continue;
  1983          case 4:
  1984            if (tag !== 32) {
  1985              break;
  1986            }
  1987  
  1988            message.label = reader.int32() as any;
  1989            continue;
  1990          case 5:
  1991            if (tag !== 40) {
  1992              break;
  1993            }
  1994  
  1995            message.type = reader.int32() as any;
  1996            continue;
  1997          case 6:
  1998            if (tag !== 50) {
  1999              break;
  2000            }
  2001  
  2002            message.typeName = reader.string();
  2003            continue;
  2004          case 2:
  2005            if (tag !== 18) {
  2006              break;
  2007            }
  2008  
  2009            message.extendee = reader.string();
  2010            continue;
  2011          case 7:
  2012            if (tag !== 58) {
  2013              break;
  2014            }
  2015  
  2016            message.defaultValue = reader.string();
  2017            continue;
  2018          case 9:
  2019            if (tag !== 72) {
  2020              break;
  2021            }
  2022  
  2023            message.oneofIndex = reader.int32();
  2024            continue;
  2025          case 10:
  2026            if (tag !== 82) {
  2027              break;
  2028            }
  2029  
  2030            message.jsonName = reader.string();
  2031            continue;
  2032          case 8:
  2033            if (tag !== 66) {
  2034              break;
  2035            }
  2036  
  2037            message.options = FieldOptions.decode(reader, reader.uint32());
  2038            continue;
  2039          case 17:
  2040            if (tag !== 136) {
  2041              break;
  2042            }
  2043  
  2044            message.proto3Optional = reader.bool();
  2045            continue;
  2046        }
  2047        if ((tag & 7) === 4 || tag === 0) {
  2048          break;
  2049        }
  2050        reader.skipType(tag & 7);
  2051      }
  2052      return message;
  2053    },
  2054  
  2055    fromJSON(object: any): FieldDescriptorProto {
  2056      return {
  2057        name: isSet(object.name) ? globalThis.String(object.name) : "",
  2058        number: isSet(object.number) ? globalThis.Number(object.number) : 0,
  2059        label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1,
  2060        type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1,
  2061        typeName: isSet(object.typeName) ? globalThis.String(object.typeName) : "",
  2062        extendee: isSet(object.extendee) ? globalThis.String(object.extendee) : "",
  2063        defaultValue: isSet(object.defaultValue) ? globalThis.String(object.defaultValue) : "",
  2064        oneofIndex: isSet(object.oneofIndex) ? globalThis.Number(object.oneofIndex) : 0,
  2065        jsonName: isSet(object.jsonName) ? globalThis.String(object.jsonName) : "",
  2066        options: isSet(object.options) ? FieldOptions.fromJSON(object.options) : undefined,
  2067        proto3Optional: isSet(object.proto3Optional) ? globalThis.Boolean(object.proto3Optional) : false,
  2068      };
  2069    },
  2070  
  2071    toJSON(message: FieldDescriptorProto): unknown {
  2072      const obj: any = {};
  2073      if (message.name !== "") {
  2074        obj.name = message.name;
  2075      }
  2076      if (message.number !== 0) {
  2077        obj.number = Math.round(message.number);
  2078      }
  2079      if (message.label !== 1) {
  2080        obj.label = fieldDescriptorProto_LabelToJSON(message.label);
  2081      }
  2082      if (message.type !== 1) {
  2083        obj.type = fieldDescriptorProto_TypeToJSON(message.type);
  2084      }
  2085      if (message.typeName !== "") {
  2086        obj.typeName = message.typeName;
  2087      }
  2088      if (message.extendee !== "") {
  2089        obj.extendee = message.extendee;
  2090      }
  2091      if (message.defaultValue !== "") {
  2092        obj.defaultValue = message.defaultValue;
  2093      }
  2094      if (message.oneofIndex !== 0) {
  2095        obj.oneofIndex = Math.round(message.oneofIndex);
  2096      }
  2097      if (message.jsonName !== "") {
  2098        obj.jsonName = message.jsonName;
  2099      }
  2100      if (message.options !== undefined) {
  2101        obj.options = FieldOptions.toJSON(message.options);
  2102      }
  2103      if (message.proto3Optional === true) {
  2104        obj.proto3Optional = message.proto3Optional;
  2105      }
  2106      return obj;
  2107    },
  2108  
  2109    create<I extends Exact<DeepPartial<FieldDescriptorProto>, I>>(base?: I): FieldDescriptorProto {
  2110      return FieldDescriptorProto.fromPartial(base ?? ({} as any));
  2111    },
  2112    fromPartial<I extends Exact<DeepPartial<FieldDescriptorProto>, I>>(object: I): FieldDescriptorProto {
  2113      const message = createBaseFieldDescriptorProto() as any;
  2114      message.name = object.name ?? "";
  2115      message.number = object.number ?? 0;
  2116      message.label = object.label ?? 1;
  2117      message.type = object.type ?? 1;
  2118      message.typeName = object.typeName ?? "";
  2119      message.extendee = object.extendee ?? "";
  2120      message.defaultValue = object.defaultValue ?? "";
  2121      message.oneofIndex = object.oneofIndex ?? 0;
  2122      message.jsonName = object.jsonName ?? "";
  2123      message.options = (object.options !== undefined && object.options !== null)
  2124        ? FieldOptions.fromPartial(object.options)
  2125        : undefined;
  2126      message.proto3Optional = object.proto3Optional ?? false;
  2127      return message;
  2128    },
  2129  };
  2130  
  2131  function createBaseOneofDescriptorProto(): OneofDescriptorProto {
  2132    return { name: "", options: undefined };
  2133  }
  2134  
  2135  export const OneofDescriptorProto = {
  2136    encode(message: OneofDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  2137      if (message.name !== "") {
  2138        writer.uint32(10).string(message.name);
  2139      }
  2140      if (message.options !== undefined) {
  2141        OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim();
  2142      }
  2143      return writer;
  2144    },
  2145  
  2146    decode(input: _m0.Reader | Uint8Array, length?: number): OneofDescriptorProto {
  2147      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  2148      let end = length === undefined ? reader.len : reader.pos + length;
  2149      const message = createBaseOneofDescriptorProto() as any;
  2150      while (reader.pos < end) {
  2151        const tag = reader.uint32();
  2152        switch (tag >>> 3) {
  2153          case 1:
  2154            if (tag !== 10) {
  2155              break;
  2156            }
  2157  
  2158            message.name = reader.string();
  2159            continue;
  2160          case 2:
  2161            if (tag !== 18) {
  2162              break;
  2163            }
  2164  
  2165            message.options = OneofOptions.decode(reader, reader.uint32());
  2166            continue;
  2167        }
  2168        if ((tag & 7) === 4 || tag === 0) {
  2169          break;
  2170        }
  2171        reader.skipType(tag & 7);
  2172      }
  2173      return message;
  2174    },
  2175  
  2176    fromJSON(object: any): OneofDescriptorProto {
  2177      return {
  2178        name: isSet(object.name) ? globalThis.String(object.name) : "",
  2179        options: isSet(object.options) ? OneofOptions.fromJSON(object.options) : undefined,
  2180      };
  2181    },
  2182  
  2183    toJSON(message: OneofDescriptorProto): unknown {
  2184      const obj: any = {};
  2185      if (message.name !== "") {
  2186        obj.name = message.name;
  2187      }
  2188      if (message.options !== undefined) {
  2189        obj.options = OneofOptions.toJSON(message.options);
  2190      }
  2191      return obj;
  2192    },
  2193  
  2194    create<I extends Exact<DeepPartial<OneofDescriptorProto>, I>>(base?: I): OneofDescriptorProto {
  2195      return OneofDescriptorProto.fromPartial(base ?? ({} as any));
  2196    },
  2197    fromPartial<I extends Exact<DeepPartial<OneofDescriptorProto>, I>>(object: I): OneofDescriptorProto {
  2198      const message = createBaseOneofDescriptorProto() as any;
  2199      message.name = object.name ?? "";
  2200      message.options = (object.options !== undefined && object.options !== null)
  2201        ? OneofOptions.fromPartial(object.options)
  2202        : undefined;
  2203      return message;
  2204    },
  2205  };
  2206  
  2207  function createBaseEnumDescriptorProto(): EnumDescriptorProto {
  2208    return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [] };
  2209  }
  2210  
  2211  export const EnumDescriptorProto = {
  2212    encode(message: EnumDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  2213      if (message.name !== "") {
  2214        writer.uint32(10).string(message.name);
  2215      }
  2216      for (const v of message.value) {
  2217        EnumValueDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim();
  2218      }
  2219      if (message.options !== undefined) {
  2220        EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim();
  2221      }
  2222      for (const v of message.reservedRange) {
  2223        EnumDescriptorProto_EnumReservedRange.encode(v!, writer.uint32(34).fork()).ldelim();
  2224      }
  2225      for (const v of message.reservedName) {
  2226        writer.uint32(42).string(v!);
  2227      }
  2228      return writer;
  2229    },
  2230  
  2231    decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto {
  2232      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  2233      let end = length === undefined ? reader.len : reader.pos + length;
  2234      const message = createBaseEnumDescriptorProto() as any;
  2235      while (reader.pos < end) {
  2236        const tag = reader.uint32();
  2237        switch (tag >>> 3) {
  2238          case 1:
  2239            if (tag !== 10) {
  2240              break;
  2241            }
  2242  
  2243            message.name = reader.string();
  2244            continue;
  2245          case 2:
  2246            if (tag !== 18) {
  2247              break;
  2248            }
  2249  
  2250            message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32()));
  2251            continue;
  2252          case 3:
  2253            if (tag !== 26) {
  2254              break;
  2255            }
  2256  
  2257            message.options = EnumOptions.decode(reader, reader.uint32());
  2258            continue;
  2259          case 4:
  2260            if (tag !== 34) {
  2261              break;
  2262            }
  2263  
  2264            message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32()));
  2265            continue;
  2266          case 5:
  2267            if (tag !== 42) {
  2268              break;
  2269            }
  2270  
  2271            message.reservedName.push(reader.string());
  2272            continue;
  2273        }
  2274        if ((tag & 7) === 4 || tag === 0) {
  2275          break;
  2276        }
  2277        reader.skipType(tag & 7);
  2278      }
  2279      return message;
  2280    },
  2281  
  2282    fromJSON(object: any): EnumDescriptorProto {
  2283      return {
  2284        name: isSet(object.name) ? globalThis.String(object.name) : "",
  2285        value: globalThis.Array.isArray(object?.value)
  2286          ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e))
  2287          : [],
  2288        options: isSet(object.options) ? EnumOptions.fromJSON(object.options) : undefined,
  2289        reservedRange: globalThis.Array.isArray(object?.reservedRange)
  2290          ? object.reservedRange.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromJSON(e))
  2291          : [],
  2292        reservedName: globalThis.Array.isArray(object?.reservedName)
  2293          ? object.reservedName.map((e: any) => globalThis.String(e))
  2294          : [],
  2295      };
  2296    },
  2297  
  2298    toJSON(message: EnumDescriptorProto): unknown {
  2299      const obj: any = {};
  2300      if (message.name !== "") {
  2301        obj.name = message.name;
  2302      }
  2303      if (message.value?.length) {
  2304        obj.value = message.value.map((e) => EnumValueDescriptorProto.toJSON(e));
  2305      }
  2306      if (message.options !== undefined) {
  2307        obj.options = EnumOptions.toJSON(message.options);
  2308      }
  2309      if (message.reservedRange?.length) {
  2310        obj.reservedRange = message.reservedRange.map((e) => EnumDescriptorProto_EnumReservedRange.toJSON(e));
  2311      }
  2312      if (message.reservedName?.length) {
  2313        obj.reservedName = message.reservedName;
  2314      }
  2315      return obj;
  2316    },
  2317  
  2318    create<I extends Exact<DeepPartial<EnumDescriptorProto>, I>>(base?: I): EnumDescriptorProto {
  2319      return EnumDescriptorProto.fromPartial(base ?? ({} as any));
  2320    },
  2321    fromPartial<I extends Exact<DeepPartial<EnumDescriptorProto>, I>>(object: I): EnumDescriptorProto {
  2322      const message = createBaseEnumDescriptorProto() as any;
  2323      message.name = object.name ?? "";
  2324      message.value = object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || [];
  2325      message.options = (object.options !== undefined && object.options !== null)
  2326        ? EnumOptions.fromPartial(object.options)
  2327        : undefined;
  2328      message.reservedRange = object.reservedRange?.map((e) => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) ||
  2329        [];
  2330      message.reservedName = object.reservedName?.map((e) => e) || [];
  2331      return message;
  2332    },
  2333  };
  2334  
  2335  function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange {
  2336    return { start: 0, end: 0 };
  2337  }
  2338  
  2339  export const EnumDescriptorProto_EnumReservedRange = {
  2340    encode(message: EnumDescriptorProto_EnumReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  2341      if (message.start !== 0) {
  2342        writer.uint32(8).int32(message.start);
  2343      }
  2344      if (message.end !== 0) {
  2345        writer.uint32(16).int32(message.end);
  2346      }
  2347      return writer;
  2348    },
  2349  
  2350    decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange {
  2351      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  2352      let end = length === undefined ? reader.len : reader.pos + length;
  2353      const message = createBaseEnumDescriptorProto_EnumReservedRange() as any;
  2354      while (reader.pos < end) {
  2355        const tag = reader.uint32();
  2356        switch (tag >>> 3) {
  2357          case 1:
  2358            if (tag !== 8) {
  2359              break;
  2360            }
  2361  
  2362            message.start = reader.int32();
  2363            continue;
  2364          case 2:
  2365            if (tag !== 16) {
  2366              break;
  2367            }
  2368  
  2369            message.end = reader.int32();
  2370            continue;
  2371        }
  2372        if ((tag & 7) === 4 || tag === 0) {
  2373          break;
  2374        }
  2375        reader.skipType(tag & 7);
  2376      }
  2377      return message;
  2378    },
  2379  
  2380    fromJSON(object: any): EnumDescriptorProto_EnumReservedRange {
  2381      return {
  2382        start: isSet(object.start) ? globalThis.Number(object.start) : 0,
  2383        end: isSet(object.end) ? globalThis.Number(object.end) : 0,
  2384      };
  2385    },
  2386  
  2387    toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown {
  2388      const obj: any = {};
  2389      if (message.start !== 0) {
  2390        obj.start = Math.round(message.start);
  2391      }
  2392      if (message.end !== 0) {
  2393        obj.end = Math.round(message.end);
  2394      }
  2395      return obj;
  2396    },
  2397  
  2398    create<I extends Exact<DeepPartial<EnumDescriptorProto_EnumReservedRange>, I>>(
  2399      base?: I,
  2400    ): EnumDescriptorProto_EnumReservedRange {
  2401      return EnumDescriptorProto_EnumReservedRange.fromPartial(base ?? ({} as any));
  2402    },
  2403    fromPartial<I extends Exact<DeepPartial<EnumDescriptorProto_EnumReservedRange>, I>>(
  2404      object: I,
  2405    ): EnumDescriptorProto_EnumReservedRange {
  2406      const message = createBaseEnumDescriptorProto_EnumReservedRange() as any;
  2407      message.start = object.start ?? 0;
  2408      message.end = object.end ?? 0;
  2409      return message;
  2410    },
  2411  };
  2412  
  2413  function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto {
  2414    return { name: "", number: 0, options: undefined };
  2415  }
  2416  
  2417  export const EnumValueDescriptorProto = {
  2418    encode(message: EnumValueDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  2419      if (message.name !== "") {
  2420        writer.uint32(10).string(message.name);
  2421      }
  2422      if (message.number !== 0) {
  2423        writer.uint32(16).int32(message.number);
  2424      }
  2425      if (message.options !== undefined) {
  2426        EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim();
  2427      }
  2428      return writer;
  2429    },
  2430  
  2431    decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueDescriptorProto {
  2432      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  2433      let end = length === undefined ? reader.len : reader.pos + length;
  2434      const message = createBaseEnumValueDescriptorProto() as any;
  2435      while (reader.pos < end) {
  2436        const tag = reader.uint32();
  2437        switch (tag >>> 3) {
  2438          case 1:
  2439            if (tag !== 10) {
  2440              break;
  2441            }
  2442  
  2443            message.name = reader.string();
  2444            continue;
  2445          case 2:
  2446            if (tag !== 16) {
  2447              break;
  2448            }
  2449  
  2450            message.number = reader.int32();
  2451            continue;
  2452          case 3:
  2453            if (tag !== 26) {
  2454              break;
  2455            }
  2456  
  2457            message.options = EnumValueOptions.decode(reader, reader.uint32());
  2458            continue;
  2459        }
  2460        if ((tag & 7) === 4 || tag === 0) {
  2461          break;
  2462        }
  2463        reader.skipType(tag & 7);
  2464      }
  2465      return message;
  2466    },
  2467  
  2468    fromJSON(object: any): EnumValueDescriptorProto {
  2469      return {
  2470        name: isSet(object.name) ? globalThis.String(object.name) : "",
  2471        number: isSet(object.number) ? globalThis.Number(object.number) : 0,
  2472        options: isSet(object.options) ? EnumValueOptions.fromJSON(object.options) : undefined,
  2473      };
  2474    },
  2475  
  2476    toJSON(message: EnumValueDescriptorProto): unknown {
  2477      const obj: any = {};
  2478      if (message.name !== "") {
  2479        obj.name = message.name;
  2480      }
  2481      if (message.number !== 0) {
  2482        obj.number = Math.round(message.number);
  2483      }
  2484      if (message.options !== undefined) {
  2485        obj.options = EnumValueOptions.toJSON(message.options);
  2486      }
  2487      return obj;
  2488    },
  2489  
  2490    create<I extends Exact<DeepPartial<EnumValueDescriptorProto>, I>>(base?: I): EnumValueDescriptorProto {
  2491      return EnumValueDescriptorProto.fromPartial(base ?? ({} as any));
  2492    },
  2493    fromPartial<I extends Exact<DeepPartial<EnumValueDescriptorProto>, I>>(object: I): EnumValueDescriptorProto {
  2494      const message = createBaseEnumValueDescriptorProto() as any;
  2495      message.name = object.name ?? "";
  2496      message.number = object.number ?? 0;
  2497      message.options = (object.options !== undefined && object.options !== null)
  2498        ? EnumValueOptions.fromPartial(object.options)
  2499        : undefined;
  2500      return message;
  2501    },
  2502  };
  2503  
  2504  function createBaseServiceDescriptorProto(): ServiceDescriptorProto {
  2505    return { name: "", method: [], options: undefined };
  2506  }
  2507  
  2508  export const ServiceDescriptorProto = {
  2509    encode(message: ServiceDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  2510      if (message.name !== "") {
  2511        writer.uint32(10).string(message.name);
  2512      }
  2513      for (const v of message.method) {
  2514        MethodDescriptorProto.encode(v!, writer.uint32(18).fork()).ldelim();
  2515      }
  2516      if (message.options !== undefined) {
  2517        ServiceOptions.encode(message.options, writer.uint32(26).fork()).ldelim();
  2518      }
  2519      return writer;
  2520    },
  2521  
  2522    decode(input: _m0.Reader | Uint8Array, length?: number): ServiceDescriptorProto {
  2523      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  2524      let end = length === undefined ? reader.len : reader.pos + length;
  2525      const message = createBaseServiceDescriptorProto() as any;
  2526      while (reader.pos < end) {
  2527        const tag = reader.uint32();
  2528        switch (tag >>> 3) {
  2529          case 1:
  2530            if (tag !== 10) {
  2531              break;
  2532            }
  2533  
  2534            message.name = reader.string();
  2535            continue;
  2536          case 2:
  2537            if (tag !== 18) {
  2538              break;
  2539            }
  2540  
  2541            message.method.push(MethodDescriptorProto.decode(reader, reader.uint32()));
  2542            continue;
  2543          case 3:
  2544            if (tag !== 26) {
  2545              break;
  2546            }
  2547  
  2548            message.options = ServiceOptions.decode(reader, reader.uint32());
  2549            continue;
  2550        }
  2551        if ((tag & 7) === 4 || tag === 0) {
  2552          break;
  2553        }
  2554        reader.skipType(tag & 7);
  2555      }
  2556      return message;
  2557    },
  2558  
  2559    fromJSON(object: any): ServiceDescriptorProto {
  2560      return {
  2561        name: isSet(object.name) ? globalThis.String(object.name) : "",
  2562        method: globalThis.Array.isArray(object?.method)
  2563          ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e))
  2564          : [],
  2565        options: isSet(object.options) ? ServiceOptions.fromJSON(object.options) : undefined,
  2566      };
  2567    },
  2568  
  2569    toJSON(message: ServiceDescriptorProto): unknown {
  2570      const obj: any = {};
  2571      if (message.name !== "") {
  2572        obj.name = message.name;
  2573      }
  2574      if (message.method?.length) {
  2575        obj.method = message.method.map((e) => MethodDescriptorProto.toJSON(e));
  2576      }
  2577      if (message.options !== undefined) {
  2578        obj.options = ServiceOptions.toJSON(message.options);
  2579      }
  2580      return obj;
  2581    },
  2582  
  2583    create<I extends Exact<DeepPartial<ServiceDescriptorProto>, I>>(base?: I): ServiceDescriptorProto {
  2584      return ServiceDescriptorProto.fromPartial(base ?? ({} as any));
  2585    },
  2586    fromPartial<I extends Exact<DeepPartial<ServiceDescriptorProto>, I>>(object: I): ServiceDescriptorProto {
  2587      const message = createBaseServiceDescriptorProto() as any;
  2588      message.name = object.name ?? "";
  2589      message.method = object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || [];
  2590      message.options = (object.options !== undefined && object.options !== null)
  2591        ? ServiceOptions.fromPartial(object.options)
  2592        : undefined;
  2593      return message;
  2594    },
  2595  };
  2596  
  2597  function createBaseMethodDescriptorProto(): MethodDescriptorProto {
  2598    return {
  2599      name: "",
  2600      inputType: "",
  2601      outputType: "",
  2602      options: undefined,
  2603      clientStreaming: false,
  2604      serverStreaming: false,
  2605    };
  2606  }
  2607  
  2608  export const MethodDescriptorProto = {
  2609    encode(message: MethodDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  2610      if (message.name !== "") {
  2611        writer.uint32(10).string(message.name);
  2612      }
  2613      if (message.inputType !== "") {
  2614        writer.uint32(18).string(message.inputType);
  2615      }
  2616      if (message.outputType !== "") {
  2617        writer.uint32(26).string(message.outputType);
  2618      }
  2619      if (message.options !== undefined) {
  2620        MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim();
  2621      }
  2622      if (message.clientStreaming === true) {
  2623        writer.uint32(40).bool(message.clientStreaming);
  2624      }
  2625      if (message.serverStreaming === true) {
  2626        writer.uint32(48).bool(message.serverStreaming);
  2627      }
  2628      return writer;
  2629    },
  2630  
  2631    decode(input: _m0.Reader | Uint8Array, length?: number): MethodDescriptorProto {
  2632      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  2633      let end = length === undefined ? reader.len : reader.pos + length;
  2634      const message = createBaseMethodDescriptorProto() as any;
  2635      while (reader.pos < end) {
  2636        const tag = reader.uint32();
  2637        switch (tag >>> 3) {
  2638          case 1:
  2639            if (tag !== 10) {
  2640              break;
  2641            }
  2642  
  2643            message.name = reader.string();
  2644            continue;
  2645          case 2:
  2646            if (tag !== 18) {
  2647              break;
  2648            }
  2649  
  2650            message.inputType = reader.string();
  2651            continue;
  2652          case 3:
  2653            if (tag !== 26) {
  2654              break;
  2655            }
  2656  
  2657            message.outputType = reader.string();
  2658            continue;
  2659          case 4:
  2660            if (tag !== 34) {
  2661              break;
  2662            }
  2663  
  2664            message.options = MethodOptions.decode(reader, reader.uint32());
  2665            continue;
  2666          case 5:
  2667            if (tag !== 40) {
  2668              break;
  2669            }
  2670  
  2671            message.clientStreaming = reader.bool();
  2672            continue;
  2673          case 6:
  2674            if (tag !== 48) {
  2675              break;
  2676            }
  2677  
  2678            message.serverStreaming = reader.bool();
  2679            continue;
  2680        }
  2681        if ((tag & 7) === 4 || tag === 0) {
  2682          break;
  2683        }
  2684        reader.skipType(tag & 7);
  2685      }
  2686      return message;
  2687    },
  2688  
  2689    fromJSON(object: any): MethodDescriptorProto {
  2690      return {
  2691        name: isSet(object.name) ? globalThis.String(object.name) : "",
  2692        inputType: isSet(object.inputType) ? globalThis.String(object.inputType) : "",
  2693        outputType: isSet(object.outputType) ? globalThis.String(object.outputType) : "",
  2694        options: isSet(object.options) ? MethodOptions.fromJSON(object.options) : undefined,
  2695        clientStreaming: isSet(object.clientStreaming) ? globalThis.Boolean(object.clientStreaming) : false,
  2696        serverStreaming: isSet(object.serverStreaming) ? globalThis.Boolean(object.serverStreaming) : false,
  2697      };
  2698    },
  2699  
  2700    toJSON(message: MethodDescriptorProto): unknown {
  2701      const obj: any = {};
  2702      if (message.name !== "") {
  2703        obj.name = message.name;
  2704      }
  2705      if (message.inputType !== "") {
  2706        obj.inputType = message.inputType;
  2707      }
  2708      if (message.outputType !== "") {
  2709        obj.outputType = message.outputType;
  2710      }
  2711      if (message.options !== undefined) {
  2712        obj.options = MethodOptions.toJSON(message.options);
  2713      }
  2714      if (message.clientStreaming === true) {
  2715        obj.clientStreaming = message.clientStreaming;
  2716      }
  2717      if (message.serverStreaming === true) {
  2718        obj.serverStreaming = message.serverStreaming;
  2719      }
  2720      return obj;
  2721    },
  2722  
  2723    create<I extends Exact<DeepPartial<MethodDescriptorProto>, I>>(base?: I): MethodDescriptorProto {
  2724      return MethodDescriptorProto.fromPartial(base ?? ({} as any));
  2725    },
  2726    fromPartial<I extends Exact<DeepPartial<MethodDescriptorProto>, I>>(object: I): MethodDescriptorProto {
  2727      const message = createBaseMethodDescriptorProto() as any;
  2728      message.name = object.name ?? "";
  2729      message.inputType = object.inputType ?? "";
  2730      message.outputType = object.outputType ?? "";
  2731      message.options = (object.options !== undefined && object.options !== null)
  2732        ? MethodOptions.fromPartial(object.options)
  2733        : undefined;
  2734      message.clientStreaming = object.clientStreaming ?? false;
  2735      message.serverStreaming = object.serverStreaming ?? false;
  2736      return message;
  2737    },
  2738  };
  2739  
  2740  function createBaseFileOptions(): FileOptions {
  2741    return {
  2742      javaPackage: "",
  2743      javaOuterClassname: "",
  2744      javaMultipleFiles: false,
  2745      javaGenerateEqualsAndHash: false,
  2746      javaStringCheckUtf8: false,
  2747      optimizeFor: 1,
  2748      goPackage: "",
  2749      ccGenericServices: false,
  2750      javaGenericServices: false,
  2751      pyGenericServices: false,
  2752      phpGenericServices: false,
  2753      deprecated: false,
  2754      ccEnableArenas: false,
  2755      objcClassPrefix: "",
  2756      csharpNamespace: "",
  2757      swiftPrefix: "",
  2758      phpClassPrefix: "",
  2759      phpNamespace: "",
  2760      phpMetadataNamespace: "",
  2761      rubyPackage: "",
  2762      uninterpretedOption: [],
  2763    };
  2764  }
  2765  
  2766  export const FileOptions = {
  2767    encode(message: FileOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  2768      if (message.javaPackage !== "") {
  2769        writer.uint32(10).string(message.javaPackage);
  2770      }
  2771      if (message.javaOuterClassname !== "") {
  2772        writer.uint32(66).string(message.javaOuterClassname);
  2773      }
  2774      if (message.javaMultipleFiles === true) {
  2775        writer.uint32(80).bool(message.javaMultipleFiles);
  2776      }
  2777      if (message.javaGenerateEqualsAndHash === true) {
  2778        writer.uint32(160).bool(message.javaGenerateEqualsAndHash);
  2779      }
  2780      if (message.javaStringCheckUtf8 === true) {
  2781        writer.uint32(216).bool(message.javaStringCheckUtf8);
  2782      }
  2783      if (message.optimizeFor !== 1) {
  2784        writer.uint32(72).int32(message.optimizeFor);
  2785      }
  2786      if (message.goPackage !== "") {
  2787        writer.uint32(90).string(message.goPackage);
  2788      }
  2789      if (message.ccGenericServices === true) {
  2790        writer.uint32(128).bool(message.ccGenericServices);
  2791      }
  2792      if (message.javaGenericServices === true) {
  2793        writer.uint32(136).bool(message.javaGenericServices);
  2794      }
  2795      if (message.pyGenericServices === true) {
  2796        writer.uint32(144).bool(message.pyGenericServices);
  2797      }
  2798      if (message.phpGenericServices === true) {
  2799        writer.uint32(336).bool(message.phpGenericServices);
  2800      }
  2801      if (message.deprecated === true) {
  2802        writer.uint32(184).bool(message.deprecated);
  2803      }
  2804      if (message.ccEnableArenas === true) {
  2805        writer.uint32(248).bool(message.ccEnableArenas);
  2806      }
  2807      if (message.objcClassPrefix !== "") {
  2808        writer.uint32(290).string(message.objcClassPrefix);
  2809      }
  2810      if (message.csharpNamespace !== "") {
  2811        writer.uint32(298).string(message.csharpNamespace);
  2812      }
  2813      if (message.swiftPrefix !== "") {
  2814        writer.uint32(314).string(message.swiftPrefix);
  2815      }
  2816      if (message.phpClassPrefix !== "") {
  2817        writer.uint32(322).string(message.phpClassPrefix);
  2818      }
  2819      if (message.phpNamespace !== "") {
  2820        writer.uint32(330).string(message.phpNamespace);
  2821      }
  2822      if (message.phpMetadataNamespace !== "") {
  2823        writer.uint32(354).string(message.phpMetadataNamespace);
  2824      }
  2825      if (message.rubyPackage !== "") {
  2826        writer.uint32(362).string(message.rubyPackage);
  2827      }
  2828      for (const v of message.uninterpretedOption) {
  2829        UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
  2830      }
  2831      return writer;
  2832    },
  2833  
  2834    decode(input: _m0.Reader | Uint8Array, length?: number): FileOptions {
  2835      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  2836      let end = length === undefined ? reader.len : reader.pos + length;
  2837      const message = createBaseFileOptions() as any;
  2838      while (reader.pos < end) {
  2839        const tag = reader.uint32();
  2840        switch (tag >>> 3) {
  2841          case 1:
  2842            if (tag !== 10) {
  2843              break;
  2844            }
  2845  
  2846            message.javaPackage = reader.string();
  2847            continue;
  2848          case 8:
  2849            if (tag !== 66) {
  2850              break;
  2851            }
  2852  
  2853            message.javaOuterClassname = reader.string();
  2854            continue;
  2855          case 10:
  2856            if (tag !== 80) {
  2857              break;
  2858            }
  2859  
  2860            message.javaMultipleFiles = reader.bool();
  2861            continue;
  2862          case 20:
  2863            if (tag !== 160) {
  2864              break;
  2865            }
  2866  
  2867            message.javaGenerateEqualsAndHash = reader.bool();
  2868            continue;
  2869          case 27:
  2870            if (tag !== 216) {
  2871              break;
  2872            }
  2873  
  2874            message.javaStringCheckUtf8 = reader.bool();
  2875            continue;
  2876          case 9:
  2877            if (tag !== 72) {
  2878              break;
  2879            }
  2880  
  2881            message.optimizeFor = reader.int32() as any;
  2882            continue;
  2883          case 11:
  2884            if (tag !== 90) {
  2885              break;
  2886            }
  2887  
  2888            message.goPackage = reader.string();
  2889            continue;
  2890          case 16:
  2891            if (tag !== 128) {
  2892              break;
  2893            }
  2894  
  2895            message.ccGenericServices = reader.bool();
  2896            continue;
  2897          case 17:
  2898            if (tag !== 136) {
  2899              break;
  2900            }
  2901  
  2902            message.javaGenericServices = reader.bool();
  2903            continue;
  2904          case 18:
  2905            if (tag !== 144) {
  2906              break;
  2907            }
  2908  
  2909            message.pyGenericServices = reader.bool();
  2910            continue;
  2911          case 42:
  2912            if (tag !== 336) {
  2913              break;
  2914            }
  2915  
  2916            message.phpGenericServices = reader.bool();
  2917            continue;
  2918          case 23:
  2919            if (tag !== 184) {
  2920              break;
  2921            }
  2922  
  2923            message.deprecated = reader.bool();
  2924            continue;
  2925          case 31:
  2926            if (tag !== 248) {
  2927              break;
  2928            }
  2929  
  2930            message.ccEnableArenas = reader.bool();
  2931            continue;
  2932          case 36:
  2933            if (tag !== 290) {
  2934              break;
  2935            }
  2936  
  2937            message.objcClassPrefix = reader.string();
  2938            continue;
  2939          case 37:
  2940            if (tag !== 298) {
  2941              break;
  2942            }
  2943  
  2944            message.csharpNamespace = reader.string();
  2945            continue;
  2946          case 39:
  2947            if (tag !== 314) {
  2948              break;
  2949            }
  2950  
  2951            message.swiftPrefix = reader.string();
  2952            continue;
  2953          case 40:
  2954            if (tag !== 322) {
  2955              break;
  2956            }
  2957  
  2958            message.phpClassPrefix = reader.string();
  2959            continue;
  2960          case 41:
  2961            if (tag !== 330) {
  2962              break;
  2963            }
  2964  
  2965            message.phpNamespace = reader.string();
  2966            continue;
  2967          case 44:
  2968            if (tag !== 354) {
  2969              break;
  2970            }
  2971  
  2972            message.phpMetadataNamespace = reader.string();
  2973            continue;
  2974          case 45:
  2975            if (tag !== 362) {
  2976              break;
  2977            }
  2978  
  2979            message.rubyPackage = reader.string();
  2980            continue;
  2981          case 999:
  2982            if (tag !== 7994) {
  2983              break;
  2984            }
  2985  
  2986            message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
  2987            continue;
  2988        }
  2989        if ((tag & 7) === 4 || tag === 0) {
  2990          break;
  2991        }
  2992        reader.skipType(tag & 7);
  2993      }
  2994      return message;
  2995    },
  2996  
  2997    fromJSON(object: any): FileOptions {
  2998      return {
  2999        javaPackage: isSet(object.javaPackage) ? globalThis.String(object.javaPackage) : "",
  3000        javaOuterClassname: isSet(object.javaOuterClassname) ? globalThis.String(object.javaOuterClassname) : "",
  3001        javaMultipleFiles: isSet(object.javaMultipleFiles) ? globalThis.Boolean(object.javaMultipleFiles) : false,
  3002        javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash)
  3003          ? globalThis.Boolean(object.javaGenerateEqualsAndHash)
  3004          : false,
  3005        javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? globalThis.Boolean(object.javaStringCheckUtf8) : false,
  3006        optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 1,
  3007        goPackage: isSet(object.goPackage) ? globalThis.String(object.goPackage) : "",
  3008        ccGenericServices: isSet(object.ccGenericServices) ? globalThis.Boolean(object.ccGenericServices) : false,
  3009        javaGenericServices: isSet(object.javaGenericServices) ? globalThis.Boolean(object.javaGenericServices) : false,
  3010        pyGenericServices: isSet(object.pyGenericServices) ? globalThis.Boolean(object.pyGenericServices) : false,
  3011        phpGenericServices: isSet(object.phpGenericServices) ? globalThis.Boolean(object.phpGenericServices) : false,
  3012        deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
  3013        ccEnableArenas: isSet(object.ccEnableArenas) ? globalThis.Boolean(object.ccEnableArenas) : false,
  3014        objcClassPrefix: isSet(object.objcClassPrefix) ? globalThis.String(object.objcClassPrefix) : "",
  3015        csharpNamespace: isSet(object.csharpNamespace) ? globalThis.String(object.csharpNamespace) : "",
  3016        swiftPrefix: isSet(object.swiftPrefix) ? globalThis.String(object.swiftPrefix) : "",
  3017        phpClassPrefix: isSet(object.phpClassPrefix) ? globalThis.String(object.phpClassPrefix) : "",
  3018        phpNamespace: isSet(object.phpNamespace) ? globalThis.String(object.phpNamespace) : "",
  3019        phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? globalThis.String(object.phpMetadataNamespace) : "",
  3020        rubyPackage: isSet(object.rubyPackage) ? globalThis.String(object.rubyPackage) : "",
  3021        uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
  3022          ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
  3023          : [],
  3024      };
  3025    },
  3026  
  3027    toJSON(message: FileOptions): unknown {
  3028      const obj: any = {};
  3029      if (message.javaPackage !== "") {
  3030        obj.javaPackage = message.javaPackage;
  3031      }
  3032      if (message.javaOuterClassname !== "") {
  3033        obj.javaOuterClassname = message.javaOuterClassname;
  3034      }
  3035      if (message.javaMultipleFiles === true) {
  3036        obj.javaMultipleFiles = message.javaMultipleFiles;
  3037      }
  3038      if (message.javaGenerateEqualsAndHash === true) {
  3039        obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash;
  3040      }
  3041      if (message.javaStringCheckUtf8 === true) {
  3042        obj.javaStringCheckUtf8 = message.javaStringCheckUtf8;
  3043      }
  3044      if (message.optimizeFor !== 1) {
  3045        obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor);
  3046      }
  3047      if (message.goPackage !== "") {
  3048        obj.goPackage = message.goPackage;
  3049      }
  3050      if (message.ccGenericServices === true) {
  3051        obj.ccGenericServices = message.ccGenericServices;
  3052      }
  3053      if (message.javaGenericServices === true) {
  3054        obj.javaGenericServices = message.javaGenericServices;
  3055      }
  3056      if (message.pyGenericServices === true) {
  3057        obj.pyGenericServices = message.pyGenericServices;
  3058      }
  3059      if (message.phpGenericServices === true) {
  3060        obj.phpGenericServices = message.phpGenericServices;
  3061      }
  3062      if (message.deprecated === true) {
  3063        obj.deprecated = message.deprecated;
  3064      }
  3065      if (message.ccEnableArenas === true) {
  3066        obj.ccEnableArenas = message.ccEnableArenas;
  3067      }
  3068      if (message.objcClassPrefix !== "") {
  3069        obj.objcClassPrefix = message.objcClassPrefix;
  3070      }
  3071      if (message.csharpNamespace !== "") {
  3072        obj.csharpNamespace = message.csharpNamespace;
  3073      }
  3074      if (message.swiftPrefix !== "") {
  3075        obj.swiftPrefix = message.swiftPrefix;
  3076      }
  3077      if (message.phpClassPrefix !== "") {
  3078        obj.phpClassPrefix = message.phpClassPrefix;
  3079      }
  3080      if (message.phpNamespace !== "") {
  3081        obj.phpNamespace = message.phpNamespace;
  3082      }
  3083      if (message.phpMetadataNamespace !== "") {
  3084        obj.phpMetadataNamespace = message.phpMetadataNamespace;
  3085      }
  3086      if (message.rubyPackage !== "") {
  3087        obj.rubyPackage = message.rubyPackage;
  3088      }
  3089      if (message.uninterpretedOption?.length) {
  3090        obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
  3091      }
  3092      return obj;
  3093    },
  3094  
  3095    create<I extends Exact<DeepPartial<FileOptions>, I>>(base?: I): FileOptions {
  3096      return FileOptions.fromPartial(base ?? ({} as any));
  3097    },
  3098    fromPartial<I extends Exact<DeepPartial<FileOptions>, I>>(object: I): FileOptions {
  3099      const message = createBaseFileOptions() as any;
  3100      message.javaPackage = object.javaPackage ?? "";
  3101      message.javaOuterClassname = object.javaOuterClassname ?? "";
  3102      message.javaMultipleFiles = object.javaMultipleFiles ?? false;
  3103      message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false;
  3104      message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false;
  3105      message.optimizeFor = object.optimizeFor ?? 1;
  3106      message.goPackage = object.goPackage ?? "";
  3107      message.ccGenericServices = object.ccGenericServices ?? false;
  3108      message.javaGenericServices = object.javaGenericServices ?? false;
  3109      message.pyGenericServices = object.pyGenericServices ?? false;
  3110      message.phpGenericServices = object.phpGenericServices ?? false;
  3111      message.deprecated = object.deprecated ?? false;
  3112      message.ccEnableArenas = object.ccEnableArenas ?? false;
  3113      message.objcClassPrefix = object.objcClassPrefix ?? "";
  3114      message.csharpNamespace = object.csharpNamespace ?? "";
  3115      message.swiftPrefix = object.swiftPrefix ?? "";
  3116      message.phpClassPrefix = object.phpClassPrefix ?? "";
  3117      message.phpNamespace = object.phpNamespace ?? "";
  3118      message.phpMetadataNamespace = object.phpMetadataNamespace ?? "";
  3119      message.rubyPackage = object.rubyPackage ?? "";
  3120      message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
  3121      return message;
  3122    },
  3123  };
  3124  
  3125  function createBaseMessageOptions(): MessageOptions {
  3126    return {
  3127      messageSetWireFormat: false,
  3128      noStandardDescriptorAccessor: false,
  3129      deprecated: false,
  3130      mapEntry: false,
  3131      uninterpretedOption: [],
  3132    };
  3133  }
  3134  
  3135  export const MessageOptions = {
  3136    encode(message: MessageOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  3137      if (message.messageSetWireFormat === true) {
  3138        writer.uint32(8).bool(message.messageSetWireFormat);
  3139      }
  3140      if (message.noStandardDescriptorAccessor === true) {
  3141        writer.uint32(16).bool(message.noStandardDescriptorAccessor);
  3142      }
  3143      if (message.deprecated === true) {
  3144        writer.uint32(24).bool(message.deprecated);
  3145      }
  3146      if (message.mapEntry === true) {
  3147        writer.uint32(56).bool(message.mapEntry);
  3148      }
  3149      for (const v of message.uninterpretedOption) {
  3150        UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
  3151      }
  3152      return writer;
  3153    },
  3154  
  3155    decode(input: _m0.Reader | Uint8Array, length?: number): MessageOptions {
  3156      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  3157      let end = length === undefined ? reader.len : reader.pos + length;
  3158      const message = createBaseMessageOptions() as any;
  3159      while (reader.pos < end) {
  3160        const tag = reader.uint32();
  3161        switch (tag >>> 3) {
  3162          case 1:
  3163            if (tag !== 8) {
  3164              break;
  3165            }
  3166  
  3167            message.messageSetWireFormat = reader.bool();
  3168            continue;
  3169          case 2:
  3170            if (tag !== 16) {
  3171              break;
  3172            }
  3173  
  3174            message.noStandardDescriptorAccessor = reader.bool();
  3175            continue;
  3176          case 3:
  3177            if (tag !== 24) {
  3178              break;
  3179            }
  3180  
  3181            message.deprecated = reader.bool();
  3182            continue;
  3183          case 7:
  3184            if (tag !== 56) {
  3185              break;
  3186            }
  3187  
  3188            message.mapEntry = reader.bool();
  3189            continue;
  3190          case 999:
  3191            if (tag !== 7994) {
  3192              break;
  3193            }
  3194  
  3195            message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
  3196            continue;
  3197        }
  3198        if ((tag & 7) === 4 || tag === 0) {
  3199          break;
  3200        }
  3201        reader.skipType(tag & 7);
  3202      }
  3203      return message;
  3204    },
  3205  
  3206    fromJSON(object: any): MessageOptions {
  3207      return {
  3208        messageSetWireFormat: isSet(object.messageSetWireFormat)
  3209          ? globalThis.Boolean(object.messageSetWireFormat)
  3210          : false,
  3211        noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor)
  3212          ? globalThis.Boolean(object.noStandardDescriptorAccessor)
  3213          : false,
  3214        deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
  3215        mapEntry: isSet(object.mapEntry) ? globalThis.Boolean(object.mapEntry) : false,
  3216        uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
  3217          ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
  3218          : [],
  3219      };
  3220    },
  3221  
  3222    toJSON(message: MessageOptions): unknown {
  3223      const obj: any = {};
  3224      if (message.messageSetWireFormat === true) {
  3225        obj.messageSetWireFormat = message.messageSetWireFormat;
  3226      }
  3227      if (message.noStandardDescriptorAccessor === true) {
  3228        obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor;
  3229      }
  3230      if (message.deprecated === true) {
  3231        obj.deprecated = message.deprecated;
  3232      }
  3233      if (message.mapEntry === true) {
  3234        obj.mapEntry = message.mapEntry;
  3235      }
  3236      if (message.uninterpretedOption?.length) {
  3237        obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
  3238      }
  3239      return obj;
  3240    },
  3241  
  3242    create<I extends Exact<DeepPartial<MessageOptions>, I>>(base?: I): MessageOptions {
  3243      return MessageOptions.fromPartial(base ?? ({} as any));
  3244    },
  3245    fromPartial<I extends Exact<DeepPartial<MessageOptions>, I>>(object: I): MessageOptions {
  3246      const message = createBaseMessageOptions() as any;
  3247      message.messageSetWireFormat = object.messageSetWireFormat ?? false;
  3248      message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false;
  3249      message.deprecated = object.deprecated ?? false;
  3250      message.mapEntry = object.mapEntry ?? false;
  3251      message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
  3252      return message;
  3253    },
  3254  };
  3255  
  3256  function createBaseFieldOptions(): FieldOptions {
  3257    return {
  3258      ctype: 0,
  3259      packed: false,
  3260      jstype: 0,
  3261      lazy: false,
  3262      unverifiedLazy: false,
  3263      deprecated: false,
  3264      weak: false,
  3265      uninterpretedOption: [],
  3266    };
  3267  }
  3268  
  3269  export const FieldOptions = {
  3270    encode(message: FieldOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  3271      if (message.ctype !== 0) {
  3272        writer.uint32(8).int32(message.ctype);
  3273      }
  3274      if (message.packed === true) {
  3275        writer.uint32(16).bool(message.packed);
  3276      }
  3277      if (message.jstype !== 0) {
  3278        writer.uint32(48).int32(message.jstype);
  3279      }
  3280      if (message.lazy === true) {
  3281        writer.uint32(40).bool(message.lazy);
  3282      }
  3283      if (message.unverifiedLazy === true) {
  3284        writer.uint32(120).bool(message.unverifiedLazy);
  3285      }
  3286      if (message.deprecated === true) {
  3287        writer.uint32(24).bool(message.deprecated);
  3288      }
  3289      if (message.weak === true) {
  3290        writer.uint32(80).bool(message.weak);
  3291      }
  3292      for (const v of message.uninterpretedOption) {
  3293        UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
  3294      }
  3295      return writer;
  3296    },
  3297  
  3298    decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions {
  3299      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  3300      let end = length === undefined ? reader.len : reader.pos + length;
  3301      const message = createBaseFieldOptions() as any;
  3302      while (reader.pos < end) {
  3303        const tag = reader.uint32();
  3304        switch (tag >>> 3) {
  3305          case 1:
  3306            if (tag !== 8) {
  3307              break;
  3308            }
  3309  
  3310            message.ctype = reader.int32() as any;
  3311            continue;
  3312          case 2:
  3313            if (tag !== 16) {
  3314              break;
  3315            }
  3316  
  3317            message.packed = reader.bool();
  3318            continue;
  3319          case 6:
  3320            if (tag !== 48) {
  3321              break;
  3322            }
  3323  
  3324            message.jstype = reader.int32() as any;
  3325            continue;
  3326          case 5:
  3327            if (tag !== 40) {
  3328              break;
  3329            }
  3330  
  3331            message.lazy = reader.bool();
  3332            continue;
  3333          case 15:
  3334            if (tag !== 120) {
  3335              break;
  3336            }
  3337  
  3338            message.unverifiedLazy = reader.bool();
  3339            continue;
  3340          case 3:
  3341            if (tag !== 24) {
  3342              break;
  3343            }
  3344  
  3345            message.deprecated = reader.bool();
  3346            continue;
  3347          case 10:
  3348            if (tag !== 80) {
  3349              break;
  3350            }
  3351  
  3352            message.weak = reader.bool();
  3353            continue;
  3354          case 999:
  3355            if (tag !== 7994) {
  3356              break;
  3357            }
  3358  
  3359            message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
  3360            continue;
  3361        }
  3362        if ((tag & 7) === 4 || tag === 0) {
  3363          break;
  3364        }
  3365        reader.skipType(tag & 7);
  3366      }
  3367      return message;
  3368    },
  3369  
  3370    fromJSON(object: any): FieldOptions {
  3371      return {
  3372        ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : 0,
  3373        packed: isSet(object.packed) ? globalThis.Boolean(object.packed) : false,
  3374        jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : 0,
  3375        lazy: isSet(object.lazy) ? globalThis.Boolean(object.lazy) : false,
  3376        unverifiedLazy: isSet(object.unverifiedLazy) ? globalThis.Boolean(object.unverifiedLazy) : false,
  3377        deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
  3378        weak: isSet(object.weak) ? globalThis.Boolean(object.weak) : false,
  3379        uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
  3380          ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
  3381          : [],
  3382      };
  3383    },
  3384  
  3385    toJSON(message: FieldOptions): unknown {
  3386      const obj: any = {};
  3387      if (message.ctype !== 0) {
  3388        obj.ctype = fieldOptions_CTypeToJSON(message.ctype);
  3389      }
  3390      if (message.packed === true) {
  3391        obj.packed = message.packed;
  3392      }
  3393      if (message.jstype !== 0) {
  3394        obj.jstype = fieldOptions_JSTypeToJSON(message.jstype);
  3395      }
  3396      if (message.lazy === true) {
  3397        obj.lazy = message.lazy;
  3398      }
  3399      if (message.unverifiedLazy === true) {
  3400        obj.unverifiedLazy = message.unverifiedLazy;
  3401      }
  3402      if (message.deprecated === true) {
  3403        obj.deprecated = message.deprecated;
  3404      }
  3405      if (message.weak === true) {
  3406        obj.weak = message.weak;
  3407      }
  3408      if (message.uninterpretedOption?.length) {
  3409        obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
  3410      }
  3411      return obj;
  3412    },
  3413  
  3414    create<I extends Exact<DeepPartial<FieldOptions>, I>>(base?: I): FieldOptions {
  3415      return FieldOptions.fromPartial(base ?? ({} as any));
  3416    },
  3417    fromPartial<I extends Exact<DeepPartial<FieldOptions>, I>>(object: I): FieldOptions {
  3418      const message = createBaseFieldOptions() as any;
  3419      message.ctype = object.ctype ?? 0;
  3420      message.packed = object.packed ?? false;
  3421      message.jstype = object.jstype ?? 0;
  3422      message.lazy = object.lazy ?? false;
  3423      message.unverifiedLazy = object.unverifiedLazy ?? false;
  3424      message.deprecated = object.deprecated ?? false;
  3425      message.weak = object.weak ?? false;
  3426      message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
  3427      return message;
  3428    },
  3429  };
  3430  
  3431  function createBaseOneofOptions(): OneofOptions {
  3432    return { uninterpretedOption: [] };
  3433  }
  3434  
  3435  export const OneofOptions = {
  3436    encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  3437      for (const v of message.uninterpretedOption) {
  3438        UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
  3439      }
  3440      return writer;
  3441    },
  3442  
  3443    decode(input: _m0.Reader | Uint8Array, length?: number): OneofOptions {
  3444      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  3445      let end = length === undefined ? reader.len : reader.pos + length;
  3446      const message = createBaseOneofOptions() as any;
  3447      while (reader.pos < end) {
  3448        const tag = reader.uint32();
  3449        switch (tag >>> 3) {
  3450          case 999:
  3451            if (tag !== 7994) {
  3452              break;
  3453            }
  3454  
  3455            message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
  3456            continue;
  3457        }
  3458        if ((tag & 7) === 4 || tag === 0) {
  3459          break;
  3460        }
  3461        reader.skipType(tag & 7);
  3462      }
  3463      return message;
  3464    },
  3465  
  3466    fromJSON(object: any): OneofOptions {
  3467      return {
  3468        uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
  3469          ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
  3470          : [],
  3471      };
  3472    },
  3473  
  3474    toJSON(message: OneofOptions): unknown {
  3475      const obj: any = {};
  3476      if (message.uninterpretedOption?.length) {
  3477        obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
  3478      }
  3479      return obj;
  3480    },
  3481  
  3482    create<I extends Exact<DeepPartial<OneofOptions>, I>>(base?: I): OneofOptions {
  3483      return OneofOptions.fromPartial(base ?? ({} as any));
  3484    },
  3485    fromPartial<I extends Exact<DeepPartial<OneofOptions>, I>>(object: I): OneofOptions {
  3486      const message = createBaseOneofOptions() as any;
  3487      message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
  3488      return message;
  3489    },
  3490  };
  3491  
  3492  function createBaseEnumOptions(): EnumOptions {
  3493    return { allowAlias: false, deprecated: false, uninterpretedOption: [] };
  3494  }
  3495  
  3496  export const EnumOptions = {
  3497    encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  3498      if (message.allowAlias === true) {
  3499        writer.uint32(16).bool(message.allowAlias);
  3500      }
  3501      if (message.deprecated === true) {
  3502        writer.uint32(24).bool(message.deprecated);
  3503      }
  3504      for (const v of message.uninterpretedOption) {
  3505        UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
  3506      }
  3507      return writer;
  3508    },
  3509  
  3510    decode(input: _m0.Reader | Uint8Array, length?: number): EnumOptions {
  3511      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  3512      let end = length === undefined ? reader.len : reader.pos + length;
  3513      const message = createBaseEnumOptions() as any;
  3514      while (reader.pos < end) {
  3515        const tag = reader.uint32();
  3516        switch (tag >>> 3) {
  3517          case 2:
  3518            if (tag !== 16) {
  3519              break;
  3520            }
  3521  
  3522            message.allowAlias = reader.bool();
  3523            continue;
  3524          case 3:
  3525            if (tag !== 24) {
  3526              break;
  3527            }
  3528  
  3529            message.deprecated = reader.bool();
  3530            continue;
  3531          case 999:
  3532            if (tag !== 7994) {
  3533              break;
  3534            }
  3535  
  3536            message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
  3537            continue;
  3538        }
  3539        if ((tag & 7) === 4 || tag === 0) {
  3540          break;
  3541        }
  3542        reader.skipType(tag & 7);
  3543      }
  3544      return message;
  3545    },
  3546  
  3547    fromJSON(object: any): EnumOptions {
  3548      return {
  3549        allowAlias: isSet(object.allowAlias) ? globalThis.Boolean(object.allowAlias) : false,
  3550        deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
  3551        uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
  3552          ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
  3553          : [],
  3554      };
  3555    },
  3556  
  3557    toJSON(message: EnumOptions): unknown {
  3558      const obj: any = {};
  3559      if (message.allowAlias === true) {
  3560        obj.allowAlias = message.allowAlias;
  3561      }
  3562      if (message.deprecated === true) {
  3563        obj.deprecated = message.deprecated;
  3564      }
  3565      if (message.uninterpretedOption?.length) {
  3566        obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
  3567      }
  3568      return obj;
  3569    },
  3570  
  3571    create<I extends Exact<DeepPartial<EnumOptions>, I>>(base?: I): EnumOptions {
  3572      return EnumOptions.fromPartial(base ?? ({} as any));
  3573    },
  3574    fromPartial<I extends Exact<DeepPartial<EnumOptions>, I>>(object: I): EnumOptions {
  3575      const message = createBaseEnumOptions() as any;
  3576      message.allowAlias = object.allowAlias ?? false;
  3577      message.deprecated = object.deprecated ?? false;
  3578      message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
  3579      return message;
  3580    },
  3581  };
  3582  
  3583  function createBaseEnumValueOptions(): EnumValueOptions {
  3584    return { deprecated: false, uninterpretedOption: [] };
  3585  }
  3586  
  3587  export const EnumValueOptions = {
  3588    encode(message: EnumValueOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  3589      if (message.deprecated === true) {
  3590        writer.uint32(8).bool(message.deprecated);
  3591      }
  3592      for (const v of message.uninterpretedOption) {
  3593        UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
  3594      }
  3595      return writer;
  3596    },
  3597  
  3598    decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueOptions {
  3599      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  3600      let end = length === undefined ? reader.len : reader.pos + length;
  3601      const message = createBaseEnumValueOptions() as any;
  3602      while (reader.pos < end) {
  3603        const tag = reader.uint32();
  3604        switch (tag >>> 3) {
  3605          case 1:
  3606            if (tag !== 8) {
  3607              break;
  3608            }
  3609  
  3610            message.deprecated = reader.bool();
  3611            continue;
  3612          case 999:
  3613            if (tag !== 7994) {
  3614              break;
  3615            }
  3616  
  3617            message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
  3618            continue;
  3619        }
  3620        if ((tag & 7) === 4 || tag === 0) {
  3621          break;
  3622        }
  3623        reader.skipType(tag & 7);
  3624      }
  3625      return message;
  3626    },
  3627  
  3628    fromJSON(object: any): EnumValueOptions {
  3629      return {
  3630        deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
  3631        uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
  3632          ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
  3633          : [],
  3634      };
  3635    },
  3636  
  3637    toJSON(message: EnumValueOptions): unknown {
  3638      const obj: any = {};
  3639      if (message.deprecated === true) {
  3640        obj.deprecated = message.deprecated;
  3641      }
  3642      if (message.uninterpretedOption?.length) {
  3643        obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
  3644      }
  3645      return obj;
  3646    },
  3647  
  3648    create<I extends Exact<DeepPartial<EnumValueOptions>, I>>(base?: I): EnumValueOptions {
  3649      return EnumValueOptions.fromPartial(base ?? ({} as any));
  3650    },
  3651    fromPartial<I extends Exact<DeepPartial<EnumValueOptions>, I>>(object: I): EnumValueOptions {
  3652      const message = createBaseEnumValueOptions() as any;
  3653      message.deprecated = object.deprecated ?? false;
  3654      message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
  3655      return message;
  3656    },
  3657  };
  3658  
  3659  function createBaseServiceOptions(): ServiceOptions {
  3660    return { deprecated: false, uninterpretedOption: [] };
  3661  }
  3662  
  3663  export const ServiceOptions = {
  3664    encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  3665      if (message.deprecated === true) {
  3666        writer.uint32(264).bool(message.deprecated);
  3667      }
  3668      for (const v of message.uninterpretedOption) {
  3669        UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
  3670      }
  3671      return writer;
  3672    },
  3673  
  3674    decode(input: _m0.Reader | Uint8Array, length?: number): ServiceOptions {
  3675      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  3676      let end = length === undefined ? reader.len : reader.pos + length;
  3677      const message = createBaseServiceOptions() as any;
  3678      while (reader.pos < end) {
  3679        const tag = reader.uint32();
  3680        switch (tag >>> 3) {
  3681          case 33:
  3682            if (tag !== 264) {
  3683              break;
  3684            }
  3685  
  3686            message.deprecated = reader.bool();
  3687            continue;
  3688          case 999:
  3689            if (tag !== 7994) {
  3690              break;
  3691            }
  3692  
  3693            message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
  3694            continue;
  3695        }
  3696        if ((tag & 7) === 4 || tag === 0) {
  3697          break;
  3698        }
  3699        reader.skipType(tag & 7);
  3700      }
  3701      return message;
  3702    },
  3703  
  3704    fromJSON(object: any): ServiceOptions {
  3705      return {
  3706        deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
  3707        uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
  3708          ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
  3709          : [],
  3710      };
  3711    },
  3712  
  3713    toJSON(message: ServiceOptions): unknown {
  3714      const obj: any = {};
  3715      if (message.deprecated === true) {
  3716        obj.deprecated = message.deprecated;
  3717      }
  3718      if (message.uninterpretedOption?.length) {
  3719        obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
  3720      }
  3721      return obj;
  3722    },
  3723  
  3724    create<I extends Exact<DeepPartial<ServiceOptions>, I>>(base?: I): ServiceOptions {
  3725      return ServiceOptions.fromPartial(base ?? ({} as any));
  3726    },
  3727    fromPartial<I extends Exact<DeepPartial<ServiceOptions>, I>>(object: I): ServiceOptions {
  3728      const message = createBaseServiceOptions() as any;
  3729      message.deprecated = object.deprecated ?? false;
  3730      message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
  3731      return message;
  3732    },
  3733  };
  3734  
  3735  function createBaseMethodOptions(): MethodOptions {
  3736    return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] };
  3737  }
  3738  
  3739  export const MethodOptions = {
  3740    encode(message: MethodOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  3741      if (message.deprecated === true) {
  3742        writer.uint32(264).bool(message.deprecated);
  3743      }
  3744      if (message.idempotencyLevel !== 0) {
  3745        writer.uint32(272).int32(message.idempotencyLevel);
  3746      }
  3747      for (const v of message.uninterpretedOption) {
  3748        UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
  3749      }
  3750      return writer;
  3751    },
  3752  
  3753    decode(input: _m0.Reader | Uint8Array, length?: number): MethodOptions {
  3754      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  3755      let end = length === undefined ? reader.len : reader.pos + length;
  3756      const message = createBaseMethodOptions() as any;
  3757      while (reader.pos < end) {
  3758        const tag = reader.uint32();
  3759        switch (tag >>> 3) {
  3760          case 33:
  3761            if (tag !== 264) {
  3762              break;
  3763            }
  3764  
  3765            message.deprecated = reader.bool();
  3766            continue;
  3767          case 34:
  3768            if (tag !== 272) {
  3769              break;
  3770            }
  3771  
  3772            message.idempotencyLevel = reader.int32() as any;
  3773            continue;
  3774          case 999:
  3775            if (tag !== 7994) {
  3776              break;
  3777            }
  3778  
  3779            message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
  3780            continue;
  3781        }
  3782        if ((tag & 7) === 4 || tag === 0) {
  3783          break;
  3784        }
  3785        reader.skipType(tag & 7);
  3786      }
  3787      return message;
  3788    },
  3789  
  3790    fromJSON(object: any): MethodOptions {
  3791      return {
  3792        deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
  3793        idempotencyLevel: isSet(object.idempotencyLevel)
  3794          ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel)
  3795          : 0,
  3796        uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
  3797          ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
  3798          : [],
  3799      };
  3800    },
  3801  
  3802    toJSON(message: MethodOptions): unknown {
  3803      const obj: any = {};
  3804      if (message.deprecated === true) {
  3805        obj.deprecated = message.deprecated;
  3806      }
  3807      if (message.idempotencyLevel !== 0) {
  3808        obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel);
  3809      }
  3810      if (message.uninterpretedOption?.length) {
  3811        obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
  3812      }
  3813      return obj;
  3814    },
  3815  
  3816    create<I extends Exact<DeepPartial<MethodOptions>, I>>(base?: I): MethodOptions {
  3817      return MethodOptions.fromPartial(base ?? ({} as any));
  3818    },
  3819    fromPartial<I extends Exact<DeepPartial<MethodOptions>, I>>(object: I): MethodOptions {
  3820      const message = createBaseMethodOptions() as any;
  3821      message.deprecated = object.deprecated ?? false;
  3822      message.idempotencyLevel = object.idempotencyLevel ?? 0;
  3823      message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
  3824      return message;
  3825    },
  3826  };
  3827  
  3828  function createBaseUninterpretedOption(): UninterpretedOption {
  3829    return {
  3830      name: [],
  3831      identifierValue: "",
  3832      positiveIntValue: "0",
  3833      negativeIntValue: "0",
  3834      doubleValue: 0,
  3835      stringValue: new Uint8Array(0),
  3836      aggregateValue: "",
  3837    };
  3838  }
  3839  
  3840  export const UninterpretedOption = {
  3841    encode(message: UninterpretedOption, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  3842      for (const v of message.name) {
  3843        UninterpretedOption_NamePart.encode(v!, writer.uint32(18).fork()).ldelim();
  3844      }
  3845      if (message.identifierValue !== "") {
  3846        writer.uint32(26).string(message.identifierValue);
  3847      }
  3848      if (message.positiveIntValue !== "0") {
  3849        writer.uint32(32).uint64(message.positiveIntValue);
  3850      }
  3851      if (message.negativeIntValue !== "0") {
  3852        writer.uint32(40).int64(message.negativeIntValue);
  3853      }
  3854      if (message.doubleValue !== 0) {
  3855        writer.uint32(49).double(message.doubleValue);
  3856      }
  3857      if (message.stringValue.length !== 0) {
  3858        writer.uint32(58).bytes(message.stringValue);
  3859      }
  3860      if (message.aggregateValue !== "") {
  3861        writer.uint32(66).string(message.aggregateValue);
  3862      }
  3863      return writer;
  3864    },
  3865  
  3866    decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption {
  3867      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  3868      let end = length === undefined ? reader.len : reader.pos + length;
  3869      const message = createBaseUninterpretedOption() as any;
  3870      while (reader.pos < end) {
  3871        const tag = reader.uint32();
  3872        switch (tag >>> 3) {
  3873          case 2:
  3874            if (tag !== 18) {
  3875              break;
  3876            }
  3877  
  3878            message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32()));
  3879            continue;
  3880          case 3:
  3881            if (tag !== 26) {
  3882              break;
  3883            }
  3884  
  3885            message.identifierValue = reader.string();
  3886            continue;
  3887          case 4:
  3888            if (tag !== 32) {
  3889              break;
  3890            }
  3891  
  3892            message.positiveIntValue = longToString(reader.uint64() as Long);
  3893            continue;
  3894          case 5:
  3895            if (tag !== 40) {
  3896              break;
  3897            }
  3898  
  3899            message.negativeIntValue = longToString(reader.int64() as Long);
  3900            continue;
  3901          case 6:
  3902            if (tag !== 49) {
  3903              break;
  3904            }
  3905  
  3906            message.doubleValue = reader.double();
  3907            continue;
  3908          case 7:
  3909            if (tag !== 58) {
  3910              break;
  3911            }
  3912  
  3913            message.stringValue = reader.bytes();
  3914            continue;
  3915          case 8:
  3916            if (tag !== 66) {
  3917              break;
  3918            }
  3919  
  3920            message.aggregateValue = reader.string();
  3921            continue;
  3922        }
  3923        if ((tag & 7) === 4 || tag === 0) {
  3924          break;
  3925        }
  3926        reader.skipType(tag & 7);
  3927      }
  3928      return message;
  3929    },
  3930  
  3931    fromJSON(object: any): UninterpretedOption {
  3932      return {
  3933        name: globalThis.Array.isArray(object?.name)
  3934          ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e))
  3935          : [],
  3936        identifierValue: isSet(object.identifierValue) ? globalThis.String(object.identifierValue) : "",
  3937        positiveIntValue: isSet(object.positiveIntValue) ? globalThis.String(object.positiveIntValue) : "0",
  3938        negativeIntValue: isSet(object.negativeIntValue) ? globalThis.String(object.negativeIntValue) : "0",
  3939        doubleValue: isSet(object.doubleValue) ? globalThis.Number(object.doubleValue) : 0,
  3940        stringValue: isSet(object.stringValue) ? bytesFromBase64(object.stringValue) : new Uint8Array(0),
  3941        aggregateValue: isSet(object.aggregateValue) ? globalThis.String(object.aggregateValue) : "",
  3942      };
  3943    },
  3944  
  3945    toJSON(message: UninterpretedOption): unknown {
  3946      const obj: any = {};
  3947      if (message.name?.length) {
  3948        obj.name = message.name.map((e) => UninterpretedOption_NamePart.toJSON(e));
  3949      }
  3950      if (message.identifierValue !== "") {
  3951        obj.identifierValue = message.identifierValue;
  3952      }
  3953      if (message.positiveIntValue !== "0") {
  3954        obj.positiveIntValue = message.positiveIntValue;
  3955      }
  3956      if (message.negativeIntValue !== "0") {
  3957        obj.negativeIntValue = message.negativeIntValue;
  3958      }
  3959      if (message.doubleValue !== 0) {
  3960        obj.doubleValue = message.doubleValue;
  3961      }
  3962      if (message.stringValue.length !== 0) {
  3963        obj.stringValue = base64FromBytes(message.stringValue);
  3964      }
  3965      if (message.aggregateValue !== "") {
  3966        obj.aggregateValue = message.aggregateValue;
  3967      }
  3968      return obj;
  3969    },
  3970  
  3971    create<I extends Exact<DeepPartial<UninterpretedOption>, I>>(base?: I): UninterpretedOption {
  3972      return UninterpretedOption.fromPartial(base ?? ({} as any));
  3973    },
  3974    fromPartial<I extends Exact<DeepPartial<UninterpretedOption>, I>>(object: I): UninterpretedOption {
  3975      const message = createBaseUninterpretedOption() as any;
  3976      message.name = object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || [];
  3977      message.identifierValue = object.identifierValue ?? "";
  3978      message.positiveIntValue = object.positiveIntValue ?? "0";
  3979      message.negativeIntValue = object.negativeIntValue ?? "0";
  3980      message.doubleValue = object.doubleValue ?? 0;
  3981      message.stringValue = object.stringValue ?? new Uint8Array(0);
  3982      message.aggregateValue = object.aggregateValue ?? "";
  3983      return message;
  3984    },
  3985  };
  3986  
  3987  function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart {
  3988    return { namePart: "", isExtension: false };
  3989  }
  3990  
  3991  export const UninterpretedOption_NamePart = {
  3992    encode(message: UninterpretedOption_NamePart, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  3993      if (message.namePart !== "") {
  3994        writer.uint32(10).string(message.namePart);
  3995      }
  3996      if (message.isExtension === true) {
  3997        writer.uint32(16).bool(message.isExtension);
  3998      }
  3999      return writer;
  4000    },
  4001  
  4002    decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption_NamePart {
  4003      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  4004      let end = length === undefined ? reader.len : reader.pos + length;
  4005      const message = createBaseUninterpretedOption_NamePart() as any;
  4006      while (reader.pos < end) {
  4007        const tag = reader.uint32();
  4008        switch (tag >>> 3) {
  4009          case 1:
  4010            if (tag !== 10) {
  4011              break;
  4012            }
  4013  
  4014            message.namePart = reader.string();
  4015            continue;
  4016          case 2:
  4017            if (tag !== 16) {
  4018              break;
  4019            }
  4020  
  4021            message.isExtension = reader.bool();
  4022            continue;
  4023        }
  4024        if ((tag & 7) === 4 || tag === 0) {
  4025          break;
  4026        }
  4027        reader.skipType(tag & 7);
  4028      }
  4029      return message;
  4030    },
  4031  
  4032    fromJSON(object: any): UninterpretedOption_NamePart {
  4033      return {
  4034        namePart: isSet(object.namePart) ? globalThis.String(object.namePart) : "",
  4035        isExtension: isSet(object.isExtension) ? globalThis.Boolean(object.isExtension) : false,
  4036      };
  4037    },
  4038  
  4039    toJSON(message: UninterpretedOption_NamePart): unknown {
  4040      const obj: any = {};
  4041      if (message.namePart !== "") {
  4042        obj.namePart = message.namePart;
  4043      }
  4044      if (message.isExtension === true) {
  4045        obj.isExtension = message.isExtension;
  4046      }
  4047      return obj;
  4048    },
  4049  
  4050    create<I extends Exact<DeepPartial<UninterpretedOption_NamePart>, I>>(base?: I): UninterpretedOption_NamePart {
  4051      return UninterpretedOption_NamePart.fromPartial(base ?? ({} as any));
  4052    },
  4053    fromPartial<I extends Exact<DeepPartial<UninterpretedOption_NamePart>, I>>(object: I): UninterpretedOption_NamePart {
  4054      const message = createBaseUninterpretedOption_NamePart() as any;
  4055      message.namePart = object.namePart ?? "";
  4056      message.isExtension = object.isExtension ?? false;
  4057      return message;
  4058    },
  4059  };
  4060  
  4061  function createBaseSourceCodeInfo(): SourceCodeInfo {
  4062    return { location: [] };
  4063  }
  4064  
  4065  export const SourceCodeInfo = {
  4066    encode(message: SourceCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  4067      for (const v of message.location) {
  4068        SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim();
  4069      }
  4070      return writer;
  4071    },
  4072  
  4073    decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo {
  4074      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  4075      let end = length === undefined ? reader.len : reader.pos + length;
  4076      const message = createBaseSourceCodeInfo() as any;
  4077      while (reader.pos < end) {
  4078        const tag = reader.uint32();
  4079        switch (tag >>> 3) {
  4080          case 1:
  4081            if (tag !== 10) {
  4082              break;
  4083            }
  4084  
  4085            message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32()));
  4086            continue;
  4087        }
  4088        if ((tag & 7) === 4 || tag === 0) {
  4089          break;
  4090        }
  4091        reader.skipType(tag & 7);
  4092      }
  4093      return message;
  4094    },
  4095  
  4096    fromJSON(object: any): SourceCodeInfo {
  4097      return {
  4098        location: globalThis.Array.isArray(object?.location)
  4099          ? object.location.map((e: any) => SourceCodeInfo_Location.fromJSON(e))
  4100          : [],
  4101      };
  4102    },
  4103  
  4104    toJSON(message: SourceCodeInfo): unknown {
  4105      const obj: any = {};
  4106      if (message.location?.length) {
  4107        obj.location = message.location.map((e) => SourceCodeInfo_Location.toJSON(e));
  4108      }
  4109      return obj;
  4110    },
  4111  
  4112    create<I extends Exact<DeepPartial<SourceCodeInfo>, I>>(base?: I): SourceCodeInfo {
  4113      return SourceCodeInfo.fromPartial(base ?? ({} as any));
  4114    },
  4115    fromPartial<I extends Exact<DeepPartial<SourceCodeInfo>, I>>(object: I): SourceCodeInfo {
  4116      const message = createBaseSourceCodeInfo() as any;
  4117      message.location = object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || [];
  4118      return message;
  4119    },
  4120  };
  4121  
  4122  function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location {
  4123    return { path: [], span: [], leadingComments: "", trailingComments: "", leadingDetachedComments: [] };
  4124  }
  4125  
  4126  export const SourceCodeInfo_Location = {
  4127    encode(message: SourceCodeInfo_Location, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  4128      writer.uint32(10).fork();
  4129      for (const v of message.path) {
  4130        writer.int32(v);
  4131      }
  4132      writer.ldelim();
  4133      writer.uint32(18).fork();
  4134      for (const v of message.span) {
  4135        writer.int32(v);
  4136      }
  4137      writer.ldelim();
  4138      if (message.leadingComments !== "") {
  4139        writer.uint32(26).string(message.leadingComments);
  4140      }
  4141      if (message.trailingComments !== "") {
  4142        writer.uint32(34).string(message.trailingComments);
  4143      }
  4144      for (const v of message.leadingDetachedComments) {
  4145        writer.uint32(50).string(v!);
  4146      }
  4147      return writer;
  4148    },
  4149  
  4150    decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo_Location {
  4151      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  4152      let end = length === undefined ? reader.len : reader.pos + length;
  4153      const message = createBaseSourceCodeInfo_Location() as any;
  4154      while (reader.pos < end) {
  4155        const tag = reader.uint32();
  4156        switch (tag >>> 3) {
  4157          case 1:
  4158            if (tag === 8) {
  4159              message.path.push(reader.int32());
  4160  
  4161              continue;
  4162            }
  4163  
  4164            if (tag === 10) {
  4165              const end2 = reader.uint32() + reader.pos;
  4166              while (reader.pos < end2) {
  4167                message.path.push(reader.int32());
  4168              }
  4169  
  4170              continue;
  4171            }
  4172  
  4173            break;
  4174          case 2:
  4175            if (tag === 16) {
  4176              message.span.push(reader.int32());
  4177  
  4178              continue;
  4179            }
  4180  
  4181            if (tag === 18) {
  4182              const end2 = reader.uint32() + reader.pos;
  4183              while (reader.pos < end2) {
  4184                message.span.push(reader.int32());
  4185              }
  4186  
  4187              continue;
  4188            }
  4189  
  4190            break;
  4191          case 3:
  4192            if (tag !== 26) {
  4193              break;
  4194            }
  4195  
  4196            message.leadingComments = reader.string();
  4197            continue;
  4198          case 4:
  4199            if (tag !== 34) {
  4200              break;
  4201            }
  4202  
  4203            message.trailingComments = reader.string();
  4204            continue;
  4205          case 6:
  4206            if (tag !== 50) {
  4207              break;
  4208            }
  4209  
  4210            message.leadingDetachedComments.push(reader.string());
  4211            continue;
  4212        }
  4213        if ((tag & 7) === 4 || tag === 0) {
  4214          break;
  4215        }
  4216        reader.skipType(tag & 7);
  4217      }
  4218      return message;
  4219    },
  4220  
  4221    fromJSON(object: any): SourceCodeInfo_Location {
  4222      return {
  4223        path: globalThis.Array.isArray(object?.path) ? object.path.map((e: any) => globalThis.Number(e)) : [],
  4224        span: globalThis.Array.isArray(object?.span) ? object.span.map((e: any) => globalThis.Number(e)) : [],
  4225        leadingComments: isSet(object.leadingComments) ? globalThis.String(object.leadingComments) : "",
  4226        trailingComments: isSet(object.trailingComments) ? globalThis.String(object.trailingComments) : "",
  4227        leadingDetachedComments: globalThis.Array.isArray(object?.leadingDetachedComments)
  4228          ? object.leadingDetachedComments.map((e: any) => globalThis.String(e))
  4229          : [],
  4230      };
  4231    },
  4232  
  4233    toJSON(message: SourceCodeInfo_Location): unknown {
  4234      const obj: any = {};
  4235      if (message.path?.length) {
  4236        obj.path = message.path.map((e) => Math.round(e));
  4237      }
  4238      if (message.span?.length) {
  4239        obj.span = message.span.map((e) => Math.round(e));
  4240      }
  4241      if (message.leadingComments !== "") {
  4242        obj.leadingComments = message.leadingComments;
  4243      }
  4244      if (message.trailingComments !== "") {
  4245        obj.trailingComments = message.trailingComments;
  4246      }
  4247      if (message.leadingDetachedComments?.length) {
  4248        obj.leadingDetachedComments = message.leadingDetachedComments;
  4249      }
  4250      return obj;
  4251    },
  4252  
  4253    create<I extends Exact<DeepPartial<SourceCodeInfo_Location>, I>>(base?: I): SourceCodeInfo_Location {
  4254      return SourceCodeInfo_Location.fromPartial(base ?? ({} as any));
  4255    },
  4256    fromPartial<I extends Exact<DeepPartial<SourceCodeInfo_Location>, I>>(object: I): SourceCodeInfo_Location {
  4257      const message = createBaseSourceCodeInfo_Location() as any;
  4258      message.path = object.path?.map((e) => e) || [];
  4259      message.span = object.span?.map((e) => e) || [];
  4260      message.leadingComments = object.leadingComments ?? "";
  4261      message.trailingComments = object.trailingComments ?? "";
  4262      message.leadingDetachedComments = object.leadingDetachedComments?.map((e) => e) || [];
  4263      return message;
  4264    },
  4265  };
  4266  
  4267  function createBaseGeneratedCodeInfo(): GeneratedCodeInfo {
  4268    return { annotation: [] };
  4269  }
  4270  
  4271  export const GeneratedCodeInfo = {
  4272    encode(message: GeneratedCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  4273      for (const v of message.annotation) {
  4274        GeneratedCodeInfo_Annotation.encode(v!, writer.uint32(10).fork()).ldelim();
  4275      }
  4276      return writer;
  4277    },
  4278  
  4279    decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo {
  4280      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  4281      let end = length === undefined ? reader.len : reader.pos + length;
  4282      const message = createBaseGeneratedCodeInfo() as any;
  4283      while (reader.pos < end) {
  4284        const tag = reader.uint32();
  4285        switch (tag >>> 3) {
  4286          case 1:
  4287            if (tag !== 10) {
  4288              break;
  4289            }
  4290  
  4291            message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()));
  4292            continue;
  4293        }
  4294        if ((tag & 7) === 4 || tag === 0) {
  4295          break;
  4296        }
  4297        reader.skipType(tag & 7);
  4298      }
  4299      return message;
  4300    },
  4301  
  4302    fromJSON(object: any): GeneratedCodeInfo {
  4303      return {
  4304        annotation: globalThis.Array.isArray(object?.annotation)
  4305          ? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromJSON(e))
  4306          : [],
  4307      };
  4308    },
  4309  
  4310    toJSON(message: GeneratedCodeInfo): unknown {
  4311      const obj: any = {};
  4312      if (message.annotation?.length) {
  4313        obj.annotation = message.annotation.map((e) => GeneratedCodeInfo_Annotation.toJSON(e));
  4314      }
  4315      return obj;
  4316    },
  4317  
  4318    create<I extends Exact<DeepPartial<GeneratedCodeInfo>, I>>(base?: I): GeneratedCodeInfo {
  4319      return GeneratedCodeInfo.fromPartial(base ?? ({} as any));
  4320    },
  4321    fromPartial<I extends Exact<DeepPartial<GeneratedCodeInfo>, I>>(object: I): GeneratedCodeInfo {
  4322      const message = createBaseGeneratedCodeInfo() as any;
  4323      message.annotation = object.annotation?.map((e) => GeneratedCodeInfo_Annotation.fromPartial(e)) || [];
  4324      return message;
  4325    },
  4326  };
  4327  
  4328  function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation {
  4329    return { path: [], sourceFile: "", begin: 0, end: 0 };
  4330  }
  4331  
  4332  export const GeneratedCodeInfo_Annotation = {
  4333    encode(message: GeneratedCodeInfo_Annotation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
  4334      writer.uint32(10).fork();
  4335      for (const v of message.path) {
  4336        writer.int32(v);
  4337      }
  4338      writer.ldelim();
  4339      if (message.sourceFile !== "") {
  4340        writer.uint32(18).string(message.sourceFile);
  4341      }
  4342      if (message.begin !== 0) {
  4343        writer.uint32(24).int32(message.begin);
  4344      }
  4345      if (message.end !== 0) {
  4346        writer.uint32(32).int32(message.end);
  4347      }
  4348      return writer;
  4349    },
  4350  
  4351    decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation {
  4352      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
  4353      let end = length === undefined ? reader.len : reader.pos + length;
  4354      const message = createBaseGeneratedCodeInfo_Annotation() as any;
  4355      while (reader.pos < end) {
  4356        const tag = reader.uint32();
  4357        switch (tag >>> 3) {
  4358          case 1:
  4359            if (tag === 8) {
  4360              message.path.push(reader.int32());
  4361  
  4362              continue;
  4363            }
  4364  
  4365            if (tag === 10) {
  4366              const end2 = reader.uint32() + reader.pos;
  4367              while (reader.pos < end2) {
  4368                message.path.push(reader.int32());
  4369              }
  4370  
  4371              continue;
  4372            }
  4373  
  4374            break;
  4375          case 2:
  4376            if (tag !== 18) {
  4377              break;
  4378            }
  4379  
  4380            message.sourceFile = reader.string();
  4381            continue;
  4382          case 3:
  4383            if (tag !== 24) {
  4384              break;
  4385            }
  4386  
  4387            message.begin = reader.int32();
  4388            continue;
  4389          case 4:
  4390            if (tag !== 32) {
  4391              break;
  4392            }
  4393  
  4394            message.end = reader.int32();
  4395            continue;
  4396        }
  4397        if ((tag & 7) === 4 || tag === 0) {
  4398          break;
  4399        }
  4400        reader.skipType(tag & 7);
  4401      }
  4402      return message;
  4403    },
  4404  
  4405    fromJSON(object: any): GeneratedCodeInfo_Annotation {
  4406      return {
  4407        path: globalThis.Array.isArray(object?.path) ? object.path.map((e: any) => globalThis.Number(e)) : [],
  4408        sourceFile: isSet(object.sourceFile) ? globalThis.String(object.sourceFile) : "",
  4409        begin: isSet(object.begin) ? globalThis.Number(object.begin) : 0,
  4410        end: isSet(object.end) ? globalThis.Number(object.end) : 0,
  4411      };
  4412    },
  4413  
  4414    toJSON(message: GeneratedCodeInfo_Annotation): unknown {
  4415      const obj: any = {};
  4416      if (message.path?.length) {
  4417        obj.path = message.path.map((e) => Math.round(e));
  4418      }
  4419      if (message.sourceFile !== "") {
  4420        obj.sourceFile = message.sourceFile;
  4421      }
  4422      if (message.begin !== 0) {
  4423        obj.begin = Math.round(message.begin);
  4424      }
  4425      if (message.end !== 0) {
  4426        obj.end = Math.round(message.end);
  4427      }
  4428      return obj;
  4429    },
  4430  
  4431    create<I extends Exact<DeepPartial<GeneratedCodeInfo_Annotation>, I>>(base?: I): GeneratedCodeInfo_Annotation {
  4432      return GeneratedCodeInfo_Annotation.fromPartial(base ?? ({} as any));
  4433    },
  4434    fromPartial<I extends Exact<DeepPartial<GeneratedCodeInfo_Annotation>, I>>(object: I): GeneratedCodeInfo_Annotation {
  4435      const message = createBaseGeneratedCodeInfo_Annotation() as any;
  4436      message.path = object.path?.map((e) => e) || [];
  4437      message.sourceFile = object.sourceFile ?? "";
  4438      message.begin = object.begin ?? 0;
  4439      message.end = object.end ?? 0;
  4440      return message;
  4441    },
  4442  };
  4443  
  4444  function bytesFromBase64(b64: string): Uint8Array {
  4445    if (globalThis.Buffer) {
  4446      return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
  4447    } else {
  4448      const bin = globalThis.atob(b64);
  4449      const arr = new Uint8Array(bin.length);
  4450      for (let i = 0; i < bin.length; ++i) {
  4451        arr[i] = bin.charCodeAt(i);
  4452      }
  4453      return arr;
  4454    }
  4455  }
  4456  
  4457  function base64FromBytes(arr: Uint8Array): string {
  4458    if (globalThis.Buffer) {
  4459      return globalThis.Buffer.from(arr).toString("base64");
  4460    } else {
  4461      const bin: string[] = [];
  4462      arr.forEach((byte) => {
  4463        bin.push(globalThis.String.fromCharCode(byte));
  4464      });
  4465      return globalThis.btoa(bin.join(""));
  4466    }
  4467  }
  4468  
  4469  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
  4470  
  4471  export type DeepPartial<T> = T extends Builtin ? T
  4472    : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
  4473    : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
  4474    : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
  4475    : Partial<T>;
  4476  
  4477  type KeysOfUnion<T> = T extends T ? keyof T : never;
  4478  export type Exact<P, I extends P> = P extends Builtin ? P
  4479    : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
  4480  
  4481  function longToString(long: Long) {
  4482    return long.toString();
  4483  }
  4484  
  4485  if (_m0.util.Long !== Long) {
  4486    _m0.util.Long = Long as any;
  4487    _m0.configure();
  4488  }
  4489  
  4490  function isSet(value: any): boolean {
  4491    return value !== null && value !== undefined;
  4492  }