[
  {
    "path": ".github/dependabot.yml",
    "content": "# Dependabot configuration file.\n# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates\n\nversion: 2\nupdates:\n- package-ecosystem: \"github-actions\"\n  directory: \"/\"\n  schedule:\n    interval: \"monthly\"\n"
  },
  {
    "path": ".github/workflows/benchmark.yaml",
    "content": "name: benchmarks\npermissions: read-all\n\non:\n  pull_request:\n  push:\n    branches: [master]\n  schedule:\n    - cron: \"0 0 * * 0\" # weekly\n\ndefaults:\n  run:\n    working-directory: benchmarks\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        sdk: [dev]\n\n    steps:\n      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8\n      - uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260\n        with:\n          sdk: ${{matrix.sdk}}\n\n      - run: ../tool/setup.sh\n\n      - run: dart pub get\n\n      - run: ./tool/compile_protos.sh\n\n      - run: dart analyze --fatal-infos\n\n      - run: dart format --output=none --set-exit-if-changed .\n        if: ${{ matrix.sdk == 'dev' }}\n\n      - run: dart tool/compile_benchmarks.dart\n"
  },
  {
    "path": ".github/workflows/post_summaries.yaml",
    "content": "name: Comment on the pull request\n\non:\n  # Trigger this workflow after the Publish workflow completes. This workflow\n  # will have permissions to do things like create comments on the PR, even if\n  # the original workflow couldn't.\n  workflow_run:\n    workflows:\n      - Publish\n    types:\n      - completed\n\njobs:\n  upload:\n    uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main\n    permissions:\n      pull-requests: write\n"
  },
  {
    "path": ".github/workflows/protobuf.yaml",
    "content": "name: protobuf\npermissions: read-all\n\non:\n  pull_request:\n  push:\n    branches: [master]\n  schedule:\n    - cron: \"0 0 * * 0\" # weekly\n\ndefaults:\n  run:\n    working-directory: protobuf\n\njobs:\n  build:\n    strategy:\n      fail-fast: false\n      matrix:\n        sdk: [stable, dev]\n        os: [ubuntu-latest, macos-latest, windows-latest]\n\n    runs-on: ${{ matrix.os }}\n\n    steps:\n      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8\n      - uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260\n        with:\n          sdk: ${{matrix.sdk}}\n\n      - run: ../tool/setup.sh\n\n      - run: dart pub get\n\n      - run: dart analyze --fatal-infos\n\n      - run: dart format --output=none --set-exit-if-changed .\n        if: ${{ matrix.sdk == 'dev' }}\n\n      - run: dart test\n      - run: dart test -p chrome -c dart2js\n      - run: dart test -p chrome -c dart2wasm\n"
  },
  {
    "path": ".github/workflows/protoc_plugin.yaml",
    "content": "name: protoc_plugin\npermissions: read-all\n\non:\n  pull_request:\n  push:\n    branches: [master]\n  schedule:\n    - cron: \"0 0 * * 0\" # weekly\n\ndefaults:\n  run:\n    working-directory: protoc_plugin\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        sdk: [stable, dev]\n    steps:\n      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8\n      - uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260\n        with:\n          sdk: ${{matrix.sdk}}\n\n      - run: ../tool/setup.sh\n\n      - run: dart pub get\n\n      - run: make protos\n\n      - run: dart analyze --fatal-infos\n\n      - run: dart format --output=none --set-exit-if-changed lib\n        if: ${{ matrix.sdk == 'dev' }}\n\n      - run: dart test\n      - run: dart test -p chrome -c dart2js\n      - run: dart test -p chrome -c dart2wasm\n"
  },
  {
    "path": ".github/workflows/publish.yaml",
    "content": "# A CI configuration to auto-publish pub packages.\n\nname: Publish\n\non:\n  pull_request:\n    branches: [master]\n  push:\n    tags: ['[A-z]+-v[0-9]+.[0-9]+.[0-9]+*']\n\njobs:\n  publish:\n    if: ${{ github.repository_owner == 'google' }}\n    uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main\n    permissions:\n      id-token: write\n      pull-requests: write\n    with:\n      write-comments: false\n"
  },
  {
    "path": ".gitignore",
    "content": ".dart_tool/\n.pub\nbuild/\npubspec.lock\ndoc/\n\n# `dart compile exe` outputs\n*.exe\n\n# `dart compile js` outputs\n*.js\n*.js.deps\n*.js.map\n\n# `dart compile wasm` outputs\n*.wasm\n*.mjs\n"
  },
  {
    "path": "AUTHORS",
    "content": "# Below is a list of people and organizations that have contributed\n# to the Dart project. Names should be added to the list like so:\n#\n#   Name/Organization <email address>\n\nGoogle Inc.\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright 2013, the Dart project authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above\n      copyright notice, this list of conditions and the following\n      disclaimer in the documentation and/or other materials provided\n      with the distribution.\n    * Neither the name of Google LLC nor the names of its\n      contributors may be used to endorse or promote products derived\n      from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "README.md",
    "content": "## Protobuf support for Dart\n\n[Protocol Buffers](https://developers.google.com/protocol-buffers) (protobuf)\nare Google's language-neutral, platform-neutral, extensible mechanism for\nserializing structured data.\n\nThis repository is home to packages related to\n[protobuf support for Dart](https://pub.dev/documentation/protobuf/latest/).\n\n| Package | Description | Published Version |\n| --- | --- | --- |\n| [protobuf](protobuf/) | Runtime library for protocol buffers support. | [![pub package](https://img.shields.io/pub/v/protobuf.svg)](https://pub.dev/packages/protobuf) |\n| [protoc_plugin](protoc_plugin/) | A protobuf protoc compiler plugin used to generate Dart code. | [![pub package](https://img.shields.io/pub/v/protoc_plugin.svg)](https://pub.dev/packages/protoc_plugin) |\n| [benchmarks](benchmarks/) | Benchmarks for various protobuf functions. | |\n\n## Publishing automation\n\nFor information about our publishing automation and release process, see\nhttps://github.com/dart-lang/ecosystem/wiki/Publishing-automation.\n"
  },
  {
    "path": "analysis_options.yaml",
    "content": "include: package:lints/recommended.yaml\n\nlinter:\n  rules:\n  - avoid_bool_literals_in_conditional_expressions\n  - comment_references\n  - prefer_relative_imports\n"
  },
  {
    "path": "benchmarks/.gitignore",
    "content": "# Generated by pub\n.dart_tool/\npubspec.lock\n\nlib/generated/\nout/\n"
  },
  {
    "path": "benchmarks/README.md",
    "content": "## Running benchmarks\n\n- Compile protos with `./tool/compile_protos.sh`\n\n- **JIT:** Run benchmark programs in `bin/`, e.g. `dart bin/from_binary.dart`\n\n- **AOT and JS:**\n\n  - Compile benchmark programs to native, JS, and JIT snapshots with\n    `./tool/compile_benchmarks.dart`\n\n  - Run benchmark programs in `out/`:\n    - AOT: `./out/from_binary.exe`\n    - JS: `d8 $DART_SDK/lib/_internal/js_runtime/lib/preambles/d8.js out/from_binary.js`\n\n- **Wasm:**\n\n  - Get the Dart SDK source code following instructions [here][1], and build\n    `dart2wasm_platform` target with `tools/build.py -m release\n    dart2wasm_platform`.\n\n  - Make sure `$DART_SDK` environment variable set to the path of [Dart SDK's\n    \"sdk\" directory][1].\n\n  - Compile benchmarks with `./tool/compile_benchmarks.dart --target=<target>`\n    where `<target>` is one of:\n\n    - `wasm`: Default optimized build\n    - `wasm-omit-checks`: Optimized build with `--omit-checks`\n\n  - Run with: `$DART_SDK/bin/run_dart2wasm_d8 out/from_binary.wasm`, or use\n    `.omit-checks.wasm` extension for the `wasm-omit-checks` target:\n    `from_binary.omit-checks.wasm`.\n\n[1]: https://github.com/dart-lang/sdk/wiki/Building\n[2]: https://github.com/dart-lang/sdk/tree/main/sdk\n\n## Development\n\n`protoc_version` file specifies the version of protoc Golem will use when\nbuilding the benchmarks, and allows updating the protoc version without\nchanging Golem.\n"
  },
  {
    "path": "benchmarks/analysis_options.yaml",
    "content": "include: ../analysis_options.yaml\n"
  },
  {
    "path": "benchmarks/bin/binary_decode_packed.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:math';\nimport 'dart:typed_data';\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/packed_fields.pb.dart';\n\nPackedFields? sink;\n\nclass PackedInt32DecodingBenchmark extends BenchmarkBase {\n  late final Uint8List encoded;\n\n  PackedInt32DecodingBenchmark() : super('PackedInt32Decoding') {\n    final rand = Random(123);\n    final message = PackedFields();\n    for (var i = 0; i < 1000000; i += 1) {\n      message.packedInt32.add(rand.nextInt(2147483647));\n    }\n    encoded = message.writeToBuffer();\n  }\n\n  @override\n  void run() {\n    sink = PackedFields()..mergeFromBuffer(encoded);\n  }\n}\n\nclass PackedInt64DecodingBenchmark extends BenchmarkBase {\n  late final Uint8List encoded;\n\n  PackedInt64DecodingBenchmark() : super('PackedInt64Decoding') {\n    final rand = Random(123);\n    final message = PackedFields();\n    for (var i = 0; i < 1000000; i += 1) {\n      // Note: `Random` cannot generate more than the number below.\n      message.packedInt64.add(Int64(rand.nextInt(4294967296)));\n    }\n    encoded = message.writeToBuffer();\n  }\n\n  @override\n  void run() {\n    sink = PackedFields()..mergeFromBuffer(encoded);\n  }\n}\n\nclass PackedUint32DecodingBenchmark extends BenchmarkBase {\n  late final Uint8List encoded;\n\n  PackedUint32DecodingBenchmark() : super('PackedUint32Decoding') {\n    final rand = Random(123);\n    final message = PackedFields();\n    for (var i = 0; i < 1000000; i += 1) {\n      message.packedUint32.add(rand.nextInt(4294967295));\n    }\n    encoded = message.writeToBuffer();\n  }\n\n  @override\n  void run() {\n    sink = PackedFields()..mergeFromBuffer(encoded);\n  }\n}\n\nclass PackedUint64DecodingBenchmark extends BenchmarkBase {\n  late final Uint8List encoded;\n\n  PackedUint64DecodingBenchmark() : super('PackedUint64Decoding') {\n    final rand = Random(123);\n    final message = PackedFields();\n    for (var i = 0; i < 1000000; i += 1) {\n      // Note: `Random` cannot generate more than the number below.\n      message.packedUint64.add(Int64(rand.nextInt(4294967296)));\n    }\n    encoded = message.writeToBuffer();\n  }\n\n  @override\n  void run() {\n    sink = PackedFields()..mergeFromBuffer(encoded);\n  }\n}\n\nclass PackedSint32DecodingBenchmark extends BenchmarkBase {\n  late final Uint8List encoded;\n\n  PackedSint32DecodingBenchmark() : super('PackedSint32Decoding') {\n    final rand = Random(123);\n    final message = PackedFields();\n    for (var i = 0; i < 1000000; i += 1) {\n      message.packedSint32.add(rand.nextInt(2147483647));\n    }\n    encoded = message.writeToBuffer();\n  }\n\n  @override\n  void run() {\n    sink = PackedFields()..mergeFromBuffer(encoded);\n  }\n}\n\nclass PackedSint64DecodingBenchmark extends BenchmarkBase {\n  late final Uint8List encoded;\n\n  PackedSint64DecodingBenchmark() : super('PackedSint64Decoding') {\n    final rand = Random(123);\n    final message = PackedFields();\n    for (var i = 0; i < 1000000; i += 1) {\n      // Note: `Random` cannot generate more than the number below.\n      message.packedSint64.add(Int64(rand.nextInt(4294967296)));\n    }\n    encoded = message.writeToBuffer();\n  }\n\n  @override\n  void run() {\n    sink = PackedFields()..mergeFromBuffer(encoded);\n  }\n}\n\nclass PackedBoolDecodingBenchmark extends BenchmarkBase {\n  late final Uint8List encoded;\n\n  PackedBoolDecodingBenchmark() : super('PackedBoolDecoding') {\n    final rand = Random(123);\n    final message = PackedFields();\n    for (var i = 0; i < 1000000; i += 1) {\n      message.packedBool.add(rand.nextBool());\n    }\n    encoded = message.writeToBuffer();\n  }\n\n  @override\n  void run() {\n    sink = PackedFields()..mergeFromBuffer(encoded);\n  }\n}\n\nclass PackedEnumDecodingBenchmark extends BenchmarkBase {\n  late final Uint8List encoded;\n\n  PackedEnumDecodingBenchmark() : super('PackedEnumDecoding') {\n    final rand = Random(123);\n    final message = PackedFields();\n    final numEnums = Enum1.values.length;\n    for (var i = 0; i < 1000000; i += 1) {\n      message.packedEnum1.add(Enum1.values[rand.nextInt(numEnums)]);\n    }\n    encoded = message.writeToBuffer();\n  }\n\n  @override\n  void setup() {\n    // Decode different enums to prevent TFA from specializing enum decoding\n    // code to one type.\n    final rand = Random(123);\n    final message = PackedFields();\n    for (var i = 0; i < 100; i += 1) {\n      message.packedEnum1.add(Enum1.values[rand.nextInt(Enum1.values.length)]);\n    }\n    for (var i = 0; i < 100; i += 1) {\n      message.packedEnum2.add(Enum2.values[rand.nextInt(Enum2.values.length)]);\n    }\n    final encoded = message.writeToBuffer();\n    final decoded = PackedFields()..mergeFromBuffer(encoded);\n    if (decoded.packedEnum1.length != 100) {\n      throw AssertionError('BUG');\n    }\n    if (decoded.packedEnum2.length != 100) {\n      throw AssertionError('BUG');\n    }\n  }\n\n  @override\n  void run() {\n    sink = PackedFields()..mergeFromBuffer(encoded);\n  }\n}\n\nclass PackedSparseEnumDecodingBenchmark extends BenchmarkBase {\n  late final Uint8List encoded;\n\n  PackedSparseEnumDecodingBenchmark() : super('PackedSparseEnumDecoding') {\n    final rand = Random(123);\n    final message = PackedFields();\n    final numEnums = SparseEnum.values.length;\n    for (var i = 0; i < 1000000; i += 1) {\n      message.sparseEnum.add(SparseEnum.values[rand.nextInt(numEnums)]);\n    }\n    encoded = message.writeToBuffer();\n  }\n\n  @override\n  void run() {\n    sink = PackedFields()..mergeFromBuffer(encoded);\n  }\n}\n\nvoid main() {\n  PackedInt32DecodingBenchmark().report();\n  PackedInt64DecodingBenchmark().report();\n  PackedUint32DecodingBenchmark().report();\n  PackedUint64DecodingBenchmark().report();\n  PackedSint32DecodingBenchmark().report();\n  PackedSint64DecodingBenchmark().report();\n  PackedBoolDecodingBenchmark().report();\n  PackedEnumDecodingBenchmark().report();\n  PackedSparseEnumDecodingBenchmark().report();\n\n  if (int.parse('1') == 0) print(sink);\n}\n"
  },
  {
    "path": "benchmarks/bin/deep_copy.dart",
    "content": "// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/google_message1_proto2.pb.dart'\n    as p2;\nimport 'package:protobuf_benchmarks/generated/google_message1_proto3.pb.dart'\n    as p3;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf_benchmarks/readfile.dart';\nimport 'package:protobuf/protobuf.dart';\n\nGeneratedMessage? sink1;\nGeneratedMessage? sink2;\nGeneratedMessage? sink3;\n\nclass Benchmark extends BenchmarkBase {\n  final p2.GoogleMessage1 _message1Proto2;\n  final p3.GoogleMessage1 _message1Proto3;\n  final GoogleMessage2 _message2;\n\n  Benchmark(\n    super.name,\n    List<int> message1Proto2Input,\n    List<int> message1Proto3Input,\n    List<int> message2Input,\n  ) : _message1Proto2 = p2.GoogleMessage1.fromBuffer(message1Proto2Input),\n      _message1Proto3 = p3.GoogleMessage1.fromBuffer(message1Proto3Input),\n      _message2 = GoogleMessage2.fromBuffer(message2Input);\n\n  @override\n  void run() {\n    sink1 = _message1Proto2.deepCopy();\n    sink2 = _message1Proto3.deepCopy();\n    sink3 = _message2.deepCopy();\n  }\n}\n\nvoid main() {\n  final List<int> message1Proto2Input = readfile(\n    'datasets/google_message1_proto2.pb',\n  );\n  final List<int> message1Proto3Input = readfile(\n    'datasets/google_message1_proto3.pb',\n  );\n  final List<int> message2Input = readfile('datasets/google_message2.pb');\n  Benchmark(\n    'deep_copy',\n    message1Proto2Input,\n    message1Proto3Input,\n    message2Input,\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink1);\n    print(sink2);\n    print(sink3);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/from_binary.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:typed_data';\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/google_message1_proto2.pb.dart'\n    as p2;\nimport 'package:protobuf_benchmarks/generated/google_message1_proto3.pb.dart'\n    as p3;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf_benchmarks/readfile.dart';\nimport 'package:protobuf/protobuf.dart';\n\nGeneratedMessage? sink1;\nGeneratedMessage? sink2;\nGeneratedMessage? sink3;\n\nclass Benchmark extends BenchmarkBase {\n  final Uint8List _message1Proto2Input;\n  final Uint8List _message1Proto3Input;\n  final Uint8List _message2Input;\n\n  Benchmark(\n    super.name,\n    List<int> message1Proto2Input,\n    List<int> message1Proto3Input,\n    List<int> message2Input,\n  ) : _message1Proto2Input = Uint8List.fromList(message1Proto2Input),\n      _message1Proto3Input = Uint8List.fromList(message1Proto3Input),\n      _message2Input = Uint8List.fromList(message2Input);\n\n  @override\n  void run() {\n    sink1 = p2.GoogleMessage1.fromBuffer(_message1Proto2Input);\n    sink2 = p3.GoogleMessage1.fromBuffer(_message1Proto3Input);\n    sink3 = GoogleMessage2.fromBuffer(_message2Input);\n  }\n}\n\nvoid main() {\n  final List<int> message1Proto2Input = readfile(\n    'datasets/google_message1_proto2.pb',\n  );\n  final List<int> message1Proto3Input = readfile(\n    'datasets/google_message1_proto3.pb',\n  );\n  final List<int> message2Input = readfile('datasets/google_message2.pb');\n  Benchmark(\n    'from_binary',\n    message1Proto2Input,\n    message1Proto3Input,\n    message2Input,\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink1);\n    print(sink2);\n    print(sink3);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/from_json_string.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/google_message1_proto2.pb.dart'\n    as p2;\nimport 'package:protobuf_benchmarks/generated/google_message1_proto3.pb.dart'\n    as p3;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf_benchmarks/readfile.dart';\nimport 'package:protobuf/protobuf.dart';\n\nGeneratedMessage? sink1;\nGeneratedMessage? sink2;\nGeneratedMessage? sink3;\n\nclass Benchmark extends BenchmarkBase {\n  final String _message1Proto2JsonString;\n  final String _message1Proto3JsonString;\n  final String _message2JsonString;\n\n  Benchmark(\n    super.name,\n    List<int> message1Proto2Input,\n    List<int> message1Proto3Input,\n    List<int> message2Input,\n  ) : _message1Proto2JsonString =\n          p2.GoogleMessage1.fromBuffer(message1Proto2Input).writeToJson(),\n      _message1Proto3JsonString =\n          p3.GoogleMessage1.fromBuffer(message1Proto3Input).writeToJson(),\n      _message2JsonString =\n          GoogleMessage2.fromBuffer(message2Input).writeToJson();\n\n  @override\n  void run() {\n    sink1 = p2.GoogleMessage1.fromJson(_message1Proto2JsonString);\n    sink2 = p3.GoogleMessage1.fromJson(_message1Proto3JsonString);\n    sink3 = GoogleMessage2.fromJson(_message2JsonString);\n  }\n}\n\nvoid main() {\n  final List<int> message1Proto2Input = readfile(\n    'datasets/google_message1_proto2.pb',\n  );\n  final List<int> message1Proto3Input = readfile(\n    'datasets/google_message1_proto3.pb',\n  );\n  final List<int> message2Input = readfile('datasets/google_message2.pb');\n  Benchmark(\n    'from_json_string',\n    message1Proto2Input,\n    message1Proto3Input,\n    message2Input,\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink1);\n    print(sink2);\n    print(sink3);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/from_proto3_json_object.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/google_message1_proto2.pb.dart'\n    as p2;\nimport 'package:protobuf_benchmarks/generated/google_message1_proto3.pb.dart'\n    as p3;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf_benchmarks/readfile.dart';\nimport 'package:protobuf/protobuf.dart';\n\nGeneratedMessage? sink1;\nGeneratedMessage? sink2;\nGeneratedMessage? sink3;\n\nclass Benchmark extends BenchmarkBase {\n  final Object? _message1Proto2Proto3JsonObject;\n  final Object? _message1Proto3Proto3JsonObject;\n  final Object? _message2Proto3JsonObject;\n\n  Benchmark(\n    super.name,\n    List<int> message1Proto2Input,\n    List<int> message1Proto3Input,\n    List<int> message2Input,\n  ) : _message1Proto2Proto3JsonObject =\n          p2.GoogleMessage1.fromBuffer(message1Proto2Input).toProto3Json(),\n      _message1Proto3Proto3JsonObject =\n          p3.GoogleMessage1.fromBuffer(message1Proto3Input).toProto3Json(),\n      _message2Proto3JsonObject =\n          GoogleMessage2.fromBuffer(message2Input).toProto3Json();\n\n  @override\n  void run() {\n    sink1 =\n        p2.GoogleMessage1.create()\n          ..mergeFromProto3Json(_message1Proto2Proto3JsonObject);\n    sink2 =\n        p3.GoogleMessage1.create()\n          ..mergeFromProto3Json(_message1Proto3Proto3JsonObject);\n    sink3 =\n        GoogleMessage2.create()..mergeFromProto3Json(_message2Proto3JsonObject);\n  }\n}\n\nvoid main() {\n  final List<int> message1Proto2Input = readfile(\n    'datasets/google_message1_proto2.pb',\n  );\n  final List<int> message1Proto3Input = readfile(\n    'datasets/google_message1_proto3.pb',\n  );\n  final List<int> message2Input = readfile('datasets/google_message2.pb');\n  Benchmark(\n    'from_proto3_json_object',\n    message1Proto2Input,\n    message1Proto3Input,\n    message2Input,\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink1);\n    print(sink2);\n    print(sink3);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/from_proto3_json_string.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert' show jsonDecode, jsonEncode;\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/google_message1_proto2.pb.dart'\n    as p2;\nimport 'package:protobuf_benchmarks/generated/google_message1_proto3.pb.dart'\n    as p3;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf_benchmarks/readfile.dart';\nimport 'package:protobuf/protobuf.dart';\n\nGeneratedMessage? sink1;\nGeneratedMessage? sink2;\nGeneratedMessage? sink3;\n\nclass Benchmark extends BenchmarkBase {\n  final String _message1Proto2Proto3JsonString;\n  final String _message1Proto3Proto3JsonString;\n  final String _message2Proto3JsonString;\n\n  Benchmark(\n    super.name,\n    List<int> message1Proto2Input,\n    List<int> message1Proto3Input,\n    List<int> message2Input,\n  ) : _message1Proto2Proto3JsonString = jsonEncode(\n        p2.GoogleMessage1.fromBuffer(message1Proto2Input).toProto3Json(),\n      ),\n      _message1Proto3Proto3JsonString = jsonEncode(\n        p3.GoogleMessage1.fromBuffer(message1Proto3Input).toProto3Json(),\n      ),\n      _message2Proto3JsonString = jsonEncode(\n        GoogleMessage2.fromBuffer(message2Input).toProto3Json(),\n      );\n\n  @override\n  void run() {\n    sink1 =\n        p2.GoogleMessage1.create()\n          ..mergeFromProto3Json(jsonDecode(_message1Proto2Proto3JsonString));\n    sink2 =\n        p3.GoogleMessage1.create()\n          ..mergeFromProto3Json(jsonDecode(_message1Proto3Proto3JsonString));\n    sink3 =\n        GoogleMessage2.create()\n          ..mergeFromProto3Json(jsonDecode(_message2Proto3JsonString));\n  }\n}\n\nvoid main() {\n  final List<int> message1Proto2Input = readfile(\n    'datasets/google_message1_proto2.pb',\n  );\n  final List<int> message1Proto3Input = readfile(\n    'datasets/google_message1_proto3.pb',\n  );\n  final List<int> message2Input = readfile('datasets/google_message2.pb');\n  Benchmark(\n    'from_proto3_json_string',\n    message1Proto2Input,\n    message1Proto3Input,\n    message2Input,\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink1);\n    print(sink2);\n    print(sink3);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/hash_code.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/google_message1_proto2.pb.dart'\n    as p2;\nimport 'package:protobuf_benchmarks/generated/google_message1_proto3.pb.dart'\n    as p3;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf_benchmarks/readfile.dart';\n\nint sink1 = 0;\nint sink2 = 0;\nint sink3 = 0;\n\nclass Benchmark extends BenchmarkBase {\n  final p2.GoogleMessage1 _message1Proto2;\n  final p3.GoogleMessage1 _message1Proto3;\n  final GoogleMessage2 _message2;\n\n  Benchmark(\n    super.name,\n    List<int> message1Proto2Input,\n    List<int> message1Proto3Input,\n    List<int> message2Input,\n  ) : _message1Proto2 = p2.GoogleMessage1.fromBuffer(message1Proto2Input),\n      _message1Proto3 = p3.GoogleMessage1.fromBuffer(message1Proto3Input),\n      _message2 = GoogleMessage2.fromBuffer(message2Input);\n\n  @override\n  void run() {\n    sink1 = _message1Proto2.hashCode;\n    sink2 = _message1Proto3.hashCode;\n    sink3 = _message2.hashCode;\n  }\n}\n\nvoid main() {\n  final List<int> message1Proto2Input = readfile(\n    'datasets/google_message1_proto2.pb',\n  );\n  final List<int> message1Proto3Input = readfile(\n    'datasets/google_message1_proto3.pb',\n  );\n  final List<int> message2Input = readfile('datasets/google_message2.pb');\n  Benchmark(\n    'hash_code',\n    message1Proto2Input,\n    message1Proto3Input,\n    message2Input,\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink1);\n    print(sink2);\n    print(sink3);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/query_decode_binary.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/f0.pb.dart' as f0;\nimport 'package:protobuf_benchmarks/readfile.dart';\nimport 'package:protobuf/protobuf.dart';\n\nGeneratedMessage? sink;\n\nclass Benchmark extends BenchmarkBase {\n  final List<int> _input;\n\n  Benchmark(super.name, this._input);\n\n  @override\n  void run() {\n    sink = f0.A0.fromBuffer(_input);\n  }\n}\n\nvoid main() {\n  final List<int> encoded = readfile('datasets/query_benchmark.pb');\n  Benchmark('query_decode_binary', encoded).report();\n\n  if (int.parse('1') == 0) {\n    print(sink);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/query_decode_json.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/f0.pb.dart' as f0;\nimport 'package:protobuf_benchmarks/readfile.dart';\nimport 'package:protobuf/protobuf.dart';\n\nGeneratedMessage? sink;\n\nclass Benchmark extends BenchmarkBase {\n  final String _input;\n\n  Benchmark(super.name, List<int> input)\n    : _input = f0.A0.fromBuffer(input).writeToJson();\n\n  @override\n  void run() {\n    sink = f0.A0.fromJson(_input);\n  }\n}\n\nvoid main() {\n  final List<int> encoded = readfile('datasets/query_benchmark.pb');\n  Benchmark('query_decode_json', encoded).report();\n\n  if (int.parse('1') == 0) {\n    print(sink);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/query_encode_binary.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/f0.pb.dart' as f0;\nimport 'package:protobuf_benchmarks/readfile.dart';\n\nimport 'dart:typed_data';\n\nUint8List? sink;\n\nclass Benchmark extends BenchmarkBase {\n  final f0.A0 _input;\n\n  Benchmark(super.name, List<int> input) : _input = f0.A0.fromBuffer(input);\n\n  @override\n  void run() {\n    sink = _input.writeToBuffer();\n  }\n}\n\nvoid main() {\n  final List<int> encoded = readfile('datasets/query_benchmark.pb');\n  Benchmark('query_encode_binary', encoded).report();\n\n  if (int.parse('1') == 0) {\n    print(sink);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/query_encode_json.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/f0.pb.dart' as f0;\nimport 'package:protobuf_benchmarks/readfile.dart';\n\nString? sink;\n\nclass Benchmark extends BenchmarkBase {\n  final f0.A0 _input;\n\n  Benchmark(super.name, List<int> input) : _input = f0.A0.fromBuffer(input);\n\n  @override\n  void run() {\n    sink = _input.writeToJson();\n  }\n}\n\nvoid main() {\n  final List<int> encoded = readfile('datasets/query_benchmark.pb');\n  Benchmark('query_encode_json', encoded).report();\n\n  if (int.parse('1') == 0) {\n    print(sink);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/query_set_nested_value.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/f0.pb.dart' as f0;\nimport 'package:protobuf_benchmarks/generated/f19.pb.dart' as f19;\nimport 'package:protobuf_benchmarks/generated/f2.pb.dart' as f2;\nimport 'package:protobuf_benchmarks/readfile.dart';\n\nGeneratedMessage? sink;\n\nclass Benchmark extends BenchmarkBase {\n  final f0.A0 _input;\n\n  Benchmark(super.name, List<int> input)\n    : _input = f0.A0.fromBuffer(input)..freeze();\n\n  @override\n  void run() {\n    sink = _input.rebuild((f0.A0 a0Builder) {\n      a0Builder.a4.last = a0Builder.a4.last.rebuild((f2.A1 a1builder) {\n        a1builder.a378 = a1builder.a378.rebuild(\n          (f19.A220 a220builder) => a220builder.a234 = 'new_value',\n        );\n      });\n    });\n  }\n}\n\nvoid main() {\n  final List<int> encoded = readfile('datasets/query_benchmark.pb');\n  Benchmark('query_set_nested_value', encoded).report();\n\n  if (int.parse('1') == 0) {\n    print(sink);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/repeated_field.dart",
    "content": "// Copyright (c) 2024, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:typed_data';\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/f12.pb.dart' as f12;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf/protobuf.dart';\n\nGeneratedMessage? sink;\n\nclass RepeatedBenchmark extends BenchmarkBase {\n  final Uint8List _buffer;\n\n  RepeatedBenchmark(super.name, GoogleMessage2 message)\n    : _buffer = message.writeToBuffer();\n\n  @override\n  void run() {\n    sink = GoogleMessage2.fromBuffer(_buffer);\n  }\n}\n\nclass RepeatedEnumBenchmark extends BenchmarkBase {\n  final Uint8List _buffer;\n\n  RepeatedEnumBenchmark(super.name, f12.A58 message)\n    : _buffer = message.writeToBuffer();\n\n  @override\n  void run() {\n    sink = f12.A58.fromBuffer(_buffer);\n  }\n}\n\nvoid main() {\n  const kSize = 500000;\n\n  RepeatedBenchmark(\n    'repeated_int64',\n    GoogleMessage2(field130: List<Int64>.generate(kSize, Int64.new)),\n  ).report();\n\n  RepeatedBenchmark(\n    'repeated_string',\n    GoogleMessage2(field128: List<String>.generate(kSize, (i) => i.toString())),\n  ).report();\n\n  RepeatedEnumBenchmark(\n    'repeated_enum',\n    f12.A58(a306: List<f12.A322>.generate(kSize, (_) => f12.A322.A324)),\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/to_binary.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/google_message1_proto2.pb.dart'\n    as p2;\nimport 'package:protobuf_benchmarks/generated/google_message1_proto3.pb.dart'\n    as p3;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf_benchmarks/readfile.dart';\n\nimport 'dart:typed_data';\n\nUint8List? sink1;\nUint8List? sink2;\nUint8List? sink3;\n\nclass Benchmark extends BenchmarkBase {\n  final p2.GoogleMessage1 _message1Proto2;\n  final p3.GoogleMessage1 _message1Proto3;\n  final GoogleMessage2 _message2;\n\n  Benchmark(\n    super.name,\n    List<int> message1Proto2Input,\n    List<int> message1Proto3Input,\n    List<int> message2Input,\n  ) : _message1Proto2 = p2.GoogleMessage1.fromBuffer(message1Proto2Input),\n      _message1Proto3 = p3.GoogleMessage1.fromBuffer(message1Proto3Input),\n      _message2 = GoogleMessage2.fromBuffer(message2Input);\n\n  @override\n  void run() {\n    sink1 = _message1Proto2.writeToBuffer();\n    sink2 = _message1Proto3.writeToBuffer();\n    sink3 = _message2.writeToBuffer();\n  }\n}\n\nvoid main() {\n  final List<int> message1Proto2Input = readfile(\n    'datasets/google_message1_proto2.pb',\n  );\n  final List<int> message1Proto3Input = readfile(\n    'datasets/google_message1_proto3.pb',\n  );\n  final List<int> message2Input = readfile('datasets/google_message2.pb');\n  Benchmark(\n    'to_binary',\n    message1Proto2Input,\n    message1Proto3Input,\n    message2Input,\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink1);\n    print(sink2);\n    print(sink3);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/to_json_string.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/google_message1_proto2.pb.dart'\n    as p2;\nimport 'package:protobuf_benchmarks/generated/google_message1_proto3.pb.dart'\n    as p3;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf_benchmarks/readfile.dart';\n\nString? sink1;\nString? sink2;\nString? sink3;\n\nclass Benchmark extends BenchmarkBase {\n  final p2.GoogleMessage1 _message1Proto2;\n  final p3.GoogleMessage1 _message1Proto3;\n  final GoogleMessage2 _message2;\n\n  Benchmark(\n    super.name,\n    List<int> message1Proto2Input,\n    List<int> message1Proto3Input,\n    List<int> message2Input,\n  ) : _message1Proto2 = p2.GoogleMessage1.fromBuffer(message1Proto2Input),\n      _message1Proto3 = p3.GoogleMessage1.fromBuffer(message1Proto3Input),\n      _message2 = GoogleMessage2.fromBuffer(message2Input);\n\n  @override\n  void run() {\n    sink1 = _message1Proto2.writeToJson();\n    sink2 = _message1Proto3.writeToJson();\n    sink3 = _message2.writeToJson();\n  }\n}\n\nvoid main() {\n  final List<int> message1Proto2Input = readfile(\n    'datasets/google_message1_proto2.pb',\n  );\n  final List<int> message1Proto3Input = readfile(\n    'datasets/google_message1_proto3.pb',\n  );\n  final List<int> message2Input = readfile('datasets/google_message2.pb');\n  Benchmark(\n    'to_json_string',\n    message1Proto2Input,\n    message1Proto3Input,\n    message2Input,\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink1);\n    print(sink2);\n    print(sink3);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/to_proto3_json_object.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/google_message1_proto2.pb.dart'\n    as p2;\nimport 'package:protobuf_benchmarks/generated/google_message1_proto3.pb.dart'\n    as p3;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf_benchmarks/readfile.dart';\n\nObject? sink1;\nObject? sink2;\nObject? sink3;\n\nclass Benchmark extends BenchmarkBase {\n  final p2.GoogleMessage1 _message1Proto2;\n  final p3.GoogleMessage1 _message1Proto3;\n  final GoogleMessage2 _message2;\n\n  Benchmark(\n    super.name,\n    List<int> message1Proto2Input,\n    List<int> message1Proto3Input,\n    List<int> message2Input,\n  ) : _message1Proto2 = p2.GoogleMessage1.fromBuffer(message1Proto2Input),\n      _message1Proto3 = p3.GoogleMessage1.fromBuffer(message1Proto3Input),\n      _message2 = GoogleMessage2.fromBuffer(message2Input);\n\n  @override\n  void run() {\n    sink1 = _message1Proto2.toProto3Json();\n    sink2 = _message1Proto3.toProto3Json();\n    sink3 = _message2.toProto3Json();\n  }\n}\n\nvoid main() {\n  final List<int> message1Proto2Input = readfile(\n    'datasets/google_message1_proto2.pb',\n  );\n  final List<int> message1Proto3Input = readfile(\n    'datasets/google_message1_proto3.pb',\n  );\n  final List<int> message2Input = readfile('datasets/google_message2.pb');\n  Benchmark(\n    'to_proto3_json_object',\n    message1Proto2Input,\n    message1Proto3Input,\n    message2Input,\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink1);\n    print(sink2);\n    print(sink3);\n  }\n}\n"
  },
  {
    "path": "benchmarks/bin/to_proto3_json_string.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert' show jsonEncode;\n\nimport 'package:protobuf_benchmarks/benchmark_base.dart';\nimport 'package:protobuf_benchmarks/generated/google_message1_proto2.pb.dart'\n    as p2;\nimport 'package:protobuf_benchmarks/generated/google_message1_proto3.pb.dart'\n    as p3;\nimport 'package:protobuf_benchmarks/generated/google_message2.pb.dart';\nimport 'package:protobuf_benchmarks/readfile.dart';\n\nString? sink1;\nString? sink2;\nString? sink3;\n\nclass Benchmark extends BenchmarkBase {\n  final p2.GoogleMessage1 _message1Proto2;\n  final p3.GoogleMessage1 _message1Proto3;\n  final GoogleMessage2 _message2;\n\n  Benchmark(\n    super.name,\n    List<int> message1Proto2Input,\n    List<int> message1Proto3Input,\n    List<int> message2Input,\n  ) : _message1Proto2 = p2.GoogleMessage1.fromBuffer(message1Proto2Input),\n      _message1Proto3 = p3.GoogleMessage1.fromBuffer(message1Proto3Input),\n      _message2 = GoogleMessage2.fromBuffer(message2Input);\n\n  @override\n  void run() {\n    sink1 = jsonEncode(_message1Proto2.toProto3Json());\n    sink2 = jsonEncode(_message1Proto3.toProto3Json());\n    sink3 = jsonEncode(_message2.toProto3Json());\n  }\n}\n\nvoid main() {\n  final List<int> message1Proto2Input = readfile(\n    'datasets/google_message1_proto2.pb',\n  );\n  final List<int> message1Proto3Input = readfile(\n    'datasets/google_message1_proto3.pb',\n  );\n  final List<int> message2Input = readfile('datasets/google_message2.pb');\n  Benchmark(\n    'to_proto3_json_string',\n    message1Proto2Input,\n    message1Proto3Input,\n    message2Input,\n  ).report();\n\n  if (int.parse('1') == 0) {\n    print(sink1);\n    print(sink2);\n    print(sink3);\n  }\n}\n"
  },
  {
    "path": "benchmarks/lib/benchmark_base.dart",
    "content": "// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:benchmark_harness/benchmark_harness.dart' as bh;\n\n/// A subclass of [bh.BenchmarkBase] with a few changes:\n///\n/// - Work around https://github.com/dart-lang/benchmark_harness/issues/30 by\n///   dividing the result by 10.\n///\n/// - Report the results as \"RunTimeRaw\" instead of \"RunTime\". What\n///   benchmark_harness calls \"RunTime\" is called \"RunTimeRaw\" in Golem.\n///\n/// - Add \"protobuf_\" prefix to test names. This is to make it easier to see\n///   what the benchmarks are about in Golem UI.\n///\nabstract class BenchmarkBase extends bh.BenchmarkBase {\n  BenchmarkBase(super.name) : super(emitter: const _ResultPrinter());\n\n  @override\n  double measure() {\n    return super.measure() / 10;\n  }\n}\n\nclass _ResultPrinter implements bh.ScoreEmitter {\n  const _ResultPrinter() : super();\n\n  @override\n  void emit(String testName, double value) {\n    // Same as the default, but prints \"RunTimeRaw\" instead of \"RunTime\"\n    print('protobuf_$testName(RunTimeRaw): $value us.');\n  }\n}\n"
  },
  {
    "path": "benchmarks/lib/readfile.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nexport 'readfile_vm.dart'\n    if (dart.library.js_interop) 'readfile_js.dart'\n    show readfile;\n"
  },
  {
    "path": "benchmarks/lib/readfile_js.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:js_interop';\nimport 'dart:typed_data';\n\n/// Read the file at the given [path].\n///\n/// This relies on the `readbuffer` function provided by d8.\n@JS()\nexternal JSArrayBuffer readbuffer(String path);\n\n/// Read the file at the given [path].\nUint8List readfile(String path) {\n  // Copy the contents to a new `Uint8List` to make sure in dart2wasm we\n  // benchmark with the native arrays instead of JS arrays.\n  return Uint8List.fromList(readbuffer(path).toDart.asUint8List());\n}\n"
  },
  {
    "path": "benchmarks/lib/readfile_vm.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:io';\nimport 'dart:typed_data';\n\nUint8List readfile(String path) {\n  return File(path).readAsBytesSync();\n}\n"
  },
  {
    "path": "benchmarks/protoc_version",
    "content": "21.2\n"
  },
  {
    "path": "benchmarks/protos/google_message1_proto2.proto",
    "content": "// Benchmark messages for proto2.\n\nsyntax = \"proto2\";\n\npackage benchmarks.proto2;\noption java_package = \"com.google.protobuf.benchmarks\";\n\n// This is the default, but we specify it here explicitly.\noption optimize_for = SPEED;\n\noption cc_enable_arenas = true;\n\nmessage GoogleMessage1 {\n  required string field1 = 1;\n  optional string field9 = 9;\n  optional string field18 = 18;\n  optional bool field80 = 80 [default = false];\n  optional bool field81 = 81 [default = true];\n  required int32 field2 = 2;\n  required int32 field3 = 3;\n  optional int32 field280 = 280;\n  optional int32 field6 = 6 [default = 0];\n  optional int64 field22 = 22;\n  optional string field4 = 4;\n  repeated fixed64 field5 = 5;\n  optional bool field59 = 59 [default = false];\n  optional string field7 = 7;\n  optional int32 field16 = 16;\n  optional int32 field130 = 130 [default = 0];\n  optional bool field12 = 12 [default = true];\n  optional bool field17 = 17 [default = true];\n  optional bool field13 = 13 [default = true];\n  optional bool field14 = 14 [default = true];\n  optional int32 field104 = 104 [default = 0];\n  optional int32 field100 = 100 [default = 0];\n  optional int32 field101 = 101 [default = 0];\n  optional string field102 = 102;\n  optional string field103 = 103;\n  optional int32 field29 = 29 [default = 0];\n  optional bool field30 = 30 [default = false];\n  optional int32 field60 = 60 [default = -1];\n  optional int32 field271 = 271 [default = -1];\n  optional int32 field272 = 272 [default = -1];\n  optional int32 field150 = 150;\n  optional int32 field23 = 23 [default = 0];\n  optional bool field24 = 24 [default = false];\n  optional int32 field25 = 25 [default = 0];\n  optional GoogleMessage1SubMessage field15 = 15;\n  optional bool field78 = 78;\n  optional int32 field67 = 67 [default = 0];\n  optional int32 field68 = 68;\n  optional int32 field128 = 128 [default = 0];\n  optional string field129 = 129 [default = \"xxxxxxxxxxxxxxxxxxxxx\"];\n  optional int32 field131 = 131 [default = 0];\n}\n\nmessage GoogleMessage1SubMessage {\n  optional int32 field1 = 1 [default = 0];\n  optional int32 field2 = 2 [default = 0];\n  optional int32 field3 = 3 [default = 0];\n  optional string field15 = 15;\n  optional bool field12 = 12 [default = true];\n  optional int64 field13 = 13;\n  optional int64 field14 = 14;\n  optional int32 field16 = 16;\n  optional int32 field19 = 19 [default = 2];\n  optional bool field20 = 20 [default = true];\n  optional bool field28 = 28 [default = true];\n  optional fixed64 field21 = 21;\n  optional int32 field22 = 22;\n  optional bool field23 = 23 [default = false];\n  optional bool field206 = 206 [default = false];\n  optional fixed32 field203 = 203;\n  optional int32 field204 = 204;\n  optional string field205 = 205;\n  optional uint64 field207 = 207;\n  optional uint64 field300 = 300;\n}\n"
  },
  {
    "path": "benchmarks/protos/google_message1_proto3.proto",
    "content": "// Benchmark messages for proto3.\n\nsyntax = \"proto3\";\n\npackage benchmarks.proto3;\noption java_package = \"com.google.protobuf.benchmarks\";\n\n// This is the default, but we specify it here explicitly.\noption optimize_for = SPEED;\n\noption cc_enable_arenas = true;\n\nmessage GoogleMessage1 {\n  string field1 = 1;\n  string field9 = 9;\n  string field18 = 18;\n  bool field80 = 80;\n  bool field81 = 81;\n  int32 field2 = 2;\n  int32 field3 = 3;\n  int32 field280 = 280;\n  int32 field6 = 6;\n  int64 field22 = 22;\n  string field4 = 4;\n  repeated fixed64 field5 = 5;\n  bool field59 = 59;\n  string field7 = 7;\n  int32 field16 = 16;\n  int32 field130 = 130;\n  bool field12 = 12;\n  bool field17 = 17;\n  bool field13 = 13;\n  bool field14 = 14;\n  int32 field104 = 104;\n  int32 field100 = 100;\n  int32 field101 = 101;\n  string field102 = 102;\n  string field103 = 103;\n  int32 field29 = 29;\n  bool field30 = 30;\n  int32 field60 = 60;\n  int32 field271 = 271;\n  int32 field272 = 272;\n  int32 field150 = 150;\n  int32 field23 = 23;\n  bool field24 = 24;\n  int32 field25 = 25;\n  GoogleMessage1SubMessage field15 = 15;\n  bool field78 = 78;\n  int32 field67 = 67;\n  int32 field68 = 68;\n  int32 field128 = 128;\n  string field129 = 129;\n  int32 field131 = 131;\n}\n\nmessage GoogleMessage1SubMessage {\n  int32 field1 = 1;\n  int32 field2 = 2;\n  int32 field3 = 3;\n  string field15 = 15;\n  bool field12 = 12;\n  int64 field13 = 13;\n  int64 field14 = 14;\n  int32 field16 = 16;\n  int32 field19 = 19;\n  bool field20  = 20;\n  bool field28 = 28;\n  fixed64 field21 = 21;\n  int32 field22 = 22;\n  bool field23 = 23;\n  bool field206 = 206;\n  fixed32 field203 = 203;\n  int32 field204 = 204;\n  string field205 = 205;\n  uint64 field207 = 207;\n  uint64 field300 = 300;\n}\n"
  },
  {
    "path": "benchmarks/protos/google_message2.proto",
    "content": "// Benchmark messages for proto2.\n\nsyntax = \"proto2\";\n\npackage benchmarks.proto2;\noption java_package = \"com.google.protobuf.benchmarks\";\n\n// This is the default, but we specify it here explicitly.\noption optimize_for = SPEED;\n\noption cc_enable_arenas = true;\n\nmessage GoogleMessage2 {\n  optional string field1 = 1;\n  optional int64 field3 = 3;\n  optional int64 field4 = 4;\n  optional int64 field30 = 30;\n  optional bool field75 = 75 [default = false];\n  optional string field6 = 6;\n  optional bytes field2 = 2;\n  optional int32 field21 = 21 [default = 0];\n  optional int32 field71 = 71;\n  optional float field25 = 25;\n  optional int32 field109 = 109 [default = 0];\n  optional int32 field210 = 210 [default = 0];\n  optional int32 field211 = 211 [default = 0];\n  optional int32 field212 = 212 [default = 0];\n  optional int32 field213 = 213 [default = 0];\n  optional int32 field216 = 216 [default = 0];\n  optional int32 field217 = 217 [default = 0];\n  optional int32 field218 = 218 [default = 0];\n  optional int32 field220 = 220 [default = 0];\n  optional int32 field221 = 221 [default = 0];\n  optional float field222 = 222 [default = 0.0];\n  optional int32 field63 = 63;\n\n  repeated group Group1 = 10 {\n    required float field11 = 11;\n    optional float field26 = 26;\n    optional string field12 = 12;\n    optional string field13 = 13;\n    repeated string field14 = 14;\n    required uint64 field15 = 15;\n    optional int32 field5 = 5;\n    optional string field27 = 27;\n    optional int32 field28 = 28;\n    optional string field29 = 29;\n    optional string field16 = 16;\n    repeated string field22 = 22;\n    repeated int32 field73 = 73;\n    optional int32 field20 = 20 [default = 0];\n    optional string field24 = 24;\n    optional GoogleMessage2GroupedMessage field31 = 31;\n  }\n  repeated string field128 = 128;\n  optional int64 field131 = 131;\n  repeated string field127 = 127;\n  optional int32 field129 = 129;\n  repeated int64 field130 = 130;\n  optional bool field205 = 205 [default = false];\n  optional bool field206 = 206 [default = false];\n}\n\nmessage GoogleMessage2GroupedMessage {\n  optional float field1 = 1;\n  optional float field2 = 2;\n  optional float field3 = 3 [default = 0.0];\n  optional bool field4 = 4;\n  optional bool field5 = 5;\n  optional bool field6 = 6 [default = true];\n  optional bool field7 = 7 [default = false];\n  optional float field8 = 8;\n  optional bool field9 = 9;\n  optional float field10 = 10;\n  optional int64 field11 = 11;\n}\n"
  },
  {
    "path": "benchmarks/protos/packed_fields.proto",
    "content": "syntax = \"proto3\";\n\nmessage PackedFields {\n    repeated int32 packedInt32 = 1 [packed = true];\n    repeated int64 packedInt64 = 2 [packed = true];\n    repeated uint32 packedUint32 = 3 [packed = true];\n    repeated uint64 packedUint64 = 4 [packed = true];\n    repeated sint32 packedSint32 = 5 [packed = true];\n    repeated sint64 packedSint64 = 6 [packed = true];\n    repeated bool packedBool = 7 [packed = true];\n    repeated Enum1 packedEnum1 = 8 [packed = true];\n    repeated Enum2 packedEnum2 = 9 [packed = true];\n    repeated SparseEnum sparseEnum = 10 [packed = true];\n}\n\nenum Enum1 {\n  ENUM_1_1 = 0;\n  ENUM_1_2 = 1;\n  ENUM_1_3 = 2;\n  ENUM_1_4 = 4;\n  ENUM_1_5 = 5;\n}\n\nenum Enum2 {\n  ENUM_2_1 = 0;\n  ENUM_2_2 = 1;\n  ENUM_2_3 = 2;\n  ENUM_2_4 = 4;\n  ENUM_2_5 = 5;\n}\n\n// An enum with large gaps between the known values, and with negative values.\n//\n// This will be slower to decode as the varint to enum value mapping needs to be\n// done with binary search, or map lookup etc.\nenum SparseEnum {\n    ENUM_ZERO = 0;\n    ENUM_MIN_INT = -2147483648;\n    ENUM_1 = -1000000000;\n    ENUM_2 = -100000000;\n    ENUM_3 = -10000000;\n    ENUM_4 = -1000000;\n    ENUM_5 = -100000;\n    ENUM_6 = 100000;\n    ENUM_7 = 1000000;\n    ENUM_8 = 10000000;\n    ENUM_9 = 100000000;\n    ENUM_10 = 1000000000;\n    ENUM_MAX_INT = 2147483647;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f0.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1.a2.a3;\nimport \"f2.proto\";\nimport \"f3.proto\";\nmessage A0 {\n  repeated .a0.a1.a2.a3.A1 a4 = 1;\n  optional string a5 = 3;\n  enum A2 {\n    A3 = 0;\n    A4 = 1;\n    A5 = 2;\n    A6 = 3;\n    A7 = 4;\n    A8 = 5;\n  }\n  optional A2 a6 = 2;\n  optional a7.A9 a8 = 4;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f1.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1.a274;\nimport \"f5.proto\";\nmessage A313 {\n  optional int32 a90 = 1;\n  optional int32 a275 = 2;\n}\nmessage A314 {\n  repeated A313 a276 = 1;\n}\nmessage A315 {\n  optional string a277 = 1;\n  optional a10.A113.A59 a99 = 2;\n  optional int64 a278 = 3;\n  repeated string a279 = 4;\n}\nmessage A316 {\n  optional string a280 = 1;\n  optional int64 a281 = 2;\n  repeated A315 a282 = 3;\n}\nmessage A317 {\n  repeated A316 a283 = 1;\n}\nextend a10.A56 {\n  repeated A313 a276 = 134096400;\n  optional A314 a284 = 141473177;\n}\nmessage A318 {\n  message A319 {\n    optional int32 a285 = 1;\n    optional string a54 = 2;\n  }\n  repeated A319 a286 = 1;\n}\nextend a10.A57 {\n  optional int32 a287 = 134096400;\n  optional A318 a288 = 185706300;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f10.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a10.a68;\nmessage A102 {\n  optional string a52 = 1;\n  optional uint64 a69 = 2;\n  optional uint64 a70 = 3;\n  optional uint64 a71 = 4;\n}\nmessage A103 {\n  optional string a52 = 1;\n  optional uint64 a72 = 2;\n  repeated A102 a73 = 3;\n}\nmessage A104 {\n  repeated A103 message = 1;\n  optional string a74 = 2;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f11.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1;\nimport \"f12.proto\";\nmessage A105 {\n  optional string a75 = 1;\n};\nmessage A106 {\n  optional A105 a76 = 1;\n  optional string a77 = 3;\n};\nmessage A107 {\n  optional string a78 = 1;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f12.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\nimport \"f25.proto\";\nimport \"f5.proto\";\npackage a260;\nenum A322 {\n  A323 = 0;\n  A324 = 999;\n  A325 = 1000;\n  A326 = 1001;\n  A327 = 1002;\n  A328 = 1003;\n  A329 = 1004;\n  A330 = 1005;\n  A331 = 1006;\n  A332 = 1007;\n  A333 = 1008;\n  A334 = 1100;\n  A335 = 1102;\n  A336 = 1103;\n  A337 = 1104;\n  A338 = 1105;\n  A339 = 1106;\n  A340 = 1107;\n  A341 = 1108;\n  A342 = 1109;\n  A343 = 1200;\n  A344 = 1201;\n  A345 = 1203;\n  A346 = 1204;\n  A347 = 1202;\n  A348 = 1211;\n  A349 = 1212;\n  A350 = 1220;\n  A351 = 1221;\n  A352 = 1222;\n  A353 = 1223;\n  A354 = 1240;\n  A355 = 1300;\n  A356 = 1301;\n  A357 = 1400;\n  A358 = 1401;\n  A359 = 1500;\n  A360 = 1501;\n  A361 = 1600;\n  A362 = 1601;\n  A363 = 1700;\n  A364 = 1701;\n  A365 = 1702;\n  A366 = 1800;\n  A367 = 1801;\n  A368 = 1802;\n  A369 = 1803;\n  A370 = 1900;\n  A371 = 1901;\n  A372 = 2000;\n  A373 = 2100;\n  A374 = 2101;\n  A375 = 2300;\n  A376 = 2400;\n  A377 = 2500;\n  A378 = 2600;\n  A379 = 2601;\n  A380 = 2602;\n  A381 = 2603;\n  A382 = 9900;\n  A383 = 9901;\n  A384 = 9902;\n  A385 = 9903;\n  A386 = 9904;\n  A387 = 9905;\n};\nmessage A388 {\n  optional bool a293 = 1 [default = false];\n  optional bool a294 = 2 [default = false];\n  optional bool a295 = 3 [default = false];\n  optional bool a296 = 4 [default = false];\n  optional bool a297 = 5 [default = false];\n  optional bool a298 = 6 [default = false];\n  optional bool a15 = 7 [default = false];\n  optional int32 a299 = 8;\n  optional bool a300 = 9 [default = false];\n  optional bool a301 = 10 [default = false];\n  optional bool a302 = 11 [default = false];\n  optional bool a303 = 13 [default = false];\n  optional bool a304 = 12 [default = false];\n};\nmessage A389 {\n  optional bool a300 = 1 [default = false];\n  optional bool a305 = 2 [default = false];\n};\nenum A390 {\n  A391 = 0;\n  A392 = 1;\n  A393 = 2;\n  A394 = 3;\n  A395 = 4;\n  A396 = 5;\n  A397 = 6;\n  A398 = 7;\n};\nextend a10.A56 {\n  optional A322 a306 = 40075780;\n  optional A388 a307 = 40270992;\n  optional A389 a308 = 69646961;\n  optional A399 a309 = 40093572;\n  optional A390 a310 = 40221563;\n  repeated A308 a311 = 40223876;\n};\nextend a10.A57 {\n  optional A322 a312 = 41149386;\n  optional A388 a313 = 41551199;\n  optional A389 a314 = 69646961;\n  optional A58 a21 = 41744383;\n  repeated A308 a315 = 41909987;\n};\nmessage A399 {\n  repeated A322 a306 = 1;\n};\nmessage A58 {\n  repeated A322 a306 = 1;\n};\nextend a10.A60 {\n  optional bool a316 = 43601160;\n  optional string a317 = 71304954;\n};\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f13.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\npackage a205.a206;\nmessage A190 {\n  int64 a258 = 1;\n  int32 a259 = 2;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f14.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a10.a68.a211;\nmessage A192 {\n  message A193 {\n    optional string a52 = 1;\n    optional int32 a97 = 2;\n    optional string a212 = 3;\n    optional string a213 = 4;\n    optional bool a214 = 5 [default = true];\n    optional bool a215 = 6;\n    optional uint32 a216 = 7 [default = 2];\n  }\n  repeated A193 a86 = 2;\n  message A194 {\n    optional string a52 = 1;\n    optional string a213 = 2;\n    optional bool a214 = 3 [default = true];\n    optional uint32 a216 = 4 [default = 2];\n  }\n  repeated A194 a217 = 3;\n  message A195 {\n    optional string a52 = 1;\n    optional string a213 = 2;\n    optional bool a214 = 3 [default = true];\n    optional uint32 a216 = 4 [default = 2];\n  }\n  repeated A195 a218 = 4;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f15.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\npackage a46.a47.a1.a48.a49.a4;\nimport \"f12.proto\";\nmessage A196 {\n  string a219 = 1;\n  A197 a220 = 2;\n}\nmessage A197 {\n  enum A198 {\n    A199 = 0;\n    A200 = 1;\n    A201 = 2;\n    A202 = 3;\n    A203 = 4;\n    A204 = 5;\n    A205 = 6;\n    A206 = 7;\n    A207 = 8;\n    A208 = 9;\n    A209 = 10;\n  }\n  A198 a221 = 1;\n  string a222 = 2;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f16.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1;\nimport \"f17.proto\";\nimport \"f18.proto\";\nimport \"f12.proto\";\nmessage A210 {\n  enum A211 {\n    A212 = 0;\n    A213 = 1;\n    A214 = 2;\n  }\n  optional string a223 = 1;\n  optional string a224 = 3;\n  message A215 {\n    repeated A216 a225 = 1;\n  }\n  optional A215 a226 = 2;\n  optional A211 a227 = 4;\n  optional bool a228 = 5;\n}\nmessage A217 {\n  optional A218 a229 = 1;\n  message A219 {\n    repeated A216 a230 = 1;\n  }\n  optional A219 a231 = 2;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f17.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1;\nimport \"f4.proto\";\nimport \"f12.proto\";\nmessage A320 {\n  optional string a375 = 1;\n  optional bytes a376 = 2;\n}\nmessage A216 {\n  optional string a377 = 1;\n  optional A320 a105 = 2;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f18.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1;\nimport \"f12.proto\";\nmessage A218 {\n  enum A400 {\n    A401 = 0;\n    A402 = 1;\n    A235 = 2;\n    A403 = 3;\n    A404 = 4;\n    A405 = 5;\n    A406 = 6;\n    A407 = 7;\n    A408 = 16;\n    A409 = 8;\n    A410 = 9;\n    A411 = 10;\n    A412 = 11;\n    A413 = 12;\n    A414 = 13;\n    A415 = 14;\n    A416 = 15;\n    A417 = 17;\n    A418 = 20;\n  }\n  optional A400 a318 = 1 [default = A401];\n  optional string a319 = 2;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f19.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1.a232;\nimport \"f1.proto\";\nmessage A220 {\n  optional A221 a233 = 7;\n  optional string a234 = 1;\n  optional bytes a235 = 5;\n  optional string a236 = 8;\n  optional string a237 = 6;\n  optional string a238 = 2;\n  optional int32 a239 = 3;\n  optional int32 a240 = 4;\n  extensions 192367380;\n}\nenum A221 {\n  A222 = 0;\n  A223 = 1;\n}\nenum A224 {\n  A225 = 0;\n  A226 = 1;\n  A227 = 2;\n  A228 = 3;\n  A229 = 4;\n};\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f2.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1.a2.a3;\nimport \"f1.proto\";\nimport \"f19.proto\";\nimport \"f20.proto\";\nimport \"f15.proto\";\nimport \"f9.proto\";\nmessage A1 {\n  optional .a0.a1.a232.A220 a378 = 1;\n  optional .a0.a1.a232.A220 a379 = 2;\n  optional .a46.a47.a1.a48.a49.a4.A196 a380 = 5;\n  message A465 {\n    optional string a381 = 1;\n    optional string a234 = 2;\n    optional string a382 = 3;\n    optional string a383 = 4;\n    optional string a384 = 10;\n    optional string a385 = 5;\n    optional string a386 = 6;\n    optional string a387 = 7;\n    optional int64 a388 = 8;\n    optional string a194 = 9;\n  }\n  optional A465 a389 = 3;\n  message A466 {\n    optional float a390 = 1;\n    optional float a391 = 2;\n    optional float a392 = 3;\n    optional float a393 = 4;\n  }\n  optional A466 a394 = 4;\n  optional string a395 = 6;\n  optional A467 a274 = 7;\n  repeated A468 a396 = 8;\n  optional bool a397 = 9;\n  message A469 {\n    optional .a0.a1.a232.A230 a397 = 1;\n    optional .a0.a1.a232.A230 a398 = 2;\n    optional .a0.a1.a232.A230 a399 = 3;\n  }\n  optional A469 a400 = 10;\n}\nmessage A467 {\n  message A470 {\n    optional .a46.a47.a1.a48.a49.a4.A99 a401 = 9;\n    optional .a46.a47.a1.a48.a49.a4.A100 a402 = 10;\n    optional .a46.a47.a1.a48.a49.a4.A101 a403 = 11;\n  }\n  optional A470 a404 = 1;\n}\nmessage A468 {\n  optional string a395 = 1;\n  optional A471 a405 = 2;\n  optional string a406 = 3;\n}\nmessage A471 {\n  optional float a390 = 1;\n  optional float a392 = 2;\n  optional float a391 = 3;\n  optional float a393 = 4;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f20.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1.a232;\nimport \"f1.proto\";\nimport \"f21.proto\";\nimport \"f22.proto\";\nmessage A230 {\n  optional string a222 = 1;\n  optional string a224 = 2;\n  optional a0.a1.A231 a241 = 5;\n  optional A232 a242 = 3;\n  reserved 4;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f21.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1;\nimport \"f17.proto\";\nimport \"f12.proto\";\nmessage A232 {\n  optional string a289 = 1;\n  optional string a290 = 3;\n  map<string, A320> a291 = 2;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f22.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1;\nimport \"f8.proto\";\nimport \"f1.proto\";\nimport \"f21.proto\";\nimport \"f16.proto\";\nimport \"f7.proto\";\nimport \"f27.proto\";\nimport \"f28.proto\";\nimport \"f23.proto\";\nimport \"f11.proto\";\nimport \"f24.proto\";\nimport \"f4.proto\";\nimport \"f12.proto\";\nmessage A419 {\n  repeated A420 a320 = 1;\n  optional A321 a291 = 2;\n};\nmessage A421 {\n  optional bytes a321 = 1;\n  optional bool a322 = 6 [default = false];\n  optional bytes a323 = 2;\n  repeated A420 a324 = 3;\n  optional A321 a325 = 4;\n  optional A231 a241 = 5;\n  map<string, A231> a326 = 7;\n  optional A422 a327 = 8;\n  optional string a224 = 9;\n};\nmessage A420 {\n  optional int32 a328 = 1;\n  optional int32 a329 = 2;\n  oneof a99 {\n    A423 a330 = 3;\n    A424 a331 = 4;\n  }\n}\nmessage A423 {\n  optional a0.a1.a232.A239 a332 = 6;\n  optional string a224 = 7;\n  optional A231 a241 = 8;\n  oneof a99 {\n    a0.a1.A106 a333 = 1;\n    a0.a1.A293 a334 = 4;\n    A217 a335 = 3;\n    A232 a242 = 5;\n  }\n  reserved 2;\n}\nmessage A424 {\n  optional a0.a1.a232.A239 a336 = 3;\n  optional a0.a1.a232.A241 a337 = 7;\n  optional a0.a1.A107 a338 = 1;\n  optional A210 a2 = 2;\n  optional A425 a339 = 5;\n  optional bytes a340 = 4;\n  optional bool a341 = 6 [default = false];\n  optional A231 a241 = 16;\n}\nmessage A425 {\n  enum A426 {\n    A235 = 0;\n    A427 = 1;\n    A428 = 2;\n    A429 = 3;\n  }\n  optional A426 a342 = 1;\n}\nmessage A231 {\n  optional bool a322 = 1 [default = false];\n  optional bool a341 = 2 [default = false];\n  optional bool a343 = 3 [default = false];\n  optional int32 a344 = 4;\n  optional bool a345 = 6;\n  optional A430 a346 = 5;\n  optional bytes a347 = 7;\n  optional A66 a348 = 8;\n};\nmessage A430 {\n  repeated a0.a1.a349.A431 a350 = 5;\n  repeated A420 a320 = 6;\n}\nmessage A432 {\n  optional string a351 = 1;\n  optional string a278 = 2;\n  optional bytes a352 = 3;\n  optional A66 a348 = 4;\n}\nmessage A422 {\n  repeated A432 a353 = 1;\n  repeated string a354 = 2;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f23.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1.a232;\nimport \"f1.proto\";\nimport \"f4.proto\";\nimport \"f12.proto\";\nmessage A233 {\n  enum A234 {\n    A235 = 0;\n    A236 = 1;\n    A237 = 2;\n    A238 = 3;\n  }\n  optional A234 a243 = 1;\n  optional string a244 = 2;\n  optional string a245 = 3;\n}\nmessage A239 {\n  optional string a246 = 3;\n  optional string a247 = 2;\n  optional string a248 = 8;\n  optional string a249 = 1;\n  optional string a250 = 4;\n  optional string a251 = 5;\n  optional A240 a252 = 6;\n  optional string a253 = 7;\n  optional string a254 = 9;\n  optional string a255 = 10;\n  optional string a256 = 11;\n}\nmessage A240 {\n  reserved 3, 4;\n  optional string a245 = 1;\n  optional string a257 = 2;\n}\nmessage A241 {\n  enum A59 {\n    A235 = 0;\n    A242 = 14;\n    A243 = 4;\n    A244 = 47;\n    A245 = 33;\n    A246 = 5;\n    A247 = 45;\n    A248 = 2;\n    A249 = 28;\n    A250 = 13;\n    A251 = 29;\n    A252 = 27;\n    A253 = 42;\n    A254 = 18;\n    A255 = 31;\n    A256 = 25;\n    A257 = 3;\n    A258 = 7;\n    A259 = 8;\n    A260 = 24;\n    A261 = 9;\n    A262 = 6;\n    A263 = 19;\n    A264 = 15;\n    A265 = 10;\n    A266 = 11;\n    A267 = 35;\n    A268 = 20;\n    A269 = 1;\n    A270 = 41;\n    A271 = 12;\n    A272 = 26;\n    A273 = 17;\n    A274 = 34;\n    A275 = 23;\n    A276 = 40;\n    A277 = 46;\n    A278 = 51;\n    A279 = 16;\n    A280 = 30;\n    A281 = 38;\n    A282 = 21;\n    A283 = 22;\n    A284 = 49;\n    A285 = 32;\n    A286 = 36;\n    A287 = 37;\n    A288 = 39;\n    A289 = 48;\n    A290 = 50;\n    A291 = 43;\n    A292 = 44;\n  }\n  optional A59 a99 = 1;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f24.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1;\nimport \"f12.proto\";\nmessage A293 {\n  optional string a5 = 1;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f25.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a260;\nenum A294 {\n  A295 = 0;\n  A296 = 1;\n  A297 = 10;\n  A298 = 20;\n  A299 = 21;\n  A300 = 30;\n  A301 = 40;\n  A302 = 50;\n  A303 = 58;\n  A304 = 60;\n  A305 = 70;\n  A306 = 80;\n  A307 = 1000;\n};\nmessage A308 {\n  optional A294 a261 = 1;\n  optional string a262 = 2;\n};\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f26.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a10.a68;\nimport \"f10.proto\";\nimport \"f5.proto\";\nmessage A309 {\n  optional int32 a263 = 1;\n  optional int32 a264 = 2;\n  optional int32 a265 = 3;\n  optional string a266 = 4;\n}\nmessage A310 {\n  repeated string a267 = 1;\n  optional string a268 = 2;\n  repeated A109 a269 = 15;\n  optional A309 a270 = 3;\n  optional A104 a271 = 16;\n}\nmessage A311 {\n  optional string a272 = 1;\n  message A312 {\n    optional string a52 = 1;\n    optional string a273 = 2;\n    optional string a235 = 15;\n  }\n  repeated A312 a79 = 15;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f27.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1;\nimport \"f17.proto\";\nimport \"f12.proto\";\nmessage A321 {\n  repeated A216 a292 = 1;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f28.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1.a349;\nmessage A433 {\n  oneof a105 {\n    string a192 = 1;\n    int32 a355 = 2;\n    bool a356 = 3;\n    double a191 = 4;\n  }\n};\nmessage A434 {\n  optional string a357 = 1;\n  optional A435 a358 = 2;\n}\nmessage A435 {\n  oneof a359 {\n    bool a360 = 1;\n    A436 a361 = 2;\n    A437 a362 = 3;\n  }\n  message A436 {\n    optional bool a361 = 1;\n  }\n  message A437 {\n    optional A433 a105 = 1;\n  }\n}\nenum A438 {\n  A439 = 0;\n  A440 = 1;\n  A441 = 2;\n  A442 = 3;\n  A443 = 4;\n  A444 = 5;\n  A445 = 6;\n  A446 = 7;\n  A447 = 8;\n  A448 = 9;\n  A449 = 10;\n  A450 = 13;\n  A451 = 14;\n  A452 = 15;\n  A453 = 16;\n  A454 = 17;\n};\nmessage A455 {\n  optional A438 a363 = 1;\n  repeated A456 a364 = 2;\n};\nmessage A456 {\n  oneof a365 {\n    A455 a366 = 1;\n    A434 a367 = 2;\n    A433 a368 = 3;\n  }\n};\nmessage A457 {\n  optional string a98 = 1;\n};\nmessage A431 {\n  enum A458 {\n    A459 = 0;\n    A460 = 1;\n    A461 = 2;\n    A462 = 3;\n    A463 = 4;\n    A464 = 5;\n  }\n  optional A458 a369 = 1;\n  optional A456 a370 = 2;\n  optional int32 a371 = 3;\n  optional int32 a372 = 4;\n  optional A434 a373 = 5;\n  optional A457 a374 = 16;\n};\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f3.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\nimport \"f13.proto\";\nimport \"f6.proto\";\npackage a7;\nmessage A9 {\n  optional bytes a203 = 1;\n  optional A189 a204 = 2;\n}\nmessage A189 {\n  optional a205.a206.A190 a207 = 1;\n  message A191 {\n    optional int64 a208 = 1;\n  }\n  optional A191 a209 = 2;\n  optional A61 a210 = 3;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f4.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\nimport \"f5.proto\";\npackage a9;\nenum A10 {\n  A11 = 0;\n  A12 = 1;\n  A13 = 2;\n  A14 = 3;\n  A15 = 4;\n  A16 = 5;\n  A17 = 15;\n  A18 = 6;\n  A19 = 9;\n  A20 = 7;\n  A21 = 8;\n  A22 = 16;\n  A23 = 10;\n  A24 = 11;\n  A25 = 12;\n  A26 = 13;\n  A27 = 14;\n  A28 = 20;\n  A29 = 21;\n  A30 = 22;\n  A31 = 23;\n  A32 = 24;\n  A33 = 207;\n  A34 = 30;\n  A35 = 31;\n  A36 = 32;\n  A37 = 35;\n  A38 = 33;\n  A39 = 34;\n  A40 = 50;\n  A41 = 51;\n  A42 = 52;\n  A43 = 53;\n  A44 = 54;\n  A45 = 55;\n  A46 = 56;\n  A47 = 57;\n  A48 = 100;\n  A49 = 200;\n  A50 = 201;\n  A51 = 202;\n  A52 = 203;\n  A53 = 204;\n  A54 = 205;\n  A55 = 206;\n};\nextend a10.A56 {\n  optional A10 a11 = 21713708;\n  optional bool a12 = 21623477;\n  optional bool a13 = 23459630;\n  optional bool a14 = 21596320;\n  optional bool a15 = 26652850;\n  optional int32 a16 = 53697879;\n  optional string a17 = 56871503;\n};\nextend a10.A57 {\n  optional A10 a18 = 21713708;\n  optional bool a19 = 21623477;\n  optional bool a20 = 21596320;\n  optional A58 a21 = 21467048;\n  optional string a22 = 26652850;\n}\nmessage A58 {\n  message A59 {\n    required string a23 = 1;\n    required string a24 = 2;\n  };\n  repeated A59 a25 = 1;\n};\nextend a10.A60 {\n  optional bool a26 = 21596320;\n  optional bool a27 = 28993747;\n};\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f5.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a10;\nmessage A108 {\n  repeated A109 a79 = 1;\n}\nmessage A109 {\n  optional string a52 = 1;\n  optional string a407 = 2;\n  repeated string a80 = 3;\n  repeated int32 a81 = 10;\n  repeated int32 a82 = 11;\n  repeated A110 a83 = 4;\n  repeated A111 a84 = 5;\n  repeated A112 a85 = 6;\n  repeated A113 a86 = 7;\n  optional A60 a87 = 8;\n  optional A114 a88 = 9;\n  optional string a408 = 12;\n}\nmessage A110 {\n  optional string a52 = 1;\n  repeated A113 a73 = 2;\n  repeated A113 a86 = 6;\n  repeated A110 a89 = 3;\n  repeated A111 a84 = 4;\n  message A115 {\n    optional int32 a90 = 1;\n    optional int32 a91 = 2;\n    optional A116 a87 = 3;\n  }\n  repeated A115 a92 = 5;\n  repeated A117 a93 = 8;\n  optional A57 a87 = 7;\n  message A118 {\n    optional int32 a90 = 1;\n    optional int32 a91 = 2;\n  }\n  repeated A118 a94 = 9;\n  repeated string a95 = 10;\n}\nmessage A116 {\n  repeated A119 a96 = 999;\n  extensions 1000 to max;\n}\nmessage A113 {\n  enum A59 {\n    A120 = 1;\n    A121 = 2;\n    A122 = 3;\n    A123 = 4;\n    A124 = 5;\n    A125 = 6;\n    A126 = 7;\n    A127 = 8;\n    A128 = 9;\n    A129 = 10;\n    A130 = 11;\n    A131 = 12;\n    A132 = 13;\n    A133 = 14;\n    A134 = 15;\n    A135 = 16;\n    A136 = 17;\n    A137 = 18;\n  };\n  enum A138 {\n    A139 = 1;\n    A140 = 2;\n    A141 = 3;\n  };\n  optional string a52 = 1;\n  optional int32 a97 = 3;\n  optional A138 a98 = 4;\n  optional A59 a99 = 5;\n  optional string a100 = 6;\n  optional string a101 = 2;\n  optional string a102 = 7;\n  optional int32 a103 = 9;\n  optional string a104 = 10;\n  optional A56 a87 = 8;\n}\nmessage A117 {\n  optional string a52 = 1;\n  optional A142 a87 = 2;\n}\nmessage A111 {\n  optional string a52 = 1;\n  repeated A143 a105 = 2;\n  optional A70 a87 = 3;\n  message A144 {\n    optional int32 a90 = 1;\n    optional int32 a91 = 2;\n  }\n  repeated A144 a94 = 4;\n  repeated string a95 = 5;\n}\nmessage A143 {\n  optional string a52 = 1;\n  optional int32 a97 = 2;\n  optional A76 a87 = 3;\n}\nmessage A112 {\n  optional string a52 = 1;\n  repeated A145 a106 = 2;\n  repeated A146 a107 = 4;\n  optional A147 a87 = 3;\n}\nmessage A145 {\n  optional string a52 = 1;\n  optional string a108 = 2;\n  optional string a109 = 3;\n  optional A98 a87 = 4;\n  optional bool a110 = 5 [default = false];\n  optional bool a111 = 6 [default = false];\n}\nmessage A146 {\n  optional string a52 = 1;\n  optional string a112 = 2;\n  optional string a113 = 3;\n  optional A148 a87 = 4;\n}\nmessage A60 {\n  optional int32 a114 = 2 [default = 2];\n  reserved 15;\n  reserved 22;\n  optional bool a115 = 24 [default = true];\n  reserved 25;\n  optional string a116 = 1;\n  optional int32 a117 = 4 [default = 2];\n  optional int32 a118 = 5 [default = 2];\n  optional bool a119 = 6 [default = true];\n  optional bool a120 = 7 [default = true];\n  reserved 13;\n  optional bool a121 = 21 [default = false];\n  optional string a122 = 19;\n  optional bool a123 = 26 [default = false];\n  optional string a124 = 8;\n  optional bool a125 = 10 [default = false];\n  optional bool a126 = 27 [default = false];\n  optional bool a127 = 28 [default = false];\n  optional string a128 = 29;\n  enum A149 {\n    A150 = 1;\n    A151 = 2;\n    A152 = 3;\n  }\n  optional A149 a129 = 9 [default = A150];\n  optional string a130 = 11;\n  optional string a131 = 12;\n  optional int32 a132 = 14 [default = 1];\n  optional bool a133 = 16 [default = false];\n  optional bool a134 = 17 [default = false];\n  optional bool a135 = 18 [default = false];\n  optional bool a136 = 42 [default = false];\n  optional bool a31 = 23 [default = false];\n  optional bool a137 = 31 [default = false];\n  reserved 32;\n  reserved 33;\n  reserved 34;\n  reserved 35;\n  optional string a138 = 36;\n  optional string a139 = 37;\n  optional string a140 = 39;\n  optional string a141 = 40;\n  optional string a142 = 41;\n  optional bool a143 = 43;\n  optional string a144 = 44;\n  optional string a145 = 45;\n  repeated A119 a96 = 999;\n  extensions 1000 to max;\n  reserved 38;\n}\nmessage A57 {\n  repeated string a146 = 4;\n  repeated string a147 = 5;\n  repeated string a148 = 6;\n  optional bool a149 = 1 [default = false];\n  optional bool a150 = 2 [default = false];\n  optional bool a31 = 3 [default = false];\n  optional bool a151 = 7;\n  reserved 8;\n  reserved 9;\n  repeated A119 a96 = 999;\n  extensions 1000 to max;\n}\nmessage A56 {\n  optional A153 a152 = 1 [default = A154];\n  enum A153 {\n    A154 = 0;\n    A155 = 1;\n    A156 = 2;\n  }\n  optional bool a409 = 2;\n  optional A157 a153 = 6 [default = A158];\n  enum A157 {\n    A158 = 0;\n    A159 = 1;\n    A160 = 2;\n  }\n  optional bool a154 = 5 [default = false];\n  optional bool a31 = 3 [default = false];\n  optional bool a155 = 10 [default = false];\n  message A161 {\n    optional string a52 = 1;\n    optional string a105 = 2;\n  };\n  repeated A161 a156 = 11;\n  optional bool a157 = 12 [default = false];\n  optional bool a158 = 13 [default = true];\n  repeated A119 a96 = 999;\n  extensions 1000 to max;\n  reserved 4;\n}\nmessage A142 {\n  repeated A119 a96 = 999;\n  extensions 1000 to max;\n}\nmessage A70 {\n  optional string a159 = 1;\n  reserved 4;\n  optional bool a160 = 2;\n  optional bool a31 = 3 [default = false];\n  reserved 5;\n  repeated A119 a96 = 999;\n  extensions 1000 to max;\n}\nmessage A76 {\n  optional bool a31 = 1 [default = false];\n  repeated A119 a96 = 999;\n  extensions 1000 to max;\n}\nmessage A147 {\n  optional bool a161 = 20 [default = false];\n  optional double a162 = 16 [default = -1.0];\n  optional bool a31 = 33 [default = false];\n  repeated A119 a96 = 999;\n  extensions 1000 to max;\n}\nmessage A98 {\n  enum A162 {\n    A163 = 0;\n    A164 = 1;\n  }\n  enum A165 {\n    A67 = 0;\n    A166 = 1;\n    A167 = 2;\n    A168 = 3;\n  }\n  enum A169 {\n    A170 = 0;\n    A171 = 1;\n  }\n  enum A172 {\n    A173 = 0;\n    A174 = 1;\n    A175 = 2;\n    A176 = 3;\n    A177 = 4;\n  }\n  optional A162 a163 = 7 [default = A163];\n  optional double a164 = 8 [default = -1.0];\n  optional bool a165 = 9 [default = false];\n  optional bool a166 = 10 [default = false];\n  optional bool a167 = 26 [default = false];\n  optional sint32 a168 = 11 [default = 256];\n  optional sint32 a169 = 12 [default = 256];\n  optional A165 a170 = 13 [default = A67];\n  optional A169 a171 = 15 [default = A170];\n  optional A169 a172 = 17 [default = A170];\n  optional string a173 = 18;\n  optional string a174 = 19;\n  optional bool a110 = 20;\n  optional bool a111 = 21;\n  optional string a175 = 22;\n  optional string a176 = 23;\n  optional bool a177 = 29;\n  optional int64 a178 = 24 [default = -1];\n  optional int64 a179 = 25 [default = -1];\n  enum A178 {\n    A179 = 0;\n    A180 = 1;\n  }\n  optional A178 a180 = 28 [default = A180];\n  optional A172 a181 = 27 [default = A175];\n  optional bool a31 = 33 [default = false];\n  enum A181 {\n    A182 = 0;\n    A183 = 1;\n    A184 = 2;\n  }\n  optional A181 a182 = 34 [default = A182];\n  repeated A119 a96 = 999;\n  extensions 1000 to max;\n}\nmessage A148 {\n  enum A178 {\n    A179 = 0;\n    A180 = 1;\n  }\n  optional int64 a183 = 1 [default = -1];\n  optional int64 a184 = 2 [default = -1];\n  optional A178 a185 = 3 [default = A179];\n  optional A98.A165 a170 = 4 [default = A67];\n  optional string a174 = 5;\n  optional int32 a168 = 6 [default = 256];\n  optional int32 a169 = 7 [default = 256];\n  optional double a164 = 8 [default = -1.0];\n  optional bool a166 = 9 [default = false];\n  optional bool a167 = 10 [default = false];\n  optional A98.A172 a181 = 11 [default = A175];\n  optional bool a31 = 33 [default = false];\n  repeated A119 a96 = 999;\n  extensions 1000 to max;\n}\nmessage A119 {\n  message A185 {\n    required string a186 = 1;\n    required bool a187 = 2;\n  }\n  repeated A185 a52 = 2;\n  optional string a188 = 3;\n  optional uint64 a189 = 4;\n  optional int64 a190 = 5;\n  optional double a191 = 6;\n  optional bytes a192 = 7;\n  optional string a193 = 8;\n}\nmessage A114 {\n  repeated A186 a194 = 1;\n  message A186 {\n    repeated int32 a195 = 1 [packed = true];\n    repeated int32 a196 = 2 [packed = true];\n    optional string a197 = 3;\n    optional string a198 = 4;\n    repeated string a199 = 6;\n  }\n}\nmessage A187 {\n  repeated A188 a200 = 1;\n  message A188 {\n    repeated int32 a195 = 1 [packed = true];\n    optional string a201 = 2;\n    optional int32 a202 = 3;\n    optional int32 a91 = 4;\n  }\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f6.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a7;\nmessage A61 {\n  enum A62 {\n    A63 = 0;\n    A64 = 1;\n    A65 = 2;\n  }\n  optional A62 a28 = 1;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f7.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a0.a1;\nenum A66 {\n  A67 = 0;\n  A68 = 1;\n  A69 = 2;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f8.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a10.a29;\nimport \"f5.proto\";\nextend a10.A57 {\n  optional bool a30 = 147618788;\n  optional bool a32 = 149418587 [default = true];\n  optional string a33 = 190288050;\n}\nextend a10.A70 {\n  optional bool a34 = 149419467 [default = true];\n  optional bool a35 = 163526403;\n  optional string a36 = 190295313;\n}\nenum A71 {\n  A72 = 0;\n  A73 = 1;\n  A74 = 2;\n  A75 = 3;\n}\nextend a10.A56 {\n  optional A71 a37 = 179701954 [default = A73];\n}\nextend a10.A76 {\n  optional bool a38 = 162702653 [default = false];\n  optional bool a39 = 163486533 [default = false];\n  optional bool a40 = 170261731 [default = false];\n  repeated string a41 = 179096040;\n}\nenum A77 {\n  A67 = 0;\n  A78 = 1;\n  A79 = 2;\n  A80 = 3;\n  A81 = 4;\n  A82 = 5;\n  A83 = 6;\n  A84 = 7;\n  A85 = 8;\n  A86 = 9;\n  A87 = 10;\n  A88 = 11;\n  A89 = 12;\n  A90 = 13;\n  A91 = 14;\n  A92 = 15;\n  A93 = 16;\n  A94 = 17;\n  A95 = 18;\n  A96 = 100;\n  A97 = 101;\n}\nextend a10.A60 {\n  optional A77 a42 = 155465253 [default = A67];\n  optional bytes a43 = 157245250;\n  optional bool a44 = 180648220 [default = true];\n}\nextend a10.A98 {\n  optional bool a45 = 211030419;\n}\n"
  },
  {
    "path": "benchmarks/protos/query_benchmark/f9.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\npackage a46.a47.a1.a48.a49.a4;\nmessage A99 {\n  optional double a50 = 1;\n  optional int32 a51 = 2;\n  optional string a52 = 3;\n  repeated string a53 = 4;\n  optional string a54 = 5;\n  optional string a55 = 6;\n  optional string a56 = 7;\n}\nmessage A100 {\n  optional double a50 = 1;\n  optional int32 a51 = 2;\n  optional string a52 = 3;\n  optional string a57 = 4;\n  optional string a54 = 5;\n  optional bool a58 = 6;\n  optional float a59 = 7;\n  optional string a60 = 8;\n}\nmessage A101 {\n  optional string a52 = 1;\n  optional string a54 = 2;\n  optional string a61 = 3;\n  optional int64 a62 = 4;\n  optional int64 a63 = 5;\n  optional string a64 = 6;\n  optional int64 a65 = 7;\n  optional int64 a66 = 8;\n  optional bool a67 = 9;\n}\n"
  },
  {
    "path": "benchmarks/pubspec.yaml",
    "content": "# Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\n\nname: protobuf_benchmarks\ndescription: Benchmarks for various protobuf functions.\npublish_to: none\n\nenvironment:\n  sdk: ^3.7.0\n\nresolution: workspace\n\ndependencies:\n  # NB. When bumping benchmark_harness check if `benchmark_base.BenchmarkBase`\n  # needs updating\n  benchmark_harness: ^2.0.0\n  fixnum: any\n  js: ^0.6.3\n  protobuf: any\n\ndev_dependencies:\n  args: ^2.3.1\n  lints: '>=5.0.0 <7.0.0'\n  path: ^1.8.2\n  pool: ^1.5.1\n  # Used from the workspace.\n  protoc_plugin: any\n"
  },
  {
    "path": "benchmarks/tool/compile_benchmarks.dart",
    "content": "#!/usr/bin/env dart\n// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// ignore_for_file: only_throw_errors\n\nimport 'dart:io' show Directory, Platform, Process, ProcessResult, exit;\n\nimport 'package:args/args.dart' show ArgParser;\nimport 'package:path/path.dart' as path;\nimport 'package:pool/pool.dart' show Pool;\n\nFuture<void> main(List<String> args) async {\n  final argParser =\n      ArgParser()\n        ..addOption(\n          'target',\n          mandatory: false,\n          defaultsTo: 'aot,exe,jit,js,js-production',\n        )\n        ..addOption('jobs', abbr: 'j', mandatory: false);\n\n  final parsedArgs = argParser.parse(args);\n\n  var jobs = Platform.numberOfProcessors;\n  if (parsedArgs['jobs'] != null) {\n    jobs = int.parse(parsedArgs['jobs'] as String);\n  }\n\n  final targets = <Target>{};\n  for (final targetStr in (parsedArgs['target'] as String).split(',')) {\n    switch (targetStr) {\n      case 'aot':\n        targets.add(aotTarget);\n        break;\n\n      case 'exe':\n        targets.add(exeTarget);\n        break;\n\n      case 'jit':\n        targets.add(jitTarget);\n        break;\n\n      case 'js':\n        targets.add(jsTarget);\n        break;\n\n      case 'js-production':\n        targets.add(jsProductionTarget);\n        break;\n\n      case 'wasm':\n        targets.add(wasmTarget);\n        break;\n\n      default:\n        print(\n          'Unsupported target: $targetStr. Supported targets: aot, exe, '\n          'jit, js, js-production, wasm, wasm-omit-checks',\n        );\n        exit(1);\n    }\n  }\n\n  var sourceFiles = parsedArgs.rest;\n\n  if (sourceFiles.isEmpty) {\n    // Compile all files in bin/\n    sourceFiles =\n        Directory('bin')\n            .listSync(recursive: false)\n            .where((dirFile) => path.extension(dirFile.path) == '.dart')\n            .map((dirFile) => dirFile.path)\n            .toList();\n  }\n\n  final commands = <List<String>>[];\n\n  if (sourceFiles.isNotEmpty && targets.isNotEmpty) {\n    try {\n      Directory('out').createSync(recursive: true);\n    } catch (e) {\n      print(\"Error while creating 'out' directory: $e\");\n      exit(1);\n    }\n  }\n\n  for (final sourceFile in sourceFiles) {\n    for (final target in targets) {\n      commands.add(target.compileArgs(sourceFile));\n    }\n  }\n\n  final pool = Pool(jobs);\n\n  final stream = pool.forEach<List<String>, CompileProcess>(commands, (\n    List<String> command,\n  ) async {\n    final commandStr = command.join(' ');\n    print(commandStr);\n    final result = await Process.run(command[0], command.sublist(1));\n    return CompileProcess(commandStr, result);\n  });\n\n  await for (final compileProcess in stream) {\n    final exitCode = compileProcess.result.exitCode;\n    if (exitCode != 0) {\n      print('Process exited with $exitCode');\n      print('Command: ${compileProcess.command}');\n      print(\n        'Process stdout ---------------------------------------------------',\n      );\n      print(compileProcess.result.stdout);\n      print(\n        'Process stderr ---------------------------------------------------',\n      );\n      print(compileProcess.result.stderr);\n      print(\n        '------------------------------------------------------------------',\n      );\n      exit(1);\n    }\n  }\n\n  await pool.done;\n}\n\nclass CompileProcess {\n  final String command;\n  final ProcessResult result;\n\n  CompileProcess(this.command, this.result);\n}\n\nclass Target {\n  final String _name;\n  final List<String> Function(String) _processArgs;\n\n  const Target(this._name, this._processArgs);\n\n  @override\n  String toString() {\n    return 'Target($_name)';\n  }\n\n  List<String> compileArgs(String sourceFile) {\n    return _processArgs(sourceFile);\n  }\n}\n\nconst aotTarget = Target('aot', aotProcessArgs);\nconst exeTarget = Target('exe', exeProcessArgs);\nconst jitTarget = Target('jit', jitProcessArgs);\nconst jsTarget = Target('js', jsProcessArgs);\nconst jsProductionTarget = Target('js-production', jsProductionProcessArgs);\nconst wasmTarget = Target('wasm', wasmProcessArgs);\n\nList<String> aotProcessArgs(String sourceFile) {\n  final baseName = path.basename(sourceFile);\n  final baseNameNoExt = path.withoutExtension(baseName);\n  return [\n    'dart',\n    'compile',\n    'aot-snapshot',\n    sourceFile,\n    '-o',\n    'out/$baseNameNoExt.aot',\n  ];\n}\n\nList<String> exeProcessArgs(String sourceFile) {\n  final baseName = path.basename(sourceFile);\n  final baseNameNoExt = path.withoutExtension(baseName);\n  return ['dart', 'compile', 'exe', sourceFile, '-o', 'out/$baseNameNoExt.exe'];\n}\n\nList<String> jitProcessArgs(String sourceFile) {\n  final baseName = path.basename(sourceFile);\n  final baseNameNoExt = path.withoutExtension(baseName);\n  return [\n    'dart',\n    '--snapshot-kind=kernel',\n    '--snapshot=out/$baseNameNoExt.dill',\n    sourceFile,\n  ];\n}\n\nList<String> jsProcessArgs(String sourceFile) {\n  final baseName = path.basename(sourceFile);\n  final baseNameNoExt = path.withoutExtension(baseName);\n  return ['dart', 'compile', 'js', sourceFile, '-o', 'out/$baseNameNoExt.js'];\n}\n\nList<String> jsProductionProcessArgs(String sourceFile) {\n  final baseName = path.basename(sourceFile);\n  final baseNameNoExt = path.withoutExtension(baseName);\n  return [\n    'dart',\n    'compile',\n    'js',\n    sourceFile,\n    '-O4',\n    '-o',\n    'out/$baseNameNoExt.production.js',\n  ];\n}\n\nList<String> wasmProcessArgs(String sourceFile) {\n  final baseName = path.basename(sourceFile);\n  final baseNameNoExt = path.withoutExtension(baseName);\n  return [\n    'dart',\n    'compile',\n    'wasm',\n    sourceFile,\n    '-O2',\n    '--no-strip-wasm',\n    '-o',\n    'out/$baseNameNoExt.wasm',\n  ];\n}\n"
  },
  {
    "path": "benchmarks/tool/compile_protos.sh",
    "content": "#!/bin/bash\n\n# Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\n\nSCRIPT_DIR=$(dirname \"${BASH_SOURCE}\")\nBENCHMARK_DIR=$SCRIPT_DIR/..\n\n# These protos don't have any imports\nSIMPLE_PROTOS=(\n    \"protos/google_message1_proto2.proto\"\n    \"protos/google_message1_proto3.proto\"\n    \"protos/google_message2.proto\"\n    \"protos/packed_fields.proto\"\n)\n\nset -x\nset -e\n\nmkdir -p lib/generated\n\nprotoc --dart_out=lib/generated --plugin=protoc-gen-dart=tool/run_protoc_plugin.sh \\\n    -I$BENCHMARK_DIR/protos \\\n    \"${SIMPLE_PROTOS[@]/#/$BENCHMARK_DIR/}\"\n\nprotoc --dart_out=lib/generated --plugin=protoc-gen-dart=tool/run_protoc_plugin.sh \\\n    -I$BENCHMARK_DIR/protos/query_benchmark \\\n    $BENCHMARK_DIR/protos/query_benchmark/*.proto\n"
  },
  {
    "path": "benchmarks/tool/run_protoc_plugin.sh",
    "content": "#!/usr/bin/env bash\n\n# Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\n\ndart run protoc_plugin protoc-gen-dart\n"
  },
  {
    "path": "protobuf/CHANGELOG.md",
    "content": "## 6.0.0\n\n* New `GeneratedMessage` extension methods `toTextFormat` and `writeTextFormat`\n  added to convert the message into the [official protocol buffers text\n  format][text format]. ([#1080], [#125])\n\n* Add [well-known proto types][wkts] as libraries. This change is required for\n  protoc_plugin-25.0.0. ([#1081])\n\n* **Breaking:** Hide `PbList` and `PbMap` constructors. It is not possible to\n  construct these values correctly in user code, so the constructors are now\n  private. Existing uses of `PbList` can be replaced by `List` and `PbMap` can\n  be replaced by `Map`.\n\n  For immutable lists and maps, you can use `built_value`. ([#1072])\n  \n* Map fields now check key and value validity when adding elements. ([#1065],\n  [#1076])\n\n[text format]: https://protobuf.dev/reference/protobuf/textformat-spec/\n[#1080]: https://github.com/google/protobuf.dart/pull/1080\n[#125]: https://github.com/google/protobuf.dart/issues/125\n[wkts]: https://protobuf.dev/reference/protobuf/google.protobuf\n[#1081]: https://github.com/google/protobuf.dart/pull/1081\n[#1072]: https://github.com/google/protobuf.dart/pull/1072\n[#1065]: https://github.com/google/protobuf.dart/issues/1065\n[#1076]: https://github.com/google/protobuf.dart/pull/1076\n\n## 5.1.0\n\n* Update default size limit of `CodedBufferReader` from 67,108,864 bytes to\n  2,147,483,647 bytes, and default recursion limit from 64 to 100.\n\n  The new limits are consistent with the Java and C++ implementations. ([#1060])\n\n* Fix `GeneratedMessage.addExtension` returning non-frozen and\n  `GeneratedMessage.getExtension` allowing modifying an extension when the\n  message is frozen before initializing the extension field set. ([#1062])\n\n* Fix `GeneratedMessage.getExtension` returning differently typed lists when the\n  message extension field set is initialized and frozen and initialized but not\n  frozen. ([#1062])\n\n* Fix `PbList` methods `addAll`, `insertAll`, `replaceRange`, `setAll`,\n  `setRange` iterating the `Iterable` argument twice. ([#730], [#1070])\n\n* Fix `GeneratedMessage.==` throwing a type error when comparing `map` fields in\n  some cases. ([#1075], [#1077])\n\n  This bug was introduced with protobuf-5.0.0.\n\n[#1060]: https://github.com/google/protobuf.dart/pull/1060\n[#1062]: https://github.com/google/protobuf.dart/pull/1062\n[#730]: https://github.com/google/protobuf.dart/issues/730\n[#1070]: https://github.com/google/protobuf.dart/pull/1070\n[#1075]: https://github.com/google/protobuf.dart/issues/1075\n[#1077]: https://github.com/google/protobuf.dart/pull/1077\n\n## 5.0.0\n\n* Improve performance of `GeneratedMessage.deepCopy`. ([#742])\n* Fix unknown enum handling in `GeneratedMessage.mergeFromProto3Json` when\n  the `ignoreUnknownFields` optional argument is `true`. ([#853])\n* Add `BuilderInfo` methods to support protoc-plugin 23.0.0. ([#1047])\n* Generalize argument type of `PbList.from` from `List<T>` to `Iterable<T>`.\n  ([#1054])\n* Fix clearing oneof fields with `GeneratedMessage.clear`. ([#1057])\n* Fix unknown JSON handling when using `GeneratedMessage` methods\n  `mergeFromJson`, `mergeFromJsonMap`, `writeToJson`, `writeToJsonMap`.\n  ([#1058])\n\n[#742]: https://github.com/google/protobuf.dart/pull/742\n[#853]: https://github.com/google/protobuf.dart/pull/853\n[#1047]: https://github.com/google/protobuf.dart/pull/1047\n[#1054]: https://github.com/google/protobuf.dart/pull/1054\n[#1057]: https://github.com/google/protobuf.dart/pull/1057\n[#1058]: https://github.com/google/protobuf.dart/pull/1058\n\n## 4.2.0\n\n* Internal refactoring to split the package into libraries. This allows\n  conditionally importing different libraries and improving performance by\n  using different encoding/decoding libraries based on the target platform.\n  ([#1026])\n\n* Some of the private `PbFieldType` members are made public, to allow using\n  them in internal libraries. This type is for internal use only. ([#1027])\n\n* Improve performance of `GeneratedMessage` members: `writeToJsonMap`,\n  `writeToJson`, `mergeFromJson`, `mergeFromJsonMap`. ([#1028])\n\n* Remove `BuilderInfo.fromProto3Json` and `BuilderInfo.toProto3Json` as a part\n  of an internal refactoring.\n\n[#1026]: https://github.com/google/protobuf.dart/pull/1026\n[#1027]: https://github.com/google/protobuf.dart/pull/1027\n[#1028]: https://github.com/google/protobuf.dart/pull/1028\n\n## 4.1.1\n\n* Minimum SDK dependency bumped from 3.6.0 to 3.7.0. ([#1024])\n\n[#1024]: https://github.com/google/protobuf.dart/pull/1024\n\n## 4.1.0\n\n* Improve packed field decoding performance. ([#959], [#981])\n* Minimum SDK dependency bumped from 3.3.0 to 3.6.0. ([#1001])\n\n[#959]: https://github.com/google/protobuf.dart/pull/959\n[#981]: https://github.com/google/protobuf.dart/pull/981\n[#1001]: https://github.com/google/protobuf.dart/pull/1001\n\n## 4.0.0\n\n* **Breaking:** The following types and members are now removed:\n\n  - `PbEventMixin`\n  - `PbFieldChange`\n  - `EventBuffer`\n  - `GeneratedMessage.createRepeatedField`\n  - `GeneratedMessage.createMapField`\n\n  These were used to implement events, which are unused internally. To keep API\n  surface small (to make it easier to change the library or migrate to another\n  library) these types and members are removed. ([#738])\n\n* **Breaking:** `CodedBufferWriter.writeRawBytes` now takes a `Uint8List`\n  argument (instead of `TypedData`).\n\n* `GeneratedMessageGenericExtensions.deepCopy` is now annotated with\n  `@useResult` and will generate a warning when its result is not used.\n  ([#896])\n\n* **Breaking:** `PbMap.unmodifiable` now takes key and value field types as\n  arguments, instead of another `PbMap`.\n\n  To migrate, use `PbMap.unmodifiable(map.keyFieldType, map.valueFieldType)`\n  instead of `PbMap.unmodifiable(map)`. ([#902])\n\n* Messages deserialized from JSON now generate the unknown fields when\n  serialized as JSON.\n\n  Note that, as before, unknown fields in JSON messages are not stored in the\n  `unknownFields` of the message. They are only used by the JSON serializers to\n  support roundtripping.\n\n  ([#49], [#918])\n\n* Minimum SDK dependency bumped from 2.19.0 to 3.3.0. (#953)\n\n[#738]: https://github.com/google/protobuf.dart/issues/738\n[#896]: https://github.com/google/protobuf.dart/issues/896\n[#902]: https://github.com/google/protobuf.dart/issues/902\n[#49]: https://github.com/google/protobuf.dart/issues/49\n[#918]: https://github.com/google/protobuf.dart/pulls/918\n[#953]: https://github.com/google/protobuf.dart/pull/953\n\n## 3.1.0\n\n* `CodedBufferReader` `readBytes` now copies the returned bytes to avoid\n  accidental sharing of the input buffer with the returned `Uint8List`. New\n  member `readBytesAsView` added with the old behavior. ([#863])\n\n* Avoid sharing the input buffer in unknown length-delimited fields using the\n  new `readBytes`. ([#863])\n\n[#863]: https://github.com/google/protobuf.dart/pull/863\n\n## 3.0.0\n\n* Require Dart `2.19`.\n* Remove `ReadonlyMessageMixin` ([#183], [#644])\n* Remove `frozenMessageModificationHandler` ([#175], [#643])\n* Remove `PbListBase` and `FrozenPbList` types. All proto repeated fields now\n  use `PbList`. To check if a list is frozen, use `isFrozen` getter. ([#624],\n  [#626])\n* Initialize map fields in `GeneratedMessage.getField`. This behavior is\n  consistent with `getField` called on repeated fields. ([#373], [#707])\n* Remove unused and optional `PbMap` constructor argument `BuilderInfo? info`.\n  ([d94d3f0])\n* `UnknownFieldSetField` methods `hasRequiredFields`, `isInitialized` and\n  getter `length` removed. ([#721])\n* Update library documentation to hide internals, add documentation for public\n  types. ([#681])\n* Fix `PbMap._isReadonly` field initialization in `PbMap.unmodifiable`.\n  ([#741], [#754])\n* Fix decoding map fields when key or value (or both) fields of a map entry is\n  missing. ([#719], [#745])\n* Fix updating frozen (immutable) messages with merge methods\n  (`mergeFromBuffer`, `mergeFromProto3Json`, ...). ([#489], [#727])\n* Fix handling `null` values in proto3 JSON deserializer. ([#751], [#760],\n  [#763])\n* Fix handling negative JSON values when parsing uint32 fields. ([#839])\n* Avoid serializing unknown fields twice in `reparseMessage`. ([#840])\n\n[#183]: https://github.com/google/protobuf.dart/issues/183\n[#644]: https://github.com/google/protobuf.dart/pull/644\n[#175]: https://github.com/google/protobuf.dart/issues/175\n[#643]: https://github.com/google/protobuf.dart/pull/643\n[#624]: https://github.com/google/protobuf.dart/issues/624\n[#626]: https://github.com/google/protobuf.dart/pull/626\n[#373]: https://github.com/google/protobuf.dart/issues/373\n[#707]: https://github.com/google/protobuf.dart/pull/707\n[d94d3f0]: https://github.com/google/protobuf.dart/commit/d94d3f0\n[#721]: https://github.com/google/protobuf.dart/pull/721\n[#681]: https://github.com/google/protobuf.dart/pull/681\n[#741]: https://github.com/google/protobuf.dart/pull/741\n[#719]: https://github.com/google/protobuf.dart/issues/719\n[#745]: https://github.com/google/protobuf.dart/pull/745\n[#489]: https://github.com/google/protobuf.dart/issues/489\n[#727]: https://github.com/google/protobuf.dart/pull/727\n[#751]: https://github.com/google/protobuf.dart/issues/751\n[#760]: https://github.com/google/protobuf.dart/issues/760\n[#763]: https://github.com/google/protobuf.dart/pull/763\n[#754]: https://github.com/google/protobuf.dart/pull/754\n[#839]: https://github.com/google/protobuf.dart/pull/839\n[#840]: https://github.com/google/protobuf.dart/pull/840\n\n## 2.1.0\n\n* Update READMEs of `protobuf` and `protoc_plugin`:\n  * Use `dart pub` instead of `pub` in command examples ([a7e75cb])\n  * Fix typos, clarify installation instructions, mention native compilation,\n    fix proto syntax for `protoc_plugin` ([#610], [#617], [#641])\n* Update some of the documentation according to Effective Dart documentation\n  guide ([#664], [#674])\n* Improve runtime perf by removing some of the runtime type checks ([#574],\n  [#573])\n* Fix a bug when converting negative `Timestamp` to Dart `DateTime` ([#580],\n  [#577])\n* Document `BuilderInfo` and `FieldInfo` properties ([#597])\n* Improve `BuilderInfo` initialization by doing some of the work lazily\n  ([#606])\n* Improve enum hash code generation ([#556])\n* Fix parsing nested `Any` messages from JSON ([#568])\n* Improve message hash code generation performance ([#554], [#633])\n* Fix reading uninitialized map fields changing equality and hash code of\n  messages. ([#638])\n* Fix setting an extension field when there's an unknown field with the same\n  tag. ([#639])\n* Fix sharing backing memory for `repeated bytes` and `optional bytes` fields.\n  ([#640])\n* `GeneratedMessage.rebuild` now generates a warning when the return value is\n  not used. ([#631])\n* Fix hash code of messages with empty unknown field set ([#648])\n* Show field tags with `protobuf.omit_field_names`, enum value tags with\n  `protobuf.omit_enum_names` in debug strings (`toString` methods) ([#649])\n* `TimestampMixin.toDateTime` now takes an optional named `bool` argument\n  `toLocal` (defaults to `false`) for generating a `DateTime` in the local time\n  zone (instead of UTC). ([#653])\n* Fix serialization of `infinity` and `nan` doubles in JSON serializers\n  ([#652])\n* Fix Dart generation for fields starting with underscore ([#651])\n* Fix proto3 JSON deserialization of fixed32 fields ([#655])\n* Fix uninitialized repeated field values runtime types for frozen messages\n  ([#654])\n\n[a7e75cb]: https://github.com/google/protobuf.dart/commit/a7e75cb\n[#610]: https://github.com/google/protobuf.dart/pull/610\n[#617]: https://github.com/google/protobuf.dart/pull/617\n[#574]: https://github.com/google/protobuf.dart/pull/574\n[#573]: https://github.com/google/protobuf.dart/issues/573\n[#580]: https://github.com/google/protobuf.dart/pull/580\n[#577]: https://github.com/google/protobuf.dart/issues/577\n[#597]: https://github.com/google/protobuf.dart/pull/597\n[#606]: https://github.com/google/protobuf.dart/pull/606\n[#556]: https://github.com/google/protobuf.dart/pull/556\n[#568]: https://github.com/google/protobuf.dart/pull/568\n[#554]: https://github.com/google/protobuf.dart/pull/554\n[#633]: https://github.com/google/protobuf.dart/pull/633\n[#638]: https://github.com/google/protobuf.dart/pull/638\n[#639]: https://github.com/google/protobuf.dart/pull/639\n[#640]: https://github.com/google/protobuf.dart/pull/640\n[#641]: https://github.com/google/protobuf.dart/pull/641\n[#631]: https://github.com/google/protobuf.dart/pull/631\n[#648]: https://github.com/google/protobuf.dart/pull/648\n[#649]: https://github.com/google/protobuf.dart/pull/649\n[#653]: https://github.com/google/protobuf.dart/pull/653\n[#652]: https://github.com/google/protobuf.dart/pull/652\n[#651]: https://github.com/google/protobuf.dart/pull/651\n[#655]: https://github.com/google/protobuf.dart/pull/655\n[#654]: https://github.com/google/protobuf.dart/pull/654\n[#664]: https://github.com/google/protobuf.dart/pull/664\n[#674]: https://github.com/google/protobuf.dart/pull/674\n\n## 2.0.1\n\n* Fix bug of parsing map-values with default values.\n* Merge fixes from version `1.1.2` - `1.1.4` into v2.\n\n## 2.0.0\n\n* Stable null safety release.\n\n## 1.1.4\n\n*   Fix comparison of empty lists from frozen messages.\n*   Switch repo internals to use `dart format` instead of `dartfmt`.\n\n## 1.1.3\n\n*   Fix that fixed32 int could be negative.\n\n## 1.1.2\n\n*   Fix proto deserialization issue for repeated and map enum value fields where\n    the enum value is unknown.\n\n## 1.1.1\n\n*   Fix decoding of `oneof` fields from proto3 json. The 'whichFoo' state would\n    not be set.\n*   Fix the return type of `copyWith`.\n\n## 1.1.0\n\n*   Require at least Dart SDK 2.7.0 to enable usage of extension methods.\n*   Introduce extension methods `GeneratedMessage.rebuild` and\n    `GeneratedMessage.deepCopy` replacing `copyWith` and `clone`. Using these\n    alternatives can result in smaller binaries, because it is defined once\n    instead of once per class. Use `protoc_plugin` from 19.1.0 to generate\n    deprecation warnings for `copyWith` and `clone` methods.\n*   `GeneratedMessage.getExtension` throws when reading trying to read an\n    extension that is present in the unknown fields. We consider this change a\n    bug-fix because depending on the old behavior is indicative of a bug in your\n    program.\n\n## 1.0.4\n\n*   Requires sdk 2.3.0\n*   Update pedantic to 1.9.2\n\n## 1.0.3\n\n*   Enable hashCode memoization for frozen protos.\n*   Add `timeout` to `ClientContext`\n\n## 1.0.2\n\n*   Fix hashcode of bytes fields.\n*   Fix issue with the `permissiveEnums` option to `mergeFromProto3Json`. The\n    comparison did not work properly.\n*   Fix binary representation of negative int32 values.\n\n## 1.0.1\n\n*   Fix issue with `ExtensionRegistry.reparseMessage` not handling map fields\n    with scalar value types correctly.\n*   Fix issue with the non-json name of a field (`protoName`) not being set\n    correctly.\n*   Fix: Allow decoding tagnumbers of unknown fields of up to 29 bits.\n\n## 1.0.0\n\n*   Graduate package to 1.0. No functional changes.\n\n## 0.14.4\n\n*   Add `permissiveEnums` option to `mergeFromProto3Json`. It will do a\n    case-insensitive matching of enum values ignoring `-` and `_`.\n*   Add support for 'ensureX' methods generated by `protoc_plugin` 19.0.0.\n*   Add specialized getters for `String`, `int`, and `bool` with usual default\n    values.\n*   Shrink dart2js generated code for `getDefault()`.\n*   Added an annotation class `TagNumber`. This is used by code generated by\n    `protoc_plugin` from version 19.0.0.\n\n## 0.14.3\n\n*   Fix: Allow decoding tagnumbers of up to 29 bits. Would fail before with more\n    than 28 bits.\n\n## 0.14.2\n\n*   Expose `mapEntryBuilderInfo` in `MapFieldInfo`.\n\n## 0.14.1\n\n*   Support for `import public`.\n\n    The generated code for a protofile `a.proto` that `import public \"b.proto\"`\n    will export the generated code for `b.proto`.\n\n    See\n    https://developers.google.com/protocol-buffers/docs/proto#importing-definitions.\n\n## 0.14.0\n\n*   Support for proto3 json (json with field names as keys)\n\n    -   encoding and decoding.\n    -   Support for well-known types.\n    -   Use `GeneratedMessage.toProto3Json()` to encode and\n        `GeneratedMessage.mergeFromProto3Json(json)` to decode.\n\n*   `FieldInfo` objects have a new getter `.protoName` that gives the\n    non-camel-case name of the field as in the `.proto`-file.\n\n*   **Breaking**: The field-adder methods on `BuilderInfo` now takes only named\n    optional arguments. To migrate, update `protoc_plugin` to version 18.0.0 or\n    higher.\n\n*   The field-adder methods on `BuilderInfo` all take a new argument\n    `protoName`.\n\n*   **Breaking**: Changed `ExtensionRegistry.reparseMessage` to reparse\n    extensions deeply, that is it looks at every nested message and tries to\n    reparse extensions from its unknown fields.\n\n## 0.13.16+1\n\n*   Reverts `0.13.16` which accidentally introduced a breaking change,\n    [#284](https://github.com/google/protobuf.dart/issues/284). This release is\n    identical to `0.13.15`.\n\n## 0.13.16\n\n*   Better handling of dummy calls to `BuilderInfo.add` with a tag number of 0.\n    These would trigger assertions before.\n\n## 0.13.15\n\n*   Add new getter `GeneratedMessage.isFrozen` to query if the message has been\n    frozen.\n\n## 0.13.14\n\n*   Avoid needless copy when reading from a Uint8List buffer.\n\n## 0.13.13\n\n*   `Added`ExtensionRegistry.reparseMessage()` for decoding extensions from\n    unknown fields after the initial decoding.\n\n## 0.13.12\n\n*   `BuilderInfo.add` now ignores fields with tag number 0. These would never be\n    generated by the protoc_plugin so this is not considered a breaking change.\n\n## 0.13.11\n\n*   Save memory by only initializing `_FieldSet.oneofCases` if the message\n    contains oneofs.\n\n## 0.13.10\n\n*   Fix recursive merging of repeated elements.\n\n## 0.13.9\n\n*   Move 'eventPlugin' callback when setting a field in order to notify\n    observers about field updates in the correct order.\n\n## 0.13.8\n\n*   Fix JSON serialization of unsigned 64-bit fields.\n\n## 0.13.7\n\n*   Override `operator ==` and `hashCode` in `PbMap` so that two `PbMap`s are\n    equal if they have equal key/value pairs.\n\n## 0.13.6\n\n*   Fixed equality check between messages with and without extensions.\n\n## 0.13.5\n\n*   Add new method `addAll` on ExtensionRegistry for more conveniently adding\n    multiple extensions at once.\n\n## 0.13.4\n\n*   Add new method `pc` on BuilderInfo for adding repeated composite fields and\n    remove redundant type check on items added to a PbList.\n\n    Deprecated `BuilderInfo.pp` and `PbList.forFieldType`.\n\n## 0.13.3\n\n*   Fix issue with parsing map field entries. The values for two different keys\n    would sometimes be merged.\n\n*   Deprecated `PBMap.add`.\n\n## 0.13.2\n\n*   Include extension fields in GeneratedMessage.toString().\n\n## 0.13.1\n\n*   Fix issue with not being able to read unknown fields after freezing.\n\nReading an unknown field set after freeze() now returns the existing field set\nbefore freezing instead of an empty UnknownFieldSet.\n\n## 0.13.0\n\n*   Breaking change: Fix issue with not being able to read extensions after\n    freezing.\n\nReading an extension field after freeze() now returns the value set before\nfreezing instead of the default value.\n\n## 0.12.0\n\n*   Breaking change: Changed `BuilderInfo.m()` to take class and package name of\n    the protobuf message representing the map entry. Also changed\n    `BuilderInfo.addMapField` as well as the constructors `PbMap` and\n    `MapFieldInfo.map` to take a map entry BuilderInfo object.\n\n    This mostly affects generated code, which should now be built with\n    protoc_plugin 15.0.0 or newer.\n\n    With this change we avoid creating a map entry BuilderInfo object for each\n    PbMap instance, instead it is passed through the static BuilderInfo object\n    in the generated subclasses of GeneratedMessage.\n\n## 0.11.0\n\n*   Breaking change: changed semantics of `GeneratedMessage.toBuilder()` to only\n    make a shallow copy.\n\n    `GeneratedMessage` has a new abstract method: `createEmptyInstance()` that\n    subclasses must implement.\n\n    Proto files must be rebuilt using protoc_plugin 14.0.0 or newer.\n\n## 0.10.8\n\n*   Fix freezing of map fields.\n\n## 0.10.7\n\n*   Fixed problem with recursive merging of sub messages.\n\n## 0.10.6\n\n*   Added support for\n    [oneof](https://developers.google.com/protocol-buffers/docs/proto3#oneof).\n    To use oneof support use Dart protoc_plugin version 13.0.0.\n\n## 0.10.5\n\n*   Added support for\n    [map fields](https://developers.google.com/protocol-buffers/docs/proto3#maps).\n    Map fields are now represented as Dart maps and are accessed through a\n    getter with the same name as the map field. To use the map support, use Dart\n    protoc_plugin version 11.0.0 or newer.\n\n## 0.10.4\n\n*   Added separate getter for `BuilderInfo.qualifiedMessageName`.\n\n## 0.10.3\n\n*   Added type argument to `ProtobufEnum.initByValue` which allows the return\n    value to be fully typed.\n\n## 0.10.2\n\n*   Added ProtobufEnum reserved names.\n\n## 0.10.1\n\n*   Added Support for\n    [any](https://developers.google.com/protocol-buffers/docs/proto3#any)\n    messages.\n\n## 0.10.0\n\n*   Breaking change: Add `GeneratedMessage.freeze()`. A frozen message and its\n    sub-messages cannot be changed.\n\n## 0.9.1\n\n*   Fix problem with encoding negative enum values.\n*   Fix problem with encoding byte arrays.\n\n## 0.9.0+1\n\n*   Dart SDK upper constraint raised to declare compatibility with Dart 2.0\n    stable.\n\n## 0.9.0\n\n*   Breaking change: Changed signature of `CodedBufferWriter.writeTo` to require\n    `Uint8List` for performance.\n*   More Dart 2 fixes.\n\n## 0.8.0\n\n*   Breaking change: Added generics to RpcClient.invoke(). Proto files must be\n    rebuilt using Dart protoc_plugin version 0.8.0 or newer to match.\n*   Dart 2 fixes.\n\n## 0.7.2+1\n\n-   Updated SDK version to 2.0.0-dev.17.0\n\n## 0.7.2\n\n*   Fix hashing for PbList.\n\n## 0.7.1\n\n*   Fix type in PbList.fold() for Dart 2.\n*   Small performance tweaks for DDC.\n\n## 0.7.0\n\n*   Added fast getters for common types.\n*   Only pass index instead of both tag and index to accessors.\n*   Delegate more methods to underlying list in PbList.\n*   Small fixes for Dart 2.0.\n\n## 0.6.0\n\n*   Added enumValues to FieldInfo. Fixes #63.\n*   Small performance optimization when deserializing repeated messages from\n    JSON.\n*   Type annotations for strong mode.\n\n## 0.5.5\n\n*   Use real generic syntax instead of comment-based.\n*   Support v2 dev SDKs.\n\n## 0.5.4\n\n*   Unknown enum values are ignored when parsing JSON, instead of throwing an\n    exception.\n\n## 0.5.3+2\n\n*   Resolved a strong-mode error.\n\n## 0.5.3+1\n\n*   Performance: Avoid excessive cloning in merge.\n*   Performance: Use code patterns that dart2js handles better.\n\n## 0.5.3\n\n*   fix zigzag function so all coded buffer reader tests work on dart2js.\n\n## 0.5.2\n\n*   make PbMixin constructor public for use within protoc plugin.\n\n## 0.5.1+5\n\n*   Revert previous change because it causes strong mode type error in the\n    generated code. We will revisit this in a new version of mixin support.\n\n## 0.5.1+4\n\n*   Use a more refined implementation of `Map` in `PbMapMixin`\n\n## 0.5.1+3\n\n*   Performance: eliminate some dynamic calls.\n\n## 0.5.1+2\n\n*   Bugfix: remove dependency on `pkg/crypto` for real.\n\n## 0.5.1+1\n\n*   Require at least Dart SDK 1.13.\n\n*   Removed dependency on `pkg/crypto`.\n\n## 0.5.1\n\n*   Experimental support for strong mode.\n*   Fixed an issue with GeneratedMessage operator== and Map mixins\n*   Added declaration of GeneratedMessage clone method\n\n## 0.5.0+1\n\n*   Support the latest version of package `fixnum`.\n\n## 0.5.0\n\n*   Reorganized internals to improve performance. We now store field values in a\n    list instead of a map. Private properties and methods are all moved to the\n    \\_FieldSet class. There are new entry points for generated getters, hazzers,\n    and setters. Improved JSON decoding performance.\n*   Dropped compatibility with .pb.dart files before 0.4.2 by removing internal\n    constants from GeneratedMessage. Also, protoc plugins before 0.5.0 won't\n    work.\n\n## 0.4.2\n\n*   Renamed FieldType to PbFieldType.\n\n## 0.4.1 - DO NOT USE\n\n*   added FieldType class. It turned out that FieldType is a commonly used name,\n    even in .proto files. This is renamed to PbFieldType in 0.4.2.\n*   Added support for observing field changes. For now, this can only be enabled\n    by using a mixin to override the eventPlugin getter.\n*   Removed optional third parameter from setField(). It was only intended for\n    internal use, and could be used to defeat type checks on fields.\n*   clearExtension() removes the value and extension in all cases. (Before, the\n    extension would be kept and the list cleared for repeated fields.)\n*   Upcoming: clearField() will require its argument to be a known tag number\n    (which could be an extension). For now, this is only enforced when a mixin\n    provides an eventPlugin.\n\n## 0.4.0\n\n*   Add ReadonlyMessageMixin. The generated message classes use this to for the\n    default values of message fields.\n\n## 0.3.11\n\n*   Add meta.dart which declares reserved names for the plugin.\n\n## 0.3.10\n\n*   Add GeneratedService and ProtobufClient interfaces.\n\n## 0.3.9\n\n*   Add experimental mixins_meta library\n*   Add experimental PbMapMixin class (in a separate library).\n*   Fix bug where ExtensionRegistry would not be used for nested messages.\n\n## 0.3.7\n\n*   More docs.\n\n## 0.3.6\n\n*   Added mergeFromMap() and writeToJsonMap()\n*   Fixed an analyzer warning.\n\n## 0.3.5+3\n\n*   Bugfix for `setRange()`: Do not assume Iterable has a `sublist()` method.\n\n## 0.3.5+2\n\n*   Simplify some types used in is checks and correct PbList to match the\n*   signature of the List setRange method.\n\n## 0.3.5+1\n\n*   Bugfix for incorrect decoding of protobuf messages: Uint8List views with\n    non-zero offsets were handled incorrectly.\n\n## 0.3.5\n\n*   Allow constants as field initial values as well as creation thunks to reduce\n    generated code size.\n\n*   Improve the performance of reading a protobuf buffer.\n\n*   Fixed truncation error in least significant bits with large Int64 constants.\n"
  },
  {
    "path": "protobuf/LICENSE",
    "content": "Copyright 2013, the Dart project authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above\n      copyright notice, this list of conditions and the following\n      disclaimer in the documentation and/or other materials provided\n      with the distribution.\n    * Neither the name of Google LLC nor the names of its\n      contributors may be used to endorse or promote products derived\n      from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "protobuf/README.md",
    "content": "[![pub package](https://img.shields.io/pub/v/protobuf.svg)](https://pub.dev/packages/protobuf)\n[![package publisher](https://img.shields.io/pub/publisher/protobuf.svg)](https://pub.dev/packages/protobuf/publisher)\n\nProvides runtime support for a Dart implementation of [protobufs][1].\n\nTypically one does not need to import this library. The [protoc plugin][2]\ncompiles proto definitions to Dart files that import this library. If your\nlibrary or application uses generated protobuf libraries, add this library as a\ndependency.\n\n[1]: https://developers.google.com/protocol-buffers\n[2]: https://pub.dev/packages/protoc_plugin\n\n### References\n\n* [Protobuf Dart tutorial](https://developers.google.com/protocol-buffers/docs/darttutorial)\n* [Guide to generated Dart code](https://developers.google.com/protocol-buffers/docs/reference/dart-generated)\n* [Dart API](https://pub.dev/documentation/protobuf/latest/protobuf/protobuf-library.html)\n"
  },
  {
    "path": "protobuf/analysis_options.yaml",
    "content": "include: ../analysis_options.yaml\n"
  },
  {
    "path": "protobuf/build_wkts.sh",
    "content": "#!/bin/bash\n\n# This scripts generates the classes for well-known protobuf types which are\n# included in the package.\n\nset -e\nset -x\n\nmkdir -p lib/well_known_types/google/protobuf\n\nprotoc \\\n    --dart_out=lib/well_known_types \\\n    --plugin=protoc-gen-dart=$(realpath '../protoc_plugin/bin/protoc-gen-dart-debug') \\\n    google/protobuf/*.proto\n\n# Remove empty .pbenum files.\nrm lib/well_known_types/google/protobuf/any.pbenum.dart\nrm lib/well_known_types/google/protobuf/api.pbenum.dart\nrm lib/well_known_types/google/protobuf/duration.pbenum.dart\nrm lib/well_known_types/google/protobuf/empty.pbenum.dart\nrm lib/well_known_types/google/protobuf/field_mask.pbenum.dart\nrm lib/well_known_types/google/protobuf/source_context.pbenum.dart\nrm lib/well_known_types/google/protobuf/timestamp.pbenum.dart\nrm lib/well_known_types/google/protobuf/wrappers.pbenum.dart\n"
  },
  {
    "path": "protobuf/google/protobuf/any.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nsyntax = \"proto3\";\n\npackage google.protobuf;\n\noption go_package = \"google.golang.org/protobuf/types/known/anypb\";\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"AnyProto\";\noption java_multiple_files = true;\noption objc_class_prefix = \"GPB\";\noption csharp_namespace = \"Google.Protobuf.WellKnownTypes\";\n\n// `Any` contains an arbitrary serialized protocol buffer message along with a\n// URL that describes the type of the serialized message.\n//\n// Protobuf library provides support to pack/unpack Any values in the form\n// of utility functions or additional generated methods of the Any type.\n//\n// Example 1: Pack and unpack a message in C++.\n//\n//     Foo foo = ...;\n//     Any any;\n//     any.PackFrom(foo);\n//     ...\n//     if (any.UnpackTo(&foo)) {\n//       ...\n//     }\n//\n// Example 2: Pack and unpack a message in Java.\n//\n//     Foo foo = ...;\n//     Any any = Any.pack(foo);\n//     ...\n//     if (any.is(Foo.class)) {\n//       foo = any.unpack(Foo.class);\n//     }\n//     // or ...\n//     if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n//       foo = any.unpack(Foo.getDefaultInstance());\n//     }\n//\n//  Example 3: Pack and unpack a message in Python.\n//\n//     foo = Foo(...)\n//     any = Any()\n//     any.Pack(foo)\n//     ...\n//     if any.Is(Foo.DESCRIPTOR):\n//       any.Unpack(foo)\n//       ...\n//\n//  Example 4: Pack and unpack a message in Go\n//\n//      foo := &pb.Foo{...}\n//      any, err := anypb.New(foo)\n//      if err != nil {\n//        ...\n//      }\n//      ...\n//      foo := &pb.Foo{}\n//      if err := any.UnmarshalTo(foo); err != nil {\n//        ...\n//      }\n//\n// The pack methods provided by protobuf library will by default use\n// 'type.googleapis.com/full.type.name' as the type URL and the unpack\n// methods only use the fully qualified type name after the last '/'\n// in the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n// name \"y.z\".\n//\n// JSON\n// ====\n// The JSON representation of an `Any` value uses the regular\n// representation of the deserialized, embedded message, with an\n// additional field `@type` which contains the type URL. Example:\n//\n//     package google.profile;\n//     message Person {\n//       string first_name = 1;\n//       string last_name = 2;\n//     }\n//\n//     {\n//       \"@type\": \"type.googleapis.com/google.profile.Person\",\n//       \"firstName\": <string>,\n//       \"lastName\": <string>\n//     }\n//\n// If the embedded message type is well-known and has a custom JSON\n// representation, that representation will be embedded adding a field\n// `value` which holds the custom JSON in addition to the `@type`\n// field. Example (for message [google.protobuf.Duration][]):\n//\n//     {\n//       \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n//       \"value\": \"1.212s\"\n//     }\n//\nmessage Any {\n  // A URL/resource name that uniquely identifies the type of the serialized\n  // protocol buffer message. This string must contain at least\n  // one \"/\" character. The last segment of the URL's path must represent\n  // the fully qualified name of the type (as in\n  // `path/google.protobuf.Duration`). The name should be in a canonical form\n  // (e.g., leading \".\" is not accepted).\n  //\n  // In practice, teams usually precompile into the binary all types that they\n  // expect it to use in the context of Any. However, for URLs which use the\n  // scheme `http`, `https`, or no scheme, one can optionally set up a type\n  // server that maps type URLs to message definitions as follows:\n  //\n  // * If no scheme is provided, `https` is assumed.\n  // * An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  //   value in binary format, or produce an error.\n  // * Applications are allowed to cache lookup results based on the\n  //   URL, or have them precompiled into a binary to avoid any\n  //   lookup. Therefore, binary compatibility needs to be preserved\n  //   on changes to types. (Use versioned type names to manage\n  //   breaking changes.)\n  //\n  // Note: this functionality is not currently available in the official\n  // protobuf release, and it is not used for type URLs beginning with\n  // type.googleapis.com. As of May 2023, there are no widely used type server\n  // implementations and no plans to implement one.\n  //\n  // Schemes other than `http`, `https` (or the empty scheme) might be\n  // used with implementation specific semantics.\n  //\n  string type_url = 1;\n\n  // Must be a valid serialized protocol buffer of the above specified type.\n  bytes value = 2;\n}\n"
  },
  {
    "path": "protobuf/google/protobuf/api.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nsyntax = \"proto3\";\n\npackage google.protobuf;\n\nimport \"google/protobuf/source_context.proto\";\nimport \"google/protobuf/type.proto\";\n\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"ApiProto\";\noption java_multiple_files = true;\noption objc_class_prefix = \"GPB\";\noption csharp_namespace = \"Google.Protobuf.WellKnownTypes\";\noption go_package = \"google.golang.org/protobuf/types/known/apipb\";\n\n// Api is a light-weight descriptor for an API Interface.\n//\n// Interfaces are also described as \"protocol buffer services\" in some contexts,\n// such as by the \"service\" keyword in a .proto file, but they are different\n// from API Services, which represent a concrete implementation of an interface\n// as opposed to simply a description of methods and bindings. They are also\n// sometimes simply referred to as \"APIs\" in other contexts, such as the name of\n// this message itself. See https://cloud.google.com/apis/design/glossary for\n// detailed terminology.\n//\n// New usages of this message as an alternative to ServiceDescriptorProto are\n// strongly discouraged. This message does not reliability preserve all\n// information necessary to model the schema and preserve semantics. Instead\n// make use of FileDescriptorSet which preserves the necessary information.\nmessage Api {\n  // The fully qualified name of this interface, including package name\n  // followed by the interface's simple name.\n  string name = 1;\n\n  // The methods of this interface, in unspecified order.\n  repeated Method methods = 2;\n\n  // Any metadata attached to the interface.\n  repeated Option options = 3;\n\n  // A version string for this interface. If specified, must have the form\n  // `major-version.minor-version`, as in `1.10`. If the minor version is\n  // omitted, it defaults to zero. If the entire version field is empty, the\n  // major version is derived from the package name, as outlined below. If the\n  // field is not empty, the version in the package name will be verified to be\n  // consistent with what is provided here.\n  //\n  // The versioning schema uses [semantic\n  // versioning](http://semver.org) where the major version number\n  // indicates a breaking change and the minor version an additive,\n  // non-breaking change. Both version numbers are signals to users\n  // what to expect from different versions, and should be carefully\n  // chosen based on the product plan.\n  //\n  // The major version is also reflected in the package name of the\n  // interface, which must end in `v<major-version>`, as in\n  // `google.feature.v1`. For major versions 0 and 1, the suffix can\n  // be omitted. Zero major versions must only be used for\n  // experimental, non-GA interfaces.\n  //\n  string version = 4;\n\n  // Source context for the protocol buffer service represented by this\n  // message.\n  SourceContext source_context = 5;\n\n  // Included interfaces. See [Mixin][].\n  repeated Mixin mixins = 6;\n\n  // The source syntax of the service.\n  Syntax syntax = 7;\n\n  // The source edition string, only valid when syntax is SYNTAX_EDITIONS.\n  string edition = 8;\n}\n\n// Method represents a method of an API interface.\n//\n// New usages of this message as an alternative to MethodDescriptorProto are\n// strongly discouraged. This message does not reliability preserve all\n// information necessary to model the schema and preserve semantics. Instead\n// make use of FileDescriptorSet which preserves the necessary information.\nmessage Method {\n  // The simple name of this method.\n  string name = 1;\n\n  // A URL of the input message type.\n  string request_type_url = 2;\n\n  // If true, the request is streamed.\n  bool request_streaming = 3;\n\n  // The URL of the output message type.\n  string response_type_url = 4;\n\n  // If true, the response is streamed.\n  bool response_streaming = 5;\n\n  // Any metadata attached to the method.\n  repeated Option options = 6;\n\n  // The source syntax of this method.\n  //\n  // This field should be ignored, instead the syntax should be inherited from\n  // Api. This is similar to Field and EnumValue.\n  Syntax syntax = 7 [deprecated = true];\n\n  // The source edition string, only valid when syntax is SYNTAX_EDITIONS.\n  //\n  // This field should be ignored, instead the edition should be inherited from\n  // Api. This is similar to Field and EnumValue.\n  string edition = 8 [deprecated = true];\n}\n\n// Declares an API Interface to be included in this interface. The including\n// interface must redeclare all the methods from the included interface, but\n// documentation and options are inherited as follows:\n//\n// - If after comment and whitespace stripping, the documentation\n//   string of the redeclared method is empty, it will be inherited\n//   from the original method.\n//\n// - Each annotation belonging to the service config (http,\n//   visibility) which is not set in the redeclared method will be\n//   inherited.\n//\n// - If an http annotation is inherited, the path pattern will be\n//   modified as follows. Any version prefix will be replaced by the\n//   version of the including interface plus the [root][] path if\n//   specified.\n//\n// Example of a simple mixin:\n//\n//     package google.acl.v1;\n//     service AccessControl {\n//       // Get the underlying ACL object.\n//       rpc GetAcl(GetAclRequest) returns (Acl) {\n//         option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n//       }\n//     }\n//\n//     package google.storage.v2;\n//     service Storage {\n//       rpc GetAcl(GetAclRequest) returns (Acl);\n//\n//       // Get a data record.\n//       rpc GetData(GetDataRequest) returns (Data) {\n//         option (google.api.http).get = \"/v2/{resource=**}\";\n//       }\n//     }\n//\n// Example of a mixin configuration:\n//\n//     apis:\n//     - name: google.storage.v2.Storage\n//       mixins:\n//       - name: google.acl.v1.AccessControl\n//\n// The mixin construct implies that all methods in `AccessControl` are\n// also declared with same name and request/response types in\n// `Storage`. A documentation generator or annotation processor will\n// see the effective `Storage.GetAcl` method after inheriting\n// documentation and annotations as follows:\n//\n//     service Storage {\n//       // Get the underlying ACL object.\n//       rpc GetAcl(GetAclRequest) returns (Acl) {\n//         option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n//       }\n//       ...\n//     }\n//\n// Note how the version in the path pattern changed from `v1` to `v2`.\n//\n// If the `root` field in the mixin is specified, it should be a\n// relative path under which inherited HTTP paths are placed. Example:\n//\n//     apis:\n//     - name: google.storage.v2.Storage\n//       mixins:\n//       - name: google.acl.v1.AccessControl\n//         root: acls\n//\n// This implies the following inherited HTTP annotation:\n//\n//     service Storage {\n//       // Get the underlying ACL object.\n//       rpc GetAcl(GetAclRequest) returns (Acl) {\n//         option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n//       }\n//       ...\n//     }\nmessage Mixin {\n  // The fully qualified name of the interface which is included.\n  string name = 1;\n\n  // If non-empty specifies a path under which inherited HTTP paths\n  // are rooted.\n  string root = 2;\n}\n"
  },
  {
    "path": "protobuf/google/protobuf/duration.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nsyntax = \"proto3\";\n\npackage google.protobuf;\n\noption cc_enable_arenas = true;\noption go_package = \"google.golang.org/protobuf/types/known/durationpb\";\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"DurationProto\";\noption java_multiple_files = true;\noption objc_class_prefix = \"GPB\";\noption csharp_namespace = \"Google.Protobuf.WellKnownTypes\";\n\n// A Duration represents a signed, fixed-length span of time represented\n// as a count of seconds and fractions of seconds at nanosecond\n// resolution. It is independent of any calendar and concepts like \"day\"\n// or \"month\". It is related to Timestamp in that the difference between\n// two Timestamp values is a Duration and it can be added or subtracted\n// from a Timestamp. Range is approximately +-10,000 years.\n//\n// # Examples\n//\n// Example 1: Compute Duration from two Timestamps in pseudo code.\n//\n//     Timestamp start = ...;\n//     Timestamp end = ...;\n//     Duration duration = ...;\n//\n//     duration.seconds = end.seconds - start.seconds;\n//     duration.nanos = end.nanos - start.nanos;\n//\n//     if (duration.seconds < 0 && duration.nanos > 0) {\n//       duration.seconds += 1;\n//       duration.nanos -= 1000000000;\n//     } else if (duration.seconds > 0 && duration.nanos < 0) {\n//       duration.seconds -= 1;\n//       duration.nanos += 1000000000;\n//     }\n//\n// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n//\n//     Timestamp start = ...;\n//     Duration duration = ...;\n//     Timestamp end = ...;\n//\n//     end.seconds = start.seconds + duration.seconds;\n//     end.nanos = start.nanos + duration.nanos;\n//\n//     if (end.nanos < 0) {\n//       end.seconds -= 1;\n//       end.nanos += 1000000000;\n//     } else if (end.nanos >= 1000000000) {\n//       end.seconds += 1;\n//       end.nanos -= 1000000000;\n//     }\n//\n// Example 3: Compute Duration from datetime.timedelta in Python.\n//\n//     td = datetime.timedelta(days=3, minutes=10)\n//     duration = Duration()\n//     duration.FromTimedelta(td)\n//\n// # JSON Mapping\n//\n// In JSON format, the Duration type is encoded as a string rather than an\n// object, where the string ends in the suffix \"s\" (indicating seconds) and\n// is preceded by the number of seconds, with nanoseconds expressed as\n// fractional seconds. For example, 3 seconds with 0 nanoseconds should be\n// encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should\n// be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1\n// microsecond should be expressed in JSON format as \"3.000001s\".\n//\nmessage Duration {\n  // Signed seconds of the span of time. Must be from -315,576,000,000\n  // to +315,576,000,000 inclusive. Note: these bounds are computed from:\n  // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years\n  int64 seconds = 1;\n\n  // Signed fractions of a second at nanosecond resolution of the span\n  // of time. Durations less than one second are represented with a 0\n  // `seconds` field and a positive or negative `nanos` field. For durations\n  // of one second or more, a non-zero value for the `nanos` field must be\n  // of the same sign as the `seconds` field. Must be from -999,999,999\n  // to +999,999,999 inclusive.\n  int32 nanos = 2;\n}\n"
  },
  {
    "path": "protobuf/google/protobuf/empty.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nsyntax = \"proto3\";\n\npackage google.protobuf;\n\noption go_package = \"google.golang.org/protobuf/types/known/emptypb\";\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"EmptyProto\";\noption java_multiple_files = true;\noption objc_class_prefix = \"GPB\";\noption csharp_namespace = \"Google.Protobuf.WellKnownTypes\";\noption cc_enable_arenas = true;\n\n// A generic empty message that you can re-use to avoid defining duplicated\n// empty messages in your APIs. A typical example is to use it as the request\n// or the response type of an API method. For instance:\n//\n//     service Foo {\n//       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n//     }\n//\nmessage Empty {}\n"
  },
  {
    "path": "protobuf/google/protobuf/field_mask.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nsyntax = \"proto3\";\n\npackage google.protobuf;\n\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"FieldMaskProto\";\noption java_multiple_files = true;\noption objc_class_prefix = \"GPB\";\noption csharp_namespace = \"Google.Protobuf.WellKnownTypes\";\noption go_package = \"google.golang.org/protobuf/types/known/fieldmaskpb\";\noption cc_enable_arenas = true;\n\n// `FieldMask` represents a set of symbolic field paths, for example:\n//\n//     paths: \"f.a\"\n//     paths: \"f.b.d\"\n//\n// Here `f` represents a field in some root message, `a` and `b`\n// fields in the message found in `f`, and `d` a field found in the\n// message in `f.b`.\n//\n// Field masks are used to specify a subset of fields that should be\n// returned by a get operation or modified by an update operation.\n// Field masks also have a custom JSON encoding (see below).\n//\n// # Field Masks in Projections\n//\n// When used in the context of a projection, a response message or\n// sub-message is filtered by the API to only contain those fields as\n// specified in the mask. For example, if the mask in the previous\n// example is applied to a response message as follows:\n//\n//     f {\n//       a : 22\n//       b {\n//         d : 1\n//         x : 2\n//       }\n//       y : 13\n//     }\n//     z: 8\n//\n// The result will not contain specific values for fields x,y and z\n// (their value will be set to the default, and omitted in proto text\n// output):\n//\n//\n//     f {\n//       a : 22\n//       b {\n//         d : 1\n//       }\n//     }\n//\n// A repeated field is not allowed except at the last position of a\n// paths string.\n//\n// If a FieldMask object is not present in a get operation, the\n// operation applies to all fields (as if a FieldMask of all fields\n// had been specified).\n//\n// Note that a field mask does not necessarily apply to the\n// top-level response message. In case of a REST get operation, the\n// field mask applies directly to the response, but in case of a REST\n// list operation, the mask instead applies to each individual message\n// in the returned resource list. In case of a REST custom method,\n// other definitions may be used. Where the mask applies will be\n// clearly documented together with its declaration in the API.  In\n// any case, the effect on the returned resource/resources is required\n// behavior for APIs.\n//\n// # Field Masks in Update Operations\n//\n// A field mask in update operations specifies which fields of the\n// targeted resource are going to be updated. The API is required\n// to only change the values of the fields as specified in the mask\n// and leave the others untouched. If a resource is passed in to\n// describe the updated values, the API ignores the values of all\n// fields not covered by the mask.\n//\n// If a repeated field is specified for an update operation, new values will\n// be appended to the existing repeated field in the target resource. Note that\n// a repeated field is only allowed in the last position of a `paths` string.\n//\n// If a sub-message is specified in the last position of the field mask for an\n// update operation, then new value will be merged into the existing sub-message\n// in the target resource.\n//\n// For example, given the target message:\n//\n//     f {\n//       b {\n//         d: 1\n//         x: 2\n//       }\n//       c: [1]\n//     }\n//\n// And an update message:\n//\n//     f {\n//       b {\n//         d: 10\n//       }\n//       c: [2]\n//     }\n//\n// then if the field mask is:\n//\n//  paths: [\"f.b\", \"f.c\"]\n//\n// then the result will be:\n//\n//     f {\n//       b {\n//         d: 10\n//         x: 2\n//       }\n//       c: [1, 2]\n//     }\n//\n// An implementation may provide options to override this default behavior for\n// repeated and message fields.\n//\n// In order to reset a field's value to the default, the field must\n// be in the mask and set to the default value in the provided resource.\n// Hence, in order to reset all fields of a resource, provide a default\n// instance of the resource and set all fields in the mask, or do\n// not provide a mask as described below.\n//\n// If a field mask is not present on update, the operation applies to\n// all fields (as if a field mask of all fields has been specified).\n// Note that in the presence of schema evolution, this may mean that\n// fields the client does not know and has therefore not filled into\n// the request will be reset to their default. If this is unwanted\n// behavior, a specific service may require a client to always specify\n// a field mask, producing an error if not.\n//\n// As with get operations, the location of the resource which\n// describes the updated values in the request message depends on the\n// operation kind. In any case, the effect of the field mask is\n// required to be honored by the API.\n//\n// ## Considerations for HTTP REST\n//\n// The HTTP kind of an update operation which uses a field mask must\n// be set to PATCH instead of PUT in order to satisfy HTTP semantics\n// (PUT must only be used for full updates).\n//\n// # JSON Encoding of Field Masks\n//\n// In JSON, a field mask is encoded as a single string where paths are\n// separated by a comma. Fields name in each path are converted\n// to/from lower-camel naming conventions.\n//\n// As an example, consider the following message declarations:\n//\n//     message Profile {\n//       User user = 1;\n//       Photo photo = 2;\n//     }\n//     message User {\n//       string display_name = 1;\n//       string address = 2;\n//     }\n//\n// In proto a field mask for `Profile` may look as such:\n//\n//     mask {\n//       paths: \"user.display_name\"\n//       paths: \"photo\"\n//     }\n//\n// In JSON, the same mask is represented as below:\n//\n//     {\n//       mask: \"user.displayName,photo\"\n//     }\n//\n// # Field Masks and Oneof Fields\n//\n// Field masks treat fields in oneofs just as regular fields. Consider the\n// following message:\n//\n//     message SampleMessage {\n//       oneof test_oneof {\n//         string name = 4;\n//         SubMessage sub_message = 9;\n//       }\n//     }\n//\n// The field mask can be:\n//\n//     mask {\n//       paths: \"name\"\n//     }\n//\n// Or:\n//\n//     mask {\n//       paths: \"sub_message\"\n//     }\n//\n// Note that oneof type names (\"test_oneof\" in this case) cannot be used in\n// paths.\n//\n// ## Field Mask Verification\n//\n// The implementation of any API method which has a FieldMask type field in the\n// request should verify the included field paths, and return an\n// `INVALID_ARGUMENT` error if any path is unmappable.\nmessage FieldMask {\n  // The set of field mask paths.\n  repeated string paths = 1;\n}\n"
  },
  {
    "path": "protobuf/google/protobuf/source_context.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nsyntax = \"proto3\";\n\npackage google.protobuf;\n\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"SourceContextProto\";\noption java_multiple_files = true;\noption objc_class_prefix = \"GPB\";\noption csharp_namespace = \"Google.Protobuf.WellKnownTypes\";\noption go_package = \"google.golang.org/protobuf/types/known/sourcecontextpb\";\n\n// `SourceContext` represents information about the source of a\n// protobuf element, like the file in which it is defined.\nmessage SourceContext {\n  // The path-qualified name of the .proto file that contained the associated\n  // protobuf element.  For example: `\"google/protobuf/source_context.proto\"`.\n  string file_name = 1;\n}\n"
  },
  {
    "path": "protobuf/google/protobuf/struct.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nsyntax = \"proto3\";\n\npackage google.protobuf;\n\noption cc_enable_arenas = true;\noption go_package = \"google.golang.org/protobuf/types/known/structpb\";\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"StructProto\";\noption java_multiple_files = true;\noption objc_class_prefix = \"GPB\";\noption csharp_namespace = \"Google.Protobuf.WellKnownTypes\";\n\n// `Struct` represents a structured data value, consisting of fields\n// which map to dynamically typed values. In some languages, `Struct`\n// might be supported by a native representation. For example, in\n// scripting languages like JS a struct is represented as an\n// object. The details of that representation are described together\n// with the proto support for the language.\n//\n// The JSON representation for `Struct` is JSON object.\nmessage Struct {\n  // Unordered map of dynamically typed values.\n  map<string, Value> fields = 1;\n}\n\n// `Value` represents a dynamically typed value which can be either\n// null, a number, a string, a boolean, a recursive struct value, or a\n// list of values. A producer of value is expected to set one of these\n// variants. Absence of any variant indicates an error.\n//\n// The JSON representation for `Value` is JSON value.\nmessage Value {\n  // The kind of value.\n  oneof kind {\n    // Represents a null value.\n    NullValue null_value = 1;\n    // Represents a double value.\n    double number_value = 2;\n    // Represents a string value.\n    string string_value = 3;\n    // Represents a boolean value.\n    bool bool_value = 4;\n    // Represents a structured value.\n    Struct struct_value = 5;\n    // Represents a repeated `Value`.\n    ListValue list_value = 6;\n  }\n}\n\n// `NullValue` is a singleton enumeration to represent the null value for the\n// `Value` type union.\n//\n// The JSON representation for `NullValue` is JSON `null`.\nenum NullValue {\n  // Null value.\n  NULL_VALUE = 0;\n}\n\n// `ListValue` is a wrapper around a repeated field of values.\n//\n// The JSON representation for `ListValue` is JSON array.\nmessage ListValue {\n  // Repeated field of dynamically typed values.\n  repeated Value values = 1;\n}\n"
  },
  {
    "path": "protobuf/google/protobuf/timestamp.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nsyntax = \"proto3\";\n\npackage google.protobuf;\n\noption cc_enable_arenas = true;\noption go_package = \"google.golang.org/protobuf/types/known/timestamppb\";\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"TimestampProto\";\noption java_multiple_files = true;\noption objc_class_prefix = \"GPB\";\noption csharp_namespace = \"Google.Protobuf.WellKnownTypes\";\n\n// A Timestamp represents a point in time independent of any time zone or local\n// calendar, encoded as a count of seconds and fractions of seconds at\n// nanosecond resolution. The count is relative to an epoch at UTC midnight on\n// January 1, 1970, in the proleptic Gregorian calendar which extends the\n// Gregorian calendar backwards to year one.\n//\n// All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n// second table is needed for interpretation, using a [24-hour linear\n// smear](https://developers.google.com/time/smear).\n//\n// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n// restricting to that range, we ensure that we can convert to and from [RFC\n// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n//\n// # Examples\n//\n// Example 1: Compute Timestamp from POSIX `time()`.\n//\n//     Timestamp timestamp;\n//     timestamp.set_seconds(time(NULL));\n//     timestamp.set_nanos(0);\n//\n// Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n//\n//     struct timeval tv;\n//     gettimeofday(&tv, NULL);\n//\n//     Timestamp timestamp;\n//     timestamp.set_seconds(tv.tv_sec);\n//     timestamp.set_nanos(tv.tv_usec * 1000);\n//\n// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n//\n//     FILETIME ft;\n//     GetSystemTimeAsFileTime(&ft);\n//     UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n//\n//     // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n//     // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n//     Timestamp timestamp;\n//     timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n//     timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n//\n// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n//\n//     long millis = System.currentTimeMillis();\n//\n//     Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n//         .setNanos((int) ((millis % 1000) * 1000000)).build();\n//\n// Example 5: Compute Timestamp from Java `Instant.now()`.\n//\n//     Instant now = Instant.now();\n//\n//     Timestamp timestamp =\n//         Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n//             .setNanos(now.getNano()).build();\n//\n// Example 6: Compute Timestamp from current time in Python.\n//\n//     timestamp = Timestamp()\n//     timestamp.GetCurrentTime()\n//\n// # JSON Mapping\n//\n// In JSON format, the Timestamp type is encoded as a string in the\n// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n// format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n// where {year} is always expressed using four digits while {month}, {day},\n// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n// are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n// is required. A ProtoJSON serializer should always use UTC (as indicated by\n// \"Z\") when printing the Timestamp type and a ProtoJSON parser should be\n// able to accept both UTC and other timezones (as indicated by an offset).\n//\n// For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n// 01:30 UTC on January 15, 2017.\n//\n// In JavaScript, one can convert a Date object to this format using the\n// standard\n// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n// method. In Python, a standard `datetime.datetime` object can be converted\n// to this format using\n// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n// the Joda Time's [`ISODateTimeFormat.dateTime()`](\n// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n// ) to obtain a formatter capable of generating timestamps in this format.\n//\nmessage Timestamp {\n  // Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must\n  // be between -62135596800 and 253402300799 inclusive (which corresponds to\n  // 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).\n  int64 seconds = 1;\n\n  // Non-negative fractions of a second at nanosecond resolution. This field is\n  // the nanosecond portion of the duration, not an alternative to seconds.\n  // Negative second values with fractions must still have non-negative nanos\n  // values that count forward in time. Must be between 0 and 999,999,999\n  // inclusive.\n  int32 nanos = 2;\n}\n"
  },
  {
    "path": "protobuf/google/protobuf/type.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nsyntax = \"proto3\";\n\npackage google.protobuf;\n\nimport \"google/protobuf/any.proto\";\nimport \"google/protobuf/source_context.proto\";\n\noption cc_enable_arenas = true;\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"TypeProto\";\noption java_multiple_files = true;\noption objc_class_prefix = \"GPB\";\noption csharp_namespace = \"Google.Protobuf.WellKnownTypes\";\noption go_package = \"google.golang.org/protobuf/types/known/typepb\";\n\n// A protocol buffer message type.\n//\n// New usages of this message as an alternative to DescriptorProto are strongly\n// discouraged. This message does not reliability preserve all information\n// necessary to model the schema and preserve semantics. Instead make use of\n// FileDescriptorSet which preserves the necessary information.\nmessage Type {\n  // The fully qualified message name.\n  string name = 1;\n  // The list of fields.\n  repeated Field fields = 2;\n  // The list of types appearing in `oneof` definitions in this type.\n  repeated string oneofs = 3;\n  // The protocol buffer options.\n  repeated Option options = 4;\n  // The source context.\n  SourceContext source_context = 5;\n  // The source syntax.\n  Syntax syntax = 6;\n  // The source edition string, only valid when syntax is SYNTAX_EDITIONS.\n  string edition = 7;\n}\n\n// A single field of a message type.\n//\n// New usages of this message as an alternative to FieldDescriptorProto are\n// strongly discouraged. This message does not reliability preserve all\n// information necessary to model the schema and preserve semantics. Instead\n// make use of FileDescriptorSet which preserves the necessary information.\nmessage Field {\n  // Basic field types.\n  enum Kind {\n    // Field type unknown.\n    TYPE_UNKNOWN = 0;\n    // Field type double.\n    TYPE_DOUBLE = 1;\n    // Field type float.\n    TYPE_FLOAT = 2;\n    // Field type int64.\n    TYPE_INT64 = 3;\n    // Field type uint64.\n    TYPE_UINT64 = 4;\n    // Field type int32.\n    TYPE_INT32 = 5;\n    // Field type fixed64.\n    TYPE_FIXED64 = 6;\n    // Field type fixed32.\n    TYPE_FIXED32 = 7;\n    // Field type bool.\n    TYPE_BOOL = 8;\n    // Field type string.\n    TYPE_STRING = 9;\n    // Field type group. Proto2 syntax only, and deprecated.\n    TYPE_GROUP = 10;\n    // Field type message.\n    TYPE_MESSAGE = 11;\n    // Field type bytes.\n    TYPE_BYTES = 12;\n    // Field type uint32.\n    TYPE_UINT32 = 13;\n    // Field type enum.\n    TYPE_ENUM = 14;\n    // Field type sfixed32.\n    TYPE_SFIXED32 = 15;\n    // Field type sfixed64.\n    TYPE_SFIXED64 = 16;\n    // Field type sint32.\n    TYPE_SINT32 = 17;\n    // Field type sint64.\n    TYPE_SINT64 = 18;\n  }\n\n  // Whether a field is optional, required, or repeated.\n  enum Cardinality {\n    // For fields with unknown cardinality.\n    CARDINALITY_UNKNOWN = 0;\n    // For optional fields.\n    CARDINALITY_OPTIONAL = 1;\n    // For required fields. Proto2 syntax only.\n    CARDINALITY_REQUIRED = 2;\n    // For repeated fields.\n    CARDINALITY_REPEATED = 3;\n  }\n\n  // The field type.\n  Kind kind = 1;\n  // The field cardinality.\n  Cardinality cardinality = 2;\n  // The field number.\n  int32 number = 3;\n  // The field name.\n  string name = 4;\n  // The field type URL, without the scheme, for message or enumeration\n  // types. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.\n  string type_url = 6;\n  // The index of the field type in `Type.oneofs`, for message or enumeration\n  // types. The first type has index 1; zero means the type is not in the list.\n  int32 oneof_index = 7;\n  // Whether to use alternative packed wire representation.\n  bool packed = 8;\n  // The protocol buffer options.\n  repeated Option options = 9;\n  // The field JSON name.\n  string json_name = 10;\n  // The string value of the default value of this field. Proto2 syntax only.\n  string default_value = 11;\n}\n\n// Enum type definition.\n//\n// New usages of this message as an alternative to EnumDescriptorProto are\n// strongly discouraged. This message does not reliability preserve all\n// information necessary to model the schema and preserve semantics. Instead\n// make use of FileDescriptorSet which preserves the necessary information.\nmessage Enum {\n  // Enum type name.\n  string name = 1;\n  // Enum value definitions.\n  repeated EnumValue enumvalue = 2;\n  // Protocol buffer options.\n  repeated Option options = 3;\n  // The source context.\n  SourceContext source_context = 4;\n  // The source syntax.\n  Syntax syntax = 5;\n  // The source edition string, only valid when syntax is SYNTAX_EDITIONS.\n  string edition = 6;\n}\n\n// Enum value definition.\n//\n// New usages of this message as an alternative to EnumValueDescriptorProto are\n// strongly discouraged. This message does not reliability preserve all\n// information necessary to model the schema and preserve semantics. Instead\n// make use of FileDescriptorSet which preserves the necessary information.\nmessage EnumValue {\n  // Enum value name.\n  string name = 1;\n  // Enum value number.\n  int32 number = 2;\n  // Protocol buffer options.\n  repeated Option options = 3;\n}\n\n// A protocol buffer option, which can be attached to a message, field,\n// enumeration, etc.\n//\n// New usages of this message as an alternative to FileOptions, MessageOptions,\n// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions\n// are strongly discouraged.\nmessage Option {\n  // The option's name. For protobuf built-in options (options defined in\n  // descriptor.proto), this is the short name. For example, `\"map_entry\"`.\n  // For custom options, it should be the fully-qualified name. For example,\n  // `\"google.api.http\"`.\n  string name = 1;\n  // The option's value packed in an Any message. If the value is a primitive,\n  // the corresponding wrapper type defined in google/protobuf/wrappers.proto\n  // should be used. If the value is an enum, it should be stored as an int32\n  // value using the google.protobuf.Int32Value type.\n  Any value = 2;\n}\n\n// The syntax in which a protocol buffer element is defined.\nenum Syntax {\n  // Syntax `proto2`.\n  SYNTAX_PROTO2 = 0;\n  // Syntax `proto3`.\n  SYNTAX_PROTO3 = 1;\n  // Syntax `editions`.\n  SYNTAX_EDITIONS = 2;\n}\n"
  },
  {
    "path": "protobuf/google/protobuf/wrappers.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Wrappers for primitive (non-message) types. These types were needed\n// for legacy reasons and are not recommended for use in new APIs.\n//\n// Historically these wrappers were useful to have presence on proto3 primitive\n// fields, but proto3 syntax has been updated to support the `optional` keyword.\n// Using that keyword is now the strongly preferred way to add presence to\n// proto3 primitive fields.\n//\n// A secondary usecase was to embed primitives in the `google.protobuf.Any`\n// type: it is now recommended that you embed your value in your own wrapper\n// message which can be specifically documented.\n//\n// These wrappers have no meaningful use within repeated fields as they lack\n// the ability to detect presence on individual elements.\n// These wrappers have no meaningful use within a map or a oneof since\n// individual entries of a map or fields of a oneof can already detect presence.\n\nsyntax = \"proto3\";\n\npackage google.protobuf;\n\noption cc_enable_arenas = true;\noption go_package = \"google.golang.org/protobuf/types/known/wrapperspb\";\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"WrappersProto\";\noption java_multiple_files = true;\noption objc_class_prefix = \"GPB\";\noption csharp_namespace = \"Google.Protobuf.WellKnownTypes\";\n\n// Wrapper message for `double`.\n//\n// The JSON representation for `DoubleValue` is JSON number.\n//\n// Not recommended for use in new APIs, but still useful for legacy APIs and\n// has no plan to be removed.\nmessage DoubleValue {\n  // The double value.\n  double value = 1;\n}\n\n// Wrapper message for `float`.\n//\n// The JSON representation for `FloatValue` is JSON number.\n//\n// Not recommended for use in new APIs, but still useful for legacy APIs and\n// has no plan to be removed.\nmessage FloatValue {\n  // The float value.\n  float value = 1;\n}\n\n// Wrapper message for `int64`.\n//\n// The JSON representation for `Int64Value` is JSON string.\n//\n// Not recommended for use in new APIs, but still useful for legacy APIs and\n// has no plan to be removed.\nmessage Int64Value {\n  // The int64 value.\n  int64 value = 1;\n}\n\n// Wrapper message for `uint64`.\n//\n// The JSON representation for `UInt64Value` is JSON string.\n//\n// Not recommended for use in new APIs, but still useful for legacy APIs and\n// has no plan to be removed.\nmessage UInt64Value {\n  // The uint64 value.\n  uint64 value = 1;\n}\n\n// Wrapper message for `int32`.\n//\n// The JSON representation for `Int32Value` is JSON number.\n//\n// Not recommended for use in new APIs, but still useful for legacy APIs and\n// has no plan to be removed.\nmessage Int32Value {\n  // The int32 value.\n  int32 value = 1;\n}\n\n// Wrapper message for `uint32`.\n//\n// The JSON representation for `UInt32Value` is JSON number.\n//\n// Not recommended for use in new APIs, but still useful for legacy APIs and\n// has no plan to be removed.\nmessage UInt32Value {\n  // The uint32 value.\n  uint32 value = 1;\n}\n\n// Wrapper message for `bool`.\n//\n// The JSON representation for `BoolValue` is JSON `true` and `false`.\n//\n// Not recommended for use in new APIs, but still useful for legacy APIs and\n// has no plan to be removed.\nmessage BoolValue {\n  // The bool value.\n  bool value = 1;\n}\n\n// Wrapper message for `string`.\n//\n// The JSON representation for `StringValue` is JSON string.\n//\n// Not recommended for use in new APIs, but still useful for legacy APIs and\n// has no plan to be removed.\nmessage StringValue {\n  // The string value.\n  string value = 1;\n}\n\n// Wrapper message for `bytes`.\n//\n// The JSON representation for `BytesValue` is JSON string.\n//\n// Not recommended for use in new APIs, but still useful for legacy APIs and\n// has no plan to be removed.\nmessage BytesValue {\n  // The bytes value.\n  bytes value = 1;\n}\n"
  },
  {
    "path": "protobuf/lib/meta.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n/// Provides metadata about GeneratedMessage and ProtobufEnum to\n/// dart-protoc-plugin. (Experimental API; subject to change.)\n/// @nodoc\nlibrary;\n\n// ignore_for_file: constant_identifier_names\n\n// List of names which cannot be used in a subclass of GeneratedMessage.\nconst GeneratedMessage_reservedNames = <String>[\n  '==',\n  'GeneratedMessage',\n  'Object',\n  'addExtension',\n  'check',\n  'clear',\n  'clearExtension',\n  'clearField',\n  'clone',\n  'copyWith',\n  'createEmptyInstance',\n  'extensionsAreInitialized',\n  'freeze',\n  'getDefaultForField',\n  'getExtension',\n  'getField',\n  'getFieldOrNull',\n  'getTagNumber',\n  'hasExtension',\n  'hasField',\n  'hasRequiredFields',\n  'hashCode',\n  'info_',\n  'isFrozen',\n  'isInitialized',\n  'mergeFromBuffer',\n  'mergeFromCodedBufferReader',\n  'mergeFromJson',\n  'mergeFromJsonMap',\n  'mergeFromMessage',\n  'mergeFromProto3Json',\n  'mergeUnknownFields',\n  'noSuchMethod',\n  'runtimeType',\n  'setExtension',\n  'setField',\n  'toBuilder',\n  'toDebugString',\n  'toProto3Json',\n  'toString',\n  'unknownFields',\n  'writeToBuffer',\n  'writeToCodedBufferWriter',\n  'writeToJson',\n  'writeToJsonMap',\n  r'$_clearField',\n  r'$_ensure',\n  r'$_get',\n  r'$_getI64',\n  r'$_getList',\n  r'$_getMap',\n  r'$_getN',\n  r'$_getB',\n  r'$_getBF',\n  r'$_getI',\n  r'$_getIZ',\n  r'$_getS',\n  r'$_getSZ',\n  r'$_has',\n  r'$_setBool',\n  r'$_setBytes',\n  r'$_setDouble',\n  r'$_setField',\n  r'$_setFloat',\n  r'$_setInt64',\n  r'$_setSignedInt32',\n  r'$_setString',\n  r'$_setUnsignedInt32',\n  r'$_whichOneof',\n];\n\n// List of names which cannot be used in a subclass of ProtobufEnum.\nconst ProtobufEnum_reservedNames = <String>[\n  '==',\n  'Object',\n  'ProtobufEnum',\n  'hashCode',\n  'noSuchMethod',\n  'runtimeType',\n  'toString',\n];\n"
  },
  {
    "path": "protobuf/lib/protobuf.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n/// Runtime library for Dart implementation of [protobufs][1].\n///\n/// [1]: https://developers.google.com/protocol-buffers\nlibrary;\n\nexport 'src/protobuf/internal.dart'\n    hide\n        BuilderInfoInternalExtension,\n        ExtensionFieldSet,\n        ExtensionFieldSetInternalExtension,\n        FieldInfoInternalExtension,\n        FieldSet,\n        FieldSetInternalExtension,\n        GeneratedMessageInternalExtension,\n        MapFieldInfoInternalExtension,\n        checkNotNull,\n        mergeFromProto3JsonAny,\n        writeToProto3JsonAny;\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/annotations.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n/// Annotation for marking accessors that belong together.\nclass TagNumber {\n  final int tagNumber;\n\n  /// Annotation for marking accessors that belong together.\n  ///\n  /// Allows tooling to associate related accessors. The [tagNumber] is the\n  /// protobuf field tag associated with the annotated accessor.\n  const TagNumber(this.tagNumber);\n}\n\n/// Use to annotate generated gRPC classes with the ID of the corresponding\n/// service.\nclass GrpcServiceName {\n  const GrpcServiceName(this.serviceId);\n\n  // This field is used by static analyzers.\n  final String serviceId;\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/builder_info.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n/// Per-message type setup.\nclass BuilderInfo {\n  /// Fully qualified name of this message.\n  final String qualifiedMessageName;\n\n  /// Mapping from [FieldInfo.index]s to [FieldInfo]s.\n  final List<FieldInfo> byIndex = <FieldInfo>[];\n\n  /// Mapping from [FieldInfo.tagNumber]s to [FieldInfo]s.\n  final Map<int, FieldInfo> fieldInfo = <int, FieldInfo>{};\n\n  /// Mapping from string representation of [FieldInfo.tagNumber]s to\n  /// [FieldInfo]s.\n  ///\n  /// This map is used when parsing JSON messages generated by\n  /// [GeneratedMessage.writeToJson], which converts field tags to strings and\n  /// uses those strings as JSON map keys. With this field we avoid parsing\n  /// those strings to integers when parsing the generated maps.\n  final Map<String, FieldInfo> byTagAsString = <String, FieldInfo>{};\n\n  /// Mapping from [FieldInfo.name]s to [FieldInfo]s.\n  final Map<String, FieldInfo> byName = <String, FieldInfo>{};\n\n  /// Mapping from `oneof` field [FieldInfo.tagNumber]s to the their indices in\n  /// [FieldSet._oneofCases].\n  final Map<int, int> oneofs = <int, int>{};\n\n  /// Whether the message has extension fields.\n  bool hasExtensions = false;\n\n  /// Whether the message has required fields.\n  ///\n  /// Note that proto3 doesn't have required fields, only proto2 does.\n  bool hasRequiredFields = true;\n\n  List<FieldInfo>? _sortedByTag;\n\n  // For well-known types.\n  final WellKnownType? _wellKnownType;\n\n  final CreateBuilderFunc? createEmptyInstance;\n\n  BuilderInfo(\n    String? messageName, {\n    PackageName package = const PackageName(''),\n    this.createEmptyInstance,\n    WellKnownType? wellKnownType,\n  }) : qualifiedMessageName = '${package.prefix}$messageName',\n       _wellKnownType = wellKnownType;\n\n  void add<T>(\n    int tagNumber,\n    String name,\n    int? fieldType,\n    dynamic defaultOrMaker,\n    CreateBuilderFunc? subBuilder,\n    ValueOfFunc? valueOf,\n    List<ProtobufEnum>? enumValues, {\n    String? protoName,\n  }) {\n    if (tagNumber == 0) {\n      addUnused();\n    } else {\n      final index = byIndex.length;\n      final fieldInfo = FieldInfo<T>(\n        name,\n        tagNumber,\n        index,\n        fieldType!,\n        defaultOrMaker: defaultOrMaker,\n        subBuilder: subBuilder,\n        valueOf: valueOf,\n        enumValues: enumValues,\n        protoName: protoName,\n      );\n      _addField(fieldInfo);\n    }\n  }\n\n  // Support for tree-shaking of unused fields.\n  void addUnused() {\n    final index = byIndex.length;\n    _addField(FieldInfo.dummy(index));\n  }\n\n  void addMapField<K, V>(\n    int tagNumber,\n    String name,\n    int keyFieldType,\n    int valueFieldType,\n    BuilderInfo mapEntryBuilderInfo,\n    CreateBuilderFunc? valueCreator, {\n    ProtobufEnum? defaultEnumValue,\n    String? protoName,\n  }) {\n    final index = byIndex.length;\n    _addField(\n      MapFieldInfo<K, V>(\n        name,\n        tagNumber,\n        index,\n        PbFieldType.M,\n        keyFieldType,\n        valueFieldType,\n        mapEntryBuilderInfo,\n        valueCreator,\n        defaultEnumValue: defaultEnumValue,\n        protoName: protoName,\n      ),\n    );\n  }\n\n  void addRepeated<T>(\n    int tagNumber,\n    String name,\n    int fieldType,\n    CheckFunc<T>? check,\n    CreateBuilderFunc? subBuilder,\n    ValueOfFunc? valueOf,\n    List<ProtobufEnum>? enumValues, {\n    ProtobufEnum? defaultEnumValue,\n    String? protoName,\n  }) {\n    final index = byIndex.length;\n    _addField(\n      FieldInfo<T>.repeated(\n        name,\n        tagNumber,\n        index,\n        fieldType,\n        check,\n        subBuilder,\n        valueOf: valueOf,\n        enumValues: enumValues,\n        defaultEnumValue: defaultEnumValue,\n        protoName: protoName,\n      ),\n    );\n  }\n\n  void _addField(FieldInfo fi) {\n    byIndex.add(fi);\n    assert(byIndex[fi.index!] == fi);\n    // Fields with tag number 0 are considered dummy fields added to avoid\n    // index calculations add up. They should not be reflected in the following\n    // maps.\n    if (!fi._isDummy) {\n      fieldInfo[fi.tagNumber] = fi;\n      byTagAsString['${fi.tagNumber}'] = fi;\n      byName[fi.name] = fi;\n    }\n  }\n\n  void a<T>(\n    int tagNumber,\n    String name,\n    int fieldType, {\n    dynamic defaultOrMaker,\n    CreateBuilderFunc? subBuilder,\n    ValueOfFunc? valueOf,\n    List<ProtobufEnum>? enumValues,\n    String? protoName,\n  }) {\n    add<T>(\n      tagNumber,\n      name,\n      fieldType,\n      defaultOrMaker,\n      subBuilder,\n      valueOf,\n      enumValues,\n      protoName: protoName,\n    );\n  }\n\n  /// Adds PbFieldType.OS String with no default value to reduce generated\n  /// code size.\n  void aOS(int tagNumber, String name, {String? protoName}) {\n    add<String>(\n      tagNumber,\n      name,\n      PbFieldType.OS,\n      null,\n      null,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  /// Adds PbFieldType.PS String with no default value.\n  void pPS(int tagNumber, String name, {String? protoName}) {\n    addRepeated<String>(\n      tagNumber,\n      name,\n      PbFieldType.PS,\n      getCheckFunction(PbFieldType.PS),\n      null,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  /// Adds PbFieldType.QS String with no default value.\n  void aQS(int tagNumber, String name, {String? protoName}) {\n    add<String>(\n      tagNumber,\n      name,\n      PbFieldType.QS,\n      null,\n      null,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  /// Adds Int64 field with Int64.ZERO default.\n  void aInt64(int tagNumber, String name, {String? protoName}) {\n    add<Int64>(\n      tagNumber,\n      name,\n      PbFieldType.O6,\n      Int64.ZERO,\n      null,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  /// Adds a boolean with no default value.\n  void aOB(int tagNumber, String name, {String? protoName}) {\n    add<bool>(\n      tagNumber,\n      name,\n      PbFieldType.OB,\n      null,\n      null,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  /// Adds a double field.\n  void aD(\n    int tagNumber,\n    String name, {\n    int fieldType = PbFieldType.OD,\n    dynamic defaultOrMaker,\n    String? protoName,\n  }) {\n    add<double>(\n      tagNumber,\n      name,\n      fieldType,\n      defaultOrMaker,\n      null,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  /// Adds an int field.\n  void aI(\n    int tagNumber,\n    String name, {\n    int fieldType = PbFieldType.O3,\n    dynamic defaultOrMaker,\n    String? protoName,\n  }) {\n    add<int>(\n      tagNumber,\n      name,\n      fieldType,\n      defaultOrMaker,\n      null,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  // Enum.\n  void e<T>(\n    int tagNumber,\n    String name,\n    int fieldType, {\n    dynamic defaultOrMaker,\n    ValueOfFunc? valueOf,\n    List<ProtobufEnum>? enumValues,\n    String? protoName,\n  }) {\n    add<T>(\n      tagNumber,\n      name,\n      fieldType,\n      defaultOrMaker,\n      null,\n      valueOf,\n      enumValues,\n      protoName: protoName,\n    );\n  }\n\n  // Enum, updated version.\n  void aE<E extends ProtobufEnum>(\n    int tagNumber,\n    String name, {\n    int fieldType = PbFieldType.OE,\n    dynamic defaultOrMaker,\n    ValueOfFunc? valueOf,\n    required List<E> enumValues,\n    String? protoName,\n  }) {\n    defaultOrMaker ??= enumValues.first;\n    valueOf ??= _findValueOfEnumFunction<E>(enumValues);\n    add<E>(\n      tagNumber,\n      name,\n      fieldType,\n      defaultOrMaker,\n      null,\n      valueOf,\n      enumValues,\n      protoName: protoName,\n    );\n  }\n\n  // Repeated, not a message, group, or enum.\n  void p<T>(int tagNumber, String name, int fieldType, {String? protoName}) {\n    assert(\n      !PbFieldType.isGroupOrMessage(fieldType) &&\n          !PbFieldType.isEnum(fieldType),\n    );\n    addRepeated<T>(\n      tagNumber,\n      name,\n      fieldType,\n      getCheckFunction(fieldType),\n      null,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  // Repeated message, group, or enum.\n  void pc<T>(\n    int tagNumber,\n    String name,\n    int fieldType, {\n    CreateBuilderFunc? subBuilder,\n    ValueOfFunc? valueOf,\n    List<ProtobufEnum>? enumValues,\n    ProtobufEnum? defaultEnumValue,\n    String? protoName,\n  }) {\n    assert(\n      PbFieldType.isGroupOrMessage(fieldType) || PbFieldType.isEnum(fieldType),\n    );\n    addRepeated<T>(\n      tagNumber,\n      name,\n      fieldType,\n      checkNotNull,\n      subBuilder,\n      valueOf,\n      enumValues,\n      defaultEnumValue: defaultEnumValue,\n      protoName: protoName,\n    );\n  }\n\n  // Repeated enum.\n  void pPE<E extends ProtobufEnum>(\n    int tagNumber,\n    String name, {\n    int fieldType = PbFieldType.PE,\n    ValueOfFunc? valueOf,\n    required List<E> enumValues,\n    ProtobufEnum? defaultEnumValue,\n    String? protoName,\n  }) {\n    assert(PbFieldType.isEnum(fieldType));\n    defaultEnumValue ??= enumValues.first;\n    valueOf ??= _findValueOfEnumFunction<E>(enumValues);\n    addRepeated<E>(\n      tagNumber,\n      name,\n      fieldType,\n      checkNotNull,\n      null,\n      valueOf,\n      enumValues,\n      defaultEnumValue: defaultEnumValue,\n      protoName: protoName,\n    );\n  }\n\n  // Optional Message.\n  void aOM<T extends GeneratedMessage>(\n    int tagNumber,\n    String name, {\n    required T Function() subBuilder,\n    String? protoName,\n  }) {\n    add<T>(\n      tagNumber,\n      name,\n      PbFieldType.OM,\n      GeneratedMessage._defaultMakerFor<T>(subBuilder),\n      subBuilder,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  // reQuried Message.\n  void aQM<T extends GeneratedMessage>(\n    int tagNumber,\n    String name, {\n    required T Function() subBuilder,\n    String? protoName,\n  }) {\n    add<T>(\n      tagNumber,\n      name,\n      PbFieldType.QM,\n      GeneratedMessage._defaultMakerFor<T>(subBuilder),\n      subBuilder,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  // rePeated Message, specialization of pc<T>.\n  void pPM<T extends GeneratedMessage>(\n    int tagNumber,\n    String name, {\n    required T Function() subBuilder,\n    String? protoName,\n  }) {\n    addRepeated<T>(\n      tagNumber,\n      name,\n      PbFieldType.PM,\n      checkNotNull,\n      subBuilder,\n      null,\n      null,\n      protoName: protoName,\n    );\n  }\n\n  // oneof declarations.\n  void oo(int oneofIndex, List<int> tags) {\n    for (final tag in tags) {\n      oneofs[tag] = oneofIndex;\n    }\n  }\n\n  // Map field.\n  void m<K, V>(\n    int tagNumber,\n    String name, {\n    String? entryClassName,\n    required int keyFieldType,\n    required int valueFieldType,\n    CreateBuilderFunc? valueCreator,\n    ValueOfFunc? valueOf,\n    List<ProtobufEnum>? enumValues,\n    ProtobufEnum? defaultEnumValue,\n    PackageName packageName = const PackageName(''),\n    String? protoName,\n    dynamic valueDefaultOrMaker,\n  }) {\n    final mapEntryBuilderInfo =\n        BuilderInfo(entryClassName, package: packageName)\n          ..add(mapKeyFieldNumber, 'key', keyFieldType, null, null, null, null)\n          ..add(\n            mapValueFieldNumber,\n            'value',\n            valueFieldType,\n            valueDefaultOrMaker,\n            valueCreator,\n            valueOf,\n            enumValues,\n          );\n\n    addMapField<K, V>(\n      tagNumber,\n      name,\n      keyFieldType,\n      valueFieldType,\n      mapEntryBuilderInfo,\n      valueCreator,\n      defaultEnumValue: defaultEnumValue,\n      protoName: protoName,\n    );\n  }\n\n  bool containsTagNumber(int tagNumber) => fieldInfo.containsKey(tagNumber);\n\n  dynamic defaultValue(int tagNumber) {\n    final func = makeDefault(tagNumber);\n    return func == null ? null : func();\n  }\n\n  // Returns the field name for a given tag number, for debugging purposes.\n  String? fieldName(int tagNumber) {\n    final i = fieldInfo[tagNumber];\n    return i?.name;\n  }\n\n  int? fieldType(int tagNumber) {\n    final i = fieldInfo[tagNumber];\n    return i?.type;\n  }\n\n  MakeDefaultFunc? makeDefault(int tagNumber) {\n    final i = fieldInfo[tagNumber];\n    return i?.makeDefault;\n  }\n\n  CreateBuilderFunc? subBuilder(int tagNumber) {\n    final i = fieldInfo[tagNumber];\n    return i?.subBuilder;\n  }\n\n  int? tagNumber(String fieldName) {\n    final i = byName[fieldName];\n    return i?.tagNumber;\n  }\n\n  ValueOfFunc? valueOfFunc(int tagNumber) {\n    final i = fieldInfo[tagNumber];\n    return i?.valueOf;\n  }\n\n  /// The [FieldInfo] for each field in tag number order.\n  List<FieldInfo> get sortedByTag => _sortedByTag ??= _computeSortedByTag();\n\n  /// The message name. Also see [qualifiedMessageName].\n  String get messageName {\n    final lastDot = qualifiedMessageName.lastIndexOf('.');\n    return lastDot == -1\n        ? qualifiedMessageName\n        : qualifiedMessageName.substring(lastDot + 1);\n  }\n\n  List<FieldInfo> _computeSortedByTag() =>\n  // Code generator inserts fields in tag order, but it's possible for\n  // user-written code to insert unordered.\n  List<FieldInfo>.from(fieldInfo.values, growable: false)\n    ..sort((FieldInfo a, FieldInfo b) => a.tagNumber.compareTo(b.tagNumber));\n\n  GeneratedMessage _makeEmptyMessage(\n    int tagNumber,\n    ExtensionRegistry? extensionRegistry,\n  ) {\n    var subBuilderFunc = subBuilder(tagNumber);\n    if (subBuilderFunc == null && extensionRegistry != null) {\n      subBuilderFunc =\n          extensionRegistry\n              .getExtension(qualifiedMessageName, tagNumber)!\n              .subBuilder;\n    }\n    return subBuilderFunc!();\n  }\n\n  ProtobufEnum? _decodeEnum(\n    int tagNumber,\n    ExtensionRegistry? registry,\n    int rawValue,\n  ) {\n    final f = valueOfFunc(tagNumber);\n    if (f != null) {\n      return f(rawValue);\n    }\n    return registry\n        ?.getExtension(qualifiedMessageName, tagNumber)\n        ?.valueOf\n        ?.call(rawValue);\n  }\n}\n\nextension BuilderInfoInternalExtension on BuilderInfo {\n  GeneratedMessage makeEmptyMessage(\n    int tagNumber,\n    ExtensionRegistry? extensionRegistry,\n  ) => _makeEmptyMessage(tagNumber, extensionRegistry);\n\n  ProtobufEnum? decodeEnum(\n    int tagNumber,\n    ExtensionRegistry? registry,\n    int rawValue,\n  ) => _decodeEnum(tagNumber, registry, rawValue);\n}\n\nE? Function(int) _findValueOfEnumFunction<E extends ProtobufEnum>(\n  List<E> enumValues,\n) {\n  final function = _valueOfFunctions[enumValues];\n  if (function != null) {\n    // 'as dynamic' causes an implicit downcast to `E? Function(int)`, which is\n    // removed by dart2js at `-O3`.\n    return function as dynamic;\n  }\n  return _valueOfFunctions[enumValues] = _makeValueOfEnumFunction<E>(\n    enumValues,\n  );\n}\n\n/// Map for finding 'valueOf' functions for enums. An identity map is used since\n/// the `const` 'values' list for the enum is canonicalized and distinct for\n/// each enum.\nfinal _valueOfFunctions =\n    Map<List<ProtobufEnum>, ProtobufEnum? Function(int)>.identity();\n\nE? Function(int) _makeValueOfEnumFunction<E extends ProtobufEnum>(\n  List<E> values,\n) {\n  Map<int, E>? map;\n\n  E? intToEnumValue(int value) {\n    return (map ??= ProtobufEnum.initByValue(values))[value];\n  }\n\n  return intToEnumValue;\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/coded_buffer.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\nvoid _writeToCodedBufferWriter(FieldSet fs, CodedBufferWriter out) {\n  // Sorting by tag number isn't required, but it sometimes enables\n  // performance optimizations for the receiver. See:\n  // https://developers.google.com/protocol-buffers/docs/encoding?hl=en#order\n\n  for (final fi in fs._infosSortedByTag) {\n    final value = fs._values[fi.index!];\n    if (value == null) continue;\n    out.writeField(fi.tagNumber, fi.type, value);\n  }\n\n  final extensions = fs._extensions;\n  if (extensions != null) {\n    for (final tagNumber in sorted(extensions._tagNumbers)) {\n      final fi = extensions._getInfoOrNull(tagNumber)!;\n      out.writeField(tagNumber, fi.type, extensions._getFieldOrNull(fi));\n    }\n  }\n\n  final unknownFields = fs._unknownFields;\n  if (unknownFields != null) {\n    unknownFields.writeToCodedBufferWriter(out);\n  }\n}\n\nvoid _mergeFromCodedBufferReader(\n  BuilderInfo meta,\n  FieldSet fs,\n  CodedBufferReader input,\n  ExtensionRegistry registry,\n) {\n  fs._ensureWritable();\n  while (true) {\n    final tag = input.readTag();\n    if (tag == 0) return;\n    final wireType = tag & 0x7;\n    final tagNumber = tag >> 3;\n\n    var fi = fs._nonExtensionInfo(meta, tagNumber);\n    fi ??= registry.getExtension(meta.qualifiedMessageName, tagNumber);\n\n    if (fi == null || !_wireTypeMatches(fi.type, wireType)) {\n      if (!fs._ensureUnknownFields().mergeFieldFromBuffer(tag, input)) {\n        return;\n      }\n      continue;\n    }\n\n    // Ignore required/optional packed/unpacked.\n    var fieldType = fi.type;\n    fieldType &= ~(PbFieldType.PACKED_BIT | PbFieldType.REQUIRED_BIT);\n    switch (fieldType) {\n      case PbFieldType.OPTIONAL_BOOL:\n        fs._setFieldUnchecked(meta, fi, input.readBool());\n      case PbFieldType.OPTIONAL_BYTES:\n        fs._setFieldUnchecked(meta, fi, input.readBytes());\n      case PbFieldType.OPTIONAL_STRING:\n        fs._setFieldUnchecked(meta, fi, input.readString());\n      case PbFieldType.OPTIONAL_FLOAT:\n        fs._setFieldUnchecked(meta, fi, input.readFloat());\n      case PbFieldType.OPTIONAL_DOUBLE:\n        fs._setFieldUnchecked(meta, fi, input.readDouble());\n      case PbFieldType.OPTIONAL_ENUM:\n        final rawValue = input.readEnum();\n        final value = meta._decodeEnum(tagNumber, registry, rawValue);\n        if (value == null) {\n          final unknown = fs._ensureUnknownFields();\n          unknown.mergeVarintField(tagNumber, Int64(rawValue));\n        } else {\n          fs._setFieldUnchecked(meta, fi, value);\n        }\n      case PbFieldType.OPTIONAL_GROUP:\n        final subMessage = meta._makeEmptyMessage(tagNumber, registry);\n        final oldValue = fs._getFieldOrNull(fi);\n        if (oldValue != null) {\n          subMessage.mergeFromMessage(oldValue);\n        }\n        input.readGroup(tagNumber, subMessage, registry);\n        fs._setFieldUnchecked(meta, fi, subMessage);\n      case PbFieldType.OPTIONAL_INT32:\n        fs._setFieldUnchecked(meta, fi, input.readInt32());\n      case PbFieldType.OPTIONAL_INT64:\n        fs._setFieldUnchecked(meta, fi, input.readInt64());\n      case PbFieldType.OPTIONAL_SINT32:\n        fs._setFieldUnchecked(meta, fi, input.readSint32());\n      case PbFieldType.OPTIONAL_SINT64:\n        fs._setFieldUnchecked(meta, fi, input.readSint64());\n      case PbFieldType.OPTIONAL_UINT32:\n        fs._setFieldUnchecked(meta, fi, input.readUint32());\n      case PbFieldType.OPTIONAL_UINT64:\n        fs._setFieldUnchecked(meta, fi, input.readUint64());\n      case PbFieldType.OPTIONAL_FIXED32:\n        fs._setFieldUnchecked(meta, fi, input.readFixed32());\n      case PbFieldType.OPTIONAL_FIXED64:\n        fs._setFieldUnchecked(meta, fi, input.readFixed64());\n      case PbFieldType.OPTIONAL_SFIXED32:\n        fs._setFieldUnchecked(meta, fi, input.readSfixed32());\n      case PbFieldType.OPTIONAL_SFIXED64:\n        fs._setFieldUnchecked(meta, fi, input.readSfixed64());\n      case PbFieldType.OPTIONAL_MESSAGE:\n        final GeneratedMessage? oldValue = fs._getFieldOrNull(fi);\n        if (oldValue != null) {\n          input.readMessage(oldValue, registry);\n        } else {\n          final subMessage = meta._makeEmptyMessage(tagNumber, registry);\n          input.readMessage(subMessage, registry);\n          fs._setFieldUnchecked(meta, fi, subMessage);\n        }\n      case PbFieldType.REPEATED_BOOL:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            // No need to check the element as for `bool` fields we only need to\n            // check that the value is not null, and we know in `add` below that\n            // the value isn't null (`readBool` doesn't return `null`).\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readBool());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readBool());\n        }\n      case PbFieldType.REPEATED_BYTES:\n        final list = fs._ensureRepeatedField(meta, fi);\n        list.checkModifiable('add');\n        list.addUnchecked(input.readBytes());\n      case PbFieldType.REPEATED_STRING:\n        final list = fs._ensureRepeatedField(meta, fi);\n        list.checkModifiable('add');\n        list.addUnchecked(input.readString());\n      case PbFieldType.REPEATED_FLOAT:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readFloat());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readFloat());\n        }\n      case PbFieldType.REPEATED_DOUBLE:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readDouble());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readDouble());\n        }\n      case PbFieldType.REPEATED_ENUM:\n        final list = fs._ensureRepeatedField(meta, fi);\n        _readPackableToListEnum(\n          list,\n          meta,\n          fs,\n          input,\n          wireType,\n          tagNumber,\n          registry,\n        );\n      case PbFieldType.REPEATED_GROUP:\n        final subMessage = meta._makeEmptyMessage(tagNumber, registry);\n        input.readGroup(tagNumber, subMessage, registry);\n        final list = fs._ensureRepeatedField(meta, fi);\n        list.add(subMessage);\n      case PbFieldType.REPEATED_INT32:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readInt32());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readInt32());\n        }\n      case PbFieldType.REPEATED_INT64:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readInt64());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readInt64());\n        }\n      case PbFieldType.REPEATED_SINT32:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readSint32());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readSint32());\n        }\n      case PbFieldType.REPEATED_SINT64:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readSint64());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readSint64());\n        }\n      case PbFieldType.REPEATED_UINT32:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readUint32());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readUint32());\n        }\n      case PbFieldType.REPEATED_UINT64:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readUint64());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readUint64());\n        }\n      case PbFieldType.REPEATED_FIXED32:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readFixed32());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readFixed32());\n        }\n      case PbFieldType.REPEATED_FIXED64:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readFixed64());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readFixed64());\n        }\n      case PbFieldType.REPEATED_SFIXED32:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readSfixed32());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readSfixed32());\n        }\n      case PbFieldType.REPEATED_SFIXED64:\n        final list = fs._ensureRepeatedField(meta, fi);\n        if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n          final limit = input.readInt32();\n          if (limit != 0) {\n            list.checkModifiable('add');\n            input._withLimit(limit, () {\n              while (!input.isAtEnd()) {\n                list.addUnchecked(input.readSfixed64());\n              }\n            });\n          }\n        } else {\n          list.checkModifiable('add');\n          list.addUnchecked(input.readSfixed64());\n        }\n      case PbFieldType.REPEATED_MESSAGE:\n        final subMessage = meta._makeEmptyMessage(tagNumber, registry);\n        input.readMessage(subMessage, registry);\n        final list = fs._ensureRepeatedField(meta, fi);\n        list.add(subMessage);\n      case PbFieldType.MAP:\n        final mapFieldInfo = fi as MapFieldInfo;\n        final mapEntryMeta = mapFieldInfo.mapEntryBuilderInfo;\n        final map = fs._ensureMapField(meta, mapFieldInfo);\n        _readMapEntry(map, mapEntryMeta, input, registry);\n      default:\n        throw UnsupportedError('Unknown field type $fieldType');\n    }\n  }\n}\n\nvoid _readMapEntry(\n  PbMap map,\n  BuilderInfo meta,\n  CodedBufferReader input,\n  ExtensionRegistry registry,\n) {\n  final length = input.readInt32();\n  final oldLimit = input._currentLimit;\n  input._currentLimit = input._bufferPos + length;\n  final entryFieldSet = FieldSet(null, meta);\n  _mergeFromCodedBufferReader(meta, entryFieldSet, input, registry);\n  input.checkLastTagWas(0);\n  input._currentLimit = oldLimit;\n  final key = entryFieldSet._values[0] ?? meta.byIndex[0].makeDefault!();\n  final value = entryFieldSet._values[1] ?? meta.byIndex[1].makeDefault!();\n  map[key] = value;\n}\n\nvoid _readPackableToListEnum(\n  List list,\n  BuilderInfo meta,\n  FieldSet fs,\n  CodedBufferReader input,\n  int wireType,\n  int tagNumber,\n  ExtensionRegistry registry,\n) {\n  if (wireType == WIRETYPE_LENGTH_DELIMITED) {\n    // Packed.\n    input._withLimit(input.readInt32(), () {\n      while (!input.isAtEnd()) {\n        _readRepeatedEnum(list, meta, fs, input, tagNumber, registry);\n      }\n    });\n  } else {\n    // Not packed.\n    _readRepeatedEnum(list, meta, fs, input, tagNumber, registry);\n  }\n}\n\nvoid _readRepeatedEnum(\n  List list,\n  BuilderInfo meta,\n  FieldSet fs,\n  CodedBufferReader input,\n  int tagNumber,\n  ExtensionRegistry registry,\n) {\n  final rawValue = input.readEnum();\n  final value = meta._decodeEnum(tagNumber, registry, rawValue);\n  if (value == null) {\n    final unknown = fs._ensureUnknownFields();\n    unknown.mergeVarintField(tagNumber, Int64(rawValue));\n  } else {\n    list.add(value);\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/coded_buffer_reader.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n/// Reader used for converting binary-encoded protobufs into\n/// [GeneratedMessage]s.\nclass CodedBufferReader {\n  // ignore: constant_identifier_names\n  static const int DEFAULT_RECURSION_LIMIT = 100;\n  // Maximum value of a 32-bit signed integer.\n  // ignore: constant_identifier_names\n  static const int DEFAULT_SIZE_LIMIT = (1 << 31) - 1;\n\n  final Uint8List _buffer;\n\n  /// [ByteData] of [_buffer], created once to be able to decode fixed-size\n  /// integers and floats without having to allocate a [ByteData] every time.\n  late final ByteData _byteData = ByteData.sublistView(_buffer);\n\n  int _bufferPos = 0;\n  int _currentLimit = -1;\n  int _lastTag = 0;\n  int _recursionDepth = 0;\n  final int _recursionLimit;\n  final int _sizeLimit;\n\n  CodedBufferReader(\n    List<int> buffer, {\n    int recursionLimit = DEFAULT_RECURSION_LIMIT,\n    int sizeLimit = DEFAULT_SIZE_LIMIT,\n  }) : _buffer = buffer is Uint8List ? buffer : Uint8List.fromList(buffer),\n       _recursionLimit = recursionLimit,\n       _sizeLimit = math.min(sizeLimit, buffer.length) {\n    _currentLimit = _sizeLimit;\n  }\n\n  void _throwTruncatedMessageError(int limit) {\n    if (limit > _sizeLimit && limit <= _buffer.length) {\n      throw InvalidProtocolBufferException.truncatedMessageDueToSizeLimit(\n        _buffer.length,\n        _sizeLimit,\n      );\n    }\n    throw InvalidProtocolBufferException.truncatedMessage();\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  void checkLastTagWas(int value) {\n    if (_lastTag != value) {\n      throw InvalidProtocolBufferException.invalidEndTag();\n    }\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  bool isAtEnd() => _bufferPos >= _currentLimit;\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  void _withLimit(int byteLimit, Function() callback) {\n    if (byteLimit < 0) {\n      throw ArgumentError(\n        'CodedBufferReader encountered an embedded string or message'\n        ' which claimed to have negative size.',\n      );\n    }\n    byteLimit += _bufferPos;\n    final oldLimit = _currentLimit;\n    if ((oldLimit != -1 && byteLimit > oldLimit) || byteLimit > _sizeLimit) {\n      _throwTruncatedMessageError(byteLimit);\n    }\n    _currentLimit = byteLimit;\n    callback();\n    _currentLimit = oldLimit;\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  void _checkLimit(int increment) {\n    assert(_currentLimit != -1);\n    _bufferPos += increment;\n    if (_bufferPos > _currentLimit) {\n      throw InvalidProtocolBufferException.truncatedMessage();\n    }\n  }\n\n  void readGroup(\n    int fieldNumber,\n    GeneratedMessage message,\n    ExtensionRegistry extensionRegistry,\n  ) {\n    if (_recursionDepth >= _recursionLimit) {\n      throw InvalidProtocolBufferException.recursionLimitExceeded();\n    }\n    ++_recursionDepth;\n    message.mergeFromCodedBufferReader(this, extensionRegistry);\n    checkLastTagWas(makeTag(fieldNumber, WIRETYPE_END_GROUP));\n    --_recursionDepth;\n  }\n\n  UnknownFieldSet readUnknownFieldSetGroup(int fieldNumber) {\n    if (_recursionDepth >= _recursionLimit) {\n      throw InvalidProtocolBufferException.recursionLimitExceeded();\n    }\n    ++_recursionDepth;\n    final unknownFieldSet = UnknownFieldSet();\n    unknownFieldSet.mergeFromCodedBufferReader(this);\n    checkLastTagWas(makeTag(fieldNumber, WIRETYPE_END_GROUP));\n    --_recursionDepth;\n    return unknownFieldSet;\n  }\n\n  void readMessage(\n    GeneratedMessage message,\n    ExtensionRegistry extensionRegistry,\n  ) {\n    final length = readInt32();\n    if (_recursionDepth >= _recursionLimit) {\n      throw InvalidProtocolBufferException.recursionLimitExceeded();\n    }\n    if (length < 0) {\n      throw ArgumentError(\n        'CodedBufferReader encountered an embedded string or message'\n        ' which claimed to have negative size.',\n      );\n    }\n\n    final oldLimit = _currentLimit;\n    _currentLimit = _bufferPos + length;\n    if (_currentLimit > oldLimit) {\n      _throwTruncatedMessageError(_currentLimit);\n    }\n    ++_recursionDepth;\n    message.mergeFromCodedBufferReader(this, extensionRegistry);\n    checkLastTagWas(0);\n    --_recursionDepth;\n    _currentLimit = oldLimit;\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  int readEnum() => readInt32();\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  int readInt32() => _readRawVarint32(true);\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  Int64 readInt64() => _readRawVarint64();\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  int readUint32() => _readRawVarint32(false);\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  Int64 readUint64() => _readRawVarint64();\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  int readSint32() => _decodeZigZag32(readUint32());\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  Int64 readSint64() => _decodeZigZag64(readUint64());\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  int readFixed32() {\n    final pos = _bufferPos;\n    _checkLimit(4);\n    return _byteData.getUint32(pos, Endian.little);\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  Int64 readFixed64() => readSfixed64();\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  int readSfixed32() {\n    final pos = _bufferPos;\n    _checkLimit(4);\n    return _byteData.getInt32(pos, Endian.little);\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  Int64 readSfixed64() {\n    final pos = _bufferPos;\n    _checkLimit(8);\n    final view = Uint8List.sublistView(_buffer, pos, pos + 8);\n    return Int64.fromBytes(view);\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  bool readBool() => _readRawVarint32(true) != 0;\n\n  /// Read a length-delimited field as bytes.\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  Uint8List readBytes() => Uint8List.fromList(readBytesAsView());\n\n  /// Read a length-delimited field as a view of the [CodedBufferReader]'s\n  /// buffer. When storing the returned value directly (instead of e.g. parsing\n  /// it as a UTF-8 string and copying) use [readBytes] instead to avoid\n  /// holding on to the whole message, or copy the returned view.\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  Uint8List readBytesAsView() {\n    final length = readInt32();\n    _checkLimit(length);\n    return Uint8List.view(\n      _buffer.buffer,\n      _buffer.offsetInBytes + _bufferPos - length,\n      length,\n    );\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  String readString() {\n    final length = readInt32();\n    final stringPos = _bufferPos;\n    _checkLimit(length);\n    return const Utf8Decoder(\n      allowMalformed: true,\n    ).convert(_buffer, stringPos, stringPos + length);\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  double readFloat() {\n    final pos = _bufferPos;\n    _checkLimit(4);\n    return _byteData.getFloat32(pos, Endian.little);\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  double readDouble() {\n    final pos = _bufferPos;\n    _checkLimit(8);\n    return _byteData.getFloat64(pos, Endian.little);\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  int readTag() {\n    if (isAtEnd()) {\n      _lastTag = 0;\n      return 0;\n    }\n\n    _lastTag = readUint32();\n    if (getTagFieldNumber(_lastTag) == 0) {\n      throw InvalidProtocolBufferException.invalidTag();\n    }\n    return _lastTag;\n  }\n\n  bool skipField(int tag) {\n    final tagType = getTagWireType(tag);\n\n    if (isAtEnd() || tagType == WIRETYPE_END_GROUP) {\n      return false;\n    }\n\n    switch (getTagWireType(tag)) {\n      case WIRETYPE_VARINT:\n        readInt64();\n        return true;\n      case WIRETYPE_FIXED64:\n        readFixed64();\n        return true;\n      case WIRETYPE_LENGTH_DELIMITED:\n        final length = readInt32();\n        _checkLimit(length);\n        return true;\n      case WIRETYPE_FIXED32:\n        readFixed32();\n        return true;\n      case WIRETYPE_START_GROUP:\n        readUnknownFieldSetGroup(getTagFieldNumber(tag));\n        return true;\n      default:\n        throw InvalidProtocolBufferException.invalidWireType();\n    }\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  static int _decodeZigZag32(int value) {\n    if ((value & 0x1) == 1) {\n      return -(value >> 1) - 1;\n    } else {\n      return value >> 1;\n    }\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  static Int64 _decodeZigZag64(Int64 value) {\n    if ((value & 0x1) == 1) value = -value;\n    return value >> 1;\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  int _readRawVarintByte() {\n    _checkLimit(1);\n    return _buffer[_bufferPos - 1];\n  }\n\n  int _readRawVarint32(bool signed) {\n    // Read up to 10 bytes.\n    // We use a local [bufferPos] variable to avoid repeatedly loading/store the\n    // this._bufferpos field.\n    var bufferPos = _bufferPos;\n    var bytes = _currentLimit - bufferPos;\n    if (bytes > 10) bytes = 10;\n    var result = 0;\n    for (var i = 0; i < bytes; i++) {\n      final byte = _buffer[bufferPos++];\n      result |= (byte & 0x7f) << (i * 7);\n      if ((byte & 0x80) == 0) {\n        result &= 0xffffffff;\n        _bufferPos = bufferPos;\n        return signed ? result - 2 * (0x80000000 & result) : result;\n      }\n    }\n    _bufferPos = bufferPos;\n    throw InvalidProtocolBufferException.malformedVarint();\n  }\n\n  Int64 _readRawVarint64() {\n    var lo = 0;\n    var hi = 0;\n\n    // Read low 28 bits.\n    for (var i = 0; i < 4; i++) {\n      final byte = _readRawVarintByte();\n      lo |= (byte & 0x7f) << (i * 7);\n      if ((byte & 0x80) == 0) return Int64.fromInts(hi, lo);\n    }\n\n    // Read middle 7 bits: 4 low belong to low part above,\n    // 3 remaining belong to hi.\n    final byte = _readRawVarintByte();\n    lo |= (byte & 0xf) << 28;\n    hi = (byte >> 4) & 0x7;\n    if ((byte & 0x80) == 0) {\n      return Int64.fromInts(hi, lo);\n    }\n\n    // Read remaining bits of hi.\n    for (var i = 0; i < 5; i++) {\n      final byte = _readRawVarintByte();\n      hi |= (byte & 0x7f) << ((i * 7) + 3);\n      if ((byte & 0x80) == 0) return Int64.fromInts(hi, lo);\n    }\n    throw InvalidProtocolBufferException.malformedVarint();\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/coded_buffer_writer.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// ignore_for_file: constant_identifier_names\n\npart of 'internal.dart';\n\n/// Writer used for converting [GeneratedMessage]s into binary\n/// representation.\n///\n/// Note that it is impossible to serialize protobuf messages using a one pass\n/// streaming serialization as some values are serialized using\n/// length-delimited representation, which means that they are represented as\n/// a varint encoded length followed by specified number of bytes of data.\n///\n/// Due to this [CodedBufferWriter] maintains two output buffers:\n/// [_outputChunks] which contains all continuously written bytes and\n/// [_splices] which describes additional bytes to splice in-between\n/// [_outputChunks] bytes.\n///\nclass CodedBufferWriter {\n  /// Array of splices representing the data written into the writer.\n  /// Each element might be one of:\n  ///   * a [Uint8List] object - represents a sequence of bytes that need to be\n  ///                            emitted into the result as-is;\n  ///   * a positive integer - a number of bytes to copy from [_outputChunks]\n  ///                          into resulting buffer;\n  ///   * a non-positive integer - a positive number that needs to be emitted\n  ///                              into result buffer as a varint;\n  final List<dynamic> _splices = <dynamic>[];\n\n  /// Number of bytes written into [_outputChunk] and [_outputChunks] since\n  /// the last splice was recorded.\n  int _lastSplicePos = 0;\n\n  /// Size of the [_outputChunk].\n  static const _chunkLength = 512;\n\n  /// Current chunk used to write data into. Once it is full it is\n  /// pushed into [_outputChunks] and a new one is allocated.\n  Uint8List? _outputChunk;\n\n  /// Number of bytes written into the [_outputChunk].\n  int _bytesInChunk = 0;\n\n  /// ByteData pointing to [_outputChunk]. Used to write primitive values\n  /// more efficiently.\n  ByteData? _outputChunkAsByteData;\n\n  /// Array of pairs `<Uint8List chunk, int bytesInChunk>` - chunks are pushed\n  /// into this array once they are full.\n  final List<dynamic> _outputChunks = <dynamic>[];\n\n  /// Total amount of bytes used in all chunks.\n  int _outputChunksBytes = 0;\n\n  /// Total amount of bytes written into this writer.\n  int _bytesTotal = 0;\n  int get lengthInBytes => _bytesTotal;\n\n  CodedBufferWriter() {\n    // Initialize [_outputChunk].\n    _commitChunk(true);\n  }\n\n  void writeField(int fieldNumber, int fieldType, dynamic fieldValue) {\n    final valueType = PbFieldType.baseType(fieldType);\n\n    if ((fieldType & PbFieldType.PACKED_BIT) != 0) {\n      final List list = fieldValue;\n      if (list.isNotEmpty) {\n        _writeTag(fieldNumber, WIRETYPE_LENGTH_DELIMITED);\n        final mark = _startLengthDelimited();\n        for (final value in list) {\n          _writeValueAs(valueType, value);\n        }\n        _endLengthDelimited(mark);\n      }\n      return;\n    }\n\n    if ((fieldType & PbFieldType.MAP_BIT) != 0) {\n      final PbMap map = fieldValue;\n      final keyWireFormat = _wireTypes[_valueTypeIndex(map.keyFieldType)];\n      final valueWireFormat = _wireTypes[_valueTypeIndex(map.valueFieldType)];\n\n      map.forEach((key, value) {\n        _writeTag(fieldNumber, WIRETYPE_LENGTH_DELIMITED);\n        final mark = _startLengthDelimited();\n        _writeValue(mapKeyFieldNumber, map.keyFieldType, key, keyWireFormat);\n        _writeValue(\n          mapValueFieldNumber,\n          map.valueFieldType,\n          value,\n          valueWireFormat,\n        );\n        _endLengthDelimited(mark);\n      });\n      return;\n    }\n\n    final wireFormat = _wireTypes[_valueTypeIndex(valueType)];\n\n    if ((fieldType & PbFieldType.REPEATED_BIT) != 0) {\n      final List list = fieldValue;\n      for (var i = 0; i < list.length; i++) {\n        _writeValue(fieldNumber, valueType, list[i], wireFormat);\n      }\n      return;\n    }\n    _writeValue(fieldNumber, valueType, fieldValue, wireFormat);\n  }\n\n  Uint8List toBuffer() {\n    final result = Uint8List(_bytesTotal);\n    writeTo(result);\n    return result;\n  }\n\n  /// Serializes everything written to this writer so far to [buffer], starting\n  /// from [offset] in [buffer]. Returns `true` on success.\n  bool writeTo(Uint8List buffer, [int offset = 0]) {\n    if (buffer.length - offset < _bytesTotal) {\n      return false;\n    }\n\n    // Move the current output chunk into _outputChunks and commit the current\n    // splice for uniformity.\n    _commitChunk(false);\n    _commitSplice();\n\n    var outPos = offset; // Output position in the buffer.\n    var chunkIndex = 0, chunkPos = 0; // Position within _outputChunks.\n    for (var i = 0; i < _splices.length; i++) {\n      final action = _splices[i];\n      if (action is int) {\n        if (action <= 0) {\n          // action is a positive varint to be emitted into the output buffer.\n          var v = 0 - action; // Note: 0 - action to avoid -0.0 in JS.\n          while (v >= 0x80) {\n            buffer[outPos++] = 0x80 | (v & 0x7f);\n            v >>= 7;\n          }\n          buffer[outPos++] = v;\n        } else {\n          // `action` is an amount of bytes to copy from `_outputChunks` into\n          // the buffer.\n          var bytesToCopy = action;\n          while (bytesToCopy > 0) {\n            final Uint8List chunk = _outputChunks[chunkIndex];\n            final int bytesInChunk = _outputChunks[chunkIndex + 1];\n\n            // Copy at most `bytesToCopy` bytes from the current chunk.\n            final leftInChunk = bytesInChunk - chunkPos;\n            final bytesToCopyFromChunk =\n                leftInChunk > bytesToCopy ? bytesToCopy : leftInChunk;\n            buffer.setRange(\n              outPos,\n              outPos + bytesToCopyFromChunk,\n              chunk,\n              chunkPos,\n            );\n            chunkPos += bytesToCopyFromChunk;\n            outPos += bytesToCopyFromChunk;\n            bytesToCopy -= bytesToCopyFromChunk;\n\n            // Move to the next chunk if the current one is exhausted.\n            if (chunkPos == bytesInChunk) {\n              chunkIndex += 2;\n              chunkPos = 0;\n            }\n          }\n        }\n      } else {\n        // action is a `Uint8List` containing bytes to emit into the output\n        // buffer.\n        final Uint8List value = action;\n        final end = outPos + value.length;\n        buffer.setRange(outPos, end, value);\n        outPos = end;\n      }\n    }\n\n    return true;\n  }\n\n  /// Move the current [_outputChunk] into [_outputChunks].\n  ///\n  /// If [allocateNew] is `true` then allocate a new chunk, otherwise\n  /// set [_outputChunk] to `null`.\n  void _commitChunk(bool allocateNew) {\n    if (_bytesInChunk != 0) {\n      _outputChunks.add(_outputChunk);\n      _outputChunks.add(_bytesInChunk);\n      _outputChunksBytes += _bytesInChunk;\n    }\n\n    if (allocateNew) {\n      _outputChunk = Uint8List(_chunkLength);\n      _bytesInChunk = 0;\n      _outputChunkAsByteData = ByteData.view(_outputChunk!.buffer);\n    } else {\n      _outputChunk = _outputChunkAsByteData = null;\n      _bytesInChunk = 0;\n    }\n  }\n\n  /// Check if [count] bytes would fit into the current chunk. If they will\n  /// not then allocate a new [_outputChunk].\n  ///\n  /// [count] is assumed to be small enough to fit into the newly allocated\n  /// chunk.\n  void _ensureBytes(int count) {\n    if ((_bytesInChunk + count) > _chunkLength) {\n      _commitChunk(true);\n    }\n  }\n\n  /// Record number of bytes written into output chunks since last splice.\n  ///\n  /// This is used before reserving space for an unknown varint splice or\n  /// adding a [Uint8List] array splice.\n  void _commitSplice() {\n    final pos = _bytesInChunk + _outputChunksBytes;\n    final bytes = pos - _lastSplicePos;\n    if (bytes > 0) {\n      _splices.add(bytes);\n    }\n    _lastSplicePos = pos;\n  }\n\n  /// Add a [Uint8List] splice, without copying. These bytes will be directly\n  /// copied into the output buffer by [writeTo].\n  void writeRawBytes(Uint8List value) {\n    final length = value.lengthInBytes;\n    if (length == 0) return;\n    _commitSplice();\n    _splices.add(value);\n    _bytesTotal += length;\n  }\n\n  /// Start writing a length-delimited data.\n  ///\n  /// This reserves the space for varint splice in the splices array and\n  /// return its index. Once the writing is finished [_endLengthDelimited]\n  /// would be called with this index - which would put the actual amount\n  /// of bytes written into the reserved slice space.\n  int _startLengthDelimited() {\n    _commitSplice();\n    final index = _splices.length;\n    // Reserve a space for a splice and use it to record the current number of\n    // bytes written so that we can compute the length of data later in\n    // _endLengthDelimited.\n    _splices.add(_bytesTotal);\n    return index;\n  }\n\n  void _endLengthDelimited(int index) {\n    final writtenSizeInBytes = _bytesTotal - _splices[index] as int;\n    // Note: 0 - writtenSizeInBytes to avoid -0.0 in JavaScript.\n    _splices[index] = 0 - writtenSizeInBytes;\n    _bytesTotal += _varint32LengthInBytes(writtenSizeInBytes);\n  }\n\n  int _varint32LengthInBytes(int value) {\n    value &= 0xFFFFFFFF;\n    if (value < 0x80) return 1;\n    if (value < 0x4000) return 2;\n    if (value < 0x200000) return 3;\n    if (value < 0x10000000) return 4;\n    return 5;\n  }\n\n  void _writeVarint32(int value) {\n    _ensureBytes(5);\n    var i = _bytesInChunk;\n    while (value >= 0x80) {\n      _outputChunk![i++] = 0x80 | (value & 0x7f);\n      value >>= 7;\n    }\n    _outputChunk![i++] = value;\n    _bytesTotal += i - _bytesInChunk;\n    _bytesInChunk = i;\n  }\n\n  void _writeVarint64(Int64 value) {\n    _ensureBytes(10);\n    var i = _bytesInChunk;\n    var lo = value.toUnsigned(32).toInt();\n    var hi = (value >> 32).toUnsigned(32).toInt();\n    while (hi > 0 || lo >= 0x80) {\n      _outputChunk![i++] = 0x80 | (lo & 0x7f);\n      lo = (lo >> 7) | ((hi & 0x7f) << 25);\n      hi >>= 7;\n    }\n    _outputChunk![i++] = lo;\n    _bytesTotal += i - _bytesInChunk;\n    _bytesInChunk = i;\n  }\n\n  void _writeDouble(double value) {\n    if (value.isNaN) {\n      _writeInt32(0x00000000);\n      _writeInt32(0x7ff80000);\n      return;\n    }\n    _ensureBytes(8);\n    _outputChunkAsByteData!.setFloat64(_bytesInChunk, value, Endian.little);\n    _bytesInChunk += 8;\n    _bytesTotal += 8;\n  }\n\n  void _writeFloat(double value) {\n    const MIN_FLOAT_DENORM = 1.401298464324817E-45;\n    const MAX_FLOAT = 3.4028234663852886E38;\n    if (value.isNaN) {\n      _writeInt32(0x7fc00000);\n    } else if (value.abs() < MIN_FLOAT_DENORM) {\n      _writeInt32(value.isNegative ? 0x80000000 : 0x00000000);\n    } else if (value.isInfinite || value.abs() > MAX_FLOAT) {\n      _writeInt32(value.isNegative ? 0xff800000 : 0x7f800000);\n    } else {\n      const sz = 4;\n      _ensureBytes(sz);\n      _outputChunkAsByteData!.setFloat32(_bytesInChunk, value, Endian.little);\n      _bytesInChunk += sz;\n      _bytesTotal += sz;\n    }\n  }\n\n  void _writeInt32(int value) {\n    const sizeInBytes = 4;\n    _ensureBytes(sizeInBytes);\n    _outputChunkAsByteData!.setInt32(\n      _bytesInChunk,\n      value & 0xFFFFFFFF,\n      Endian.little,\n    );\n    _bytesInChunk += sizeInBytes;\n    _bytesTotal += sizeInBytes;\n  }\n\n  void _writeInt64(Int64 value) {\n    _writeInt32(value.toUnsigned(32).toInt());\n    _writeInt32((value >> 32).toUnsigned(32).toInt());\n  }\n\n  void _writeValueAs(int valueType, dynamic value) {\n    switch (valueType) {\n      case PbFieldType.BOOL_BIT:\n        _writeVarint32(value ? 1 : 0);\n      case PbFieldType.BYTES_BIT:\n        final List<int> bytes = value;\n        if (bytes is Uint8List) {\n          _writeBytesNoTag(bytes);\n        } else if (bytes.isEmpty) {\n          _writeEmptyBytes();\n        } else {\n          _writeBytesNoTag(Uint8List.fromList(bytes));\n        }\n      case PbFieldType.STRING_BIT:\n        final String string = value;\n        if (string.isEmpty) {\n          _writeEmptyBytes();\n        } else {\n          _writeBytesNoTag(const Utf8Encoder().convert(string));\n        }\n      case PbFieldType.DOUBLE_BIT:\n        _writeDouble(value);\n      case PbFieldType.FLOAT_BIT:\n        _writeFloat(value);\n      case PbFieldType.ENUM_BIT:\n        final ProtobufEnum enum_ = value;\n        _writeVarint32(enum_.value & 0xffffffff);\n      case PbFieldType.GROUP_BIT:\n        // `value` is `UnknownFieldSet` or `GeneratedMessage`. Test for\n        // `UnknownFieldSet` as it doesn't have subtypes, so the type test will\n        // be fast.\n        if (value is UnknownFieldSet) {\n          // Give the variable a type to not rely on type promotion to\n          // eliminate the dynamic call below.\n          // ignore: omit_local_variable_types\n          final UnknownFieldSet unknownFieldSet = value;\n          unknownFieldSet.writeToCodedBufferWriter(this);\n        } else {\n          final GeneratedMessage message = value;\n          message.writeToCodedBufferWriter(this);\n        }\n      case PbFieldType.INT32_BIT:\n        _writeVarint64(Int64(value));\n      case PbFieldType.INT64_BIT:\n        _writeVarint64(value);\n      case PbFieldType.SINT32_BIT:\n        _writeVarint32(_encodeZigZag32(value));\n      case PbFieldType.SINT64_BIT:\n        _writeVarint64(_encodeZigZag64(value));\n      case PbFieldType.UINT32_BIT:\n        _writeVarint32(value);\n      case PbFieldType.UINT64_BIT:\n        _writeVarint64(value);\n      case PbFieldType.FIXED32_BIT:\n        _writeInt32(value);\n      case PbFieldType.FIXED64_BIT:\n        _writeInt64(value);\n      case PbFieldType.SFIXED32_BIT:\n        _writeInt32(value);\n      case PbFieldType.SFIXED64_BIT:\n        _writeInt64(value);\n      case PbFieldType.MESSAGE_BIT:\n        final mark = _startLengthDelimited();\n        final GeneratedMessage msg = value;\n        msg.writeToCodedBufferWriter(this);\n        _endLengthDelimited(mark);\n    }\n  }\n\n  void _writeBytesNoTag(Uint8List value) {\n    writeInt32NoTag(value.length);\n    writeRawBytes(value);\n  }\n\n  void _writeEmptyBytes() {\n    writeInt32NoTag(0);\n  }\n\n  void _writeTag(int fieldNumber, int wireFormat) {\n    writeInt32NoTag(makeTag(fieldNumber, wireFormat));\n  }\n\n  void _writeValue(\n    int fieldNumber,\n    int valueType,\n    dynamic value,\n    int wireFormat,\n  ) {\n    _writeTag(fieldNumber, wireFormat);\n    _writeValueAs(valueType, value);\n    if (valueType == PbFieldType.GROUP_BIT) {\n      _writeTag(fieldNumber, WIRETYPE_END_GROUP);\n    }\n  }\n\n  void writeInt32NoTag(int value) {\n    _writeVarint32(value & 0xFFFFFFFF);\n  }\n\n  /// This function maps a power-of-2 value (2^0 .. 2^31) to a unique value\n  /// in the 0..31 range.\n  ///\n  /// For more details see \"Using de Bruijn Sequences to Index a 1 in\n  /// a Computer Word\"[1]\n  ///\n  /// Note: this is guaranteed to work after compilation to JavaScript\n  /// where multiplication becomes a floating point multiplication.\n  ///\n  /// [1] http://supertech.csail.mit.edu/papers/debruijn.pdf\n  static int _valueTypeIndex(int powerOf2) {\n    assert(powerOf2 & (powerOf2 - 1) == 0, '$powerOf2 is not a power of 2');\n    return ((0x077CB531 * powerOf2) >> 27) & 31;\n  }\n\n  /// Precomputed indices for all FbFieldType._XYZ_BIT values:\n  ///\n  ///    _XYZ_BIT_INDEX = _valueTypeIndex(FbFieldType._XYZ_BIT)\n  ///\n  static const _BOOL_BIT_INDEX = 14;\n  static const _BYTES_BIT_INDEX = 29;\n  static const _STRING_BIT_INDEX = 27;\n  static const _DOUBLE_BIT_INDEX = 23;\n  static const _FLOAT_BIT_INDEX = 15;\n  static const _ENUM_BIT_INDEX = 31;\n  static const _GROUP_BIT_INDEX = 30;\n  static const _INT32_BIT_INDEX = 28;\n  static const _INT64_BIT_INDEX = 25;\n  static const _SINT32_BIT_INDEX = 18;\n  static const _SINT64_BIT_INDEX = 5;\n  static const _UINT32_BIT_INDEX = 11;\n  static const _UINT64_BIT_INDEX = 22;\n  static const _FIXED32_BIT_INDEX = 13;\n  static const _FIXED64_BIT_INDEX = 26;\n  static const _SFIXED32_BIT_INDEX = 21;\n  static const _SFIXED64_BIT_INDEX = 10;\n  static const _MESSAGE_BIT_INDEX = 20;\n\n  /// Mapping from value types to wire-types indexed by _valueTypeIndex(...).\n  static final Uint8List _wireTypes =\n      Uint8List(32)\n        ..[_BOOL_BIT_INDEX] = WIRETYPE_VARINT\n        ..[_BYTES_BIT_INDEX] = WIRETYPE_LENGTH_DELIMITED\n        ..[_STRING_BIT_INDEX] = WIRETYPE_LENGTH_DELIMITED\n        ..[_DOUBLE_BIT_INDEX] = WIRETYPE_FIXED64\n        ..[_FLOAT_BIT_INDEX] = WIRETYPE_FIXED32\n        ..[_ENUM_BIT_INDEX] = WIRETYPE_VARINT\n        ..[_GROUP_BIT_INDEX] = WIRETYPE_START_GROUP\n        ..[_INT32_BIT_INDEX] = WIRETYPE_VARINT\n        ..[_INT64_BIT_INDEX] = WIRETYPE_VARINT\n        ..[_SINT32_BIT_INDEX] = WIRETYPE_VARINT\n        ..[_SINT64_BIT_INDEX] = WIRETYPE_VARINT\n        ..[_UINT32_BIT_INDEX] = WIRETYPE_VARINT\n        ..[_UINT64_BIT_INDEX] = WIRETYPE_VARINT\n        ..[_FIXED32_BIT_INDEX] = WIRETYPE_FIXED32\n        ..[_FIXED64_BIT_INDEX] = WIRETYPE_FIXED64\n        ..[_SFIXED32_BIT_INDEX] = WIRETYPE_FIXED32\n        ..[_SFIXED64_BIT_INDEX] = WIRETYPE_FIXED64\n        ..[_MESSAGE_BIT_INDEX] = WIRETYPE_LENGTH_DELIMITED;\n}\n\nint _encodeZigZag32(int value) => (value << 1) ^ (value >> 31);\nInt64 _encodeZigZag64(Int64 value) => (value << 1) ^ (value >> 63);\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/consts.dart",
    "content": "// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n/// Constant string value of `double.infinity.toString()` and the infinity\n/// value recognized by `double.parse(..)`.\nconst infinity = 'Infinity';\n\n/// Constant string value of `double.negativeInfinity.toString()` and the\n/// negative infinity value recognized by `double.parse(..)`.\nconst negativeInfinity = '-Infinity';\n\n/// Constant string value of `double.nan.toString()` and the NaN (not a number)\n/// value recognized by `double.parse(..)`.\nconst nan = 'NaN';\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/exceptions.dart",
    "content": "// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nconst _truncatedMessageText = '''\nWhile parsing a protocol message, the input ended unexpectedly\nin the middle of a field. This could either mean that the input\nhas been truncated or that an embedded message misreported its\nown length.\n''';\n\n/// Exception thrown by the binary deserializer when the encoding is malformed.\nclass InvalidProtocolBufferException implements Exception {\n  final String message;\n\n  InvalidProtocolBufferException._(this.message);\n\n  @override\n  String toString() => 'InvalidProtocolBufferException: $message';\n\n  InvalidProtocolBufferException.invalidEndTag()\n    : this._('Protocol message end-group tag did not match expected tag.');\n\n  InvalidProtocolBufferException.invalidTag()\n    : this._('Protocol message contained an invalid tag (zero).');\n\n  InvalidProtocolBufferException.invalidWireType()\n    : this._('Protocol message tag had invalid wire type.');\n\n  InvalidProtocolBufferException.malformedVarint()\n    : this._('CodedBufferReader encountered a malformed varint.');\n\n  InvalidProtocolBufferException.recursionLimitExceeded()\n    : this._('''\nProtocol message had too many levels of nesting. May be malicious.\nUse a CodedBufferReader with a defined recursion depth limit if you need to\nparse deeply nested messages.\n''');\n\n  InvalidProtocolBufferException.truncatedMessage()\n    : this._(_truncatedMessageText);\n\n  InvalidProtocolBufferException.truncatedMessageDueToSizeLimit(\n    int originalSize,\n    int truncatedSize,\n  ) : this._('''$_truncatedMessageText\nNote that the buffer containing the message has $originalSize bytes, but\nCodedBufferReader was allowed to parse only $truncatedSize bytes.\n''');\n\n  InvalidProtocolBufferException.wrongAnyMessage(\n    String anyTypeName,\n    unpackerTypeName,\n  ) : this._('''\nThe type of the Any message ($anyTypeName) does not match the given\nunpacker ($unpackerTypeName).\n''');\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/extension.dart",
    "content": "// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n/// An object representing an extension field.\nclass Extension<T> extends FieldInfo<T> {\n  final String extendee;\n\n  Extension(\n    this.extendee,\n    String name,\n    int tagNumber,\n    int fieldType, {\n    dynamic defaultOrMaker,\n    CreateBuilderFunc? subBuilder,\n    ValueOfFunc? valueOf,\n    List<ProtobufEnum>? enumValues,\n    String? protoName,\n  }) : super(\n         name,\n         tagNumber,\n         null,\n         fieldType,\n         defaultOrMaker: defaultOrMaker,\n         subBuilder: subBuilder,\n         valueOf: valueOf,\n         enumValues: enumValues,\n         protoName: protoName,\n       );\n\n  Extension.repeated(\n    this.extendee,\n    String name,\n    int tagNumber,\n    int fieldType, {\n    required CheckFunc<T>? check,\n    CreateBuilderFunc? subBuilder,\n    ValueOfFunc? valueOf,\n    List<ProtobufEnum>? enumValues,\n    String? protoName,\n  }) : super.repeated(\n         name,\n         tagNumber,\n         null,\n         fieldType,\n         check,\n         subBuilder,\n         valueOf: valueOf,\n         enumValues: enumValues,\n         protoName: protoName,\n       );\n\n  @override\n  int get hashCode => extendee.hashCode * 31 + tagNumber;\n\n  @override\n  bool operator ==(Object other) {\n    if (other is! Extension) return false;\n\n    final o = other;\n    return extendee == o.extendee && tagNumber == o.tagNumber;\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/extension_field_set.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\nclass ExtensionFieldSet {\n  final FieldSet _parent;\n  final Map<int, Extension> _info;\n  final Map<int, dynamic> _values;\n  bool _isReadOnly;\n\n  ExtensionFieldSet(this._parent, {required bool readOnly})\n    : _info = <int, Extension>{},\n      _values = <int, dynamic>{},\n      _isReadOnly = readOnly;\n\n  ExtensionFieldSet._(this._parent, this._info, this._values)\n    : _isReadOnly = false;\n\n  Extension? _getInfoOrNull(int tagNumber) => _info[tagNumber];\n\n  dynamic _getFieldOrDefault(Extension fi) {\n    if (fi.isRepeated) return _getList(fi);\n    _validateInfo(fi);\n    // TODO(skybrian) seems unnecessary to add info?\n    // I think this was originally here for repeated extensions.\n    _addInfoUnchecked(fi);\n    final value = _getFieldOrNull(fi);\n    if (value == null) {\n      _checkNotInUnknown(fi);\n      return fi.makeDefault!();\n    }\n    return value;\n  }\n\n  bool _hasField(int tagNumber) {\n    final value = _values[tagNumber];\n    if (value == null) return false;\n    if (value is List) return value.isNotEmpty;\n    return true;\n  }\n\n  /// Ensures that the list exists and an extension is present.\n  ///\n  /// If it doesn't exist, creates the list and saves the extension.\n  /// Suitable for public API and decoders.\n  PbList<T> _ensureRepeatedField<T>(Extension<T> fi) {\n    assert(!_isReadOnly);\n    assert(fi.isRepeated);\n    assert(fi.extendee == '' || fi.extendee == _parent._messageName);\n\n    final list = _values[fi.tagNumber];\n    if (list != null) return list;\n\n    return _addInfoAndCreateList(fi);\n  }\n\n  PbList<T> _getList<T>(Extension<T> fi) {\n    final value = _values[fi.tagNumber];\n    if (value != null) return value;\n    _checkNotInUnknown(fi);\n    if (_isReadOnly) return fi._createRepeatedField()..freeze();\n    return _addInfoAndCreateList<T>(fi);\n  }\n\n  PbList<T> _addInfoAndCreateList<T>(Extension<T> fi) {\n    _validateInfo(fi);\n    final newList = fi._createRepeatedField();\n    _addInfoUnchecked(fi);\n    _setFieldUnchecked(fi, newList);\n    return newList;\n  }\n\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  dynamic _getFieldOrNull(Extension extension) => _values[extension.tagNumber];\n\n  void _clearFieldAndInfo(Extension fi) {\n    _clearField(fi);\n    _info.remove(fi.tagNumber);\n  }\n\n  void _clearField(Extension fi) {\n    _ensureWritable();\n    _validateInfo(fi);\n    _values.remove(fi.tagNumber);\n  }\n\n  /// Sets a value for a non-repeated extension that has already been added.\n  /// Does error-checking.\n  void _setField(int tagNumber, value) {\n    final fi = _getInfoOrNull(tagNumber);\n    if (fi == null) {\n      throw ArgumentError(\n        'tag $tagNumber not defined in $_parent._messageName',\n      );\n    }\n    if (fi.isRepeated) {\n      throw ArgumentError(\n        _parent._setFieldFailedMessage(\n          fi,\n          value,\n          'repeating field (use get + .add())',\n        ),\n      );\n    }\n    _ensureWritable();\n    _parent._validateField(fi, value);\n    _setFieldUnchecked(fi, value);\n  }\n\n  /// Sets a non-repeated value and extension.\n  /// Overwrites any existing extension.\n  void _setFieldAndInfo(Extension fi, value) {\n    _ensureWritable();\n    if (fi.isRepeated) {\n      throw ArgumentError(\n        _parent._setFieldFailedMessage(\n          fi,\n          value,\n          'repeating field (use get + .add())',\n        ),\n      );\n    }\n    _validateInfo(fi);\n    _parent._validateField(fi, value);\n    _addInfoUnchecked(fi);\n    _setFieldUnchecked(fi, value);\n  }\n\n  void _ensureWritable() {\n    if (_isReadOnly) {\n      _throwFrozenMessageModificationError(_parent._messageName);\n    }\n  }\n\n  void _validateInfo(Extension fi) {\n    if (fi.extendee != _parent._messageName) {\n      throw ArgumentError(\n        'Extension $fi not legal for message ${_parent._messageName}',\n      );\n    }\n  }\n\n  void _addInfoUnchecked(Extension fi) {\n    assert(fi.extendee == _parent._messageName);\n    _info[fi.tagNumber] = fi;\n  }\n\n  void _setFieldUnchecked(Extension fi, value) {\n    // If there was already an unknown field with the same tag number,\n    // overwrite it.\n    _parent._unknownFields?.clearField(fi.tagNumber);\n    _values[fi.tagNumber] = value;\n  }\n\n  // Bulk operations\n\n  Iterable<int> get _tagNumbers => _values.keys;\n  Iterable<Extension> get _infos => _info.values;\n\n  bool get _hasValues => _values.isNotEmpty;\n\n  bool _equalValues(ExtensionFieldSet? other) =>\n      other != null && areMapsEqual(_values, other._values);\n\n  void _clearValues() => _values.clear();\n\n  /// Makes a shallow copy of all values from [original] to this.\n  ///\n  /// Repeated fields are copied.\n  /// Extensions cannot contain map fields.\n  void _shallowCopyValues(ExtensionFieldSet original) {\n    for (final tagNumber in original._tagNumbers) {\n      final extension = original._getInfoOrNull(tagNumber)!;\n      _addInfoUnchecked(extension);\n\n      final value = original._getFieldOrNull(extension);\n      if (value == null) continue;\n      if (extension.isRepeated) {\n        assert(value is PbList);\n        _ensureRepeatedField(extension).addAll(value);\n      } else {\n        _setFieldUnchecked(extension, value);\n      }\n    }\n  }\n\n  void _markReadOnly() {\n    if (_isReadOnly) return;\n    _isReadOnly = true;\n    for (final field in _info.values) {\n      if (field.isRepeated) {\n        final entriesDynamic = _values[field.tagNumber];\n        if (entriesDynamic == null) continue;\n        final PbList entries = entriesDynamic;\n        entries.freeze();\n      } else if (field.isGroupOrMessage) {\n        final entry = _values[field.tagNumber];\n        if (entry != null) {\n          final GeneratedMessage msg = entry;\n          msg.freeze();\n        }\n      }\n    }\n  }\n\n  void _checkNotInUnknown(Extension extension) {\n    final unknownFields = _parent._unknownFields;\n    if (unknownFields != null && unknownFields.hasField(extension.tagNumber)) {\n      throw StateError(\n        'Trying to get $extension that is present as an unknown field. '\n        'Parse the message with this extension in the extension registry or '\n        'use `ExtensionRegistry.reparseMessage`.',\n      );\n    }\n  }\n\n  ExtensionFieldSet _deepCopy(FieldSet parent) {\n    final newExtensionFieldSet = ExtensionFieldSet._(\n      parent,\n      Map.from(_info),\n      Map.from(_values),\n    );\n\n    final newValues = newExtensionFieldSet._values;\n\n    for (final entry in _values.entries) {\n      final tag = entry.key;\n      final value = entry.value;\n      final fieldInfo = _info[tag]!;\n      if (fieldInfo.isMapField) {\n        final PbMap? map = value;\n        newValues[tag] = map?.deepCopy();\n      } else if (fieldInfo.isRepeated) {\n        final PbList? list = value;\n        newValues[tag] = list?.deepCopy();\n      } else if (fieldInfo.isGroupOrMessage) {\n        final GeneratedMessage? message = value;\n        newValues[tag] = message?.deepCopy();\n      }\n    }\n\n    return newExtensionFieldSet;\n  }\n}\n\nextension ExtensionFieldSetInternalExtension on ExtensionFieldSet {\n  Map<int, dynamic> get values => _values;\n  Iterable<int> get tagNumbers => _tagNumbers;\n  Extension? getInfoOrNull(int tagNumber) => _getInfoOrNull(tagNumber);\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/extension_registry.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n/// A collection of [Extension] objects, organized by the message type they\n/// extend.\nclass ExtensionRegistry {\n  final Map<String, Map<int, Extension>> _extensions =\n      <String, Map<int, Extension>>{};\n\n  // ignore: constant_identifier_names\n  static const ExtensionRegistry EMPTY = _EmptyExtensionRegistry();\n\n  /// Stores an [extension] in the registry.\n  void add(Extension extension) {\n    final map = _extensions.putIfAbsent(\n      extension.extendee,\n      () => <int, Extension>{},\n    );\n    map[extension.tagNumber] = extension;\n  }\n\n  /// Stores all [extensions] in the registry.\n  void addAll(Iterable<Extension> extensions) {\n    extensions.forEach(add);\n  }\n\n  /// Retrieves an extension from the registry that adds tag number [tagNumber]\n  /// to the [messageName] message type.\n  Extension? getExtension(String messageName, int tagNumber) =>\n      _extensions[messageName]?[tagNumber];\n\n  /// Creates a shallow copy of [message], with all extensions in `this` parsed\n  /// from the unknown fields of [message] and of every nested submessage.\n  ///\n  /// Extensions already present in [message] will be preserved.\n  ///\n  /// If [message] is frozen, the result will be as well.\n  ///\n  /// Returns the original message if no new extensions are parsed.\n  ///\n  /// Throws an [InvalidProtocolBufferException] if the parsed extensions are\n  /// malformed.\n  ///\n  /// Using this method to retrieve extensions is more expensive overall than\n  /// using an [ExtensionRegistry] with all the needed extensions when doing\n  /// [GeneratedMessage.mergeFromBuffer].\n  ///\n  /// Example:\n  ///\n  /// `sample.proto`\n  /// ```proto\n  /// syntax = \"proto2\";\n  ///\n  /// message Foo {\n  ///   extensions 1 to max;\n  /// }\n  ///\n  /// extend Foo {\n  ///   optional string val1 = 1;\n  ///   optional string val2 = 2;\n  /// }\n  /// ```\n  /// `main.dart`\n  /// ```\n  /// import 'package:protobuf/protobuf.dart';\n  /// import 'package:test/test.dart';\n  /// import 'src/generated/sample.pb.dart';\n  ///\n  /// void main() {\n  ///   ExtensionRegistry r1 = ExtensionRegistry()..add(Sample.val1);\n  ///   ExtensionRegistry r2 = ExtensionRegistry()..add(Sample.val2);\n  ///   Foo original = Foo()..setExtension(Sample.val1, 'a')..setExtension(Sample.val2, 'b');\n  ///   Foo withUnknownFields = Foo.fromBuffer(original.writeToBuffer());\n  ///   Foo reparsed1 = r1.reparseMessage(withUnknownFields);\n  ///   Foo reparsed2 = r2.reparseMessage(reparsed1);\n  ///   expect(withUnknownFields.hasExtension(Sample.val1), isFalse);\n  ///   expect(withUnknownFields.hasExtension(Sample.val2), isFalse);\n  ///   expect(reparsed1.hasExtension(Sample.val1), isTrue);\n  ///   expect(reparsed1.hasExtension(Sample.val2), isFalse);\n  ///   expect(reparsed2.hasExtension(Sample.val1), isTrue);\n  ///   expect(reparsed2.hasExtension(Sample.val2), isTrue);\n  /// }\n  /// ```\n  T reparseMessage<T extends GeneratedMessage>(T message) =>\n      _reparseMessage(message, this);\n}\n\nT _reparseMessage<T extends GeneratedMessage>(\n  T message,\n  ExtensionRegistry extensionRegistry,\n) {\n  T? result;\n  T ensureResult() {\n    if (result == null) {\n      result ??= message.info_.createEmptyInstance!() as T;\n      result!._fieldSet._shallowCopyValues(message._fieldSet);\n    }\n    return result!;\n  }\n\n  UnknownFieldSet? resultUnknownFields;\n  UnknownFieldSet ensureUnknownFields() =>\n      resultUnknownFields ??= ensureResult()._fieldSet._unknownFields!;\n\n  final messageUnknownFields = message._fieldSet._unknownFields;\n  if (messageUnknownFields != null) {\n    final codedBufferWriter = CodedBufferWriter();\n\n    if (message is $_MessageSet) {\n      final itemList = messageUnknownFields._fields[_messageSetItemsTag];\n\n      final parsedItemList = UnknownFieldSetField();\n      final unparsedItemList = UnknownFieldSetField();\n\n      if (itemList != null) {\n        for (final group in itemList.groups) {\n          final typeId =\n              group._fields[_messageSetItemTypeIdTag]!.varints[0].toInt();\n          if (extensionRegistry.getExtension(\n                message.info_.qualifiedMessageName,\n                typeId,\n              ) ==\n              null) {\n            unparsedItemList.addGroup(group);\n          } else {\n            parsedItemList.addGroup(group);\n          }\n        }\n\n        parsedItemList.writeTo(_messageSetItemsTag, codedBufferWriter);\n\n        if (unparsedItemList.groups.isEmpty) {\n          messageUnknownFields._fields.remove(_messageSetItemsTag);\n        } else {\n          messageUnknownFields._fields[_messageSetItemsTag] = unparsedItemList;\n        }\n      }\n    } else {\n      extensionRegistry._extensions[message.info_.qualifiedMessageName]\n          ?.forEach((tagNumber, extension) {\n            final unknownField = messageUnknownFields._fields[tagNumber];\n            if (unknownField != null) {\n              unknownField.writeTo(tagNumber, codedBufferWriter);\n              ensureUnknownFields()._fields.remove(tagNumber);\n            }\n          });\n    }\n\n    final buffer = codedBufferWriter.toBuffer();\n    if (buffer.isNotEmpty) {\n      ensureResult().mergeFromBuffer(buffer, extensionRegistry);\n    }\n  }\n\n  for (final field in message._fieldSet._meta.byIndex) {\n    PbList? resultEntries;\n    PbList ensureEntries() =>\n        resultEntries ??= ensureResult()._fieldSet._values[field.index!];\n\n    PbMap? resultMap;\n    PbMap ensureMap() =>\n        resultMap ??= ensureResult()._fieldSet._values[field.index!];\n\n    if (field.isRepeated) {\n      final messageEntriesDynamic = message._fieldSet._values[field.index!];\n      if (messageEntriesDynamic == null) continue;\n      final PbList messageEntries = messageEntriesDynamic;\n      if (field.isGroupOrMessage) {\n        for (var i = 0; i < messageEntries.length; i++) {\n          final GeneratedMessage entry = messageEntries[i];\n          final reparsedEntry = _reparseMessage(entry, extensionRegistry);\n          if (!identical(entry, reparsedEntry)) {\n            ensureEntries()[i] = reparsedEntry;\n          }\n        }\n      }\n    } else if (field is MapFieldInfo) {\n      final messageMapDynamic = message._fieldSet._values[field.index!];\n      if (messageMapDynamic == null) continue;\n      final PbMap messageMap = messageMapDynamic;\n      if (PbFieldType.isGroupOrMessage(field.valueFieldType)) {\n        for (final key in messageMap.keys) {\n          final GeneratedMessage value = messageMap[key];\n          final reparsedValue = _reparseMessage(value, extensionRegistry);\n          if (!identical(value, reparsedValue)) {\n            ensureMap()[key] = reparsedValue;\n          }\n        }\n      }\n    } else if (field.isGroupOrMessage) {\n      final messageSubField = message._fieldSet._values[field.index!];\n      if (messageSubField == null) continue;\n      final reparsedSubField = _reparseMessage<GeneratedMessage>(\n        messageSubField,\n        extensionRegistry,\n      );\n      if (!identical(messageSubField, reparsedSubField)) {\n        ensureResult()._fieldSet._values[field.index!] = reparsedSubField;\n      }\n    }\n  }\n\n  if (result != null && message.isFrozen) {\n    result!.freeze();\n  }\n\n  return result ?? message;\n}\n\nclass _EmptyExtensionRegistry implements ExtensionRegistry {\n  const _EmptyExtensionRegistry();\n\n  @override\n  Map<String, Map<int, Extension>> get _extensions =>\n      const <String, Map<int, Extension>>{};\n\n  @override\n  void add(Extension extension) {\n    throw UnsupportedError('Immutable ExtensionRegistry');\n  }\n\n  @override\n  void addAll(Iterable<Extension> extensions) {\n    throw UnsupportedError('Immutable ExtensionRegistry');\n  }\n\n  @override\n  Extension? getExtension(String messageName, int tagNumber) => null;\n\n  @override\n  T reparseMessage<T extends GeneratedMessage>(T message) =>\n      _reparseMessage(message, this);\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/field_error.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n/// Returns the error message for an invalid field value,\n/// or null if it's valid.\n///\n/// For enums, group, and message fields, this check is only approximate,\n/// because the exact type isn't included in [fieldType].\nString? _getFieldError(int fieldType, var value) {\n  switch (PbFieldType.baseType(fieldType)) {\n    case PbFieldType.BOOL_BIT:\n      if (value is! bool) return 'not type bool';\n      return null;\n    case PbFieldType.BYTES_BIT:\n      if (value is! List) return 'not List';\n      return null;\n    case PbFieldType.STRING_BIT:\n      if (value is! String) return 'not type String';\n      return null;\n    case PbFieldType.FLOAT_BIT:\n      if (value is! double) return 'not type double';\n      if (!_isFloat32(value)) return 'out of range for float';\n      return null;\n    case PbFieldType.DOUBLE_BIT:\n      if (value is! double) return 'not type double';\n      return null;\n    case PbFieldType.ENUM_BIT:\n      if (value is! ProtobufEnum) return 'not type ProtobufEnum';\n      return null;\n\n    case PbFieldType.INT32_BIT:\n    case PbFieldType.SINT32_BIT:\n    case PbFieldType.SFIXED32_BIT:\n      if (value is! int) return 'not type int';\n      if (!_isSigned32(value)) return 'out of range for signed 32-bit int';\n      return null;\n\n    case PbFieldType.UINT32_BIT:\n    case PbFieldType.FIXED32_BIT:\n      if (value is! int) return 'not type int';\n      if (!_isUnsigned32(value)) return 'out of range for unsigned 32-bit int';\n      return null;\n\n    case PbFieldType.INT64_BIT:\n    case PbFieldType.SINT64_BIT:\n    case PbFieldType.UINT64_BIT:\n    case PbFieldType.FIXED64_BIT:\n    case PbFieldType.SFIXED64_BIT:\n      // We always use the full range of the same Dart type.\n      // It's up to the caller to treat the Int64 as signed or unsigned.\n      // See: https://github.com/google/protobuf.dart/issues/44\n      if (value is! Int64) return 'not Int64';\n      return null;\n\n    case PbFieldType.GROUP_BIT:\n    case PbFieldType.MESSAGE_BIT:\n      if (value is! GeneratedMessage) return 'not a GeneratedMessage';\n      return null;\n    default:\n      return 'field has unknown type $fieldType';\n  }\n}\n\n// entry points for generated code\n\n/// Returns a function for validating items in a repeated field.\n///\n/// For most types this is a not-null check, except for floats, and signed and\n/// unsigned 32 bit ints where there also is a range check.\n///\n/// @nodoc\nCheckFunc? getCheckFunction(int fieldType) {\n  switch (PbFieldType.baseType(fieldType)) {\n    case PbFieldType.BOOL_BIT:\n    case PbFieldType.BYTES_BIT:\n    case PbFieldType.STRING_BIT:\n    case PbFieldType.DOUBLE_BIT:\n    case PbFieldType.ENUM_BIT:\n    case PbFieldType.GROUP_BIT:\n    case PbFieldType.MESSAGE_BIT:\n    case PbFieldType.INT64_BIT:\n    case PbFieldType.SINT64_BIT:\n    case PbFieldType.SFIXED64_BIT:\n    case PbFieldType.UINT64_BIT:\n    case PbFieldType.FIXED64_BIT:\n      // We always use the full range of the same Dart type.\n      // It's up to the caller to treat the Int64 as signed or unsigned.\n      // See: https://github.com/google/protobuf.dart/issues/44\n      return null;\n\n    case PbFieldType.FLOAT_BIT:\n      return _checkFloat;\n\n    case PbFieldType.INT32_BIT:\n    case PbFieldType.SINT32_BIT:\n    case PbFieldType.SFIXED32_BIT:\n      return _checkSigned32;\n\n    case PbFieldType.UINT32_BIT:\n    case PbFieldType.FIXED32_BIT:\n      return _checkUnsigned32;\n  }\n  throw ArgumentError('check function not implemented: $fieldType');\n}\n\n// check functions for repeated fields\n\nvoid checkNotNull(Object? val) {\n  if (val == null) {\n    throw ArgumentError(\"Can't add a null to a repeated field\");\n  }\n}\n\nvoid _checkFloat(Object? val) {\n  if (!_isFloat32(val as double)) throw _createFieldRangeError(val, 'a float');\n}\n\nvoid _checkSigned32(Object? val) {\n  if (!_isSigned32(val as int)) {\n    throw _createFieldRangeError(val, 'a signed int32');\n  }\n}\n\nvoid _checkUnsigned32(Object? val) {\n  if (!_isUnsigned32(val as int)) {\n    throw _createFieldRangeError(val, 'an unsigned int32');\n  }\n}\n\nRangeError _createFieldRangeError(num val, String wantedType) =>\n    RangeError('Value ($val) is not $wantedType');\n\nbool _isSigned32(int value) => (-2147483648 <= value) && (value <= 2147483647);\n\nbool _isUnsigned32(int value) => (0 <= value) && (value <= 4294967295);\n\nbool _isFloat32(double value) =>\n    value.isNaN ||\n    value.isInfinite ||\n    (-3.4028234663852886E38 <= value) && (value <= 3.4028234663852886E38);\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/field_info.dart",
    "content": "// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n/// An object representing a protobuf message field.\nclass FieldInfo<T> {\n  /// Cached read-only empty list for this field type. For non-repeated fields\n  /// this is always `null`. Otherwise it starts as `null` and gets initialized\n  /// in `readonlyDefault`.\n  PbList<T>? _emptyList;\n\n  /// Name of this field as the `json_name` reported by protoc.\n  ///\n  /// Example:\n  ///\n  /// ```proto\n  /// message Msg {\n  ///   int32 foo_name = 1 [json_name = \"barName\"];\n  /// }\n  /// ```\n  ///\n  /// Here `name` of the field is `barName`. When `json_name` is not specified\n  /// in the proto definition, this is the camelCase version of the field name.\n  /// In the example above, without the `json_name` field option, `name` would\n  /// be `\"fooName\"`.\n  final String name;\n\n  /// Name of this field as written in the proto definition.\n  ///\n  /// Example:\n  ///\n  /// ```proto\n  /// message SearchRequest {\n  ///   ...\n  ///   int32 result_per_page = 3;\n  /// }\n  /// ```\n  ///\n  /// `protoName` for the `result_per_page` field above is `\"result_per_page\"`.\n  /// The name typically consist of words separated with underscores.\n  String get protoName {\n    return _protoName ??= _unCamelCase(name);\n  }\n\n  String? _protoName;\n\n  /// Field number as specified in the proto definition.\n  ///\n  /// Example:\n  ///\n  /// ```proto\n  /// message SearchRequest {\n  ///   ...\n  ///   int32 result_per_page = 3;\n  /// }\n  /// ```\n  ///\n  /// `tagNumber` of `result_per_page` field is 3.\n  final int tagNumber;\n\n  /// Index of the field in [FieldSet._values] list of this field's message.\n  ///\n  /// The value is `null` for extension fields.\n  final int? index;\n\n  /// Type of this field. See [PbFieldType].\n  final int type;\n\n  /// Constructs the default value of a field.\n  ///\n  /// For repeated fields, only used when the [check] property is `null`.\n  final MakeDefaultFunc? makeDefault;\n\n  /// Creates an empty message or group when decoding a message.\n  ///\n  /// Only available in fields with message type.\n  final CreateBuilderFunc? subBuilder;\n\n  /// List of all enum values.\n  ///\n  /// Only available in enum fields.\n  final List<ProtobufEnum>? enumValues;\n\n  /// Default enum value.\n  ///\n  /// Only available in enum fields.\n  final ProtobufEnum? defaultEnumValue;\n\n  /// Mapping from enum integer values to enum values.\n  ///\n  /// Only available in enum fields.\n  final ValueOfFunc? valueOf;\n\n  /// Function to verify items when adding to a repeated field.\n  ///\n  /// Only available in repeated fields.\n  final CheckFunc<T>? check;\n\n  FieldInfo(\n    this.name,\n    this.tagNumber,\n    this.index,\n    this.type, {\n    dynamic defaultOrMaker,\n    this.subBuilder,\n    this.valueOf,\n    this.enumValues,\n    this.defaultEnumValue,\n    String? protoName,\n  }) : makeDefault = findMakeDefault(type, defaultOrMaker),\n       check = null,\n       _protoName = protoName,\n       assert(type != 0),\n       assert(\n         !PbFieldType.isGroupOrMessage(type) ||\n             subBuilder != null ||\n             PbFieldType.isMapField(type),\n       ),\n       assert(!PbFieldType.isEnum(type) || valueOf != null);\n\n  // Represents a field that has been removed by a program transformation.\n  FieldInfo.dummy(this.index)\n    : name = '<removed field>',\n      _protoName = '<removed field>',\n      tagNumber = 0,\n      type = 0,\n      makeDefault = null,\n      valueOf = null,\n      check = null,\n      enumValues = null,\n      defaultEnumValue = null,\n      subBuilder = null;\n\n  FieldInfo.repeated(\n    this.name,\n    this.tagNumber,\n    this.index,\n    this.type,\n    this.check,\n    this.subBuilder, {\n    this.valueOf,\n    this.enumValues,\n    this.defaultEnumValue,\n    String? protoName,\n  }) : makeDefault = (() => newPbList<T>(check: check)),\n       _protoName = protoName,\n       assert(PbFieldType.isRepeated(type)),\n       assert(!PbFieldType.isEnum(type) || valueOf != null);\n\n  static MakeDefaultFunc? findMakeDefault(int type, dynamic defaultOrMaker) {\n    if (defaultOrMaker == null) return PbFieldType.defaultForType(type);\n    if (defaultOrMaker is MakeDefaultFunc) return defaultOrMaker;\n    return () => defaultOrMaker;\n  }\n\n  /// Whether this represents a dummy field standing in for a field that has\n  /// been removed by a program transformation.\n  bool get _isDummy => tagNumber == 0;\n\n  bool get isRequired => PbFieldType.isRequired(type);\n  bool get isRepeated => PbFieldType.isRepeated(type);\n  bool get isGroupOrMessage => PbFieldType.isGroupOrMessage(type);\n  bool get isEnum => PbFieldType.isEnum(type);\n  bool get isMapField => PbFieldType.isMapField(type);\n\n  /// Returns a read-only default value for a field. Unlike\n  /// [GeneratedMessage.getField], doesn't create a repeated field.\n  dynamic get readonlyDefault {\n    if (isRepeated) {\n      return _emptyList ??= newUnmodifiablePbList();\n    }\n    return makeDefault!();\n  }\n\n  /// Returns true if the field's value is okay to transmit.\n  /// That is, it doesn't contain any required fields that aren't initialized.\n  bool _hasRequiredValues(dynamic value) {\n    if (value == null) return !isRequired; // missing is okay if optional\n    if (!PbFieldType.isGroupOrMessage(type)) {\n      return true; // primitive and present\n    }\n\n    if (!isRepeated) {\n      // A required message: recurse.\n      final GeneratedMessage message = value;\n      return message._fieldSet._hasRequiredValues();\n    }\n\n    final List<GeneratedMessage> list = value;\n    if (list.isEmpty) return true;\n\n    // For message types that (recursively) contain no required fields,\n    // short-circuit the loop.\n    if (!list[0]._fieldSet._hasRequiredFields) return true;\n\n    // Recurse on each item in the list.\n    return list.every((GeneratedMessage m) => m._fieldSet._hasRequiredValues());\n  }\n\n  /// Appends the dotted path to each required field that's missing a value.\n  void _appendInvalidFields(List<String> problems, value, String prefix) {\n    if (value == null) {\n      if (isRequired) problems.add('$prefix$name');\n    } else if (!PbFieldType.isGroupOrMessage(type)) {\n      // primitive and present\n    } else if (!isRepeated) {\n      // Required message/group: recurse.\n      final GeneratedMessage message = value;\n      message._fieldSet._appendInvalidFields(problems, '$prefix$name.');\n    } else {\n      final List<GeneratedMessage> list = value;\n      if (list.isEmpty) return;\n\n      // For message types that (recursively) contain no required fields,\n      // short-circuit the loop.\n      if (!list[0]._fieldSet._hasRequiredFields) return;\n\n      // Recurse on each item in the list.\n      var position = 0;\n      for (final message in list) {\n        message._fieldSet._appendInvalidFields(\n          problems,\n          '$prefix$name[$position].',\n        );\n        position++;\n      }\n    }\n  }\n\n  /// Creates a repeated field.\n  PbList<T> _createRepeatedField() {\n    assert(isRepeated);\n    return newPbList<T>(check: check);\n  }\n\n  /// Same as above, but allow a tighter typed [PbList] to be created.\n  PbList<S> _createRepeatedFieldWithType<S extends T>() {\n    assert(isRepeated);\n    return newPbList<S>(check: check);\n  }\n\n  /// Convenience method to thread this FieldInfo's reified type parameter to\n  /// `FieldSet._ensureRepeatedField`.\n  PbList<T> _ensureRepeatedField(BuilderInfo meta, FieldSet fs) {\n    return fs._ensureRepeatedField<T>(meta, this);\n  }\n\n  @override\n  String toString() => name;\n}\n\nextension FieldInfoInternalExtension<T> on FieldInfo<T> {\n  List<T> ensureRepeatedField(BuilderInfo meta, FieldSet fs) =>\n      _ensureRepeatedField(meta, fs);\n}\n\nfinal RegExp _upperCase = RegExp('[A-Z]');\n\nString _unCamelCase(String name) {\n  return name.replaceAllMapped(\n    _upperCase,\n    (match) => '_${match.group(0)!.toLowerCase()}',\n  );\n}\n\n/// A [FieldInfo] subclass for protobuf `map` fields.\nclass MapFieldInfo<K, V> extends FieldInfo<PbMap<K, V>?> {\n  /// Key type of the map. Per proto2 and proto3 specs, this needs to be an\n  /// integer type or `string`, and the type cannot be `repeated`.\n  ///\n  /// The `int` value is interpreted the same way as [FieldInfo.type].\n  final int keyFieldType;\n\n  /// Value type of the map. Per proto2 and proto3 specs, this can be any type\n  /// other than `map`, and the type cannot be `repeated`.\n  ///\n  /// The `int` value is interpreted the same way as [FieldInfo.type].\n  final int valueFieldType;\n\n  /// Creates a new empty instance of the value type.\n  ///\n  /// `null` if the value type is not a Message type.\n  final CreateBuilderFunc? valueCreator;\n\n  final BuilderInfo mapEntryBuilderInfo;\n\n  MapFieldInfo(\n    String name,\n    int tagNumber,\n    int index,\n    int type,\n    this.keyFieldType,\n    this.valueFieldType,\n    this.mapEntryBuilderInfo,\n    this.valueCreator, {\n    ProtobufEnum? defaultEnumValue,\n    String? protoName,\n  }) : assert(PbFieldType.isMapField(type)),\n       super(\n         name,\n         tagNumber,\n         index,\n         type,\n         defaultOrMaker: () => newPbMap<K, V>(keyFieldType, valueFieldType),\n         defaultEnumValue: defaultEnumValue,\n         protoName: protoName,\n       ) {\n    assert(!PbFieldType.isEnum(type) || valueOf != null);\n  }\n\n  FieldInfo get valueFieldInfo =>\n      mapEntryBuilderInfo.fieldInfo[mapValueFieldNumber]!;\n\n  PbMap<K, V> _ensureMapField(BuilderInfo meta, FieldSet fs) {\n    return fs._ensureMapField<K, V>(meta, this);\n  }\n\n  PbMap<K, V> _createMapField() {\n    assert(isMapField);\n    return newPbMap<K, V>(keyFieldType, valueFieldType);\n  }\n}\n\nextension MapFieldInfoInternalExtension<K, V> on MapFieldInfo<K, V> {\n  Map<K, V> ensureMapField(BuilderInfo meta, FieldSet fs) =>\n      _ensureMapField(meta, fs);\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/field_set.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n@pragma('vm:never-inline')\n@pragma('wasm:never-inline')\nvoid _throwFrozenMessageModificationError(\n  String messageName, [\n  String? methodName,\n]) {\n  if (methodName != null) {\n    throw UnsupportedError(\n      'Attempted to call $methodName on a read-only message ($messageName)',\n    );\n  }\n  throw UnsupportedError(\n    'Attempted to change a read-only message ($messageName)',\n  );\n}\n\n/// All the data in a [GeneratedMessage].\n///\n/// These fields and methods are in a separate class to avoid polymorphic\n/// access due to inheritance. This turns out to be faster when compiled to\n/// JavaScript.\nclass FieldSet {\n  final GeneratedMessage? _message;\n\n  /// The value of each non-extension field in a fixed-length array.\n  /// The index of a field can be found in [FieldInfo.index].\n  /// A null entry indicates that the field has no value.\n  final List _values;\n\n  /// Contains all the extension fields, or null if there aren't any.\n  ExtensionFieldSet? _extensions;\n\n  /// Contains all the unknown fields, or null if there aren't any.\n  UnknownFieldSet? _unknownFields;\n\n  /// Contains unknown data for messages deserialized from json.\n  Map<String, Object?>? _unknownJsonData;\n\n  /// Encodes whether `this` has been frozen, and if so, also memoizes the\n  /// hash code.\n  ///\n  /// Will always be a `bool` or `int`.\n  ///\n  /// If the message is mutable: `false`\n  /// If the message is frozen and no hash code has been computed: `true`\n  /// If the message is frozen and a hash code has been computed: the hash\n  /// code as an `int`.\n  Object _frozenState = false;\n\n  /// The [BuilderInfo] for the [GeneratedMessage] this [FieldSet] belongs to.\n  ///\n  /// WARNING: Avoid calling this for any performance critical code, instead\n  /// obtain the [BuilderInfo] on the call site.\n  BuilderInfo get _meta => _message!.info_;\n\n  /// Returns the value of [_frozenState] as if it were a boolean indicator\n  /// for whether `this` is read-only (has been frozen).\n  ///\n  /// If the value is not a `bool`, then it must contain the memoized hash code\n  /// value, in which case the proto must be read-only.\n  bool get _isReadOnly => _frozenState is! bool || _frozenState as bool;\n\n  /// Returns the value of [_frozenState] if it contains the pre-computed value\n  /// of the hashCode for the frozen field sets.\n  ///\n  /// Computing the hashCode of a proto object can be very expensive for large\n  /// protos. Frozen protos don't allow any mutations, which means the contents\n  /// of the field set should be stable.\n  ///\n  /// If [_frozenState] contains a boolean, the hashCode hasn't been memoized,\n  /// so it will return null.\n  int? get _memoizedHashCode =>\n      _frozenState is int ? _frozenState as int : null;\n\n  /// Maps a `oneof` field index to the tag number which is currently set. If\n  /// the index is not present, the oneof field is unset.\n  final Map<int, int>? _oneofCases;\n\n  FieldSet(this._message, BuilderInfo meta)\n    : _values = _makeValueList(meta.byIndex.length),\n      _oneofCases = meta.oneofs.isEmpty ? null : <int, int>{};\n\n  static List _makeValueList(int length) {\n    if (length == 0) return _zeroList;\n    return List.filled(length, null, growable: false);\n  }\n\n  // Use `List.filled` and not a `[]` to ensure that `_values` always has the\n  // same implementation type.\n  static final List _zeroList = List.filled(0, null, growable: false);\n\n  // Metadata about multiple fields\n\n  String get _messageName => _meta.qualifiedMessageName;\n  bool get _hasRequiredFields => _meta.hasRequiredFields;\n\n  /// The [FieldInfo] for each non-extension field.\n  Iterable<FieldInfo> get _infos => _meta.fieldInfo.values;\n\n  /// The [FieldInfo] for each non-extension field in tag order.\n  Iterable<FieldInfo> get _infosSortedByTag => _meta.sortedByTag;\n\n  ExtensionFieldSet _ensureExtensions() =>\n      _extensions ??= ExtensionFieldSet(this, readOnly: _isReadOnly);\n\n  UnknownFieldSet _ensureUnknownFields() {\n    if (_unknownFields == null) {\n      if (_isReadOnly) return UnknownFieldSet.emptyUnknownFieldSet;\n      _unknownFields = UnknownFieldSet();\n    }\n    return _unknownFields!;\n  }\n\n  // Metadata about single fields\n\n  /// Returns FieldInfo for a non-extension field, or null if not found.\n  FieldInfo? _nonExtensionInfo(BuilderInfo meta, int? tagNumber) =>\n      meta.fieldInfo[tagNumber];\n\n  /// Returns FieldInfo for a non-extension field.\n  FieldInfo _nonExtensionInfoByIndex(int index) => _meta.byIndex[index];\n\n  /// Returns the FieldInfo for a regular or extension field.\n  /// throws ArgumentException if no info is found.\n  FieldInfo _ensureInfo(int tagNumber) {\n    final fi = _getFieldInfoOrNull(tagNumber);\n    if (fi != null) return fi;\n    throw ArgumentError('tag $tagNumber not defined in $_messageName');\n  }\n\n  /// Returns the FieldInfo for a regular or extension field.\n  FieldInfo? _getFieldInfoOrNull(int tagNumber) {\n    final fi = _nonExtensionInfo(_meta, tagNumber);\n    if (fi != null) return fi;\n    return _extensions?._getInfoOrNull(tagNumber);\n  }\n\n  void _markReadOnly() {\n    if (_isReadOnly) return;\n    _frozenState = true;\n    for (final field in _meta.sortedByTag) {\n      if (field.isRepeated) {\n        final PbList? list = _values[field.index!];\n        if (list == null) continue;\n        list.freeze();\n      } else if (field.isMapField) {\n        final PbMap? map = _values[field.index!];\n        if (map == null) continue;\n        map.freeze();\n      } else if (field.isGroupOrMessage) {\n        final entry = _values[field.index!];\n        if (entry != null) {\n          final GeneratedMessage msg = entry;\n          msg.freeze();\n        }\n      }\n    }\n\n    _extensions?._markReadOnly();\n    _unknownFields?._markReadOnly();\n  }\n\n  void _ensureWritable() {\n    if (_isReadOnly) {\n      _throwFrozenMessageModificationError(_messageName);\n    }\n  }\n\n  // Single-field operations\n\n  /// Gets a field with full error-checking.\n  ///\n  /// Works for both extended and non-extended fields.\n  /// Creates repeated fields (unless read-only).\n  /// Suitable for public API.\n  dynamic _getField(int tagNumber) {\n    final fi = _nonExtensionInfo(_meta, tagNumber);\n    if (fi != null) {\n      final value = _values[fi.index!];\n      if (value != null) return value;\n      return _getDefault(fi);\n    }\n    final extensions = _extensions;\n    if (extensions != null) {\n      final fi = extensions._getInfoOrNull(tagNumber);\n      if (fi != null) {\n        return extensions._getFieldOrDefault(fi);\n      }\n    }\n    throw ArgumentError('tag $tagNumber not defined in $_messageName');\n  }\n\n  dynamic _getDefault(FieldInfo fi) {\n    if (!fi.isRepeated && !fi.isMapField) return fi.makeDefault!();\n    if (_isReadOnly) return fi.readonlyDefault;\n\n    final value = fi.makeDefault!();\n    _setNonExtensionFieldUnchecked(_meta, fi, value);\n    return value;\n  }\n\n  dynamic _getFieldOrNullByTag(int tagNumber) {\n    final fi = _getFieldInfoOrNull(tagNumber);\n    if (fi == null) return null;\n    return _getFieldOrNull(fi);\n  }\n\n  /// Returns the field's value or null if not set.\n  ///\n  /// Works for both extended and non-extend fields.\n  /// Works for both repeated and non-repeated fields.\n  dynamic _getFieldOrNull(FieldInfo fi) {\n    if (fi.index != null) return _values[fi.index!];\n    return _extensions?._getFieldOrNull(fi as Extension<dynamic>);\n  }\n\n  bool _hasField(int tagNumber) {\n    final fi = _nonExtensionInfo(_meta, tagNumber);\n    if (fi != null) return _$has(fi.index!);\n    return _extensions?._hasField(tagNumber) ?? false;\n  }\n\n  void _clearField(int tagNumber) {\n    _ensureWritable();\n    final meta = _meta;\n    final fi = _nonExtensionInfo(meta, tagNumber);\n\n    if (fi != null) {\n      assert(tagNumber == fi.tagNumber);\n\n      // Clear a non-extension field\n      _values[fi.index!] = null;\n\n      final oneofIndex = meta.oneofs[tagNumber];\n      if (oneofIndex != null) {\n        _oneofCases![oneofIndex] = 0;\n      }\n\n      return;\n    }\n\n    final extensions = _extensions;\n    if (extensions != null) {\n      final fi = extensions._getInfoOrNull(tagNumber);\n      if (fi != null) {\n        extensions._clearField(fi);\n        return;\n      }\n    }\n\n    // neither a regular field nor an extension.\n    // TODO(skybrian) throw?\n  }\n\n  /// Sets a non-repeated field with error-checking.\n  ///\n  /// Works for both extended and non-extended fields.\n  /// Suitable for public API.\n  void _setField(int tagNumber, Object value) {\n    final meta = _meta;\n    final fi = _nonExtensionInfo(meta, tagNumber);\n    if (fi == null) {\n      final extensions = _extensions;\n      if (extensions == null) {\n        throw ArgumentError('tag $tagNumber not defined in $_messageName');\n      }\n      extensions._setField(tagNumber, value);\n      return;\n    }\n\n    if (fi.isRepeated) {\n      throw ArgumentError(\n        _setFieldFailedMessage(fi, value, 'repeating field (use get + .add())'),\n      );\n    }\n    _validateField(fi, value);\n    _setNonExtensionFieldUnchecked(meta, fi, value);\n  }\n\n  /// Sets a non-repeated field without validating it.\n  ///\n  /// Works for both extended and non-extended fields.\n  /// Suitable for decoders that do their own validation.\n  void _setFieldUnchecked(BuilderInfo meta, FieldInfo fi, value) {\n    assert(!fi.isRepeated);\n    if (fi.index == null) {\n      _ensureExtensions()\n        .._addInfoUnchecked(fi as Extension<dynamic>)\n        .._setFieldUnchecked(fi, value);\n    } else {\n      _setNonExtensionFieldUnchecked(meta, fi, value);\n    }\n  }\n\n  /// Returns the list to use for adding to a repeated field.\n  ///\n  /// Works for both extended and non-extended fields.\n  /// Creates and stores the repeated field if it doesn't exist.\n  /// If it's an extension and the list doesn't exist, validates and stores it.\n  /// Suitable for decoders.\n  PbList<T> _ensureRepeatedField<T>(BuilderInfo meta, FieldInfo<T> fi) {\n    assert(!_isReadOnly);\n    assert(fi.isRepeated);\n    if (fi.index == null) {\n      return _ensureExtensions()._ensureRepeatedField(fi as Extension<T>);\n    }\n    final value = _getFieldOrNull(fi);\n    if (value != null) return value;\n\n    final newValue = fi._createRepeatedField();\n    _setNonExtensionFieldUnchecked(meta, fi, newValue);\n    return newValue;\n  }\n\n  PbMap<K, V> _ensureMapField<K, V>(BuilderInfo meta, MapFieldInfo<K, V> fi) {\n    assert(!_isReadOnly);\n    assert(fi.isMapField);\n    assert(fi.index != null); // Map fields are not allowed to be extensions.\n\n    final value = _getFieldOrNull(fi);\n    if (value != null) return value;\n\n    final newValue = fi._createMapField();\n    _setNonExtensionFieldUnchecked(meta, fi, newValue);\n    return newValue;\n  }\n\n  /// Sets a non-extended field and fires events.\n  void _setNonExtensionFieldUnchecked(BuilderInfo meta, FieldInfo fi, value) {\n    final tag = fi.tagNumber;\n    final oneofIndex = meta.oneofs[tag];\n    if (oneofIndex != null) {\n      final currentOneofTag = _oneofCases![oneofIndex];\n      if (currentOneofTag != null) {\n        _clearField(currentOneofTag);\n      }\n      _oneofCases[oneofIndex] = tag;\n    }\n\n    _values[fi.index!] = value;\n  }\n\n  // Generated method implementations\n\n  /// The implementation of a generated getter.\n  T _$get<T>(int index, T? defaultValue) {\n    final value = _values[index];\n    if (value != null) return value;\n    if (defaultValue != null) return defaultValue;\n    return _getDefault(_nonExtensionInfoByIndex(index)) as T;\n  }\n\n  /// The implementation of a generated getter for a default value determined by\n  /// the field definition value. Common case for submessages. dynamic type\n  /// pushes the type check to the caller.\n  dynamic _$getND(int index) {\n    final value = _values[index];\n    if (value != null) return value;\n    return _getDefault(_nonExtensionInfoByIndex(index));\n  }\n\n  T _$ensure<T>(int index) {\n    if (!_$has(index)) {\n      final dynamic value = _nonExtensionInfoByIndex(index).subBuilder!();\n      _$set(index, value);\n      return value;\n    }\n    // The implicit downcast at the return is always correct by construction\n    // from the protoc generator. See `GeneratedMessage.$_getN` for details.\n    return _$getND(index);\n  }\n\n  /// The implementation of a generated getter for repeated fields.\n  PbList<T> _$getList<T>(int index) {\n    final value = _values[index];\n    if (value != null) return value;\n\n    final fi = _nonExtensionInfoByIndex(index) as FieldInfo<T>;\n    assert(fi.isRepeated);\n\n    if (_isReadOnly) {\n      return fi.readonlyDefault;\n    }\n\n    final list = fi._createRepeatedFieldWithType<T>();\n    _setNonExtensionFieldUnchecked(_meta, fi, list);\n    return list;\n  }\n\n  /// The implementation of a generated getter for map fields.\n  PbMap<K, V> _$getMap<K, V>(GeneratedMessage parentMessage, int index) {\n    final value = _values[index];\n    if (value != null) return value;\n\n    final fi = _nonExtensionInfoByIndex(index) as MapFieldInfo<K, V>;\n    assert(fi.isMapField);\n\n    if (_isReadOnly) {\n      return newUnmodifiablePbMap<K, V>(fi.keyFieldType, fi.valueFieldType);\n    }\n\n    final map = fi._createMapField();\n    _setNonExtensionFieldUnchecked(_meta, fi, map);\n    return map;\n  }\n\n  /// The implementation of a generated getter for `bool` fields.\n  bool _$getB(int index, bool? defaultValue) {\n    var value = _values[index];\n    if (value == null) {\n      if (defaultValue != null) return defaultValue;\n      value = _getDefault(_nonExtensionInfoByIndex(index));\n    }\n    return value;\n  }\n\n  /// The implementation of a generated getter for `bool` fields that default to\n  /// `false`.\n  bool _$getBF(int index) => _values[index] ?? false;\n\n  /// The implementation of a generated getter for int fields.\n  int _$getI(int index, int? defaultValue) {\n    var value = _values[index];\n    if (value == null) {\n      if (defaultValue != null) return defaultValue;\n      value = _getDefault(_nonExtensionInfoByIndex(index));\n    }\n    return value;\n  }\n\n  /// The implementation of a generated getter for `int` fields (int32, uint32,\n  /// fixed32, sfixed32) that default to `0`.\n  int _$getIZ(int index) => _values[index] ?? 0;\n\n  /// The implementation of a generated getter for String fields.\n  String _$getS(int index, String? defaultValue) {\n    var value = _values[index];\n    if (value == null) {\n      if (defaultValue != null) return defaultValue;\n      value = _getDefault(_nonExtensionInfoByIndex(index));\n    }\n    return value;\n  }\n\n  /// The implementation of a generated getter for String fields that default to\n  /// the empty string.\n  String _$getSZ(int index) => _values[index] ?? '';\n\n  /// The implementation of a generated getter for Int64 fields.\n  Int64 _$getI64(int index) {\n    var value = _values[index];\n    value ??= _getDefault(_nonExtensionInfoByIndex(index));\n    return value;\n  }\n\n  /// The implementation of a generated 'has' method.\n  bool _$has(int index) {\n    final value = _values[index];\n    if (value == null) return false;\n    if (value is List) return value.isNotEmpty;\n    return true;\n  }\n\n  /// The implementation of a generated setter.\n  ///\n  /// In production, does no validation other than a null check.\n  /// Only handles non-repeated, non-extension fields.\n  /// Also, doesn't handle enums or messages which need per-type validation.\n  void _$set(int index, Object? value) {\n    assert(!_nonExtensionInfoByIndex(index).isRepeated);\n    assert(_$check(index, value));\n    _ensureWritable();\n    if (value == null) {\n      _$check(index, value); // throw exception for null value\n    }\n    final meta = _meta;\n    final tag = meta.byIndex[index].tagNumber;\n    final oneofIndex = meta.oneofs[tag];\n\n    if (oneofIndex != null) {\n      final currentOneofTag = _oneofCases![oneofIndex];\n      if (currentOneofTag != null) {\n        _clearField(currentOneofTag);\n      }\n      _oneofCases[oneofIndex] = tag;\n    }\n    _values[index] = value;\n  }\n\n  bool _$check(int index, var newValue) {\n    _validateField(_nonExtensionInfoByIndex(index), newValue);\n    return true; // Allows use in an assertion.\n  }\n\n  // Bulk operations reading or writing multiple fields\n\n  void _clear() {\n    _ensureWritable();\n    if (_unknownFields != null) {\n      _unknownFields!.clear();\n    }\n    _unknownJsonData = null;\n    if (_values.isNotEmpty) _values.fillRange(0, _values.length, null);\n    _extensions?._clearValues();\n    _oneofCases?.clear();\n  }\n\n  bool _equals(FieldSet o) {\n    if (_meta != o._meta) return false;\n    for (var i = 0; i < _values.length; i++) {\n      if (!_equalFieldValues(_values[i], o._values[i])) return false;\n    }\n\n    final extensions = _extensions;\n    if (extensions == null || !extensions._hasValues) {\n      // Check if other extensions are logically empty.\n      // (Don't create them unnecessarily.)\n      final oExtensions = o._extensions;\n      if (oExtensions != null && oExtensions._hasValues) {\n        return false;\n      }\n    } else {\n      if (!extensions._equalValues(o._extensions)) return false;\n    }\n\n    if (_unknownFields == null || _unknownFields!.isEmpty) {\n      // Check if other unknown fields is logically empty.\n      // (Don't create them unnecessarily.)\n      if (o._unknownFields != null && o._unknownFields!.isNotEmpty) {\n        return false;\n      }\n    } else {\n      // Check if the other unknown fields has the same fields.\n      if (_unknownFields != o._unknownFields) return false;\n    }\n\n    if (_unknownJsonData != null || o._unknownJsonData != null) {\n      if ((_unknownJsonData == null) != (o._unknownJsonData == null)) {\n        return false;\n      }\n      if (!DeepCollectionEquality().equals(\n        _unknownJsonData,\n        o._unknownJsonData,\n      )) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  bool _equalFieldValues(Object? left, Object? right) {\n    if (left != null && right != null) return deepEquals(left, right);\n\n    final val = left ?? right;\n\n    // Two uninitialized fields are equal.\n    if (val == null) return true;\n\n    // One field is null. We are comparing an initialized field\n    // with its default value.\n\n    // An empty repeated field is the same as uninitialized.\n    // This is because accessing a repeated field automatically creates it.\n    // We don't want reading a field to change equality comparisons.\n    if (val is List && val.isEmpty) return true;\n\n    // An empty map field is the same as uninitialized.\n    // This is because accessing a map field automatically creates it.\n    // We don't want reading a field to change equality comparisons.\n    if (val is PbMap && val.isEmpty) return true;\n\n    // For now, initialized and uninitialized fields are different.\n    // TODO(skybrian) consider other cases; should we compare with the\n    // default value or not?\n    return false;\n  }\n\n  /// Calculates a hash code based on the contents of the protobuf.\n  ///\n  /// The hash may change when any field changes (recursively).\n  /// Therefore, protobufs used as map keys shouldn't be changed.\n  ///\n  /// If the protobuf contents have been frozen the hashCode is memoized to\n  /// speed up performance.\n  int get _hashCode {\n    if (_memoizedHashCode != null) {\n      return _memoizedHashCode!;\n    }\n\n    // Hash with descriptor.\n    var hash = HashUtils.combine(0, _meta.hashCode);\n\n    // Hash with non-extension fields.\n    final values = _values;\n    for (final fi in _infosSortedByTag) {\n      final value = values[fi.index!];\n      if (value == null) continue;\n      hash = _hashField(hash, fi, value);\n    }\n\n    // Hash with extension fields.\n    final extensions = _extensions;\n    if (extensions != null) {\n      final sortedByTagNumbers = sorted(extensions._tagNumbers);\n      for (final tagNumber in sortedByTagNumbers) {\n        final fi = extensions._getInfoOrNull(tagNumber)!;\n        hash = _hashField(hash, fi, extensions._getFieldOrNull(fi));\n      }\n    }\n\n    // Hash with unknown fields.\n    hash = HashUtils.combine(hash, _unknownFields?.hashCode ?? 0);\n\n    if (_unknownJsonData != null) {\n      hash = HashUtils.combine(\n        hash,\n        DeepCollectionEquality().hash(_unknownJsonData),\n      );\n    }\n\n    if (_isReadOnly) {\n      _frozenState = hash;\n    }\n    return hash;\n  }\n\n  // Hashes the value of one field (recursively).\n  static int _hashField(int hash, FieldInfo fi, value) {\n    if (value is List && value.isEmpty) {\n      return hash; // It's either repeated or an empty byte array.\n    }\n\n    if (value is PbMap && value.isEmpty) {\n      return hash;\n    }\n\n    hash = HashUtils.combine(hash, fi.tagNumber);\n    if (PbFieldType.isBytes(fi.type)) {\n      // Bytes are represented as a List<int> (Usually with byte-data).\n      // We special case that to match our equality semantics.\n      hash = HashUtils.combine(hash, HashUtils.hashObjects(value));\n    } else if (!PbFieldType.isEnum(fi.type)) {\n      hash = HashUtils.combine(hash, value.hashCode);\n    } else if (fi.isRepeated) {\n      final PbList list = value;\n      hash = HashUtils.combine(\n        hash,\n        HashUtils.hashObjects(\n          list.map((enm) {\n            final ProtobufEnum enm_ = enm;\n            return enm_.value;\n          }),\n        ),\n      );\n    } else {\n      final ProtobufEnum enm = value;\n      hash = HashUtils.combine(hash, enm.value);\n    }\n\n    return hash;\n  }\n\n  void writeString(StringBuffer out, String indent) {\n    void renderValue(key, value) {\n      if (value is GeneratedMessage) {\n        out.write('$indent$key: {\\n');\n        value._fieldSet.writeString(out, '$indent  ');\n        out.write('$indent}\\n');\n      } else if (value is MapEntry) {\n        out.write('$indent$key: {${value.key} : ${value.value}} \\n');\n      } else {\n        out.write('$indent$key: $value\\n');\n      }\n    }\n\n    void writeFieldValue(fieldValue, String name) {\n      if (fieldValue == null) return;\n      if (fieldValue is PbList) {\n        for (final value in fieldValue) {\n          renderValue(name, value);\n        }\n      } else if (fieldValue is PbMap) {\n        for (final entry in fieldValue.entries) {\n          renderValue(name, entry);\n        }\n      } else {\n        renderValue(name, fieldValue);\n      }\n    }\n\n    for (final fi in _infosSortedByTag) {\n      writeFieldValue(\n        _values[fi.index!],\n        fi.name == '' ? fi.tagNumber.toString() : fi.name,\n      );\n    }\n\n    final extensions = _extensions;\n    if (extensions != null) {\n      extensions._info.keys.toList()\n        ..sort()\n        ..forEach(\n          (int tagNumber) => writeFieldValue(\n            _extensions!._values[tagNumber],\n            '[${_extensions!._info[tagNumber]!.name}]',\n          ),\n        );\n    }\n\n    final unknownFields = _unknownFields;\n    if (unknownFields != null) {\n      out.write(unknownFields.toString());\n    } else {\n      out.write(UnknownFieldSet().toString());\n    }\n\n    final unknownJsonData = _unknownJsonData;\n    if (unknownJsonData != null) {\n      out.write(unknownJsonData.toString());\n    }\n  }\n\n  /// Writes the text proto string representation of the message.\n  /// Spec: https://protobuf.dev/reference/protobuf/textformat-spec/\n  void writeTextFormat(StringSink out) {\n    _writeTextFormat(out, 0);\n  }\n\n  void _writeTextFormat(StringSink out, int initialIndentLevel) {\n    void writeIndent(int indentLevel) {\n      for (var i = 0; i < indentLevel; i++) {\n        out.writeCharCode(32);\n        out.writeCharCode(32);\n      }\n    }\n\n    void renderValue(String key, dynamic value, int indentLevel) {\n      writeIndent(indentLevel);\n      if (value is GeneratedMessage) {\n        out.write('$key {\\n');\n        value._fieldSet._writeTextFormat(out, indentLevel + 1);\n        writeIndent(indentLevel);\n        out.write('}\\n');\n      } else if (value is MapEntry) {\n        out.write('$key {\\n');\n        renderValue('key', value.key, indentLevel + 1);\n        renderValue('value', value.value, indentLevel + 1);\n        writeIndent(indentLevel);\n        out.write('}\\n');\n      } else if (value is String) {\n        out.write('$key: \"${escapeString(value)}\"\\n');\n      } else if (value is Map) {\n        out.write('$key {\\n');\n        for (final entry in value.entries) {\n          renderValue(entry.key, entry.value, indentLevel + 1);\n        }\n        writeIndent(indentLevel);\n        out.write('}\\n');\n        // Bytes are represented as a List<int> in Dart protobuf.\n      } else if (value is List<int>) {\n        out.write('$key: \"');\n        escapeBytes(value, out);\n        out.write('\"\\n');\n      } else {\n        // Writes the primitive value as a string.\n        out.write('$key: $value\\n');\n      }\n    }\n\n    void writeFieldValue(String name, dynamic fieldValue) {\n      if (fieldValue is PbList) {\n        for (final value in fieldValue) {\n          renderValue(name, value, initialIndentLevel);\n        }\n      } else if (fieldValue is PbMap) {\n        for (final entry in fieldValue.entries) {\n          renderValue(name, entry, initialIndentLevel);\n        }\n      } else {\n        renderValue(name, fieldValue, initialIndentLevel);\n      }\n    }\n\n    for (final fi in _infosSortedByTag) {\n      if (_hasField(fi.tagNumber)) {\n        writeFieldValue(\n          fi.name == '' ? fi.tagNumber.toString() : fi.protoName,\n          _values[fi.index!],\n        );\n      }\n    }\n\n    final extensions = _extensions;\n    if (extensions != null) {\n      extensions._info.keys.toList()\n        ..sort()\n        ..forEach((int tagNumber) {\n          if (_hasField(tagNumber)) {\n            writeFieldValue(\n              '[${extensions._info[tagNumber]!.name}]',\n              extensions._values[tagNumber],\n            );\n          }\n        });\n    }\n\n    _unknownFields?.writeTextFormat(out, initialIndentLevel);\n\n    final unknownJsonData = _unknownJsonData;\n    if (unknownJsonData != null) {\n      for (final entry in unknownJsonData.entries) {\n        renderValue(entry.key, entry.value, initialIndentLevel);\n      }\n    }\n  }\n\n  /// Merges the contents of the [other] into this message.\n  ///\n  /// Singular fields that are set in [other] overwrite the corresponding fields\n  /// in this message. Repeated fields are appended. Singular sub-messages are\n  /// recursively merged.\n  void _mergeFromMessage(FieldSet other) {\n    // TODO(https://github.com/google/protobuf.dart/issues/60): Recognize\n    // when `this` and [other] are the same protobuf (e.g. from cloning). In\n    // this case, we can merge the non-extension fields without field lookups or\n    // validation checks.\n    _ensureWritable();\n    for (final fi in other._infosSortedByTag) {\n      final value = other._values[fi.index!];\n      if (value != null) _mergeField(fi, value, isExtension: false);\n    }\n\n    final otherExtensions = other._extensions;\n    if (otherExtensions != null) {\n      for (final tagNumber in otherExtensions._tagNumbers) {\n        final extension = otherExtensions._getInfoOrNull(tagNumber)!;\n        final value = otherExtensions._getFieldOrNull(extension);\n        _mergeField(extension, value, isExtension: true);\n      }\n    }\n\n    final otherUnknownFields = other._unknownFields;\n    if (otherUnknownFields != null) {\n      _ensureUnknownFields().mergeFromUnknownFieldSet(otherUnknownFields);\n    }\n\n    final otherUnknownJsonData = other._unknownJsonData;\n    if (otherUnknownJsonData != null) {\n      final newUnknownJsonData = Map<String, dynamic>.from(\n        _unknownJsonData ?? {},\n      );\n      otherUnknownJsonData.forEach(\n        (key, value) => newUnknownJsonData[key] = value,\n      );\n      _unknownJsonData = newUnknownJsonData.isEmpty ? null : newUnknownJsonData;\n    }\n  }\n\n  void _mergeField(FieldInfo otherFi, fieldValue, {required bool isExtension}) {\n    final tagNumber = otherFi.tagNumber;\n\n    // Determine the FieldInfo to use.\n    // Don't allow regular fields to be overwritten by extensions.\n    final meta = _meta;\n    var fi = _nonExtensionInfo(meta, tagNumber);\n    if (fi == null && isExtension) {\n      // This will overwrite any existing extension field info.\n      fi = otherFi;\n    }\n\n    if (fi!.isMapField) {\n      if (fieldValue == null) {\n        return;\n      }\n      final MapFieldInfo<dynamic, dynamic> f = fi as dynamic;\n      final PbMap<dynamic, dynamic> map =\n          f._ensureMapField(meta, this) as dynamic;\n      if (PbFieldType.isGroupOrMessage(f.valueFieldType)) {\n        final PbMap<dynamic, GeneratedMessage> fieldValueMap = fieldValue;\n        for (final entry in fieldValueMap.entries) {\n          map[entry.key] = entry.value.deepCopy();\n        }\n      } else {\n        map.addAll(fieldValue);\n      }\n      return;\n    }\n\n    if (fi.isRepeated) {\n      if (PbFieldType.isGroupOrMessage(otherFi.type)) {\n        // fieldValue must be a PbList of GeneratedMessage.\n        final PbList<GeneratedMessage> pbList = fieldValue;\n        final repeatedFields = fi._ensureRepeatedField(meta, this);\n        for (var i = 0; i < pbList.length; ++i) {\n          repeatedFields.add(pbList[i].deepCopy());\n        }\n      } else {\n        // fieldValue must be at least a PbList.\n        final PbList pbList = fieldValue;\n        fi._ensureRepeatedField(meta, this).addAll(pbList);\n      }\n      return;\n    }\n\n    if (otherFi.isGroupOrMessage) {\n      final currentFi =\n          isExtension\n              ? _ensureExtensions()._getFieldOrNull(fi as Extension<dynamic>)\n              : _values[fi.index!];\n\n      final GeneratedMessage msg = fieldValue;\n      if (currentFi == null) {\n        fieldValue = msg.deepCopy();\n      } else {\n        final GeneratedMessage currentMsg = currentFi;\n        fieldValue = currentMsg..mergeFromMessage(msg);\n      }\n    }\n\n    if (isExtension) {\n      _ensureExtensions()._setFieldAndInfo(\n        fi as Extension<dynamic>,\n        fieldValue,\n      );\n    } else {\n      _validateField(fi, fieldValue);\n      _setNonExtensionFieldUnchecked(meta, fi, fieldValue);\n    }\n  }\n\n  // Error-checking\n\n  /// Checks that the message is mutable (not frozen) and the value for the\n  /// field is valid for the field type.\n  ///\n  /// Throws [UnsupportedError] if the message if immutable (frozen).\n  ///\n  /// Throws [ArgumentError] if the field value is not valid for the field\n  /// type. For example, when setting a proto `string` field a Dart `int`.\n  void _validateField(FieldInfo fi, var newValue) {\n    _ensureWritable();\n    final message = _getFieldError(fi.type, newValue);\n    if (message != null) {\n      throw ArgumentError(_setFieldFailedMessage(fi, newValue, message));\n    }\n  }\n\n  String _setFieldFailedMessage(FieldInfo fi, var value, String detail) {\n    return 'Illegal to set field ${fi.name} (${fi.tagNumber}) of $_messageName'\n        ' to value ($value): $detail';\n  }\n\n  bool _hasRequiredValues() {\n    if (!_hasRequiredFields) return true;\n    for (final fi in _infos) {\n      final value = _values[fi.index!];\n      if (!fi._hasRequiredValues(value)) return false;\n    }\n    return _hasRequiredExtensionValues();\n  }\n\n  bool _hasRequiredExtensionValues() {\n    final extensions = _extensions;\n    if (extensions == null) return true;\n    for (final fi in extensions._infos) {\n      final value = extensions._getFieldOrNull(fi);\n      if (!fi._hasRequiredValues(value)) return false;\n    }\n    return true; // No problems found.\n  }\n\n  /// Adds the path to each uninitialized field to the list.\n  void _appendInvalidFields(List<String> problems, String prefix) {\n    if (!_hasRequiredFields) return;\n    for (final fi in _infos) {\n      final value = _values[fi.index!];\n      fi._appendInvalidFields(problems, value, prefix);\n    }\n    // TODO(skybrian): search extensions as well\n    // https://github.com/google/protobuf.dart/issues/46\n  }\n\n  /// Makes a shallow copy of all values from [original] to this.\n  ///\n  /// Map fields and repeated fields are copied.\n  void _shallowCopyValues(FieldSet original) {\n    _values.setRange(0, original._values.length, original._values);\n    final info = _meta;\n    for (var index = 0; index < info.byIndex.length; index++) {\n      final fieldInfo = info.byIndex[index];\n      if (fieldInfo.isMapField) {\n        final PbMap? map = _values[index];\n        if (map != null) {\n          _values[index] =\n              (fieldInfo as MapFieldInfo)._createMapField()..addAll(map);\n        }\n      } else if (fieldInfo.isRepeated) {\n        final PbList? list = _values[index];\n        if (list != null) {\n          _values[index] = fieldInfo._createRepeatedField()..addAll(list);\n        }\n      }\n    }\n\n    final originalExtensions = original._extensions;\n    if (originalExtensions != null) {\n      _ensureExtensions()._shallowCopyValues(originalExtensions);\n    }\n\n    final originalUnknownFields = original._unknownFields;\n    if (originalUnknownFields != null) {\n      _ensureUnknownFields()._fields.addAll(originalUnknownFields._fields);\n    }\n\n    final unknownJsonData = original._unknownJsonData;\n    if (unknownJsonData != null) {\n      _unknownJsonData = Map.from(unknownJsonData);\n    }\n\n    _oneofCases?.addAll(original._oneofCases!);\n  }\n\n  // This assumes that [this] is fresh, i.e. no extensions, no values set.\n  //\n  // The reason why this updates [this] instead of returning a new [FieldSet] is\n  // that to start cloning we need to create an empty instance via\n  // `createEmptyInstance`, which already creates an empty [FieldSet], which we\n  // reuse here.\n  void _deepCopyFrom(FieldSet original) {\n    final info = _meta;\n\n    assert(_values.length == original._values.length);\n\n    // memcpy the original's values to avoid redundant bounds checks below by\n    // copying scalar fields one by one.\n    _values.setAll(0, original._values);\n\n    for (var index = 0; index < info.byIndex.length; index++) {\n      final fieldInfo = info.byIndex[index];\n      if (fieldInfo.isMapField) {\n        final PbMap? originalMap = original._values[index];\n        if (originalMap == null) continue;\n        _values[index] = originalMap.deepCopy();\n      } else if (fieldInfo.isRepeated) {\n        final PbList? originalList = original._values[index];\n        if (originalList == null) continue;\n        _values[index] = originalList.deepCopy();\n      } else if (fieldInfo.isGroupOrMessage) {\n        final GeneratedMessage? message = original._values[index];\n        _values[index] = message?.deepCopy();\n      }\n\n      // Scalar fields are already copied above with `setAll`.\n    }\n\n    assert(_extensions == null);\n    final originalExtensions = original._extensions;\n    if (originalExtensions != null) {\n      _extensions = originalExtensions._deepCopy(this);\n    }\n\n    assert(_unknownFields == null);\n    final originalUnknownFields = original._unknownFields;\n    if (originalUnknownFields != null) {\n      _unknownFields = originalUnknownFields._deepCopy();\n    }\n\n    assert(_unknownJsonData == null);\n    final originalUnknownJsonData = original._unknownJsonData;\n    if (originalUnknownJsonData != null) {\n      _unknownJsonData = Map.from(originalUnknownJsonData);\n    }\n\n    assert(_oneofCases == null || _oneofCases.isEmpty);\n    final originalOneofCases = original._oneofCases;\n    if (originalOneofCases != null) {\n      _oneofCases!.addAll(originalOneofCases);\n    }\n  }\n\n  bool hasExtension(Extension extension) =>\n      _extensions?._getFieldOrNull(extension) != null;\n\n  dynamic getExtension(Extension extension) =>\n      _ensureExtensions()._getFieldOrDefault(extension);\n\n  void setExtension(Extension extension, Object value) =>\n      _ensureExtensions()._setFieldAndInfo(extension, value);\n\n  void addExtension(Extension extension, Object? value) {\n    _ensureWritable();\n    if (!extension.isRepeated) {\n      throw ArgumentError(\n        'Cannot add to a non-repeated field (use setExtension())',\n      );\n    }\n    _ensureExtensions()._ensureRepeatedField(extension).add(value);\n  }\n\n  void clearExtension(Extension extension) {\n    _ensureWritable();\n    _extensions?._clearFieldAndInfo(extension);\n  }\n}\n\nextension FieldSetInternalExtension on FieldSet {\n  Iterable<FieldInfo> get infos => _infos;\n  Iterable<FieldInfo> get infosSortedByTag => _infosSortedByTag;\n  List get values => _values;\n  ExtensionFieldSet? get extensions => _extensions;\n  UnknownFieldSet? get unknownFields => _unknownFields;\n  Map<String, Object?>? get unknownJsonData => _unknownJsonData;\n  set unknownJsonData(Map<String, dynamic>? value) => _unknownJsonData = value;\n  BuilderInfo get meta => _meta;\n  GeneratedMessage? get message => _message;\n  String get messageName => _messageName;\n\n  void ensureWritable() => _ensureWritable();\n  PbList<T> ensureRepeatedField<T>(BuilderInfo meta, FieldInfo<T> fi) =>\n      _ensureRepeatedField(meta, fi);\n  PbMap<K, V> ensureMapField<K, V>(BuilderInfo meta, MapFieldInfo<K, V> fi) =>\n      _ensureMapField(meta, fi);\n  void validateField(FieldInfo fi, dynamic newValue) =>\n      _validateField(fi, newValue);\n  void setFieldUnchecked(BuilderInfo meta, FieldInfo fi, dynamic value) =>\n      _setFieldUnchecked(meta, fi, value);\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/field_type.dart",
    "content": "// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// ignore_for_file: constant_identifier_names,non_constant_identifier_names\npart of 'internal.dart';\n\n/// Defines constants and functions for dealing with fieldType bits.\nclass PbFieldType {\n  static bool isRepeated(int fieldType) => (fieldType & REPEATED_BIT) != 0;\n\n  static bool isRequired(int fieldType) => (fieldType & REQUIRED_BIT) != 0;\n\n  static bool isEnum(int fieldType) => baseType(fieldType) == ENUM_BIT;\n\n  static bool isBytes(int fieldType) => baseType(fieldType) == BYTES_BIT;\n\n  static bool isGroupOrMessage(int fieldType) =>\n      (fieldType & (GROUP_BIT | MESSAGE_BIT)) != 0;\n\n  static bool isMapField(int fieldType) => (fieldType & MAP_BIT) != 0;\n\n  /// Returns the base field type without any of the required, repeated\n  /// and packed bits.\n  static int baseType(int fieldType) =>\n      fieldType & ~(REQUIRED_BIT | REPEATED_BIT | PACKED_BIT | MAP_BIT);\n\n  static MakeDefaultFunc? defaultForType(int type) {\n    switch (type) {\n      case OPTIONAL_BOOL:\n      case REQUIRED_BOOL:\n        return BOOL_FALSE;\n      case OPTIONAL_BYTES:\n      case REQUIRED_BYTES:\n        return BYTES_EMPTY;\n      case OPTIONAL_STRING:\n      case REQUIRED_STRING:\n        return STRING_EMPTY;\n      case OPTIONAL_FLOAT:\n      case REQUIRED_FLOAT:\n      case OPTIONAL_DOUBLE:\n      case REQUIRED_DOUBLE:\n        return DOUBLE_ZERO;\n      case OPTIONAL_INT32:\n      case REQUIRED_INT32:\n      case OPTIONAL_INT64:\n      case REQUIRED_INT64:\n      case OPTIONAL_SINT32:\n      case REQUIRED_SINT32:\n      case OPTIONAL_SINT64:\n      case REQUIRED_SINT64:\n      case OPTIONAL_UINT32:\n      case REQUIRED_UINT32:\n      case OPTIONAL_UINT64:\n      case REQUIRED_UINT64:\n      case OPTIONAL_FIXED32:\n      case REQUIRED_FIXED32:\n      case OPTIONAL_FIXED64:\n      case REQUIRED_FIXED64:\n      case OPTIONAL_SFIXED32:\n      case REQUIRED_SFIXED32:\n      case OPTIONAL_SFIXED64:\n      case REQUIRED_SFIXED64:\n        return INT_ZERO;\n      default:\n        return null;\n    }\n  }\n\n  // Closures commonly used by initializers.\n  static String STRING_EMPTY() => '';\n  static List<int> BYTES_EMPTY() => <int>[];\n  static bool BOOL_FALSE() => false;\n  static int INT_ZERO() => 0;\n  static double DOUBLE_ZERO() => 0.0;\n\n  static const int REQUIRED_BIT = 0x1;\n  static const int REPEATED_BIT = 0x2;\n  static const int PACKED_BIT = 0x4;\n\n  static const int BOOL_BIT = 0x10;\n  static const int BYTES_BIT = 0x20;\n  static const int STRING_BIT = 0x40;\n  static const int DOUBLE_BIT = 0x80;\n  static const int FLOAT_BIT = 0x100;\n  static const int ENUM_BIT = 0x200;\n  static const int GROUP_BIT = 0x400;\n  static const int INT32_BIT = 0x800;\n  static const int INT64_BIT = 0x1000;\n  static const int SINT32_BIT = 0x2000;\n  static const int SINT64_BIT = 0x4000;\n  static const int UINT32_BIT = 0x8000;\n  static const int UINT64_BIT = 0x10000;\n  static const int FIXED32_BIT = 0x20000;\n  static const int FIXED64_BIT = 0x40000;\n  static const int SFIXED32_BIT = 0x80000;\n  static const int SFIXED64_BIT = 0x100000;\n  static const int MESSAGE_BIT = 0x200000;\n  static const int MAP_BIT = 0x400000;\n\n  static const int OPTIONAL_BOOL = BOOL_BIT;\n  static const int OPTIONAL_BYTES = BYTES_BIT;\n  static const int OPTIONAL_STRING = STRING_BIT;\n  static const int OPTIONAL_FLOAT = FLOAT_BIT;\n  static const int OPTIONAL_DOUBLE = DOUBLE_BIT;\n  static const int OPTIONAL_ENUM = ENUM_BIT;\n  static const int OPTIONAL_GROUP = GROUP_BIT;\n  static const int OPTIONAL_INT32 = INT32_BIT;\n  static const int OPTIONAL_INT64 = INT64_BIT;\n  static const int OPTIONAL_SINT32 = SINT32_BIT;\n  static const int OPTIONAL_SINT64 = SINT64_BIT;\n  static const int OPTIONAL_UINT32 = UINT32_BIT;\n  static const int OPTIONAL_UINT64 = UINT64_BIT;\n  static const int OPTIONAL_FIXED32 = FIXED32_BIT;\n  static const int OPTIONAL_FIXED64 = FIXED64_BIT;\n  static const int OPTIONAL_SFIXED32 = SFIXED32_BIT;\n  static const int OPTIONAL_SFIXED64 = SFIXED64_BIT;\n  static const int OPTIONAL_MESSAGE = MESSAGE_BIT;\n\n  static const int REQUIRED_BOOL = REQUIRED_BIT | BOOL_BIT;\n  static const int REQUIRED_BYTES = REQUIRED_BIT | BYTES_BIT;\n  static const int REQUIRED_STRING = REQUIRED_BIT | STRING_BIT;\n  static const int REQUIRED_FLOAT = REQUIRED_BIT | FLOAT_BIT;\n  static const int REQUIRED_DOUBLE = REQUIRED_BIT | DOUBLE_BIT;\n  static const int REQUIRED_ENUM = REQUIRED_BIT | ENUM_BIT;\n  static const int REQUIRED_GROUP = REQUIRED_BIT | GROUP_BIT;\n  static const int REQUIRED_INT32 = REQUIRED_BIT | INT32_BIT;\n  static const int REQUIRED_INT64 = REQUIRED_BIT | INT64_BIT;\n  static const int REQUIRED_SINT32 = REQUIRED_BIT | SINT32_BIT;\n  static const int REQUIRED_SINT64 = REQUIRED_BIT | SINT64_BIT;\n  static const int REQUIRED_UINT32 = REQUIRED_BIT | UINT32_BIT;\n  static const int REQUIRED_UINT64 = REQUIRED_BIT | UINT64_BIT;\n  static const int REQUIRED_FIXED32 = REQUIRED_BIT | FIXED32_BIT;\n  static const int REQUIRED_FIXED64 = REQUIRED_BIT | FIXED64_BIT;\n  static const int REQUIRED_SFIXED32 = REQUIRED_BIT | SFIXED32_BIT;\n  static const int REQUIRED_SFIXED64 = REQUIRED_BIT | SFIXED64_BIT;\n  static const int REQUIRED_MESSAGE = REQUIRED_BIT | MESSAGE_BIT;\n\n  static const int REPEATED_BOOL = REPEATED_BIT | BOOL_BIT;\n  static const int REPEATED_BYTES = REPEATED_BIT | BYTES_BIT;\n  static const int REPEATED_STRING = REPEATED_BIT | STRING_BIT;\n  static const int REPEATED_FLOAT = REPEATED_BIT | FLOAT_BIT;\n  static const int REPEATED_DOUBLE = REPEATED_BIT | DOUBLE_BIT;\n  static const int REPEATED_ENUM = REPEATED_BIT | ENUM_BIT;\n  static const int REPEATED_GROUP = REPEATED_BIT | GROUP_BIT;\n  static const int REPEATED_INT32 = REPEATED_BIT | INT32_BIT;\n  static const int REPEATED_INT64 = REPEATED_BIT | INT64_BIT;\n  static const int REPEATED_SINT32 = REPEATED_BIT | SINT32_BIT;\n  static const int REPEATED_SINT64 = REPEATED_BIT | SINT64_BIT;\n  static const int REPEATED_UINT32 = REPEATED_BIT | UINT32_BIT;\n  static const int REPEATED_UINT64 = REPEATED_BIT | UINT64_BIT;\n  static const int REPEATED_FIXED32 = REPEATED_BIT | FIXED32_BIT;\n  static const int REPEATED_FIXED64 = REPEATED_BIT | FIXED64_BIT;\n  static const int REPEATED_SFIXED32 = REPEATED_BIT | SFIXED32_BIT;\n  static const int REPEATED_SFIXED64 = REPEATED_BIT | SFIXED64_BIT;\n  static const int REPEATED_MESSAGE = REPEATED_BIT | MESSAGE_BIT;\n\n  static const int PACKED_BOOL = REPEATED_BIT | PACKED_BIT | BOOL_BIT;\n  static const int PACKED_FLOAT = REPEATED_BIT | PACKED_BIT | FLOAT_BIT;\n  static const int PACKED_DOUBLE = REPEATED_BIT | PACKED_BIT | DOUBLE_BIT;\n  static const int PACKED_ENUM = REPEATED_BIT | PACKED_BIT | ENUM_BIT;\n  static const int PACKED_INT32 = REPEATED_BIT | PACKED_BIT | INT32_BIT;\n  static const int PACKED_INT64 = REPEATED_BIT | PACKED_BIT | INT64_BIT;\n  static const int PACKED_SINT32 = REPEATED_BIT | PACKED_BIT | SINT32_BIT;\n  static const int PACKED_SINT64 = REPEATED_BIT | PACKED_BIT | SINT64_BIT;\n  static const int PACKED_UINT32 = REPEATED_BIT | PACKED_BIT | UINT32_BIT;\n  static const int PACKED_UINT64 = REPEATED_BIT | PACKED_BIT | UINT64_BIT;\n  static const int PACKED_FIXED32 = REPEATED_BIT | PACKED_BIT | FIXED32_BIT;\n  static const int PACKED_FIXED64 = REPEATED_BIT | PACKED_BIT | FIXED64_BIT;\n  static const int PACKED_SFIXED32 = REPEATED_BIT | PACKED_BIT | SFIXED32_BIT;\n  static const int PACKED_SFIXED64 = REPEATED_BIT | PACKED_BIT | SFIXED64_BIT;\n\n  static const int MAP = MAP_BIT | MESSAGE_BIT;\n\n  // Short names for use in generated code.\n\n  // _O_ptional.\n  static const int OB = OPTIONAL_BOOL;\n  static const int OY = OPTIONAL_BYTES;\n  static const int OS = OPTIONAL_STRING;\n  static const int OF = OPTIONAL_FLOAT;\n  static const int OD = OPTIONAL_DOUBLE;\n  static const int OE = OPTIONAL_ENUM;\n  static const int OG = OPTIONAL_GROUP;\n  static const int O3 = OPTIONAL_INT32;\n  static const int O6 = OPTIONAL_INT64;\n  static const int OS3 = OPTIONAL_SINT32;\n  static const int OS6 = OPTIONAL_SINT64;\n  static const int OU3 = OPTIONAL_UINT32;\n  static const int OU6 = OPTIONAL_UINT64;\n  static const int OF3 = OPTIONAL_FIXED32;\n  static const int OF6 = OPTIONAL_FIXED64;\n  static const int OSF3 = OPTIONAL_SFIXED32;\n  static const int OSF6 = OPTIONAL_SFIXED64;\n  static const int OM = OPTIONAL_MESSAGE;\n\n  // re_Q_uired.\n  static const int QB = REQUIRED_BOOL;\n  static const int QY = REQUIRED_BYTES;\n  static const int QS = REQUIRED_STRING;\n  static const int QF = REQUIRED_FLOAT;\n  static const int QD = REQUIRED_DOUBLE;\n  static const int QE = REQUIRED_ENUM;\n  static const int QG = REQUIRED_GROUP;\n  static const int Q3 = REQUIRED_INT32;\n  static const int Q6 = REQUIRED_INT64;\n  static const int QS3 = REQUIRED_SINT32;\n  static const int QS6 = REQUIRED_SINT64;\n  static const int QU3 = REQUIRED_UINT32;\n  static const int QU6 = REQUIRED_UINT64;\n  static const int QF3 = REQUIRED_FIXED32;\n  static const int QF6 = REQUIRED_FIXED64;\n  static const int QSF3 = REQUIRED_SFIXED32;\n  static const int QSF6 = REQUIRED_SFIXED64;\n  static const int QM = REQUIRED_MESSAGE;\n\n  // re_P_eated.\n  static const int PB = REPEATED_BOOL;\n  static const int PY = REPEATED_BYTES;\n  static const int PS = REPEATED_STRING;\n  static const int PF = REPEATED_FLOAT;\n  static const int PD = REPEATED_DOUBLE;\n  static const int PE = REPEATED_ENUM;\n  static const int PG = REPEATED_GROUP;\n  static const int P3 = REPEATED_INT32;\n  static const int P6 = REPEATED_INT64;\n  static const int PS3 = REPEATED_SINT32;\n  static const int PS6 = REPEATED_SINT64;\n  static const int PU3 = REPEATED_UINT32;\n  static const int PU6 = REPEATED_UINT64;\n  static const int PF3 = REPEATED_FIXED32;\n  static const int PF6 = REPEATED_FIXED64;\n  static const int PSF3 = REPEATED_SFIXED32;\n  static const int PSF6 = REPEATED_SFIXED64;\n  static const int PM = REPEATED_MESSAGE;\n\n  // pac_K_ed.\n  static const int KB = PACKED_BOOL;\n  static const int KE = PACKED_ENUM;\n  static const int KF = PACKED_FLOAT;\n  static const int KD = PACKED_DOUBLE;\n  static const int K3 = PACKED_INT32;\n  static const int K6 = PACKED_INT64;\n  static const int KS3 = PACKED_SINT32;\n  static const int KS6 = PACKED_SINT64;\n  static const int KU3 = PACKED_UINT32;\n  static const int KU6 = PACKED_UINT64;\n  static const int KF3 = PACKED_FIXED32;\n  static const int KF6 = PACKED_FIXED64;\n  static const int KSF3 = PACKED_SFIXED32;\n  static const int KSF6 = PACKED_SFIXED64;\n\n  static const int M = MAP;\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/generated_message.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// ignore_for_file: non_constant_identifier_names\n\npart of 'internal.dart';\n\n/// Type of an empty message builder.\ntypedef CreateBuilderFunc = GeneratedMessage Function();\n\n/// Type of a function that creates the default value of a protobuf field.\ntypedef MakeDefaultFunc = Function();\n\n/// Type of a function that makes an enum integer value to corresponding\n/// [ProtobufEnum] value.\ntypedef ValueOfFunc = ProtobufEnum? Function(int value);\n\n/// The base class for all protobuf message types.\n///\n/// The protoc plugin generates subclasses providing type-specific properties\n/// and methods.\n///\n/// Public properties and methods added here should also be added to\n/// `GeneratedMessage_reservedNames` and should be unlikely to be used in a\n/// proto file.\nabstract class GeneratedMessage {\n  // The pragma tells dart2js that the late checks for `__fieldSet` are\n  // unnecessary. The field is always initialized before use, but dart2js can't\n  // see that. One problem is that `this.info_` is called before the\n  // initializing assignment, and potentially one of the many overrides for\n  // `get:info_` could access the field before it is initialized, or call one of\n  // the methods that accesses the field. The code generated for the `get:info_`\n  // methods does not do this, but it is hard to determine from first\n  // principles.\n  @pragma('dart2js:late:trust')\n  late final FieldSet __fieldSet;\n\n  @pragma('dart2js:prefer-inline')\n  FieldSet get _fieldSet => __fieldSet;\n\n  GeneratedMessage() {\n    __fieldSet = FieldSet(this, info_);\n\n    // The following two returns confuse dart2js into avoiding inlining the\n    // constructor *body*. A `@pragma('dart2js:never-inline')` annotation on\n    // the constructor affects inlining of the generative constructor factory,\n    // not the constructor body that is called from all the subclasses.\n    //\n    // TODO(http://dartbug.com/49475): Remove this when there is an annotation\n    // that will give the desired result.\n    return;\n    return; // ignore: dead_code\n  }\n\n  // Overridden by subclasses.\n  BuilderInfo get info_;\n\n  /// Creates a deep copy of the fields in this message.\n  @Deprecated(\n    'Using this can add significant size overhead to your binary. '\n    'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '\n    'Will be removed in next major version',\n  )\n  GeneratedMessage clone();\n\n  /// Creates an empty instance of the same message type as this.\n  ///\n  /// This method is useful when you have a value of type [GeneratedMessage] or\n  /// `T extends GeneratedMessage` and you want a new empty message with the\n  /// same message type as the value. If you know the actual message type, it's\n  /// more direct to use the constructor, and this method creates the same\n  /// message as the message's constructor.\n  GeneratedMessage createEmptyInstance();\n\n  UnknownFieldSet get unknownFields => _fieldSet._ensureUnknownFields();\n\n  /// Make this message read-only.\n  ///\n  /// Marks this message, and any sub-messages, as read-only.\n  GeneratedMessage freeze() {\n    _fieldSet._markReadOnly();\n    return this;\n  }\n\n  /// Returns `true` if this message is marked read-only. Otherwise `false`.\n  ///\n  /// Even when `false`, some sub-message could be read-only.\n  ///\n  /// If `true` all sub-messages are frozen.\n  bool get isFrozen => _fieldSet._isReadOnly;\n\n  /// Creates a writable, shallow copy of this message.\n  ///\n  /// Sub messages will be shared with this message and will still be frozen if\n  /// this message is frozen.\n  ///\n  /// The lists representing repeated fields are copied. But their elements will\n  /// be shared with the corresponding list in `this`.\n  ///\n  /// Similarly for map fields, the maps will be copied, but share the elements.\n  GeneratedMessage toBuilder() {\n    final result = createEmptyInstance();\n    result._fieldSet._shallowCopyValues(_fieldSet);\n    return result;\n  }\n\n  /// Apply [updates] to a copy of this message.\n  ///\n  /// Makes a writable shallow copy of this message, applies the [updates] to\n  /// it, and marks the copy read-only before returning it.\n  @Deprecated(\n    'Using this can add significant size overhead to your binary. '\n    'Use [GeneratedMessageGenericExtensions.rebuild] instead. '\n    'Will be removed in next major version',\n  )\n  GeneratedMessage copyWith(void Function(GeneratedMessage) updates) {\n    final builder = toBuilder();\n    updates(builder);\n    return builder.freeze();\n  }\n\n  /// Whether the message has required fields.\n  ///\n  /// Note that proto3 doesn't have required fields, only proto2 does.\n  bool hasRequiredFields() => info_.hasRequiredFields;\n\n  /// Whether all required fields in the message and embedded messages are set.\n  bool isInitialized() => _fieldSet._hasRequiredValues();\n\n  /// Clears all data that was set in this message.\n  ///\n  /// After calling [clear], [getField] will still return default values for\n  /// unset fields.\n  void clear() => _fieldSet._clear();\n\n  int? getTagNumber(String fieldName) => info_.tagNumber(fieldName);\n\n  @override\n  bool operator ==(Object other) {\n    if (identical(this, other)) return true;\n    return other is GeneratedMessage && _fieldSet._equals(other._fieldSet);\n  }\n\n  /// Calculates a hash code based on the contents of the protobuf.\n  ///\n  /// The hash may change when any field changes (recursively).\n  /// Therefore, protobufs used as map keys shouldn't be changed.\n  @override\n  int get hashCode => _fieldSet._hashCode;\n\n  /// Returns a [String] representation of this message.\n  ///\n  /// This representation is similar to, but not quite, the Protocol Buffer\n  /// TextFormat. Each field is printed on its own line. Sub-messages are\n  /// indented two spaces farther than their parent messages.\n  ///\n  /// Note that this format is absolutely subject to change, and should only\n  /// ever be used for debugging.\n  @override\n  String toString() => toDebugString();\n\n  /// Returns a [String] representation of this message.\n  ///\n  /// This generates the same output as [toString], but can be used by mixins\n  /// to compose debug strings with additional information.\n  String toDebugString() {\n    final out = StringBuffer();\n    _fieldSet.writeString(out, '');\n    return out.toString();\n  }\n\n  /// Throws a [StateError] if the message has required fields without a value.\n  ///\n  /// This library does not check in any of the methods that required fields in\n  /// have values. Use this method if you need to check that required fields\n  /// have values.\n  void check() {\n    if (!isInitialized()) {\n      final invalidFields = <String>[];\n      _fieldSet._appendInvalidFields(invalidFields, '');\n      final missingFields = (invalidFields..sort()).join(', ');\n      throw StateError('Message missing required fields: $missingFields');\n    }\n  }\n\n  /// Serialize the message as the protobuf binary format.\n  ///\n  /// Unknown field data, data for which there is no metadata for the associated\n  /// field, will only be included if this message was deserialized from the\n  /// same wire format.\n  Uint8List writeToBuffer() {\n    final out = CodedBufferWriter();\n    writeToCodedBufferWriter(out);\n    return out.toBuffer();\n  }\n\n  /// Same as [writeToBuffer], but serializes to the given [CodedBufferWriter].\n  void writeToCodedBufferWriter(CodedBufferWriter output) =>\n      _writeToCodedBufferWriter(_fieldSet, output);\n\n  /// Same as [mergeFromBuffer], but takes a [CodedBufferReader] input.\n  void mergeFromCodedBufferReader(\n    CodedBufferReader input, [\n    ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY,\n  ]) {\n    final meta = _fieldSet._meta;\n    _mergeFromCodedBufferReader(meta, _fieldSet, input, extensionRegistry);\n  }\n\n  /// Merges serialized protocol buffer data into this message.\n  ///\n  /// For each field in [input] that is already present in this message:\n  ///\n  /// * If it's a repeated field, this appends to the end of our list.\n  /// * Else, if it's a scalar, this overwrites our field.\n  /// * Else, (it's a non-repeated sub-message), this recursively merges into\n  ///   the existing sub-message.\n  void mergeFromBuffer(\n    List<int> input, [\n    ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY,\n  ]) {\n    final codedInput = CodedBufferReader(input);\n    final meta = _fieldSet._meta;\n    _mergeFromCodedBufferReader(meta, _fieldSet, codedInput, extensionRegistry);\n    codedInput.checkLastTagWas(0);\n  }\n\n  // JSON support.\n\n  /// Returns the JSON encoding of this message as a Dart [Map].\n  ///\n  /// The encoding is described in [GeneratedMessage.writeToJson].\n  ///\n  /// Unknown field data, data for which there is no metadata for the associated\n  /// field, will only be included if this message was deserialized from the\n  /// same wire format.\n  Map<String, dynamic> writeToJsonMap() => json_lib.writeToJsonMap(_fieldSet);\n\n  /// Returns a JSON string that encodes this message.\n  ///\n  /// Each message (top level or nested) is represented as an object delimited\n  /// by curly braces. Within a message, elements are indexed by tag number\n  /// (surrounded by quotes). Repeated elements are represented as arrays.\n  ///\n  /// Boolean values, strings, and floating-point values are represented as\n  /// literals. Values with a 32-bit integer datatype are represented as integer\n  /// literals; values with a 64-bit integer datatype (regardless of their\n  /// actual runtime value) are represented as strings. Enumerated values are\n  /// represented as their integer value.\n  ///\n  /// For the proto3 JSON format use: [toProto3Json].\n  ///\n  /// Unknown field data, data for which there is no metadata for the associated\n  /// field, will only be included if this message was deserialized from the\n  /// same wire format.\n  String writeToJson() => json_lib.writeToJsonString(_fieldSet);\n\n  /// Returns an Object representing Proto3 JSON serialization of `this`.\n  ///\n  /// The key for each field is be the camel-cased name of the field.\n  ///\n  /// Well-known types and their special JSON encoding are supported.\n  /// If a well-known type cannot be encoded (eg. a `google.protobuf.Timestamp`\n  /// with negative `nanoseconds`) an error is thrown.\n  ///\n  /// Extensions and unknown fields are not encoded.\n  ///\n  /// The [typeRegistry] is be used for encoding `Any` messages. If an `Any`\n  /// message encoding a type not in [typeRegistry] is encountered, an\n  /// error is thrown.\n  ///\n  /// Unknown field data, data for which there is no metadata for the associated\n  /// field, will not be included.\n  Object? toProto3Json({\n    TypeRegistry typeRegistry = const TypeRegistry.empty(),\n  }) => _writeToProto3Json(_fieldSet, typeRegistry);\n\n  /// Merges field values from [json], a JSON object using proto3 encoding.\n  ///\n  /// Well-known types and their special JSON encodings are supported.\n  ///\n  /// Throws [FormatException] if [ignoreUnknownFields] is `false` (the\n  /// default) and an unknown field or enum name is encountered. Otherwise the\n  /// unknown field or enum is ignored.\n  ///\n  /// If [supportNamesWithUnderscores] is `true` (the default) field names in\n  /// the JSON can be represented as either camel-case JSON-names or names with\n  /// underscores. Otherwise only the JSON names are supported.\n  ///\n  /// If [permissiveEnums] is `true` (default `false`) enum values in the JSON\n  /// will be matched without case insensitivity and ignoring `-`s and `_`s.\n  /// This allows JSON values like `camelCase` and `kebab-case` to match the\n  /// enum values `CAMEL_CASE` and `KEBAB_CASE`.\n  ///\n  /// In case of ambiguities between the enum values, the first matching value\n  /// will be used.\n  ///\n  /// The [typeRegistry] is used for decoding `Any` messages.\n  ///\n  /// Throws [FormatException] if an `Any` message type is not in\n  /// [typeRegistry].\n  ///\n  /// Throws [FormatException] if the JSON not formatted correctly (a String\n  /// where a number was expected etc.).\n  void mergeFromProto3Json(\n    Object? json, {\n    TypeRegistry typeRegistry = const TypeRegistry.empty(),\n    bool ignoreUnknownFields = false,\n    bool supportNamesWithUnderscores = true,\n    bool permissiveEnums = false,\n  }) => _mergeFromProto3Json(\n    json,\n    _fieldSet,\n    typeRegistry,\n    ignoreUnknownFields,\n    supportNamesWithUnderscores,\n    permissiveEnums,\n  );\n\n  /// Merges field values from [data], a JSON object, encoded as described by\n  /// [GeneratedMessage.writeToJson].\n  ///\n  /// For the proto3 JSON format use: [mergeFromProto3Json].\n  void mergeFromJson(\n    String data, [\n    ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY,\n  ]) {\n    json_lib.mergeFromJsonString(_fieldSet, data, extensionRegistry);\n  }\n\n  /// Merges field values from a JSON object represented as a Dart map.\n  ///\n  /// The encoding is described in [GeneratedMessage.writeToJson].\n  void mergeFromJsonMap(\n    Map<String, dynamic> json, [\n    ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY,\n  ]) {\n    json_lib.mergeFromJsonMap(_fieldSet, json, extensionRegistry);\n  }\n\n  /// Adds an extension field value to a repeated field.\n  ///\n  /// The backing [List] will be created if necessary.\n  /// If the list already exists, the old extension won't be overwritten.\n  void addExtension(Extension extension, Object? value) =>\n      _fieldSet.addExtension(extension, value);\n\n  /// Clears an extension field and also removes the extension.\n  void clearExtension(Extension extension) =>\n      _fieldSet.clearExtension(extension);\n\n  /// Clears the contents of a given field.\n  ///\n  /// If it's an extension field, the Extension will be kept.\n  /// The tagNumber should be a valid tag or extension.\n  void clearField(int tagNumber) => _fieldSet._clearField(tagNumber);\n\n  /// For generated code only.\n  /// @nodoc\n  int $_whichOneof(int oneofIndex) => _fieldSet._oneofCases![oneofIndex] ?? 0;\n\n  bool extensionsAreInitialized() => _fieldSet._hasRequiredExtensionValues();\n\n  /// Returns the value of [extension].\n  ///\n  /// If not set, returns the extension's default value.\n  dynamic getExtension(Extension extension) =>\n      _fieldSet.getExtension(extension);\n\n  /// Returns the value of the field associated with [tagNumber], or the\n  /// default value if it is not set.\n  dynamic getField(int tagNumber) => _fieldSet._getField(tagNumber);\n\n  /// Returns the value of a field, ignoring any defaults.\n  ///\n  /// For unset or cleared fields, returns null.\n  /// Also returns null for unknown tag numbers.\n  dynamic getFieldOrNull(int tagNumber) =>\n      _fieldSet._getFieldOrNullByTag(tagNumber);\n\n  /// Returns the default value for the given field.\n  ///\n  /// For repeated fields, returns an immutable empty list\n  /// (unlike [getField]). For all other fields, returns\n  /// the same thing that getField() would for a cleared field.\n  dynamic getDefaultForField(int tagNumber) =>\n      _fieldSet._ensureInfo(tagNumber).readonlyDefault;\n\n  /// Returns `true` if a value of [extension] is present.\n  bool hasExtension(Extension extension) => _fieldSet.hasExtension(extension);\n\n  /// Whether this message has a field associated with [tagNumber].\n  bool hasField(int tagNumber) => _fieldSet._hasField(tagNumber);\n\n  /// Merges the contents of the [other] into this message.\n  ///\n  /// Singular fields that are set in [other] overwrite the corresponding fields\n  /// in this message. Repeated fields are appended. Singular sub-messages are\n  /// recursively merged.\n  @pragma('dart2js:noInline')\n  void mergeFromMessage(GeneratedMessage other) =>\n      _fieldSet._mergeFromMessage(other._fieldSet);\n\n  void mergeUnknownFields(UnknownFieldSet unknownFieldSet) => _fieldSet\n      ._ensureUnknownFields()\n      .mergeFromUnknownFieldSet(unknownFieldSet);\n\n  /// Sets the value of a non-repeated extension field to [value].\n  void setExtension(Extension extension, Object value) =>\n      _fieldSet.setExtension(extension, value);\n\n  /// Sets the value of a field by its [tagNumber].\n  ///\n  /// Throws an [ArgumentError] if [value] does not match the type associated\n  /// with [tagNumber].\n  ///\n  /// Throws an [ArgumentError] if [value] is `null`.\n  ///\n  /// To clear a field of it's current value, use [clearField] instead.\n  @pragma('dart2js:noInline')\n  void setField(int tagNumber, Object value) {\n    _fieldSet._setField(tagNumber, value);\n  }\n\n  /// For generated code only.\n  /// @nodoc\n  T $_get<T>(int index, T defaultValue) =>\n      _fieldSet._$get<T>(index, defaultValue);\n\n  /// For generated code only.\n  /// @nodoc\n  T $_getN<T>(int index) => _fieldSet._$getND(index);\n\n  /// For generated code only.\n  /// @nodoc\n  T $_ensure<T>(int index) => _fieldSet._$ensure<T>(index);\n\n  /// For generated code only.\n  /// @nodoc\n  PbList<T> $_getList<T>(int index) => _fieldSet._$getList<T>(index);\n\n  /// For generated code only.\n  /// @nodoc\n  PbMap<K, V> $_getMap<K, V>(int index) =>\n      _fieldSet._$getMap<K, V>(this, index);\n\n  /// For generated code only.\n  /// @nodoc\n  bool $_getB(int index, bool defaultValue) =>\n      _fieldSet._$getB(index, defaultValue);\n\n  /// For generated code only.\n  /// @nodoc\n  bool $_getBF(int index) => _fieldSet._$getBF(index);\n\n  /// For generated code only.\n  /// @nodoc\n  int $_getI(int index, int defaultValue) =>\n      _fieldSet._$getI(index, defaultValue);\n\n  /// For generated code only.\n  /// @nodoc\n  int $_getIZ(int index) => _fieldSet._$getIZ(index);\n\n  /// For generated code only.\n  /// @nodoc\n  String $_getS(int index, String defaultValue) =>\n      _fieldSet._$getS(index, defaultValue);\n\n  /// For generated code only.\n  /// @nodoc\n  String $_getSZ(int index) => _fieldSet._$getSZ(index);\n\n  /// For generated code only.\n  /// @nodoc\n  Int64 $_getI64(int index) => _fieldSet._$getI64(index);\n\n  /// For generated code only.\n  /// @nodoc\n  bool $_has(int index) => _fieldSet._$has(index);\n\n  /// For generated code only.\n  /// @nodoc\n  void $_setBool(int index, bool value) => _fieldSet._$set(index, value);\n\n  /// For generated code only.\n  /// @nodoc\n  void $_setBytes(int index, List<int> value) => _fieldSet._$set(index, value);\n\n  /// For generated code only.\n  /// @nodoc\n  void $_setString(int index, String value) => _fieldSet._$set(index, value);\n\n  /// For generated code only.\n  /// @nodoc\n  void $_setFloat(int index, double value) {\n    if (!_isFloat32(value)) {\n      _fieldSet._$check(index, value);\n    }\n    _fieldSet._$set(index, value);\n  }\n\n  /// For generated code only.\n  /// @nodoc\n  void $_setDouble(int index, double value) => _fieldSet._$set(index, value);\n\n  /// For generated code only.\n  /// @nodoc\n  void $_setSignedInt32(int index, int value) {\n    if (!_isSigned32(value)) {\n      _fieldSet._$check(index, value);\n    }\n    _fieldSet._$set(index, value);\n  }\n\n  /// For generated code only.\n  /// @nodoc\n  void $_setUnsignedInt32(int index, int value) {\n    if (!_isUnsigned32(value)) {\n      _fieldSet._$check(index, value);\n    }\n    _fieldSet._$set(index, value);\n  }\n\n  /// For generated code only.\n  /// @nodoc\n  void $_setInt64(int index, Int64 value) => _fieldSet._$set(index, value);\n\n  /// For generated code only. Separate from [setField] to distinguish\n  /// reflective accesses.\n  /// @nodoc\n  void $_setField(int tagNumber, Object value) =>\n      _fieldSet._setField(tagNumber, value);\n\n  /// For generated code only. Separate from [clearField] to distinguish\n  /// reflective accesses.\n  /// @nodoc\n  void $_clearField(int tagNumber) => _fieldSet._clearField(tagNumber);\n\n  // Support for generating a read-only default singleton instance.\n\n  static final Map<Function?, _SingletonMaker<GeneratedMessage>>\n  _defaultMakers = {};\n\n  static T Function() _defaultMakerFor<T extends GeneratedMessage>(\n    T Function()? createFn,\n  ) => _getSingletonMaker(createFn!)._frozenSingletonCreator;\n\n  /// For generated code only.\n  /// @nodoc\n  static T $_defaultFor<T extends GeneratedMessage>(T Function() createFn) =>\n      _getSingletonMaker(createFn)._frozenSingleton;\n\n  static _SingletonMaker<T> _getSingletonMaker<T extends GeneratedMessage>(\n    T Function() fun,\n  ) {\n    final oldMaker = _defaultMakers[fun];\n    if (oldMaker != null) {\n      // The CFE will insert an implicit downcast to `_SingletonMaker<T>`. We\n      // avoid making that explicit because implicit downcasts are avoided by\n      // dart2js in production code.\n      return oldMaker as dynamic;\n    }\n    return _defaultMakers[fun] = _SingletonMaker<T>(fun);\n  }\n}\n\n// We use a class that creates singletones instead of a closure function. We do\n// so because the result of the lookup in [_defaultMakers] has to be downcasted.\n// A downcast to a generic interface type is much easier to perform at runtime\n// than a downcast to a generic function type.\nclass _SingletonMaker<T extends GeneratedMessage> {\n  final T Function() _creator;\n\n  _SingletonMaker(this._creator);\n\n  late final T _frozenSingleton = _creator()..freeze();\n  // ignore: prefer_function_declarations_over_variables\n  late final T Function() _frozenSingletonCreator = () => _frozenSingleton;\n}\n\n/// The package name of a protobuf message.\nclass PackageName {\n  final String name;\n\n  const PackageName(this.name);\n\n  String get prefix => name == '' ? '' : '$name.';\n}\n\n/// Extensions on [GeneratedMessage]s.\nextension GeneratedMessageGenericExtensions<T extends GeneratedMessage> on T {\n  /// Apply [updates] to a copy of this message.\n  ///\n  /// Throws an [ArgumentError] if `this` is not already frozen.\n  ///\n  /// Makes a writable shallow copy of this message, applies the [updates] to\n  /// it, and marks the copy read-only before returning it.\n  @UseResult(\n    '[GeneratedMessageGenericExtensions.rebuild] '\n    'does not update the message, returns a new message',\n  )\n  T rebuild(void Function(T) updates) {\n    if (!isFrozen) {\n      throw ArgumentError('Rebuilding only works on frozen messages.');\n    }\n    final t = toBuilder();\n    updates(t as T);\n    return t..freeze();\n  }\n\n  /// Returns a writable deep copy of this message.\n  @UseResult(\n    '[GeneratedMessageGenericExtensions.deepCopy] '\n    'does not update the message, returns a new message',\n  )\n  T deepCopy() {\n    final newMessage = info_.createEmptyInstance!();\n    newMessage._fieldSet._deepCopyFrom(_fieldSet);\n    return newMessage as T;\n  }\n}\n\nextension GeneratedMessageInternalExtension on GeneratedMessage {\n  FieldSet get fieldSet => _fieldSet;\n}\n\nextension TextFormatExtension on GeneratedMessage {\n  /// Returns a TextFormat [String] representation of this message.\n  ///\n  /// Spec: https://protobuf.dev/reference/protobuf/textformat-spec/\n  String toTextFormat() {\n    final out = StringBuffer();\n    writeTextFormat(out);\n    return out.toString();\n  }\n\n  /// Writes a TextFormat [String] representation of this message to [sink].\n  ///\n  /// Spec: https://protobuf.dev/reference/protobuf/textformat-spec/\n  void writeTextFormat(StringSink sink) {\n    _fieldSet.writeTextFormat(sink);\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/generated_service.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n/// Server side context.\nclass ServerContext {\n  // TODO: Place server specific information in this class.\n}\n\n/// The implementation of a Service API.\n///\n/// The protoc plugin generates subclasses (with names ending with ServiceBase)\n/// that extend GeneratedService and dispatch requests by method.\nabstract class GeneratedService {\n  /// Creates a message object that can deserialize a request.\n  GeneratedMessage createRequest(String methodName);\n\n  /// Dispatches the call. The request object should come from [createRequest].\n  Future<GeneratedMessage> handleCall(\n    ServerContext ctx,\n    String methodName,\n    GeneratedMessage request,\n  );\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/internal.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n/// Runtime library for Dart implementation of [protobufs][1].\n///\n/// [1]: https://developers.google.com/protocol-buffers\nlibrary;\n\nimport 'dart:convert' show Utf8Decoder, Utf8Encoder, base64Decode, base64Encode;\nimport 'dart:math' as math;\nimport 'dart:typed_data' show ByteData, Endian, Uint8List;\n\nimport 'package:collection/collection.dart' show DeepCollectionEquality;\nimport 'package:fixnum/fixnum.dart' show Int64;\nimport 'package:meta/meta.dart' show UseResult;\n\nimport 'consts.dart';\nimport 'exceptions.dart';\nimport 'json/json.dart' as json_lib;\nimport 'json_parsing_context.dart';\nimport 'mixins/well_known.dart';\nimport 'pb_list.dart';\nimport 'pb_map.dart';\nimport 'permissive_compare.dart';\nimport 'type_registry.dart';\nimport 'utils.dart';\n\nexport 'annotations.dart' show TagNumber, GrpcServiceName;\nexport 'exceptions.dart' show InvalidProtocolBufferException;\nexport 'pb_list.dart' show PbList;\nexport 'pb_map.dart' show PbMap;\nexport 'type_registry.dart' show TypeRegistry;\n\npart 'builder_info.dart';\npart 'coded_buffer.dart';\npart 'coded_buffer_reader.dart';\npart 'coded_buffer_writer.dart';\npart 'extension.dart';\npart 'extension_field_set.dart';\npart 'extension_registry.dart';\npart 'field_error.dart';\npart 'field_info.dart';\npart 'field_set.dart';\npart 'field_type.dart';\npart 'generated_message.dart';\npart 'generated_service.dart';\npart 'message_set.dart';\npart 'proto3_json.dart';\npart 'protobuf_enum.dart';\npart 'rpc_client.dart';\npart 'unknown_field_set.dart';\npart 'unpack.dart';\npart 'wire_format.dart';\n\n// TODO(sra): Use `Int64.parse()` when available:\n// https://github.com/dart-lang/fixnum/issues/18.\n/// @nodoc\nInt64 parseLongInt(String text) {\n  if (text.startsWith('0x')) return Int64.parseHex(text.substring(2));\n  if (text.startsWith('+0x')) return Int64.parseHex(text.substring(3));\n  if (text.startsWith('-0x')) return -Int64.parseHex(text.substring(3));\n  return Int64.parseInt(text);\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/json/json.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert' show base64Decode, base64Encode;\n\nimport 'package:fixnum/fixnum.dart' show Int64;\n\nimport '../consts.dart';\nimport '../internal.dart';\nimport '../pb_map.dart';\nimport '../utils.dart';\n\n// Use json_vm.dart with VM and dart2wasm, json_web.dart with dart2js.\n// json_web.dart uses JS interop for parsing, and JS interop is too slow on\n// Wasm. VM's patch performs better in Wasm.\nexport 'json_vm.dart' if (dart.library.html) 'json_web.dart';\n\nMap<String, dynamic> writeToJsonMap(FieldSet fs) {\n  dynamic convertToMap(dynamic fieldValue, int fieldType) {\n    final baseType = PbFieldType.baseType(fieldType);\n\n    if (PbFieldType.isRepeated(fieldType)) {\n      final PbList list = fieldValue;\n      return List.from(list.map((e) => convertToMap(e, baseType)));\n    }\n\n    switch (baseType) {\n      case PbFieldType.BOOL_BIT:\n      case PbFieldType.STRING_BIT:\n      case PbFieldType.INT32_BIT:\n      case PbFieldType.SINT32_BIT:\n      case PbFieldType.UINT32_BIT:\n      case PbFieldType.FIXED32_BIT:\n      case PbFieldType.SFIXED32_BIT:\n        return fieldValue;\n      case PbFieldType.FLOAT_BIT:\n      case PbFieldType.DOUBLE_BIT:\n        final value = fieldValue as double;\n        if (value.isNaN) {\n          return nan;\n        }\n        if (value.isInfinite) {\n          return value.isNegative ? negativeInfinity : infinity;\n        }\n        if (fieldValue.toInt() == fieldValue) {\n          return fieldValue.toInt();\n        }\n        return value;\n      case PbFieldType.BYTES_BIT:\n        // Encode 'bytes' as a base64-encoded string.\n        return base64Encode(fieldValue as List<int>);\n      case PbFieldType.ENUM_BIT:\n        final ProtobufEnum enum_ = fieldValue;\n        return enum_.value; // assume |value| < 2^52\n      case PbFieldType.INT64_BIT:\n      case PbFieldType.SINT64_BIT:\n      case PbFieldType.SFIXED64_BIT:\n        return fieldValue.toString();\n      case PbFieldType.UINT64_BIT:\n      case PbFieldType.FIXED64_BIT:\n        final Int64 int_ = fieldValue;\n        return int_.toStringUnsigned();\n      case PbFieldType.GROUP_BIT:\n      case PbFieldType.MESSAGE_BIT:\n        final GeneratedMessage msg = fieldValue;\n        return msg.writeToJsonMap();\n      default:\n        throw UnsupportedError('Unknown type $fieldType');\n    }\n  }\n\n  List writeMap(PbMap fieldValue, MapFieldInfo fi) => List.from(\n    fieldValue.entries.map(\n      (MapEntry e) => {\n        '$mapKeyFieldNumber': convertToMap(e.key, fi.keyFieldType),\n        '$mapValueFieldNumber': convertToMap(e.value, fi.valueFieldType),\n      },\n    ),\n  );\n\n  final result = <String, dynamic>{};\n  for (final fi in fs.infosSortedByTag) {\n    final value = fs.values[fi.index!];\n    if (value == null || (value is List && value.isEmpty)) {\n      continue; // It's missing, repeated, or an empty byte array.\n    }\n    if (PbFieldType.isMapField(fi.type)) {\n      result['${fi.tagNumber}'] = writeMap(\n        value,\n        fi as MapFieldInfo<dynamic, dynamic>,\n      );\n      continue;\n    }\n    result['${fi.tagNumber}'] = convertToMap(value, fi.type);\n  }\n  final extensions = fs.extensions;\n  if (extensions != null) {\n    for (final tagNumber in sorted(extensions.tagNumbers)) {\n      final value = extensions.values[tagNumber];\n      if (value is List && value.isEmpty) {\n        continue; // It's repeated or an empty byte array.\n      }\n      final fi = extensions.getInfoOrNull(tagNumber)!;\n      result['$tagNumber'] = convertToMap(value, fi.type);\n    }\n  }\n  final unknownJsonData = fs.unknownJsonData;\n  if (unknownJsonData != null) {\n    unknownJsonData.forEach((key, value) {\n      result[key] = value;\n    });\n  }\n  return result;\n}\n\n// Merge fields from a previously decoded JSON object.\n// (Called recursively on nested messages.)\nvoid mergeFromJsonMap(\n  FieldSet fs,\n  Map<String, dynamic> json,\n  ExtensionRegistry? registry,\n) {\n  fs.ensureWritable();\n  final keys = json.keys;\n  final meta = fs.meta;\n  for (final key in keys) {\n    var fi = meta.byTagAsString[key];\n    if (fi == null) {\n      fi = registry?.getExtension(fs.messageName, int.parse(key));\n      if (fi == null) {\n        (fs.unknownJsonData ??= {})[key] = json[key];\n        continue;\n      }\n    }\n    if (fi.isMapField) {\n      _appendJsonMap(\n        meta,\n        fs,\n        json[key],\n        fi as MapFieldInfo<dynamic, dynamic>,\n        registry,\n      );\n    } else if (fi.isRepeated) {\n      _appendJsonList(meta, fs, json[key], fi, registry);\n    } else {\n      _setJsonField(meta, fs, json[key], fi, registry);\n    }\n  }\n}\n\nvoid _appendJsonList(\n  BuilderInfo meta,\n  FieldSet fs,\n  List jsonList,\n  FieldInfo fi,\n  ExtensionRegistry? registry,\n) {\n  final repeated = fi.ensureRepeatedField(meta, fs);\n  // Micro optimization. Using \"for in\" generates the following and iterator\n  // alloc:\n  //   for (t1 = J.get$iterator$ax(json), t2 = fi.tagNumber, t3 = fi.type,\n  //       t4 = J.getInterceptor$ax(repeated); t1.moveNext$0();)\n  for (var i = 0, len = jsonList.length; i < len; i++) {\n    final value = jsonList[i];\n    var convertedValue = _convertJsonValue(\n      meta,\n      fs,\n      value,\n      fi.tagNumber,\n      fi.type,\n      registry,\n    );\n    // In the case of an unknown enum value, the converted value may return\n    // null. The default enum value should be used in these cases, which is\n    // stored in the FieldInfo.\n    convertedValue ??= fi.defaultEnumValue;\n    repeated.add(convertedValue);\n  }\n}\n\nvoid _appendJsonMap(\n  BuilderInfo meta,\n  FieldSet fs,\n  List jsonList,\n  MapFieldInfo fi,\n  ExtensionRegistry? registry,\n) {\n  final entryMeta = fi.mapEntryBuilderInfo;\n  final map = fi.ensureMapField(meta, fs);\n  for (final jsonEntryDynamic in jsonList) {\n    final jsonEntry = jsonEntryDynamic as Map<String, dynamic>;\n    final entryFieldSet = FieldSet(null, entryMeta);\n    final convertedKey = _convertJsonValue(\n      entryMeta,\n      entryFieldSet,\n      jsonEntry['$mapKeyFieldNumber'],\n      mapKeyFieldNumber,\n      fi.keyFieldType,\n      registry,\n    );\n    var convertedValue = _convertJsonValue(\n      entryMeta,\n      entryFieldSet,\n      jsonEntry['$mapValueFieldNumber'],\n      mapValueFieldNumber,\n      fi.valueFieldType,\n      registry,\n    );\n    // In the case of an unknown enum value, the converted value may return\n    // null. The default enum value should be used in these cases, which is\n    // stored in the FieldInfo.\n    convertedValue ??= fi.defaultEnumValue;\n    map[convertedKey] = convertedValue;\n  }\n}\n\nvoid _setJsonField(\n  BuilderInfo meta,\n  FieldSet fs,\n  json,\n  FieldInfo fi,\n  ExtensionRegistry? registry,\n) {\n  final value = _convertJsonValue(\n    meta,\n    fs,\n    json,\n    fi.tagNumber,\n    fi.type,\n    registry,\n  );\n  if (value == null) return;\n  // _convertJsonValue throws exception when it fails to do conversion.\n  // Therefore we run _validateField for debug builds only to validate\n  // correctness of conversion.\n  assert(() {\n    fs.validateField(fi, value);\n    return true;\n  }());\n  fs.setFieldUnchecked(meta, fi, value);\n}\n\n/// Converts [value] from the JSON format to the Dart data type suitable for\n/// inserting into the corresponding [GeneratedMessage] field.\n///\n/// Returns the converted value. Returns `null` if it is an unknown enum value,\n/// in which case the caller should figure out the default enum value to return\n/// instead.\n///\n/// Throws [ArgumentError] if it cannot convert the value.\ndynamic _convertJsonValue(\n  BuilderInfo meta,\n  FieldSet fs,\n  value,\n  int tagNumber,\n  int fieldType,\n  ExtensionRegistry? registry,\n) {\n  String expectedType; // for exception message\n  switch (PbFieldType.baseType(fieldType)) {\n    case PbFieldType.BOOL_BIT:\n      if (value is bool) {\n        return value;\n      } else if (value is String) {\n        if (value == 'true') {\n          return true;\n        } else if (value == 'false') {\n          return false;\n        }\n      } else if (value is num) {\n        if (value == 1) {\n          return true;\n        } else if (value == 0) {\n          return false;\n        }\n      }\n      expectedType = 'bool (true, false, \"true\", \"false\", 1, 0)';\n    case PbFieldType.BYTES_BIT:\n      if (value is String) {\n        return base64Decode(value);\n      }\n      expectedType = 'Base64 String';\n    case PbFieldType.STRING_BIT:\n      if (value is String) {\n        return value;\n      }\n      expectedType = 'String';\n    case PbFieldType.FLOAT_BIT:\n    case PbFieldType.DOUBLE_BIT:\n      // Allow quoted values, although we don't emit them.\n      if (value is double) {\n        return value;\n      } else if (value is num) {\n        return value.toDouble();\n      } else if (value is String) {\n        return double.parse(value);\n      }\n      expectedType = 'num or stringified num';\n    case PbFieldType.ENUM_BIT:\n      // Allow quoted values, although we don't emit them.\n      if (value is String) {\n        value = int.parse(value);\n      }\n      if (value is int) {\n        // The following call will return null if the enum value is unknown.\n        // In that case, we want the caller to ignore this value, so we return\n        // null from this method as well.\n        return meta.decodeEnum(tagNumber, registry, value);\n      }\n      expectedType = 'int or stringified int';\n    case PbFieldType.INT32_BIT:\n    case PbFieldType.SINT32_BIT:\n    case PbFieldType.SFIXED32_BIT:\n      if (value is int) return value;\n      if (value is String) return int.parse(value);\n      expectedType = 'int or stringified int';\n    case PbFieldType.UINT32_BIT:\n    case PbFieldType.FIXED32_BIT:\n      int? validatedValue;\n      if (value is int) validatedValue = value;\n      if (value is String) validatedValue = int.parse(value);\n      if (validatedValue != null && validatedValue < 0) {\n        validatedValue += 2 * (1 << 31);\n      }\n      if (validatedValue != null) return validatedValue;\n      expectedType = 'int or stringified int';\n    case PbFieldType.INT64_BIT:\n    case PbFieldType.SINT64_BIT:\n    case PbFieldType.UINT64_BIT:\n    case PbFieldType.FIXED64_BIT:\n    case PbFieldType.SFIXED64_BIT:\n      if (value is int) return Int64(value);\n      if (value is String) return Int64.parseInt(value);\n      expectedType = 'int or stringified int';\n    case PbFieldType.GROUP_BIT:\n    case PbFieldType.MESSAGE_BIT:\n      if (value is Map) {\n        final messageValue = value as Map<String, dynamic>;\n        final subMessage = meta.makeEmptyMessage(tagNumber, registry);\n        mergeFromJsonMap(subMessage.fieldSet, messageValue, registry);\n        return subMessage;\n      }\n      expectedType = 'nested message or group';\n    default:\n      throw ArgumentError('Unknown type $fieldType');\n  }\n  throw ArgumentError('Expected type $expectedType, got $value');\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/json/json_vm.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert' show jsonDecode, jsonEncode;\n\nimport '../internal.dart';\nimport 'json.dart';\n\nString writeToJsonString(FieldSet fs) => jsonEncode(writeToJsonMap(fs));\n\n/// Merge fields from a [json] string.\nvoid mergeFromJsonString(\n  FieldSet fs,\n  String json,\n  ExtensionRegistry? registry,\n) {\n  final jsonMap = jsonDecode(json);\n  if (jsonMap is! Map<String, dynamic>) {\n    throw ArgumentError.value(json, 'json', 'Does not parse to a JSON object.');\n  }\n  mergeFromJsonMap(fs, jsonMap, registry);\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/json/json_web.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert' show base64Decode, base64Encode;\nimport 'dart:js_interop';\nimport 'dart:js_interop_unsafe';\n\nimport 'package:fixnum/fixnum.dart' show Int64;\n\nimport '../consts.dart';\nimport '../internal.dart';\nimport '../pb_map.dart';\nimport '../utils.dart';\n\n@JS('JSON')\nextension type _JSON._(JSObject _) implements JSObject {\n  @JS('stringify')\n  external static JSString _stringify(JSObject value);\n\n  @JS('parse')\n  external static JSAny? _parse(JSString text);\n}\n\n@JS('Number')\nextension type _Number._(JSObject _) implements JSObject {\n  @JS('isInteger')\n  external static bool _isInteger(JSAny value);\n}\n\n@JS('Object.keys')\nexternal JSArray<JSString> _objectKeys(JSObject obj);\n\n@JS('Object.prototype')\nexternal JSObject get _objectPrototype;\n\n@JS('Object.getPrototypeOf')\nexternal JSObject _getPrototypeOf(JSAny obj);\n\nextension on JSAny {\n  /// Returns this typed as [T] while omitting the `as` cast. For use after an\n  /// `isA` check.\n  @pragma('dart2js:as:trust')\n  @pragma('dart2js:prefer-inline')\n  T _as<T extends JSAny>() => this as T;\n}\n\nString writeToJsonString(FieldSet fs) {\n  final rawJs = _writeToRawJs(fs);\n  return _JSON._stringify(rawJs).toDart;\n}\n\nJSObject _writeToRawJs(FieldSet fs) {\n  JSAny convertToRawJs(dynamic fieldValue, int fieldType) {\n    final baseType = PbFieldType.baseType(fieldType);\n\n    if (PbFieldType.isRepeated(fieldType)) {\n      final PbList list = fieldValue;\n      final length = list.length;\n      final jsArray = JSArray.withLength(length);\n      for (var i = 0; i < length; i++) {\n        final entry = list[i];\n        jsArray[i] = convertToRawJs(entry, baseType);\n      }\n      return jsArray;\n    }\n\n    switch (baseType) {\n      case PbFieldType.INT32_BIT:\n      case PbFieldType.SINT32_BIT:\n      case PbFieldType.UINT32_BIT:\n      case PbFieldType.FIXED32_BIT:\n      case PbFieldType.SFIXED32_BIT:\n        final int value = fieldValue;\n        return value.toJS;\n\n      case PbFieldType.BOOL_BIT:\n        final bool value = fieldValue;\n        return value.toJS;\n\n      case PbFieldType.STRING_BIT:\n        final String value = fieldValue;\n        return value.toJS;\n\n      case PbFieldType.FLOAT_BIT:\n      case PbFieldType.DOUBLE_BIT:\n        final double value = fieldValue;\n        if (value.isNaN) {\n          return nan.toJS;\n        }\n        if (value.isInfinite) {\n          return value.isNegative ? negativeInfinity.toJS : infinity.toJS;\n        }\n        if (value.toInt() == value) {\n          return value.toInt().toJS;\n        }\n        return value.toJS;\n\n      case PbFieldType.BYTES_BIT:\n        // Encode 'bytes' as a base64-encoded string.\n        final List<int> value = fieldValue;\n        return base64Encode(value).toJS;\n\n      case PbFieldType.ENUM_BIT:\n        final ProtobufEnum enum_ = fieldValue;\n        return enum_.value.toJS; // assume |value| < 2^52\n\n      case PbFieldType.INT64_BIT:\n      case PbFieldType.SINT64_BIT:\n      case PbFieldType.SFIXED64_BIT:\n        final Int64 int_ = fieldValue;\n        return int_.toString().toJS;\n\n      case PbFieldType.UINT64_BIT:\n      case PbFieldType.FIXED64_BIT:\n        final Int64 int_ = fieldValue;\n        return int_.toStringUnsigned().toJS;\n\n      case PbFieldType.GROUP_BIT:\n      case PbFieldType.MESSAGE_BIT:\n        final GeneratedMessage msg = fieldValue;\n        return _writeToRawJs(msg.fieldSet);\n\n      default:\n        throw UnsupportedError('Unknown type $fieldType');\n    }\n  }\n\n  JSArray writeMap(PbMap fieldValue, MapFieldInfo fi) {\n    final length = fieldValue.entries.length;\n    final jsArray = JSArray.withLength(length);\n    var index = 0;\n    for (final entry in fieldValue.entries) {\n      final entryJsObj = JSObject();\n      entryJsObj.setProperty(\n        mapKeyFieldNumber.toJS,\n        convertToRawJs(entry.key, fi.keyFieldType),\n      );\n      entryJsObj.setProperty(\n        mapValueFieldNumber.toJS,\n        convertToRawJs(entry.value, fi.valueFieldType),\n      );\n      jsArray[index] = entryJsObj;\n      index++;\n    }\n    return jsArray;\n  }\n\n  final result = JSObject();\n  for (final fi in fs.infosSortedByTag) {\n    final value = fs.values[fi.index!];\n    if (value == null || (value is List && value.isEmpty)) {\n      continue; // It's missing, repeated, or an empty byte array.\n    }\n    if (PbFieldType.isMapField(fi.type)) {\n      result.setProperty(\n        fi.tagNumber.toJS,\n        writeMap(value, fi as MapFieldInfo<dynamic, dynamic>),\n      );\n      continue;\n    }\n    result.setProperty(fi.tagNumber.toJS, convertToRawJs(value, fi.type));\n  }\n  final extensions = fs.extensions;\n  if (extensions != null) {\n    for (final tagNumber in sorted(extensions.tagNumbers)) {\n      final value = extensions.values[tagNumber];\n      if (value is List && value.isEmpty) {\n        continue; // It's repeated or an empty byte array.\n      }\n      final fi = extensions.getInfoOrNull(tagNumber)!;\n      result.setProperty(tagNumber.toJS, convertToRawJs(value, fi.type));\n    }\n  }\n  final unknownJsonData = fs.unknownJsonData;\n  if (unknownJsonData != null) {\n    unknownJsonData.forEach((String key, Object? value) {\n      result.setProperty(key.toJS, value.jsify());\n    });\n  }\n  return result;\n}\n\n/// Merge fields from a [json] string.\nvoid mergeFromJsonString(\n  FieldSet fs,\n  String json,\n  ExtensionRegistry? registry,\n) {\n  final JSAny? parsed;\n  try {\n    parsed = _JSON._parse(json.toJS);\n  } catch (e) {\n    throw FormatException(e.toString());\n  }\n  if (parsed == null || !parsed.isA<JSObject>()) {\n    throw ArgumentError.value(json, 'json', 'Does not parse to a JSON object.');\n  }\n  _mergeFromRawJsMap(fs, parsed._as<JSObject>(), registry);\n}\n\nvoid _mergeFromRawJsMap(\n  FieldSet fs,\n  JSObject json,\n  ExtensionRegistry? registry,\n) {\n  fs.ensureWritable();\n\n  final meta = fs.meta;\n  final keys = _objectKeys(json);\n  final length = keys.length;\n  for (var i = 0; i < length; i++) {\n    final jsKey = keys[i];\n    final key = jsKey.toDart;\n    var fi = meta.byTagAsString[key];\n    if (fi == null) {\n      fi = registry?.getExtension(fs.messageName, int.parse(key));\n      if (fi == null) {\n        (fs.unknownJsonData ??= {})[key] =\n            json.getProperty<JSAny>(jsKey).dartify();\n        continue;\n      }\n    }\n    if (fi.isMapField) {\n      _appendRawJsMap(\n        meta,\n        fs,\n        json.getProperty<JSArray<JSObject>>(jsKey),\n        fi as MapFieldInfo<dynamic, dynamic>,\n        registry,\n      );\n    } else if (fi.isRepeated) {\n      _appendRawJsList(\n        meta,\n        fs,\n        json.getProperty<JSArray<JSAny>>(jsKey),\n        fi,\n        registry,\n      );\n    } else {\n      _setRawJsField(meta, fs, json.getProperty<JSAny>(jsKey), fi, registry);\n    }\n  }\n}\n\nvoid _appendRawJsList(\n  BuilderInfo meta,\n  FieldSet fs,\n  JSArray<JSAny> jsonList,\n  FieldInfo fi,\n  ExtensionRegistry? registry,\n) {\n  final repeated = fi.ensureRepeatedField(meta, fs);\n  // Micro optimization. Using \"for in\" generates the following and iterator\n  // alloc:\n  //   for (t1 = J.get$iterator$ax(json), t2 = fi.tagNumber, t3 = fi.type,\n  //       t4 = J.getInterceptor$ax(repeated); t1.moveNext$0();)\n  final length = jsonList.length;\n  for (var i = 0; i < length; i++) {\n    final value = jsonList[i];\n    var convertedValue = _convertRawJsValue(\n      meta,\n      fs,\n      value,\n      fi.tagNumber,\n      fi.type,\n      registry,\n    );\n    // In the case of an unknown enum value, the converted value may return\n    // null. The default enum value should be used in these cases, which is\n    // stored in the FieldInfo.\n    convertedValue ??= fi.defaultEnumValue;\n    repeated.add(convertedValue);\n  }\n}\n\nvoid _appendRawJsMap(\n  BuilderInfo meta,\n  FieldSet fs,\n  JSArray<JSObject> jsonList,\n  MapFieldInfo fi,\n  ExtensionRegistry? registry,\n) {\n  final entryMeta = fi.mapEntryBuilderInfo;\n  final map = fi.ensureMapField(meta, fs);\n  final length = jsonList.length;\n\n  for (var i = 0; i < length; i++) {\n    final value = jsonList[i];\n    final entryFieldSet = FieldSet(null, entryMeta);\n\n    final convertedKey = _convertRawJsValue(\n      entryMeta,\n      entryFieldSet,\n      value.getProperty<JSAny>(mapKeyFieldNumber.toJS),\n      mapKeyFieldNumber,\n      fi.keyFieldType,\n      registry,\n    );\n    var convertedValue = _convertRawJsValue(\n      entryMeta,\n      entryFieldSet,\n      value.getProperty<JSAny>(mapValueFieldNumber.toJS),\n      mapValueFieldNumber,\n      fi.valueFieldType,\n      registry,\n    );\n    // In the case of an unknown enum value, the converted value may return\n    // null. The default enum value should be used in these cases, which is\n    // stored in the FieldInfo.\n    convertedValue ??= fi.defaultEnumValue;\n    map[convertedKey] = convertedValue;\n  }\n}\n\nvoid _setRawJsField(\n  BuilderInfo meta,\n  FieldSet fs,\n  JSAny json,\n  FieldInfo fi,\n  ExtensionRegistry? registry,\n) {\n  final value = _convertRawJsValue(\n    meta,\n    fs,\n    json,\n    fi.tagNumber,\n    fi.type,\n    registry,\n  );\n  if (value == null) return;\n  // _convertRawJsValue throws exception when it fails to do conversion.\n  // Therefore we run _validateField for debug builds only to validate\n  // correctness of conversion.\n  assert(() {\n    fs.validateField(fi, value);\n    return true;\n  }());\n  fs.setFieldUnchecked(meta, fi, value);\n}\n\n/// Converts [value] from the JSON format to the Dart data type suitable for\n/// inserting into the corresponding [GeneratedMessage] field.\n///\n/// Returns the converted value. Returns `null` if it is an unknown enum value,\n/// in which case the caller should figure out the default enum value to return\n/// instead.\n///\n/// Throws [ArgumentError] if it cannot convert the value.\nObject? _convertRawJsValue(\n  BuilderInfo meta,\n  FieldSet fs,\n  JSAny value,\n  int tagNumber,\n  int fieldType,\n  ExtensionRegistry? registry,\n) {\n  String expectedType; // for exception message\n  switch (PbFieldType.baseType(fieldType)) {\n    case PbFieldType.BOOL_BIT:\n      if (value.isA<JSBoolean>()) {\n        return value._as<JSBoolean>().toDart;\n      } else if (value.isA<JSString>()) {\n        final dartStr = value._as<JSString>().toDart;\n        if (dartStr == 'true') {\n          return true;\n        } else if (dartStr == 'false') {\n          return false;\n        }\n      } else if (value.isA<JSNumber>()) {\n        final dartNum = value._as<JSNumber>().toDartDouble;\n        if (dartNum == 1) {\n          return true;\n        } else if (dartNum == 0) {\n          return false;\n        }\n      }\n      expectedType = 'bool (true, false, \"true\", \"false\", 1, 0)';\n    case PbFieldType.BYTES_BIT:\n      if (value.isA<JSString>()) {\n        return base64Decode(value._as<JSString>().toDart);\n      }\n      expectedType = 'Base64 String';\n    case PbFieldType.STRING_BIT:\n      if (value.isA<JSString>()) {\n        return value._as<JSString>().toDart;\n      }\n      expectedType = 'String';\n    case PbFieldType.FLOAT_BIT:\n    case PbFieldType.DOUBLE_BIT:\n      // Allow quoted values, although we don't emit them.\n      if (value.isA<JSNumber>()) {\n        final jsNum = value._as<JSNumber>();\n        return jsNum.toDartDouble;\n      } else if (value.isA<JSString>()) {\n        return double.parse(value._as<JSString>().toDart);\n      }\n      expectedType = 'num or stringified num';\n    case PbFieldType.ENUM_BIT:\n      // Allow quoted values, although we don't emit them.\n      if (value.isA<JSString>()) {\n        value = int.parse(value._as<JSString>().toDart).toJS;\n      }\n      if (_Number._isInteger(value)) {\n        // The following call will return null if the enum value is unknown.\n        // In that case, we want the caller to ignore this value, so we return\n        // null from this method as well.\n        return meta.decodeEnum(\n          tagNumber,\n          registry,\n          value._as<JSNumber>().toDartInt,\n        );\n      }\n      expectedType = 'int or stringified int';\n    case PbFieldType.INT32_BIT:\n    case PbFieldType.SINT32_BIT:\n    case PbFieldType.SFIXED32_BIT:\n      if (_Number._isInteger(value)) {\n        return value._as<JSNumber>().toDartInt;\n      }\n      if (value.isA<JSString>()) {\n        return int.parse(value._as<JSString>().toDart);\n      }\n      expectedType = 'int or stringified int';\n    case PbFieldType.UINT32_BIT:\n    case PbFieldType.FIXED32_BIT:\n      int? validatedValue;\n      if (_Number._isInteger(value)) {\n        validatedValue = value._as<JSNumber>().toDartInt;\n      }\n      if (value.isA<JSString>()) {\n        validatedValue = int.parse(value._as<JSString>().toDart);\n      }\n      if (validatedValue != null && validatedValue < 0) {\n        validatedValue += 2 * (1 << 31);\n      }\n      if (validatedValue != null) return validatedValue;\n      expectedType = 'int or stringified int';\n    case PbFieldType.INT64_BIT:\n    case PbFieldType.SINT64_BIT:\n    case PbFieldType.UINT64_BIT:\n    case PbFieldType.FIXED64_BIT:\n    case PbFieldType.SFIXED64_BIT:\n      if (_Number._isInteger(value)) {\n        return Int64(value._as<JSNumber>().toDartInt);\n      }\n      if (value.isA<JSString>()) {\n        return Int64.parseInt(value._as<JSString>().toDart);\n      }\n      expectedType = 'int or stringified int';\n    case PbFieldType.GROUP_BIT:\n    case PbFieldType.MESSAGE_BIT:\n      if (_getPrototypeOf(value).strictEquals(_objectPrototype).toDart) {\n        final subMessage = meta.makeEmptyMessage(tagNumber, registry);\n        _mergeFromRawJsMap(\n          subMessage.fieldSet,\n          value._as<JSObject>(),\n          registry,\n        );\n        return subMessage;\n      }\n      expectedType = 'nested message or group';\n    default:\n      throw ArgumentError(\n        'Unknown type $fieldType when decoding a '\n        '${meta.qualifiedMessageName} message field with tag $tagNumber.',\n      );\n  }\n  throw ArgumentError(\n    'Expected type $expectedType, got $value when decoding a '\n    '${meta.qualifiedMessageName} message field with tag $tagNumber.',\n  );\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/json_parsing_context.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nclass JsonParsingContext {\n  // A list of indices into maps and lists pointing to the current root.\n  final List<String> _path = <String>[];\n  final bool ignoreUnknownFields;\n  final bool supportNamesWithUnderscores;\n  final bool permissiveEnums;\n\n  JsonParsingContext(\n    this.ignoreUnknownFields,\n    this.supportNamesWithUnderscores,\n    this.permissiveEnums,\n  );\n\n  void addMapIndex(String index) {\n    _path.add(index);\n  }\n\n  void addListIndex(int index) {\n    _path.add(index.toString());\n  }\n\n  void popIndex() {\n    _path.removeLast();\n  }\n\n  /// Creates a [FormatException] indicating the indices to the current path.\n  Exception parseException(String message, Object? source) {\n    final formattedPath = _path.map((s) => '[\"$s\"]').join();\n    return FormatException(\n      'Protobuf JSON decoding failed at: root$formattedPath. $message',\n      source,\n    );\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/message_set.dart",
    "content": "// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\nconst _messageSetItemsTag = 1;\nconst _messageSetItemTypeIdTag = 2;\nconst _messageSetItemMessageTag = 3;\n\n/// Overrides binary serialization and deserialization methods to implement the\n/// message set binary format.\n///\n/// Message set format is very old and only used in Google. When a message has\n/// this option:\n///\n/// ```\n/// option message_set_wire_format = true;\n/// ```\n///\n/// The plugin extends the generated message class with this class instead of\n/// [GeneratedMessage].\n///\n/// @nodoc\nabstract class $_MessageSet extends GeneratedMessage {\n  @override\n  void writeToCodedBufferWriter(CodedBufferWriter output) {\n    final extensions = _fieldSet._ensureExtensions();\n\n    for (final ext in extensions._values.entries) {\n      final typeId = ext.key;\n      final message = ext.value as GeneratedMessage;\n\n      output._writeTag(_messageSetItemsTag, WIRETYPE_START_GROUP);\n      output._writeTag(_messageSetItemTypeIdTag, WIRETYPE_VARINT);\n      output._writeVarint32(typeId);\n      output._writeTag(_messageSetItemMessageTag, WIRETYPE_LENGTH_DELIMITED);\n      final mark = output._startLengthDelimited();\n      message.writeToCodedBufferWriter(output);\n      output._endLengthDelimited(mark);\n      output._writeTag(_messageSetItemsTag, WIRETYPE_END_GROUP);\n    }\n\n    final unknownFields = _fieldSet._unknownFields;\n    if (unknownFields != null) {\n      unknownFields.writeToCodedBufferWriter(output);\n    }\n  }\n\n  @override\n  void mergeFromCodedBufferReader(\n    CodedBufferReader input, [\n    ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY,\n  ]) {\n    // Parse items. The field for the items looks like:\n    //\n    //   repeated group Item items = 1;\n    //\n    // Since message sets are compatible with proto1 items can't be packed.\n    while (true) {\n      final tag = input.readTag();\n      final tagNumber = getTagFieldNumber(tag);\n\n      if (tag == 0) {\n        break; // End of input.\n      }\n\n      if (tagNumber != _messageSetItemsTag) {\n        if (!input.skipField(tag)) {\n          break; // End of group.\n        } else {\n          continue;\n        }\n      }\n\n      // Parse an item. An item is a message with two fields:\n      //\n      //   message Item {\n      //     int32 type_id = 2;\n      //     Message message = 3;\n      //   }\n      //\n      // We can see the fields in any order, so loop until parsing both fields.\n      int? typeId;\n      Uint8List? message;\n      while (true) {\n        final tag = input.readTag();\n        final tagNumber = getTagFieldNumber(tag);\n\n        if (tag == 0) {\n          break; // End of input.\n        }\n\n        if (tagNumber == _messageSetItemTypeIdTag) {\n          typeId = input.readInt32();\n          if (message != null) {\n            _parseExtension(typeId, message, extensionRegistry);\n            typeId = null;\n            message = null;\n          }\n        } else if (tagNumber == _messageSetItemMessageTag) {\n          message = input.readBytesAsView();\n          if (typeId != null) {\n            _parseExtension(typeId, message, extensionRegistry);\n            typeId = null;\n            message = null;\n          }\n        } else {\n          // Skip unknown tags. If we're at the end of the group consume the\n          // EGROUP tag.\n          if (!input.skipField(tag)) {\n            break; // End of group.\n          }\n        }\n      }\n    }\n  }\n\n  @override\n  void mergeFromBuffer(\n    List<int> input, [\n    ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY,\n  ]) {\n    mergeFromCodedBufferReader(CodedBufferReader(input), extensionRegistry);\n  }\n\n  void _parseExtension(\n    int typeId,\n    Uint8List message,\n    ExtensionRegistry extensionRegistry,\n  ) {\n    final ext = extensionRegistry.getExtension(\n      info_.qualifiedMessageName,\n      typeId,\n    );\n    if (ext == null) {\n      final messageItem = UnknownFieldSet();\n      messageItem.addField(\n        _messageSetItemTypeIdTag,\n        UnknownFieldSetField()..varints.add(Int64(typeId)),\n      );\n      messageItem.addField(\n        _messageSetItemMessageTag,\n        UnknownFieldSetField()\n          ..lengthDelimited.add(Uint8List.fromList(message)),\n      );\n\n      final itemListField =\n          _fieldSet._ensureUnknownFields().getField(_messageSetItemsTag) ??\n          UnknownFieldSetField();\n      itemListField.addGroup(messageItem);\n\n      _fieldSet._ensureUnknownFields().addField(\n        _messageSetItemsTag,\n        itemListField,\n      );\n    } else {\n      setExtension(ext, ext.subBuilder!()..mergeFromBuffer(message));\n    }\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/mixins/map_mixin.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport '../../../protobuf.dart' show BuilderInfo;\n\n/// Note that this class does not claim to implement [Map]. Instead, this needs\n/// to be specified using a dart_options.imports clause specifying MapMixin as a\n/// parent mixin to PbMapMixin.\n///\n/// Since PbMapMixin is built in, this is done automatically, so this mixin can\n/// be enabled by specifying only a dart_options.mixin option.\nmixin PbMapMixin {\n  // GeneratedMessage properties and methods used by this mixin.\n\n  BuilderInfo get info_;\n  void clear();\n  int? getTagNumber(String fieldName);\n  dynamic getField(int tagNumber);\n  void setField(int tagNumber, Object value);\n\n  dynamic operator [](Object? key) {\n    if (key is! String) return null;\n    final tag = getTagNumber(key);\n    if (tag == null) return null;\n    return getField(tag);\n  }\n\n  void operator []=(Object? key, Object? val) {\n    final tag = getTagNumber(key as String);\n    if (tag == null) {\n      throw ArgumentError.value(\n        key,\n        'key',\n        \"field '$key' not found in ${info_.qualifiedMessageName}\",\n      );\n    }\n    setField(tag, val!);\n  }\n\n  Iterable<String> get keys => info_.byName.keys;\n\n  bool containsKey(Object? key) => info_.byName.containsKey(key);\n\n  int get length => info_.byName.length;\n\n  dynamic remove(Object? key) {\n    throw UnsupportedError(\n      'remove() not supported by ${info_.qualifiedMessageName}',\n    );\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/mixins/well_known.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert';\n\nimport 'package:fixnum/fixnum.dart';\n\nimport '../internal.dart';\nimport '../json_parsing_context.dart';\n\n/// The set of well known protobuf message types which may have customized\n/// serialization logic.\nenum WellKnownType {\n  any,\n  timestamp,\n  duration,\n  struct,\n  value,\n  listValue,\n  fieldMask,\n  doubleValue,\n  floatValue,\n  int64Value,\n  uint64Value,\n  int32Value,\n  uint32Value,\n  boolValue,\n  stringValue,\n  bytesValue,\n}\n\nmixin AnyMixin implements GeneratedMessage {\n  String get typeUrl;\n  set typeUrl(String value);\n\n  List<int> get value;\n  set value(List<int> value);\n\n  /// Returns `true` if the encoded message matches the type of [instance].\n  ///\n  /// Can be used with a default instance:\n  /// `any.canUnpackInto(Message.getDefault())`\n  bool canUnpackInto(GeneratedMessage instance) {\n    return canUnpackIntoHelper(instance, typeUrl);\n  }\n\n  /// Unpacks the message in [value] into [instance].\n  ///\n  /// Throws a [InvalidProtocolBufferException] if [typeUrl] does not correspond\n  /// to the type of [instance].\n  ///\n  /// A typical usage would be `any.unpackInto(Message())`.\n  ///\n  /// Returns [instance].\n  T unpackInto<T extends GeneratedMessage>(\n    T instance, {\n    ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY,\n  }) {\n    unpackIntoHelper(\n      value,\n      instance,\n      typeUrl,\n      extensionRegistry: extensionRegistry,\n    );\n    return instance;\n  }\n\n  /// Updates [target] to be the packed representation of [message].\n  ///\n  /// The [typeUrl] will be [typeUrlPrefix]/`fullName` where `fullName` is\n  /// the fully qualified name of the type of [message].\n  static void packIntoAny(\n    AnyMixin target,\n    GeneratedMessage message, {\n    String typeUrlPrefix = 'type.googleapis.com',\n  }) {\n    target.value = message.writeToBuffer();\n    target.typeUrl = '$typeUrlPrefix/${message.info_.qualifiedMessageName}';\n  }\n\n  // From google/protobuf/any.proto:\n  // JSON\n  // ====\n  // The JSON representation of an `Any` value uses the regular\n  // representation of the deserialized, embedded message, with an\n  // additional field `@type` which contains the type URL. Example:\n  //\n  //     package google.profile;\n  //     message Person {\n  //       string first_name = 1;\n  //       string last_name = 2;\n  //     }\n  //\n  //     {\n  //       \"@type\": \"type.googleapis.com/google.profile.Person\",\n  //       \"firstName\": <string>,\n  //       \"lastName\": <string>\n  //     }\n  //\n  // If the embedded message type is well-known and has a custom JSON\n  // representation, that representation will be embedded adding a field\n  // `value` which holds the custom JSON in addition to the `@type`\n  // field. Example (for message [google.protobuf.Duration][]):\n  //\n  //     {\n  //       \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n  //       \"value\": \"1.212s\"\n  //     }\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    final any = message as AnyMixin;\n    final info = typeRegistry.lookup(_typeNameFromUrl(any.typeUrl));\n    if (info == null) {\n      throw ArgumentError(\n        'The type of the Any message (${any.typeUrl}) is not in the given typeRegistry.',\n      );\n    }\n    final unpacked = info.createEmptyInstance!()..mergeFromBuffer(any.value);\n    return writeToProto3JsonAny(unpacked.fieldSet, any.typeUrl, typeRegistry);\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is! Map<String, dynamic>) {\n      throw context.parseException(\n        'Expected Any message encoded as {@type,...},',\n        json,\n      );\n    }\n    final object = json;\n    final typeUrl = object['@type'];\n\n    if (typeUrl is String) {\n      final any = message as AnyMixin;\n      final info = typeRegistry.lookup(_typeNameFromUrl(typeUrl));\n      if (info == null) {\n        throw context.parseException(\n          'Decoding Any of type $typeUrl not in TypeRegistry $typeRegistry',\n          json,\n        );\n      }\n\n      final packedMessage = info.createEmptyInstance!();\n      mergeFromProto3JsonAny(\n        json,\n        packedMessage.fieldSet,\n        typeRegistry,\n        context,\n      );\n      any.value = packedMessage.writeToBuffer();\n      any.typeUrl = typeUrl;\n    } else {\n      throw context.parseException('Expected a string', json);\n    }\n  }\n}\n\nString _typeNameFromUrl(String typeUrl) {\n  final index = typeUrl.lastIndexOf('/');\n  return index < 0 ? '' : typeUrl.substring(index + 1);\n}\n\nmixin TimestampMixin {\n  static final RegExp finalGroupsOfThreeZeroes = RegExp(r'(?:000)*$');\n\n  Int64 get seconds;\n  set seconds(Int64 value);\n\n  int get nanos;\n  set nanos(int value);\n\n  /// Converts an instance to [DateTime].\n  ///\n  /// The result is in UTC time zone and has microsecond precision, as\n  /// [DateTime] does not support nanosecond precision.\n  ///\n  /// Use [toLocal] to convert to local time zone, instead of the default UTC.\n  DateTime toDateTime({bool toLocal = false}) =>\n      DateTime.fromMicrosecondsSinceEpoch(\n        seconds.toInt() * Duration.microsecondsPerSecond + nanos ~/ 1000,\n        isUtc: !toLocal,\n      );\n\n  /// Updates [target] to be the time at [dateTime].\n  ///\n  /// Time zone information will not be preserved.\n  static void setFromDateTime(TimestampMixin target, DateTime dateTime) {\n    final micros = dateTime.microsecondsSinceEpoch;\n    target.seconds = Int64((micros / Duration.microsecondsPerSecond).floor());\n    target.nanos = (micros % Duration.microsecondsPerSecond).toInt() * 1000;\n  }\n\n  static String _twoDigits(int n) {\n    if (n >= 10) return '$n';\n    return '0$n';\n  }\n\n  static final DateTime _minTimestamp = DateTime.utc(1);\n  static final DateTime _maxTimestamp = DateTime.utc(9999, 13, 31, 23, 59, 59);\n\n  // From google/protobuf/timestamp.proto:\n  // # JSON Mapping\n  //\n  // In JSON format, the Timestamp type is encoded as a string in the\n  // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n  // format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n  // where {year} is always expressed using four digits while {month}, {day},\n  // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n  // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n  // are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n  // is required. A proto3 JSON serializer should always use UTC (as indicated by\n  // \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n  // able to accept both UTC and other timezones (as indicated by an offset).\n  //\n  // For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n  // 01:30 UTC on January 15, 2017.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    final timestamp = message as TimestampMixin;\n    final dateTime = timestamp.toDateTime();\n\n    if (timestamp.nanos < 0) {\n      throw ArgumentError(\n        'Timestamp with negative `nanos`: ${timestamp.nanos}',\n      );\n    }\n    if (timestamp.nanos > 999999999) {\n      throw ArgumentError(\n        'Timestamp with `nanos` out of range: ${timestamp.nanos}',\n      );\n    }\n    if (dateTime.isBefore(_minTimestamp) || dateTime.isAfter(_maxTimestamp)) {\n      throw ArgumentError(\n        'Timestamp Must be from 0001-01-01T00:00:00Z to '\n        '9999-12-31T23:59:59Z inclusive. Was: ${dateTime.toIso8601String()}',\n      );\n    }\n\n    // Because [DateTime] doesn't have nano-second precision, we cannot use\n    // dateTime.toIso8601String().\n    final y = '${dateTime.year}'.padLeft(4, '0');\n    final m = _twoDigits(dateTime.month);\n    final d = _twoDigits(dateTime.day);\n    final h = _twoDigits(dateTime.hour);\n    final min = _twoDigits(dateTime.minute);\n    final sec = _twoDigits(dateTime.second);\n    var secFrac = '';\n    if (timestamp.nanos > 0) {\n      secFrac =\n          '.${timestamp.nanos.toString().padLeft(9, '0').replaceFirst(finalGroupsOfThreeZeroes, '')}';\n    }\n    return '$y-$m-${d}T$h:$min:$sec${secFrac}Z';\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is String) {\n      var jsonWithoutFracSec = json;\n      var nanos = 0;\n      final Match? fracSecsMatch = RegExp(r'\\.(\\d+)').firstMatch(json);\n      if (fracSecsMatch != null) {\n        final fracSecs = fracSecsMatch[1]!;\n        if (fracSecs.length > 9) {\n          throw context.parseException(\n            'Timestamp can have at most than 9 decimal digits',\n            json,\n          );\n        }\n        nanos = int.parse(fracSecs.padRight(9, '0'));\n        jsonWithoutFracSec = json.replaceRange(\n          fracSecsMatch.start,\n          fracSecsMatch.end,\n          '',\n        );\n      }\n      final dateTimeWithoutFractionalSeconds =\n          DateTime.tryParse(jsonWithoutFracSec) ??\n          (throw context.parseException(\n            'Timestamp not well formatted. ',\n            json,\n          ));\n\n      final timestamp = message as TimestampMixin;\n      setFromDateTime(timestamp, dateTimeWithoutFractionalSeconds);\n      timestamp.nanos = nanos;\n    } else {\n      throw context.parseException(\n        'Expected timestamp represented as String',\n        json,\n      );\n    }\n  }\n}\n\nmixin DurationMixin {\n  Int64 get seconds;\n  set seconds(Int64 value);\n\n  int get nanos;\n  set nanos(int value);\n\n  static final RegExp finalZeroes = RegExp(r'0+$');\n\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    final duration = message as DurationMixin;\n    final secFrac = duration.nanos\n        // nanos and seconds should always have the same sign.\n        .abs()\n        .toString()\n        .padLeft(9, '0')\n        .replaceFirst(finalZeroes, '');\n    final secPart = secFrac == '' ? '' : '.$secFrac';\n    return '${duration.seconds}${secPart}s';\n  }\n\n  static final RegExp durationPattern = RegExp(r'(-?\\d*)(?:\\.(\\d*))?s$');\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    final duration = message as DurationMixin;\n    if (json is String) {\n      final match = durationPattern.matchAsPrefix(json);\n      if (match == null) {\n        throw context.parseException(\n          'Expected a String of the form `<seconds>.<nanos>s`',\n          json,\n        );\n      } else {\n        final secondsString = match[1]!;\n        final seconds =\n            secondsString == '' ? Int64.ZERO : Int64.parseInt(secondsString);\n        duration.seconds = seconds;\n        final nanos = int.parse((match[2] ?? '').padRight(9, '0'));\n        duration.nanos = seconds < 0 ? -nanos : nanos;\n      }\n    } else {\n      throw context.parseException(\n        'Expected a String of the form `<seconds>.<nanos>s`',\n        json,\n      );\n    }\n  }\n}\n\nmixin StructMixin implements GeneratedMessage {\n  Map<String, ValueMixin> get fields;\n  static const _fieldsFieldTagNumber = 1;\n\n  // From google/protobuf/struct.proto:\n  // The JSON representation for `Struct` is JSON object.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    final struct = message as StructMixin;\n    return struct.fields.map(\n      (key, value) =>\n          MapEntry(key, ValueMixin.toProto3JsonHelper(value, typeRegistry)),\n    );\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is Map) {\n      // Check for emptiness to avoid setting `.fields` if there are no\n      // values.\n      if (json.isNotEmpty) {\n        final fields = (message as StructMixin).fields;\n        final valueCreator =\n            (message.info_.fieldInfo[_fieldsFieldTagNumber] as MapFieldInfo)\n                .valueCreator!;\n\n        json.forEach((key, value) {\n          if (key is! String) {\n            throw context.parseException('Expected String key', json);\n          }\n          final v = valueCreator() as ValueMixin;\n          context.addMapIndex(key);\n          ValueMixin.fromProto3JsonHelper(v, value, typeRegistry, context);\n          context.popIndex();\n          fields[key] = v;\n        });\n      }\n    } else {\n      throw context.parseException(\n        'Expected a JSON object literal (map)',\n        json,\n      );\n    }\n  }\n}\n\nmixin ValueMixin implements GeneratedMessage {\n  bool hasNullValue();\n  ProtobufEnum get nullValue;\n  set nullValue(covariant ProtobufEnum value);\n\n  bool hasNumberValue();\n  double get numberValue;\n  set numberValue(double v);\n\n  bool hasStringValue();\n  String get stringValue;\n  set stringValue(String v);\n\n  bool hasBoolValue();\n  bool get boolValue;\n  set boolValue(bool v);\n\n  bool hasStructValue();\n  StructMixin get structValue;\n  set structValue(covariant StructMixin v);\n\n  bool hasListValue();\n  ListValueMixin get listValue;\n  set listValue(covariant ListValueMixin v);\n\n  // From google/protobuf/struct.proto:\n  // The JSON representation for `Value` is JSON value\n  static Object? toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    final value = message as ValueMixin;\n    // This would ideally be a switch, but we cannot import the enum we are\n    // switching over.\n    if (value.hasNullValue()) {\n      return null;\n    } else if (value.hasNumberValue()) {\n      return value.numberValue;\n    } else if (value.hasStringValue()) {\n      return value.stringValue;\n    } else if (value.hasBoolValue()) {\n      return value.boolValue;\n    } else if (value.hasStructValue()) {\n      return StructMixin.toProto3JsonHelper(value.structValue, typeRegistry);\n    } else if (value.hasListValue()) {\n      return ListValueMixin.toProto3JsonHelper(value.listValue, typeRegistry);\n    } else {\n      throw ArgumentError('Serializing google.protobuf.Value with no value');\n    }\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object? json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    final value = message as ValueMixin;\n    if (json == null) {\n      // Rely on the getter retrieving the default to provide an instance.\n      value.nullValue = value.nullValue;\n    } else if (json is num) {\n      value.numberValue = json.toDouble();\n    } else if (json is String) {\n      value.stringValue = json;\n    } else if (json is bool) {\n      value.boolValue = json;\n    } else if (json is Map) {\n      // Clone because the default instance is frozen.\n      final structValue = value.structValue.deepCopy();\n      StructMixin.fromProto3JsonHelper(\n        structValue,\n        json,\n        typeRegistry,\n        context,\n      );\n      value.structValue = structValue;\n    } else if (json is List) {\n      // Clone because the default instance is frozen.\n      final listValue = value.listValue.deepCopy();\n      ListValueMixin.fromProto3JsonHelper(\n        listValue,\n        json,\n        typeRegistry,\n        context,\n      );\n      value.listValue = listValue;\n    } else {\n      throw context.parseException(\n        'Expected a json-value (Map, List, String, number, bool or null)',\n        json,\n      );\n    }\n  }\n}\n\nmixin ListValueMixin implements GeneratedMessage {\n  List<ValueMixin> get values;\n\n  // From google/protobuf/struct.proto:\n  // The JSON representation for `ListValue` is JSON array.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    final list = message as ListValueMixin;\n    return list.values\n        .map((value) => ValueMixin.toProto3JsonHelper(value, typeRegistry))\n        .toList();\n  }\n\n  static const _valueFieldTagNumber = 1;\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    final list = message as ListValueMixin;\n    if (json is List) {\n      final subBuilder = message.info_.subBuilder(_valueFieldTagNumber)!;\n      for (var i = 0; i < json.length; i++) {\n        final Object? element = json[i];\n        final v = subBuilder() as ValueMixin;\n        context.addListIndex(i);\n        ValueMixin.fromProto3JsonHelper(v, element, typeRegistry, context);\n        context.popIndex();\n        list.values.add(v);\n      }\n    } else {\n      throw context.parseException('Expected a json-List', json);\n    }\n  }\n}\n\nmixin FieldMaskMixin {\n  List<String> get paths;\n\n  // From google/protobuf/field_mask.proto:\n  // # JSON Encoding of Field Masks\n  //\n  // In JSON, a field mask is encoded as a single string where paths are\n  // separated by a comma. Fields name in each path are converted\n  // to/from lower-camel naming conventions.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    final fieldMask = message as FieldMaskMixin;\n    for (final path in fieldMask.paths) {\n      if (path.contains(RegExp('[A-Z]|_[^a-z]'))) {\n        throw ArgumentError(\n          'Bad fieldmask $path. Does not round-trip to json.',\n        );\n      }\n    }\n    return fieldMask.paths.map(_toCamelCase).join(',');\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is String) {\n      if (json.contains('_')) {\n        throw context.parseException(\n          'Invalid Character `_` in FieldMask',\n          json,\n        );\n      }\n      if (json == '') {\n        // The empty string splits to a single value. So this is a special case.\n        return;\n      }\n      (message as FieldMaskMixin).paths.addAll(\n        json.split(',').map(_fromCamelCase),\n      );\n    } else {\n      throw context.parseException(\n        'Expected String formatted as FieldMask',\n        json,\n      );\n    }\n  }\n\n  static String _toCamelCase(String name) {\n    return name.replaceAllMapped(\n      RegExp('_([a-z])'),\n      (Match m) => m.group(1)!.toUpperCase(),\n    );\n  }\n\n  static String _fromCamelCase(String name) {\n    return name.replaceAllMapped(\n      RegExp('[A-Z]'),\n      (Match m) => '_${m.group(0)!.toLowerCase()}',\n    );\n  }\n}\n\nmixin DoubleValueMixin {\n  double get value;\n  set value(double value);\n\n  // From google/protobuf/wrappers.proto:\n  // The JSON representation for `DoubleValue` is JSON number.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    return (message as DoubleValueMixin).value;\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is num) {\n      (message as DoubleValueMixin).value = json.toDouble();\n    } else if (json is String) {\n      (message as DoubleValueMixin).value =\n          double.tryParse(json) ??\n          (throw context.parseException(\n            'Expected string to encode a double',\n            json,\n          ));\n    } else {\n      throw context.parseException(\n        'Expected a double as a String or number',\n        json,\n      );\n    }\n  }\n}\n\nmixin FloatValueMixin {\n  double get value;\n  set value(double value);\n\n  // From google/protobuf/wrappers.proto:\n  // The JSON representation for `FloatValue` is JSON number.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    return (message as FloatValueMixin).value;\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is num) {\n      (message as FloatValueMixin).value = json.toDouble();\n    } else if (json is String) {\n      (message as FloatValueMixin).value =\n          double.tryParse(json) ??\n          (throw context.parseException(\n            'Expected a float as a String or number',\n            json,\n          ));\n    } else {\n      throw context.parseException(\n        'Expected a float as a String or number',\n        json,\n      );\n    }\n  }\n}\n\nmixin Int64ValueMixin {\n  Int64 get value;\n  set value(Int64 value);\n\n  // From google/protobuf/wrappers.proto:\n  // The JSON representation for `Int64Value` is JSON string.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    return (message as Int64ValueMixin).value.toString();\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is int) {\n      (message as Int64ValueMixin).value = Int64(json);\n    } else if (json is String) {\n      try {\n        (message as Int64ValueMixin).value = Int64.parseInt(json);\n      } on FormatException {\n        throw context.parseException('Expected string to encode integer', json);\n      }\n    } else {\n      throw context.parseException(\n        'Expected an integer encoded as a String or number',\n        json,\n      );\n    }\n  }\n}\n\nmixin UInt64ValueMixin {\n  Int64 get value;\n  set value(Int64 value);\n\n  // From google/protobuf/wrappers.proto:\n  // The JSON representation for `UInt64Value` is JSON string.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    return (message as UInt64ValueMixin).value.toStringUnsigned();\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is int) {\n      (message as UInt64ValueMixin).value = Int64(json);\n    } else if (json is String) {\n      try {\n        (message as UInt64ValueMixin).value = Int64.parseInt(json);\n      } on FormatException {\n        throw context.parseException(\n          'Expected string to encode unsigned integer',\n          json,\n        );\n      }\n    } else {\n      throw context.parseException(\n        'Expected an unsigned integer as a String or integer',\n        json,\n      );\n    }\n  }\n}\n\nmixin Int32ValueMixin {\n  int get value;\n  set value(int value);\n\n  // From google/protobuf/wrappers.proto:\n  // The JSON representation for `Int32Value` is JSON number.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    return (message as Int32ValueMixin).value;\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is int) {\n      (message as Int32ValueMixin).value = json;\n    } else if (json is String) {\n      (message as Int32ValueMixin).value =\n          int.tryParse(json) ??\n          (throw context.parseException(\n            'Expected string to encode integer',\n            json,\n          ));\n    } else {\n      throw context.parseException(\n        'Expected an integer encoded as a String or number',\n        json,\n      );\n    }\n  }\n}\n\nmixin UInt32ValueMixin {\n  int get value;\n  set value(int value);\n\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    return (message as UInt32ValueMixin).value;\n  }\n\n  // From google/protobuf/wrappers.proto:\n  // The JSON representation for `UInt32Value` is JSON number.\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is int) {\n      (message as UInt32ValueMixin).value = json;\n    } else if (json is String) {\n      (message as UInt32ValueMixin).value =\n          int.tryParse(json) ??\n          (throw context.parseException(\n            'Expected String to encode an integer',\n            json,\n          ));\n    } else {\n      throw context.parseException(\n        'Expected an unsigned integer as a String or integer',\n        json,\n      );\n    }\n  }\n}\n\nmixin BoolValueMixin {\n  bool get value;\n  set value(bool value);\n\n  // From google/protobuf/wrappers.proto:\n  // The JSON representation for `BoolValue` is JSON `true` and `false`\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    return (message as BoolValueMixin).value;\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is bool) {\n      (message as BoolValueMixin).value = json;\n    } else {\n      throw context.parseException('Expected a bool', json);\n    }\n  }\n}\n\nmixin StringValueMixin {\n  String get value;\n  set value(String value);\n\n  // From google/protobuf/wrappers.proto:\n  // The JSON representation for `StringValue` is JSON string.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    return (message as StringValueMixin).value;\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is String) {\n      (message as StringValueMixin).value = json;\n    } else {\n      throw context.parseException('Expected a String', json);\n    }\n  }\n}\n\nmixin BytesValueMixin {\n  List<int> get value;\n  set value(List<int> value);\n\n  // From google/protobuf/wrappers.proto:\n  // The JSON representation for `BytesValue` is JSON string.\n  static Object toProto3JsonHelper(\n    GeneratedMessage message,\n    TypeRegistry typeRegistry,\n  ) {\n    return base64.encode((message as BytesValueMixin).value);\n  }\n\n  static void fromProto3JsonHelper(\n    GeneratedMessage message,\n    Object json,\n    TypeRegistry typeRegistry,\n    JsonParsingContext context,\n  ) {\n    if (json is String) {\n      try {\n        (message as BytesValueMixin).value = base64.decode(json);\n      } on FormatException {\n        throw context.parseException(\n          'Expected bytes encoded as base64 String',\n          json,\n        );\n      }\n    } else {\n      throw context.parseException(\n        'Expected bytes encoded as base64 String',\n        json,\n      );\n    }\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/pb_list.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:collection' show ListBase;\nimport 'dart:math' as math;\n\nimport 'internal.dart';\nimport 'utils.dart';\n\n@pragma('dart2js:tryInline')\n@pragma('vm:prefer-inline')\n@pragma('wasm:prefer-inline')\nPbList<E> newPbList<E>({CheckFunc<E>? check}) => PbList._(check: check);\n\n@pragma('dart2js:tryInline')\n@pragma('vm:prefer-inline')\n@pragma('wasm:prefer-inline')\nPbList<E> newUnmodifiablePbList<E>({CheckFunc<E>? check}) =>\n    PbList._unmodifiable();\n\n/// A [ListBase] implementation used for protobuf `repeated` fields.\nclass PbList<E> extends ListBase<E> {\n  /// The actual list storing the elements.\n  ///\n  /// Note: We want only one [List] implementation class to be stored here to\n  /// make sure the list operations are monomorphic and can be inlined. In\n  /// constructors make sure initializers for this field all return the same\n  /// implementation class. (e.g. `_GrowableList` on the VM)\n  final List<E> _wrappedList;\n\n  /// A growable list, to be used in `unmodifiable` constructor to avoid\n  /// allocating a list every time.\n  ///\n  /// We can't use `const []` as it makes the `_wrappedList` field polymorphic.\n  static final _emptyList = <Never>[];\n\n  final CheckFunc<E>? _check;\n\n  bool _isReadOnly = false;\n\n  bool get isFrozen => _isReadOnly;\n\n  PbList._({CheckFunc<E>? check}) : _wrappedList = <E>[], _check = check;\n\n  PbList._unmodifiable()\n    : _wrappedList = _emptyList,\n      _check = null,\n      _isReadOnly = true;\n\n  @override\n  @pragma('dart2js:never-inline')\n  void add(E element) {\n    _checkModifiable('add');\n    if (_check != null) {\n      _check(element);\n    }\n    _wrappedList.add(element);\n  }\n\n  @pragma('dart2js:tryInline')\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  void _addUnchecked(E element) {\n    _wrappedList.add(element);\n  }\n\n  @override\n  @pragma('dart2js:never-inline')\n  void addAll(Iterable<E> iterable) {\n    _checkModifiable('addAll');\n    if (_check != null) {\n      for (final e in iterable) {\n        _check(e);\n        _addUnchecked(e);\n      }\n    } else {\n      _wrappedList.addAll(iterable);\n    }\n  }\n\n  @override\n  Iterable<E> get reversed => _wrappedList.reversed;\n\n  @override\n  void sort([int Function(E a, E b)? compare]) {\n    _checkModifiable('sort');\n    _wrappedList.sort(compare);\n  }\n\n  @override\n  void shuffle([math.Random? random]) {\n    _checkModifiable('shuffle');\n    _wrappedList.shuffle(random);\n  }\n\n  @override\n  @pragma('dart2js:never-inline')\n  void clear() {\n    _checkModifiable('clear');\n    _wrappedList.clear();\n  }\n\n  @override\n  void insert(int index, E element) {\n    _checkModifiable('insert');\n    if (_check != null) {\n      _check(element);\n    }\n    _wrappedList.insert(index, element);\n  }\n\n  @override\n  void insertAll(int index, Iterable<E> iterable) {\n    _checkModifiable('insertAll');\n    if (_check != null) {\n      _wrappedList.insertAll(\n        index,\n        iterable.map((E e) {\n          _check(e);\n          return e;\n        }),\n      );\n    } else {\n      _wrappedList.insertAll(index, iterable);\n    }\n  }\n\n  @override\n  void setAll(int index, Iterable<E> iterable) {\n    _checkModifiable('setAll');\n    if (_check != null) {\n      _wrappedList.setAll(\n        index,\n        iterable.map((E e) {\n          _check(e);\n          return e;\n        }),\n      );\n    } else {\n      _wrappedList.setAll(index, iterable);\n    }\n  }\n\n  @override\n  bool remove(Object? element) {\n    _checkModifiable('remove');\n    return _wrappedList.remove(element);\n  }\n\n  @override\n  E removeAt(int index) {\n    _checkModifiable('removeAt');\n    return _wrappedList.removeAt(index);\n  }\n\n  @override\n  E removeLast() {\n    _checkModifiable('removeLast');\n    return _wrappedList.removeLast();\n  }\n\n  @override\n  void removeWhere(bool Function(E element) test) {\n    _checkModifiable('removeWhere');\n    return _wrappedList.removeWhere(test);\n  }\n\n  @override\n  void retainWhere(bool Function(E element) test) {\n    _checkModifiable('retainWhere');\n    return _wrappedList.retainWhere(test);\n  }\n\n  @override\n  void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) {\n    _checkModifiable('setRange');\n    if (_check != null) {\n      _wrappedList.setRange(\n        start,\n        end,\n        iterable.skip(skipCount).map((E e) {\n          _check(e);\n          return e;\n        }),\n        0,\n      );\n    } else {\n      _wrappedList.setRange(start, end, iterable, skipCount);\n    }\n  }\n\n  @override\n  void removeRange(int start, int end) {\n    _checkModifiable('removeRange');\n    _wrappedList.removeRange(start, end);\n  }\n\n  @override\n  void fillRange(int start, int end, [E? fill]) {\n    _checkModifiable('fillRange');\n    if (_check != null) {\n      _check(fill);\n    }\n    _wrappedList.fillRange(start, end, fill);\n  }\n\n  @override\n  void replaceRange(int start, int end, Iterable<E> newContents) {\n    _checkModifiable('replaceRange');\n    if (_check != null) {\n      _wrappedList.replaceRange(\n        start,\n        end,\n        newContents.map((E e) {\n          _check(e);\n          return e;\n        }),\n      );\n    } else {\n      _wrappedList.replaceRange(start, end, newContents);\n    }\n  }\n\n  @override\n  int get length => _wrappedList.length;\n\n  @override\n  bool get isEmpty => _wrappedList.isEmpty;\n\n  @override\n  bool get isNotEmpty => _wrappedList.isNotEmpty;\n\n  @override\n  @pragma('dart2js:never-inline')\n  Iterator<E> get iterator => _wrappedList.iterator;\n\n  @override\n  set length(int newLength) {\n    _checkModifiable('set length');\n    if (newLength > length) {\n      throw UnsupportedError('Extending protobuf lists is not supported');\n    }\n    _wrappedList.length = newLength;\n  }\n\n  @override\n  E operator [](int index) => _wrappedList[index];\n\n  @override\n  void operator []=(int index, E value) {\n    _checkModifiable('set element');\n    if (_check != null) {\n      _check(value);\n    }\n    _wrappedList[index] = value;\n  }\n\n  @override\n  bool operator ==(Object other) =>\n      other is PbList && areListsEqual(other, this);\n\n  @override\n  int get hashCode => HashUtils.hashObjects(_wrappedList);\n\n  void freeze() {\n    if (_isReadOnly) {\n      return;\n    }\n\n    _isReadOnly = true;\n\n    // Per spec `repeated map<..>` and `repeated repeated ..` are not allowed\n    // so we only check for messages\n    if (_wrappedList.isNotEmpty && _wrappedList[0] is GeneratedMessage) {\n      for (final elem in _wrappedList as Iterable<GeneratedMessage>) {\n        elem.freeze();\n      }\n    }\n  }\n\n  void _checkModifiable(String methodName) {\n    if (_isReadOnly) {\n      _readOnlyError(methodName);\n    }\n  }\n\n  static Never _readOnlyError(String methodName) {\n    throw UnsupportedError(\"'$methodName' on a read-only list\");\n  }\n\n  PbList<E> _deepCopy() {\n    final newList = PbList<E>._(check: _check);\n    final wrappedList = _wrappedList;\n    final newWrappedList = newList._wrappedList;\n    if (wrappedList.isNotEmpty) {\n      if (wrappedList[0] is GeneratedMessage) {\n        for (final message in wrappedList) {\n          newWrappedList.add((message as GeneratedMessage).deepCopy() as E);\n        }\n      } else {\n        newWrappedList.addAll(wrappedList);\n      }\n    }\n    return newList;\n  }\n}\n\nextension PbListInternalExtension<E> on PbList<E> {\n  @pragma('dart2js:tryInline')\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  void checkModifiable(String methodName) => _checkModifiable(methodName);\n\n  @pragma('dart2js:tryInline')\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  void addUnchecked(E element) => _addUnchecked(element);\n\n  @pragma('dart2js:tryInline')\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  PbList<E> deepCopy() => _deepCopy();\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/pb_map.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:collection' show MapBase;\n\nimport 'internal.dart';\nimport 'utils.dart';\n\nconst mapKeyFieldNumber = 1;\nconst mapValueFieldNumber = 2;\n\n@pragma('dart2js:tryInline')\n@pragma('vm:prefer-inline')\n@pragma('wasm:prefer-inline')\nPbMap<K, V> newPbMap<K, V>(int keyFieldType, int valueFieldType) =>\n    PbMap<K, V>._(\n      keyFieldType,\n      valueFieldType,\n      getCheckFunction(keyFieldType),\n      getCheckFunction(valueFieldType),\n    );\n\n@pragma('dart2js:tryInline')\n@pragma('vm:prefer-inline')\n@pragma('wasm:prefer-inline')\nPbMap<K, V> newUnmodifiablePbMap<K, V>(int keyFieldType, int valueFieldType) =>\n    PbMap<K, V>._unmodifiable(keyFieldType, valueFieldType);\n\n/// A [MapBase] implementation used for protobuf `map` fields.\nclass PbMap<K, V> extends MapBase<K, V> {\n  /// Key type of the map. Per proto2 and proto3 specs, this needs to be an\n  /// integer type or `string`, and the type cannot be `repeated`.\n  ///\n  /// The `int` value is interpreted the same way as [FieldInfo.type].\n  final int keyFieldType;\n\n  /// Value type of the map. Per proto2 and proto3 specs, this can be any type\n  /// other than `map`, and the type cannot be `repeated`.\n  ///\n  /// The `int` value is interpreted the same way as [FieldInfo.type].\n  final int valueFieldType;\n\n  /// The actual list storing the elements.\n  ///\n  /// Note: We want only one [Map] implementation class to be stored here to\n  /// make sure the map operations are monomorphic and can be inlined. In\n  /// constructors make sure initializers for this field all return the same\n  /// implementation class.\n  final Map<K, V> _wrappedMap;\n\n  bool _isReadOnly = false;\n\n  final CheckFunc<K>? _checkKey;\n  final CheckFunc<V>? _checkValue;\n\n  PbMap._(\n    this.keyFieldType,\n    this.valueFieldType,\n    this._checkKey,\n    this._checkValue,\n  ) : _wrappedMap = <K, V>{};\n\n  PbMap._unmodifiable(this.keyFieldType, this.valueFieldType)\n    : _wrappedMap = <K, V>{},\n      _isReadOnly = true,\n      _checkKey = null,\n      _checkValue = null;\n\n  @override\n  V? operator [](Object? key) => _wrappedMap[key];\n\n  @override\n  void operator []=(K key, V value) {\n    if (_isReadOnly) {\n      throw UnsupportedError('Attempted to change a read-only map field');\n    }\n    if (_checkKey != null) {\n      _checkKey(key);\n    }\n    if (_checkValue != null) {\n      _checkValue(value);\n    }\n    _wrappedMap[key] = value;\n  }\n\n  /// A [PbMap] is equal to another [PbMap] with equal key/value pairs in any\n  /// order.\n  @override\n  bool operator ==(Object other) {\n    if (identical(other, this)) {\n      return true;\n    }\n    if (other is! PbMap) {\n      return false;\n    }\n    if (other.length != length) {\n      return false;\n    }\n    for (final key in keys) {\n      if (other[key] != this[key]) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /// A [PbMap] is equal to another [PbMap] with equal key/value pairs in any\n  /// order. Then, the `hashCode` is guaranteed to be the same.\n  @override\n  int get hashCode {\n    return _wrappedMap.entries.fold(\n      0,\n      (h, entry) => h ^ HashUtils.hash2(entry.key, entry.value),\n    );\n  }\n\n  @override\n  void clear() {\n    if (_isReadOnly) {\n      throw UnsupportedError('Attempted to change a read-only map field');\n    }\n    _wrappedMap.clear();\n  }\n\n  @override\n  Iterable<K> get keys => _wrappedMap.keys;\n\n  @override\n  V? remove(Object? key) {\n    if (_isReadOnly) {\n      throw UnsupportedError('Attempted to change a read-only map field');\n    }\n    return _wrappedMap.remove(key);\n  }\n\n  PbMap freeze() {\n    _isReadOnly = true;\n    if (PbFieldType.isGroupOrMessage(valueFieldType)) {\n      for (final subMessage in values as Iterable<GeneratedMessage>) {\n        subMessage.freeze();\n      }\n    }\n    return this;\n  }\n\n  PbMap<K, V> _deepCopy() {\n    final newMap = PbMap<K, V>._(\n      keyFieldType,\n      valueFieldType,\n      _checkKey,\n      _checkValue,\n    );\n    final wrappedMap = _wrappedMap;\n    final newWrappedMap = newMap._wrappedMap;\n    if (PbFieldType.isGroupOrMessage(valueFieldType)) {\n      for (final entry in wrappedMap.entries) {\n        newWrappedMap[entry.key] =\n            (entry.value as GeneratedMessage).deepCopy() as V;\n      }\n    } else {\n      newWrappedMap.addAll(wrappedMap);\n    }\n    return newMap;\n  }\n}\n\nextension PbMapInternalExtension<K, V> on PbMap<K, V> {\n  @pragma('dart2js:tryInline')\n  @pragma('vm:prefer-inline')\n  @pragma('wasm:prefer-inline')\n  PbMap<K, V> deepCopy() => _deepCopy();\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/permissive_compare.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n/// Returns true if [a] and [b] are the same ignoring case and all instances of\n///  `-` and `_`.\n///\n/// This is specialized code for comparing enum names.\n/// Works only for ascii strings containing letters and `_` and `-`.\nbool permissiveCompare(String a, String b) {\n  const dash = 45;\n  const underscore = 95;\n\n  var i = 0;\n  var j = 0;\n\n  while (true) {\n    int ca, cb;\n    do {\n      ca = i < a.length ? a.codeUnitAt(i++) : -1;\n    } while (ca == dash || ca == underscore);\n    do {\n      cb = j < b.length ? b.codeUnitAt(j++) : -1;\n    } while (cb == dash || cb == underscore);\n    if (ca == cb) {\n      if (ca == -1) return true; // Both at end\n      continue;\n    }\n    if (ca ^ cb != 0x20 || !_isAsciiLetter(ca)) {\n      return false;\n    }\n  }\n}\n\nbool _isAsciiLetter(int char) {\n  const lowerA = 97;\n  const lowerZ = 122;\n  const capitalA = 65;\n  char |= lowerA ^ capitalA;\n  return lowerA <= char && char <= lowerZ;\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/proto3_json.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n// Public because this is called from the mixins library.\nObject writeToProto3JsonAny(\n  FieldSet fs,\n  String typeUrl,\n  TypeRegistry typeRegistry,\n) {\n  final result = _writeToProto3Json(fs, typeRegistry);\n  final wellKnownType = fs._meta._wellKnownType;\n  if (wellKnownType != null) {\n    switch (wellKnownType) {\n      case WellKnownType.any:\n      case WellKnownType.timestamp:\n      case WellKnownType.duration:\n      case WellKnownType.struct:\n      case WellKnownType.value:\n      case WellKnownType.listValue:\n      case WellKnownType.fieldMask:\n      case WellKnownType.doubleValue:\n      case WellKnownType.floatValue:\n      case WellKnownType.int64Value:\n      case WellKnownType.uint64Value:\n      case WellKnownType.int32Value:\n      case WellKnownType.uint32Value:\n      case WellKnownType.boolValue:\n      case WellKnownType.stringValue:\n      case WellKnownType.bytesValue:\n        return {'@type': typeUrl, 'value': result};\n    }\n  }\n\n  (result as Map<String, dynamic>)['@type'] = typeUrl;\n  return result;\n}\n\nObject? _writeToProto3Json(FieldSet fs, TypeRegistry typeRegistry) {\n  String? convertToMapKey(dynamic key, int keyType) {\n    final baseType = PbFieldType.baseType(keyType);\n\n    assert(!PbFieldType.isRepeated(keyType));\n\n    switch (baseType) {\n      case PbFieldType.BOOL_BIT:\n        return key ? 'true' : 'false';\n      case PbFieldType.STRING_BIT:\n        return key;\n      case PbFieldType.UINT64_BIT:\n        return (key as Int64).toStringUnsigned();\n      case PbFieldType.INT32_BIT:\n      case PbFieldType.SINT32_BIT:\n      case PbFieldType.UINT32_BIT:\n      case PbFieldType.FIXED32_BIT:\n      case PbFieldType.SFIXED32_BIT:\n      case PbFieldType.INT64_BIT:\n      case PbFieldType.SINT64_BIT:\n      case PbFieldType.SFIXED64_BIT:\n      case PbFieldType.FIXED64_BIT:\n        return key.toString();\n      default:\n        throw StateError('Not a valid key type $keyType');\n    }\n  }\n\n  Object? valueToProto3Json(dynamic fieldValue, int? fieldType) {\n    if (fieldValue == null) return null;\n\n    if (PbFieldType.isGroupOrMessage(fieldType!)) {\n      return _writeToProto3Json(\n        (fieldValue as GeneratedMessage)._fieldSet,\n        typeRegistry,\n      );\n    } else if (PbFieldType.isEnum(fieldType)) {\n      return (fieldValue as ProtobufEnum).name;\n    } else {\n      final baseType = PbFieldType.baseType(fieldType);\n      switch (baseType) {\n        case PbFieldType.BOOL_BIT:\n          return fieldValue as bool;\n        case PbFieldType.STRING_BIT:\n          return fieldValue;\n        case PbFieldType.INT32_BIT:\n        case PbFieldType.SINT32_BIT:\n        case PbFieldType.UINT32_BIT:\n        case PbFieldType.FIXED32_BIT:\n        case PbFieldType.SFIXED32_BIT:\n          return fieldValue;\n        case PbFieldType.INT64_BIT:\n        case PbFieldType.SINT64_BIT:\n        case PbFieldType.SFIXED64_BIT:\n        case PbFieldType.FIXED64_BIT:\n          return fieldValue.toString();\n        case PbFieldType.FLOAT_BIT:\n        case PbFieldType.DOUBLE_BIT:\n          final double value = fieldValue;\n          if (value.isNaN) {\n            return nan;\n          }\n          if (value.isInfinite) {\n            return value.isNegative ? negativeInfinity : infinity;\n          }\n          if (value.toInt() == fieldValue) {\n            return value.toInt();\n          }\n          return value;\n        case PbFieldType.UINT64_BIT:\n          return (fieldValue as Int64).toStringUnsigned();\n        case PbFieldType.BYTES_BIT:\n          return base64Encode(fieldValue);\n        default:\n          throw StateError(\n            'Invariant violation: unexpected value type $fieldType',\n          );\n      }\n    }\n  }\n\n  final meta = fs._meta;\n  final wellKnownType = meta._wellKnownType;\n  if (wellKnownType != null) {\n    switch (wellKnownType) {\n      case WellKnownType.any:\n        return AnyMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.timestamp:\n        return TimestampMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.duration:\n        return DurationMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.struct:\n        return StructMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.value:\n        return ValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.listValue:\n        return ListValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.fieldMask:\n        return FieldMaskMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.doubleValue:\n        return DoubleValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.floatValue:\n        return FloatValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.int64Value:\n        return Int64ValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.uint64Value:\n        return UInt64ValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.int32Value:\n        return Int32ValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.uint32Value:\n        return UInt32ValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.boolValue:\n        return BoolValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.stringValue:\n        return StringValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n      case WellKnownType.bytesValue:\n        return BytesValueMixin.toProto3JsonHelper(fs._message!, typeRegistry);\n    }\n    // [WellKnownType] could be used to for messages which have special\n    // encodings in other codecs. The set of messages which special encodings in\n    // proto3json is handled here, so we intentionally fall through to the\n    // default message handling rather than throwing.\n  }\n\n  final result = <String, dynamic>{};\n  for (final fieldInfo in fs._infosSortedByTag) {\n    final value = fs._values[fieldInfo.index!];\n    if (value == null || (value is List && value.isEmpty)) {\n      continue; // It's missing, repeated, or an empty byte array.\n    }\n    dynamic jsonValue;\n    if (fieldInfo.isMapField) {\n      jsonValue = (value as PbMap).map((key, entryValue) {\n        final mapEntryInfo = fieldInfo as MapFieldInfo;\n        return MapEntry(\n          convertToMapKey(key, mapEntryInfo.keyFieldType),\n          valueToProto3Json(entryValue, mapEntryInfo.valueFieldType),\n        );\n      });\n    } else if (fieldInfo.isRepeated) {\n      jsonValue =\n          (value as PbList)\n              .map((element) => valueToProto3Json(element, fieldInfo.type))\n              .toList();\n    } else {\n      jsonValue = valueToProto3Json(value, fieldInfo.type);\n    }\n    result[fieldInfo.name] = jsonValue;\n  }\n  // Extensions and unknown fields are not encoded by proto3 JSON.\n  return result;\n}\n\n/// TODO(paulberry): find a better home for this?\nextension _FindFirst<E> on Iterable<E> {\n  E? findFirst(bool Function(E) test) {\n    for (final element in this) {\n      if (test(element)) return element;\n    }\n    return null;\n  }\n}\n\n// Public because this is called from the mixins library.\nvoid mergeFromProto3JsonAny(\n  Object? json,\n  FieldSet fieldSet,\n  TypeRegistry typeRegistry,\n  JsonParsingContext context,\n) {\n  if (json is! Map<String, dynamic>) {\n    throw context.parseException('Expected JSON object', json);\n  }\n\n  final wellKnownType = fieldSet._meta._wellKnownType;\n  if (wellKnownType != null) {\n    switch (wellKnownType) {\n      case WellKnownType.any:\n      case WellKnownType.timestamp:\n      case WellKnownType.duration:\n      case WellKnownType.struct:\n      case WellKnownType.value:\n      case WellKnownType.listValue:\n      case WellKnownType.fieldMask:\n      case WellKnownType.doubleValue:\n      case WellKnownType.floatValue:\n      case WellKnownType.int64Value:\n      case WellKnownType.uint64Value:\n      case WellKnownType.int32Value:\n      case WellKnownType.uint32Value:\n      case WellKnownType.boolValue:\n      case WellKnownType.stringValue:\n      case WellKnownType.bytesValue:\n        final value = json['value'];\n        return _mergeFromProto3JsonWithContext(\n          value,\n          fieldSet,\n          typeRegistry,\n          context,\n        );\n    }\n  }\n\n  // TODO(sigurdm): avoid cloning [object] here.\n  final withoutType = Map<String, dynamic>.from(json)..remove('@type');\n  return _mergeFromProto3JsonWithContext(\n    withoutType,\n    fieldSet,\n    typeRegistry,\n    context,\n  );\n}\n\n/// Merge a JSON object representing a message in proto3 JSON format ([json])\n/// to [fieldSet].\nvoid _mergeFromProto3Json(\n  Object? json,\n  FieldSet fieldSet,\n  TypeRegistry typeRegistry,\n  bool ignoreUnknownFields,\n  bool supportNamesWithUnderscores,\n  bool permissiveEnums,\n) {\n  final context = JsonParsingContext(\n    ignoreUnknownFields,\n    supportNamesWithUnderscores,\n    permissiveEnums,\n  );\n  return _mergeFromProto3JsonWithContext(json, fieldSet, typeRegistry, context);\n}\n\n/// Merge a JSON object representing a message in proto3 JSON format ([json])\n/// to [fieldSet].\nvoid _mergeFromProto3JsonWithContext(\n  Object? json,\n  FieldSet fieldSet,\n  TypeRegistry typeRegistry,\n  JsonParsingContext context,\n) {\n  fieldSet._ensureWritable();\n\n  void recursionHelper(Object? json, FieldSet fieldSet) {\n    // Convert a JSON object to proto object. Returns `null` on unknown enum\n    // values when [ignoreUnknownFields] is [true].\n    Object? convertProto3JsonValue(Object value, FieldInfo fieldInfo) {\n      final fieldType = fieldInfo.type;\n      switch (PbFieldType.baseType(fieldType)) {\n        case PbFieldType.BOOL_BIT:\n          if (value is bool) {\n            return value;\n          }\n          throw context.parseException('Expected bool value', json);\n        case PbFieldType.BYTES_BIT:\n          if (value is String) {\n            try {\n              return base64Decode(value);\n            } on FormatException {\n              throw context.parseException(\n                'Expected bytes encoded as base64 String',\n                json,\n              );\n            }\n          }\n          throw context.parseException(\n            'Expected bytes encoded as base64 String',\n            value,\n          );\n        case PbFieldType.STRING_BIT:\n          if (value is String) {\n            return value;\n          }\n          throw context.parseException('Expected String value', value);\n        case PbFieldType.FLOAT_BIT:\n        case PbFieldType.DOUBLE_BIT:\n          if (value is double) {\n            return value;\n          } else if (value is num) {\n            return value.toDouble();\n          } else if (value is String) {\n            return double.tryParse(value) ??\n                (throw context.parseException(\n                  'Expected String to encode a double',\n                  value,\n                ));\n          }\n          throw context.parseException(\n            'Expected a double represented as a String or number',\n            value,\n          );\n        case PbFieldType.ENUM_BIT:\n          if (value is String) {\n            // TODO(sigurdm): Do we want to avoid linear search here? Measure...\n            final result =\n                context.permissiveEnums\n                    ? fieldInfo.enumValues!.findFirst(\n                      (e) => permissiveCompare(e.name, value),\n                    )\n                    : fieldInfo.enumValues!.findFirst((e) => e.name == value);\n            if ((result != null) || context.ignoreUnknownFields) return result;\n            throw context.parseException('Unknown enum value', value);\n          } else if (value is int) {\n            return fieldInfo.valueOf!(value) ??\n                (context.ignoreUnknownFields\n                    ? null\n                    : (throw context.parseException(\n                      'Unknown enum value',\n                      value,\n                    )));\n          }\n          throw context.parseException(\n            'Expected enum as a string or integer',\n            value,\n          );\n        case PbFieldType.UINT32_BIT:\n        case PbFieldType.FIXED32_BIT:\n          int result;\n          if (value is int) {\n            result = value;\n          } else if (value is String) {\n            result = Proto3ParseUtils.tryParse32Bit(value, context);\n          } else {\n            throw context.parseException(\n              'Expected int or stringified int',\n              value,\n            );\n          }\n          return Proto3ParseUtils.check32BitUnsigned(result, context);\n        case PbFieldType.INT32_BIT:\n        case PbFieldType.SINT32_BIT:\n        case PbFieldType.SFIXED32_BIT:\n          int result;\n          if (value is int) {\n            result = value;\n          } else if (value is String) {\n            result = Proto3ParseUtils.tryParse32Bit(value, context);\n          } else {\n            throw context.parseException(\n              'Expected int or stringified int',\n              value,\n            );\n          }\n          Proto3ParseUtils.check32BitSigned(result, context);\n          return result;\n        case PbFieldType.UINT64_BIT:\n          Int64 result;\n          if (value is int) {\n            result = Int64(value);\n          } else if (value is String) {\n            result = Proto3ParseUtils.tryParse64Bit(json, value, context);\n          } else {\n            throw context.parseException(\n              'Expected int or stringified int',\n              value,\n            );\n          }\n          return result;\n        case PbFieldType.INT64_BIT:\n        case PbFieldType.SINT64_BIT:\n        case PbFieldType.FIXED64_BIT:\n        case PbFieldType.SFIXED64_BIT:\n          if (value is int) return Int64(value);\n          if (value is String) {\n            try {\n              return Int64.parseInt(value);\n            } on FormatException {\n              throw context.parseException(\n                'Expected int or stringified int',\n                value,\n              );\n            }\n          }\n          throw context.parseException(\n            'Expected int or stringified int',\n            value,\n          );\n        case PbFieldType.GROUP_BIT:\n        case PbFieldType.MESSAGE_BIT:\n          final subMessage = fieldInfo.subBuilder!();\n          recursionHelper(value, subMessage._fieldSet);\n          return subMessage;\n        default:\n          throw StateError('Unknown type $fieldType');\n      }\n    }\n\n    Object decodeMapKey(String key, int fieldType) {\n      switch (PbFieldType.baseType(fieldType)) {\n        case PbFieldType.BOOL_BIT:\n          switch (key) {\n            case 'true':\n              return true;\n            case 'false':\n              return false;\n            default:\n              throw context.parseException(\n                'Wrong boolean key, should be one of (\"true\", \"false\")',\n                key,\n              );\n          }\n        case PbFieldType.STRING_BIT:\n          return key;\n        case PbFieldType.UINT64_BIT:\n          // TODO(sigurdm): We do not throw on negative values here.\n          // That would probably require going via bignum.\n          return Proto3ParseUtils.tryParse64Bit(json, key, context);\n        case PbFieldType.INT64_BIT:\n        case PbFieldType.SINT64_BIT:\n        case PbFieldType.SFIXED64_BIT:\n        case PbFieldType.FIXED64_BIT:\n          return Proto3ParseUtils.tryParse64Bit(json, key, context);\n        case PbFieldType.INT32_BIT:\n        case PbFieldType.SINT32_BIT:\n        case PbFieldType.FIXED32_BIT:\n        case PbFieldType.SFIXED32_BIT:\n          return Proto3ParseUtils.check32BitSigned(\n            Proto3ParseUtils.tryParse32Bit(key, context),\n            context,\n          );\n        case PbFieldType.UINT32_BIT:\n          return Proto3ParseUtils.check32BitUnsigned(\n            Proto3ParseUtils.tryParse32Bit(key, context),\n            context,\n          );\n        default:\n          throw StateError('Not a valid key type $fieldType');\n      }\n    }\n\n    if (json == null) {\n      // `null` represents the default value. Do nothing more.\n      return;\n    }\n\n    final meta = fieldSet._meta;\n    final wellKnownType = meta._wellKnownType;\n    if (wellKnownType != null) {\n      switch (wellKnownType) {\n        case WellKnownType.any:\n          AnyMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.timestamp:\n          TimestampMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.duration:\n          DurationMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.struct:\n          StructMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.value:\n          ValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.listValue:\n          ListValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.fieldMask:\n          FieldMaskMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.doubleValue:\n          DoubleValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.floatValue:\n          FloatValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.int64Value:\n          Int64ValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.uint64Value:\n          UInt64ValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.int32Value:\n          Int32ValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.uint32Value:\n          UInt32ValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.boolValue:\n          BoolValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.stringValue:\n          StringValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n        case WellKnownType.bytesValue:\n          BytesValueMixin.fromProto3JsonHelper(\n            fieldSet._message!,\n            json,\n            typeRegistry,\n            context,\n          );\n          return;\n      }\n\n      // [WellKnownType] could be used to for messages which have special\n      // encodings in other codecs. The set of messages which special encodings\n      // in proto3json is handled here, so we intentionally fall through to the\n      // default message handling rather than throwing.\n    }\n\n    if (json is Map) {\n      final byName = meta.byName;\n\n      json.forEach((key, Object? value) {\n        if (value == null) {\n          return;\n        }\n        if (key is! String) {\n          throw context.parseException('Key was not a String', key);\n        }\n        context.addMapIndex(key);\n\n        var fieldInfo = byName[key];\n        if (fieldInfo == null && context.supportNamesWithUnderscores) {\n          // We don't optimize for field names with underscores, instead do a\n          // linear search for the index.\n          fieldInfo = byName.values.findFirst(\n            (FieldInfo info) => info.protoName == key,\n          );\n        }\n        if (fieldInfo == null) {\n          if (context.ignoreUnknownFields) {\n            return;\n          } else {\n            throw context.parseException('Unknown field name \\'$key\\'', key);\n          }\n        }\n\n        if (PbFieldType.isMapField(fieldInfo.type)) {\n          if (value is Map) {\n            final mapFieldInfo = fieldInfo as MapFieldInfo<dynamic, dynamic>;\n            final Map fieldValues = fieldSet._ensureMapField(meta, fieldInfo);\n            value.forEach((subKey, subValue) {\n              if (subKey is! String) {\n                throw context.parseException('Expected a String key', subKey);\n              }\n              context.addMapIndex(subKey);\n              final key = decodeMapKey(subKey, mapFieldInfo.keyFieldType);\n              final value = convertProto3JsonValue(\n                subValue,\n                mapFieldInfo.valueFieldInfo,\n              );\n              if (value != null) {\n                fieldValues[key] = value;\n              }\n              context.popIndex();\n            });\n          } else {\n            throw context.parseException('Expected a map', value);\n          }\n        } else if (PbFieldType.isRepeated(fieldInfo.type)) {\n          if (value is List) {\n            final values = fieldSet._ensureRepeatedField(meta, fieldInfo);\n            for (var i = 0; i < value.length; i++) {\n              final entry = value[i];\n              context.addListIndex(i);\n              final parsedValue = convertProto3JsonValue(entry, fieldInfo);\n              if (parsedValue != null) {\n                values.add(parsedValue);\n              }\n              context.popIndex();\n            }\n          } else {\n            throw context.parseException('Expected a list', value);\n          }\n        } else if (PbFieldType.isGroupOrMessage(fieldInfo.type)) {\n          // TODO(sigurdm) consider a cleaner separation between parsing and\n          // merging.\n          final parsedSubMessage =\n              convertProto3JsonValue(value, fieldInfo) as GeneratedMessage;\n          final GeneratedMessage? original = fieldSet._values[fieldInfo.index!];\n          if (original == null) {\n            fieldSet._setNonExtensionFieldUnchecked(\n              meta,\n              fieldInfo,\n              parsedSubMessage,\n            );\n          } else {\n            original.mergeFromMessage(parsedSubMessage);\n          }\n        } else {\n          final parsedValue = convertProto3JsonValue(value, fieldInfo);\n          if (parsedValue == null) {\n            // Unknown enum\n            if (!context.ignoreUnknownFields) {\n              throw context.parseException('Unknown enum value', value);\n            }\n          } else {\n            fieldSet._setFieldUnchecked(meta, fieldInfo, parsedValue);\n          }\n        }\n        context.popIndex();\n      });\n    } else {\n      throw context.parseException('Expected JSON object', json);\n    }\n  }\n\n  recursionHelper(json, fieldSet);\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/protobuf_enum.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// ignore_for_file: non_constant_identifier_names\n\npart of 'internal.dart';\n\n/// A base class for all proto enum types.\n///\n/// All proto `enum` classes inherit from [ProtobufEnum]. For example, given\n/// the following enum defined in a proto file:\n///\n///     message MyMessage {\n///       enum Color {\n///         RED = 0;\n///         GREEN = 1;\n///         BLUE = 2;\n///       };\n///       // ...\n///     }\n///\n/// the generated Dart file will include a `MyMessage_Color` class that extends\n/// `ProtobufEnum`. It will also include a `const MyMessage_Color` for each of\n/// the three values defined. Here are some examples:\n///\n/// ```\n/// MyMessage_Color.RED  // => a MyMessage_Color instance\n/// MyMessage_Color.GREEN.value  // => 1\n/// MyMessage_Color.GREEN.name   // => \"GREEN\"\n/// ```\nclass ProtobufEnum {\n  /// This enum's integer value, as specified in the .proto file.\n  final int value;\n\n  /// This enum's name, as specified in the .proto file.\n  final String name;\n\n  /// Creates a new constant [ProtobufEnum] using [value] and [name].\n  const ProtobufEnum(this.value, this.name);\n\n  /// This function is for generated code.\n  ///\n  /// Creates a Map for all of the [ProtobufEnum]s in [enumValues], mapping each\n  /// [ProtobufEnum]'s [value] to the [ProtobufEnum].\n  ///\n  /// @nodoc\n  static Map<int, T> initByValue<T extends ProtobufEnum>(List<T> enumValues) {\n    final byValue = <int, T>{};\n    for (final enumValue in enumValues) {\n      byValue[enumValue.value] = enumValue;\n    }\n    return byValue;\n  }\n\n  /// This function is for generated code.\n  ///\n  /// @nodoc\n  static List<T?> $_initByValueList<T extends ProtobufEnum>(\n    List<T> enumValues,\n    int maxEnumValue,\n  ) {\n    final byValue = List<T?>.filled(maxEnumValue + 1, null);\n    for (final enumValue in enumValues) {\n      byValue[enumValue.value] = enumValue;\n    }\n    return byValue;\n  }\n\n  /// Returns this enum's [name] or the [value] if names are not represented.\n  @override\n  String toString() => name == '' ? value.toString() : name;\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/rpc_client.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n/// Client side context for [RpcClient]s.\nclass ClientContext {\n  /// The desired timeout of the RPC call.\n  final Duration? timeout;\n\n  ClientContext({this.timeout});\n}\n\n/// Client-side transport for making calls to a service.\n///\n/// Subclasses implement whatever serialization and networking is needed\n/// to make a call. They should serialize the request to binary or JSON as\n/// appropriate and merge the response into the supplied emptyResponse\n/// before returning it.\n///\n/// The protoc plugin generates a client-side stub for each service that\n/// takes an RpcClient as a constructor parameter.\nabstract class RpcClient {\n  /// Sends a request to a server and returns the reply.\n  ///\n  /// The implementation should serialize the request as binary or JSON, as\n  /// appropriate. It should merge the reply into [emptyResponse] and\n  /// return it.\n  Future<T> invoke<T extends GeneratedMessage>(\n    ClientContext? ctx,\n    String serviceName,\n    String methodName,\n    GeneratedMessage request,\n    T emptyResponse,\n  );\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/type_registry.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport '../../protobuf.dart';\n\n/// A TypeRegistry is used to resolve Any messages in the proto3 JSON conversion.\n///\n/// You must provide a TypeRegistry containing all message types used in\n/// Any message fields, or the JSON conversion will fail because data\n/// in Any message fields is unrecognizable. You don't need to supply a\n/// TypeRegistry if you don't use Any message fields.\nclass TypeRegistry {\n  final Map<String, BuilderInfo> _mapping;\n\n  /// Constructs a new TypeRegistry recognizing the given types of messages.\n  ///\n  /// You can use an empty message of the given type to represent the type. Eg:\n  ///\n  /// ```dart\n  /// TypeRegistry([Foo(), Bar()]);\n  /// ```\n  TypeRegistry(Iterable<GeneratedMessage> types)\n    : _mapping = Map.fromEntries(\n        types.map(\n          (message) =>\n              MapEntry(message.info_.qualifiedMessageName, message.info_),\n        ),\n      );\n\n  const TypeRegistry.empty() : _mapping = const {};\n\n  BuilderInfo? lookup(String qualifiedName) {\n    return _mapping[qualifiedName];\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/unknown_field_set.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n/// A set of unknown fields in a [GeneratedMessage].\nclass UnknownFieldSet {\n  static final UnknownFieldSet emptyUnknownFieldSet =\n      UnknownFieldSet().._markReadOnly();\n\n  final Map<int, UnknownFieldSetField> _fields;\n\n  UnknownFieldSet() : _fields = <int, UnknownFieldSetField>{};\n\n  UnknownFieldSet._(this._fields);\n\n  UnknownFieldSet._clone(UnknownFieldSet unknownFieldSet)\n    : _fields = <int, UnknownFieldSetField>{} {\n    mergeFromUnknownFieldSet(unknownFieldSet);\n  }\n\n  UnknownFieldSet clone() => UnknownFieldSet._clone(this);\n\n  bool get isEmpty => _fields.isEmpty;\n  bool get isNotEmpty => _fields.isNotEmpty;\n  bool _isReadOnly = false;\n\n  Map<int, UnknownFieldSetField> asMap() => Map.from(_fields);\n\n  void clear() {\n    _ensureWritable('clear');\n    _fields.clear();\n  }\n\n  void clearField(int tagNumber) {\n    _ensureWritable('clearField');\n    _fields.remove(tagNumber);\n  }\n\n  UnknownFieldSetField? getField(int tagNumber) => _fields[tagNumber];\n\n  bool hasField(int tagNumber) => _fields.containsKey(tagNumber);\n\n  void addField(int number, UnknownFieldSetField field) {\n    _ensureWritable('addField');\n    _checkFieldNumber(number);\n    _fields[number] = field;\n  }\n\n  void mergeField(int number, UnknownFieldSetField field) {\n    _ensureWritable('mergeField');\n    _getField(number)\n      ..varints.addAll(field.varints)\n      ..fixed32s.addAll(field.fixed32s)\n      ..fixed64s.addAll(field.fixed64s)\n      ..lengthDelimited.addAll(field.lengthDelimited)\n      ..groups.addAll(field.groups);\n  }\n\n  bool mergeFieldFromBuffer(int tag, CodedBufferReader input) {\n    _ensureWritable('mergeFieldFromBuffer');\n    final number = getTagFieldNumber(tag);\n    switch (getTagWireType(tag)) {\n      case WIRETYPE_VARINT:\n        mergeVarintField(number, input.readInt64());\n        return true;\n      case WIRETYPE_FIXED64:\n        mergeFixed64Field(number, input.readFixed64());\n        return true;\n      case WIRETYPE_LENGTH_DELIMITED:\n        mergeLengthDelimitedField(number, input.readBytes());\n        return true;\n      case WIRETYPE_START_GROUP:\n        final subGroup = input.readUnknownFieldSetGroup(number);\n        mergeGroupField(number, subGroup);\n        return true;\n      case WIRETYPE_END_GROUP:\n        return false;\n      case WIRETYPE_FIXED32:\n        mergeFixed32Field(number, input.readFixed32());\n        return true;\n      default:\n        throw InvalidProtocolBufferException.invalidWireType();\n    }\n  }\n\n  void mergeFromCodedBufferReader(CodedBufferReader input) {\n    _ensureWritable('mergeFromCodedBufferReader');\n    while (true) {\n      final tag = input.readTag();\n      if (tag == 0 || !mergeFieldFromBuffer(tag, input)) {\n        break;\n      }\n    }\n  }\n\n  void mergeFromUnknownFieldSet(UnknownFieldSet other) {\n    _ensureWritable('mergeFromUnknownFieldSet');\n    for (final key in other._fields.keys) {\n      mergeField(key, other._fields[key]!);\n    }\n  }\n\n  void _checkFieldNumber(int number) {\n    if (number == 0) {\n      throw ArgumentError('Zero is not a valid field number.');\n    }\n  }\n\n  void mergeFixed32Field(int number, int value) {\n    _ensureWritable('mergeFixed32Field');\n    _getField(number).addFixed32(value);\n  }\n\n  void mergeFixed64Field(int number, Int64 value) {\n    _ensureWritable('mergeFixed64Field');\n    _getField(number).addFixed64(value);\n  }\n\n  void mergeGroupField(int number, UnknownFieldSet value) {\n    _ensureWritable('mergeGroupField');\n    _getField(number).addGroup(value);\n  }\n\n  void mergeLengthDelimitedField(int number, List<int> value) {\n    _ensureWritable('mergeLengthDelimitedField');\n    _getField(number).addLengthDelimited(value);\n  }\n\n  void mergeVarintField(int number, Int64 value) {\n    _ensureWritable('mergeVarintField');\n    _getField(number).addVarint(value);\n  }\n\n  UnknownFieldSetField _getField(int number) {\n    _checkFieldNumber(number);\n    if (_isReadOnly) assert(_fields.containsKey(number));\n    return _fields.putIfAbsent(number, UnknownFieldSetField.new);\n  }\n\n  @override\n  bool operator ==(Object other) {\n    if (other is! UnknownFieldSet) return false;\n\n    final o = other;\n    return areMapsEqual(o._fields, _fields);\n  }\n\n  @override\n  int get hashCode {\n    var hash = 0;\n    _fields.forEach((int number, Object value) {\n      hash = 0x1fffffff & ((37 * hash) + number);\n      hash = 0x1fffffff & ((53 * hash) + value.hashCode);\n    });\n    return hash;\n  }\n\n  @override\n  String toString() => _toString('');\n\n  String _toString(String indent) {\n    final stringBuffer = StringBuffer();\n\n    for (final tag in sorted(_fields.keys)) {\n      final field = _fields[tag]!;\n      for (final value in field.values) {\n        if (value is UnknownFieldSet) {\n          stringBuffer\n            ..write('$indent$tag: {\\n')\n            ..write(value._toString('$indent  '))\n            ..write('$indent}\\n');\n        } else {\n          stringBuffer.write('$indent$tag: $value\\n');\n        }\n      }\n    }\n\n    return stringBuffer.toString();\n  }\n\n  void writeTextFormat(StringSink out, int indentLevel) {\n    for (final tag in sorted(_fields.keys)) {\n      final field = _fields[tag]!;\n      _writeUnknownFieldSetField(out, tag, field, indentLevel);\n    }\n  }\n\n  void _writeUnknownFieldSetField(\n    StringSink out,\n    int tag,\n    UnknownFieldSetField field,\n    int indentLevel,\n  ) {\n    void writeIndent(StringSink out, int indentLevel) {\n      for (var i = 0; i < indentLevel; i++) {\n        out.writeCharCode(32);\n        out.writeCharCode(32);\n      }\n    }\n\n    for (final value in field.varints) {\n      writeIndent(out, indentLevel);\n      out.write('$tag: ');\n      final bi = value.toInt64();\n      out.write(bi.toStringUnsigned());\n      out.write('\\n');\n    }\n    for (final value in field.fixed32s) {\n      writeIndent(out, indentLevel);\n      out.write(\n        '$tag: 0x${value.toUnsigned(32).toRadixString(16).padLeft(8, '0')}\\n',\n      );\n    }\n    for (final value in field.fixed64s) {\n      writeIndent(out, indentLevel);\n      out.write('$tag: ');\n      out.write('0x${value.toRadixStringUnsigned(16).padLeft(16, '0')}\\n');\n    }\n    for (final value in field.lengthDelimited) {\n      writeIndent(out, indentLevel);\n      out.write('$tag: ');\n      try {\n        final ufs =\n            UnknownFieldSet()\n              ..mergeFromCodedBufferReader(CodedBufferReader(value));\n        out.write('{\\n');\n        ufs.writeTextFormat(out, indentLevel + 1);\n        writeIndent(out, indentLevel);\n        out.write('}\\n');\n      } on InvalidProtocolBufferException {\n        out.write('\"');\n        escapeBytes(value, out);\n        out.write('\"\\n');\n      }\n    }\n    for (final value in field.groups) {\n      writeIndent(out, indentLevel);\n      out.write('$tag {\\n');\n      value.writeTextFormat(out, indentLevel + 1);\n      writeIndent(out, indentLevel);\n      out.write('}\\n');\n    }\n  }\n\n  void writeToCodedBufferWriter(CodedBufferWriter output) {\n    for (final entry in _fields.entries) {\n      entry.value.writeTo(entry.key, output);\n    }\n  }\n\n  void _markReadOnly() {\n    if (_isReadOnly) return;\n    for (final f in _fields.values) {\n      f._markReadOnly();\n    }\n    _isReadOnly = true;\n  }\n\n  void _ensureWritable(String methodName) {\n    if (_isReadOnly) {\n      _throwFrozenMessageModificationError('UnknownFieldSet', methodName);\n    }\n  }\n\n  UnknownFieldSet _deepCopy() {\n    Map<int, UnknownFieldSetField> newFields = {};\n    for (final entry in _fields.entries) {\n      final key = entry.key;\n      final value = entry.value;\n      newFields[key] = value._deepCopy();\n    }\n    return UnknownFieldSet._(newFields);\n  }\n}\n\n/// An unknown field in a [UnknownFieldSet].\nclass UnknownFieldSetField {\n  List<List<int>> _lengthDelimited = <List<int>>[];\n  List<Int64> _varints = <Int64>[];\n  List<int> _fixed32s = <int>[];\n  List<Int64> _fixed64s = <Int64>[];\n  List<UnknownFieldSet> _groups = <UnknownFieldSet>[];\n\n  List<List<int>> get lengthDelimited => _lengthDelimited;\n  List<Int64> get varints => _varints;\n  List<int> get fixed32s => _fixed32s;\n  List<Int64> get fixed64s => _fixed64s;\n  List<UnknownFieldSet> get groups => _groups;\n\n  UnknownFieldSetField()\n    : _lengthDelimited = <List<int>>[],\n      _varints = <Int64>[],\n      _fixed32s = <int>[],\n      _fixed64s = <Int64>[],\n      _groups = <UnknownFieldSet>[];\n\n  UnknownFieldSetField._(\n    this._lengthDelimited,\n    this._varints,\n    this._fixed32s,\n    this._fixed64s,\n    this._groups,\n  );\n\n  bool _isReadOnly = false;\n\n  void _markReadOnly() {\n    if (_isReadOnly) return;\n    _isReadOnly = true;\n    _lengthDelimited = List.unmodifiable(_lengthDelimited);\n    _varints = List.unmodifiable(_varints);\n    _fixed32s = List.unmodifiable(_fixed32s);\n    _fixed64s = List.unmodifiable(_fixed64s);\n    _groups = List.unmodifiable(_groups);\n  }\n\n  @override\n  bool operator ==(Object other) {\n    if (other is! UnknownFieldSetField) return false;\n\n    final o = other;\n    if (lengthDelimited.length != o.lengthDelimited.length) return false;\n    for (var i = 0; i < lengthDelimited.length; i++) {\n      if (!areListsEqual(o.lengthDelimited[i], lengthDelimited[i])) {\n        return false;\n      }\n    }\n    if (!areListsEqual(o.varints, varints)) return false;\n    if (!areListsEqual(o.fixed32s, fixed32s)) return false;\n    if (!areListsEqual(o.fixed64s, fixed64s)) return false;\n    if (!areListsEqual(o.groups, groups)) return false;\n\n    return true;\n  }\n\n  @override\n  int get hashCode {\n    var hash = 0;\n    for (final value in lengthDelimited) {\n      for (var i = 0; i < value.length; i++) {\n        hash = 0x1fffffff & (hash + value[i]);\n        hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));\n        hash = hash ^ (hash >> 6);\n      }\n      hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));\n      hash = hash ^ (hash >> 11);\n      hash = 0x1fffffff & (hash + ((0x00003fff & hash) << 15));\n    }\n    for (final value in varints) {\n      hash = 0x1fffffff & (hash + (7 * value.hashCode));\n    }\n    for (final value in fixed32s) {\n      hash = 0x1fffffff & (hash + (37 * value.hashCode));\n    }\n    for (final value in fixed64s) {\n      hash = 0x1fffffff & (hash + (53 * value.hashCode));\n    }\n    for (final value in groups) {\n      hash = 0x1fffffff & (hash + value.hashCode);\n    }\n    return hash;\n  }\n\n  List get values => [\n    ...lengthDelimited,\n    ...varints,\n    ...fixed32s,\n    ...fixed64s,\n    ...groups,\n  ];\n\n  void writeTo(int fieldNumber, CodedBufferWriter output) {\n    void write(int type, value) {\n      output.writeField(fieldNumber, type, value);\n    }\n\n    write(PbFieldType.REPEATED_UINT64, varints);\n    write(PbFieldType.REPEATED_FIXED32, fixed32s);\n    write(PbFieldType.REPEATED_FIXED64, fixed64s);\n    write(PbFieldType.REPEATED_BYTES, lengthDelimited);\n    write(PbFieldType.REPEATED_GROUP, groups);\n  }\n\n  void addGroup(UnknownFieldSet value) {\n    groups.add(value);\n  }\n\n  void addLengthDelimited(List<int> value) {\n    lengthDelimited.add(value);\n  }\n\n  void addFixed32(int value) {\n    fixed32s.add(value);\n  }\n\n  void addFixed64(Int64 value) {\n    fixed64s.add(value);\n  }\n\n  void addVarint(Int64 value) {\n    varints.add(value);\n  }\n\n  UnknownFieldSetField _deepCopy() {\n    final newLengthDelimited = List<List<int>>.from(_lengthDelimited);\n    final newVarints = List<Int64>.from(_varints);\n    final newFixed32s = List<int>.from(_fixed32s);\n    final newFixed64s = List<Int64>.from(_fixed64s);\n\n    final newGroups = <UnknownFieldSet>[];\n    for (final group in _groups) {\n      newGroups.add(group._deepCopy());\n    }\n\n    return UnknownFieldSetField._(\n      newLengthDelimited,\n      newVarints,\n      newFixed32s,\n      newFixed64s,\n      newGroups,\n    );\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/unpack.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of 'internal.dart';\n\n/// Unpacks the message in [value] into [instance].\n///\n/// Throws a [InvalidProtocolBufferException] if [typeUrl] does not correspond\n/// with the type of [instance].\n///\n/// This is a helper method for `Any.unpackInto`.\n///\n/// @nodoc\nvoid unpackIntoHelper<T extends GeneratedMessage>(\n  List<int> value,\n  T instance,\n  String typeUrl, {\n  ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY,\n}) {\n  // From \"google/protobuf/any.proto\":\n  //\n  //   The pack methods provided by protobuf library will by default use\n  //   'type.googleapis.com/full.type.name' as the type URL and the unpack\n  //   methods only use the fully qualified type name after the last '/'\n  //   in the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n  //   name \"y.z\".\n  if (!canUnpackIntoHelper(instance, typeUrl)) {\n    final typeName = instance.info_.qualifiedMessageName;\n    throw InvalidProtocolBufferException.wrongAnyMessage(\n      _typeNameFromUrl(typeUrl),\n      typeName,\n    );\n  }\n  instance.mergeFromBuffer(value, extensionRegistry);\n}\n\n/// Returns `true` if the type of [instance] is described by\n/// `typeUrl`.\n///\n/// This is a helper method for `Any.canUnpackInto`.\n///\n/// @nodoc\nbool canUnpackIntoHelper(GeneratedMessage instance, String typeUrl) {\n  return instance.info_.qualifiedMessageName == _typeNameFromUrl(typeUrl);\n}\n\nString _typeNameFromUrl(String typeUrl) {\n  final index = typeUrl.lastIndexOf('/');\n  return index == -1 ? '' : typeUrl.substring(index + 1);\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/utils.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart' show Int64;\n\nimport 'internal.dart';\nimport 'json_parsing_context.dart';\n\n/// Type of a function that checks items added to `PbList` and `PbMap`.\n///\n/// Throws [ArgumentError] or [RangeError] when the item is not valid.\ntypedef CheckFunc<E> = void Function(E? x);\n\n// TODO(antonm): reconsider later if PbList should take care of equality.\nbool deepEquals(Object? lhs, Object? rhs) {\n  // Some GeneratedMessages implement Map, so test this first.\n  if (lhs is GeneratedMessage) return lhs == rhs;\n  if (rhs is GeneratedMessage) return false;\n  if ((lhs is List) && (rhs is List)) return areListsEqual(lhs, rhs);\n  if ((lhs is Map) && (rhs is Map)) return areMapsEqual(lhs, rhs);\n  return lhs == rhs;\n}\n\nbool areListsEqual(List<Object?> lhs, List<Object?> rhs) {\n  if (lhs.length != rhs.length) return false;\n  for (var i = 0; i < lhs.length; i++) {\n    if (!deepEquals(lhs[i], rhs[i])) return false;\n  }\n  return true;\n}\n\nbool areMapsEqual(Map<Object?, Object?> lhs, Map<Object?, Object?> rhs) {\n  if (lhs.length != rhs.length) return false;\n  return lhs.keys.every((key) => deepEquals(lhs[key], rhs[key]));\n}\n\nList<T> sorted<T>(Iterable<T> list) => List.from(list)..sort();\n\n/// Escapes slash, double quotes, and newlines in [s] with \\ as needed\n/// for a TextFormat string.\n///\n/// This is a copy of the official Java implementation: https://github.com/protocolbuffers/protobuf/blob/main/java/core/src/main/java/com/google/protobuf/TextFormat.java#L632\nString escapeString(String s) {\n  return s\n      .replaceAll('\\\\', '\\\\\\\\')\n      .replaceAll('\"', '\\\\\"')\n      .replaceAll('\\n', '\\\\n');\n}\n\n/// Appends the characters of [bytes] to [out] while escaping them as needed\n/// for a TextFormat string.\n///\n/// See TextFormat spec in https://protobuf.dev/reference/protobuf/textformat-spec/\n/// This is a copy of the official Java implementation: https://github.com/protocolbuffers/protobuf/blob/main/java/core/src/main/java/com/google/protobuf/TextFormatEscaper.java#L40\nvoid escapeBytes(List<int> bytes, StringSink out) {\n  for (final byte in bytes) {\n    // Only ASCII characters between 0x20 (space) and 0x7e (tilde) are\n    // printable.  Other byte values must be escaped.\n    switch (byte) {\n      case 0x07:\n        out.write(r'\\a');\n      case 0x08:\n        out.write(r'\\b');\n      case 0x0c:\n        out.write(r'\\f');\n      case 0x0a:\n        out.write(r'\\n');\n      case 0x0d:\n        out.write(r'\\r');\n      case 0x09:\n        out.write(r'\\t');\n      case 0x0b:\n        out.write(r'\\v');\n      default:\n        if (byte >= 0x20 && byte < 0x7f) {\n          if (byte == 0x22 /* \" */ || byte == 0x5c /* \\ */ ) {\n            out.write(r'\\');\n          }\n          out.writeCharCode(byte);\n        } else {\n          out.write(r'\\');\n          out.write(((byte >> 6) & 3).toString());\n          out.write(((byte >> 3) & 7).toString());\n          out.write((byte & 7).toString());\n        }\n    }\n  }\n}\n\nclass HashUtils {\n  // Jenkins hash functions copied from\n  // https://github.com/google/quiver-dart/blob/master/lib/src/core/hash.dart.\n\n  static int combine(int hash, int value) {\n    hash = 0x1fffffff & (hash + value);\n    hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));\n    return hash ^ (hash >> 6);\n  }\n\n  static int _finish(int hash) {\n    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));\n    hash = hash ^ (hash >> 11);\n    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));\n  }\n\n  /// Generates a hash code for multiple [objects].\n  static int hashObjects(Iterable objects) =>\n      _finish(objects.fold(0, (h, i) => combine(h, i.hashCode)));\n\n  /// Generates a hash code for two objects.\n  static int hash2(dynamic a, dynamic b) =>\n      _finish(combine(combine(0, a.hashCode), b.hashCode));\n}\n\nclass Proto3ParseUtils {\n  static int tryParse32Bit(String s, JsonParsingContext context) {\n    return int.tryParse(s) ??\n        (throw context.parseException('expected integer', s));\n  }\n\n  static int check32BitSigned(int n, JsonParsingContext context) {\n    if (n < -2147483648 || n > 2147483647) {\n      throw context.parseException('expected 32 bit signed integer', n);\n    }\n    return n;\n  }\n\n  static int check32BitUnsigned(int n, JsonParsingContext context) {\n    if (n < 0 || n > 0xFFFFFFFF) {\n      throw context.parseException('expected 32 bit unsigned integer', n);\n    }\n    return n;\n  }\n\n  static Int64 tryParse64Bit(\n    Object? json,\n    String s,\n    JsonParsingContext context,\n  ) {\n    try {\n      return Int64.parseInt(s);\n    } on FormatException {\n      throw context.parseException('expected integer', json);\n    }\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/src/protobuf/wire_format.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// ignore_for_file: constant_identifier_names\n\npart of 'internal.dart';\n\nconst int _TAG_TYPE_BITS = 3;\nconst int _TAG_TYPE_MASK = (1 << _TAG_TYPE_BITS) - 1;\n\n/// @nodoc\nconst int WIRETYPE_VARINT = 0;\n\n/// @nodoc\nconst int WIRETYPE_FIXED64 = 1;\n\n/// @nodoc\nconst int WIRETYPE_LENGTH_DELIMITED = 2;\n\n/// @nodoc\nconst int WIRETYPE_START_GROUP = 3;\n\n/// @nodoc\nconst int WIRETYPE_END_GROUP = 4;\n\n/// @nodoc\nconst int WIRETYPE_FIXED32 = 5;\n\n/// @nodoc\nint getTagFieldNumber(int tag) => tag >> _TAG_TYPE_BITS;\n\n/// @nodoc\nint getTagWireType(int tag) => tag & _TAG_TYPE_MASK;\n\n/// @nodoc\nint makeTag(int fieldNumber, int tag) => (fieldNumber << _TAG_TYPE_BITS) | tag;\n\n/// Returns true if the wireType can be merged into the given fieldType.\nbool _wireTypeMatches(int fieldType, int wireType) {\n  switch (PbFieldType.baseType(fieldType)) {\n    case PbFieldType.BOOL_BIT:\n    case PbFieldType.ENUM_BIT:\n    case PbFieldType.INT32_BIT:\n    case PbFieldType.INT64_BIT:\n    case PbFieldType.SINT32_BIT:\n    case PbFieldType.SINT64_BIT:\n    case PbFieldType.UINT32_BIT:\n    case PbFieldType.UINT64_BIT:\n      return wireType == WIRETYPE_VARINT ||\n          wireType == WIRETYPE_LENGTH_DELIMITED;\n    case PbFieldType.FLOAT_BIT:\n    case PbFieldType.FIXED32_BIT:\n    case PbFieldType.SFIXED32_BIT:\n      return wireType == WIRETYPE_FIXED32 ||\n          wireType == WIRETYPE_LENGTH_DELIMITED;\n    case PbFieldType.DOUBLE_BIT:\n    case PbFieldType.FIXED64_BIT:\n    case PbFieldType.SFIXED64_BIT:\n      return wireType == WIRETYPE_FIXED64 ||\n          wireType == WIRETYPE_LENGTH_DELIMITED;\n    case PbFieldType.BYTES_BIT:\n    case PbFieldType.STRING_BIT:\n    case PbFieldType.MESSAGE_BIT:\n      return wireType == WIRETYPE_LENGTH_DELIMITED;\n    case PbFieldType.GROUP_BIT:\n      return wireType == WIRETYPE_START_GROUP;\n    default:\n      return false;\n  }\n}\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/any.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/any.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package\n// ignore_for_file: implementation_imports, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\nimport 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// `Any` contains an arbitrary serialized protocol buffer message along with a\n/// URL that describes the type of the serialized message.\n///\n/// Protobuf library provides support to pack/unpack Any values in the form\n/// of utility functions or additional generated methods of the Any type.\n///\n/// Example 1: Pack and unpack a message in C++.\n///\n///     Foo foo = ...;\n///     Any any;\n///     any.PackFrom(foo);\n///     ...\n///     if (any.UnpackTo(&foo)) {\n///       ...\n///     }\n///\n/// Example 2: Pack and unpack a message in Java.\n///\n///     Foo foo = ...;\n///     Any any = Any.pack(foo);\n///     ...\n///     if (any.is(Foo.class)) {\n///       foo = any.unpack(Foo.class);\n///     }\n///     // or ...\n///     if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n///       foo = any.unpack(Foo.getDefaultInstance());\n///     }\n///\n///  Example 3: Pack and unpack a message in Python.\n///\n///     foo = Foo(...)\n///     any = Any()\n///     any.Pack(foo)\n///     ...\n///     if any.Is(Foo.DESCRIPTOR):\n///       any.Unpack(foo)\n///       ...\n///\n///  Example 4: Pack and unpack a message in Go\n///\n///      foo := &pb.Foo{...}\n///      any, err := anypb.New(foo)\n///      if err != nil {\n///        ...\n///      }\n///      ...\n///      foo := &pb.Foo{}\n///      if err := any.UnmarshalTo(foo); err != nil {\n///        ...\n///      }\n///\n/// The pack methods provided by protobuf library will by default use\n/// 'type.googleapis.com/full.type.name' as the type URL and the unpack\n/// methods only use the fully qualified type name after the last '/'\n/// in the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n/// name \"y.z\".\n///\n/// JSON\n/// ====\n/// The JSON representation of an `Any` value uses the regular\n/// representation of the deserialized, embedded message, with an\n/// additional field `@type` which contains the type URL. Example:\n///\n///     package google.profile;\n///     message Person {\n///       string first_name = 1;\n///       string last_name = 2;\n///     }\n///\n///     {\n///       \"@type\": \"type.googleapis.com/google.profile.Person\",\n///       \"firstName\": <string>,\n///       \"lastName\": <string>\n///     }\n///\n/// If the embedded message type is well-known and has a custom JSON\n/// representation, that representation will be embedded adding a field\n/// `value` which holds the custom JSON in addition to the `@type`\n/// field. Example (for message [google.protobuf.Duration][]):\n///\n///     {\n///       \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n///       \"value\": \"1.212s\"\n///     }\nclass Any extends $pb.GeneratedMessage with $mixin.AnyMixin {\n  factory Any({\n    $core.String? typeUrl,\n    $core.List<$core.int>? value,\n  }) {\n    final result = create();\n    if (typeUrl != null) result.typeUrl = typeUrl;\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  Any._();\n\n  factory Any.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Any.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Any',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.any)\n    ..aOS(1, _omitFieldNames ? '' : 'typeUrl')\n    ..a<$core.List<$core.int>>(\n        2, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Any clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Any copyWith(void Function(Any) updates) =>\n      super.copyWith((message) => updates(message as Any)) as Any;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Any create() => Any._();\n  @$core.override\n  Any createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Any getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Any>(create);\n  static Any? _defaultInstance;\n\n  /// A URL/resource name that uniquely identifies the type of the serialized\n  /// protocol buffer message. This string must contain at least\n  /// one \"/\" character. The last segment of the URL's path must represent\n  /// the fully qualified name of the type (as in\n  /// `path/google.protobuf.Duration`). The name should be in a canonical form\n  /// (e.g., leading \".\" is not accepted).\n  ///\n  /// In practice, teams usually precompile into the binary all types that they\n  /// expect it to use in the context of Any. However, for URLs which use the\n  /// scheme `http`, `https`, or no scheme, one can optionally set up a type\n  /// server that maps type URLs to message definitions as follows:\n  ///\n  /// * If no scheme is provided, `https` is assumed.\n  /// * An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  ///   value in binary format, or produce an error.\n  /// * Applications are allowed to cache lookup results based on the\n  ///   URL, or have them precompiled into a binary to avoid any\n  ///   lookup. Therefore, binary compatibility needs to be preserved\n  ///   on changes to types. (Use versioned type names to manage\n  ///   breaking changes.)\n  ///\n  /// Note: this functionality is not currently available in the official\n  /// protobuf release, and it is not used for type URLs beginning with\n  /// type.googleapis.com. As of May 2023, there are no widely used type server\n  /// implementations and no plans to implement one.\n  ///\n  /// Schemes other than `http`, `https` (or the empty scheme) might be\n  /// used with implementation specific semantics.\n  @$pb.TagNumber(1)\n  $core.String get typeUrl => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set typeUrl($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasTypeUrl() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearTypeUrl() => $_clearField(1);\n\n  /// Must be a valid serialized protocol buffer of the above specified type.\n  @$pb.TagNumber(2)\n  $core.List<$core.int> get value => $_getN(1);\n  @$pb.TagNumber(2)\n  set value($core.List<$core.int> value) => $_setBytes(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasValue() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearValue() => $_clearField(2);\n\n  /// Creates a new [Any] encoding [message].\n  ///\n  /// The [typeUrl] will be [typeUrlPrefix]/`fullName` where `fullName` is\n  /// the fully qualified name of the type of [message].\n  static Any pack($pb.GeneratedMessage message,\n      {$core.String typeUrlPrefix = 'type.googleapis.com'}) {\n    final result = create();\n    $mixin.AnyMixin.packIntoAny(result, message, typeUrlPrefix: typeUrlPrefix);\n    return result;\n  }\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/any.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/any.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use anyDescriptor instead')\nconst Any$json = {\n  '1': 'Any',\n  '2': [\n    {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'},\n    {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'},\n  ],\n};\n\n/// Descriptor for `Any`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List anyDescriptor = $convert.base64Decode(\n    'CgNBbnkSGQoIdHlwZV91cmwYASABKAlSB3R5cGVVcmwSFAoFdmFsdWUYAiABKAxSBXZhbHVl');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/api.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/api.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\nimport 'package:protobuf/well_known_types/google/protobuf/source_context.pb.dart'\n    as $1;\nimport 'package:protobuf/well_known_types/google/protobuf/type.pb.dart' as $0;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// Api is a light-weight descriptor for an API Interface.\n///\n/// Interfaces are also described as \"protocol buffer services\" in some contexts,\n/// such as by the \"service\" keyword in a .proto file, but they are different\n/// from API Services, which represent a concrete implementation of an interface\n/// as opposed to simply a description of methods and bindings. They are also\n/// sometimes simply referred to as \"APIs\" in other contexts, such as the name of\n/// this message itself. See https://cloud.google.com/apis/design/glossary for\n/// detailed terminology.\n///\n/// New usages of this message as an alternative to ServiceDescriptorProto are\n/// strongly discouraged. This message does not reliability preserve all\n/// information necessary to model the schema and preserve semantics. Instead\n/// make use of FileDescriptorSet which preserves the necessary information.\nclass Api extends $pb.GeneratedMessage {\n  factory Api({\n    $core.String? name,\n    $core.Iterable<Method>? methods,\n    $core.Iterable<$0.Option>? options,\n    $core.String? version,\n    $1.SourceContext? sourceContext,\n    $core.Iterable<Mixin>? mixins,\n    $0.Syntax? syntax,\n    $core.String? edition,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (methods != null) result.methods.addAll(methods);\n    if (options != null) result.options.addAll(options);\n    if (version != null) result.version = version;\n    if (sourceContext != null) result.sourceContext = sourceContext;\n    if (mixins != null) result.mixins.addAll(mixins);\n    if (syntax != null) result.syntax = syntax;\n    if (edition != null) result.edition = edition;\n    return result;\n  }\n\n  Api._();\n\n  factory Api.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Api.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Api',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..pPM<Method>(2, _omitFieldNames ? '' : 'methods',\n        subBuilder: Method.create)\n    ..pPM<$0.Option>(3, _omitFieldNames ? '' : 'options',\n        subBuilder: $0.Option.create)\n    ..aOS(4, _omitFieldNames ? '' : 'version')\n    ..aOM<$1.SourceContext>(5, _omitFieldNames ? '' : 'sourceContext',\n        subBuilder: $1.SourceContext.create)\n    ..pPM<Mixin>(6, _omitFieldNames ? '' : 'mixins', subBuilder: Mixin.create)\n    ..aE<$0.Syntax>(7, _omitFieldNames ? '' : 'syntax',\n        enumValues: $0.Syntax.values)\n    ..aOS(8, _omitFieldNames ? '' : 'edition')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Api clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Api copyWith(void Function(Api) updates) =>\n      super.copyWith((message) => updates(message as Api)) as Api;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Api create() => Api._();\n  @$core.override\n  Api createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Api getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Api>(create);\n  static Api? _defaultInstance;\n\n  /// The fully qualified name of this interface, including package name\n  /// followed by the interface's simple name.\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// The methods of this interface, in unspecified order.\n  @$pb.TagNumber(2)\n  $pb.PbList<Method> get methods => $_getList(1);\n\n  /// Any metadata attached to the interface.\n  @$pb.TagNumber(3)\n  $pb.PbList<$0.Option> get options => $_getList(2);\n\n  /// A version string for this interface. If specified, must have the form\n  /// `major-version.minor-version`, as in `1.10`. If the minor version is\n  /// omitted, it defaults to zero. If the entire version field is empty, the\n  /// major version is derived from the package name, as outlined below. If the\n  /// field is not empty, the version in the package name will be verified to be\n  /// consistent with what is provided here.\n  ///\n  /// The versioning schema uses [semantic\n  /// versioning](http://semver.org) where the major version number\n  /// indicates a breaking change and the minor version an additive,\n  /// non-breaking change. Both version numbers are signals to users\n  /// what to expect from different versions, and should be carefully\n  /// chosen based on the product plan.\n  ///\n  /// The major version is also reflected in the package name of the\n  /// interface, which must end in `v<major-version>`, as in\n  /// `google.feature.v1`. For major versions 0 and 1, the suffix can\n  /// be omitted. Zero major versions must only be used for\n  /// experimental, non-GA interfaces.\n  @$pb.TagNumber(4)\n  $core.String get version => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set version($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasVersion() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearVersion() => $_clearField(4);\n\n  /// Source context for the protocol buffer service represented by this\n  /// message.\n  @$pb.TagNumber(5)\n  $1.SourceContext get sourceContext => $_getN(4);\n  @$pb.TagNumber(5)\n  set sourceContext($1.SourceContext value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasSourceContext() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearSourceContext() => $_clearField(5);\n  @$pb.TagNumber(5)\n  $1.SourceContext ensureSourceContext() => $_ensure(4);\n\n  /// Included interfaces. See [Mixin][].\n  @$pb.TagNumber(6)\n  $pb.PbList<Mixin> get mixins => $_getList(5);\n\n  /// The source syntax of the service.\n  @$pb.TagNumber(7)\n  $0.Syntax get syntax => $_getN(6);\n  @$pb.TagNumber(7)\n  set syntax($0.Syntax value) => $_setField(7, value);\n  @$pb.TagNumber(7)\n  $core.bool hasSyntax() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearSyntax() => $_clearField(7);\n\n  /// The source edition string, only valid when syntax is SYNTAX_EDITIONS.\n  @$pb.TagNumber(8)\n  $core.String get edition => $_getSZ(7);\n  @$pb.TagNumber(8)\n  set edition($core.String value) => $_setString(7, value);\n  @$pb.TagNumber(8)\n  $core.bool hasEdition() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearEdition() => $_clearField(8);\n}\n\n/// Method represents a method of an API interface.\n///\n/// New usages of this message as an alternative to MethodDescriptorProto are\n/// strongly discouraged. This message does not reliability preserve all\n/// information necessary to model the schema and preserve semantics. Instead\n/// make use of FileDescriptorSet which preserves the necessary information.\nclass Method extends $pb.GeneratedMessage {\n  factory Method({\n    $core.String? name,\n    $core.String? requestTypeUrl,\n    $core.bool? requestStreaming,\n    $core.String? responseTypeUrl,\n    $core.bool? responseStreaming,\n    $core.Iterable<$0.Option>? options,\n    @$core.Deprecated('This field is deprecated.') $0.Syntax? syntax,\n    @$core.Deprecated('This field is deprecated.') $core.String? edition,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (requestTypeUrl != null) result.requestTypeUrl = requestTypeUrl;\n    if (requestStreaming != null) result.requestStreaming = requestStreaming;\n    if (responseTypeUrl != null) result.responseTypeUrl = responseTypeUrl;\n    if (responseStreaming != null) result.responseStreaming = responseStreaming;\n    if (options != null) result.options.addAll(options);\n    if (syntax != null) result.syntax = syntax;\n    if (edition != null) result.edition = edition;\n    return result;\n  }\n\n  Method._();\n\n  factory Method.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Method.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Method',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aOS(2, _omitFieldNames ? '' : 'requestTypeUrl')\n    ..aOB(3, _omitFieldNames ? '' : 'requestStreaming')\n    ..aOS(4, _omitFieldNames ? '' : 'responseTypeUrl')\n    ..aOB(5, _omitFieldNames ? '' : 'responseStreaming')\n    ..pPM<$0.Option>(6, _omitFieldNames ? '' : 'options',\n        subBuilder: $0.Option.create)\n    ..aE<$0.Syntax>(7, _omitFieldNames ? '' : 'syntax',\n        enumValues: $0.Syntax.values)\n    ..aOS(8, _omitFieldNames ? '' : 'edition')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Method clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Method copyWith(void Function(Method) updates) =>\n      super.copyWith((message) => updates(message as Method)) as Method;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Method create() => Method._();\n  @$core.override\n  Method createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Method getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Method>(create);\n  static Method? _defaultInstance;\n\n  /// The simple name of this method.\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// A URL of the input message type.\n  @$pb.TagNumber(2)\n  $core.String get requestTypeUrl => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set requestTypeUrl($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasRequestTypeUrl() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearRequestTypeUrl() => $_clearField(2);\n\n  /// If true, the request is streamed.\n  @$pb.TagNumber(3)\n  $core.bool get requestStreaming => $_getBF(2);\n  @$pb.TagNumber(3)\n  set requestStreaming($core.bool value) => $_setBool(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasRequestStreaming() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearRequestStreaming() => $_clearField(3);\n\n  /// The URL of the output message type.\n  @$pb.TagNumber(4)\n  $core.String get responseTypeUrl => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set responseTypeUrl($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasResponseTypeUrl() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearResponseTypeUrl() => $_clearField(4);\n\n  /// If true, the response is streamed.\n  @$pb.TagNumber(5)\n  $core.bool get responseStreaming => $_getBF(4);\n  @$pb.TagNumber(5)\n  set responseStreaming($core.bool value) => $_setBool(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasResponseStreaming() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearResponseStreaming() => $_clearField(5);\n\n  /// Any metadata attached to the method.\n  @$pb.TagNumber(6)\n  $pb.PbList<$0.Option> get options => $_getList(5);\n\n  /// The source syntax of this method.\n  ///\n  /// This field should be ignored, instead the syntax should be inherited from\n  /// Api. This is similar to Field and EnumValue.\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(7)\n  $0.Syntax get syntax => $_getN(6);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(7)\n  set syntax($0.Syntax value) => $_setField(7, value);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(7)\n  $core.bool hasSyntax() => $_has(6);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(7)\n  void clearSyntax() => $_clearField(7);\n\n  /// The source edition string, only valid when syntax is SYNTAX_EDITIONS.\n  ///\n  /// This field should be ignored, instead the edition should be inherited from\n  /// Api. This is similar to Field and EnumValue.\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(8)\n  $core.String get edition => $_getSZ(7);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(8)\n  set edition($core.String value) => $_setString(7, value);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(8)\n  $core.bool hasEdition() => $_has(7);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(8)\n  void clearEdition() => $_clearField(8);\n}\n\n/// Declares an API Interface to be included in this interface. The including\n/// interface must redeclare all the methods from the included interface, but\n/// documentation and options are inherited as follows:\n///\n/// - If after comment and whitespace stripping, the documentation\n///   string of the redeclared method is empty, it will be inherited\n///   from the original method.\n///\n/// - Each annotation belonging to the service config (http,\n///   visibility) which is not set in the redeclared method will be\n///   inherited.\n///\n/// - If an http annotation is inherited, the path pattern will be\n///   modified as follows. Any version prefix will be replaced by the\n///   version of the including interface plus the [root][] path if\n///   specified.\n///\n/// Example of a simple mixin:\n///\n///     package google.acl.v1;\n///     service AccessControl {\n///       // Get the underlying ACL object.\n///       rpc GetAcl(GetAclRequest) returns (Acl) {\n///         option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n///       }\n///     }\n///\n///     package google.storage.v2;\n///     service Storage {\n///       rpc GetAcl(GetAclRequest) returns (Acl);\n///\n///       // Get a data record.\n///       rpc GetData(GetDataRequest) returns (Data) {\n///         option (google.api.http).get = \"/v2/{resource=**}\";\n///       }\n///     }\n///\n/// Example of a mixin configuration:\n///\n///     apis:\n///     - name: google.storage.v2.Storage\n///       mixins:\n///       - name: google.acl.v1.AccessControl\n///\n/// The mixin construct implies that all methods in `AccessControl` are\n/// also declared with same name and request/response types in\n/// `Storage`. A documentation generator or annotation processor will\n/// see the effective `Storage.GetAcl` method after inheriting\n/// documentation and annotations as follows:\n///\n///     service Storage {\n///       // Get the underlying ACL object.\n///       rpc GetAcl(GetAclRequest) returns (Acl) {\n///         option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n///       }\n///       ...\n///     }\n///\n/// Note how the version in the path pattern changed from `v1` to `v2`.\n///\n/// If the `root` field in the mixin is specified, it should be a\n/// relative path under which inherited HTTP paths are placed. Example:\n///\n///     apis:\n///     - name: google.storage.v2.Storage\n///       mixins:\n///       - name: google.acl.v1.AccessControl\n///         root: acls\n///\n/// This implies the following inherited HTTP annotation:\n///\n///     service Storage {\n///       // Get the underlying ACL object.\n///       rpc GetAcl(GetAclRequest) returns (Acl) {\n///         option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n///       }\n///       ...\n///     }\nclass Mixin extends $pb.GeneratedMessage {\n  factory Mixin({\n    $core.String? name,\n    $core.String? root,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (root != null) result.root = root;\n    return result;\n  }\n\n  Mixin._();\n\n  factory Mixin.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Mixin.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Mixin',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aOS(2, _omitFieldNames ? '' : 'root')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Mixin clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Mixin copyWith(void Function(Mixin) updates) =>\n      super.copyWith((message) => updates(message as Mixin)) as Mixin;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Mixin create() => Mixin._();\n  @$core.override\n  Mixin createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Mixin getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Mixin>(create);\n  static Mixin? _defaultInstance;\n\n  /// The fully qualified name of the interface which is included.\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// If non-empty specifies a path under which inherited HTTP paths\n  /// are rooted.\n  @$pb.TagNumber(2)\n  $core.String get root => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set root($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasRoot() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearRoot() => $_clearField(2);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/api.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/api.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use apiDescriptor instead')\nconst Api$json = {\n  '1': 'Api',\n  '2': [\n    {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},\n    {\n      '1': 'methods',\n      '3': 2,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Method',\n      '10': 'methods'\n    },\n    {\n      '1': 'options',\n      '3': 3,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Option',\n      '10': 'options'\n    },\n    {'1': 'version', '3': 4, '4': 1, '5': 9, '10': 'version'},\n    {\n      '1': 'source_context',\n      '3': 5,\n      '4': 1,\n      '5': 11,\n      '6': '.google.protobuf.SourceContext',\n      '10': 'sourceContext'\n    },\n    {\n      '1': 'mixins',\n      '3': 6,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Mixin',\n      '10': 'mixins'\n    },\n    {\n      '1': 'syntax',\n      '3': 7,\n      '4': 1,\n      '5': 14,\n      '6': '.google.protobuf.Syntax',\n      '10': 'syntax'\n    },\n    {'1': 'edition', '3': 8, '4': 1, '5': 9, '10': 'edition'},\n  ],\n};\n\n/// Descriptor for `Api`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List apiDescriptor = $convert.base64Decode(\n    'CgNBcGkSEgoEbmFtZRgBIAEoCVIEbmFtZRIxCgdtZXRob2RzGAIgAygLMhcuZ29vZ2xlLnByb3'\n    'RvYnVmLk1ldGhvZFIHbWV0aG9kcxIxCgdvcHRpb25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVm'\n    'Lk9wdGlvblIHb3B0aW9ucxIYCgd2ZXJzaW9uGAQgASgJUgd2ZXJzaW9uEkUKDnNvdXJjZV9jb2'\n    '50ZXh0GAUgASgLMh4uZ29vZ2xlLnByb3RvYnVmLlNvdXJjZUNvbnRleHRSDXNvdXJjZUNvbnRl'\n    'eHQSLgoGbWl4aW5zGAYgAygLMhYuZ29vZ2xlLnByb3RvYnVmLk1peGluUgZtaXhpbnMSLwoGc3'\n    'ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRheFIGc3ludGF4EhgKB2VkaXRpb24Y'\n    'CCABKAlSB2VkaXRpb24=');\n\n@$core.Deprecated('Use methodDescriptor instead')\nconst Method$json = {\n  '1': 'Method',\n  '2': [\n    {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},\n    {'1': 'request_type_url', '3': 2, '4': 1, '5': 9, '10': 'requestTypeUrl'},\n    {\n      '1': 'request_streaming',\n      '3': 3,\n      '4': 1,\n      '5': 8,\n      '10': 'requestStreaming'\n    },\n    {'1': 'response_type_url', '3': 4, '4': 1, '5': 9, '10': 'responseTypeUrl'},\n    {\n      '1': 'response_streaming',\n      '3': 5,\n      '4': 1,\n      '5': 8,\n      '10': 'responseStreaming'\n    },\n    {\n      '1': 'options',\n      '3': 6,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Option',\n      '10': 'options'\n    },\n    {\n      '1': 'syntax',\n      '3': 7,\n      '4': 1,\n      '5': 14,\n      '6': '.google.protobuf.Syntax',\n      '8': {'3': true},\n      '10': 'syntax',\n    },\n    {\n      '1': 'edition',\n      '3': 8,\n      '4': 1,\n      '5': 9,\n      '8': {'3': true},\n      '10': 'edition',\n    },\n  ],\n};\n\n/// Descriptor for `Method`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List methodDescriptor = $convert.base64Decode(\n    'CgZNZXRob2QSEgoEbmFtZRgBIAEoCVIEbmFtZRIoChByZXF1ZXN0X3R5cGVfdXJsGAIgASgJUg'\n    '5yZXF1ZXN0VHlwZVVybBIrChFyZXF1ZXN0X3N0cmVhbWluZxgDIAEoCFIQcmVxdWVzdFN0cmVh'\n    'bWluZxIqChFyZXNwb25zZV90eXBlX3VybBgEIAEoCVIPcmVzcG9uc2VUeXBlVXJsEi0KEnJlc3'\n    'BvbnNlX3N0cmVhbWluZxgFIAEoCFIRcmVzcG9uc2VTdHJlYW1pbmcSMQoHb3B0aW9ucxgGIAMo'\n    'CzIXLmdvb2dsZS5wcm90b2J1Zi5PcHRpb25SB29wdGlvbnMSMwoGc3ludGF4GAcgASgOMhcuZ2'\n    '9vZ2xlLnByb3RvYnVmLlN5bnRheEICGAFSBnN5bnRheBIcCgdlZGl0aW9uGAggASgJQgIYAVIH'\n    'ZWRpdGlvbg==');\n\n@$core.Deprecated('Use mixinDescriptor instead')\nconst Mixin$json = {\n  '1': 'Mixin',\n  '2': [\n    {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},\n    {'1': 'root', '3': 2, '4': 1, '5': 9, '10': 'root'},\n  ],\n};\n\n/// Descriptor for `Mixin`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List mixinDescriptor = $convert.base64Decode(\n    'CgVNaXhpbhISCgRuYW1lGAEgASgJUgRuYW1lEhIKBHJvb3QYAiABKAlSBHJvb3Q=');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/duration.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/duration.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package\n// ignore_for_file: implementation_imports, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\nimport 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// A Duration represents a signed, fixed-length span of time represented\n/// as a count of seconds and fractions of seconds at nanosecond\n/// resolution. It is independent of any calendar and concepts like \"day\"\n/// or \"month\". It is related to Timestamp in that the difference between\n/// two Timestamp values is a Duration and it can be added or subtracted\n/// from a Timestamp. Range is approximately +-10,000 years.\n///\n/// # Examples\n///\n/// Example 1: Compute Duration from two Timestamps in pseudo code.\n///\n///     Timestamp start = ...;\n///     Timestamp end = ...;\n///     Duration duration = ...;\n///\n///     duration.seconds = end.seconds - start.seconds;\n///     duration.nanos = end.nanos - start.nanos;\n///\n///     if (duration.seconds < 0 && duration.nanos > 0) {\n///       duration.seconds += 1;\n///       duration.nanos -= 1000000000;\n///     } else if (duration.seconds > 0 && duration.nanos < 0) {\n///       duration.seconds -= 1;\n///       duration.nanos += 1000000000;\n///     }\n///\n/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n///\n///     Timestamp start = ...;\n///     Duration duration = ...;\n///     Timestamp end = ...;\n///\n///     end.seconds = start.seconds + duration.seconds;\n///     end.nanos = start.nanos + duration.nanos;\n///\n///     if (end.nanos < 0) {\n///       end.seconds -= 1;\n///       end.nanos += 1000000000;\n///     } else if (end.nanos >= 1000000000) {\n///       end.seconds += 1;\n///       end.nanos -= 1000000000;\n///     }\n///\n/// Example 3: Compute Duration from datetime.timedelta in Python.\n///\n///     td = datetime.timedelta(days=3, minutes=10)\n///     duration = Duration()\n///     duration.FromTimedelta(td)\n///\n/// # JSON Mapping\n///\n/// In JSON format, the Duration type is encoded as a string rather than an\n/// object, where the string ends in the suffix \"s\" (indicating seconds) and\n/// is preceded by the number of seconds, with nanoseconds expressed as\n/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be\n/// encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should\n/// be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1\n/// microsecond should be expressed in JSON format as \"3.000001s\".\nclass Duration extends $pb.GeneratedMessage with $mixin.DurationMixin {\n  factory Duration({\n    $fixnum.Int64? seconds,\n    $core.int? nanos,\n  }) {\n    final result = create();\n    if (seconds != null) result.seconds = seconds;\n    if (nanos != null) result.nanos = nanos;\n    return result;\n  }\n\n  Duration._();\n\n  factory Duration.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Duration.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Duration',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.duration)\n    ..aInt64(1, _omitFieldNames ? '' : 'seconds')\n    ..aI(2, _omitFieldNames ? '' : 'nanos')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Duration clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Duration copyWith(void Function(Duration) updates) =>\n      super.copyWith((message) => updates(message as Duration)) as Duration;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Duration create() => Duration._();\n  @$core.override\n  Duration createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Duration getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Duration>(create);\n  static Duration? _defaultInstance;\n\n  /// Signed seconds of the span of time. Must be from -315,576,000,000\n  /// to +315,576,000,000 inclusive. Note: these bounds are computed from:\n  /// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years\n  @$pb.TagNumber(1)\n  $fixnum.Int64 get seconds => $_getI64(0);\n  @$pb.TagNumber(1)\n  set seconds($fixnum.Int64 value) => $_setInt64(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSeconds() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSeconds() => $_clearField(1);\n\n  /// Signed fractions of a second at nanosecond resolution of the span\n  /// of time. Durations less than one second are represented with a 0\n  /// `seconds` field and a positive or negative `nanos` field. For durations\n  /// of one second or more, a non-zero value for the `nanos` field must be\n  /// of the same sign as the `seconds` field. Must be from -999,999,999\n  /// to +999,999,999 inclusive.\n  @$pb.TagNumber(2)\n  $core.int get nanos => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set nanos($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasNanos() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearNanos() => $_clearField(2);\n\n  /// Converts the [Duration] to [$core.Duration].\n  ///\n  /// This is a lossy conversion, as [$core.Duration] is limited to [int]\n  /// microseconds and also does not support nanosecond precision.\n  $core.Duration toDart() => $core.Duration(\n        seconds: seconds.toInt(),\n        microseconds: nanos ~/ 1000,\n      );\n\n  /// Creates a new instance from [$core.Duration].\n  static Duration fromDart($core.Duration duration) => Duration()\n    ..seconds = $fixnum.Int64(duration.inSeconds)\n    ..nanos =\n        (duration.inMicroseconds % $core.Duration.microsecondsPerSecond) * 1000;\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/duration.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/duration.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use durationDescriptor instead')\nconst Duration$json = {\n  '1': 'Duration',\n  '2': [\n    {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'},\n    {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'},\n  ],\n};\n\n/// Descriptor for `Duration`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List durationDescriptor = $convert.base64Decode(\n    'CghEdXJhdGlvbhIYCgdzZWNvbmRzGAEgASgDUgdzZWNvbmRzEhQKBW5hbm9zGAIgASgFUgVuYW'\n    '5vcw==');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/empty.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/empty.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// A generic empty message that you can re-use to avoid defining duplicated\n/// empty messages in your APIs. A typical example is to use it as the request\n/// or the response type of an API method. For instance:\n///\n///     service Foo {\n///       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n///     }\nclass Empty extends $pb.GeneratedMessage {\n  factory Empty() => create();\n\n  Empty._();\n\n  factory Empty.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Empty.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Empty',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Empty clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Empty copyWith(void Function(Empty) updates) =>\n      super.copyWith((message) => updates(message as Empty)) as Empty;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Empty create() => Empty._();\n  @$core.override\n  Empty createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Empty getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Empty>(create);\n  static Empty? _defaultInstance;\n}\n\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/empty.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/empty.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use emptyDescriptor instead')\nconst Empty$json = {\n  '1': 'Empty',\n};\n\n/// Descriptor for `Empty`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List emptyDescriptor =\n    $convert.base64Decode('CgVFbXB0eQ==');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/field_mask.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/field_mask.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package\n// ignore_for_file: implementation_imports, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\nimport 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// `FieldMask` represents a set of symbolic field paths, for example:\n///\n///     paths: \"f.a\"\n///     paths: \"f.b.d\"\n///\n/// Here `f` represents a field in some root message, `a` and `b`\n/// fields in the message found in `f`, and `d` a field found in the\n/// message in `f.b`.\n///\n/// Field masks are used to specify a subset of fields that should be\n/// returned by a get operation or modified by an update operation.\n/// Field masks also have a custom JSON encoding (see below).\n///\n/// # Field Masks in Projections\n///\n/// When used in the context of a projection, a response message or\n/// sub-message is filtered by the API to only contain those fields as\n/// specified in the mask. For example, if the mask in the previous\n/// example is applied to a response message as follows:\n///\n///     f {\n///       a : 22\n///       b {\n///         d : 1\n///         x : 2\n///       }\n///       y : 13\n///     }\n///     z: 8\n///\n/// The result will not contain specific values for fields x,y and z\n/// (their value will be set to the default, and omitted in proto text\n/// output):\n///\n///\n///     f {\n///       a : 22\n///       b {\n///         d : 1\n///       }\n///     }\n///\n/// A repeated field is not allowed except at the last position of a\n/// paths string.\n///\n/// If a FieldMask object is not present in a get operation, the\n/// operation applies to all fields (as if a FieldMask of all fields\n/// had been specified).\n///\n/// Note that a field mask does not necessarily apply to the\n/// top-level response message. In case of a REST get operation, the\n/// field mask applies directly to the response, but in case of a REST\n/// list operation, the mask instead applies to each individual message\n/// in the returned resource list. In case of a REST custom method,\n/// other definitions may be used. Where the mask applies will be\n/// clearly documented together with its declaration in the API.  In\n/// any case, the effect on the returned resource/resources is required\n/// behavior for APIs.\n///\n/// # Field Masks in Update Operations\n///\n/// A field mask in update operations specifies which fields of the\n/// targeted resource are going to be updated. The API is required\n/// to only change the values of the fields as specified in the mask\n/// and leave the others untouched. If a resource is passed in to\n/// describe the updated values, the API ignores the values of all\n/// fields not covered by the mask.\n///\n/// If a repeated field is specified for an update operation, new values will\n/// be appended to the existing repeated field in the target resource. Note that\n/// a repeated field is only allowed in the last position of a `paths` string.\n///\n/// If a sub-message is specified in the last position of the field mask for an\n/// update operation, then new value will be merged into the existing sub-message\n/// in the target resource.\n///\n/// For example, given the target message:\n///\n///     f {\n///       b {\n///         d: 1\n///         x: 2\n///       }\n///       c: [1]\n///     }\n///\n/// And an update message:\n///\n///     f {\n///       b {\n///         d: 10\n///       }\n///       c: [2]\n///     }\n///\n/// then if the field mask is:\n///\n///  paths: [\"f.b\", \"f.c\"]\n///\n/// then the result will be:\n///\n///     f {\n///       b {\n///         d: 10\n///         x: 2\n///       }\n///       c: [1, 2]\n///     }\n///\n/// An implementation may provide options to override this default behavior for\n/// repeated and message fields.\n///\n/// In order to reset a field's value to the default, the field must\n/// be in the mask and set to the default value in the provided resource.\n/// Hence, in order to reset all fields of a resource, provide a default\n/// instance of the resource and set all fields in the mask, or do\n/// not provide a mask as described below.\n///\n/// If a field mask is not present on update, the operation applies to\n/// all fields (as if a field mask of all fields has been specified).\n/// Note that in the presence of schema evolution, this may mean that\n/// fields the client does not know and has therefore not filled into\n/// the request will be reset to their default. If this is unwanted\n/// behavior, a specific service may require a client to always specify\n/// a field mask, producing an error if not.\n///\n/// As with get operations, the location of the resource which\n/// describes the updated values in the request message depends on the\n/// operation kind. In any case, the effect of the field mask is\n/// required to be honored by the API.\n///\n/// ## Considerations for HTTP REST\n///\n/// The HTTP kind of an update operation which uses a field mask must\n/// be set to PATCH instead of PUT in order to satisfy HTTP semantics\n/// (PUT must only be used for full updates).\n///\n/// # JSON Encoding of Field Masks\n///\n/// In JSON, a field mask is encoded as a single string where paths are\n/// separated by a comma. Fields name in each path are converted\n/// to/from lower-camel naming conventions.\n///\n/// As an example, consider the following message declarations:\n///\n///     message Profile {\n///       User user = 1;\n///       Photo photo = 2;\n///     }\n///     message User {\n///       string display_name = 1;\n///       string address = 2;\n///     }\n///\n/// In proto a field mask for `Profile` may look as such:\n///\n///     mask {\n///       paths: \"user.display_name\"\n///       paths: \"photo\"\n///     }\n///\n/// In JSON, the same mask is represented as below:\n///\n///     {\n///       mask: \"user.displayName,photo\"\n///     }\n///\n/// # Field Masks and Oneof Fields\n///\n/// Field masks treat fields in oneofs just as regular fields. Consider the\n/// following message:\n///\n///     message SampleMessage {\n///       oneof test_oneof {\n///         string name = 4;\n///         SubMessage sub_message = 9;\n///       }\n///     }\n///\n/// The field mask can be:\n///\n///     mask {\n///       paths: \"name\"\n///     }\n///\n/// Or:\n///\n///     mask {\n///       paths: \"sub_message\"\n///     }\n///\n/// Note that oneof type names (\"test_oneof\" in this case) cannot be used in\n/// paths.\n///\n/// ## Field Mask Verification\n///\n/// The implementation of any API method which has a FieldMask type field in the\n/// request should verify the included field paths, and return an\n/// `INVALID_ARGUMENT` error if any path is unmappable.\nclass FieldMask extends $pb.GeneratedMessage with $mixin.FieldMaskMixin {\n  factory FieldMask({\n    $core.Iterable<$core.String>? paths,\n  }) {\n    final result = create();\n    if (paths != null) result.paths.addAll(paths);\n    return result;\n  }\n\n  FieldMask._();\n\n  factory FieldMask.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FieldMask.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FieldMask',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.fieldMask)\n    ..pPS(1, _omitFieldNames ? '' : 'paths')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FieldMask clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FieldMask copyWith(void Function(FieldMask) updates) =>\n      super.copyWith((message) => updates(message as FieldMask)) as FieldMask;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FieldMask create() => FieldMask._();\n  @$core.override\n  FieldMask createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FieldMask getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<FieldMask>(create);\n  static FieldMask? _defaultInstance;\n\n  /// The set of field mask paths.\n  @$pb.TagNumber(1)\n  $pb.PbList<$core.String> get paths => $_getList(0);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/field_mask.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/field_mask.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use fieldMaskDescriptor instead')\nconst FieldMask$json = {\n  '1': 'FieldMask',\n  '2': [\n    {'1': 'paths', '3': 1, '4': 3, '5': 9, '10': 'paths'},\n  ],\n};\n\n/// Descriptor for `FieldMask`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List fieldMaskDescriptor =\n    $convert.base64Decode('CglGaWVsZE1hc2sSFAoFcGF0aHMYASADKAlSBXBhdGhz');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/source_context.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/source_context.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// `SourceContext` represents information about the source of a\n/// protobuf element, like the file in which it is defined.\nclass SourceContext extends $pb.GeneratedMessage {\n  factory SourceContext({\n    $core.String? fileName,\n  }) {\n    final result = create();\n    if (fileName != null) result.fileName = fileName;\n    return result;\n  }\n\n  SourceContext._();\n\n  factory SourceContext.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SourceContext.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SourceContext',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'fileName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SourceContext clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SourceContext copyWith(void Function(SourceContext) updates) =>\n      super.copyWith((message) => updates(message as SourceContext))\n          as SourceContext;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SourceContext create() => SourceContext._();\n  @$core.override\n  SourceContext createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SourceContext getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SourceContext>(create);\n  static SourceContext? _defaultInstance;\n\n  /// The path-qualified name of the .proto file that contained the associated\n  /// protobuf element.  For example: `\"google/protobuf/source_context.proto\"`.\n  @$pb.TagNumber(1)\n  $core.String get fileName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set fileName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasFileName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearFileName() => $_clearField(1);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/source_context.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/source_context.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use sourceContextDescriptor instead')\nconst SourceContext$json = {\n  '1': 'SourceContext',\n  '2': [\n    {'1': 'file_name', '3': 1, '4': 1, '5': 9, '10': 'fileName'},\n  ],\n};\n\n/// Descriptor for `SourceContext`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List sourceContextDescriptor = $convert.base64Decode(\n    'Cg1Tb3VyY2VDb250ZXh0EhsKCWZpbGVfbmFtZRgBIAEoCVIIZmlsZU5hbWU=');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/struct.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/struct.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package\n// ignore_for_file: implementation_imports, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\nimport 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;\nimport 'package:protobuf/well_known_types/google/protobuf/struct.pbenum.dart';\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\nexport 'package:protobuf/well_known_types/google/protobuf/struct.pbenum.dart';\n\n/// `Struct` represents a structured data value, consisting of fields\n/// which map to dynamically typed values. In some languages, `Struct`\n/// might be supported by a native representation. For example, in\n/// scripting languages like JS a struct is represented as an\n/// object. The details of that representation are described together\n/// with the proto support for the language.\n///\n/// The JSON representation for `Struct` is JSON object.\nclass Struct extends $pb.GeneratedMessage with $mixin.StructMixin {\n  factory Struct({\n    $core.Iterable<$core.MapEntry<$core.String, Value>>? fields,\n  }) {\n    final result = create();\n    if (fields != null) result.fields.addEntries(fields);\n    return result;\n  }\n\n  Struct._();\n\n  factory Struct.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Struct.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Struct',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.struct)\n    ..m<$core.String, Value>(1, _omitFieldNames ? '' : 'fields',\n        entryClassName: 'Struct.FieldsEntry',\n        keyFieldType: $pb.PbFieldType.OS,\n        valueFieldType: $pb.PbFieldType.OM,\n        valueCreator: Value.create,\n        valueDefaultOrMaker: Value.getDefault,\n        packageName: const $pb.PackageName('google.protobuf'))\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Struct clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Struct copyWith(void Function(Struct) updates) =>\n      super.copyWith((message) => updates(message as Struct)) as Struct;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Struct create() => Struct._();\n  @$core.override\n  Struct createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Struct getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Struct>(create);\n  static Struct? _defaultInstance;\n\n  /// Unordered map of dynamically typed values.\n  @$pb.TagNumber(1)\n  $pb.PbMap<$core.String, Value> get fields => $_getMap(0);\n}\n\nenum Value_Kind {\n  nullValue,\n  numberValue,\n  stringValue,\n  boolValue,\n  structValue,\n  listValue,\n  notSet\n}\n\n/// `Value` represents a dynamically typed value which can be either\n/// null, a number, a string, a boolean, a recursive struct value, or a\n/// list of values. A producer of value is expected to set one of these\n/// variants. Absence of any variant indicates an error.\n///\n/// The JSON representation for `Value` is JSON value.\nclass Value extends $pb.GeneratedMessage with $mixin.ValueMixin {\n  factory Value({\n    NullValue? nullValue,\n    $core.double? numberValue,\n    $core.String? stringValue,\n    $core.bool? boolValue,\n    Struct? structValue,\n    ListValue? listValue,\n  }) {\n    final result = create();\n    if (nullValue != null) result.nullValue = nullValue;\n    if (numberValue != null) result.numberValue = numberValue;\n    if (stringValue != null) result.stringValue = stringValue;\n    if (boolValue != null) result.boolValue = boolValue;\n    if (structValue != null) result.structValue = structValue;\n    if (listValue != null) result.listValue = listValue;\n    return result;\n  }\n\n  Value._();\n\n  factory Value.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Value.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static const $core.Map<$core.int, Value_Kind> _Value_KindByTag = {\n    1: Value_Kind.nullValue,\n    2: Value_Kind.numberValue,\n    3: Value_Kind.stringValue,\n    4: Value_Kind.boolValue,\n    5: Value_Kind.structValue,\n    6: Value_Kind.listValue,\n    0: Value_Kind.notSet\n  };\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Value',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.value)\n    ..oo(0, [1, 2, 3, 4, 5, 6])\n    ..aE<NullValue>(1, _omitFieldNames ? '' : 'nullValue',\n        enumValues: NullValue.values)\n    ..aD(2, _omitFieldNames ? '' : 'numberValue')\n    ..aOS(3, _omitFieldNames ? '' : 'stringValue')\n    ..aOB(4, _omitFieldNames ? '' : 'boolValue')\n    ..aOM<Struct>(5, _omitFieldNames ? '' : 'structValue',\n        subBuilder: Struct.create)\n    ..aOM<ListValue>(6, _omitFieldNames ? '' : 'listValue',\n        subBuilder: ListValue.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Value clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Value copyWith(void Function(Value) updates) =>\n      super.copyWith((message) => updates(message as Value)) as Value;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Value create() => Value._();\n  @$core.override\n  Value createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Value getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Value>(create);\n  static Value? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  @$pb.TagNumber(2)\n  @$pb.TagNumber(3)\n  @$pb.TagNumber(4)\n  @$pb.TagNumber(5)\n  @$pb.TagNumber(6)\n  Value_Kind whichKind() => _Value_KindByTag[$_whichOneof(0)]!;\n  @$pb.TagNumber(1)\n  @$pb.TagNumber(2)\n  @$pb.TagNumber(3)\n  @$pb.TagNumber(4)\n  @$pb.TagNumber(5)\n  @$pb.TagNumber(6)\n  void clearKind() => $_clearField($_whichOneof(0));\n\n  /// Represents a null value.\n  @$pb.TagNumber(1)\n  NullValue get nullValue => $_getN(0);\n  @$pb.TagNumber(1)\n  set nullValue(NullValue value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasNullValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearNullValue() => $_clearField(1);\n\n  /// Represents a double value.\n  @$pb.TagNumber(2)\n  $core.double get numberValue => $_getN(1);\n  @$pb.TagNumber(2)\n  set numberValue($core.double value) => $_setDouble(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasNumberValue() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearNumberValue() => $_clearField(2);\n\n  /// Represents a string value.\n  @$pb.TagNumber(3)\n  $core.String get stringValue => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set stringValue($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasStringValue() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearStringValue() => $_clearField(3);\n\n  /// Represents a boolean value.\n  @$pb.TagNumber(4)\n  $core.bool get boolValue => $_getBF(3);\n  @$pb.TagNumber(4)\n  set boolValue($core.bool value) => $_setBool(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasBoolValue() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearBoolValue() => $_clearField(4);\n\n  /// Represents a structured value.\n  @$pb.TagNumber(5)\n  Struct get structValue => $_getN(4);\n  @$pb.TagNumber(5)\n  set structValue(Struct value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasStructValue() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearStructValue() => $_clearField(5);\n  @$pb.TagNumber(5)\n  Struct ensureStructValue() => $_ensure(4);\n\n  /// Represents a repeated `Value`.\n  @$pb.TagNumber(6)\n  ListValue get listValue => $_getN(5);\n  @$pb.TagNumber(6)\n  set listValue(ListValue value) => $_setField(6, value);\n  @$pb.TagNumber(6)\n  $core.bool hasListValue() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearListValue() => $_clearField(6);\n  @$pb.TagNumber(6)\n  ListValue ensureListValue() => $_ensure(5);\n}\n\n/// `ListValue` is a wrapper around a repeated field of values.\n///\n/// The JSON representation for `ListValue` is JSON array.\nclass ListValue extends $pb.GeneratedMessage with $mixin.ListValueMixin {\n  factory ListValue({\n    $core.Iterable<Value>? values,\n  }) {\n    final result = create();\n    if (values != null) result.values.addAll(values);\n    return result;\n  }\n\n  ListValue._();\n\n  factory ListValue.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ListValue.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ListValue',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.listValue)\n    ..pPM<Value>(1, _omitFieldNames ? '' : 'values', subBuilder: Value.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListValue clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListValue copyWith(void Function(ListValue) updates) =>\n      super.copyWith((message) => updates(message as ListValue)) as ListValue;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ListValue create() => ListValue._();\n  @$core.override\n  ListValue createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ListValue getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ListValue>(create);\n  static ListValue? _defaultInstance;\n\n  /// Repeated field of dynamically typed values.\n  @$pb.TagNumber(1)\n  $pb.PbList<Value> get values => $_getList(0);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/struct.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/struct.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// `NullValue` is a singleton enumeration to represent the null value for the\n/// `Value` type union.\n///\n/// The JSON representation for `NullValue` is JSON `null`.\nclass NullValue extends $pb.ProtobufEnum {\n  /// Null value.\n  static const NullValue NULL_VALUE =\n      NullValue._(0, _omitEnumNames ? '' : 'NULL_VALUE');\n\n  static const $core.List<NullValue> values = <NullValue>[\n    NULL_VALUE,\n  ];\n\n  static final $core.List<NullValue?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 0);\n  static NullValue? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const NullValue._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/struct.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/struct.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use nullValueDescriptor instead')\nconst NullValue$json = {\n  '1': 'NullValue',\n  '2': [\n    {'1': 'NULL_VALUE', '2': 0},\n  ],\n};\n\n/// Descriptor for `NullValue`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List nullValueDescriptor =\n    $convert.base64Decode('CglOdWxsVmFsdWUSDgoKTlVMTF9WQUxVRRAA');\n\n@$core.Deprecated('Use structDescriptor instead')\nconst Struct$json = {\n  '1': 'Struct',\n  '2': [\n    {\n      '1': 'fields',\n      '3': 1,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Struct.FieldsEntry',\n      '10': 'fields'\n    },\n  ],\n  '3': [Struct_FieldsEntry$json],\n};\n\n@$core.Deprecated('Use structDescriptor instead')\nconst Struct_FieldsEntry$json = {\n  '1': 'FieldsEntry',\n  '2': [\n    {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'},\n    {\n      '1': 'value',\n      '3': 2,\n      '4': 1,\n      '5': 11,\n      '6': '.google.protobuf.Value',\n      '10': 'value'\n    },\n  ],\n  '7': {'7': true},\n};\n\n/// Descriptor for `Struct`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List structDescriptor = $convert.base64Decode(\n    'CgZTdHJ1Y3QSOwoGZmllbGRzGAEgAygLMiMuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdC5GaWVsZH'\n    'NFbnRyeVIGZmllbGRzGlEKC0ZpZWxkc0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EiwKBXZhbHVl'\n    'GAIgASgLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlUgV2YWx1ZToCOAE=');\n\n@$core.Deprecated('Use valueDescriptor instead')\nconst Value$json = {\n  '1': 'Value',\n  '2': [\n    {\n      '1': 'null_value',\n      '3': 1,\n      '4': 1,\n      '5': 14,\n      '6': '.google.protobuf.NullValue',\n      '9': 0,\n      '10': 'nullValue'\n    },\n    {'1': 'number_value', '3': 2, '4': 1, '5': 1, '9': 0, '10': 'numberValue'},\n    {'1': 'string_value', '3': 3, '4': 1, '5': 9, '9': 0, '10': 'stringValue'},\n    {'1': 'bool_value', '3': 4, '4': 1, '5': 8, '9': 0, '10': 'boolValue'},\n    {\n      '1': 'struct_value',\n      '3': 5,\n      '4': 1,\n      '5': 11,\n      '6': '.google.protobuf.Struct',\n      '9': 0,\n      '10': 'structValue'\n    },\n    {\n      '1': 'list_value',\n      '3': 6,\n      '4': 1,\n      '5': 11,\n      '6': '.google.protobuf.ListValue',\n      '9': 0,\n      '10': 'listValue'\n    },\n  ],\n  '8': [\n    {'1': 'kind'},\n  ],\n};\n\n/// Descriptor for `Value`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List valueDescriptor = $convert.base64Decode(\n    'CgVWYWx1ZRI7CgpudWxsX3ZhbHVlGAEgASgOMhouZ29vZ2xlLnByb3RvYnVmLk51bGxWYWx1ZU'\n    'gAUgludWxsVmFsdWUSIwoMbnVtYmVyX3ZhbHVlGAIgASgBSABSC251bWJlclZhbHVlEiMKDHN0'\n    'cmluZ192YWx1ZRgDIAEoCUgAUgtzdHJpbmdWYWx1ZRIfCgpib29sX3ZhbHVlGAQgASgISABSCW'\n    'Jvb2xWYWx1ZRI8CgxzdHJ1Y3RfdmFsdWUYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0'\n    'SABSC3N0cnVjdFZhbHVlEjsKCmxpc3RfdmFsdWUYBiABKAsyGi5nb29nbGUucHJvdG9idWYuTG'\n    'lzdFZhbHVlSABSCWxpc3RWYWx1ZUIGCgRraW5k');\n\n@$core.Deprecated('Use listValueDescriptor instead')\nconst ListValue$json = {\n  '1': 'ListValue',\n  '2': [\n    {\n      '1': 'values',\n      '3': 1,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Value',\n      '10': 'values'\n    },\n  ],\n};\n\n/// Descriptor for `ListValue`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List listValueDescriptor = $convert.base64Decode(\n    'CglMaXN0VmFsdWUSLgoGdmFsdWVzGAEgAygLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlUgZ2YW'\n    'x1ZXM=');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/timestamp.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/timestamp.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package\n// ignore_for_file: implementation_imports, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\nimport 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// A Timestamp represents a point in time independent of any time zone or local\n/// calendar, encoded as a count of seconds and fractions of seconds at\n/// nanosecond resolution. The count is relative to an epoch at UTC midnight on\n/// January 1, 1970, in the proleptic Gregorian calendar which extends the\n/// Gregorian calendar backwards to year one.\n///\n/// All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n/// second table is needed for interpretation, using a [24-hour linear\n/// smear](https://developers.google.com/time/smear).\n///\n/// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n/// restricting to that range, we ensure that we can convert to and from [RFC\n/// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n///\n/// # Examples\n///\n/// Example 1: Compute Timestamp from POSIX `time()`.\n///\n///     Timestamp timestamp;\n///     timestamp.set_seconds(time(NULL));\n///     timestamp.set_nanos(0);\n///\n/// Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n///\n///     struct timeval tv;\n///     gettimeofday(&tv, NULL);\n///\n///     Timestamp timestamp;\n///     timestamp.set_seconds(tv.tv_sec);\n///     timestamp.set_nanos(tv.tv_usec * 1000);\n///\n/// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n///\n///     FILETIME ft;\n///     GetSystemTimeAsFileTime(&ft);\n///     UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n///\n///     // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n///     // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n///     Timestamp timestamp;\n///     timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n///     timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n///\n/// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n///\n///     long millis = System.currentTimeMillis();\n///\n///     Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n///         .setNanos((int) ((millis % 1000) * 1000000)).build();\n///\n/// Example 5: Compute Timestamp from Java `Instant.now()`.\n///\n///     Instant now = Instant.now();\n///\n///     Timestamp timestamp =\n///         Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n///             .setNanos(now.getNano()).build();\n///\n/// Example 6: Compute Timestamp from current time in Python.\n///\n///     timestamp = Timestamp()\n///     timestamp.GetCurrentTime()\n///\n/// # JSON Mapping\n///\n/// In JSON format, the Timestamp type is encoded as a string in the\n/// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n/// format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n/// where {year} is always expressed using four digits while {month}, {day},\n/// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n/// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n/// are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n/// is required. A ProtoJSON serializer should always use UTC (as indicated by\n/// \"Z\") when printing the Timestamp type and a ProtoJSON parser should be\n/// able to accept both UTC and other timezones (as indicated by an offset).\n///\n/// For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n/// 01:30 UTC on January 15, 2017.\n///\n/// In JavaScript, one can convert a Date object to this format using the\n/// standard\n/// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n/// method. In Python, a standard `datetime.datetime` object can be converted\n/// to this format using\n/// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n/// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n/// the Joda Time's [`ISODateTimeFormat.dateTime()`](\n/// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n/// ) to obtain a formatter capable of generating timestamps in this format.\nclass Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin {\n  factory Timestamp({\n    $fixnum.Int64? seconds,\n    $core.int? nanos,\n  }) {\n    final result = create();\n    if (seconds != null) result.seconds = seconds;\n    if (nanos != null) result.nanos = nanos;\n    return result;\n  }\n\n  Timestamp._();\n\n  factory Timestamp.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Timestamp.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Timestamp',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.timestamp)\n    ..aInt64(1, _omitFieldNames ? '' : 'seconds')\n    ..aI(2, _omitFieldNames ? '' : 'nanos')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Timestamp clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Timestamp copyWith(void Function(Timestamp) updates) =>\n      super.copyWith((message) => updates(message as Timestamp)) as Timestamp;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Timestamp create() => Timestamp._();\n  @$core.override\n  Timestamp createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Timestamp getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Timestamp>(create);\n  static Timestamp? _defaultInstance;\n\n  /// Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must\n  /// be between -62135596800 and 253402300799 inclusive (which corresponds to\n  /// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).\n  @$pb.TagNumber(1)\n  $fixnum.Int64 get seconds => $_getI64(0);\n  @$pb.TagNumber(1)\n  set seconds($fixnum.Int64 value) => $_setInt64(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSeconds() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSeconds() => $_clearField(1);\n\n  /// Non-negative fractions of a second at nanosecond resolution. This field is\n  /// the nanosecond portion of the duration, not an alternative to seconds.\n  /// Negative second values with fractions must still have non-negative nanos\n  /// values that count forward in time. Must be between 0 and 999,999,999\n  /// inclusive.\n  @$pb.TagNumber(2)\n  $core.int get nanos => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set nanos($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasNanos() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearNanos() => $_clearField(2);\n\n  /// Creates a new instance from [dateTime].\n  ///\n  /// Time zone information will not be preserved.\n  static Timestamp fromDateTime($core.DateTime dateTime) {\n    final result = create();\n    $mixin.TimestampMixin.setFromDateTime(result, dateTime);\n    return result;\n  }\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/timestamp.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/timestamp.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use timestampDescriptor instead')\nconst Timestamp$json = {\n  '1': 'Timestamp',\n  '2': [\n    {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'},\n    {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'},\n  ],\n};\n\n/// Descriptor for `Timestamp`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List timestampDescriptor = $convert.base64Decode(\n    'CglUaW1lc3RhbXASGAoHc2Vjb25kcxgBIAEoA1IHc2Vjb25kcxIUCgVuYW5vcxgCIAEoBVIFbm'\n    'Fub3M=');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/type.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/type.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\nimport 'package:protobuf/well_known_types/google/protobuf/any.pb.dart' as $1;\nimport 'package:protobuf/well_known_types/google/protobuf/source_context.pb.dart'\n    as $0;\nimport 'package:protobuf/well_known_types/google/protobuf/type.pbenum.dart';\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\nexport 'package:protobuf/well_known_types/google/protobuf/type.pbenum.dart';\n\n/// A protocol buffer message type.\n///\n/// New usages of this message as an alternative to DescriptorProto are strongly\n/// discouraged. This message does not reliability preserve all information\n/// necessary to model the schema and preserve semantics. Instead make use of\n/// FileDescriptorSet which preserves the necessary information.\nclass Type extends $pb.GeneratedMessage {\n  factory Type({\n    $core.String? name,\n    $core.Iterable<Field>? fields,\n    $core.Iterable<$core.String>? oneofs,\n    $core.Iterable<Option>? options,\n    $0.SourceContext? sourceContext,\n    Syntax? syntax,\n    $core.String? edition,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (fields != null) result.fields.addAll(fields);\n    if (oneofs != null) result.oneofs.addAll(oneofs);\n    if (options != null) result.options.addAll(options);\n    if (sourceContext != null) result.sourceContext = sourceContext;\n    if (syntax != null) result.syntax = syntax;\n    if (edition != null) result.edition = edition;\n    return result;\n  }\n\n  Type._();\n\n  factory Type.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Type.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Type',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..pPM<Field>(2, _omitFieldNames ? '' : 'fields', subBuilder: Field.create)\n    ..pPS(3, _omitFieldNames ? '' : 'oneofs')\n    ..pPM<Option>(4, _omitFieldNames ? '' : 'options',\n        subBuilder: Option.create)\n    ..aOM<$0.SourceContext>(5, _omitFieldNames ? '' : 'sourceContext',\n        subBuilder: $0.SourceContext.create)\n    ..aE<Syntax>(6, _omitFieldNames ? '' : 'syntax', enumValues: Syntax.values)\n    ..aOS(7, _omitFieldNames ? '' : 'edition')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Type clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Type copyWith(void Function(Type) updates) =>\n      super.copyWith((message) => updates(message as Type)) as Type;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Type create() => Type._();\n  @$core.override\n  Type createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Type getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Type>(create);\n  static Type? _defaultInstance;\n\n  /// The fully qualified message name.\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// The list of fields.\n  @$pb.TagNumber(2)\n  $pb.PbList<Field> get fields => $_getList(1);\n\n  /// The list of types appearing in `oneof` definitions in this type.\n  @$pb.TagNumber(3)\n  $pb.PbList<$core.String> get oneofs => $_getList(2);\n\n  /// The protocol buffer options.\n  @$pb.TagNumber(4)\n  $pb.PbList<Option> get options => $_getList(3);\n\n  /// The source context.\n  @$pb.TagNumber(5)\n  $0.SourceContext get sourceContext => $_getN(4);\n  @$pb.TagNumber(5)\n  set sourceContext($0.SourceContext value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasSourceContext() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearSourceContext() => $_clearField(5);\n  @$pb.TagNumber(5)\n  $0.SourceContext ensureSourceContext() => $_ensure(4);\n\n  /// The source syntax.\n  @$pb.TagNumber(6)\n  Syntax get syntax => $_getN(5);\n  @$pb.TagNumber(6)\n  set syntax(Syntax value) => $_setField(6, value);\n  @$pb.TagNumber(6)\n  $core.bool hasSyntax() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearSyntax() => $_clearField(6);\n\n  /// The source edition string, only valid when syntax is SYNTAX_EDITIONS.\n  @$pb.TagNumber(7)\n  $core.String get edition => $_getSZ(6);\n  @$pb.TagNumber(7)\n  set edition($core.String value) => $_setString(6, value);\n  @$pb.TagNumber(7)\n  $core.bool hasEdition() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearEdition() => $_clearField(7);\n}\n\n/// A single field of a message type.\n///\n/// New usages of this message as an alternative to FieldDescriptorProto are\n/// strongly discouraged. This message does not reliability preserve all\n/// information necessary to model the schema and preserve semantics. Instead\n/// make use of FileDescriptorSet which preserves the necessary information.\nclass Field extends $pb.GeneratedMessage {\n  factory Field({\n    Field_Kind? kind,\n    Field_Cardinality? cardinality,\n    $core.int? number,\n    $core.String? name,\n    $core.String? typeUrl,\n    $core.int? oneofIndex,\n    $core.bool? packed,\n    $core.Iterable<Option>? options,\n    $core.String? jsonName,\n    $core.String? defaultValue,\n  }) {\n    final result = create();\n    if (kind != null) result.kind = kind;\n    if (cardinality != null) result.cardinality = cardinality;\n    if (number != null) result.number = number;\n    if (name != null) result.name = name;\n    if (typeUrl != null) result.typeUrl = typeUrl;\n    if (oneofIndex != null) result.oneofIndex = oneofIndex;\n    if (packed != null) result.packed = packed;\n    if (options != null) result.options.addAll(options);\n    if (jsonName != null) result.jsonName = jsonName;\n    if (defaultValue != null) result.defaultValue = defaultValue;\n    return result;\n  }\n\n  Field._();\n\n  factory Field.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Field.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Field',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aE<Field_Kind>(1, _omitFieldNames ? '' : 'kind',\n        enumValues: Field_Kind.values)\n    ..aE<Field_Cardinality>(2, _omitFieldNames ? '' : 'cardinality',\n        enumValues: Field_Cardinality.values)\n    ..aI(3, _omitFieldNames ? '' : 'number')\n    ..aOS(4, _omitFieldNames ? '' : 'name')\n    ..aOS(6, _omitFieldNames ? '' : 'typeUrl')\n    ..aI(7, _omitFieldNames ? '' : 'oneofIndex')\n    ..aOB(8, _omitFieldNames ? '' : 'packed')\n    ..pPM<Option>(9, _omitFieldNames ? '' : 'options',\n        subBuilder: Option.create)\n    ..aOS(10, _omitFieldNames ? '' : 'jsonName')\n    ..aOS(11, _omitFieldNames ? '' : 'defaultValue')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Field clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Field copyWith(void Function(Field) updates) =>\n      super.copyWith((message) => updates(message as Field)) as Field;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Field create() => Field._();\n  @$core.override\n  Field createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Field getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Field>(create);\n  static Field? _defaultInstance;\n\n  /// The field type.\n  @$pb.TagNumber(1)\n  Field_Kind get kind => $_getN(0);\n  @$pb.TagNumber(1)\n  set kind(Field_Kind value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasKind() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearKind() => $_clearField(1);\n\n  /// The field cardinality.\n  @$pb.TagNumber(2)\n  Field_Cardinality get cardinality => $_getN(1);\n  @$pb.TagNumber(2)\n  set cardinality(Field_Cardinality value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasCardinality() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearCardinality() => $_clearField(2);\n\n  /// The field number.\n  @$pb.TagNumber(3)\n  $core.int get number => $_getIZ(2);\n  @$pb.TagNumber(3)\n  set number($core.int value) => $_setSignedInt32(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasNumber() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearNumber() => $_clearField(3);\n\n  /// The field name.\n  @$pb.TagNumber(4)\n  $core.String get name => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set name($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasName() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearName() => $_clearField(4);\n\n  /// The field type URL, without the scheme, for message or enumeration\n  /// types. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.\n  @$pb.TagNumber(6)\n  $core.String get typeUrl => $_getSZ(4);\n  @$pb.TagNumber(6)\n  set typeUrl($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(6)\n  $core.bool hasTypeUrl() => $_has(4);\n  @$pb.TagNumber(6)\n  void clearTypeUrl() => $_clearField(6);\n\n  /// The index of the field type in `Type.oneofs`, for message or enumeration\n  /// types. The first type has index 1; zero means the type is not in the list.\n  @$pb.TagNumber(7)\n  $core.int get oneofIndex => $_getIZ(5);\n  @$pb.TagNumber(7)\n  set oneofIndex($core.int value) => $_setSignedInt32(5, value);\n  @$pb.TagNumber(7)\n  $core.bool hasOneofIndex() => $_has(5);\n  @$pb.TagNumber(7)\n  void clearOneofIndex() => $_clearField(7);\n\n  /// Whether to use alternative packed wire representation.\n  @$pb.TagNumber(8)\n  $core.bool get packed => $_getBF(6);\n  @$pb.TagNumber(8)\n  set packed($core.bool value) => $_setBool(6, value);\n  @$pb.TagNumber(8)\n  $core.bool hasPacked() => $_has(6);\n  @$pb.TagNumber(8)\n  void clearPacked() => $_clearField(8);\n\n  /// The protocol buffer options.\n  @$pb.TagNumber(9)\n  $pb.PbList<Option> get options => $_getList(7);\n\n  /// The field JSON name.\n  @$pb.TagNumber(10)\n  $core.String get jsonName => $_getSZ(8);\n  @$pb.TagNumber(10)\n  set jsonName($core.String value) => $_setString(8, value);\n  @$pb.TagNumber(10)\n  $core.bool hasJsonName() => $_has(8);\n  @$pb.TagNumber(10)\n  void clearJsonName() => $_clearField(10);\n\n  /// The string value of the default value of this field. Proto2 syntax only.\n  @$pb.TagNumber(11)\n  $core.String get defaultValue => $_getSZ(9);\n  @$pb.TagNumber(11)\n  set defaultValue($core.String value) => $_setString(9, value);\n  @$pb.TagNumber(11)\n  $core.bool hasDefaultValue() => $_has(9);\n  @$pb.TagNumber(11)\n  void clearDefaultValue() => $_clearField(11);\n}\n\n/// Enum type definition.\n///\n/// New usages of this message as an alternative to EnumDescriptorProto are\n/// strongly discouraged. This message does not reliability preserve all\n/// information necessary to model the schema and preserve semantics. Instead\n/// make use of FileDescriptorSet which preserves the necessary information.\nclass Enum extends $pb.GeneratedMessage {\n  factory Enum({\n    $core.String? name,\n    $core.Iterable<EnumValue>? enumvalue,\n    $core.Iterable<Option>? options,\n    $0.SourceContext? sourceContext,\n    Syntax? syntax,\n    $core.String? edition,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (enumvalue != null) result.enumvalue.addAll(enumvalue);\n    if (options != null) result.options.addAll(options);\n    if (sourceContext != null) result.sourceContext = sourceContext;\n    if (syntax != null) result.syntax = syntax;\n    if (edition != null) result.edition = edition;\n    return result;\n  }\n\n  Enum._();\n\n  factory Enum.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Enum.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Enum',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..pPM<EnumValue>(2, _omitFieldNames ? '' : 'enumvalue',\n        subBuilder: EnumValue.create)\n    ..pPM<Option>(3, _omitFieldNames ? '' : 'options',\n        subBuilder: Option.create)\n    ..aOM<$0.SourceContext>(4, _omitFieldNames ? '' : 'sourceContext',\n        subBuilder: $0.SourceContext.create)\n    ..aE<Syntax>(5, _omitFieldNames ? '' : 'syntax', enumValues: Syntax.values)\n    ..aOS(6, _omitFieldNames ? '' : 'edition')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Enum clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Enum copyWith(void Function(Enum) updates) =>\n      super.copyWith((message) => updates(message as Enum)) as Enum;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Enum create() => Enum._();\n  @$core.override\n  Enum createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Enum getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Enum>(create);\n  static Enum? _defaultInstance;\n\n  /// Enum type name.\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// Enum value definitions.\n  @$pb.TagNumber(2)\n  $pb.PbList<EnumValue> get enumvalue => $_getList(1);\n\n  /// Protocol buffer options.\n  @$pb.TagNumber(3)\n  $pb.PbList<Option> get options => $_getList(2);\n\n  /// The source context.\n  @$pb.TagNumber(4)\n  $0.SourceContext get sourceContext => $_getN(3);\n  @$pb.TagNumber(4)\n  set sourceContext($0.SourceContext value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasSourceContext() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearSourceContext() => $_clearField(4);\n  @$pb.TagNumber(4)\n  $0.SourceContext ensureSourceContext() => $_ensure(3);\n\n  /// The source syntax.\n  @$pb.TagNumber(5)\n  Syntax get syntax => $_getN(4);\n  @$pb.TagNumber(5)\n  set syntax(Syntax value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasSyntax() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearSyntax() => $_clearField(5);\n\n  /// The source edition string, only valid when syntax is SYNTAX_EDITIONS.\n  @$pb.TagNumber(6)\n  $core.String get edition => $_getSZ(5);\n  @$pb.TagNumber(6)\n  set edition($core.String value) => $_setString(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasEdition() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearEdition() => $_clearField(6);\n}\n\n/// Enum value definition.\n///\n/// New usages of this message as an alternative to EnumValueDescriptorProto are\n/// strongly discouraged. This message does not reliability preserve all\n/// information necessary to model the schema and preserve semantics. Instead\n/// make use of FileDescriptorSet which preserves the necessary information.\nclass EnumValue extends $pb.GeneratedMessage {\n  factory EnumValue({\n    $core.String? name,\n    $core.int? number,\n    $core.Iterable<Option>? options,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (number != null) result.number = number;\n    if (options != null) result.options.addAll(options);\n    return result;\n  }\n\n  EnumValue._();\n\n  factory EnumValue.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory EnumValue.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'EnumValue',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aI(2, _omitFieldNames ? '' : 'number')\n    ..pPM<Option>(3, _omitFieldNames ? '' : 'options',\n        subBuilder: Option.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumValue clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumValue copyWith(void Function(EnumValue) updates) =>\n      super.copyWith((message) => updates(message as EnumValue)) as EnumValue;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static EnumValue create() => EnumValue._();\n  @$core.override\n  EnumValue createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static EnumValue getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<EnumValue>(create);\n  static EnumValue? _defaultInstance;\n\n  /// Enum value name.\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// Enum value number.\n  @$pb.TagNumber(2)\n  $core.int get number => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set number($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasNumber() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearNumber() => $_clearField(2);\n\n  /// Protocol buffer options.\n  @$pb.TagNumber(3)\n  $pb.PbList<Option> get options => $_getList(2);\n}\n\n/// A protocol buffer option, which can be attached to a message, field,\n/// enumeration, etc.\n///\n/// New usages of this message as an alternative to FileOptions, MessageOptions,\n/// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions\n/// are strongly discouraged.\nclass Option extends $pb.GeneratedMessage {\n  factory Option({\n    $core.String? name,\n    $1.Any? value,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  Option._();\n\n  factory Option.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Option.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Option',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aOM<$1.Any>(2, _omitFieldNames ? '' : 'value', subBuilder: $1.Any.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Option clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Option copyWith(void Function(Option) updates) =>\n      super.copyWith((message) => updates(message as Option)) as Option;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Option create() => Option._();\n  @$core.override\n  Option createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Option getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Option>(create);\n  static Option? _defaultInstance;\n\n  /// The option's name. For protobuf built-in options (options defined in\n  /// descriptor.proto), this is the short name. For example, `\"map_entry\"`.\n  /// For custom options, it should be the fully-qualified name. For example,\n  /// `\"google.api.http\"`.\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// The option's value packed in an Any message. If the value is a primitive,\n  /// the corresponding wrapper type defined in google/protobuf/wrappers.proto\n  /// should be used. If the value is an enum, it should be stored as an int32\n  /// value using the google.protobuf.Int32Value type.\n  @$pb.TagNumber(2)\n  $1.Any get value => $_getN(1);\n  @$pb.TagNumber(2)\n  set value($1.Any value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasValue() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearValue() => $_clearField(2);\n  @$pb.TagNumber(2)\n  $1.Any ensureValue() => $_ensure(1);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/type.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/type.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// The syntax in which a protocol buffer element is defined.\nclass Syntax extends $pb.ProtobufEnum {\n  /// Syntax `proto2`.\n  static const Syntax SYNTAX_PROTO2 =\n      Syntax._(0, _omitEnumNames ? '' : 'SYNTAX_PROTO2');\n\n  /// Syntax `proto3`.\n  static const Syntax SYNTAX_PROTO3 =\n      Syntax._(1, _omitEnumNames ? '' : 'SYNTAX_PROTO3');\n\n  /// Syntax `editions`.\n  static const Syntax SYNTAX_EDITIONS =\n      Syntax._(2, _omitEnumNames ? '' : 'SYNTAX_EDITIONS');\n\n  static const $core.List<Syntax> values = <Syntax>[\n    SYNTAX_PROTO2,\n    SYNTAX_PROTO3,\n    SYNTAX_EDITIONS,\n  ];\n\n  static final $core.List<Syntax?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static Syntax? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const Syntax._(super.value, super.name);\n}\n\n/// Basic field types.\nclass Field_Kind extends $pb.ProtobufEnum {\n  /// Field type unknown.\n  static const Field_Kind TYPE_UNKNOWN =\n      Field_Kind._(0, _omitEnumNames ? '' : 'TYPE_UNKNOWN');\n\n  /// Field type double.\n  static const Field_Kind TYPE_DOUBLE =\n      Field_Kind._(1, _omitEnumNames ? '' : 'TYPE_DOUBLE');\n\n  /// Field type float.\n  static const Field_Kind TYPE_FLOAT =\n      Field_Kind._(2, _omitEnumNames ? '' : 'TYPE_FLOAT');\n\n  /// Field type int64.\n  static const Field_Kind TYPE_INT64 =\n      Field_Kind._(3, _omitEnumNames ? '' : 'TYPE_INT64');\n\n  /// Field type uint64.\n  static const Field_Kind TYPE_UINT64 =\n      Field_Kind._(4, _omitEnumNames ? '' : 'TYPE_UINT64');\n\n  /// Field type int32.\n  static const Field_Kind TYPE_INT32 =\n      Field_Kind._(5, _omitEnumNames ? '' : 'TYPE_INT32');\n\n  /// Field type fixed64.\n  static const Field_Kind TYPE_FIXED64 =\n      Field_Kind._(6, _omitEnumNames ? '' : 'TYPE_FIXED64');\n\n  /// Field type fixed32.\n  static const Field_Kind TYPE_FIXED32 =\n      Field_Kind._(7, _omitEnumNames ? '' : 'TYPE_FIXED32');\n\n  /// Field type bool.\n  static const Field_Kind TYPE_BOOL =\n      Field_Kind._(8, _omitEnumNames ? '' : 'TYPE_BOOL');\n\n  /// Field type string.\n  static const Field_Kind TYPE_STRING =\n      Field_Kind._(9, _omitEnumNames ? '' : 'TYPE_STRING');\n\n  /// Field type group. Proto2 syntax only, and deprecated.\n  static const Field_Kind TYPE_GROUP =\n      Field_Kind._(10, _omitEnumNames ? '' : 'TYPE_GROUP');\n\n  /// Field type message.\n  static const Field_Kind TYPE_MESSAGE =\n      Field_Kind._(11, _omitEnumNames ? '' : 'TYPE_MESSAGE');\n\n  /// Field type bytes.\n  static const Field_Kind TYPE_BYTES =\n      Field_Kind._(12, _omitEnumNames ? '' : 'TYPE_BYTES');\n\n  /// Field type uint32.\n  static const Field_Kind TYPE_UINT32 =\n      Field_Kind._(13, _omitEnumNames ? '' : 'TYPE_UINT32');\n\n  /// Field type enum.\n  static const Field_Kind TYPE_ENUM =\n      Field_Kind._(14, _omitEnumNames ? '' : 'TYPE_ENUM');\n\n  /// Field type sfixed32.\n  static const Field_Kind TYPE_SFIXED32 =\n      Field_Kind._(15, _omitEnumNames ? '' : 'TYPE_SFIXED32');\n\n  /// Field type sfixed64.\n  static const Field_Kind TYPE_SFIXED64 =\n      Field_Kind._(16, _omitEnumNames ? '' : 'TYPE_SFIXED64');\n\n  /// Field type sint32.\n  static const Field_Kind TYPE_SINT32 =\n      Field_Kind._(17, _omitEnumNames ? '' : 'TYPE_SINT32');\n\n  /// Field type sint64.\n  static const Field_Kind TYPE_SINT64 =\n      Field_Kind._(18, _omitEnumNames ? '' : 'TYPE_SINT64');\n\n  static const $core.List<Field_Kind> values = <Field_Kind>[\n    TYPE_UNKNOWN,\n    TYPE_DOUBLE,\n    TYPE_FLOAT,\n    TYPE_INT64,\n    TYPE_UINT64,\n    TYPE_INT32,\n    TYPE_FIXED64,\n    TYPE_FIXED32,\n    TYPE_BOOL,\n    TYPE_STRING,\n    TYPE_GROUP,\n    TYPE_MESSAGE,\n    TYPE_BYTES,\n    TYPE_UINT32,\n    TYPE_ENUM,\n    TYPE_SFIXED32,\n    TYPE_SFIXED64,\n    TYPE_SINT32,\n    TYPE_SINT64,\n  ];\n\n  static final $core.List<Field_Kind?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 18);\n  static Field_Kind? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const Field_Kind._(super.value, super.name);\n}\n\n/// Whether a field is optional, required, or repeated.\nclass Field_Cardinality extends $pb.ProtobufEnum {\n  /// For fields with unknown cardinality.\n  static const Field_Cardinality CARDINALITY_UNKNOWN =\n      Field_Cardinality._(0, _omitEnumNames ? '' : 'CARDINALITY_UNKNOWN');\n\n  /// For optional fields.\n  static const Field_Cardinality CARDINALITY_OPTIONAL =\n      Field_Cardinality._(1, _omitEnumNames ? '' : 'CARDINALITY_OPTIONAL');\n\n  /// For required fields. Proto2 syntax only.\n  static const Field_Cardinality CARDINALITY_REQUIRED =\n      Field_Cardinality._(2, _omitEnumNames ? '' : 'CARDINALITY_REQUIRED');\n\n  /// For repeated fields.\n  static const Field_Cardinality CARDINALITY_REPEATED =\n      Field_Cardinality._(3, _omitEnumNames ? '' : 'CARDINALITY_REPEATED');\n\n  static const $core.List<Field_Cardinality> values = <Field_Cardinality>[\n    CARDINALITY_UNKNOWN,\n    CARDINALITY_OPTIONAL,\n    CARDINALITY_REQUIRED,\n    CARDINALITY_REPEATED,\n  ];\n\n  static final $core.List<Field_Cardinality?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 3);\n  static Field_Cardinality? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const Field_Cardinality._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/type.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/type.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use syntaxDescriptor instead')\nconst Syntax$json = {\n  '1': 'Syntax',\n  '2': [\n    {'1': 'SYNTAX_PROTO2', '2': 0},\n    {'1': 'SYNTAX_PROTO3', '2': 1},\n    {'1': 'SYNTAX_EDITIONS', '2': 2},\n  ],\n};\n\n/// Descriptor for `Syntax`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List syntaxDescriptor = $convert.base64Decode(\n    'CgZTeW50YXgSEQoNU1lOVEFYX1BST1RPMhAAEhEKDVNZTlRBWF9QUk9UTzMQARITCg9TWU5UQV'\n    'hfRURJVElPTlMQAg==');\n\n@$core.Deprecated('Use typeDescriptor instead')\nconst Type$json = {\n  '1': 'Type',\n  '2': [\n    {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},\n    {\n      '1': 'fields',\n      '3': 2,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Field',\n      '10': 'fields'\n    },\n    {'1': 'oneofs', '3': 3, '4': 3, '5': 9, '10': 'oneofs'},\n    {\n      '1': 'options',\n      '3': 4,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Option',\n      '10': 'options'\n    },\n    {\n      '1': 'source_context',\n      '3': 5,\n      '4': 1,\n      '5': 11,\n      '6': '.google.protobuf.SourceContext',\n      '10': 'sourceContext'\n    },\n    {\n      '1': 'syntax',\n      '3': 6,\n      '4': 1,\n      '5': 14,\n      '6': '.google.protobuf.Syntax',\n      '10': 'syntax'\n    },\n    {'1': 'edition', '3': 7, '4': 1, '5': 9, '10': 'edition'},\n  ],\n};\n\n/// Descriptor for `Type`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List typeDescriptor = $convert.base64Decode(\n    'CgRUeXBlEhIKBG5hbWUYASABKAlSBG5hbWUSLgoGZmllbGRzGAIgAygLMhYuZ29vZ2xlLnByb3'\n    'RvYnVmLkZpZWxkUgZmaWVsZHMSFgoGb25lb2ZzGAMgAygJUgZvbmVvZnMSMQoHb3B0aW9ucxgE'\n    'IAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5PcHRpb25SB29wdGlvbnMSRQoOc291cmNlX2NvbnRleH'\n    'QYBSABKAsyHi5nb29nbGUucHJvdG9idWYuU291cmNlQ29udGV4dFINc291cmNlQ29udGV4dBIv'\n    'CgZzeW50YXgYBiABKA4yFy5nb29nbGUucHJvdG9idWYuU3ludGF4UgZzeW50YXgSGAoHZWRpdG'\n    'lvbhgHIAEoCVIHZWRpdGlvbg==');\n\n@$core.Deprecated('Use fieldDescriptor instead')\nconst Field$json = {\n  '1': 'Field',\n  '2': [\n    {\n      '1': 'kind',\n      '3': 1,\n      '4': 1,\n      '5': 14,\n      '6': '.google.protobuf.Field.Kind',\n      '10': 'kind'\n    },\n    {\n      '1': 'cardinality',\n      '3': 2,\n      '4': 1,\n      '5': 14,\n      '6': '.google.protobuf.Field.Cardinality',\n      '10': 'cardinality'\n    },\n    {'1': 'number', '3': 3, '4': 1, '5': 5, '10': 'number'},\n    {'1': 'name', '3': 4, '4': 1, '5': 9, '10': 'name'},\n    {'1': 'type_url', '3': 6, '4': 1, '5': 9, '10': 'typeUrl'},\n    {'1': 'oneof_index', '3': 7, '4': 1, '5': 5, '10': 'oneofIndex'},\n    {'1': 'packed', '3': 8, '4': 1, '5': 8, '10': 'packed'},\n    {\n      '1': 'options',\n      '3': 9,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Option',\n      '10': 'options'\n    },\n    {'1': 'json_name', '3': 10, '4': 1, '5': 9, '10': 'jsonName'},\n    {'1': 'default_value', '3': 11, '4': 1, '5': 9, '10': 'defaultValue'},\n  ],\n  '4': [Field_Kind$json, Field_Cardinality$json],\n};\n\n@$core.Deprecated('Use fieldDescriptor instead')\nconst Field_Kind$json = {\n  '1': 'Kind',\n  '2': [\n    {'1': 'TYPE_UNKNOWN', '2': 0},\n    {'1': 'TYPE_DOUBLE', '2': 1},\n    {'1': 'TYPE_FLOAT', '2': 2},\n    {'1': 'TYPE_INT64', '2': 3},\n    {'1': 'TYPE_UINT64', '2': 4},\n    {'1': 'TYPE_INT32', '2': 5},\n    {'1': 'TYPE_FIXED64', '2': 6},\n    {'1': 'TYPE_FIXED32', '2': 7},\n    {'1': 'TYPE_BOOL', '2': 8},\n    {'1': 'TYPE_STRING', '2': 9},\n    {'1': 'TYPE_GROUP', '2': 10},\n    {'1': 'TYPE_MESSAGE', '2': 11},\n    {'1': 'TYPE_BYTES', '2': 12},\n    {'1': 'TYPE_UINT32', '2': 13},\n    {'1': 'TYPE_ENUM', '2': 14},\n    {'1': 'TYPE_SFIXED32', '2': 15},\n    {'1': 'TYPE_SFIXED64', '2': 16},\n    {'1': 'TYPE_SINT32', '2': 17},\n    {'1': 'TYPE_SINT64', '2': 18},\n  ],\n};\n\n@$core.Deprecated('Use fieldDescriptor instead')\nconst Field_Cardinality$json = {\n  '1': 'Cardinality',\n  '2': [\n    {'1': 'CARDINALITY_UNKNOWN', '2': 0},\n    {'1': 'CARDINALITY_OPTIONAL', '2': 1},\n    {'1': 'CARDINALITY_REQUIRED', '2': 2},\n    {'1': 'CARDINALITY_REPEATED', '2': 3},\n  ],\n};\n\n/// Descriptor for `Field`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List fieldDescriptor = $convert.base64Decode(\n    'CgVGaWVsZBIvCgRraW5kGAEgASgOMhsuZ29vZ2xlLnByb3RvYnVmLkZpZWxkLktpbmRSBGtpbm'\n    'QSRAoLY2FyZGluYWxpdHkYAiABKA4yIi5nb29nbGUucHJvdG9idWYuRmllbGQuQ2FyZGluYWxp'\n    'dHlSC2NhcmRpbmFsaXR5EhYKBm51bWJlchgDIAEoBVIGbnVtYmVyEhIKBG5hbWUYBCABKAlSBG'\n    '5hbWUSGQoIdHlwZV91cmwYBiABKAlSB3R5cGVVcmwSHwoLb25lb2ZfaW5kZXgYByABKAVSCm9u'\n    'ZW9mSW5kZXgSFgoGcGFja2VkGAggASgIUgZwYWNrZWQSMQoHb3B0aW9ucxgJIAMoCzIXLmdvb2'\n    'dsZS5wcm90b2J1Zi5PcHRpb25SB29wdGlvbnMSGwoJanNvbl9uYW1lGAogASgJUghqc29uTmFt'\n    'ZRIjCg1kZWZhdWx0X3ZhbHVlGAsgASgJUgxkZWZhdWx0VmFsdWUiyAIKBEtpbmQSEAoMVFlQRV'\n    '9VTktOT1dOEAASDwoLVFlQRV9ET1VCTEUQARIOCgpUWVBFX0ZMT0FUEAISDgoKVFlQRV9JTlQ2'\n    'NBADEg8KC1RZUEVfVUlOVDY0EAQSDgoKVFlQRV9JTlQzMhAFEhAKDFRZUEVfRklYRUQ2NBAGEh'\n    'AKDFRZUEVfRklYRUQzMhAHEg0KCVRZUEVfQk9PTBAIEg8KC1RZUEVfU1RSSU5HEAkSDgoKVFlQ'\n    'RV9HUk9VUBAKEhAKDFRZUEVfTUVTU0FHRRALEg4KClRZUEVfQllURVMQDBIPCgtUWVBFX1VJTl'\n    'QzMhANEg0KCVRZUEVfRU5VTRAOEhEKDVRZUEVfU0ZJWEVEMzIQDxIRCg1UWVBFX1NGSVhFRDY0'\n    'EBASDwoLVFlQRV9TSU5UMzIQERIPCgtUWVBFX1NJTlQ2NBASInQKC0NhcmRpbmFsaXR5EhcKE0'\n    'NBUkRJTkFMSVRZX1VOS05PV04QABIYChRDQVJESU5BTElUWV9PUFRJT05BTBABEhgKFENBUkRJ'\n    'TkFMSVRZX1JFUVVJUkVEEAISGAoUQ0FSRElOQUxJVFlfUkVQRUFURUQQAw==');\n\n@$core.Deprecated('Use enumDescriptor instead')\nconst Enum$json = {\n  '1': 'Enum',\n  '2': [\n    {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},\n    {\n      '1': 'enumvalue',\n      '3': 2,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.EnumValue',\n      '10': 'enumvalue'\n    },\n    {\n      '1': 'options',\n      '3': 3,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Option',\n      '10': 'options'\n    },\n    {\n      '1': 'source_context',\n      '3': 4,\n      '4': 1,\n      '5': 11,\n      '6': '.google.protobuf.SourceContext',\n      '10': 'sourceContext'\n    },\n    {\n      '1': 'syntax',\n      '3': 5,\n      '4': 1,\n      '5': 14,\n      '6': '.google.protobuf.Syntax',\n      '10': 'syntax'\n    },\n    {'1': 'edition', '3': 6, '4': 1, '5': 9, '10': 'edition'},\n  ],\n};\n\n/// Descriptor for `Enum`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List enumDescriptor = $convert.base64Decode(\n    'CgRFbnVtEhIKBG5hbWUYASABKAlSBG5hbWUSOAoJZW51bXZhbHVlGAIgAygLMhouZ29vZ2xlLn'\n    'Byb3RvYnVmLkVudW1WYWx1ZVIJZW51bXZhbHVlEjEKB29wdGlvbnMYAyADKAsyFy5nb29nbGUu'\n    'cHJvdG9idWYuT3B0aW9uUgdvcHRpb25zEkUKDnNvdXJjZV9jb250ZXh0GAQgASgLMh4uZ29vZ2'\n    'xlLnByb3RvYnVmLlNvdXJjZUNvbnRleHRSDXNvdXJjZUNvbnRleHQSLwoGc3ludGF4GAUgASgO'\n    'MhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRheFIGc3ludGF4EhgKB2VkaXRpb24YBiABKAlSB2VkaX'\n    'Rpb24=');\n\n@$core.Deprecated('Use enumValueDescriptor instead')\nconst EnumValue$json = {\n  '1': 'EnumValue',\n  '2': [\n    {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},\n    {'1': 'number', '3': 2, '4': 1, '5': 5, '10': 'number'},\n    {\n      '1': 'options',\n      '3': 3,\n      '4': 3,\n      '5': 11,\n      '6': '.google.protobuf.Option',\n      '10': 'options'\n    },\n  ],\n};\n\n/// Descriptor for `EnumValue`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List enumValueDescriptor = $convert.base64Decode(\n    'CglFbnVtVmFsdWUSEgoEbmFtZRgBIAEoCVIEbmFtZRIWCgZudW1iZXIYAiABKAVSBm51bWJlch'\n    'IxCgdvcHRpb25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvblIHb3B0aW9ucw==');\n\n@$core.Deprecated('Use optionDescriptor instead')\nconst Option$json = {\n  '1': 'Option',\n  '2': [\n    {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},\n    {\n      '1': 'value',\n      '3': 2,\n      '4': 1,\n      '5': 11,\n      '6': '.google.protobuf.Any',\n      '10': 'value'\n    },\n  ],\n};\n\n/// Descriptor for `Option`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List optionDescriptor = $convert.base64Decode(\n    'CgZPcHRpb24SEgoEbmFtZRgBIAEoCVIEbmFtZRIqCgV2YWx1ZRgCIAEoCzIULmdvb2dsZS5wcm'\n    '90b2J1Zi5BbnlSBXZhbHVl');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/wrappers.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/wrappers.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package\n// ignore_for_file: implementation_imports, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\nimport 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// Wrapper message for `double`.\n///\n/// The JSON representation for `DoubleValue` is JSON number.\n///\n/// Not recommended for use in new APIs, but still useful for legacy APIs and\n/// has no plan to be removed.\nclass DoubleValue extends $pb.GeneratedMessage with $mixin.DoubleValueMixin {\n  factory DoubleValue({\n    $core.double? value,\n  }) {\n    final result = create();\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  DoubleValue._();\n\n  factory DoubleValue.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory DoubleValue.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'DoubleValue',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.doubleValue)\n    ..aD(1, _omitFieldNames ? '' : 'value')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DoubleValue clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DoubleValue copyWith(void Function(DoubleValue) updates) =>\n      super.copyWith((message) => updates(message as DoubleValue))\n          as DoubleValue;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static DoubleValue create() => DoubleValue._();\n  @$core.override\n  DoubleValue createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static DoubleValue getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<DoubleValue>(create);\n  static DoubleValue? _defaultInstance;\n\n  /// The double value.\n  @$pb.TagNumber(1)\n  $core.double get value => $_getN(0);\n  @$pb.TagNumber(1)\n  set value($core.double value) => $_setDouble(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValue() => $_clearField(1);\n}\n\n/// Wrapper message for `float`.\n///\n/// The JSON representation for `FloatValue` is JSON number.\n///\n/// Not recommended for use in new APIs, but still useful for legacy APIs and\n/// has no plan to be removed.\nclass FloatValue extends $pb.GeneratedMessage with $mixin.FloatValueMixin {\n  factory FloatValue({\n    $core.double? value,\n  }) {\n    final result = create();\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  FloatValue._();\n\n  factory FloatValue.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FloatValue.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FloatValue',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.floatValue)\n    ..aD(1, _omitFieldNames ? '' : 'value', fieldType: $pb.PbFieldType.OF)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FloatValue clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FloatValue copyWith(void Function(FloatValue) updates) =>\n      super.copyWith((message) => updates(message as FloatValue)) as FloatValue;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FloatValue create() => FloatValue._();\n  @$core.override\n  FloatValue createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FloatValue getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FloatValue>(create);\n  static FloatValue? _defaultInstance;\n\n  /// The float value.\n  @$pb.TagNumber(1)\n  $core.double get value => $_getN(0);\n  @$pb.TagNumber(1)\n  set value($core.double value) => $_setFloat(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValue() => $_clearField(1);\n}\n\n/// Wrapper message for `int64`.\n///\n/// The JSON representation for `Int64Value` is JSON string.\n///\n/// Not recommended for use in new APIs, but still useful for legacy APIs and\n/// has no plan to be removed.\nclass Int64Value extends $pb.GeneratedMessage with $mixin.Int64ValueMixin {\n  factory Int64Value({\n    $fixnum.Int64? value,\n  }) {\n    final result = create();\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  Int64Value._();\n\n  factory Int64Value.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Int64Value.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Int64Value',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.int64Value)\n    ..aInt64(1, _omitFieldNames ? '' : 'value')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Int64Value clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Int64Value copyWith(void Function(Int64Value) updates) =>\n      super.copyWith((message) => updates(message as Int64Value)) as Int64Value;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Int64Value create() => Int64Value._();\n  @$core.override\n  Int64Value createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Int64Value getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<Int64Value>(create);\n  static Int64Value? _defaultInstance;\n\n  /// The int64 value.\n  @$pb.TagNumber(1)\n  $fixnum.Int64 get value => $_getI64(0);\n  @$pb.TagNumber(1)\n  set value($fixnum.Int64 value) => $_setInt64(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValue() => $_clearField(1);\n}\n\n/// Wrapper message for `uint64`.\n///\n/// The JSON representation for `UInt64Value` is JSON string.\n///\n/// Not recommended for use in new APIs, but still useful for legacy APIs and\n/// has no plan to be removed.\nclass UInt64Value extends $pb.GeneratedMessage with $mixin.UInt64ValueMixin {\n  factory UInt64Value({\n    $fixnum.Int64? value,\n  }) {\n    final result = create();\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  UInt64Value._();\n\n  factory UInt64Value.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory UInt64Value.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'UInt64Value',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.uint64Value)\n    ..a<$fixnum.Int64>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OU6,\n        defaultOrMaker: $fixnum.Int64.ZERO)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UInt64Value clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UInt64Value copyWith(void Function(UInt64Value) updates) =>\n      super.copyWith((message) => updates(message as UInt64Value))\n          as UInt64Value;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static UInt64Value create() => UInt64Value._();\n  @$core.override\n  UInt64Value createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static UInt64Value getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<UInt64Value>(create);\n  static UInt64Value? _defaultInstance;\n\n  /// The uint64 value.\n  @$pb.TagNumber(1)\n  $fixnum.Int64 get value => $_getI64(0);\n  @$pb.TagNumber(1)\n  set value($fixnum.Int64 value) => $_setInt64(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValue() => $_clearField(1);\n}\n\n/// Wrapper message for `int32`.\n///\n/// The JSON representation for `Int32Value` is JSON number.\n///\n/// Not recommended for use in new APIs, but still useful for legacy APIs and\n/// has no plan to be removed.\nclass Int32Value extends $pb.GeneratedMessage with $mixin.Int32ValueMixin {\n  factory Int32Value({\n    $core.int? value,\n  }) {\n    final result = create();\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  Int32Value._();\n\n  factory Int32Value.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Int32Value.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Int32Value',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.int32Value)\n    ..aI(1, _omitFieldNames ? '' : 'value')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Int32Value clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Int32Value copyWith(void Function(Int32Value) updates) =>\n      super.copyWith((message) => updates(message as Int32Value)) as Int32Value;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Int32Value create() => Int32Value._();\n  @$core.override\n  Int32Value createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Int32Value getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<Int32Value>(create);\n  static Int32Value? _defaultInstance;\n\n  /// The int32 value.\n  @$pb.TagNumber(1)\n  $core.int get value => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set value($core.int value) => $_setSignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValue() => $_clearField(1);\n}\n\n/// Wrapper message for `uint32`.\n///\n/// The JSON representation for `UInt32Value` is JSON number.\n///\n/// Not recommended for use in new APIs, but still useful for legacy APIs and\n/// has no plan to be removed.\nclass UInt32Value extends $pb.GeneratedMessage with $mixin.UInt32ValueMixin {\n  factory UInt32Value({\n    $core.int? value,\n  }) {\n    final result = create();\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  UInt32Value._();\n\n  factory UInt32Value.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory UInt32Value.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'UInt32Value',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.uint32Value)\n    ..aI(1, _omitFieldNames ? '' : 'value', fieldType: $pb.PbFieldType.OU3)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UInt32Value clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UInt32Value copyWith(void Function(UInt32Value) updates) =>\n      super.copyWith((message) => updates(message as UInt32Value))\n          as UInt32Value;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static UInt32Value create() => UInt32Value._();\n  @$core.override\n  UInt32Value createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static UInt32Value getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<UInt32Value>(create);\n  static UInt32Value? _defaultInstance;\n\n  /// The uint32 value.\n  @$pb.TagNumber(1)\n  $core.int get value => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set value($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValue() => $_clearField(1);\n}\n\n/// Wrapper message for `bool`.\n///\n/// The JSON representation for `BoolValue` is JSON `true` and `false`.\n///\n/// Not recommended for use in new APIs, but still useful for legacy APIs and\n/// has no plan to be removed.\nclass BoolValue extends $pb.GeneratedMessage with $mixin.BoolValueMixin {\n  factory BoolValue({\n    $core.bool? value,\n  }) {\n    final result = create();\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  BoolValue._();\n\n  factory BoolValue.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory BoolValue.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'BoolValue',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.boolValue)\n    ..aOB(1, _omitFieldNames ? '' : 'value')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  BoolValue clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  BoolValue copyWith(void Function(BoolValue) updates) =>\n      super.copyWith((message) => updates(message as BoolValue)) as BoolValue;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static BoolValue create() => BoolValue._();\n  @$core.override\n  BoolValue createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static BoolValue getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<BoolValue>(create);\n  static BoolValue? _defaultInstance;\n\n  /// The bool value.\n  @$pb.TagNumber(1)\n  $core.bool get value => $_getBF(0);\n  @$pb.TagNumber(1)\n  set value($core.bool value) => $_setBool(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValue() => $_clearField(1);\n}\n\n/// Wrapper message for `string`.\n///\n/// The JSON representation for `StringValue` is JSON string.\n///\n/// Not recommended for use in new APIs, but still useful for legacy APIs and\n/// has no plan to be removed.\nclass StringValue extends $pb.GeneratedMessage with $mixin.StringValueMixin {\n  factory StringValue({\n    $core.String? value,\n  }) {\n    final result = create();\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  StringValue._();\n\n  factory StringValue.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory StringValue.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'StringValue',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.stringValue)\n    ..aOS(1, _omitFieldNames ? '' : 'value')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  StringValue clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  StringValue copyWith(void Function(StringValue) updates) =>\n      super.copyWith((message) => updates(message as StringValue))\n          as StringValue;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static StringValue create() => StringValue._();\n  @$core.override\n  StringValue createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static StringValue getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<StringValue>(create);\n  static StringValue? _defaultInstance;\n\n  /// The string value.\n  @$pb.TagNumber(1)\n  $core.String get value => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set value($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValue() => $_clearField(1);\n}\n\n/// Wrapper message for `bytes`.\n///\n/// The JSON representation for `BytesValue` is JSON string.\n///\n/// Not recommended for use in new APIs, but still useful for legacy APIs and\n/// has no plan to be removed.\nclass BytesValue extends $pb.GeneratedMessage with $mixin.BytesValueMixin {\n  factory BytesValue({\n    $core.List<$core.int>? value,\n  }) {\n    final result = create();\n    if (value != null) result.value = value;\n    return result;\n  }\n\n  BytesValue._();\n\n  factory BytesValue.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory BytesValue.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'BytesValue',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create,\n      wellKnownType: $mixin.WellKnownType.bytesValue)\n    ..a<$core.List<$core.int>>(\n        1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  BytesValue clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  BytesValue copyWith(void Function(BytesValue) updates) =>\n      super.copyWith((message) => updates(message as BytesValue)) as BytesValue;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static BytesValue create() => BytesValue._();\n  @$core.override\n  BytesValue createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static BytesValue getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<BytesValue>(create);\n  static BytesValue? _defaultInstance;\n\n  /// The bytes value.\n  @$pb.TagNumber(1)\n  $core.List<$core.int> get value => $_getN(0);\n  @$pb.TagNumber(1)\n  set value($core.List<$core.int> value) => $_setBytes(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValue() => $_clearField(1);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protobuf/lib/well_known_types/google/protobuf/wrappers.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/wrappers.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use doubleValueDescriptor instead')\nconst DoubleValue$json = {\n  '1': 'DoubleValue',\n  '2': [\n    {'1': 'value', '3': 1, '4': 1, '5': 1, '10': 'value'},\n  ],\n};\n\n/// Descriptor for `DoubleValue`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List doubleValueDescriptor =\n    $convert.base64Decode('CgtEb3VibGVWYWx1ZRIUCgV2YWx1ZRgBIAEoAVIFdmFsdWU=');\n\n@$core.Deprecated('Use floatValueDescriptor instead')\nconst FloatValue$json = {\n  '1': 'FloatValue',\n  '2': [\n    {'1': 'value', '3': 1, '4': 1, '5': 2, '10': 'value'},\n  ],\n};\n\n/// Descriptor for `FloatValue`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List floatValueDescriptor =\n    $convert.base64Decode('CgpGbG9hdFZhbHVlEhQKBXZhbHVlGAEgASgCUgV2YWx1ZQ==');\n\n@$core.Deprecated('Use int64ValueDescriptor instead')\nconst Int64Value$json = {\n  '1': 'Int64Value',\n  '2': [\n    {'1': 'value', '3': 1, '4': 1, '5': 3, '10': 'value'},\n  ],\n};\n\n/// Descriptor for `Int64Value`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List int64ValueDescriptor =\n    $convert.base64Decode('CgpJbnQ2NFZhbHVlEhQKBXZhbHVlGAEgASgDUgV2YWx1ZQ==');\n\n@$core.Deprecated('Use uInt64ValueDescriptor instead')\nconst UInt64Value$json = {\n  '1': 'UInt64Value',\n  '2': [\n    {'1': 'value', '3': 1, '4': 1, '5': 4, '10': 'value'},\n  ],\n};\n\n/// Descriptor for `UInt64Value`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List uInt64ValueDescriptor =\n    $convert.base64Decode('CgtVSW50NjRWYWx1ZRIUCgV2YWx1ZRgBIAEoBFIFdmFsdWU=');\n\n@$core.Deprecated('Use int32ValueDescriptor instead')\nconst Int32Value$json = {\n  '1': 'Int32Value',\n  '2': [\n    {'1': 'value', '3': 1, '4': 1, '5': 5, '10': 'value'},\n  ],\n};\n\n/// Descriptor for `Int32Value`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List int32ValueDescriptor =\n    $convert.base64Decode('CgpJbnQzMlZhbHVlEhQKBXZhbHVlGAEgASgFUgV2YWx1ZQ==');\n\n@$core.Deprecated('Use uInt32ValueDescriptor instead')\nconst UInt32Value$json = {\n  '1': 'UInt32Value',\n  '2': [\n    {'1': 'value', '3': 1, '4': 1, '5': 13, '10': 'value'},\n  ],\n};\n\n/// Descriptor for `UInt32Value`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List uInt32ValueDescriptor =\n    $convert.base64Decode('CgtVSW50MzJWYWx1ZRIUCgV2YWx1ZRgBIAEoDVIFdmFsdWU=');\n\n@$core.Deprecated('Use boolValueDescriptor instead')\nconst BoolValue$json = {\n  '1': 'BoolValue',\n  '2': [\n    {'1': 'value', '3': 1, '4': 1, '5': 8, '10': 'value'},\n  ],\n};\n\n/// Descriptor for `BoolValue`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List boolValueDescriptor =\n    $convert.base64Decode('CglCb29sVmFsdWUSFAoFdmFsdWUYASABKAhSBXZhbHVl');\n\n@$core.Deprecated('Use stringValueDescriptor instead')\nconst StringValue$json = {\n  '1': 'StringValue',\n  '2': [\n    {'1': 'value', '3': 1, '4': 1, '5': 9, '10': 'value'},\n  ],\n};\n\n/// Descriptor for `StringValue`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List stringValueDescriptor =\n    $convert.base64Decode('CgtTdHJpbmdWYWx1ZRIUCgV2YWx1ZRgBIAEoCVIFdmFsdWU=');\n\n@$core.Deprecated('Use bytesValueDescriptor instead')\nconst BytesValue$json = {\n  '1': 'BytesValue',\n  '2': [\n    {'1': 'value', '3': 1, '4': 1, '5': 12, '10': 'value'},\n  ],\n};\n\n/// Descriptor for `BytesValue`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List bytesValueDescriptor =\n    $convert.base64Decode('CgpCeXRlc1ZhbHVlEhQKBXZhbHVlGAEgASgMUgV2YWx1ZQ==');\n"
  },
  {
    "path": "protobuf/pubspec.yaml",
    "content": "name: protobuf\nversion: 6.0.0\ndescription: >-\n  Runtime library for protocol buffers support. Use with package:protoc_plugin\n  to generate Dart code for your '.proto' files.\nrepository: https://github.com/google/protobuf.dart/tree/master/protobuf\n\nenvironment:\n  sdk: ^3.7.0\n\nresolution: workspace\n\ndependencies:\n  collection: ^1.15.0\n  fixnum: ^1.0.0\n  meta: ^1.7.0\n\ndev_dependencies:\n  lints: '>=5.0.0 <7.0.0'\n  test: ^1.16.0\n"
  },
  {
    "path": "protobuf/test/builder_info_test.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group('className', () {\n    final qualifiedmessageName = 'proto.test.TestMessage';\n    final expectedMessageName = 'TestMessage';\n    test('truncates qualifiedMessageName containing dots', () {\n      final info = BuilderInfo(qualifiedmessageName);\n      expect(info.messageName, expectedMessageName);\n    });\n\n    test('uses qualifiedMessageName if it contains no dots', () {\n      final info = BuilderInfo(expectedMessageName);\n      expect(info.messageName, expectedMessageName);\n    });\n  });\n}\n"
  },
  {
    "path": "protobuf/test/codec_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:typed_data';\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport 'test_util.dart';\n\ntypedef RoundtripTester<T> = void Function(T value, List<int> bytes);\n\nvoid main() {\n  ByteData makeData(Uint8List bytes) => ByteData.view(bytes.buffer);\n\n  Uint8List Function(dynamic) convertToBytes(fieldType) => (value) {\n    final writer = CodedBufferWriter()..writeField(0, fieldType, value);\n    return writer.toBuffer().sublist(1);\n  };\n\n  RoundtripTester<T> roundtripTester<T>({\n    T Function(CodedBufferReader bytes)? fromBytes,\n    List<int> Function(T value)? toBytes,\n  }) {\n    return (T value, List<int> bytes) {\n      expect(fromBytes!(CodedBufferReader(bytes)), equals(value));\n      expect(toBytes!(value), bytes);\n    };\n  }\n\n  final int32ToBytes = convertToBytes(PbFieldType.O3);\n\n  test('testInt32RoundTrips', () {\n    final roundtrip = roundtripTester(\n      fromBytes: (CodedBufferReader reader) => reader.readInt32(),\n      toBytes: int32ToBytes,\n    );\n    roundtrip(0, [0x00]);\n    roundtrip(1, [0x01]);\n    roundtrip(206, [0xce, 0x01]);\n    roundtrip(300, [0xac, 0x02]);\n    roundtrip(2147483647, [0xff, 0xff, 0xff, 0xff, 0x07]);\n    roundtrip(-2147483648, [\n      0x80,\n      0x80,\n      0x80,\n      0x80,\n      0xf8,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0x01,\n    ]);\n    roundtrip(-1, [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01]);\n    roundtrip(-2, [0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01]);\n  });\n\n  test('testSint32', () {\n    final roundtrip = roundtripTester(\n      fromBytes: (CodedBufferReader reader) => reader.readSint32(),\n      toBytes: convertToBytes(PbFieldType.OS3),\n    );\n\n    roundtrip(0, [0x00]);\n    roundtrip(-1, [0x01]);\n    roundtrip(1, [0x02]);\n    roundtrip(-2, [0x03]);\n  });\n\n  test('testSint64', () {\n    final roundtrip = roundtripTester(\n      fromBytes: (CodedBufferReader reader) => reader.readSint64(),\n      toBytes: convertToBytes(PbFieldType.OS6),\n    );\n\n    roundtrip(make64(0), [0x00]);\n    roundtrip(make64(-1), [0x01]);\n    roundtrip(make64(1), [0x02]);\n    roundtrip(make64(-2), [0x03]);\n  });\n\n  test('testFixed32', () {\n    final roundtrip = roundtripTester(\n      fromBytes: (CodedBufferReader reader) => reader.readFixed32(),\n      toBytes: convertToBytes(PbFieldType.OF3),\n    );\n\n    roundtrip(0, [0x00, 0x00, 0x00, 0x00]);\n    roundtrip(1, [0x01, 0x00, 0x00, 0x00]);\n    roundtrip(4294967295, [0xff, 0xff, 0xff, 0xff]);\n    roundtrip(2427130573, [0xcd, 0x12, 0xab, 0x90]);\n  });\n\n  test('testFixed64', () {\n    final roundtrip = roundtripTester(\n      fromBytes: (CodedBufferReader reader) => reader.readFixed64(),\n      toBytes: convertToBytes(PbFieldType.OF6),\n    );\n\n    roundtrip(make64(0, 0), [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);\n    roundtrip(make64(1, 0), [0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);\n    roundtrip(make64(0xffffffff, 0xffffffff), [\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n    ]);\n    roundtrip(make64(0x00000001, 0x40000000), [\n      0x01,\n      0x00,\n      0x00,\n      0x00,\n      0x00,\n      0x00,\n      0x00,\n      0x40,\n    ]);\n  });\n\n  test('testSfixed32', () {\n    final roundtrip = roundtripTester(\n      fromBytes: (CodedBufferReader reader) => reader.readSfixed32(),\n      toBytes: convertToBytes(PbFieldType.OSF3),\n    );\n\n    roundtrip(0, [0x00, 0x00, 0x00, 0x00]);\n    roundtrip(1, [0x01, 0x00, 0x00, 0x00]);\n    roundtrip(-2147483648, [0x00, 0x00, 0x00, 0x80]);\n    roundtrip(-1, [0xff, 0xff, 0xff, 0xff]);\n  });\n\n  test('testSfixed64', () {\n    final roundtrip = roundtripTester(\n      fromBytes: (CodedBufferReader reader) => reader.readSfixed64(),\n      toBytes: convertToBytes(PbFieldType.OSF6),\n    );\n\n    roundtrip(make64(0), [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);\n    roundtrip(make64(-1), [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]);\n    roundtrip(make64(1), [0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);\n    roundtrip(make64(-2), [0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]);\n    roundtrip(make64(0xffffffff, 0x7fffffff), [\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0x7f,\n    ]);\n    roundtrip(make64(0x00000000, 0x80000000), [\n      0x00,\n      0x00,\n      0x00,\n      0x00,\n      0x00,\n      0x00,\n      0x00,\n      0x80,\n    ]);\n  });\n\n  test('testBool', () {\n    bool readBool(List<int> bytes) => CodedBufferReader(bytes).readBool();\n\n    expect(readBool([0x00]), isFalse);\n    expect(readBool([0x01]), isTrue);\n    expect(readBool([0xff, 0x01]), isTrue);\n  });\n\n  // Compare two doubles, where NaNs and same-sign inifinities compare equal.\n  // For normal values, use equals.\n  Matcher doubleEquals(double expected) =>\n      expected.isNaN\n          ? predicate<double>((x) => x.isNaN, 'NaN expected')\n          : equals(expected);\n\n  List<int> dataToBytes(ByteData byteData) => Uint8List.view(byteData.buffer);\n  final floatToBytes = convertToBytes(PbFieldType.OF);\n  int floatToBits(double value) =>\n      makeData(floatToBytes(value)).getUint32(0, Endian.little);\n\n  void test32(int bits, double value) {\n    double readFloat(int bits) {\n      final bytes = dataToBytes(ByteData(4)..setUint32(0, bits, Endian.little));\n      return CodedBufferReader(bytes).readFloat();\n    }\n\n    expect(floatToBits(value), bits);\n    expect(readFloat(bits), doubleEquals(value));\n  }\n\n  final doubleToBytes = convertToBytes(PbFieldType.OD);\n\n  void test64(List<int> hilo, double value) {\n    // Encode a double to its wire format.\n    final data = makeData(doubleToBytes(value));\n    final actualHilo = [\n      data.getUint32(4, Endian.little),\n      data.getUint32(0, Endian.little),\n    ];\n    //int encoded = data.getUint64(0, Endian.little);\n    expect(actualHilo, hilo);\n\n    // Decode it again (round trip).\n    final bytes = dataToBytes(data);\n    final reencoded = CodedBufferReader(bytes).readDouble();\n    expect(reencoded, doubleEquals(value));\n  }\n\n  test('testFloat', () {\n    // Denorms.\n    test32(0x1, 1.401298464324817E-45);\n    test32(0x2, 1.401298464324817E-45 * 2.0);\n    test32(0x3, 1.401298464324817E-45 * 3.0);\n    test32(0x00ba98, 1.401298464324817E-45 * 0x00ba98);\n    test32(8034422, 1.401298464324817E-45 * 8034422);\n    test32(0x7fffff, 1.401298464324817E-45 * 0x7fffff);\n    test32(0x80000001, -1.401298464324817E-45);\n    test32(0x80000002, -1.401298464324817E-45 * 2.0);\n    test32(0x80000003, -1.401298464324817E-45 * 3.0);\n    test32(0x8000ba98, -1.401298464324817E-45 * 0x00ba98);\n    test32(0x807a9876, -1.401298464324817E-45 * 0x7a9876);\n    test32(0x807fffff, -1.401298464324817E-45 * 0x7fffff);\n    // Very small non-denorms.\n    test32(0x00800000, 1.1754943508222875E-38);\n    test32(0x00800001, 1.175494490952134E-38);\n    test32(0x00801234, 1.176147355906663E-38);\n    test32(0x80800000, -1.1754943508222875E-38);\n    test32(0x80800001, -1.175494490952134E-38);\n    test32(0x80801234, -1.176147355906663E-38);\n    // Out of range.\n    expect(floatToBits(1.401298464324816E-45), 0x00000000);\n    expect(floatToBits(-1.401298464324816E-45), 0x80000000);\n    expect(floatToBits(3.4028234663852888E38), 0x7f800000);\n    expect(floatToBits(-3.4028234663852888E38), 0xff800000);\n\n    // Numbers smaller than the smallest representable float round to +/- 0.\n    expect(floatToBits(1.0E-50), 0x0);\n    expect(floatToBits(-1.0E-50), 0x80000000);\n\n    test32(0x0, 0.0);\n    test32(0x80000000, -0.0);\n    test32(0x7fc00000, double.nan);\n    test32(0x7f800000, double.infinity);\n    test32(0xff800000, double.negativeInfinity);\n    test32(0x3f800000, 1.0);\n    test32(0x40000000, 2.0);\n    test32(0x3f7ffffe, 0.9999998807907104);\n    test32(0x3f800001, 1.0000001192092896);\n    test32(0x3fffffff, 1.9999998807907104);\n    test32(0x40000000, 2.0);\n    test32(0x3dcccccd, 0.10000000149011612);\n    test32(0xbdcccccd, -0.10000000149011612);\n    test32(0x3e4ccccd, 0.20000000298023224);\n    test32(0xbe4ccccd, -0.20000000298023224);\n    test32(0x42f6e9e0, 123.456787109375);\n    test32(0xc2f6e9e0, -123.456787109375);\n    // Max float.\n    test32(0x7f7fffff, 3.4028234663852886E38);\n    test32(0xff7fffff, -3.4028234663852886E38);\n    test32(0x80000001, -1.401298464324817E-45);\n    test32(0x3e4cdcd4, 0.2000611424446106);\n    test32(0x3f4ef68e, 0.8084496259689331);\n    test32(0x3dd77088, 0.10519510507583618);\n    test32(0x3e16156c, 0.14656609296798706);\n    test32(0x3ea3776c, 0.3192704916000366);\n    test32(0x3f510cbb, 0.816600501537323);\n    test32(0x3ed6e3d6, 0.4197070002555847);\n    test32(0x3f2209e6, 0.6329635381698608);\n    test32(0x3f20fdd3, 0.6288730502128601);\n    test32(0x3ecd6df2, 0.4012294411659241);\n    test32(0x3f1a107a, 0.6018139123916626);\n    test32(0x3f47e6d3, 0.7808658480644226);\n    test32(0x3da82010, 0.08209240436553955);\n    test32(0x3d1c0c20, 0.038097500801086426);\n    test32(0x3f0adc42, 0.5424233675003052);\n    test32(0x3f5fae9f, 0.8737582564353943);\n    test32(0x3f4eba38, 0.8075289726257324);\n    test32(0x3f23d86a, 0.6400209665298462);\n    test32(0x3ea11a1a, 0.3146522641181946);\n    test32(0x3e7a8824, 0.24465996026992798);\n    test32(0x3ef758b2, 0.483098566532135);\n    test32(0x3e8d1874, 0.275577187538147);\n    test32(0x3dbc6968, 0.09199792146682739);\n    test32(0x3e940d00, 0.28916168212890625);\n    test32(0x3edd7ba2, 0.43258386850357056);\n    test32(0x3edf10da, 0.4356754422187805);\n    test32(0x3e9a3f84, 0.3012658357620239);\n    test32(0x3f21db08, 0.6322484016418457);\n    test32(0x3f10f0c8, 0.5661740303039551);\n    test32(0x3f7b5bc9, 0.9818692803382874);\n    test32(0x3f786c68, 0.9704041481018066);\n    test32(0x3f3b3106, 0.7312167882919312);\n    test32(0x3eef40e6, 0.46729201078414917);\n    test32(0x3f2120ea, 0.6294084787368774);\n    test32(0x3ece201c, 0.40258872509002686);\n    test32(0x3f26e082, 0.6518632173538208);\n    test32(0x3e1edd60, 0.15514135360717773);\n    test32(0x3d2c6760, 0.042090773582458496);\n    test32(0x3f1c99e3, 0.6117231249809265);\n    test32(0x3f62a5de, 0.8853434324264526);\n    test32(0x3f3ca39f, 0.7368716597557068);\n    test32(0x3f2890bd, 0.6584585309028625);\n    test32(0x3d7568a0, 0.059914231300354004);\n    test32(0x3e96620e, 0.2937168478965759);\n    test32(0x3d358bb0, 0.044322669506073);\n    test32(0x3e9e2728, 0.30889248847961426);\n    test32(0x3e887622, 0.2665262818336487);\n    test32(0x3ec71942, 0.38886457681655884);\n    test32(0x3f3ecf0c, 0.7453467845916748);\n    test32(0x3f1d8b64, 0.615408182144165);\n    test32(0x3f22e45e, 0.6362971067428589);\n    test32(0x3f1bc5c0, 0.6084861755371094);\n    test32(0x3ef2ce7c, 0.4742316007614136);\n    test32(0x3ee6d16a, 0.45081645250320435);\n    test32(0x3e22dbf4, 0.15904217958450317);\n    test32(0x3ec8462e, 0.39116042852401733);\n    test32(0x3eed4110, 0.46338701248168945);\n    test32(0x3e7d46f0, 0.24734091758728027);\n    test32(0x3ee4ed1a, 0.44712144136428833);\n    test32(0x3e171310, 0.14753365516662598);\n    test32(0x3f07ee13, 0.5309764742851257);\n    test32(0x3ea82356, 0.3283945918083191);\n    test32(0x3eaad676, 0.33366745710372925);\n    test32(0x3f0b7415, 0.5447400212287903);\n    test32(0x3e5da494, 0.2164481282234192);\n    test32(0x3eb24b98, 0.3482329845428467);\n    test32(0x3dbcf808, 0.09226995706558228);\n    test32(0x3ebff9ec, 0.37495362758636475);\n    test32(0x3ea1c5c6, 0.315962016582489);\n    test32(0x3e922946, 0.2854711413383484);\n    test32(0x3eb24736, 0.3481995463371277);\n    test32(0x3d870700, 0.06593132019042969);\n    test32(0x3db58dc0, 0.08864927291870117);\n    test32(0x3f2fbba4, 0.6864569187164307);\n    test32(0x3e67b5b4, 0.22627907991409302);\n    test32(0x3e1b35d8, 0.151572585105896);\n    test32(0x3eb18776, 0.3467366099357605);\n    test32(0x3e4a1108, 0.19733059406280518);\n    test32(0x3f77debb, 0.968242347240448);\n    test32(0x3f2f3f2c, 0.6845576763153076);\n    test32(0x3ee68150, 0.45020532608032227);\n    test32(0x3da1ca40, 0.07899904251098633);\n    test32(0x3f1a6205, 0.6030581593513489);\n    test32(0x3e596a8c, 0.2123205065727234);\n    test32(0x3f2b9b3d, 0.6703374981880188);\n    test32(0x3f5a41df, 0.8525676131248474);\n    test32(0x3f2ba95b, 0.6705529093742371);\n    test32(0x3c636740, 0.013879597187042236);\n    test32(0x3ea13618, 0.3148658275604248);\n    test32(0x3ef32f54, 0.4749704599380493);\n    test32(0x3db49fd8, 0.08819550275802612);\n    test32(0x3ed2654e, 0.4109291434288025);\n    test32(0x3f18e527, 0.5972465872764587);\n    test32(0x3e86438e, 0.2622341513633728);\n    test32(0x3d94d468, 0.07267075777053833);\n    test32(0x3dec0730, 0.11524808406829834);\n    test32(0x3e746c68, 0.23869478702545166);\n    test32(0x3f7176bc, 0.9432179927825928);\n    test32(0x3eb06baa, 0.34457141160964966);\n    test32(0x3ec7873e, 0.3897036910057068);\n\n    test32(0x3337354c, 4.2656481014091696E-8);\n    test32(0xcef68e86, -2.068267776E9);\n    test32(0x1aee11a3, 9.846298654970688E-23);\n    test32(0x25855b49, 2.313367945844274E-16);\n    test32(0x51bbb6d8, 1.0077831168E11);\n    test32(0xd10cbbd1, -3.7777903616E10);\n    test32(0x6b71ebcc, 2.9246464178639103E26);\n    test32(0xa209e607, -1.868873766564279E-18);\n    test32(0xa0fdd3be, -4.299998635695525E-19);\n    test32(0x66b6f9c2, 4.320389591649362E23);\n    test32(0x9a107a3f, -2.987725166002456E-23);\n    test32(0xc7e6d303, -118182.0234375);\n    test32(0x1504020d, 2.6658805490381716E-26);\n    test32(0x9c0c256, 4.640507130264806E-33);\n    test32(0x8adc428e, -2.1210264479196232E-32);\n    test32(0xdfae9f63, -2.516576947109521E19);\n    test32(0xceba38f7, -1.562147712E9);\n    test32(0xa3d86a36, -2.346374900739753E-17);\n    test32(0x508d0d6d, 1.8931738624E10);\n    test32(0x3ea209d0, 0.3164811134338379);\n    test32(0x7bac59a0, 1.7897857412574353E36);\n    test32(0x468c3af4, 17949.4765625);\n    test32(0x178d2da8, 9.123436692979724E-25);\n    test32(0x4a068058, 2203670.0);\n    test32(0x6ebdd138, 2.937279840252836E28);\n    test32(0x6f886d95, 8.444487576529374E28);\n    test32(0x4d1fc258, 1.67519616E8);\n    test32(0xa1db0894, -1.48422878466768E-18);\n    test32(0x90f0c84b, -9.497190880745409E-29);\n    test32(0xfb5bc94f, -1.1411960353742999E36);\n    test32(0xf86c6851, -1.9179653854596293E34);\n    test32(0xbb31060d, -0.00270116631872952);\n    test32(0x77a07357, 6.508647400938524E33);\n    test32(0xa120ea93, -5.452056501780286E-19);\n    test32(0x67100ede, 6.802950247361373E23);\n    test32(0xa6e082db, -1.5578590790627281E-15);\n    test32(0x27b7589e, 5.088878232380797E-15);\n    test32(0xac6764c, 1.9111204788084013E-32);\n    test32(0x9c99e3b0, -1.0183546536936767E-21);\n    test32(0xe2a5de8f, -1.5298749044800828E21);\n    test32(0xbca39f3d, -0.0199733916670084);\n    test32(0xa890bd69, -1.6069355115761082E-14);\n    test32(0xf568a12, 1.0577605982258498E-29);\n    test32(0x4b310752, 1.1601746E7);\n    test32(0xb58bb7e, 4.1741140243391215E-32);\n    test32(0x4f139499, 2.475989248E9);\n    test32(0x443b1161, 748.2715454101562);\n    test32(0x638ca14d, 5.188334233065301E21);\n    test32(0xbecf0c69, -0.4043915569782257);\n    test32(0x9d8b6455, -3.689673453519375E-21);\n    test32(0xa2e45ebb, -6.189982361684887E-18);\n    test32(0x9bc5c04c, -3.2715185077444394E-22);\n    test32(0x79673ea0, 7.504317251393587E34);\n    test32(0x7368b523, 1.8436992802490676E31);\n    test32(0x28b6fdf6, 2.031619704824343E-14);\n    test32(0x6423179d, 1.2034083200995491E22);\n    test32(0x76a0886c, 1.627996995533634E33);\n    test32(0x3f51bc17, 0.8192762732505798);\n    test32(0x72768dd4, 4.883505414291899E30);\n    test32(0x25c4c43e, 3.4133559007908424E-16);\n    test32(0x87ee1312, -3.582146842575625E-34);\n    test32(0x5411ab9d, 2.502597804032E12);\n    test32(0x556b3b74, 1.616503635968E13);\n    test32(0x8b741536, -4.700864797886097E-32);\n    test32(0x3769256b, 1.3896594282414299E-5);\n    test32(0x5925cc76, 2.916761145966592E15);\n    test32(0x179f010a, 1.0275396467808127E-24);\n    test32(0x5ffcf643, 3.6455660418215444E19);\n    test32(0x50e2e3b3, 3.0452586496E10);\n    test32(0x4914a300, 608816.0);\n    test32(0x59239bd2, 2.878234215579648E15);\n    test32(0x10e0e0b4, 8.869863136638123E-29);\n    test32(0x16b1b8a0, 2.8712407025600733E-25);\n    test32(0xafbba4b9, -3.413214433312106E-10);\n    test32(0x39ed6d41, 4.528556310106069E-4);\n    test32(0x26cd7698, 1.4256877403358119E-15);\n    test32(0x58c3bbb6, 1.721687838031872E15);\n    test32(0x32844205, 1.53968446880981E-8);\n    test32(0xf7debb7d, -9.035098568054132E33);\n    test32(0xaf3f2c18, -1.738701405074039E-10);\n    test32(0x7340a8d9, 1.5264063021291595E31);\n    test32(0x1439482f, 9.354348821593712E-27);\n    test32(0x9a62050f, -4.673979090873511E-23);\n    test32(0x365aa321, 3.257948492318974E-6);\n    test32(0xab9b3d23, -1.1030381252483124E-12);\n    test32(0xda41dfad, -1.3642651156873216E16);\n    test32(0xaba95bd7, -1.2033662911623E-12);\n    test32(0x38d9d45, 8.323342486879323E-37);\n    test32(0x509b0cf8, 2.08105472E10);\n    test32(0x7997aaa7, 9.843725829681495E34);\n    test32(0x1693fb40, 2.3907691910171116E-25);\n    test32(0x6932a7e3, 1.3498851156559247E25);\n    test32(0x98e52756, -5.923483173240392E-24);\n    test32(0x4321c7ba, 161.78018188476562);\n    test32(0x129a8db3, 9.753697906689189E-28);\n    test32(0x1d80e684, 3.411966546003519E-21);\n    test32(0x3d1b1a71, 0.03786701336503029);\n    test32(0xf176bcf8, -1.221788185872419E30);\n    test32(0x5835d550, 7.99711099355136E14);\n    test32(0x63c39f88, 7.217221064844452E21);\n  });\n\n  test('testDouble', () {\n    // Special values.\n    test64([0x00000000, 0x00000000], 0.0);\n    test64([0x80000000, 0x00000000], -0.0);\n    test64([0x7ff80000, 0x00000000], double.nan);\n    test64([0x7ff00000, 0x00000000], double.infinity);\n    test64([0xfff00000, 0x00000000], double.negativeInfinity);\n    test64([0x3ff00000, 0x00000000], 1.0);\n    test64([0x40000000, 0x00000000], 2.0);\n\n    // Values around 1.0 and 2.0.\n    test64([0x3fefffff, 0xfffffff7], 0.999999999999999);\n    test64([0x3ff00000, 0x00000005], 1.000000000000001);\n    test64([0x3fffffff, 0xfffffffb], 1.999999999999999);\n    test64([0x40000000, 0x00000002], 2.000000000000001);\n\n    test64([0x3fb99999, 0x9999999a], 0.1);\n    test64([0xbfb99999, 0x9999999a], -0.1);\n    test64([0x017527e6, 0xd48c1653], 0.1234e-300);\n    test64([0x817527e6, 0xd48c1653], -0.1234e-300);\n    test64([0x7e0795f2, 0xd9000b3f], 0.1234e300);\n    test64([0xfe0795f2, 0xd9000b3f], -0.1234e300);\n    test64([0x3fc99999, 0x9999999a], 0.2);\n    test64([0x4272c359, 0x8dd61e72], 1289389399393.902892);\n    test64([0x405edd3c, 0x07ee0b0b], 123.456789);\n    test64([0xc05edd3c, 0x07ee0b0b], -123.456789);\n\n    // Max value.\n    test64([0x7fefffff, 0xffffffff], 1.7976931348623157E308);\n    test64([0xffefffff, 0xffffffff], -1.7976931348623157E308);\n    // Min normalized value.\n    test64([0x00100000, 0x00000000], 2.2250738585072014E-308);\n    test64([0x80100000, 0x00000000], -2.2250738585072014E-308);\n    // Denormalized values.\n    test64([0x000ff6a8, 0xebe79958], 2.22E-308);\n    test64([0x00019999, 0x9999999a], 2.2250738585072014E-309);\n    test64([0x800016b9, 0xf3c0e51d], -1.234567E-310);\n    test64([0x000016b9, 0xf3c0e51d], 1.234567E-310);\n    test64([0x00000245, 0xcb934a1c], 1.234567E-311);\n    test64([0x0000003a, 0x2df52103], 1.234567E-312);\n    test64([0x00000005, 0xd165501a], 1.234567E-313);\n    test64([0x00000000, 0x94f08803], 1.234567E-314);\n    test64([0x00000000, 0x0ee4da67], 1.234567E-315);\n    test64([0x00000000, 0x017d490a], 1.234567E-316);\n    test64([0x00000000, 0x002620e7], 1.234567E-317);\n    test64([0x00000000, 0x0003d017], 1.234567E-318);\n    test64([0x00000000, 0x0000619c], 1.234567E-319);\n    test64([0x00000000, 0x000009c3], 1.234567E-320);\n    test64([0x00000000, 0x000000fa], 1.234567E-321);\n    test64([0x00000000, 0x00000019], 1.234567E-322);\n    test64([0x00000000, 0x00000002], 1.234567E-323);\n    test64([0x00000000, 0x00000001], 4.9E-324);\n    test64([0x80000000, 0x00000001], -4.9E-324);\n\n    // Random values between 0 and 1.\n    test64([0x3fe9b9bc, 0xd3c39dab], 0.8039230476396616);\n    test64([0x3fe669d4, 0xa374efc4], 0.700418776752024);\n    test64([0x3fd92b7c, 0xa312ca7e], 0.39327922749649946);\n    test64([0x3fbc74aa, 0x296b7e18], 0.11115516196468211);\n    test64([0x3feea888, 0xcdfcb13d], 0.95807304603435);\n    test64([0x3fd88b23, 0xcfa7eada], 0.3834924247636714);\n    test64([0x3fd62865, 0x167eb9bc], 0.3462155074766107);\n    test64([0x3fe5772b, 0x57e62b3f], 0.6707970349101301);\n    test64([0x3fbd0998, 0x8fb96be0], 0.11342767247099017);\n    test64([0x3fb64329, 0x6d7fa050], 0.08696230815223882);\n    test64([0x3fde7f76, 0x986c1bd4], 0.4765297401904125);\n    test64([0x3fef4b44, 0x33f8efac], 0.9779377951704098);\n    test64([0x3fd374e5, 0x30a19278], 0.3040097212708939);\n    test64([0x3fc17adf, 0x98fc3368], 0.1365622994420861);\n    test64([0x3fd6beb0, 0xe5a5055a], 0.355388855230634);\n    test64([0x3fc3d812, 0x8b76ba20], 0.1550315075850941);\n    test64([0x3fc47c50, 0x27f58900], 0.16004373503808011);\n    test64([0x3fe0ba6a, 0x91eeb5a7], 0.522755894684157);\n    test64([0x3fe68f01, 0x9034c7b9], 0.704956800129586);\n    test64([0x3fe3990d, 0xbaf329c4], 0.6124333049167991);\n    test64([0x3faded64, 0x23ccf8f0], 0.058451775903891945);\n    test64([0x3fe51aeb, 0xf7ee4537], 0.6595363466641747);\n    test64([0x3fe937bb, 0x75080f7d], 0.7880532537242143);\n    test64([0x3fc693d4, 0x47054de4], 0.17638638942535956);\n    test64([0x3fd95091, 0xde22548e], 0.39554259007247417);\n    test64([0x3fe93b21, 0xf50b1a41], 0.788468340492564);\n    test64([0x3fd77d9f, 0x7da868b8], 0.36704242011331756);\n    test64([0x3fcb8aba, 0xe3f1c05c], 0.2151712048539619);\n    test64([0x3feec9ed, 0x25ddcf3], 0.9621491476272283);\n    test64([0x3fda1ac9, 0xbf0e59c0], 0.4078850141317183);\n    test64([0x3fe66e66, 0x602de93e], 0.7009765509131183);\n    test64([0x3fe6da29, 0x63aecb21], 0.714131064122146);\n    test64([0x3fb306bb, 0x648e4ae0], 0.07432147221542662);\n    test64([0x3fd06b98, 0x77b9b50e], 0.25656711284575884);\n    test64([0x3fce8705, 0x99f3a28c], 0.2384955407826691);\n    test64([0x3fe14a5c, 0x59d8ce59], 0.5403272394964446);\n    test64([0x3fb118ac, 0x2dc6a700], 0.06678272359445359);\n    test64([0x3fafb0e2, 0x3ecbc770], 0.06189639107277756);\n    test64([0x3fe4475a, 0x31a9723a], 0.633710000034234);\n    test64([0x3fdd5e0f, 0x4a0296f6], 0.4588659498934783);\n    test64([0x3fefbc13, 0xbb0b2b44], 0.991708627051914);\n    test64([0x3fde5c60, 0x1db8b162], 0.4743881502388573);\n    test64([0x3fdda642, 0x89b8cde6], 0.4632726998272275);\n    test64([0x3fea1866, 0xf99c86b], 0.8154783539487317);\n    test64([0x3fec3946, 0xd8a8808], 0.8819914116359096);\n    test64([0x3fd6a294, 0x37ecfad4], 0.3536730333470761);\n    test64([0x3fe1c31f, 0xcb975395], 0.5550688721074147);\n    test64([0x3fc78444, 0x8f1277b0], 0.18372399316734578);\n    test64([0x3fe78d52, 0xa1f7d63c], 0.7360013163985921);\n    test64([0x3feb0d9b, 0xee281702], 0.8454112674232592);\n    test64([0x3fc382ec, 0x2f0ee738], 0.15243294046177325);\n    test64([0x3fe61657, 0x7bf4b8d5], 0.6902272625937039);\n    test64([0x3fdd6ffc, 0xb6caedac], 0.4599601540646414);\n    test64([0x3fdfa267, 0xb07ca0e4], 0.49428741679231636);\n    test64([0x3fcdc368, 0x8fcb9f34], 0.23252589246043842);\n    test64([0x3fc6bd12, 0x4233708], 0.1776449699595377);\n    test64([0x3fd75236, 0xcfc8fafe], 0.364392950930707);\n    test64([0x3fef3468, 0xbd4ce47], 0.9751472693519155);\n    test64([0x3fc634b5, 0xd386b93c], 0.17348358944350106);\n    test64([0x3feaf69a, 0xbdedcf4b], 0.8426030835675901);\n    test64([0x3fdcf973, 0x748a67e0], 0.45272528057978256);\n    test64([0x3fec8f61, 0x55ecd410], 0.8925024679398366);\n    test64([0x3fe3e8d8, 0x466d453a], 0.6221734405063792);\n    test64([0x3fdfa7ff, 0x50fced6a], 0.4946287432573714);\n    test64([0x3fe536d9, 0xd49d33be], 0.6629456665628977);\n    test64([0x3fdfdff0, 0xe8e048ae], 0.4980432771855118);\n    test64([0x3feb4abc, 0x3a80aeac], 0.8528729574804479);\n    test64([0x3fbf44d0, 0x11fd7950], 0.12214374961101737);\n    test64([0x3fdb59c2, 0x1a7ecd6a], 0.4273534067862871);\n    test64([0x3fbb4128, 0xfb635888], 0.10646301400569957);\n    test64([0x3fc03e9c, 0x906fa23c], 0.12691075375120586);\n    test64([0x3f976c37, 0x38766d00], 0.022873747655109078);\n    test64([0x3fd9a620, 0x96187b4e], 0.4007646051194812);\n    test64([0x3fdcea7d, 0xef3c0528], 0.45181225168933503);\n    test64([0x3fe20ea2, 0x3d703cb2], 0.5642863464326153);\n    test64([0x3fd6f2c3, 0xedcf5bf4], 0.35856722091324333);\n    test64([0x3fef2c3c, 0x9e7a6dc0], 0.9741499991682119);\n    test64([0x3fcc2142, 0xc7ab8c28], 0.21976504086987458);\n    test64([0x3fea41a3, 0xe626ff58], 0.8205127234614151);\n    test64([0x3fe4162d, 0x28c9abe8], 0.6277070805202785);\n    test64([0x3fce8826, 0xa9ca117c], 0.23852999964232058);\n    test64([0x3fe07fbd, 0x24b88c67], 0.5155931203083924);\n    test64([0x3fdb39c6, 0x6484189a], 0.4254013043977324);\n    test64([0x3fcb830d, 0x50fac7b0], 0.21493689016420836);\n    test64([0x3fd927cc, 0xb62342c8], 0.3930541781128736);\n    test64([0x3fb553b2, 0x448dd6d8], 0.08330835508044332);\n    test64([0x3fef870d, 0x8a9f527b], 0.9852359492748087);\n    test64([0x3febe929, 0xc4bac429], 0.8722122995733389);\n    test64([0x3fc9cc2d, 0x6286a01c], 0.20154349623521817);\n    test64([0x3fe5b506, 0x615ab5c6], 0.6783477689220312);\n    test64([0x3fe26c9e, 0xa02bdfe], 0.5757589526673994);\n    test64([0x3fe6daf5, 0x4806b05c], 0.7142282873878787);\n    test64([0x3fefc9bb, 0xb28f362e], 0.9933756339539224);\n    test64([0x3fbd4557, 0x82e84968], 0.1143393225286552);\n    test64([0x3fe1f097, 0x44a3d0b7], 0.5606190052626719);\n    test64([0x3fb1c833, 0xb64b5470], 0.06946109009307277);\n    test64([0x3fec1407, 0x50dfb23b], 0.8774448947493235);\n    test64([0x3fc3b307, 0x46f5e6bc], 0.15390101399298384);\n    test64([0x3fe844de, 0xac963963], 0.7584069605671114);\n    test64([0x3fd45d6e, 0x91a9989e], 0.31820263123371173);\n\n    // Random values throughout the double range.\n    test64([0xcdcde6aa, 0x7873b572], -6.297893811982062E66);\n    test64([0xb34ea52b, 0x6e9df882], -1.4898867990306772E-61);\n    test64([0x64adf2aa, 0x312ca7e1], 9.480996430600118E176);\n    test64([0x1c74aa06, 0xa5adf865], 1.3367811675349397E-171);\n    test64([0xf5444671, 0xbf9627b5], -7.610810186261922E256);\n    test64([0x622c8f3e, 0xfa7eadb0], 8.223166382138422E164);\n    test64([0x58a19471, 0x67eb9bcc], 8.86632413276402E118);\n    test64([0xabb95a84, 0xfcc567f2], -4.6366137067352683E-98);\n    test64([0x1d099884, 0x3ee5af9a], 8.477749983935152E-169);\n    test64([0x1643296d, 0xb5fe8140], 1.9557345103545524E-201);\n    test64([0x79fdda74, 0x86c1bd5f], 4.2335912871234087E279);\n    test64([0xfa5a219d, 0x7f1df591], -2.3716857301453343E281);\n    test64([0x4dd394c4, 0xa192798], 8.248528934271815E66);\n    test64([0x22f5bf1f, 0xc7e19b49], 2.853336355041256E-140);\n    test64([0x5afac3aa, 0x5a5055b7], 1.8552153438817665E130);\n    test64([0x27b02519, 0x5bb5d113], 1.6005805986130906E-117);\n    test64([0x28f8a05a, 0x3fac4815], 2.5600128085455218E-111);\n    test64([0x85d354a0, 0x3dd6b4f3], -1.3311552586579328E-280);\n    test64([0xb4780c89, 0x698f727], -6.129954074000813E-56);\n    test64([0x9cc86de8, 0x5e65389a], -5.057128159830759E-170);\n    test64([0xef6b230, 0x4799f1f0], 1.3941634112607635E-236);\n    test64([0xa8d75f9f, 0xfdc8a6fc], -6.0744368561933565E-112);\n    test64([0xc9bddb8f, 0xa101efb6], -1.7045710739729275E47);\n    test64([0x2d27a89b, 0x382a6f20], 3.6294490400055576E-91);\n    test64([0x65424775, 0xe22548f8], 5.925748939163494E179);\n    test64([0xc9d90fb1, 0xa1634836], -5.722990169624538E47);\n    test64([0x5df67dbf, 0xda868b9e], 4.3882436353810935E144);\n    test64([0x371575e9, 0x1f8e02ee], 2.4058151686870744E-43);\n    test64([0xf64f681f, 0x4bbb9e72], -7.726253195850651E261);\n    test64([0x686b26cf, 0xf0e59c06], 9.910208820012368E194);\n    test64([0xb373331d, 0x5bd27ce], -7.467486715472904E-61);\n    test64([0xb6d14b2b, 0x75d96425], -1.211676991363774E-44);\n    test64([0x1306bb60, 0x92392b97], 5.1516895067444726E-217);\n    test64([0x41ae61d4, 0x7b9b50e7], 2.548639338033516E8);\n    test64([0x3d0e0b31, 0xcf9d1469], 1.3342095786138988E-14);\n    test64([0x8a52e2e0, 0x3b19cb38], -6.141707139267237E-259);\n    test64([0x1118ac38, 0xb71a9c13], 2.603758248081968E-226);\n    test64([0xfd87101, 0x7d978ee5], 2.459857504627046E-232);\n    test64([0xa23ad18a, 0x352e4745], -8.590863325618324E-144);\n    test64([0x75783d29, 0xa0296f70], 7.278962913424277E257);\n    test64([0xfde09de5, 0x61656888], -2.1734648688870485E298);\n    test64([0x79718077, 0xdb8b1623], 9.695260031659742E276);\n    test64([0x76990a37, 0x9b8cde6d], 1.971192366484015E263);\n    test64([0xd0c3304f, 0xf3390d67], -1.1376138095726657E81);\n    test64([0xe1ca3067, 0xb1510109], -1.1782242328468048E163);\n    test64([0x5a8a50c4, 0x7ecfad55], 1.425081729881992E128);\n    test64([0x8e18fe50, 0x72ea72a0], -9.37063623070425E-241);\n    test64([0x2f08893a, 0x7893bd8d], 4.0416231167192477E-82);\n    test64([0xbc6a9509, 0x3efac79f], -1.1528179597119854E-17);\n    test64([0xd86cdf4e, 0xc502e047], -9.101010985774022E117);\n    test64([0x2705d86b, 0x787739cf], 1.0574785023773003E-120);\n    test64([0xb0b2bbf8, 0x7e971aa7], -4.141881119170908E-74);\n    test64([0x75bff2d4, 0x6caedac7], 1.5350675559647406E259);\n    test64([0x7e899eea, 0x7ca0e54], 3.4316079097255617E301);\n    test64([0x3b86d127, 0x7e5cf9a3], 6.039611960807865E-22);\n    test64([0x2d7a243c, 0x2119b84a], 1.2833127546095387E-89);\n    test64([0x5d48db16, 0xfc8faff2], 2.3679693140335752E141);\n    test64([0xf9a34049, 0x7a99c8ef], -8.531434157588162E277);\n    test64([0x2c696ba4, 0x9c35c9f4], 9.520836999385529E-95);\n    test64([0xd7b4d5da, 0xbdb9e964], -3.206856786877124E114);\n    test64([0x73e5cde7, 0x48a67e04], 1.9514110919532497E250);\n    test64([0xe47b0a84, 0xbd9a821e], -1.0700933026823467E176);\n    test64([0x9f46c209, 0xcda8a753], -5.179951037444452E-158);\n    test64([0x7e9ffd4f, 0xfced6b4], 8.569252835514251E301);\n    test64([0xa9b6ce98, 0x93a677d6], -9.711135665099199E-108);\n    test64([0x7f7fc397, 0x8e048af9], 1.3940913327465408E306);\n    test64([0xda55e1fe, 0x5015d581], -1.4812924721906427E127);\n    test64([0x1f44d038, 0x47f5e54d], 4.737338914555982E-158);\n    test64([0x6d670848, 0xa7ecd6b5], 1.016307848543568E219);\n    test64([0x1b4128e3, 0xed8d6230], 2.117302740808736E-177);\n    test64([0x207d392f, 0x837d11f6], 3.4873269549337505E-152);\n    test64([0x5db0dd6, 0x38766d17], 1.8630149420804414E-280);\n    test64([0x66988256, 0x6187b4e0], 1.6662694932683939E186);\n    test64([0x73a9f7ac, 0xf3c05283], 1.452500477811838E249);\n    test64([0x907511ce, 0xae07965b], -2.1713947206680943E-229);\n    test64([0x5bcb0f90, 0xdcf5bf4e], 1.5366281556927236E134);\n    test64([0xf961e4e2, 0xcf4db80d], -4.956276753857123E276);\n    test64([0x3842859a, 0x3d5c6147], 1.0886185451514296E-37);\n    test64([0xd20d1f11, 0xc4dfeb10], -1.8103414291013452E87);\n    test64([0xa0b16972, 0x19357d01], -3.32451488002257E-151);\n    test64([0x3d104d58, 0x4e508be4], 1.44791988988344E-14);\n    test64([0x83fde937, 0x97118ce8], -1.9182940419362316E-289);\n    test64([0x6ce719b2, 0x484189a7], 3.9816763934214935E216);\n    test64([0x37061aa6, 0x87d63d94], 1.238977854703573E-43);\n    test64([0x649f32e0, 0x62342c83], 4.938493427207422E176);\n    test64([0x1553b277, 0x12375b61], 6.135160266378285E-206);\n    test64([0xfc386c6b, 0x53ea4f67], -2.3801480044660797E290);\n    test64([0xdf494e02, 0x9758853e], -1.0354031977895994E151);\n    test64([0x33985ae9, 0x143500f8], 3.7890569411337005E-60);\n    test64([0xada8332b, 0x2b56b8c5], -9.503956824431546E-89);\n    test64([0x9364f07f, 0x4057bfca], -3.0370938126636166E-215);\n    test64([0xb6d7aa7b, 0xd60b8c], -1.6581522255623348E-44);\n    test64([0xfe4ddda6, 0x51e6c5ca], -2.500115798151869E300);\n    test64([0x1d45578c, 0xba125ba], 1.1310118263643858E-167);\n    test64([0x8f84ba31, 0x947a16ff], -6.518932884318998E-234);\n    test64([0x11c833a9, 0xd92d51dc], 5.230715225679756E-223);\n    test64([0xe0a03a90, 0x1bf64771], -2.7851790876803525E157);\n    test64([0x27660eb6, 0x37af35f9], 6.833565753907854E-119);\n    test64([0xc226f54e, 0x92c72c68], -4.930242390758673E10);\n    test64([0x5175ba4e, 0x1a9989e3], 2.6381145200142355E84);\n  });\n\n  test('testVarint64', () {\n    final roundtrip = roundtripTester(\n      fromBytes: (CodedBufferReader reader) => reader.readUint64(),\n      toBytes: convertToBytes(PbFieldType.OU6),\n    );\n\n    roundtrip(make64(0), [0x00]);\n    roundtrip(make64(3), [0x03]);\n    roundtrip(make64(0x80), [0x80, 0x01]);\n    roundtrip(make64(0x96), [0x96, 0x01]);\n    roundtrip(make64(0xce), [0xce, 0x01]);\n    roundtrip(make64(0xff), [0xff, 0x01]);\n    roundtrip(make64(0x0e01), [0x81, 0x1c]);\n    roundtrip(make64(0x9600), [0x80, 0xac, 0x02]);\n    roundtrip(make64(0x9e5301), [0x81, 0xa6, 0xf9, 0x04]);\n    roundtrip(make64(0x7fffffff), [0xff, 0xff, 0xff, 0xff, 0x07]);\n    roundtrip(make64(0xffffffff), [0xff, 0xff, 0xff, 0xff, 0x0f]);\n    roundtrip(make64(0xffffffff, 0xffffff), [\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0x7f,\n    ]);\n    roundtrip(make64(0xffffffff, 0xffffffff), [\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0xff,\n      0x01,\n    ]);\n    roundtrip(make64(0xffff2f34, 0xffffffff), [\n      180,\n      222,\n      252,\n      255,\n      255,\n      255,\n      255,\n      255,\n      255,\n      1,\n    ]);\n    roundtrip(make64(0x00000001, 0x40000000), [\n      0x81,\n      0x80,\n      0x80,\n      0x80,\n      0x80,\n      0x80,\n      0x80,\n      0x80,\n      0x40,\n    ]);\n  });\n\n  test('testWriteTo', () {\n    final writer = CodedBufferWriter()..writeField(0, PbFieldType.O3, 1337);\n    expect(writer.lengthInBytes, 3);\n    final buffer = Uint8List(5);\n    buffer[0] = 0x55;\n    buffer[4] = 0xAA;\n    final expected = writer.toBuffer();\n    expect(writer.writeTo(buffer, 1), isTrue);\n    expect(buffer[0], 0x55);\n    expect(buffer[4], 0xAA);\n    expect(buffer.sublist(1, 4), expected);\n    expect(writer.writeTo(buffer, 3), isFalse);\n  });\n}\n"
  },
  {
    "path": "protobuf/test/coded_buffer_reader_test.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:typed_data';\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport 'test_util.dart';\n\nvoid main() {\n  final throwsInvalidProtocolBufferException = throwsA(\n    TypeMatcher<InvalidProtocolBufferException>(),\n  );\n\n  group('testCodedBufferReader', () {\n    final inputBuffer = List<int>.unmodifiable([\n      0xb8, 0x06, 0x20, // 103 int32 = 32\n      0xc0, 0x06, 0x40, // 104 int64 = 64\n      0xc8, 0x06, 0x20, // 105 uint32 = 32\n      0xd0, 0x06, 0x40, // 106 uint64 = 64\n      0xd8, 0x06, 0x40, // 107 sint32 = 32\n      0xe0, 0x06, 0x80, 0x01, // 108 sint64 = 64\n      0xed, 0x06, 0x20, 0x00, 0x00, 0x00, // 109 fixed32 = 32\n      0xf1, 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,\n      0x00, 0x00, // 110 fixed64 = 64\n      0xfd, 0x06, 0x20, 0x00, 0x00, 0x00, // 111 sfixed32 = 64\n      0x81, 0x07, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n      0x00, // 112 sfixed64 = 64\n      0x88, 0x07, 0x01, // 113 bool = true\n      0x92, 0x07, 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f,\n      0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72,\n      0x69, 0x6e, 0x67, // 114 string 15 optional_string\n      0x9a, 0x07, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f,\n      0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74,\n      0x65, 0x73, // 115 bytes 14 optional_bytes\n    ]);\n\n    void testWithList(List<int> inputBuffer) {\n      final cis = CodedBufferReader(inputBuffer);\n\n      expect(cis.readTag(), makeTag(103, WIRETYPE_VARINT));\n      expect(cis.readInt32(), 32);\n\n      expect(cis.readTag(), makeTag(104, WIRETYPE_VARINT));\n      expect(cis.readInt64(), expect64(64));\n\n      expect(cis.readTag(), makeTag(105, WIRETYPE_VARINT));\n      expect(cis.readUint32(), 32);\n\n      expect(cis.readTag(), makeTag(106, WIRETYPE_VARINT));\n      expect(cis.readUint64(), expect64(64));\n\n      expect(cis.readTag(), makeTag(107, WIRETYPE_VARINT));\n      expect(cis.readSint32(), 32);\n\n      expect(cis.readTag(), makeTag(108, WIRETYPE_VARINT));\n      expect(cis.readSint64(), expect64(64));\n\n      expect(cis.readTag(), makeTag(109, WIRETYPE_FIXED32));\n      expect(cis.readFixed32(), 32);\n\n      expect(cis.readTag(), makeTag(110, WIRETYPE_FIXED64));\n      expect(cis.readFixed64(), expect64(64));\n\n      expect(cis.readTag(), makeTag(111, WIRETYPE_FIXED32));\n      expect(cis.readSfixed32(), 32);\n\n      expect(cis.readTag(), makeTag(112, WIRETYPE_FIXED64));\n      expect(cis.readSfixed64(), expect64(64));\n\n      expect(cis.readTag(), makeTag(113, WIRETYPE_VARINT));\n      expect(cis.readBool(), isTrue);\n\n      expect(cis.readTag(), makeTag(114, WIRETYPE_LENGTH_DELIMITED));\n      expect(cis.readString(), 'optional_string');\n\n      expect(cis.readTag(), makeTag(115, WIRETYPE_LENGTH_DELIMITED));\n      expect(cis.readBytesAsView(), 'optional_bytes'.codeUnits);\n    }\n\n    test('normal-list', () {\n      testWithList(Uint8List.fromList(inputBuffer));\n    });\n\n    test('unmodifiable-uint8-list-view', () {\n      testWithList(Uint8List.fromList(inputBuffer).asUnmodifiableView());\n    });\n\n    test('uint8-list-view', () {\n      final uint8List = Uint8List(inputBuffer.length + 4);\n      uint8List[0] = 0xc0;\n      uint8List[1] = 0xc8;\n      uint8List.setRange(2, 2 + inputBuffer.length, inputBuffer);\n      uint8List[inputBuffer.length + 2] = 0xe0;\n      uint8List[inputBuffer.length + 3] = 0xed;\n      final view = Uint8List.view(uint8List.buffer, 2, inputBuffer.length);\n      testWithList(view);\n    });\n  });\n\n  test('testReadMaliciouslyLargeBlob', () {\n    final output = CodedBufferWriter();\n\n    final tag = makeTag(1, WIRETYPE_LENGTH_DELIMITED);\n    output.writeInt32NoTag(tag);\n    output.writeInt32NoTag(0x7FFFFFFF);\n    // Pad with a few random bytes.\n    output.writeInt32NoTag(0);\n    output.writeInt32NoTag(32);\n    output.writeInt32NoTag(47);\n\n    final input = CodedBufferReader(output.toBuffer());\n    expect(input.readTag(), tag);\n\n    expect(input.readBytesAsView, throwsInvalidProtocolBufferException);\n  });\n\n  /// Tests that if we read a string that contains invalid UTF-8, no exception\n  /// is thrown. Instead, the invalid bytes are replaced with the Unicode\n  /// 'replacement character' U+FFFD.\n  test('testReadInvalidUtf8', () {\n    final input = CodedBufferReader([1, 0x80]);\n    final text = input.readString();\n    expect(text.codeUnitAt(0), 0xfffd);\n  });\n\n  test('testInvalidTag', () {\n    // Any tag number which corresponds to field number zero is invalid and\n    // should throw InvalidProtocolBufferException.\n    for (var i = 0; i < 8; i++) {\n      expect(() {\n        CodedBufferReader([i]).readTag();\n      }, throwsInvalidProtocolBufferException);\n    }\n  });\n}\n"
  },
  {
    "path": "protobuf/test/dummy_field_test.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nclass Message extends GeneratedMessage {\n  @override\n  BuilderInfo get info_ => _i;\n  static final _i = BuilderInfo('Message')\n    ..add(0, 'dummy', null, null, null, null, null);\n  @override\n  Message createEmptyInstance() => Message();\n\n  @override\n  GeneratedMessage clone() => throw UnimplementedError();\n}\n\nvoid main() {\n  test('Has no known fields', () {\n    expect(Message().info_.fieldInfo, isEmpty);\n  });\n}\n"
  },
  {
    "path": "protobuf/test/json_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// Basic smoke tests for the GeneratedMessage JSON API.\n//\n// There are more JSON tests in the dart-protoc-plugin package.\n\nimport 'dart:convert';\n\nimport 'package:fixnum/fixnum.dart' show Int64;\nimport 'package:test/test.dart';\n\nimport 'mock_util.dart' show MockEnum, T;\n\nvoid main() {\n  test('mergeFromProto3Json unknown enum fields with names', () {\n    final example = T();\n\n    // No enum value specified.\n    expect(example.hasEnm, isFalse);\n\n    // Defaults to first when it doesn't exist.\n    expect(example.enm, equals(MockEnum.values.first));\n    expect((example..mergeFromProto3Json({'enm': 'a'})).enm.name, equals('a'));\n\n    // Now it's explicitly set after merging.\n    expect(example.hasEnm, isTrue);\n\n    expect((example..mergeFromProto3Json({'enm': 'b'})).enm.name, equals('b'));\n\n    // \"c\" is not a legal enum value.\n    expect(\n      () => example..mergeFromProto3Json({'enm': 'c'}),\n      throwsA(\n        allOf(\n          isFormatException,\n          predicate(\n            (FormatException e) => e.message.contains('Unknown enum value'),\n          ),\n        ),\n      ),\n    );\n\n    // `example` hasn't changed.\n    expect(example.hasEnm, isTrue);\n    expect(example.enm.name, equals('b'));\n\n    // \"c\" is not a legal enum value, but we are ignoring unknown fields, so\n    // `enm` value shouldn't change.\n    expect(\n      (example..mergeFromProto3Json({'enm': 'c'}, ignoreUnknownFields: true))\n          .enm\n          .name,\n      equals('b'),\n    );\n    expect(example.hasEnm, isTrue);\n  });\n\n  test('mergeFromProto3Json unknown enum fields with indices', () {\n    // Similar to above, but with indices.\n    final example = T();\n\n    expect((example..mergeFromProto3Json({'enm': 2})).enm.name, 'b');\n    expect(\n      () => example..mergeFromProto3Json({'enm': 3}),\n      throwsA(\n        allOf(\n          isFormatException,\n          predicate(\n            (FormatException e) => e.message.contains('Unknown enum value'),\n          ),\n        ),\n      ),\n    );\n\n    // `example` hasn't changed.\n    expect(example.hasEnm, isTrue);\n    expect(example.enm.name, equals('b'));\n\n    // \"c\" is not a legal enum value, but we are ignoring unknown fields, so the\n    // value shouldn't change.\n    expect(\n      (example..mergeFromProto3Json({'enm': 3}, ignoreUnknownFields: true))\n          .enm\n          .name,\n      equals('b'),\n    );\n    expect(example.hasEnm, isTrue);\n  });\n\n  test('testWriteToJson', () {\n    final json = makeTestJson().writeToJson();\n    checkJsonMap(jsonDecode(json));\n  });\n\n  test('testWriteFrozenToJson', () {\n    final frozen = makeTestJson()..freeze();\n    final json = frozen.writeToJson();\n    checkJsonMap(jsonDecode(json));\n  });\n\n  test('writeToJsonMap', () {\n    final Map m = makeTestJson().writeToJsonMap();\n    checkJsonMap(m);\n  });\n\n  test('testWriteToJsonMap', () {\n    final t = T();\n    t.mergeFromJson('''{\"1\": 123, \"2\": \"hello\"}''');\n    checkMessage(t);\n  });\n\n  test('testMergeFromJsonMap', () {\n    final t = T();\n    t.mergeFromJsonMap({'1': 123, '2': 'hello'});\n    checkMessage(t);\n  });\n\n  test('testInt64JsonEncoding', () {\n    final value = Int64.parseInt('1234567890123456789');\n    final t = T()..int64 = value;\n    final encoded = t.writeToJsonMap();\n    expect(encoded['5'], '$value');\n    final decoded = T()..mergeFromJsonMap(encoded);\n    expect(decoded.int64, value);\n  });\n\n  test('testFrozentInt64JsonEncoding', () {\n    final value = Int64.parseInt('1234567890123456789');\n    final frozen =\n        T()\n          ..int64 = value\n          ..freeze();\n    final encoded = frozen.writeToJsonMap();\n    expect(encoded['5'], '$value');\n    final decoded = T()..mergeFromJsonMap(encoded);\n    expect(decoded.int64, value);\n  });\n\n  test('testJsonMapWithUnknown', () {\n    final m = makeTestJson().writeToJsonMap();\n    m['9999'] = 'world';\n    final t = T()..mergeFromJsonMap(m);\n    checkJsonMap(t.writeToJsonMap(), unknownFields: {'9999': 'world'});\n  });\n\n  test('testJspbLite2WithUnknown', () {\n    final m = makeTestJson().writeToJson();\n    final decoded = jsonDecode(m);\n    decoded['9999'] = 'world';\n    final encoded = jsonEncode(decoded);\n    final t = T()..mergeFromJson(encoded);\n    checkJsonMap(t.writeToJsonMap(), unknownFields: {'9999': 'world'});\n  });\n\n  test('mergeFromJspbLite2 unknown data should be converted to Dart', () {\n    // Testing here is a bit indirect (via `toDebugString`) because\n    // `unknownJsonData` is not exposed to the users.\n    final decoded = {\n      '9999': {\n        '1': ['a', 'b', 'c'],\n      },\n    };\n    final encoded = jsonEncode(decoded);\n    final t = T()..mergeFromJson(encoded);\n    // Without converting JS data to Dart we get `[object Object]` here for the\n    // field value.\n    expect(t.toDebugString(), '{9999: {1: [a, b, c]}}');\n  });\n\n  test('writeToJspbLite unknown data should be converted to JS', () {\n    final m = makeTestJson().writeToJson();\n    final decoded = jsonDecode(m);\n    decoded['9999'] = {\n      '1': ['a', 'b', 'c'],\n    };\n    final encoded = jsonEncode(decoded);\n    final t = T()..mergeFromJson(encoded);\n    // Without converting unknown data (converted to Dart when decoding) to JS,\n    // the unknown field values in the output get weird as JS representation of\n    // Dart data are serialized directly by the browser's `JSON.stringify`.\n    expect(\n      t.writeToJson(),\n      '{\"1\":123,\"2\":\"hello\",\"4\":[1,2,3],\"9999\":{\"1\":[\"a\",\"b\",\"c\"]}}',\n    );\n  });\n}\n\nT makeTestJson() =>\n    T()\n      ..val = 123\n      ..str = 'hello'\n      ..int32s.addAll(<int>[1, 2, 3]);\n\nvoid checkJsonMap(Map m, {Map<String, dynamic>? unknownFields}) {\n  expect(m.length, 3 + (unknownFields?.length ?? 0));\n  expect(m['1'], 123);\n  expect(m['2'], 'hello');\n  expect(m['4'], [1, 2, 3]);\n  unknownFields?.forEach((k, v) => expect(m[k], v));\n}\n\nvoid checkMessage(T t) {\n  expect(t.val, 123);\n  expect(t.str, 'hello');\n}\n"
  },
  {
    "path": "protobuf/test/json_vm_test.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// VM-specific smoke tests for the GeneratedMessage JSON API.\n//\n// These tests will be skipped on js, as the dart2js platform\n// does not support 64-bit ints.\n@TestOn('!js')\nlibrary;\n\nimport 'package:fixnum/fixnum.dart' show Int64;\nimport 'package:test/test.dart';\n\nimport 'mock_util.dart' show T;\n\nvoid main() {\n  test('testInt64JsonEncoding', () {\n    final value = Int64(1234567890123456789);\n    final t = T()..int64 = value;\n    final encoded = t.writeToJsonMap();\n    expect(encoded['5'], '$value');\n    final decoded = T()..mergeFromJsonMap(encoded);\n    expect(decoded.int64, value);\n  });\n}\n"
  },
  {
    "path": "protobuf/test/list_equality_test.dart",
    "content": "// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// Test for ensuring that protobuf lists compare using value semantics.\n\nimport 'package:test/test.dart';\n\nimport 'mock_util.dart' show T;\n\nvoid main() {\n  test('empty lists compare as equal', () {\n    final first = T();\n    final second = T();\n    expect(first.int32s == second.int32s, isTrue);\n  });\n\n  test('empty frozen lists compare as equal', () {\n    final first = T()..freeze();\n    final second = T()..freeze();\n    expect(first.int32s == second.int32s, isTrue);\n  });\n\n  test('non-empty lists compare as equal', () {\n    final first = T()..int32s.add(1);\n    final second = T()..int32s.add(1);\n    expect(first.int32s == second.int32s, isTrue);\n  });\n\n  test('non-empty frozen lists compare as equal', () {\n    final first =\n        T()\n          ..int32s.add(1)\n          ..freeze();\n    final second =\n        T()\n          ..int32s.add(1)\n          ..freeze();\n    expect(first.int32s == second.int32s, isTrue);\n  });\n\n  test('different lists do not compare as equal', () {\n    final first = T()..int32s.add(1);\n    final second = T()..int32s.add(2);\n    expect(first.int32s == second.int32s, isFalse);\n  });\n\n  test('different frozen lists do not compare as equal', () {\n    final first =\n        T()\n          ..int32s.add(1)\n          ..freeze();\n    final second =\n        T()\n          ..int32s.add(2)\n          ..freeze();\n    expect(first.int32s == second.int32s, isFalse);\n  });\n}\n"
  },
  {
    "path": "protobuf/test/list_test.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'mock_util.dart';\n\nvoid main() {\n  test('testPbList handles basic operations', () {\n    final lb1 = T().int32s;\n    expect(lb1, []);\n\n    lb1.add(1);\n    expect(lb1, [1]);\n\n    lb1.addAll([0, 2, 4, 6, 99]);\n    expect(lb1, [1, 0, 2, 4, 6, 99]);\n\n    expect(lb1[3], 4);\n    expect(lb1.contains(4), isTrue);\n\n    lb1[3] = 99;\n    expect(lb1, [1, 0, 2, 99, 6, 99]);\n\n    expect(lb1.indexOf(99), 3);\n\n    expect(lb1.lastIndexOf(99), 5);\n\n    expect(lb1.firstWhere((e) => e.isEven), 0);\n\n    expect(lb1.last, 99);\n    final last = lb1.removeLast();\n    expect(last, 99);\n    expect(lb1.last, 6);\n\n    var count = 0;\n    for (final i in lb1) {\n      count += i;\n    }\n    expect(count, 108);\n\n    bool isEven(int i) => i.isEven;\n    final evens = List<int>.from(lb1.where(isEven));\n    expect(evens, [0, 2, 6]);\n\n    expect(lb1.any(isEven), isTrue);\n\n    bool isNonNegative(int i) => i >= 0;\n    expect(lb1.every(isNonNegative), isTrue);\n\n    lb1.clear();\n    expect(lb1, []);\n  });\n\n  test('PbList handles range operations', () {\n    final lb2 = T().int32s;\n\n    lb2.addAll([1, 2, 3, 4, 5, 6, 7, 8, 9]);\n    expect(lb2.sublist(3, 7), [4, 5, 6, 7]);\n\n    lb2.setRange(3, 7, [9, 8, 7, 6]);\n    expect(lb2, [1, 2, 3, 9, 8, 7, 6, 8, 9]);\n\n    lb2.removeRange(5, 8);\n    expect(lb2, [1, 2, 3, 9, 8, 9]);\n\n    expect(() => lb2.setRange(5, 7, [88, 99].take(2)), throwsRangeError);\n    expect(lb2, [1, 2, 3, 9, 8, 9]);\n\n    expect(() => lb2.setRange(5, 7, [88, 99].take(2), 1), throwsRangeError);\n    expect(lb2, [1, 2, 3, 9, 8, 9]);\n\n    expect(() => lb2.setRange(4, 6, [88, 99].take(1), 1), throwsStateError);\n    expect(lb2, [1, 2, 3, 9, 8, 9]);\n\n    lb2.setRange(5, 6, [88, 99].take(2));\n    expect(lb2, [1, 2, 3, 9, 8, 88]);\n\n    lb2.setRange(5, 6, [88, 99].take(2), 1);\n    expect(lb2, [1, 2, 3, 9, 8, 99]);\n  });\n}\n"
  },
  {
    "path": "protobuf/test/map_mixin_test.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// Unit tests for PbMapMixin.\n// There are more tests in the dart-protoc-plugin package.\n\nimport 'dart:collection' show MapMixin;\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:protobuf/src/protobuf/mixins/map_mixin.dart';\nimport 'package:test/test.dart'\n    show expect, isA, same, test, throwsArgumentError;\n\nimport 'mock_util.dart' show MockMessage, mockInfo;\n\n// A minimal protobuf implementation compatible with PbMapMixin.\nclass Rec extends MockMessage with MapMixin<Object?, Object>, PbMapMixin {\n  @override\n  BuilderInfo get info_ => _info;\n  static final _info = mockInfo('Rec', Rec.new);\n  @override\n  Rec createEmptyInstance() => Rec();\n\n  @override\n  String toString() => 'Rec($val, \"$str\")';\n}\n\nvoid main() {\n  test('PbMapMixin methods return default field values', () {\n    final r = Rec();\n\n    expect(r.isEmpty, false);\n    expect(r.isNotEmpty, true);\n    expect(r.keys, [\n      'val',\n      'str',\n      'child',\n      'int32s',\n      'int64',\n      'enm',\n      'stringMap',\n      'bytes',\n    ]);\n\n    expect(r['val'], 42);\n    expect(r['str'], '');\n    expect(r['child'], isA<Rec>());\n    expect(r['child'].toString(), 'Rec(42, \"\")');\n    expect(r['int32s'], []);\n    expect(r['stringMap'], {});\n    expect(r['bytes'], []);\n\n    final v = r.values;\n    expect(v.length, 8);\n    expect(v.first, 42);\n    expect(v.toList()[1], '');\n    expect(v.toList()[3].toString(), '[]');\n    expect(v.toList()[4], 0);\n    expect((v.toList()[5] as ProtobufEnum).name, 'a');\n    expect(v.toList()[6], {});\n    expect(v.toList()[7], []);\n  });\n\n  test('operator []= sets record fields', () {\n    final r = Rec();\n\n    r['val'] = 123;\n    expect(r.val, 123);\n    expect(r['val'], 123);\n\n    r['str'] = 'hello';\n    expect(r.str, 'hello');\n    expect(r['str'], 'hello');\n\n    final child = Rec();\n    r['child'] = child;\n    expect(r.child, same(child));\n    expect(r['child'], same(child));\n\n    expect(() => r['int32s'] = 123, throwsArgumentError);\n    (r['int32s'] as List).add(123);\n    expect(r['int32s'], [123]);\n    expect(r['int32s'], same(r['int32s']));\n  });\n\n  test('operator== and hashCode work for Map mixin', () {\n    final a = Rec();\n    expect(a == a, true);\n    expect(a == {}, false);\n    expect({} == a, false);\n\n    final b = Rec();\n    expect(a.info_ == b.info_, true, reason: 'BuilderInfo should be the same');\n    expect(a == b, true);\n    expect(a.hashCode, b.hashCode);\n\n    a.val = 123;\n    expect(a == b, false);\n    b.val = 123;\n    expect(a == b, true);\n    expect(a.hashCode, b.hashCode);\n\n    a.child = Rec();\n    expect(a == b, false);\n    b.child = Rec();\n    expect(a == b, true);\n    expect(a.hashCode, b.hashCode);\n  });\n\n  test(\"protobuf doesn't compare equal to a map with the same values\", () {\n    final a = Rec();\n    expect(a == Map.from(a), false);\n    expect(Map.from(a) == a, false);\n  });\n\n  test(\"reading protobuf values shouldn't change equality\", () {\n    final a = Rec();\n    final b = Rec();\n    expect(a == b, true);\n    Map.from(a);\n    expect(a == b, true);\n  });\n}\n"
  },
  {
    "path": "protobuf/test/message_test.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// Tests for GeneratedMessage methods.\n\nimport 'package:fixnum/fixnum.dart' show Int64;\nimport 'package:protobuf/protobuf.dart';\nimport 'package:protobuf/src/protobuf/internal.dart';\nimport 'package:test/test.dart' show Matcher, expect, isA, test, throwsA;\n\nimport 'mock_util.dart' show MockMessage, mockEmptyInfo, mockInfo;\n\nclass Rec extends MockMessage {\n  @override\n  BuilderInfo get info_ => _info;\n  static final _info = mockInfo('Rec', Rec.new);\n\n  @override\n  Rec createEmptyInstance() => Rec();\n}\n\nclass EmptyRec extends MockMessage {\n  @override\n  BuilderInfo get info_ => _info;\n  static final _info = mockEmptyInfo('EmptyRec', EmptyRec.new);\n\n  @override\n  EmptyRec createEmptyInstance() => EmptyRec();\n}\n\nclass Ext extends MockMessage {\n  @override\n  BuilderInfo get info_ => _info;\n  static final _info = mockInfo('Ext', Ext.new);\n\n  @override\n  Ext createEmptyInstance() => Ext();\n\n  static final Extension<int> count = Extension(\n    'Rec',\n    'count',\n    101,\n    PbFieldType.O3,\n  );\n\n  static final Extension<String> items = Extension.repeated(\n    'Rec',\n    'items',\n    102,\n    PbFieldType.PS,\n    check: (value) => value is String,\n  );\n\n  static final Extension<List<int>> data = Extension(\n    'Rec',\n    'data',\n    103,\n    PbFieldType.OY,\n  );\n}\n\nMatcher throwsError(String expectedMessage) => throwsA(\n  isA<ArgumentError>().having((p0) => p0.message, 'message', expectedMessage),\n);\n\nvoid main() {\n  final recProto =\n      Rec()\n        ..val = 123\n        ..str = 'a\\n\\r\\t\"\\\\b'\n        ..bytes = [0, 1, 2, 127, 128, 255]\n        ..child = (Rec()..val = 456)\n        ..int32s.addAll([1, 2, 3])\n        ..int64 = Int64.MAX_VALUE\n        ..stringMap['key \"1\"'] = '''value\\n1'''\n        ..stringMap['key 2'] = 'value 2';\n\n  test('getField with invalid tag throws exception', () {\n    final r = Rec();\n    expect(() {\n      r.getField(123);\n    }, throwsError('tag 123 not defined in Rec'));\n  });\n\n  test('getDefaultForField with invalid tag throws exception', () {\n    final r = Rec();\n    expect(() {\n      r.getDefaultForField(123);\n    }, throwsError('tag 123 not defined in Rec'));\n  });\n\n  test('operator== and hashCode works for frozen message', () {\n    final a =\n        Rec()\n          ..val = 123\n          ..int32s.addAll([1, 2, 3])\n          ..freeze();\n    final b =\n        Rec()\n          ..val = 123\n          ..int32s.addAll([1, 2, 3]);\n\n    expect(a.hashCode, b.hashCode);\n    expect(a == b, true);\n    expect(b == a, true);\n  });\n\n  test('isFrozen works', () {\n    final a =\n        Rec()\n          ..val = 123\n          ..int32s.addAll([1, 2, 3])\n          ..child = (Rec()..val = 100);\n    expect(a.isFrozen, false);\n    a.child.freeze();\n    expect(a.child.isFrozen, true);\n    expect(a.isFrozen, false);\n    a.freeze();\n    expect(a.isFrozen, true);\n  });\n\n  test('operator== and hashCode work for a simple record', () {\n    final a = Rec();\n    expect(a == a, true);\n\n    final b = Rec();\n    expect(a.info_ == b.info_, true, reason: 'BuilderInfo should be the same');\n    expect(a == b, true);\n    expect(a.hashCode, b.hashCode);\n\n    a.val = 123;\n    expect(a == b, false);\n    b.val = 123;\n    expect(a == b, true);\n    expect(a.hashCode, b.hashCode);\n\n    a.child = Rec();\n    expect(a == b, false);\n    b.child = Rec();\n    expect(a == b, true);\n    expect(a.hashCode, b.hashCode);\n  });\n\n  test('toTextFormatString works', () {\n    expect(recProto.toTextFormat(), _expectedTextProto);\n  });\n\n  test('toTextFormatString handles unknown JSON data', () {\n    final a = Rec();\n    a.mergeFromJson(\n      '''{\"1\": 123, \"2\": \"hello\", \"9\": 456, \"10\": \"UnknownFieldValue\", '''\n      '''\"11\": {\"1\": 999, \"2\": {\"1\": 1000, \"2\": \"ab\\\\\\\\c\\\\\"\"}}, \"13\": \"'''\n      // [bytes] in JSON are base64 encoded and we are not able to decode them\n      // since we don't know if it's a string or bytes.\n      '''AAECh/8=\"}''',\n    );\n    expect(a.toTextFormat(), _textFormatProtoWithUnknownJsonFields);\n  });\n\n  test('toTextFormatString handles unknown fields', () {\n    final buffer = recProto.writeToBuffer();\n    final emptyRec = EmptyRec()..mergeFromBuffer(buffer);\n    expect(emptyRec.toTextFormat(), _textFormatProtoWithUnknownFields);\n  });\n\n  test('toTextFormatString handles extensions fields', () {\n    final a =\n        Rec()\n          ..val = 42\n          ..setExtension(Ext.count, 123)\n          ..addExtension(Ext.items, 'a')\n          ..addExtension(Ext.items, 'b\"c')\n          ..setExtension(Ext.data, [0, 1, 2, 127, 128, 255]);\n\n    expect(a.toTextFormat(), _expectedTextProtoWithExtensions);\n  });\n}\n\nconst _expectedTextProto = '''\nval: 123\nstr: \"a\\\\n\\r\\t\\\\\"\\\\\\\\b\"\nchild {\n  val: 456\n}\nint32s: 1\nint32s: 2\nint32s: 3\nint64: 9223372036854775807\nstring_map {\n  key: \"key \\\\\"1\\\\\"\"\n  value: \"value\\\\n1\"\n}\nstring_map {\n  key: \"key 2\"\n  value: \"value 2\"\n}\nbytes: \"\\\\000\\\\001\\\\002\\\\177\\\\200\\\\377\"\n''';\n\nconst _expectedTextProtoWithExtensions = '''\nval: 42\n[count]: 123\n[items]: \"a\"\n[items]: \"b\\\\\"c\"\n[data]: \"\\\\000\\\\001\\\\002\\\\177\\\\200\\\\377\"\n''';\n\nconst _textFormatProtoWithUnknownFields = '''\n1: 123\n2: \"a\\\\n\\\\r\\\\t\\\\\"\\\\\\\\b\"\n3: {\n  1: 456\n}\n4: 1\n4: 2\n4: 3\n5: 9223372036854775807\n8: {\n  1: \"key \\\\\"1\\\\\"\"\n  2: \"value\\\\n1\"\n}\n8: {\n  1: \"key 2\"\n  2: \"value 2\"\n}\n12: \"\\\\000\\\\001\\\\002\\\\177\\\\200\\\\377\"\n''';\n\nconst _textFormatProtoWithUnknownJsonFields = '''\nval: 123\nstr: \"hello\"\n9: 456\n10: \"UnknownFieldValue\"\n11 {\n  1: 999\n  2 {\n    1: 1000\n    2: \"ab\\\\\\\\c\\\\\"\"\n  }\n}\n13: \"AAECh/8=\"\n''';\n"
  },
  {
    "path": "protobuf/test/mock_util.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:collection/collection.dart';\nimport 'package:fixnum/fixnum.dart' show Int64;\nimport 'package:protobuf/protobuf.dart'\n    show\n        BuilderInfo,\n        CreateBuilderFunc,\n        GeneratedMessage,\n        PbFieldType,\n        ProtobufEnum;\n\nclass MockEnum extends ProtobufEnum {\n  static const values = [MockEnum(1, 'a'), MockEnum(2, 'b')];\n\n  static MockEnum? valueOf(int value) =>\n      values.firstWhereOrNull((e) => e.value == value);\n\n  const MockEnum(super.value, super.name);\n}\n\nBuilderInfo mockEmptyInfo(String className, CreateBuilderFunc create) {\n  return BuilderInfo(className, createEmptyInstance: create);\n}\n\nBuilderInfo mockInfo(String className, CreateBuilderFunc create) {\n  return BuilderInfo(className, createEmptyInstance: create)\n    ..a(1, 'val', PbFieldType.O3, defaultOrMaker: 42)\n    ..a(2, 'str', PbFieldType.OS)\n    ..a(3, 'child', PbFieldType.OM, defaultOrMaker: create, subBuilder: create)\n    ..p<int>(4, 'int32s', PbFieldType.P3)\n    ..a(5, 'int64', PbFieldType.O6)\n    // 6 is reserved for extensions in tests.\n    ..e<MockEnum>(\n      7,\n      'enm',\n      PbFieldType.OE,\n      defaultOrMaker: MockEnum.values.first,\n      valueOf: MockEnum.valueOf,\n      enumValues: MockEnum.values,\n    )\n    ..m<String, String>(\n      8,\n      'stringMap',\n      keyFieldType: PbFieldType.OS,\n      valueFieldType: PbFieldType.OS,\n    )\n    // 9, 10, 11 are reserved for unknown fields in tests.\n    ..a(12, 'bytes', PbFieldType.OY);\n  // 13 is reserved for unknown bytes fields in tests.\n}\n\n/// A minimal protobuf implementation for testing.\nabstract class MockMessage extends GeneratedMessage {\n  // subclasses must provide these\n  @override\n  BuilderInfo get info_;\n\n  int get val => $_get(0, 42);\n  set val(Object x) => setField(1, x);\n\n  String get str => $_getS(1, '');\n  set str(String x) => $_setString(1, x);\n\n  MockMessage get child => $_getN(2);\n  set child(Object x) => setField(3, x);\n\n  List<int> get int32s => $_getList(3);\n\n  Int64 get int64 => $_get(4, Int64(0));\n  set int64(Object x) => setField(5, x);\n\n  MockEnum get enm => $_getN(5);\n  bool get hasEnm => $_has(5);\n\n  Map<String, String> get stringMap => $_getMap(6);\n\n  set bytes(List<int> x) => $_setBytes(7, x);\n\n  @override\n  GeneratedMessage clone() {\n    final create = info_.byName['child']!.subBuilder!;\n    return create()..mergeFromMessage(this);\n  }\n}\n\nclass T extends MockMessage {\n  @override\n  BuilderInfo get info_ => _info;\n  static final _info = mockInfo('T', T.new);\n  @override\n  T createEmptyInstance() => T();\n}\n"
  },
  {
    "path": "protobuf/test/permissive_compare_test.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/src/protobuf/permissive_compare.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  void symmetric(String a, String b, bool expected) {\n    expect(permissiveCompare(a, b), expected);\n    expect(permissiveCompare(b, a), expected);\n  }\n\n  List<String> variationsFromSeed(String seed) {\n    final result = [\n      seed,\n      seed.toUpperCase(),\n      '-$seed',\n      '-${seed.toUpperCase()}',\n      '_$seed',\n      '_${seed.toUpperCase()}',\n      '$seed-',\n      '${seed}_',\n    ];\n    if (2 <= seed.length) {\n      result.add('${seed.substring(0, 1)}_${seed.substring(1)}');\n      result.add('${seed.substring(0, 1)}-${seed.substring(1)}');\n      result.add('${seed.substring(0, 1).toUpperCase()}${seed.substring(1)}');\n      result.add('${seed.substring(0, 1)}${seed.substring(1).toUpperCase()}');\n    }\n    return result;\n  }\n\n  test('permissive compare', () {\n    final seeds = ['', 'a', 'b', 'aa', 'ab', 'bb', 'aaaa'];\n    for (final a in seeds) {\n      for (final aVariant in variationsFromSeed(a)) {\n        for (final b in seeds) {\n          for (final bVariant in variationsFromSeed(b)) {\n            symmetric(aVariant, bVariant, a == b);\n          }\n        }\n      }\n    }\n  });\n}\n"
  },
  {
    "path": "protobuf/test/readonly_message_test.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart'\n    show BuilderInfo, GeneratedMessage, PbFieldType, UnknownFieldSetField;\nimport 'package:test/test.dart';\n\nMatcher throwsUnsupportedError(Matcher expectedMessage) => throwsA(\n  isA<UnsupportedError>().having(\n    (p0) => p0.message,\n    'message',\n    expectedMessage,\n  ),\n);\n\nclass Rec extends GeneratedMessage {\n  static Rec getDefault() => Rec()..freeze();\n  static Rec create() => Rec();\n  @override\n  Rec createEmptyInstance() => Rec();\n\n  @override\n  BuilderInfo info_ =\n      BuilderInfo('rec')\n        ..a(1, 'value', PbFieldType.O3)\n        ..pc<Rec>(2, 'sub', PbFieldType.PM, subBuilder: Rec.create)\n        ..p<int>(10, 'ints', PbFieldType.P3);\n\n  int get value => $_get(0, 0);\n  set value(int v) {\n    $_setUnsignedInt32(0, v);\n  }\n\n  bool hasValue() => $_has(0);\n\n  List<Rec> get sub => $_getList<Rec>(1);\n\n  List<int> get ints => $_getList<int>(2);\n\n  @override\n  Rec clone() => Rec()..mergeFromMessage(this);\n\n  @override\n  Rec copyWith(void Function(Rec) updates) {\n    final builder = toBuilder();\n    updates(builder as Rec);\n    return builder.freeze() as Rec;\n  }\n}\n\nvoid main() {\n  test('can write a read-only message', () {\n    expect(Rec.getDefault().writeToBuffer(), []);\n    expect(Rec.getDefault().writeToJson(), '{}');\n  });\n\n  test(\"can't merge to a read-only message\", () {\n    expect(\n      () => Rec.getDefault().mergeFromJson('{\"1\":1}'),\n      throwsUnsupportedError(\n        equals('Attempted to change a read-only message (rec)'),\n      ),\n    );\n  });\n\n  test(\"can't set a field on a read-only message\", () {\n    expect(\n      () => Rec.getDefault().setField(1, 456),\n      throwsUnsupportedError(\n        equals('Attempted to change a read-only message (rec)'),\n      ),\n    );\n  });\n\n  test(\"can't clear a read-only message\", () {\n    expect(\n      () => Rec.getDefault().clear(),\n      throwsUnsupportedError(\n        equals('Attempted to change a read-only message (rec)'),\n      ),\n    );\n  });\n\n  test(\"can't clear a field on a read-only message\", () {\n    expect(\n      () => Rec.getDefault().clearField(1),\n      throwsUnsupportedError(\n        equals('Attempted to change a read-only message (rec)'),\n      ),\n    );\n  });\n\n  test(\"can't modify repeated fields on a read-only message\", () {\n    expect(\n      () => Rec.getDefault().sub.add(Rec.create()),\n      throwsUnsupportedError(contains('add')),\n    );\n    var r =\n        Rec.create()\n          ..ints.add(10)\n          ..freeze();\n    expect(\n      () => r.ints.clear(),\n      throwsUnsupportedError(equals(\"'clear' on a read-only list\")),\n    );\n    expect(\n      () => r.ints[0] = 2,\n      throwsUnsupportedError(equals(\"'set element' on a read-only list\")),\n    );\n    expect(\n      () => r.sub.add(Rec.create()),\n      throwsUnsupportedError(equals(\"'add' on a read-only list\")),\n    );\n\n    r =\n        Rec.create()\n          ..sub.add(Rec.create())\n          ..freeze();\n    expect(\n      () => r.sub.add(Rec.create()),\n      throwsUnsupportedError(equals(\"'add' on a read-only list\")),\n    );\n    expect(\n      () => r.ints.length = 20,\n      throwsUnsupportedError(contains('length')),\n    );\n  });\n\n  test(\"can't modify sub-messages on a read-only message\", () {\n    final subMessage = Rec.create()..value = 1;\n    final r =\n        Rec.create()\n          ..sub.add(Rec.create()..sub.add(subMessage))\n          ..freeze();\n    expect(r.sub[0].sub[0].value, 1);\n    expect(\n      () => subMessage.value = 2,\n      throwsUnsupportedError(\n        equals('Attempted to change a read-only message (rec)'),\n      ),\n    );\n  });\n\n  test(\"can't modify unknown fields on a read-only message\", () {\n    expect(\n      () => Rec.getDefault().unknownFields.clear(),\n      throwsUnsupportedError(\n        equals(\n          'Attempted to call clear on a read-only message (UnknownFieldSet)',\n        ),\n      ),\n    );\n  });\n\n  test('can rebuild a frozen message with merge', () {\n    final orig =\n        Rec.create()\n          ..value = 10\n          ..freeze();\n    final rebuilt = orig.copyWith((m) => m.mergeFromJson('{\"1\": 7}'));\n    expect(identical(orig, rebuilt), false);\n    expect(orig.value, 10);\n    expect(rebuilt.value, 7);\n  });\n\n  test('can set a field while rebuilding a frozen message', () {\n    final orig =\n        Rec.create()\n          ..value = 10\n          ..freeze();\n    final rebuilt = orig.copyWith((m) => m.value = 7);\n    expect(identical(orig, rebuilt), false);\n    expect(orig.value, 10);\n    expect(rebuilt.value, 7);\n  });\n\n  test('can clear while rebuilding a frozen message', () {\n    final orig =\n        Rec.create()\n          ..value = 10\n          ..freeze();\n    final rebuilt = orig.copyWith((m) => m.clear());\n    expect(identical(orig, rebuilt), false);\n    expect(orig.value, 10);\n    expect(orig.hasValue(), true);\n    expect(rebuilt.hasValue(), false);\n  });\n\n  test('can clear a field while rebuilding a frozen message', () {\n    final orig =\n        Rec.create()\n          ..value = 10\n          ..freeze();\n    final rebuilt = orig.copyWith((m) => m.clearField(1));\n    expect(identical(orig, rebuilt), false);\n    expect(orig.value, 10);\n    expect(orig.hasValue(), true);\n    expect(rebuilt.hasValue(), false);\n  });\n\n  test('can modify repeated fields while rebuilding a frozen message', () {\n    var orig =\n        Rec.create()\n          ..ints.add(10)\n          ..freeze();\n    var rebuilt = orig.copyWith((m) => m.ints.add(12));\n    expect(identical(orig, rebuilt), false);\n    expect(orig.ints, [10]);\n    expect(rebuilt.ints, [10, 12]);\n\n    rebuilt = orig.copyWith((m) => m.ints.clear());\n    expect(orig.ints, [10]);\n    expect(rebuilt.ints, []);\n\n    rebuilt = orig.copyWith((m) => m.ints[0] = 2);\n    expect(orig.ints, [10]);\n    expect(rebuilt.ints, [2]);\n\n    orig =\n        Rec.create()\n          ..sub.add(Rec.create())\n          ..freeze();\n    rebuilt = orig.copyWith((m) => m.sub.add(Rec.create()));\n    expect(orig.sub.length, 1);\n    expect(rebuilt.sub.length, 2);\n  });\n\n  test('cannot modify sub-messages while rebuilding a frozen message', () {\n    final subMessage = Rec.create()..value = 1;\n    final orig =\n        Rec.create()\n          ..sub.add(Rec.create()..sub.add(subMessage))\n          ..freeze();\n\n    final rebuilt = orig.copyWith((m) {\n      expect(\n        () => subMessage.value = 5,\n        throwsUnsupportedError(\n          equals('Attempted to change a read-only message (rec)'),\n        ),\n      );\n      expect(\n        () => m.sub[0].sub[0].value = 2,\n        throwsUnsupportedError(\n          equals('Attempted to change a read-only message (rec)'),\n        ),\n      );\n      m.sub[0] = m.sub[0].copyWith(\n        (m2) => m2.sub[0] = m2.sub[0].copyWith((m3) => m3.value = 2),\n      );\n    });\n    expect(identical(subMessage, orig.sub[0].sub[0]), true);\n    expect(identical(subMessage, rebuilt.sub[0].sub[0]), false);\n    expect(orig.sub[0].sub[0].value, 1);\n    expect(rebuilt.sub[0].sub[0].value, 2);\n  });\n\n  test('can modify unknown fields while rebuilding a frozen message', () {\n    final orig =\n        Rec.create()\n          ..unknownFields.addField(20, UnknownFieldSetField()..fixed32s.add(1));\n    final rebuilt = orig.copyWith((m) => m.unknownFields.clear());\n    expect(orig.unknownFields.hasField(20), true);\n    expect(rebuilt.unknownFields.hasField(20), false);\n  });\n}\n"
  },
  {
    "path": "protobuf/test/test_util.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:test/test.dart';\n\nInt64 make64(int lo, [int? hi]) {\n  hi ??= lo < 0 ? -1 : 0;\n  return Int64.fromInts(hi, lo);\n}\n\nMatcher expect64(int lo, [int? hi]) {\n  final expected = make64(lo, hi);\n  return predicate((Int64 actual) => actual == expected);\n}\n"
  },
  {
    "path": "protoc_plugin/.gitignore",
    "content": "# Generated by pub\n.dart_tool/\npubspec.lock\n\n# Other generated files\ntest/gen/\n\n# Legacy (can be deleted locally)\nout/\n"
  },
  {
    "path": "protoc_plugin/CHANGELOG.md",
    "content": "## 25.0.0\n\nNote: this version requires protobuf 5.2.0.\n\n* Handle importing [well-known protos][wkts]. ([#1081])\n\n[wkts]: https://protobuf.dev/reference/protobuf/google.protobuf\n[#1081]: https://github.com/google/protobuf.dart/pull/1081\n\n## 24.0.0\n\n* **Breaking:** Don't generate `createRepeated` methods.\n\n  These methods are not too useful as there isn't much you can do with a\n  `PbList` that you can't do with a `List`.\n\n  To migrate, replace `MyMessage.createRepeated()` with `<MyMessage>[]`.\n\n## 23.0.0\n\nNote: this version requires protobuf 5.0.0.\n\n* Support protobuf editions. ([#1052])\n* Update generated code for protobuf 5.0.0.\n* Update generated `clone` members to take advantage of faster `deepCopy`\n  implementation in protobuf 5.0.0. ([#742])\n* Code size improvements for enum fields. ([#1047])\n\n[#742]: https://github.com/google/protobuf.dart/pull/742\n[#1047]: https://github.com/google/protobuf.dart/pull/1047\n[#1052]: https://github.com/google/protobuf.dart/pull/1052\n\n## 22.5.0\n\n* Generated files are now formatted using the Dart formatter. The code is\n  formatted using the min. SDK for `package:protoc_plugin`; currently `3.7.0`.\n* Minimum SDK dependency bumped from 3.6.0 to 3.7.0. ([#1024])\n\n[#1024]: https://github.com/google/protobuf.dart/pull/1024\n\n## 22.4.0\n\n* Update how we calculate import prefixes ([#1010]); import prefixes are now\n  unique per-library instead of being unique across all generated libraries.\n* Ignore `unused_import` diagnostics for `*.pbjson.dart` files. ([#1013])\n* Revert the change to not generate empty `*.pbenum.dart` files; these can be\n  exported from other enum files. ([#1016])\n* Improve the readablity of generated gRPC client files. ([#1021])\n* Adjust the text of generated file headers ('This is a generated file...').\n  ([#1022])\n\n[#1010]: https://github.com/google/protobuf.dart/issues/1010\n[#1013]: https://github.com/google/protobuf.dart/pull/1013\n[#1016]: https://github.com/google/protobuf.dart/pull/1016\n[#1021]: https://github.com/google/protobuf.dart/pull/1021\n[#1022]: https://github.com/google/protobuf.dart/pull/1022\n\n## 22.3.0\n\n* Update the generated code to improve readability and to better follow common\n  Dart patterns.\n* No longer generate empty enum (`*.pbenum.dart`) files.\n* No longer generate empty server (`*.pbserver.dart`) files.\n* Ignore `implementation_imports` for some generated files.\n\n## 22.2.0\n\n* Bump `protobuf` constraint to `^4.1.0`\n* Read `default_host` and `oauth_scopes` options from gRPC service definitions\n  and write that information to the generated gRPC clients.\n* Adjust the deprecation messages for the message `clone()` and `copyWith()`\n  methods ([#998]).\n* Generate dartdocs for grpc services ([#973]).\n\n  We now parse and generate code cooresponding to the proto options\n  `google.api.default_host` and `google.api.oauth_scopes`:\n\n  ```proto\n  service Firestore {\n    option (google.api.default_host) = \"firestore.googleapis.com\";\n    option (google.api.oauth_scopes) =\n        \"https://www.googleapis.com/auth/cloud-platform,\"\n        \"https://www.googleapis.com/auth/datastore\";\n\n    ...\n  ```\n\n  Will generate as:\n\n  ```dart\n  class FirestoreClient extends $grpc.Client {\n    /// The hostname for this service.\n    static const $core.String defaultHost = 'firestore.googleapis.com';\n\n    /// OAuth scopes needed for the client.\n    static const $core.List<$core.String> oauthScopes = [\n      'https://www.googleapis.com/auth/cloud-platform',\n      'https://www.googleapis.com/auth/datastore',\n    ];\n\n    ...\n  ```\n* Minimum SDK dependency bumped from 3.3.0 to 3.6.0. ([#1001])\n\n[#973]: https://github.com/google/protobuf.dart/issues/973\n[#1001]: https://github.com/google/protobuf.dart/pull/1001\n\n## 22.1.0\n\n* Fix factory argument types for protobuf `Map` fields. ([#975])\n* Fix import order changes when files are passed in different order to `protoc`.\n([#952])\n* Add fromDart() and toDart() methods to convert between core Duration and proto\n  Duration ([#986])\n* Update the GRPC service generator to emit constructors that use super\n  parameters.\n\n[#975]: https://github.com/google/protobuf.dart/issues/975\n[#952]: https://github.com/google/protobuf.dart/issues/952\n[#986]: https://github.com/google/protobuf.dart/issues/986\n[#998]: https://github.com/google/protobuf.dart/issues/998\n\n## 22.0.1\n\n* Bump `protobuf` constraint to `^4.0.0`\n\n## 22.0.0\n\n* Remove `PbEventMixin` mixin. ([#738])\n* Type of repeated fields is now `PbList` (instead of `List`), type of map\n  fields is now `PbMap` (instead of `Map`). ([#903])\n\n  This change requires protobuf-4.0.0.\n* Generated files now export `GeneratedMessageGenericExtensions` from the\n  protobuf library. ([#503], [#907])\n* Generate doc comments for enum types and values, rpc services and methods.\n  ([#900], [#909])\n* `deprecated` options in messages, grpc services and methods, and enum types\n  and values are now handled to generate Dart `@deprecated` annotations.\n  ([#900], [#908])\n* `protoc_plugin` and generated files now require Dart 3.3.0. (#953)\n* Fix performance issues when handling documentation comments in protobufs.\n  ([#935], [#955])\n* Fix grpc methods with names 'call' and 'request' conflicting with other\n  methods in the generated code and causing compile-time errors. ([#963],\n  [#159])\n\n[#738]: https://github.com/google/protobuf.dart/issues/738\n[#903]: https://github.com/google/protobuf.dart/pull/903\n[#503]: https://github.com/google/protobuf.dart/issues/503\n[#907]: https://github.com/google/protobuf.dart/pull/907\n[#900]: https://github.com/google/protobuf.dart/issues/900\n[#909]: https://github.com/google/protobuf.dart/pull/909\n[#908]: https://github.com/google/protobuf.dart/pull/908\n[#953]: https://github.com/google/protobuf.dart/pull/953\n[#935]: https://github.com/google/protobuf.dart/pull/935\n[#955]: https://github.com/google/protobuf.dart/pull/955\n[#963]: https://github.com/google/protobuf.dart/issues/963\n[#159]: https://github.com/google/protobuf.dart/issues/159\n\n## 21.1.2\n\n* Fix a bug in comment parsing. ([#871], [#879])\n\n[#871]: https://github.com/google/protobuf.dart/issues/871\n[#879]: https://github.com/google/protobuf.dart/pull/879\n\n## 21.1.1\n\n* Rename a local variable used with message constructors to avoid potential\n  conflicts with protobuf field names.\n\n## 21.1.0\n\n* Generate code comments for annotated protobuf inputs. ([#161])\n* Generate message constructor arguments by default again. New flag\n  `disable_constructor_args` disables generating the arguments.\n\n  Constructor arguments were removed in 21.0.0 as they increase dart2js binary\n  sizes even when the arguments are not used.\n\n  Example usage to disable constructor arguments:\n\n  ```\n  protoc --dart_out='disable_constructor_args,<other options>:.' ...\n  ```\n\n  ([#850], [#855])\n\n[#161]: https://github.com/google/protobuf.dart/issues/161\n[#850]: https://github.com/google/protobuf.dart/issues/850\n[#855]: https://github.com/google/protobuf.dart/pull/855\n\n## 21.0.2\n\n* Fix missing protobuf import in generated grpc files. ([#844])\n\n[#844]: https://github.com/google/protobuf.dart/issues/844\n\n## 21.0.1\n\n(Bad release, retracted)\n\n## 21.0.0\n\n* Identifiers `fromBuffer`, `fromJson`, `$_defaultFor`, `initByValue` are no\n  longer reserved. Proto fields with those Dart names will no longer have a\n  suffix added. ([#679])\n* Remove message constructor arguments. Constructors with arguments cause\n  increase in release binary sizes even when no arguments are passed to the\n  constructors. ([#703])\n\n  **Migration:**\n\n  Set the fields after construction, using cascade syntax. For example, if you\n  have:\n  ```dart\n  MyMessage(a: 123, b: [1, 2, 3])\n  ```\n  You can do:\n  ```dart\n  MyMessage()\n    ..a = 123\n    ..b.addAll([1, 2, 3])\n  ```\n* Require Dart `2.19`.\n* Export public dependencies (`import public`s in proto files) in\n  `.pbenum.dart` files, same as `.pb.dart` files. ([9aad6aa])\n* Fix decoding map fields when key or value (or both) fields of a map entry is\n  missing. ([#719], [#745])\n* Generated files now split `ignore_for_file` comments across multiple lines\n  when necessary. ([#770])\n* Generated files now uses shared consts to eliminate repeated\n  `bool.fromEnvironment()` expressions. ([#772])\n* Removed accidental `///` at the top of generated Dart files to avoid new\n  `dangling_library_doc_comments` lint. ([#774])\n* Generated files now have sorted imports and have fewer import-related\n  `ignore_for_file:` analysis directives. ([#778])\n* Remove duplicated consts in generated files. ([#773])\n\n[#679]: https://github.com/google/protobuf.dart/pull/679\n[#703]: https://github.com/google/protobuf.dart/pull/703\n[9aad6aa]: https://github.com/google/protobuf.dart/commits/9aad6aa\n[#719]: https://github.com/google/protobuf.dart/issues/719\n[#745]: https://github.com/google/protobuf.dart/pull/745\n[#770]: https://github.com/google/protobuf.dart/pull/770\n[#772]: https://github.com/google/protobuf.dart/pull/772\n[#773]: https://github.com/google/protobuf.dart/pull/773\n[#774]: https://github.com/google/protobuf.dart/pull/774\n[#778]: https://github.com/google/protobuf.dart/pull/778\n\n## 20.0.1\n\n* Fix proto3 repeated field encoding without the `packed` option ([#345],\n  [#635])\n\n[#345]: https://github.com/google/protobuf.dart/issues/345\n[#635]: https://github.com/google/protobuf.dart/pull/635\n\n## 20.0.0\n\n* Stable release generating null-safe code.\n\n## 19.3.1\n\n* Emit binary coded descriptors, which can be used to reflect over the options\n  given to the descriptor.\n\n## 19.3.0\n\n* Generate constructors with optional named arguments for prefilling fields.\n* Output language version 2.7 in generated files to support extension methods.\n\n## 19.2.1\n\n* Support optional proto3 fields.\n\n## 19.2.0+1\n\n* Fix syntax error introduced by gRPC client interceptor changes.\n\n## 19.2.0\n\n* Support client interceptors for gRPC. Requires grpc package 2.8.0 or newer.\n\n## 19.1.0\n\n* Emit depreciation of generated `copyWith` and `clone` methods.\n* Emit exports of `GeneratedMessageGenericExtensions` from `pb.dart` files.\n* Make protobuf enum names dependent on a fromEnvironment constant.\n\n  This will allow configuring the omission of the names in the final build.\n\n  If a target is built with `dart_env = {\"protobuf.omit_enum_names\": \"true\"}`\n  enum names will not be present in the compiled binary.\n* Make message and field names depend on fromEnvironment constants\n  `protobuf.omit_message_names` and `protobuf.omit_field_names` respectively.\n* Omit type on a left hand side of generated static fields for extensions,\n  which results in stricter type (`Extension<ExtensionType>` instead of just\n  `Extension`).\n* Fix escaping of string default values.\n\n## 19.0.3-dev\n\n* Ignore `annotate_overrides` in generated files.\n* Requires sdk 2.3.0\n* Update pedantic to 1.9.2\n\n## 19.0.2\n\n* Fix: escape the special character `$` in descriptor's `json_name`.\n\n## 19.0.1\n\n* Fix: avoid naming collisions with `Int64` and enum names beginning with digits\n  after an initial underscore.\n\n## 19.0.0+1\n* Updated protobuf dependency to '>=0.14.4 <2.0.0' to allow 1.0.0.\n\n## 19.0.0\n* Breaking: Generates code that requires at least `protobuf` 0.14.4.\n  If protoc_plugin is installed in your path with `pub global activate` you can upgrade with `pub global activate protoc_plugin 19.0.0`\n  - GeneratedMessage classes now have methods `ensureX` for each message field X.\n  - Add specialized getters for `String`, `int`, and `bool` with usual default values.\n  - Annotate generated accessors with the tag number of the associated field.\n* Breaking: Use unmangled names for the string representation of enum values.\n  Mangled names would lead to wrong proto3 json en- and decoding.\n* Annotate generated accessors with the tag number of the associated field.\n\n## 18.0.3\n\n* Fix: Allow decoding tagnumbers of up to 29 bits. Would fail before with more than 28 bits.\n\n## 18.0.2\n\n* Fix mangling of extension names, message type names, and enum names that are Dart keywords.\n\n  Now you can have an extension called `is` and an enum called `class`.\n\n## 18.0.1\n\n* Add a `bin/protoc-gen-dart.bat` script making it easier to compile on windows using a local\n  checkout.\n\n## 18.0.0\n\n* Breaking: Generates code that requires at least `protobuf` 0.14.0.\n\n* Generate the non-camel-case name of fields when it cannot be derived from the json name.\n\n* Breaking: Use the correct proto3 Json CamelCase names for the string representation of field\n  names (also for extensions), instead of using the name of the dart identifier for that field.\n\n  In most cases this name coincides with the name have emitted until now and require no change.\n\n  Exceptions are:\n    - Fields with a name that was disambiguated to not clash with other dart entities.\n    - fields with an explicit `json_name` option.\n    - groups have a different camel-casing scheme.\n\n  For any field with an updated name, this might require changes to uses of\n  `GeneratedMessage.getTagNumber(String FieldName)`, and calls to name-related methods of\n  `GeneratedMessage._info`.\n\n  `GeneratedMessage.toString()` also uses the string representation. It will now print the\n  json-name.\n\n* Well-known types (for now only `google.protobuf.Any` and `google.protobuf.Timestamp`) now uses a\n  mixin to add special handling code instead of hardcoding it in the compiler.\n\n## 17.0.5\n\n* Remove unnecessary cast from generated grpc stubs.\n\n## 17.0.4\n\n* Output [language versioning](https://github.com/dart-lang/language/blob/7eeb67b0d29b696b3c3ec8f9fe322334a2d5d87a/accepted/future-releases/language-versioning/feature-specification.md)\n  headers in generated code. This prepares for forward compatibility with\n  [NNBD](https://github.com/dart-lang/language/blob/7eeb67b0d29b696b3c3ec8f9fe322334a2d5d87a/accepted/future-releases/nnbd/feature-specification.md).\n\n## 17.0.3\n\n* Fix: Copy oneof state when doing `GeneratedMessage.copyWith()`.\n\n## 17.0.2\n\n* Fix: Avoiding `argument_type_not_assignable` and `return_of_invalid_type lint warnings`.\n\n## 17.0.1\n\n* Fix: Actually use prefixed imports from .pbserver, .pb.json, .pbgrpc files.\n\n## 17.0.0\n\n* Breaking change: seal protobuf message classes by using an internal\n  private constructor and changing the rest to factories.\n\n## 16.0.7\n\n* Always prefix .pb.dart imports in .pbserver, .pb.json, .pbgrpc files.\n\n## 16.0.6\n\n* Track the original order of proto fields and include it in metadata\n  to ensure the correct fields are being referenced.\n\n## 16.0.5\n\n* Fix generation of invalid Dart code for oneof enums\n  by adding list of reserved enum names.\n\n## 16.0.4\n\n* Generate '@Deprecated' annotations on fields that have been deprecated in the\n  corresponding .proto file.\n\n## 16.0.3\n\n* Sync Kythe metadata updates from internal repo:\n* Remove the extra 1 (field name) from generated field paths,\n  so they refer to the whole field rather than the name.\n* Add missing proto message field metadata to the Dart proto generator\n  (attached to setter/getter/has/clear methods). Fix a bug with indented space counting,\n  which would cause all indented fields to use the incorrect count (off by the size of the indent)\n* Add metadata to the unnamed constructors in the generated dart proto files.\n  Removed extra list copy constructor calls when the field path isn't being modified.\n  The named constructors (e.g. fromJson) don't need this because, at the call site,\n  the class name and the constructor name are two separate links.\n\n## 16.0.2\n\n* Generated files now import 'dart:core' with a prefix\n* Add 'camel_case_types' to analysis_options and add it in the 'ignore_for_file' header of the generated files.\n\n## 16.0.1\n\n* Add `DateTime` conversion methods to `google.protobuf.Timestamp`.\n\n## 16.0.0\n\n* Add ability to generate Kythe metadata files via the\n  `generate_kythe_info` option.\n* Breaking change: Remove the '$checkItem' function from generated message classes and use the new method 'pc' on\n  'BuilderInfo' to add repeated composite fields.\n  Generated files require package:protobuf version 0.13.4 or newer.\n* Breaking change: The generated `*.pbgrpc.dart` files now import `package:grpc/service_api.dart`\n  instead of `package:grpc/grpc.dart`.\n  Generated code needs at least package:grpc 1.0.1.\n\n## 15.0.3\n\n* Add test for frozen messages with unknown fields and update protobuf dependency to 0.13.1.\n\n## 15.0.2\n\n* The generated `pbgrpc.dart` files now import `package:grpc/grpc.dart` with a prefix.\n\n## 15.0.1\n\n* Add test for frozen messages with extension fields and update protobuf dependency to 0.13.0.\n\n## 15.0.0\n\n*  Breaking change: Changed BuilderInfo call for map fields to include the BuilderInfo object for map entries.\n   Generated files require package:protobuf version 0.12.0 or newer.\n\n## 14.0.1\n\n* Remove the benchmark from the protoc_package. It now lives in\n  [https://github.com/google/protobuf.dart] as `api_benchmark`.\n  This simplifies the dev_dependencies of this package.\n\n## 14.0.0\n\n* Breaking change: generated message classes now have a new instance method `createEmptyInstance`\n  that is used to support the new `toBuilder()` semantics of protobuf 0.11.0.\n  The generated code requires at least protobuf 0.11.0.\n\n## 13.0.1\n\n* Add test for recursive merging and update protobuf dependency to 0.10.7.\n\n## 13.0.0\n\n* Breaking change: Support for [oneof](https://developers.google.com/protocol-buffers/docs/proto3#oneof)\n  Generated files require package:protobuf version 0.10.6 or newer.\n\n## 12.0.0\n\n* Breaking change: Handle identifiers starting with a leading underscore.\n  This covers message names, enum names, enum value identifiers and file names.\n\n  Before, these would appear in the generated Dart code as private identifiers.\n  Now the underscore is moved to the end.\n\n  Field names and extension field names already had all underscores removed, and these are not\n  affected by this change.\n\n  If there is a conflicting name with a trailing underscore defined later in the same scope, a\n  disambiguation will happen that can potentially lead to existing identifiers getting a new name in\n  the generated Dart.\n\n  For example:\n\n  ```\n  message _Foo {}\n  message Foo_ {}\n  ```\n\n  `_Foo` will get the name `Foo_` and `Foo_` will now end up being called `Foo__`.\n\n## 11.0.0\n\n* Breaking change: Support for [map fields](https://developers.google.com/protocol-buffers/docs/proto3#maps)\n  Generated files require package:protobuf version 0.10.5 or newer.\n  Protobuf map fields such as:\n\n  message Foo {\n    map<int32, string> map_field = 1;\n  }\n  are now no longer represented as List<Foo_MapFieldEntry> but as Map<int, String>.\n\n  All code handling these fields needs to be updated.\n\n  Accidentally published as 11.0.0 instead of 0.11.0. Continuing from here.\n\n## 0.10.5\n\n* Generated files now import `dart:async` with a prefix to prevent name\n  collisions.\n\n## 0.10.4\n\n* Change the fully qualified message name of generated messages to use\n  `BuilderInfo.qualifiedMessageName`.\n  Requires package:protobuf version 0.10.4 or newer.\n\n## 0.10.3\n\n* Remove runtime `as` check of enum `valueOf` by using correctly typed `Map` of\n  values.\n  Generated files must require package:protobuf version 0.10.3 or newer.\n\n## 0.10.2\n\n* Add link to source file in generated code.\n\n## 0.10.1\n\n* Prefix generated Dart proto imports by proto file path instead of by package.\n  Tighten up member name checks for generated enum classes.\n\n## 0.10.0\n\n* Breaking change: Support for [any](https://developers.google.com/protocol-buffers/docs/proto3#any) messages.\n  Generated files require package:protobuf version 0.10.1 or newer.\n  `BuilderInfo.messageName` will now be the fully qualified name for generated messages.\n\n## 0.9.0\n\n* Breaking change: Add `copyWith()` to message classes and update `getDefault()` to use `freeze()`.\n  Requires package:protobuf version 0.10.0 or newer.\n\n## 0.8.2\n\n* Generated code now imports 'package:protobuf/protobuf.dart' prefixed.\n  This avoids name clashes between user defined message names and the protobuf library.\n\n## 0.8.1\n\n* Adjust dependencies to actually be compatible with Dart 2.0 stable.\n\n## 0.8.0+1\n\n* Dart SDK upper constraint raised to declare compatibility with Dart 2.0 stable.\n\n## 0.8.0\n\n* Breaking change: Generated RpcClient stubs use the generic invoke method.\n  Requires package:protobuf version 0.8.0 or newer.\n* Dart 2 fixes.\n\n## 0.7.11\n\n* Dart 2 fix.\n\n## 0.7.10\n\n* Small performance tweak for DDC.\n\n## 0.7.9\n\n* Add fast getters for common types.\n* Only pass index instead of tag and index in generated code.\n* Fix uses-dynamic-as-bottom error in generated gRPC code.\n\n## 0.7.8\n\n* Added enumValues to FieldInfo.\n\n## 0.7.7\n\n* Avoid name clashes between import prefix and field names.\n* Avoid name clashes between generated enum and extension class names.\n* Updated gRPC client stub generation to match latest changes to dart-lang/grpc-dart.\n\n## 0.7.6\n\n* Updated gRPC client stub generation to produce code matching latest changes to\n  dart-lang/grpc-dart.\n\n## 0.7.5\n\n* Use real generic syntax instead of comment-based.\n* Support 2.0.0 dev SDKs.\n\n## 0.7.4\n\n* Added call options to gRPC client stubs.\n\n## 0.7.3\n\n### gRPC support\n\n* Added gRPC stub generation.\n* Updated descriptor.proto from google/protobuf v3.3.0.\n\n## 0.7.2\n\n* Added CHANGELOG.md\n\n## 0.7.1\n\n* Enable executable for `pub global` usage. Protoc plugin can now be installed by running `pub global activate protoc_plugin`.\n* Ensure generated extension class names don't conflict with message class names.\n* `Function` will soon be a reserved keyword, so don't generate classes with that name.\n* Strong mode tweaks and lint fixes.\n\n## 0.7.0 - Not released\n\n* Change how to customize the Dart name of a field to using a `dart_name` option.\n* Implemented support for adding external mixins to generate Dart protos.\n\n## 0.6.0+1 - Not released\n\n* Fix missing import when an extension uses an enum in the same .proto file.\n\n## 0.6.0 - Not released\n\n* Move protobuf enums to a separate .pbenum.dart file.\n* Move server-side stubs to .pbserver.dart.\n\n## 0.5.2 - Not released\n\n* Generate separate .pbjson.dart files for constants.\n\n## 0.5.1\n\n### Strong mode and Bazel\n\n* Fixed all analyzer diagnostics in strong mode.\n* Added experimental support for Bazel.\n\n## 0.5.0\n\n### Performance improvements\n\nThis release requires 0.5.0 of the protobuf library.\n\n* significantly improved performance for getters, setters, and hazzers\n* Each enum type now has a $json constant that contains its metadata.\n\n## 0.4.1\n\n### Fixed imports, $checkItem, $json\n\n* Fixed all warnings, including in generated code.\n* Started generating $checkItem function for verifying the values of repeated fields\n* Fixed service stubs to work when a message is in a different package\n* Started generating JSON constants to get the original descriptor data for services\n\n## 0.4.0\n\n### Getters for message fields changed\n\nThis release changes how getters work for message fields, to detect a common mistake.\n\nPreviously, the protobuf API didn't report any error for an incorrect usage of setters. For example, if field \"foo\" is a message field of type Foo, this code would silently have no effect:\n\nvar msg = new SomeMessage();\nmsg.foo.bar = 123;\nThis is because \"msg.foo\" would call \"new Foo()\" and return it without saving it.\n\nThe example can be fixed like this:\n\nvar msg = new SomeMessage();\nmsg.foo = new Foo();\nmsg.foo.bar = 123;\nOr equivalently:\n\nvar msg = new SomeMessage()\n   ..foo = (new Foo()..bar = 123);\nStarting in 0.4.0, the default value of \"msg.foo\" is an immutable instance of Foo. You can read\nthe default value of a field the same as before, but writes will throw UnsupportedError.\n\n## 0.3.11\n\n* Fixes issues with reserved names\n\n## 0.3.10\n\n* Adds support for generating stubs from service definitions.\n\n## 0.3.9\n\n* Modify dart_options support so that it supports alternate mixins.\n* Move the experimental map implementation to PbMapMixin\n\nFor now, new mixins can only be added using a patch:\n\n* add the new class to the protobuf library\n* add the class to the list in mixin.dart.\n\n## 0.3.8\n\n### Added option for experimental map API\n\n* Changed the Map API so that operator [] and operator []= support dotted keys such as \"foo.bar\".\n\nThis new API is subject to change without notice, but if you want to try it out anyway, see the unit test.\n\n## 0.3.7 - Unreleased\n\n### Added option for experimental map API\n\n* Added an option to have GeneratedMessage subclasses implement Map.\n\n## 0.3.6\n\n### Added writeToJsonMap and mergeFromJsonMap to reservedNames\n\nThe 0.3.6 version of the dart-protobuf library added two new functions, so this release changes the protobuf compiler to avoid using them.\n\n## 0.3.5\n\nProtobuf changes for smaller dart2js code, Int64 fixes\n\nThis change is paired with https://chromiumcodereview.appspot.com/814213003\n\nReduces code size for one app by 0.9%\n\n1. Allow constants for the default value to avoid many trivial closures.\n2. Generate and use static M.create() and M.createRepeated() methods on message classes M to ensure there is a shared copy of these closures rather than one copy per use.\n3. Parse Int64 values rather than generate from 'int' to ensure no truncation errors in JavaScript.\n\n## 0.3.4\n\nParameterize uri resolution and parsing of options, use package:path.\n\nThis helps make the compiler more configurable\nto embed it in other systems (like pub transformers)\n\n## 0.3.3\n\nUpdate the version number\n"
  },
  {
    "path": "protoc_plugin/LICENSE",
    "content": "Copyright 2013, the Dart project authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above\n      copyright notice, this list of conditions and the following\n      disclaimer in the documentation and/or other materials provided\n      with the distribution.\n    * Neither the name of Google LLC nor the names of its\n      contributors may be used to endorse or promote products derived\n      from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "protoc_plugin/Makefile",
    "content": "PLUGIN_SRC = \\\n\tbin/protoc_plugin.dart \\\n\tlib/**/*.dart\n\nOUTPUT_DIR=test/gen\nPLUGIN_NAME=protoc-gen-dart-debug\nPLUGIN_PATH=bin/$(PLUGIN_NAME)\n\nTEST_PROTO_LIST = \\\n\t_leading_underscores \\\n\tgoogle/protobuf/unittest_import \\\n\tgoogle/protobuf/unittest_import_public \\\n\tgoogle/protobuf/unittest_optimize_for \\\n\tgoogle/protobuf/unittest_well_known_types \\\n\tgoogle/protobuf/unittest \\\n\tcustom_option \\\n\tdart_name \\\n\tdeprecations \\\n\tdoc_comments \\\n\tdefault_value_escape \\\n\tentity \\\n\tenum_extension \\\n\tenum_name \\\n\tenum_test \\\n\tenums \\\n\textend_unittest \\\n\tExtensionEnumNameConflict \\\n\tExtensionNameConflict \\\n\tfoo \\\n\thigh_tagnumber \\\n\timport_clash \\\n\timport_option \\\n\timport_public \\\n\tjson_name \\\n\tmap_api \\\n\tmap_api2 \\\n\tmap_enum_value \\\n\tmap_field \\\n\tmessage_set \\\n\tmixins \\\n\tmultiple_files_test \\\n\tnested_any \\\n\tnested_extension \\\n\tnested_message \\\n\tnon_nested_extension \\\n\toneof \\\n\treserved_names \\\n\treserved_names_extension \\\n\treserved_names_message \\\n\tduplicate_names_import \\\n\tpackage1 \\\n\tpackage2 \\\n\tpackage3 \\\n\tproto2_repeated \\\n\tproto3_optional \\\n\tproto3_repeated \\\n\tservice \\\n\tservice2 \\\n\tservice3 \\\n\ttoplevel_import \\\n\ttoplevel \\\n\tusing_any\nTEST_PROTO_DIR=$(OUTPUT_DIR)\nTEST_PROTO_LIBS=$(foreach f, $(TEST_PROTO_LIST), \\\n\t$(TEST_PROTO_DIR)/$(f).pb.dart \\\n\t$(TEST_PROTO_DIR)/$(f).pbenum.dart \\\n\t$(TEST_PROTO_DIR)/$(f).pbjson.dart)\nTEST_PROTO_SRC_DIR=test/protos\nTEST_PROTO_SRCS=$(foreach proto, $(TEST_PROTO_LIST), \\\n\t$(TEST_PROTO_SRC_DIR)/$(proto).proto)\n\nPREGENERATED_SRCS := $(shell find protos -name '*.proto')\n\n$(TEST_PROTO_LIBS): $(PLUGIN_SRC) $(TEST_PROTO_SRCS)\n\tmkdir -p $(TEST_PROTO_DIR)\n\n\tprotoc\\\n\t\t--dart_out=\"$(TEST_PROTO_DIR)\"\\\n\t\t-I$(TEST_PROTO_SRC_DIR)\\\n\t\t-Iprotos\\\n\t\t--plugin=protoc-gen-dart=$(realpath $(PLUGIN_PATH))\\\n\t\t$(TEST_PROTO_SRCS)\n\nupdate-pregenerated: $(PLUGIN_PATH) $(PREGENERATED_SRCS)\n\tprotoc --dart_out=lib/src/gen \\\n\t\t-Iprotos \\\n\t\t--plugin=protoc-gen-dart=$(realpath $(PLUGIN_PATH)) $(PREGENERATED_SRCS)\n\tfind lib/src/gen -name '*.pbjson.dart' -delete\n\nprotos: $(PLUGIN_PATH) $(TEST_PROTO_LIBS)\n\nrun-tests: protos\n\tdart test\n\nupdate-goldens: protos\n\trm -rf test/goldens\n\tdart test\n\nclean:\n\trm -rf $(OUTPUT_DIR)\n"
  },
  {
    "path": "protoc_plugin/README.md",
    "content": "[![pub package](https://img.shields.io/pub/v/protoc_plugin.svg)](https://pub.dev/packages/protoc_plugin)\n[![package publisher](https://img.shields.io/pub/publisher/protoc_plugin.svg)](https://pub.dev/packages/protoc_plugin/publisher)\n\nThis repository provides a Dart plugin for the [protoc compiler][1]. It generates\nDart files for working with data in protocol buffers format.\n\n[1]: https://developers.google.com/protocol-buffers/docs/cpptutorial#compiling-your-protocol-buffers\n\n## Requirements\n\nTo compile a .proto file, you must use the `protoc` command which is [installed\nseparately][2]. protoc 3.0.0 or above is required.\n\nThe generated files are pure Dart code that run either in the Dart VM or in a\nbrowser (using [dart2js][3]). They depend on the [protobuf Dart package][4]. A\nDart project that includes generated files should add `protobuf` as a\ndependency in the `pubspec.yaml` file.\n\n[2]: https://developers.google.com/protocol-buffers/docs/downloads\n[3]: https://dart.dev/tools/dart2js\n[4]: https://pub.dev/packages/protobuf\n\n## How to build\n\nMake sure you have `dart` executable in your `PATH`. See the [Dart installation\ninstructions][5] for details.\n\nIf you encounter any issues while following the instructions below, please make\nsure you have the latest version of Dart installed.\n\n[5]: https://dart.dev/get-dart\n\n**The recommended way** is to activate the latest published version of the\nplugin:\n\n    $ dart pub global activate protoc_plugin\n\nMake sure you have `~/.pub-cache/bin` in your `PATH`.\n\nThis method installs a Dart script and requires presence of `dart` executable\nin your `PATH`.\n\n**To build from the source:**\n\n- Run `dart pub get` in `protoc_plugin` directory\n- Add `protoc_plugin/bin` to your `PATH`, or pass the path to\n  `protoc_plugin/bin/protoc-gen-dart` to `protoc`'s `--plugin` option.\n\nThe `protoc-gen-dart` executable is a Dart script and requires presence of\n`dart` executable in your `PATH`.\n\n**To build a standalone executable from the source:**\n\n- Run `dart pub get` in `protoc_plugin`\n- Build standalone executable with `dart compile exe bin/protoc_plugin.dart` in\n  `protoc_plugin`\n\nThe generated executable does not require a `dart` executable to run. You\nshould copy the generated executable `protoc_plugin/bin/protoc_plugin.exe` to\nyour `PATH` with name `protoc-gen-dart`, or pass the path to it to `protoc`'s\n`--plugin` option when invoking `protoc`.\n\n## How to use\n\nOnce you have `protoc-gen-dart` in the `PATH` the protocol buffer compiler can\nbe invoked like this to generate Dart for the proto file `test.proto`:\n\n    $ protoc --dart_out=. test.proto\n\nIf you don't want to add `protoc-gen-dart` to `PATH`, you can specify the path\nto it like this:\n\n    $ protoc --dart_out=. test.proto --plugin=<path to plugin executable>\n\n### Options to control the generated Dart code\n\nThe protocol buffer compiler accepts options for each plugin. For the\nDart plugin, these options are passed together with the `--dart_out`\noption. The individual options are separated using comma, and the\nfinal output directive is separated from the options using colon. Pass\noptions `<option 1>` and `<option 2>` like this:\n\n    --dart_out=\"<option 1>,<option 2>:.\"\n\n### Generating grpc Headers\n\nTo generate code for [grpc], you will need to pass in the `grpc` option:\n\n    --dart_out=\"grpc:.\"\n\n[grpc]: https://pub.dev/packages/grpc\n\n### Generating Code Info\n\nThe plugin includes the `generate_kythe_info` option, which, if passed at run\ntime, will make the plugin generate metadata files alongside the `.dart` files\ngenerated for the proto messages and their enums. Pass this along with the other\ndart_out options:\n\n    --dart_out=\"generate_kythe_info,<other options>:.\"\n\n## Using protocol buffer libraries to build new libraries\n\nThe protocol buffer compiler produces several files for each `.proto` file\nit compiles. In some cases this is not exactly what is needed, e.g one\nwould like to create new libraries which exposes the objects in these\nlibraries or create new libraries combining object definitions from\nseveral `.proto` libraries into one.\n\nThe best way to approach this is to create the new libraries needed and\nre-export the relevant protocol buffer classes.\n\nSay we have the file `m1.proto` with the following content\n\n```proto\nsyntax = \"proto3\";\n\nmessage M1 {\n  string a = 1;\n}\n```\n\nand `m2.proto` containing\n\n```proto\nsyntax = \"proto3\";\n\nmessage M2 {\n  string b = 1;\n}\n```\n\nCompiling these to Dart will produce two libraries in `m1.pb.dart` and\n`m2.pb.dart`. The following code shows a library `M` which combines\nthese two protocol buffer libraries, exposes the classes `M1` and `M2` and\nadds some additional methods.\n\n```dart\nlibrary M;\n\nimport \"m1.pb.dart\";\nimport \"m2.pb.dart\";\n\nexport \"m1.pb.dart\" show M1;\nexport \"m2.pb.dart\" show M2;\n\nM1 createM1() => new M1();\nM2 createM2() => new M2();\n```\n\n## Hacking\n\nHere are some ways to get protoc:\n\n* Linux: `apt-get install protobuf-compiler`\n* Mac [homebrew](https://brew.sh/): `brew install protobuf`\n\nIf the version installed this way doesn't work, an alternative is to\n[compile protoc from source](https://developers.google.com/protocol-buffers/docs/downloads).\n\nRemember to run the tests. That is as easy as `dart pub get` and then `make\nrun-tests`.\n\n## Useful references\n\n* [Main Dart site](https://dart.dev)\n* [Main protobuf site](https://github.com/protocolbuffers/protobuf)\n* [Protobuf runtime support project](https://github.com/google/protobuf.dart)\n"
  },
  {
    "path": "protoc_plugin/analysis_options.yaml",
    "content": "include: ../analysis_options.yaml\n\nanalyzer:\n  errors:\n    # The generated code in lib/src/gen triggers this lint.\n    unintended_html_in_doc_comment: ignore\n  exclude:\n    - test/goldens/**\n"
  },
  {
    "path": "protoc_plugin/bin/protoc-gen-dart",
    "content": "#!/bin/bash\nBINDIR=$(dirname \"$0\")\ndart \"$BINDIR/protoc_plugin.dart\" -c \"$@\"\n"
  },
  {
    "path": "protoc_plugin/bin/protoc-gen-dart-debug",
    "content": "#!/bin/bash\nBINDIR=$(dirname \"$0\")\ndart --enable-asserts \"$BINDIR/protoc_plugin.dart\" -c \"$@\"\n"
  },
  {
    "path": "protoc_plugin/bin/protoc-gen-dart.bat",
    "content": "@echo off\ndart \"%~dp0protoc_plugin.dart\" -c \"$@\"\n"
  },
  {
    "path": "protoc_plugin/bin/protoc_plugin.dart",
    "content": "#!/usr/bin/env dart\n// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:io';\n\nimport 'package:protoc_plugin/protoc.dart';\n\nvoid main() {\n  CodeGenerator(stdin, stdout).generate();\n}\n"
  },
  {
    "path": "protoc_plugin/bin/protoc_plugin_bazel.dart",
    "content": "#!/usr/bin/env dart\n// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:io';\n\nimport 'package:protoc_plugin/bazel.dart';\nimport 'package:protoc_plugin/protoc.dart';\n\nvoid main() {\n  final packages = <String, BazelPackage>{};\n  CodeGenerator(stdin, stdout).generate(\n    optionParsers: {bazelOptionId: BazelOptionParser(packages)},\n    config: BazelOutputConfiguration(packages),\n  );\n}\n"
  },
  {
    "path": "protoc_plugin/lib/bazel.dart",
    "content": "// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n/// Bazel support for protoc_plugin.\nlibrary;\n\nimport 'package:path/path.dart' as p;\n\nimport 'src/options.dart';\nimport 'src/output_config.dart';\n\n/// Dart protoc plugin option for Bazel packages.\n///\n/// This option takes a semicolon-separated list of Bazel package metadata in\n/// `package_name|input_root|output_root` form. `input_root` designates the\n/// directory relative to which input protos are located -- typically the root\n/// of the Bazel package, where the `BUILD` file is located. `output_root`\n/// designates the directory relative to which generated `.pb.dart` outputs are\n/// emitted -- typically the package's `lib/` directory under the genfiles\n/// directory specified by `genfiles_dir` in the Bazel configuration. Generated\n/// outputs are emitted at the same path relative to `output_root` as the input\n/// proto is found relative to `input_root`.\n///\n/// For example, using `foo.bar|foo/bar|foo/bar/lib`:\n///   * `foo/bar/baz.proto` will generate `foo/bar/lib/baz.pb.dart`\n///   * `foo/bar/a/b/baz.proto` will generate `foo/bar/lib/a/b/baz.pb.dart`\nconst bazelOptionId = 'BazelPackages';\n\nclass BazelPackage {\n  final String name;\n  final String inputRoot;\n  final String outputRoot;\n\n  BazelPackage(this.name, String inputRoot, String outputRoot)\n    : inputRoot = p.normalize(inputRoot),\n      outputRoot = p.normalize(outputRoot);\n}\n\n/// Parser for the `BazelPackages` option.\nclass BazelOptionParser implements SingleOptionParser {\n  /// Output map of package input_root to package.\n  final Map<String, BazelPackage> output;\n\n  BazelOptionParser(this.output);\n\n  @override\n  void parse(String name, String? value, OnError onError) {\n    if (value == null) {\n      onError('Invalid $bazelOptionId option. Expected a non-empty value.');\n      return;\n    }\n\n    for (final entry in value.split(';')) {\n      final fields = entry.split('|');\n      if (fields.length != 3) {\n        onError(\n          'ERROR: expected package_name|input_root|output_root. Got: $entry',\n        );\n        continue;\n      }\n      final pkg = BazelPackage(fields[0], fields[1], fields[2]);\n      if (!output.containsKey(pkg.inputRoot)) {\n        output[pkg.inputRoot] = pkg;\n      } else {\n        final prev = output[pkg.inputRoot]!;\n        if (pkg.name != prev.name) {\n          onError(\n            'ERROR: multiple packages with input_root ${pkg.inputRoot}: '\n            '${prev.name} and ${pkg.name}',\n          );\n          continue;\n        }\n        if (pkg.outputRoot != prev.outputRoot) {\n          onError(\n            'ERROR: conflicting output_roots for package ${pkg.name}: '\n            '${prev.outputRoot} and ${pkg.outputRoot}',\n          );\n          continue;\n        }\n      }\n    }\n  }\n}\n\n/// A Dart `package:` URI with package name and path components.\nclass _PackageUri {\n  final String packageName;\n  final String path;\n  Uri get uri => Uri.parse('package:$packageName/$path');\n\n  _PackageUri(this.packageName, this.path);\n}\n\n/// [OutputConfiguration] that uses Bazel layout information to resolve output\n/// locations and imports.\nclass BazelOutputConfiguration extends DefaultOutputConfiguration {\n  final Map<String, BazelPackage> packages;\n\n  BazelOutputConfiguration(this.packages);\n\n  /// Search for the most specific Bazel package above [searchPath].\n  BazelPackage? _findPackage(String searchPath) {\n    var index = searchPath.lastIndexOf('/');\n    while (index > 0) {\n      searchPath = searchPath.substring(0, index);\n      final pkg = packages[searchPath];\n      if (pkg != null) return pkg;\n      index = searchPath.lastIndexOf('/');\n    }\n    return null;\n  }\n\n  @override\n  Uri outputPathFor(Uri inputPath, String extension) {\n    final pkg = _findPackage(inputPath.path);\n    if (pkg == null) {\n      throw ArgumentError('Unable to locate package for input $inputPath.');\n    }\n\n    // Bazel package-relative paths.\n    final relativeInput = inputPath.path.substring('${pkg.inputRoot}/'.length);\n    final base = p.withoutExtension(relativeInput);\n    final outputPath = p.join(pkg.outputRoot, '$base$extension');\n    return Uri.file(outputPath);\n  }\n\n  @override\n  Uri resolveImport(Uri target, Uri source, String extension) {\n    final targetBase = p.withoutExtension(target.path);\n    final targetUri = _packageUriFor('$targetBase$extension');\n    final sourceUri = _packageUriFor(source.path);\n\n    if (targetUri == null && sourceUri != null) {\n      // We can't reach outside of the lib/ directory of a package without\n      // using a package: import. Using a relative import for [target] could\n      // break anyone who uses a package: import to load [source].\n      throw 'ERROR: cannot generate import for $target from $source.';\n    }\n\n    if (targetUri != null && sourceUri?.packageName != targetUri.packageName) {\n      return targetUri.uri;\n    }\n\n    return super.resolveImport(target, source, extension);\n  }\n\n  _PackageUri? _packageUriFor(String target) {\n    final pkg = _findPackage(target);\n    if (pkg == null) return null;\n    final relPath = target.substring(pkg.inputRoot.length + 1);\n    return _PackageUri(pkg.name, relPath);\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/lib/const_generator.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'indenting_writer.dart';\nimport 'string_escape.dart';\n\n/// Writes JSON data as a Dart constant expression.\n/// Accepts null, bool, num, String, and maps and lists.\nvoid writeJsonConst(IndentingWriter out, Object? val) {\n  if (val is Map) {\n    if (val.values.any(_nonEmptyListOrMap)) {\n      out.addBlock(\n        '{',\n        '}',\n        () => _writeMapItems(out, val, vertical: true),\n        endWithNewline: false,\n      );\n    } else {\n      out.print('{');\n      _writeMapItems(out, val);\n      out.print('}');\n    }\n  } else if (val is List) {\n    if (val.any(_nonEmptyListOrMap)) {\n      out.addBlock(\n        '[',\n        ']',\n        () => _writeListItems(out, val, vertical: true),\n        endWithNewline: false,\n      );\n    } else {\n      out.print('[');\n      _writeListItems(out, val);\n      out.print(']');\n    }\n  } else if (val is String) {\n    _writeString(out, val);\n  } else if (val is num || val is bool) {\n    out.print(val.toString());\n  } else if (val == null) {\n    out.print('null');\n  } else {\n    throw 'not JSON: $val';\n  }\n}\n\nbool _nonEmptyListOrMap(dynamic x) {\n  if (x is List && x.isNotEmpty) return true;\n  if (x is Map && x.isNotEmpty) return true;\n  return false;\n}\n\nvoid _writeString(IndentingWriter out, String val) {\n  out.print(quoted(val));\n}\n\nvoid _writeListItems(IndentingWriter out, List val, {bool vertical = false}) {\n  var first = true;\n  for (final item in val) {\n    if (!first && !vertical) {\n      out.print(', ');\n    }\n    writeJsonConst(out, item);\n    if (vertical) {\n      out.println(',');\n    }\n    first = false;\n  }\n}\n\nvoid _writeMapItems(\n  IndentingWriter out,\n  Map<dynamic, dynamic> val, {\n  bool vertical = false,\n}) {\n  var first = true;\n  for (final key in val.keys) {\n    if (!first && !vertical) out.print(', ');\n    _writeString(out, key as String);\n    out.print(': ');\n    writeJsonConst(out, val[key]);\n    if (vertical) {\n      out.println(',');\n    }\n    first = false;\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/lib/indenting_writer.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:collection';\n\nimport 'src/formatter.dart' as formatter;\nimport 'src/gen/google/protobuf/descriptor.pb.dart';\n\n/// Specifies code locations where metadata annotations should be attached and\n/// where they should point to in the original proto.\nclass NamedLocation {\n  final String name;\n  final List<int> fieldPathSegment;\n  final int start;\n\n  NamedLocation({\n    required this.name,\n    required this.fieldPathSegment,\n    required this.start,\n  });\n}\n\n/// A buffer for writing indented source code.\nclass IndentingWriter {\n  final String? fileName;\n  final bool generateMetadata;\n\n  final StringBuffer _buffer = StringBuffer();\n  final GeneratedCodeInfo sourceLocationInfo = GeneratedCodeInfo();\n\n  String _indent = '';\n  bool _needIndent = true;\n  // After writing any chunk, _previousOffset is the size of everything that was\n  // written to the buffer before the latest call to print or addBlock.\n  int _previousOffset = 0;\n\n  // Named text sections to write at the end of the file.\n  final Map<String, String> _suffixes = SplayTreeMap();\n\n  IndentingWriter({this.fileName, this.generateMetadata = false});\n\n  /// Appends a string indented to the current level.\n  /// (Indentation will be added after newline characters where needed.)\n  void print(String text) {\n    _previousOffset = _buffer.length;\n    final lastNewline = text.lastIndexOf('\\n');\n    if (lastNewline == -1) {\n      _writeChunk(text);\n      return;\n    }\n\n    for (final line in text.substring(0, lastNewline).split('\\n')) {\n      _writeChunk(line);\n      _newline();\n    }\n    _writeChunk(text.substring(lastNewline + 1));\n  }\n\n  /// Same as print, but with a newline at the end.\n  void println([String text = '']) {\n    print(text);\n    _newline();\n  }\n\n  void printAnnotated(String text, List<NamedLocation> namedLocations) {\n    final indentOffset = _needIndent ? _indent.length : 0;\n    print(text);\n    for (final location in namedLocations) {\n      _addAnnotation(\n        location.fieldPathSegment,\n        location.name,\n        location.start + indentOffset,\n      );\n    }\n  }\n\n  void printlnAnnotated(String text, List<NamedLocation> namedLocations) {\n    printAnnotated(text, namedLocations);\n    _newline();\n  }\n\n  /// Prints a block of text with the body indented one more level.\n  void addBlock(\n    String start,\n    String end,\n    void Function() body, {\n    bool endWithNewline = true,\n  }) {\n    println(start);\n    _addBlockBodyAndEnd(end, body, endWithNewline, '$_indent  ');\n  }\n\n  /// Prints a block of text with an unindented body.\n  /// (For example, for triple quotes.)\n  void addUnindentedBlock(\n    String start,\n    String end,\n    void Function() body, {\n    bool endWithNewline = true,\n  }) {\n    println(start);\n    _addBlockBodyAndEnd(end, body, endWithNewline, '');\n  }\n\n  void addAnnotatedBlock(\n    String start,\n    String end,\n    List<NamedLocation> namedLocations,\n    void Function() body, {\n    bool endWithNewline = true,\n  }) {\n    printlnAnnotated(start, namedLocations);\n    _addBlockBodyAndEnd(end, body, endWithNewline, '$_indent  ');\n  }\n\n  void _addBlockBodyAndEnd(\n    String end,\n    void Function() body,\n    bool endWithNewline,\n    String newIndent,\n  ) {\n    final oldIndent = _indent;\n    _indent = newIndent;\n    body();\n    _indent = oldIndent;\n    if (endWithNewline) {\n      println(end);\n    } else {\n      print(end);\n    }\n  }\n\n  /// Add a named piece of text that will be emitted at the end of the file\n  /// after the main contents are generated.\n  ///\n  /// The [suffixKey] is not emitted - it's just used as a key for uniqueness,\n  /// so that `addSuffix` could be called more than once with the same suffix\n  /// content, but only emit that particular suffix text once.\n  void addSuffix(String suffixKey, String text) {\n    _suffixes[suffixKey] = text;\n  }\n\n  /// Emit the generated source.\n  ///\n  /// This is safe to call multiple times.\n  String emitSource({required bool format}) {\n    if (_suffixes.isNotEmpty) {\n      println('');\n      for (final key in _suffixes.keys) {\n        println(_suffixes[key]!);\n      }\n      _suffixes.clear();\n    }\n\n    var source = _buffer.toString();\n\n    // We don't always want to format the source (for example, we don't want to\n    // format if we're creating annotated locations of source elements).\n    if (format) {\n      source = formatter.format(source);\n    }\n\n    return source;\n  }\n\n  /// Writes part of a line of text.\n  /// Adds indentation if we're at the start of a line.\n  void _writeChunk(String chunk) {\n    assert(!chunk.contains('\\n'));\n\n    if (chunk.isEmpty) return;\n    if (_needIndent) {\n      _buffer.write(_indent);\n      _needIndent = false;\n    }\n    _buffer.write(chunk);\n  }\n\n  void _newline() {\n    _buffer.writeln();\n    _needIndent = true;\n  }\n\n  /// Creates an annotation, given the starting offset and ending offset.\n  /// [start] should be the location of the identifier as it appears in the\n  /// string that was passed to the previous [print]. Name should be the string\n  /// that was written to file.\n  void _addAnnotation(List<int> fieldPath, String name, int start) {\n    if (generateMetadata) {\n      final annotation =\n          GeneratedCodeInfo_Annotation()\n            ..path.addAll(fieldPath)\n            ..sourceFile = fileName!\n            ..begin = _previousOffset + start\n            ..end = _previousOffset + start + name.length;\n      sourceLocationInfo.annotation.add(annotation);\n    }\n  }\n}\n\n/// A utility class to generate a set of imports. The imports will be grouped\n/// by kind (`dart:` imports, `package:` imports, ...) and sorted lexically\n/// within the groups.\nclass ImportWriter {\n  final Set<String> _dartImports = SplayTreeSet<String>();\n  final Set<String> _packageImports = SplayTreeSet<String>();\n  final Set<String> _fileImports = SplayTreeSet<String>();\n  final Set<String> _packageExports = SplayTreeSet<String>();\n  final Set<String> _fileExports = SplayTreeSet<String>();\n\n  /// Whether any imports were written.\n  bool get hasImports =>\n      _dartImports.isNotEmpty ||\n      _packageImports.isNotEmpty ||\n      _fileImports.isNotEmpty ||\n      _packageExports.isNotEmpty ||\n      _fileExports.isNotEmpty;\n\n  bool get hasSrcImport =>\n      _packageImports.any((item) => item.contains('/src/'));\n\n  /// Add an import with an optional import prefix.\n  void addImport(String url, {String? prefix}) {\n    final directive =\n        prefix == null ? \"import '$url';\" : \"import '$url' as $prefix;\";\n    if (url.startsWith('dart:')) {\n      _dartImports.add(directive);\n    } else if (url.startsWith('package:')) {\n      _packageImports.add(directive);\n    } else {\n      _fileImports.add(directive);\n    }\n  }\n\n  /// And an export.\n  void addExport(String url, {List<String> members = const []}) {\n    final directive =\n        members.isNotEmpty\n            ? \"export '$url' show ${members.join(', ')};\"\n            : \"export '$url';\";\n    if (url.startsWith('package:')) {\n      _packageExports.add(directive);\n    } else {\n      _fileExports.add(directive);\n    }\n  }\n\n  /// Return the generated text for the set of imports.\n  String emit() {\n    final buf = StringBuffer();\n\n    if (_dartImports.isNotEmpty) {\n      _dartImports.forEach(buf.writeln);\n    }\n    if (_packageImports.isNotEmpty) {\n      if (buf.isNotEmpty) buf.writeln();\n      _packageImports.forEach(buf.writeln);\n    }\n    if (_fileImports.isNotEmpty) {\n      if (buf.isNotEmpty) buf.writeln();\n      _fileImports.forEach(buf.writeln);\n    }\n    if (_packageExports.isNotEmpty) {\n      if (buf.isNotEmpty) buf.writeln();\n      _packageExports.forEach(buf.writeln);\n    }\n    if (_fileExports.isNotEmpty) {\n      if (buf.isNotEmpty) buf.writeln();\n      _fileExports.forEach(buf.writeln);\n    }\n\n    return buf.toString();\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/lib/mixins.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n/// Provides metadata about mixins to dart-protoc-plugin.\n/// (Experimental API; subject to change.)\nlibrary;\n\nimport 'indenting_writer.dart';\n\n/// Finds [name] in the exported mixins.\nPbMixin? findMixin(String name) {\n  const exportedMixins = {'PbMapMixin': _pbMapMixin};\n  return exportedMixins[name];\n}\n\n/// PbMixin contains metadata needed by dart-protoc-plugin to apply a mixin.\n///\n/// The mixin can be applied to a message using options in dart_options.proto.\n/// Only one mixin can be applied to each message, but that mixin can depend\n/// on another mixin, recursively, similar to single inheritance.\nclass PbMixin {\n  /// The name of the mixin class to import into the .pb.dart file.\n  final String name;\n\n  /// The file that the .pb.dart file should import the symbol from.\n  final String importFrom;\n\n  /// Another mixin to apply ahead of this one, or null for none.\n  final PbMixin? parent;\n\n  /// Names that shouldn't be used by properties in the generated child class.\n  /// May be null if the mixin doesn't reserve any new names.\n  final List<String>? reservedNames;\n\n  /// Code to inject into the class using the mixin.\n  ///\n  /// Typically used for static helpers since you cannot mix in static members.\n  final List<String>? injectedHelpers;\n\n  /// The well known type name.\n  ///\n  /// Values should match enumerations in the `WellKnownType` enum from\n  /// `package:protobuf`.\n  final String? wellKnownType;\n\n  const PbMixin(\n    this.name, {\n    required this.importFrom,\n    this.parent,\n    this.reservedNames,\n    this.injectedHelpers,\n    this.wellKnownType,\n  });\n\n  /// Returns the mixin and its ancestors, in the order they should be applied.\n  Iterable<PbMixin> findMixinsToApply() {\n    final result = [this];\n    for (var p = parent; p != null; p = p.parent) {\n      result.add(p);\n    }\n    return result.reversed;\n  }\n\n  /// Returns all the reserved names, including from ancestor mixins.\n  Iterable<String> findReservedNames() {\n    final names = <String>{};\n    for (PbMixin? m = this; m != null; m = m.parent) {\n      names.add(m.name);\n      if (m.reservedNames != null) {\n        names.addAll(m.reservedNames!);\n      }\n    }\n    return names;\n  }\n\n  void injectHelpers(IndentingWriter out) {\n    if (injectedHelpers != null && injectedHelpers!.isNotEmpty) {\n      out.println(injectedHelpers!.join('\\n'));\n    }\n  }\n}\n\nconst _pbMapMixin = PbMixin(\n  'PbMapMixin',\n  importFrom: 'package:protobuf/src/protobuf/mixins/map_mixin.dart',\n  parent: _mapMixin,\n);\n\nconst List<String> _reservedNamesForMap = [\n  '[]',\n  '[]=',\n  'addAll',\n  'addEntries',\n  'cast',\n  'containsKey',\n  'containsValue',\n  'entries',\n  'forEach',\n  'isEmpty',\n  'isNotEmpty',\n  'keys',\n  'length',\n  'map',\n  'putIfAbsent',\n  'remove',\n  'removeWhere',\n  'retype',\n  'update',\n  'updateAll',\n  'values',\n];\n\nconst _mapMixin = PbMixin(\n  'MapMixin',\n  importFrom: 'dart:collection',\n  reservedNames: _reservedNamesForMap,\n);\n"
  },
  {
    "path": "protoc_plugin/lib/names.dart",
    "content": "// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:math' as math;\n\nimport 'package:protobuf/meta.dart';\n\nimport 'src/gen/dart_options.pb.dart';\nimport 'src/gen/google/protobuf/descriptor.pb.dart';\n\nclass MemberNames {\n  List<FieldNames> fieldNames;\n  List<OneofNames> oneofNames;\n  MemberNames(this.fieldNames, this.oneofNames);\n}\n\n/// The Dart member names in a GeneratedMessage subclass for one protobuf field.\nclass FieldNames {\n  /// The descriptor of the field these member names apply to.\n  final FieldDescriptorProto descriptor;\n\n  /// The index of this field in MessageGenerator.fieldList.\n  /// The same index will be stored in FieldInfo.index.\n  ///\n  /// `null` for extensions.\n  final int? index;\n\n  /// The position of this field as it appeared in the original DescriptorProto.\n  /// Used to construct metadata.\n  ///\n  /// `null` for extensions.\n  final int? sourcePosition;\n\n  /// Identifier for generated getters/setters.\n  final String fieldName;\n\n  /// Identifier for the generated hasX() method, without braces.\n  ///\n  /// `null` for repeated fields.\n  final String? hasMethodName;\n\n  /// Identifier for the generated clearX() method, without braces.\n  ///\n  /// `null` for repeated fields.\n  final String? clearMethodName;\n\n  // Identifier for the generated ensureX() method, without braces.\n  //\n  // `null` for scalar, repeated, and map fields.\n  final String? ensureMethodName;\n\n  FieldNames(\n    this.descriptor,\n    this.index,\n    this.sourcePosition,\n    this.fieldName, {\n    this.hasMethodName,\n    this.clearMethodName,\n    this.ensureMethodName,\n  });\n}\n\n/// The Dart names associated with a oneof declaration.\nclass OneofNames {\n  final OneofDescriptorProto descriptor;\n\n  /// Index in the containing type's oneof_decl list.\n  final int index;\n\n  /// Identifier for the generated whichX() method, without braces.\n  final String whichOneofMethodName;\n\n  /// Identifier for the generated clearX() method, without braces.\n  final String clearMethodName;\n\n  /// Identifier for the generated enum definition.\n  final String oneofEnumName;\n\n  /// Identifier for the _XByTag map.\n  final String byTagMapName;\n\n  OneofNames(\n    this.descriptor,\n    this.index,\n    this.clearMethodName,\n    this.whichOneofMethodName,\n    this.oneofEnumName,\n    this.byTagMapName,\n  );\n}\n\n// For performance reasons, use code units instead of Regex.\nbool _startsWithDigit(String input) =>\n    input.isNotEmpty && (input.codeUnitAt(0) ^ 0x30) <= 9;\n\n/// Move any initial underscores in [input] to the end.\n///\n/// According to the spec identifiers cannot start with _, but it seems to be\n/// accepted by protoc. These identifiers are private in Dart, so they have to\n/// be transformed.\n///\n/// If [input] starts with a digit after transformation, prefix with an 'x'.\nString avoidInitialUnderscore(String input) {\n  while (input.startsWith('_')) {\n    input = '${input.substring(1)}_';\n  }\n  if (_startsWithDigit(input)) {\n    input = 'x$input';\n  }\n  return input;\n}\n\n/// Returns [input] surrounded by single quotes and with all '$'s escaped.\nString singleQuote(String input) {\n  return \"'${input.replaceAll(r'$', r'\\$')}'\";\n}\n\n/// Chooses the Dart name of an extension.\nString extensionName(\n  FieldDescriptorProto descriptor,\n  Set<String> usedNames,\n  bool lowercaseGroupNames,\n) {\n  return _unusedMemberNames(\n    descriptor,\n    null,\n    null,\n    usedNames,\n    lowercaseGroupNames,\n  ).fieldName;\n}\n\nIterable<String> extensionSuffixes() sync* {\n  yield 'Ext';\n  var i = 2;\n  while (true) {\n    yield '$i';\n    i++;\n  }\n}\n\n/// Replaces all characters in [input] that are not valid in a dart identifier\n/// with _.\n///\n/// This function does not take care of leading underscores.\nString legalDartIdentifier(String input) {\n  return input.replaceAll(RegExp(r'[^a-zA-Z0-9$_]'), '_');\n}\n\n/// Chooses the name of the Dart class holding top-level extensions.\nString extensionClassName(\n  FileDescriptorProto descriptor,\n  Set<String> usedNames,\n) {\n  final s = avoidInitialUnderscore(\n    legalDartIdentifier(_fileNameWithoutExtension(descriptor)),\n  );\n  final candidate = '${s[0].toUpperCase()}${s.substring(1)}';\n  return disambiguateName(candidate, usedNames, extensionSuffixes());\n}\n\nString _fileNameWithoutExtension(FileDescriptorProto descriptor) {\n  final path = Uri.file(descriptor.name);\n  final fileName = path.pathSegments.last;\n  final dot = fileName.lastIndexOf('.');\n  return dot == -1 ? fileName : fileName.substring(0, dot);\n}\n\n// Exception thrown when a field has an invalid 'dart_name' option.\nclass DartNameOptionException implements Exception {\n  final String message;\n  DartNameOptionException(this.message);\n  @override\n  String toString() => message;\n}\n\n/// Returns a [name] that is not contained in [usedNames] by suffixing it with\n/// the first possible suffix from [suffixes].\n///\n/// The chosen name is added to [usedNames].\n///\n/// If [generateVariants] is given, all the variants of a name must be available\n/// before that name is chosen, and all the chosen variants will be added to\n/// [usedNames].\n/// The returned name is that, which will generate the accepted variants.\nString disambiguateName(\n  String name,\n  Set<String> usedNames,\n  Iterable<String> suffixes, {\n  List<String> Function(String candidate)? generateVariants,\n}) {\n  generateVariants ??= (String name) => <String>[name];\n\n  bool allVariantsAvailable(List<String> variants) {\n    return variants.every((String variant) => !usedNames.contains(variant));\n  }\n\n  var usedSuffix = '';\n  var candidateVariants = generateVariants(name);\n\n  if (!allVariantsAvailable(candidateVariants)) {\n    for (final suffix in suffixes) {\n      candidateVariants = generateVariants('$name$suffix');\n      if (allVariantsAvailable(candidateVariants)) {\n        usedSuffix = suffix;\n        break;\n      }\n    }\n  }\n\n  usedNames.addAll(candidateVariants);\n  return '$name$usedSuffix';\n}\n\nIterable<String> defaultSuffixes() sync* {\n  yield '_';\n  var i = 0;\n  while (true) {\n    yield '_$i';\n    i++;\n  }\n}\n\nString oneofEnumClassName(\n  String descriptorName,\n  Set<String> usedNames,\n  String parentName,\n) {\n  descriptorName = '${parentName}_${underscoresToCamelCase(descriptorName)}';\n  return disambiguateName(\n    avoidInitialUnderscore(descriptorName),\n    usedNames,\n    defaultSuffixes(),\n  );\n}\n\nString oneofEnumMemberName(String fieldName) => disambiguateName(\n  fieldName,\n  Set<String>.from(_oneofEnumMemberNames),\n  defaultSuffixes(),\n);\n\n/// Chooses the name of the Dart class to generate for a proto message or enum.\n///\n/// For a nested message or enum, [parent] should be provided\n/// with the name of the Dart class for the immediate parent.\nString messageOrEnumClassName(\n  String descriptorName,\n  Set<String> usedNames, {\n  String parent = '',\n}) {\n  if (parent != '') {\n    descriptorName = '${parent}_$descriptorName';\n  }\n  return disambiguateName(\n    avoidInitialUnderscore(descriptorName),\n    usedNames,\n    defaultSuffixes(),\n  );\n}\n\n/// Returns the set of names reserved by the ProtobufEnum class and its\n/// generated subclasses.\nfinal Set<String> reservedEnumNames = <String>{\n  ...ProtobufEnum_reservedNames,\n  ..._dartReservedWords,\n  ..._protobufEnumNames,\n};\n\nIterable<String> enumSuffixes() sync* {\n  var s = '_';\n  while (true) {\n    yield s;\n    s += '_';\n  }\n}\n\n/// Chooses the GeneratedMessage member names for each field and names\n/// associated with each oneof declaration.\n///\n/// Additional names to avoid can be supplied using [reserved].\n/// (This should only be used for mixins.)\n///\n/// Returns [MemberNames] which holds a list with [FieldNames] and a list with [OneofNames].\n///\n/// Throws [DartNameOptionException] if a field has this option and\n/// it's set to an invalid name.\nMemberNames messageMemberNames(\n  DescriptorProto descriptor,\n  String parentClassName,\n  Set<String> usedTopLevelNames, {\n  Iterable<String> reserved = const [],\n  bool lowercaseGroupNames = false,\n}) {\n  final fieldList = List<FieldDescriptorProto>.from(descriptor.field);\n  final sourcePositions = fieldList.asMap().map(\n    (index, field) => MapEntry(field.name, index),\n  );\n  final sorted =\n      fieldList..sort((FieldDescriptorProto a, FieldDescriptorProto b) {\n        if (a.number < b.number) return -1;\n        if (a.number > b.number) return 1;\n        throw 'multiple fields defined for tag ${a.number} in ${descriptor.name}';\n      });\n\n  // Choose indexes first, based on their position in the sorted list.\n  final indexes = <String, int>{};\n  for (final field in sorted) {\n    final index = indexes.length;\n    indexes[field.name] = index;\n  }\n\n  final existingNames = <String>{...reservedMemberNames, ...reserved};\n\n  final fieldNames = List<FieldNames?>.filled(indexes.length, null);\n\n  void takeFieldNames(FieldNames chosen) {\n    fieldNames[chosen.index!] = chosen;\n\n    existingNames.add(chosen.fieldName);\n    if (chosen.hasMethodName != null) {\n      existingNames.add(chosen.hasMethodName!);\n    }\n    if (chosen.clearMethodName != null) {\n      existingNames.add(chosen.clearMethodName!);\n    }\n  }\n\n  // Handle fields with a dart_name option.\n  // They have higher priority than automatically chosen names.\n  // Explicitly setting a name that's already taken is a build error.\n  for (final field in sorted) {\n    if (_nameOption(field)!.isNotEmpty) {\n      takeFieldNames(\n        _memberNamesFromOption(\n          descriptor,\n          field,\n          indexes[field.name]!,\n          sourcePositions[field.name]!,\n          existingNames,\n        ),\n      );\n    }\n  }\n\n  // Then do other fields.\n  // They are automatically renamed until we find something unused.\n  for (final field in sorted) {\n    if (_nameOption(field)!.isEmpty) {\n      final index = indexes[field.name]!;\n      final sourcePosition = sourcePositions[field.name];\n      takeFieldNames(\n        _unusedMemberNames(\n          field,\n          index,\n          sourcePosition,\n          existingNames,\n          lowercaseGroupNames,\n        ),\n      );\n    }\n  }\n\n  final oneofNames = <OneofNames>[];\n\n  void takeOneofNames(OneofNames chosen) {\n    oneofNames.add(chosen);\n    existingNames.add(chosen.whichOneofMethodName);\n    existingNames.add(chosen.clearMethodName);\n    existingNames.add(chosen.byTagMapName);\n  }\n\n  List<String> oneofNameVariants(String name) {\n    return [_defaultWhichMethodName(name), _defaultClearMethodName(name)];\n  }\n\n  final realOneofCount = countRealOneofs(descriptor);\n  for (var i = 0; i < realOneofCount; i++) {\n    final oneof = descriptor.oneofDecl[i];\n\n    final oneofName = disambiguateName(\n      underscoresToCamelCase(oneof.name),\n      existingNames,\n      defaultSuffixes(),\n      generateVariants: oneofNameVariants,\n    );\n\n    final oneofEnumName = oneofEnumClassName(\n      oneof.name,\n      usedTopLevelNames,\n      parentClassName,\n    );\n\n    final enumMapName = disambiguateName(\n      '_${oneofEnumName}ByTag',\n      existingNames,\n      defaultSuffixes(),\n    );\n\n    takeOneofNames(\n      OneofNames(\n        oneof,\n        i,\n        _defaultClearMethodName(oneofName),\n        _defaultWhichMethodName(oneofName),\n        oneofEnumName,\n        enumMapName,\n      ),\n    );\n  }\n\n  return MemberNames(fieldNames.cast<FieldNames>(), oneofNames);\n}\n\n/// Chooses the member names for a field that has the 'dart_name' option.\n///\n/// If the explicitly-set Dart name is already taken, throw an exception.\n/// (Fails the build.)\nFieldNames _memberNamesFromOption(\n  DescriptorProto message,\n  FieldDescriptorProto field,\n  int index,\n  int sourcePosition,\n  Set<String> existingNames,\n) {\n  // TODO(skybrian): provide more context in errors (filename).\n  final where = '${message.name}.${field.name}';\n\n  void checkAvailable(String name) {\n    if (existingNames.contains(name)) {\n      throw DartNameOptionException(\n        \"$where: dart_name option is invalid: '$name' is already used\",\n      );\n    }\n  }\n\n  final name = _nameOption(field)!;\n  if (name.isEmpty) {\n    throw ArgumentError(\"field doesn't have dart_name option\");\n  }\n  if (!_isDartFieldName(name)) {\n    throw DartNameOptionException(\n      '$where: dart_name option is invalid: '\n      \"'$name' is not a valid Dart field name\",\n    );\n  }\n  checkAvailable(name);\n\n  if (_isRepeated(field)) {\n    return FieldNames(field, index, sourcePosition, name);\n  }\n\n  final hasMethod = 'has${_capitalize(name)}';\n  checkAvailable(hasMethod);\n\n  final clearMethod = 'clear${_capitalize(name)}';\n  checkAvailable(clearMethod);\n\n  String? ensureMethod;\n\n  if (_isGroupOrMessage(field)) {\n    ensureMethod = 'ensure${_capitalize(name)}';\n    checkAvailable(ensureMethod);\n  }\n  return FieldNames(\n    field,\n    index,\n    sourcePosition,\n    name,\n    hasMethodName: hasMethod,\n    clearMethodName: clearMethod,\n    ensureMethodName: ensureMethod,\n  );\n}\n\nIterable<String> _memberNamesSuffix(int number) sync* {\n  var suffix = '_$number';\n  while (true) {\n    yield suffix;\n    suffix = '${suffix}_$number';\n  }\n}\n\nFieldNames _unusedMemberNames(\n  FieldDescriptorProto field,\n  int? index,\n  int? sourcePosition,\n  Set<String> existingNames,\n  bool lowercaseGroupNames,\n) {\n  if (_isRepeated(field)) {\n    return FieldNames(\n      field,\n      index,\n      sourcePosition,\n      disambiguateName(\n        _defaultFieldName(_fieldMethodSuffix(field, lowercaseGroupNames)),\n        existingNames,\n        _memberNamesSuffix(field.number),\n      ),\n    );\n  }\n\n  List<String> generateNameVariants(String name) {\n    final result = <String>[\n      _defaultFieldName(name),\n      _defaultHasMethodName(name),\n      _defaultClearMethodName(name),\n    ];\n\n    // TODO(zarah): Use 'collection if' when sdk dependency is updated.\n    if (_isGroupOrMessage(field)) result.add(_defaultEnsureMethodName(name));\n\n    return result;\n  }\n\n  final name = disambiguateName(\n    _fieldMethodSuffix(field, lowercaseGroupNames),\n    existingNames,\n    _memberNamesSuffix(field.number),\n    generateVariants: generateNameVariants,\n  );\n\n  return FieldNames(\n    field,\n    index,\n    sourcePosition,\n    avoidInitialUnderscore(_defaultFieldName(name)),\n    hasMethodName: _defaultHasMethodName(name),\n    clearMethodName: _defaultClearMethodName(name),\n    ensureMethodName:\n        _isGroupOrMessage(field) ? _defaultEnsureMethodName(name) : null,\n  );\n}\n\n/// The name to use by default for the Dart getter and setter.\n/// (A suffix will be added if there is a conflict.)\nString _defaultFieldName(String fieldMethodSuffix) =>\n    lowerCaseFirstLetter(fieldMethodSuffix);\n\nString _defaultHasMethodName(String fieldMethodSuffix) =>\n    'has$fieldMethodSuffix';\n\nString _defaultClearMethodName(String fieldMethodSuffix) =>\n    'clear$fieldMethodSuffix';\n\nString _defaultWhichMethodName(String oneofMethodSuffix) =>\n    'which$oneofMethodSuffix';\n\nString _defaultEnsureMethodName(String fieldMethodSuffix) =>\n    'ensure$fieldMethodSuffix';\n\n/// The suffix to use for this field in Dart method names.\n/// (It should be camelcase and begin with an uppercase letter.)\nString _fieldMethodSuffix(\n  FieldDescriptorProto field,\n  bool lowercaseGroupNames,\n) {\n  var name = _nameOption(field)!;\n  if (name.isNotEmpty) return _capitalize(name);\n\n  if (field.type != FieldDescriptorProto_Type.TYPE_GROUP ||\n      lowercaseGroupNames) {\n    return underscoresToCamelCase(field.name);\n  }\n\n  // For groups, use capitalization of 'typeName' rather than 'name'.\n  name = field.typeName;\n  final index = name.lastIndexOf('.');\n  if (index != -1) {\n    name = name.substring(index + 1);\n  }\n  return underscoresToCamelCase(name);\n}\n\nString underscoresToCamelCase(String s) =>\n    s.split('_').map(_capitalize).join('');\n\nString _capitalize(String s) =>\n    s.isEmpty ? s : '${s[0].toUpperCase()}${s.substring(1)}';\n\nbool _isRepeated(FieldDescriptorProto field) =>\n    field.label == FieldDescriptorProto_Label.LABEL_REPEATED;\n\nbool _isGroupOrMessage(FieldDescriptorProto field) =>\n    field.type == FieldDescriptorProto_Type.TYPE_MESSAGE ||\n    field.type == FieldDescriptorProto_Type.TYPE_GROUP;\n\nString? _nameOption(FieldDescriptorProto field) =>\n    field.options.getExtension(Dart_options.dartName) as String?;\n\nbool _isDartFieldName(String name) => name.startsWith(_dartFieldNameExpr);\n\nfinal _dartFieldNameExpr = RegExp(r'^[a-z]\\w+$');\n\n/// Names that would collide as top-level identifiers.\nfinal List<String> forbiddenTopLevelNames = <String>[\n  'List',\n  'Function',\n  'Map',\n  ..._dartReservedWords,\n];\n\nfinal List<String> reservedMemberNames = <String>[\n  ..._dartReservedWords,\n  ...GeneratedMessage_reservedNames,\n  ..._generatedMessageNames,\n];\n\nfinal List<String> forbiddenExtensionNames = <String>[\n  ..._dartReservedWords,\n  ...GeneratedMessage_reservedNames,\n  ..._generatedMessageNames,\n];\n\n// List of Dart language reserved words in names which cannot be used in a\n// subclass of GeneratedMessage.\nconst List<String> _dartReservedWords = [\n  'assert',\n  'bool',\n  'break',\n  'case',\n  'catch',\n  'class',\n  'const',\n  'continue',\n  'default',\n  'do',\n  'double',\n  'else',\n  'enum',\n  'extends',\n  'false',\n  'final',\n  'finally',\n  'for',\n  'if',\n  'in',\n  'int',\n  'is',\n  'new',\n  'null',\n  'rethrow',\n  'return',\n  'super',\n  'switch',\n  'this',\n  'throw',\n  'true',\n  'try',\n  'var',\n  'void',\n  'while',\n  'with',\n];\n\n// List of names used in the generated message classes.\n//\n// This is in addition to GeneratedMessage_reservedNames, which are names from\n// the base GeneratedMessage class determined by reflection.\nconst _generatedMessageNames = <String>[\n  'create',\n  'getDefault',\n  'List',\n  'notSet',\n];\n\n// List of names used in the generated enum classes.\n//\n// This is in addition to ProtobufEnum_reservedNames, which are names from the\n// base ProtobufEnum class determined by reflection.\nconst _protobufEnumNames = <String>['List', 'valueOf', 'values'];\n\n// List of names used in Dart enums, which can't be used as enum member names.\nconst _oneofEnumMemberNames = <String>['default', 'index', 'values'];\n\n// Count the number of 'real' oneofs - that is oneofs not created for an\n// optional proto3 field.\nint countRealOneofs(DescriptorProto descriptor) {\n  var highestIndexSeen = -1;\n  for (final field in descriptor.field) {\n    if (field.hasOneofIndex() && !field.proto3Optional) {\n      highestIndexSeen = math.max(highestIndexSeen, field.oneofIndex);\n    }\n  }\n  // The number of entries is one higher than the highest seen index.\n  return highestIndexSeen + 1;\n}\n\nString lowerCaseFirstLetter(String input) =>\n    input[0].toLowerCase() + input.substring(1);\n"
  },
  {
    "path": "protoc_plugin/lib/protoc.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert';\n\nimport 'package:protobuf/protobuf.dart';\n\nimport 'const_generator.dart' show writeJsonConst;\nimport 'indenting_writer.dart';\nimport 'mixins.dart';\nimport 'names.dart';\nimport 'src/code_generator.dart';\nimport 'src/gen/dart_options.pb.dart';\nimport 'src/gen/google/api/client.pb.dart';\nimport 'src/gen/google/protobuf/compiler/plugin.pb.dart';\nimport 'src/gen/google/protobuf/descriptor.pb.dart';\nimport 'src/gen/google/protobuf/dart_edition_defaults.pb.dart';\nimport 'src/linker.dart';\nimport 'src/options.dart';\nimport 'src/output_config.dart';\nimport 'src/shared.dart';\nimport 'string_escape.dart';\n\nexport 'src/code_generator.dart';\n\npart 'src/base_type.dart';\npart 'src/client_generator.dart';\npart 'src/enum_generator.dart';\npart 'src/extension_generator.dart';\npart 'src/file_generator.dart';\npart 'src/grpc_generator.dart';\npart 'src/message_generator.dart';\npart 'src/paths.dart';\npart 'src/protobuf_field.dart';\npart 'src/service_generator.dart';\npart 'src/well_known_types.dart';\n\nfinal FeatureSetDefaults pluginFeatureSetDefaults =\n    FeatureSetDefaults.fromBuffer(\n      base64Decode(ProtobufInternalDartEditionDefaults),\n    );\n\nconst Edition pluginMinSupportedEdition = Edition.EDITION_PROTO2;\n\nconst Edition pluginMaxSupportedEdition = Edition.EDITION_2024;\n"
  },
  {
    "path": "protoc_plugin/lib/src/base_type.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\n/// Represents the base type of a particular field in a proto definition.\n/// (Doesn't include List<> for repeated fields.)\nclass BaseType {\n  final FieldDescriptorProto_Type descriptor;\n\n  /// The name of the Dart type when in the same package.\n  final String unprefixed;\n\n  /// The suffix of the constant for this type in PbFieldType.\n  /// (For example, 'B' for boolean or '3' for int32.)\n  final String typeConstantSuffix;\n\n  // Method name of the setter method for this type.\n  final String? setter;\n\n  // The generator corresponding to this type.\n  // (Null for primitive types.)\n  final ProtobufContainer? generator;\n\n  const BaseType._raw(\n    this.descriptor,\n    this.typeConstantSuffix,\n    this.unprefixed,\n    this.setter,\n    this.generator,\n  );\n\n  bool get isGroup => descriptor == FieldDescriptorProto_Type.TYPE_GROUP;\n  bool get isMessage => descriptor == FieldDescriptorProto_Type.TYPE_MESSAGE;\n  bool get isEnum => descriptor == FieldDescriptorProto_Type.TYPE_ENUM;\n  bool get isString => descriptor == FieldDescriptorProto_Type.TYPE_STRING;\n  bool get isBytes => descriptor == FieldDescriptorProto_Type.TYPE_BYTES;\n  bool get isPackable => (generator == null && !isString && !isBytes) || isEnum;\n\n  /// The package where this type is declared.\n  /// (Always the empty string for primitive types.)\n  String get package => generator == null ? '' : generator!.package;\n\n  /// The Dart expression to use for this type when in a different file.\n  String prefixed(FileGenerator fileGen) =>\n      generator == null\n          ? unprefixed\n          : '${fileGen.importPrefix(generator!)}.$unprefixed';\n\n  /// Returns the name to use in generated code for this Dart type.\n  ///\n  /// Doesn't include the List type for repeated fields.\n  /// [FileGenerator.protoFileUri] represents the current proto file where we\n  /// are generating code.\n  /// The Dart class might be imported from a different proto file.\n  String getDartType(FileGenerator fileGen) =>\n      (fileGen.protoFileUri == generator?.fileGen?.protoFileUri)\n          ? unprefixed\n          : prefixed(fileGen);\n\n  String getRepeatedDartType(FileGenerator fileGen) =>\n      '$protobufImportPrefix.PbList<${getDartType(fileGen)}>';\n\n  String getRepeatedDartTypeIterable(FileGenerator fileGen) =>\n      '$coreImportPrefix.Iterable<${getDartType(fileGen)}>';\n\n  factory BaseType(\n    FieldDescriptorProto field,\n    FeatureSet features,\n    GenerationContext ctx,\n  ) {\n    String constSuffix;\n    FieldDescriptorProto_Type type;\n\n    switch (field.type) {\n      case FieldDescriptorProto_Type.TYPE_BOOL:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_BOOL,\n          'B',\n          '$coreImportPrefix.bool',\n          r'$_setBool',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_FLOAT:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_FLOAT,\n          'F',\n          '$coreImportPrefix.double',\n          r'$_setFloat',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_DOUBLE:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_DOUBLE,\n          'D',\n          '$coreImportPrefix.double',\n          r'$_setDouble',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_INT32:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_INT32,\n          '3',\n          '$coreImportPrefix.int',\n          r'$_setSignedInt32',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_UINT32:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_UINT32,\n          'U3',\n          '$coreImportPrefix.int',\n          r'$_setUnsignedInt32',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_SINT32:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_SINT32,\n          'S3',\n          '$coreImportPrefix.int',\n          r'$_setSignedInt32',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_FIXED32:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_FIXED32,\n          'F3',\n          '$coreImportPrefix.int',\n          r'$_setUnsignedInt32',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_SFIXED32:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_SFIXED32,\n          'SF3',\n          '$coreImportPrefix.int',\n          r'$_setSignedInt32',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_INT64:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_INT64,\n          '6',\n          '$fixnumImportPrefix.Int64',\n          r'$_setInt64',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_UINT64:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_UINT64,\n          'U6',\n          '$fixnumImportPrefix.Int64',\n          r'$_setInt64',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_SINT64:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_SINT64,\n          'S6',\n          '$fixnumImportPrefix.Int64',\n          r'$_setInt64',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_FIXED64:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_FIXED64,\n          'F6',\n          '$fixnumImportPrefix.Int64',\n          r'$_setInt64',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_SFIXED64:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_SFIXED64,\n          'SF6',\n          '$fixnumImportPrefix.Int64',\n          r'$_setInt64',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_STRING:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_STRING,\n          'S',\n          '$coreImportPrefix.String',\n          r'$_setString',\n          null,\n        );\n      case FieldDescriptorProto_Type.TYPE_BYTES:\n        return const BaseType._raw(\n          FieldDescriptorProto_Type.TYPE_BYTES,\n          'Y',\n          '$coreImportPrefix.List<$coreImportPrefix.int>',\n          r'$_setBytes',\n          null,\n        );\n\n      case FieldDescriptorProto_Type.TYPE_GROUP:\n      case FieldDescriptorProto_Type.TYPE_MESSAGE:\n        if (features.messageEncoding == FeatureSet_MessageEncoding.DELIMITED) {\n          constSuffix = 'G';\n          type = FieldDescriptorProto_Type.TYPE_GROUP;\n        } else {\n          constSuffix = 'M';\n          type = FieldDescriptorProto_Type.TYPE_MESSAGE;\n        }\n      case FieldDescriptorProto_Type.TYPE_ENUM:\n        constSuffix = 'E';\n        type = FieldDescriptorProto_Type.TYPE_ENUM;\n\n      default:\n        throw ArgumentError('unimplemented type: ${field.type.name}');\n    }\n\n    final generator = ctx.getFieldType(field.typeName);\n    if (generator == null) {\n      throw 'FAILURE: Unknown type reference ${field.typeName}';\n    }\n\n    return BaseType._raw(\n      type,\n      constSuffix,\n      generator.classname!,\n      null,\n      generator,\n    );\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/client_generator.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\nclass ClientApiGenerator {\n  // The service that this Client API connects to.\n  final ServiceGenerator service;\n  final String className;\n  final Set<String> usedMethodNames = {...reservedMemberNames};\n\n  /// Tag of `ServiceDescriptorProto.method`.\n  static const serviceDescriptorMethodTag = 2;\n\n  /// Tag of `FileDescriptorProto.service`.\n  static const fileDescriptorServiceTag = 6;\n\n  /// Index of the service in `FileDescriptorProto.service` repeated field.\n  final int _repeatedFieldIndex;\n\n  late final List<int> _serviceDescriptorPath = [\n    ...service.fileGen.fieldPath,\n    fileDescriptorServiceTag,\n    _repeatedFieldIndex,\n  ];\n\n  List<int> _methodDescriptorPath(int methodIndex) {\n    return [..._serviceDescriptorPath, serviceDescriptorMethodTag, methodIndex];\n  }\n\n  ClientApiGenerator(\n    this.service,\n    Set<String> usedNames,\n    this._repeatedFieldIndex,\n  ) : className = disambiguateName(\n        avoidInitialUnderscore(service._descriptor.name),\n        usedNames,\n        defaultSuffixes(),\n      );\n\n  // Subclasses can override this.\n  String get _clientType => '$protobufImportPrefix.RpcClient';\n\n  void generate(IndentingWriter out) {\n    final commentBlock = service.fileGen.commentBlock(_serviceDescriptorPath);\n    if (commentBlock != null) {\n      out.println(commentBlock);\n    }\n    if (service._descriptor.options.deprecated) {\n      out.println(\n        '@$coreImportPrefix.Deprecated(\\'This service is deprecated\\')',\n      );\n    }\n    out.addBlock('class ${className}Api {', '}', () {\n      out.println('final $_clientType _client;');\n      out.println();\n      out.println('${className}Api(this._client);');\n      out.println();\n\n      for (var i = 0; i < service._descriptor.method.length; i++) {\n        generateMethod(out, service._descriptor.method[i], i);\n      }\n    });\n    out.println();\n  }\n\n  // Subclasses can override this.\n  void generateMethod(\n    IndentingWriter out,\n    MethodDescriptorProto method,\n    int methodIndex,\n  ) {\n    final methodName = disambiguateName(\n      avoidInitialUnderscore(service._methodName(method.name)),\n      usedMethodNames,\n      defaultSuffixes(),\n    );\n    final inputType = service._getDartClassName(\n      method.inputType,\n      forMainFile: true,\n    );\n    final outputType = service._getDartClassName(\n      method.outputType,\n      forMainFile: true,\n    );\n    final commentBlock = service.fileGen.commentBlock(\n      _methodDescriptorPath(methodIndex),\n    );\n    if (commentBlock != null) {\n      out.println(commentBlock);\n    }\n    if (method.options.deprecated) {\n      out.println(\n        '@$coreImportPrefix.Deprecated(\\'This method is deprecated\\')',\n      );\n    }\n    out.addBlock(\n      '$asyncImportPrefix.Future<$outputType> $methodName('\n          '$protobufImportPrefix.ClientContext? ctx, $inputType request) =>',\n      ';',\n      () {\n        out.println(\n          '_client.invoke<$outputType>(ctx, \\'$className\\', '\n          '\\'${method.name}\\', request, $outputType())',\n        );\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/code_generator.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:io' hide BytesBuilder;\nimport 'dart:typed_data' show BytesBuilder;\n\nimport 'package:collection/collection.dart';\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf/protobuf.dart';\n\nimport '../names.dart' show lowerCaseFirstLetter;\nimport '../protoc.dart'\n    show\n        FileGenerator,\n        pluginFeatureSetDefaults,\n        pluginMinSupportedEdition,\n        pluginMaxSupportedEdition;\nimport 'gen/dart_options.pb.dart';\nimport 'gen/google/api/client.pb.dart';\nimport 'gen/google/protobuf/compiler/plugin.pb.dart';\nimport 'gen/google/protobuf/descriptor.pb.dart';\nimport 'linker.dart';\nimport 'options.dart';\nimport 'output_config.dart';\n\nabstract class ProtobufContainer {\n  String get package;\n  String? get classname;\n  String get fullName;\n\n  /// The field path contains the field IDs and indices (for repeated fields)\n  /// that lead to the proto member corresponding to a piece of generated code.\n  /// Repeated fields in the descriptor are further identified by the index of\n  /// the message in question.\n  /// For more information see\n  /// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto#L728\n  List<int> get fieldPath;\n\n  /// The fully qualified name with a leading '.'.\n  ///\n  /// This exists because names from protoc come like this.\n  String get dottedName => '.$fullName';\n\n  String get binaryDescriptorName =>\n      '${lowerCaseFirstLetter(classname!)}Descriptor';\n\n  /// The generator of the .pb.dart file defining this entity.\n  ///\n  /// (Represents the .pb.dart file that we need to import in order to use it.)\n  FileGenerator? get fileGen;\n\n  // The generator containing this entity.\n  ProtobufContainer? get parent;\n\n  FeatureSet get features;\n\n  /// The top-level parent of this entity, or itself if it is a top-level\n  /// entity.\n  ProtobufContainer? get toplevelParent {\n    if (parent is FileGenerator) {\n      return this;\n    }\n    return parent?.toplevelParent;\n  }\n}\n\nclass CodeGenerator {\n  final Stream<List<int>> _streamIn;\n  final IOSink _streamOut;\n\n  CodeGenerator(this._streamIn, this._streamOut);\n\n  /// Runs the code generator. The optional [optionParsers] can be used to\n  /// change how command line options are parsed (see [parseGenerationOptions]\n  /// for details), and [config] can be used to override where generated files\n  /// are created and how imports between generated files are constructed (see\n  /// [OutputConfiguration] for details).\n  Future<void> generate({\n    Map<String, SingleOptionParser>? optionParsers,\n    OutputConfiguration config = const DefaultOutputConfiguration(),\n  }) async {\n    final editionDefaults = pluginFeatureSetDefaults;\n    final extensions = ExtensionRegistry();\n    Dart_options.registerAllExtensions(extensions);\n    Client.registerAllExtensions(extensions);\n\n    final builder = await _streamIn.fold(\n      BytesBuilder(),\n      (builder, data) => builder..add(data),\n    );\n    final bytes = builder.takeBytes();\n    // Suppress CodedBufferReader builtin size limitation when reading the\n    // request; protobuf definitions can be larger than default limit of 64Mb.\n    final reader = CodedBufferReader(bytes, sizeLimit: bytes.length);\n    final request = CodeGeneratorRequest();\n    request.mergeFromCodedBufferReader(reader, extensions);\n    reader.checkLastTagWas(0);\n\n    request.protoFile.sortBy((desc) => desc.name);\n\n    final response = CodeGeneratorResponse();\n\n    // Parse the options in the request. Return the errors if any.\n    final options = parseGenerationOptions(request, response, optionParsers);\n    if (options == null) {\n      _streamOut.add(response.writeToBuffer());\n      return;\n    }\n\n    // Create a syntax tree for each .proto file given to us.\n    // (We may import it even if we don't generate the .pb.dart file.)\n    final generators = <FileGenerator>[];\n    for (final file in request.protoFile) {\n      generators.add(FileGenerator(editionDefaults, file, options));\n    }\n\n    // Collect field types and importable files.\n    link(options, generators);\n\n    // Generate the .pb.dart file if requested.\n    for (final gen in generators) {\n      final name = gen.descriptor.name;\n      if (request.fileToGenerate.contains(name)) {\n        response.file.addAll(gen.generateFiles(config));\n      }\n    }\n    response.supportedFeatures =\n        Int64(CodeGeneratorResponse_Feature.FEATURE_PROTO3_OPTIONAL.value) |\n        Int64(CodeGeneratorResponse_Feature.FEATURE_SUPPORTS_EDITIONS.value);\n    response.minimumEdition = pluginMinSupportedEdition.value;\n    response.maximumEdition = pluginMaxSupportedEdition.value;\n\n    _streamOut.add(response.writeToBuffer());\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/enum_generator.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\nclass EnumAlias {\n  final EnumValueDescriptorProto value;\n  final EnumValueDescriptorProto canonicalValue;\n  EnumAlias(this.value, this.canonicalValue);\n}\n\nclass EnumGenerator extends ProtobufContainer {\n  /// For top-level enums: [FileGenerator]. For nested enums:\n  /// [MessageGenerator].\n  @override\n  final ProtobufContainer parent;\n\n  @override\n  final FeatureSet features;\n\n  @override\n  final String classname;\n\n  @override\n  final String fullName;\n\n  final EnumDescriptorProto _descriptor;\n\n  final List<EnumValueDescriptorProto> _canonicalValues =\n      <EnumValueDescriptorProto>[];\n\n  final List<int> _originalCanonicalIndices = <int>[];\n\n  final List<EnumAlias> _aliases = <EnumAlias>[];\n\n  /// Maps the name of an enum value to the Dart name we will use for it.\n  final Map<String, String> dartNames = <String, String>{};\n\n  final List<int> _originalAliasIndices = <int>[];\n\n  final List<int> _fieldPathSegment;\n\n  @override\n  late final List<int> fieldPath = [...parent.fieldPath, ..._fieldPathSegment];\n\n  EnumGenerator._(\n    EnumDescriptorProto descriptor,\n    this.parent,\n    Set<String> usedClassNames,\n    int repeatedFieldIndex,\n    int fieldIdTag,\n  ) : _fieldPathSegment = [fieldIdTag, repeatedFieldIndex],\n      classname = messageOrEnumClassName(\n        descriptor.name,\n        usedClassNames,\n        parent: parent.classname ?? '',\n      ),\n      fullName =\n          parent.fullName == ''\n              ? descriptor.name\n              : '${parent.fullName}.${descriptor.name}',\n      _descriptor = descriptor,\n      features = resolveFeatures(parent.features, descriptor.options.features) {\n    final usedNames = {...reservedEnumNames};\n    for (var i = 0; i < descriptor.value.length; i++) {\n      final value = descriptor.value[i];\n      final canonicalValue = descriptor.value.firstWhere(\n        (v) => v.number == value.number,\n      );\n      if (value == canonicalValue) {\n        _canonicalValues.add(value);\n        _originalCanonicalIndices.add(i);\n      } else {\n        _aliases.add(EnumAlias(value, canonicalValue));\n        _originalAliasIndices.add(i);\n      }\n      dartNames[value.name] = disambiguateName(\n        avoidInitialUnderscore(value.name),\n        usedNames,\n        enumSuffixes(),\n      );\n    }\n  }\n\n  static const _topLevelFieldTag = 5;\n  static const _nestedFieldTag = 4;\n\n  EnumGenerator.topLevel(\n    EnumDescriptorProto descriptor,\n    ProtobufContainer parent,\n    Set<String> usedClassNames,\n    int repeatedFieldIndex,\n  ) : this._(\n        descriptor,\n        parent,\n        usedClassNames,\n        repeatedFieldIndex,\n        _topLevelFieldTag,\n      );\n\n  EnumGenerator.nested(\n    EnumDescriptorProto descriptor,\n    ProtobufContainer parent,\n    Set<String> usedClassNames,\n    int repeatedFieldIndex,\n  ) : this._(\n        descriptor,\n        parent,\n        usedClassNames,\n        repeatedFieldIndex,\n        _nestedFieldTag,\n      );\n\n  @override\n  String get package => parent.package;\n\n  @override\n  FileGenerator? get fileGen => parent.fileGen;\n\n  /// Make this enum available as a field type.\n  void register(GenerationContext ctx) {\n    ctx.registerFieldType(this);\n  }\n\n  /// Returns a const expression that evaluates to the JSON for this message.\n  ///\n  /// [context] represents the .pb.dart file where the expression will be used.\n  String getJsonConstant(FileGenerator context) {\n    final name = '$classname\\$json';\n    if (context.protoFileUri == fileGen!.protoFileUri) {\n      return name;\n    }\n    return '${context.importPrefix(this)}.$name';\n  }\n\n  static const int _enumValueTag = 2;\n\n  void generate(IndentingWriter out) {\n    final commentBlock = fileGen?.commentBlock(fieldPath);\n    if (commentBlock != null) {\n      out.println(commentBlock);\n    }\n    if (_descriptor.options.deprecated) {\n      out.println('@$coreImportPrefix.Deprecated(\\'This enum is deprecated\\')');\n    }\n    out.addAnnotatedBlock(\n      'class $classname extends $protobufImportPrefix.ProtobufEnum {',\n      '}\\n',\n      [\n        NamedLocation(\n          name: classname,\n          fieldPathSegment: fieldPath,\n          start: 'class '.length,\n        ),\n      ],\n      () {\n        // -----------------------------------------------------------------\n        // Define enum types.\n        final omitEnumNames = ConditionalConstDefinition('omit_enum_names');\n        for (var i = 0; i < _canonicalValues.length; i++) {\n          final val = _canonicalValues[i];\n          final name = dartNames[val.name]!;\n          out.addSuffix(\n            omitEnumNames.constFieldName,\n            omitEnumNames.constDefinition,\n          );\n          final conditionalValName = omitEnumNames.createTernary(val.name);\n          final fieldPathSegment = <int>[\n            ...fieldPath,\n            _enumValueTag,\n            _originalCanonicalIndices[i],\n          ];\n\n          final commentBlock = fileGen?.commentBlock(fieldPathSegment);\n          if (commentBlock != null) {\n            out.println(commentBlock);\n          }\n\n          if (val.options.deprecated) {\n            out.println(\n              '@$coreImportPrefix.Deprecated(\\'This enum value is deprecated\\')',\n            );\n          }\n\n          out.printlnAnnotated(\n            'static const $classname $name = '\n            '$classname._(${val.number}, $conditionalValName);',\n            [\n              NamedLocation(\n                name: name,\n                fieldPathSegment: fieldPathSegment,\n                start: 'static const $classname '.length,\n              ),\n            ],\n          );\n        }\n        if (_aliases.isNotEmpty) {\n          out.println();\n          for (var i = 0; i < _aliases.length; i++) {\n            final alias = _aliases[i];\n            final name = dartNames[alias.value.name]!;\n            out.printlnAnnotated(\n              'static const $classname $name ='\n              ' ${dartNames[alias.canonicalValue.name]};',\n              [\n                NamedLocation(\n                  name: name,\n                  fieldPathSegment: List.from(fieldPath)\n                    ..addAll([_enumValueTag, _originalAliasIndices[i]]),\n                  start: 'static const $classname '.length,\n                ),\n              ],\n            );\n          }\n        }\n        out.println();\n\n        out.println(\n          'static const $coreImportPrefix.List<$classname> values ='\n          ' <$classname> [',\n        );\n        for (final val in _canonicalValues) {\n          final name = dartNames[val.name];\n          out.println('  $name,');\n        }\n        out.println('];');\n        out.println();\n\n        var maxEnumValue = -1;\n        for (final valueDescriptor in _canonicalValues) {\n          if (valueDescriptor.number.isNegative) {\n            maxEnumValue = -1; // don't use list\n            break;\n          }\n          if (valueDescriptor.number > maxEnumValue) {\n            maxEnumValue = valueDescriptor.number;\n          }\n        }\n\n        final useList =\n            _canonicalValues.isEmpty ||\n            (maxEnumValue >= 0 &&\n                _canonicalValues.length / (maxEnumValue + 1) >= 0.7);\n\n        if (useList) {\n          out.println(\n            'static final $coreImportPrefix.List<$classname?> _byValue ='\n            ' $protobufImportPrefix.ProtobufEnum.\\$_initByValueList(values, $maxEnumValue);',\n          );\n\n          out.println(\n            'static $classname? valueOf($coreImportPrefix.int value) =>'\n            '  value < 0 || value >= _byValue.length ? null : _byValue[value];',\n          );\n        } else {\n          out.println(\n            'static final $coreImportPrefix.Map<$coreImportPrefix.int, $classname> _byValue ='\n            ' $protobufImportPrefix.ProtobufEnum.initByValue(values);',\n          );\n\n          out.println(\n            'static $classname? valueOf($coreImportPrefix.int value) =>'\n            ' _byValue[value];',\n          );\n        }\n\n        out.println();\n\n        out.println('const $classname._(super.value, super.name);');\n      },\n    );\n  }\n\n  /// Writes a Dart constant containing the JSON for the [EnumDescriptorProto].\n  void generateConstants(IndentingWriter out) {\n    final name = getJsonConstant(fileGen!);\n    final json = _descriptor.writeToJsonMap();\n\n    out.println(\n      '@$coreImportPrefix.Deprecated'\n      '(\\'Use ${toplevelParent!.binaryDescriptorName} instead\\')',\n    );\n    out.print('const $name = ');\n    writeJsonConst(out, json);\n    out.println(';');\n    out.println();\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/extension_generator.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\nclass ExtensionGenerator {\n  final FieldDescriptorProto _descriptor;\n  final ProtobufContainer _parent;\n\n  // populated by resolve()\n  late ProtobufField _field;\n  bool _resolved = false;\n  final String _extensionName;\n  String _extendedFullName = '';\n  final List<int> _fieldPathSegment;\n\n  /// See [ProtobufContainer]\n  late final List<int> fieldPath = [..._parent.fieldPath, ..._fieldPathSegment];\n\n  ExtensionGenerator._(\n    this._descriptor,\n    this._parent,\n    Set<String> usedNames,\n    int repeatedFieldIndex,\n    int fieldIdTag,\n  ) : _extensionName = extensionName(_descriptor, usedNames, false),\n      _fieldPathSegment = [fieldIdTag, repeatedFieldIndex];\n\n  static const _topLevelFieldTag = 7;\n  static const _nestedFieldTag = 6;\n\n  ExtensionGenerator.topLevel(\n    FieldDescriptorProto descriptor,\n    ProtobufContainer parent,\n    Set<String> usedNames,\n    int repeatedFieldIndex,\n  ) : this._(\n        descriptor,\n        parent,\n        usedNames,\n        repeatedFieldIndex,\n        _topLevelFieldTag,\n      );\n  ExtensionGenerator.nested(\n    FieldDescriptorProto descriptor,\n    ProtobufContainer parent,\n    Set<String> usedNames,\n    int repeatedFieldIndex,\n  ) : this._(\n        descriptor,\n        parent,\n        usedNames,\n        repeatedFieldIndex,\n        _nestedFieldTag,\n      );\n\n  void resolve(GenerationContext ctx) {\n    _field = ProtobufField.extension(_descriptor, _parent, ctx);\n    _resolved = true;\n\n    final extendedType = ctx.getFieldType(_descriptor.extendee);\n    // TODO(skybrian) When would this be null?\n    if (extendedType != null) {\n      _extendedFullName = extendedType.fullName;\n    }\n  }\n\n  String get package => _parent.package;\n\n  /// The generator of the .pb.dart file where this extension will be defined.\n  FileGenerator? get fileGen => _parent.fileGen;\n\n  FeatureSet get features => _field.features;\n\n  String get name {\n    if (!_resolved) throw StateError('resolve not called');\n    final name = _extensionName;\n    return _parent is MessageGenerator ? '${_parent.classname}.$name' : name;\n  }\n\n  bool get needsFixnumImport {\n    if (!_resolved) throw StateError('resolve not called');\n    return _field.needsFixnumImport;\n  }\n\n  /// Adds dependencies of [generate] to [imports].\n  ///\n  /// For each .pb.dart file that the generated code needs to import,\n  /// add its generator.\n  void addImportsTo(\n    Set<FileGenerator> imports,\n    Set<FileGenerator> enumImports,\n  ) {\n    if (!_resolved) throw StateError('resolve not called');\n    final typeGen = _field.baseType.generator;\n    if (typeGen is EnumGenerator) {\n      // Enums are always in a different file.\n      enumImports.add(typeGen.fileGen!);\n    } else if (typeGen != null && typeGen.fileGen != fileGen) {\n      imports.add(typeGen.fileGen!);\n    }\n  }\n\n  /// For each .pb.dart file that the generated code needs to import,\n  /// add its generator.\n  void addConstantImportsTo(Set<FileGenerator> imports) {\n    if (!_resolved) throw StateError('resolve not called');\n    // No dependencies - nothing to do.\n  }\n\n  void generate(IndentingWriter out) {\n    if (!_resolved) throw StateError('resolve not called');\n\n    final name = _extensionName;\n    final type = _field.baseType;\n    final dartType = type.getDartType(fileGen!);\n\n    final omitFieldNames = ConditionalConstDefinition('omit_field_names');\n    out.addSuffix(\n      omitFieldNames.constFieldName,\n      omitFieldNames.constDefinition,\n    );\n    final conditionalName = omitFieldNames.createTernary(_extensionName);\n    final omitMessageNames = ConditionalConstDefinition('omit_message_names');\n    out.addSuffix(\n      omitMessageNames.constFieldName,\n      omitMessageNames.constDefinition,\n    );\n    final conditionalExtendedName = omitMessageNames.createTernary(\n      _extendedFullName,\n    );\n\n    String invocation;\n    final positionals = <String>[];\n    positionals.add(conditionalExtendedName);\n    positionals.add(conditionalName);\n    positionals.add('${_field.number}');\n    positionals.add(_field.typeConstant);\n\n    final named = <String, String?>{};\n    named['protoName'] = _field.quotedProtoName;\n    if (_field.isRepeated) {\n      invocation = '$protobufImportPrefix.Extension<$dartType>.repeated';\n      named['check'] =\n          '$protobufImportPrefix.getCheckFunction(${_field.typeConstant})';\n      if (type.isMessage || type.isGroup) {\n        named['subBuilder'] = '$dartType.create';\n      } else if (type.isEnum) {\n        named['valueOf'] = '$dartType.valueOf';\n        named['enumValues'] = '$dartType.values';\n      }\n    } else {\n      invocation = '$protobufImportPrefix.Extension<$dartType>';\n      named['defaultOrMaker'] = _field.generateDefaultFunction();\n      if (type.isMessage || type.isGroup) {\n        named['subBuilder'] = '$dartType.create';\n      } else if (type.isEnum) {\n        final dartEnum = type.getDartType(fileGen!);\n        named['valueOf'] = '$dartEnum.valueOf';\n        named['enumValues'] = '$dartEnum.values';\n      }\n    }\n    final fieldDefinition = 'static final ';\n    out.printAnnotated(\n      '$fieldDefinition$name = '\n      '$invocation(${ProtobufField._formatArguments(positionals, named)});\\n',\n      [\n        NamedLocation(\n          name: name,\n          fieldPathSegment: List.from(fieldPath),\n          start: fieldDefinition.length,\n        ),\n      ],\n    );\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/file_generator.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\nfinal RegExp _dartIdentifier = RegExp(r'^\\w+$');\n\nconst String _asyncImportUrl = 'dart:async';\n\nconst String _convertImportPrefix = r'$convert';\nconst String _convertImportUrl = 'dart:convert';\n\nconst String _coreImportUrl = 'dart:core';\nconst String _grpcImportUrl = 'package:grpc/service_api.dart';\nconst String _protobufImportUrl = 'package:protobuf/protobuf.dart';\n\nconst String _typedDataImportPrefix = r'$typed_data';\nconst String _typedDataImportUrl = 'dart:typed_data';\n\n/// Generates the Dart output files for one .proto input file.\n///\n/// Outputs include .pb.dart, pbenum.dart, and .pbjson.dart.\nclass FileGenerator extends ProtobufContainer {\n  final FileDescriptorProto descriptor;\n  final GenerationOptions options;\n\n  // The relative path used to import the .proto file, as a URI.\n  final Uri protoFileUri;\n\n  final enumGenerators = <EnumGenerator>[];\n  final messageGenerators = <MessageGenerator>[];\n  final extensionGenerators = <ExtensionGenerator>[];\n  final clientApiGenerators = <ClientApiGenerator>[];\n  final serviceGenerators = <ServiceGenerator>[];\n  final grpcGenerators = <GrpcServiceGenerator>[];\n\n  /// Used to avoid collisions after names have been mangled to match the Dart\n  /// style.\n  final Set<String> usedTopLevelNames = <String>{...forbiddenTopLevelNames};\n\n  /// Used to avoid collisions in the service file after names have been mangled\n  /// to match the dart style.\n  final Set<String> usedTopLevelServiceNames = <String>{\n    ...forbiddenTopLevelNames,\n  };\n\n  final Set<String> usedExtensionNames = <String>{...forbiddenExtensionNames};\n\n  /// Whether cross-references have been resolved.\n  bool _linked = false;\n\n  final Edition edition;\n\n  @override\n  final FeatureSet features;\n\n  /// Maps imports in the current file to their import prefixes.\n  /// E.g. in `import 'x/y/z.pb.dart' as $1` this maps `x/y/z.pb.dart` to `$1`.\n  final Map<String, String> _importPrefixes = {};\n\n  /// Get the import prefix of `container` in the current file generator.\n  ///\n  /// Note that just calling this does not import the `container` in the current\n  /// file. This just assigns an prefix to the container in the current file\n  /// generator.\n  String importPrefix(ProtobufContainer container) {\n    final protoFilePath = container.fileGen!.protoFileUri.toString();\n    return _importPrefixes.putIfAbsent(\n      protoFilePath,\n      () => '\\$${_importPrefixes.length}',\n    );\n  }\n\n  FileGenerator(\n    FeatureSetDefaults editionDefaults,\n    this.descriptor,\n    this.options,\n  ) : protoFileUri = Uri.file(descriptor.name),\n      edition = _getEdition(descriptor),\n      features = resolveFeatures(\n        _getEditionDefaults(editionDefaults, _getEdition(descriptor)),\n        descriptor.options.features,\n      ) {\n    if (protoFileUri.isAbsolute) {\n      // protoc should never generate an import with an absolute path.\n      throw 'FAILURE: Import with absolute path is not supported';\n    }\n\n    final declaredMixins = _getDeclaredMixins(descriptor);\n    final defaultMixinName =\n        descriptor.options.getExtension(Dart_options.defaultMixin) as String? ??\n        '';\n    final defaultMixin =\n        declaredMixins[defaultMixinName] ?? findMixin(defaultMixinName);\n    if (defaultMixin == null && defaultMixinName.isNotEmpty) {\n      throw 'Option default_mixin on file ${descriptor.name}: Unknown mixin '\n          '$defaultMixinName';\n    }\n\n    // Load and register all enum and message types.\n    for (var i = 0; i < descriptor.enumType.length; i++) {\n      enumGenerators.add(\n        EnumGenerator.topLevel(\n          descriptor.enumType[i],\n          this,\n          usedTopLevelNames,\n          i,\n        ),\n      );\n    }\n    for (var i = 0; i < descriptor.messageType.length; i++) {\n      messageGenerators.add(\n        MessageGenerator.topLevel(\n          descriptor.messageType[i],\n          this,\n          declaredMixins,\n          defaultMixin,\n          usedTopLevelNames,\n          i,\n        ),\n      );\n    }\n    for (var i = 0; i < descriptor.extension.length; i++) {\n      extensionGenerators.add(\n        ExtensionGenerator.topLevel(\n          descriptor.extension[i],\n          this,\n          usedExtensionNames,\n          i,\n        ),\n      );\n    }\n    for (var i = 0; i < descriptor.service.length; i++) {\n      final service = descriptor.service[i];\n      if (options.useGrpc) {\n        grpcGenerators.add(GrpcServiceGenerator(service, this, i));\n      } else {\n        final serviceGen = ServiceGenerator(\n          service,\n          this,\n          usedTopLevelServiceNames,\n        );\n        serviceGenerators.add(serviceGen);\n        clientApiGenerators.add(\n          ClientApiGenerator(serviceGen, usedTopLevelNames, i),\n        );\n      }\n    }\n  }\n\n  /// Creates the fields in each message.\n  /// Resolves field types and extension targets using the supplied context.\n  void resolve(GenerationContext ctx) {\n    if (_linked) throw StateError('cross references already resolved');\n\n    for (final m in messageGenerators) {\n      m.resolve(ctx);\n    }\n    for (final x in extensionGenerators) {\n      x.resolve(ctx);\n    }\n\n    _linked = true;\n  }\n\n  @override\n  String get package => descriptor.package;\n\n  @override\n  String get classname => '';\n\n  @override\n  String get fullName => descriptor.package;\n\n  @override\n  FileGenerator get fileGen => this;\n\n  @override\n  ProtobufContainer? get parent => null;\n\n  @override\n  List<int> get fieldPath => [];\n\n  /// Generates all the Dart files for this .proto file.\n  List<CodeGeneratorResponse_File> generateFiles(OutputConfiguration config) {\n    if (!_linked) throw StateError('not linked');\n\n    CodeGeneratorResponse_File makeFile(String extension, String content) {\n      final protoUrl = Uri.file(descriptor.name);\n      final dartUrl = config.outputPathFor(protoUrl, extension);\n      return CodeGeneratorResponse_File()\n        ..name = dartUrl.path\n        ..content = content;\n    }\n\n    final mainWriter = generateMainFile(config);\n    final enumWriter = generateEnumFile(config);\n\n    final generateMetadata = options.generateMetadata;\n\n    final files = [\n      makeFile('.pb.dart', mainWriter.emitSource(format: !generateMetadata)),\n      makeFile(\n        '.pbenum.dart',\n        enumWriter.emitSource(format: !generateMetadata),\n      ),\n      // TODO(devoncarew): Consider not emitting empty json files.\n      makeFile('.pbjson.dart', generateJsonFile(config)),\n    ];\n\n    if (generateMetadata) {\n      files.addAll([\n        makeFile(\n          '.pb.dart.meta',\n          mainWriter.sourceLocationInfo.writeToJson().toString(),\n        ),\n        makeFile(\n          '.pbenum.dart.meta',\n          enumWriter.sourceLocationInfo.writeToJson().toString(),\n        ),\n      ]);\n    }\n    if (options.useGrpc) {\n      if (grpcGenerators.isNotEmpty) {\n        files.add(makeFile('.pbgrpc.dart', generateGrpcFile(config)));\n      }\n    } else {\n      if (serviceGenerators.isNotEmpty) {\n        files.add(makeFile('.pbserver.dart', generateServerFile(config)));\n      }\n    }\n\n    return files;\n  }\n\n  /// Creates an IndentingWriter with metadata generation enabled or disabled.\n  IndentingWriter makeWriter() {\n    return IndentingWriter(\n      fileName: descriptor.name,\n      generateMetadata: options.generateMetadata,\n    );\n  }\n\n  /// Returns the contents of the .pb.dart file for this .proto file.\n  IndentingWriter generateMainFile([\n    OutputConfiguration config = const DefaultOutputConfiguration(),\n  ]) {\n    if (!_linked) throw StateError('not linked');\n\n    final out = makeWriter();\n    writeMainHeader(out, config);\n\n    // Generate code.\n    for (final m in messageGenerators) {\n      m.generate(out);\n    }\n\n    // Generate code for extensions defined at top-level using a class name\n    // derived from the file name.\n    if (extensionGenerators.isNotEmpty) {\n      // TODO(antonm): do not generate a class.\n      final className = extensionClassName(descriptor, usedTopLevelNames);\n      out.addBlock('class $className {', '}\\n', () {\n        for (final x in extensionGenerators) {\n          x.generate(out);\n        }\n        out.println(\n          'static void registerAllExtensions('\n          '$protobufImportPrefix.ExtensionRegistry registry) {',\n        );\n        for (final x in extensionGenerators) {\n          out.println('  registry.add(${x.name});');\n        }\n        out.println('}');\n      });\n    }\n\n    for (final c in clientApiGenerators) {\n      c.generate(out);\n    }\n    return out;\n  }\n\n  /// Writes the header and imports for the .pb.dart file.\n  void writeMainHeader(\n    IndentingWriter out, [\n    OutputConfiguration config = const DefaultOutputConfiguration(),\n  ]) {\n    final importWriter = ImportWriter();\n\n    // We only add the dart:async import if there are generic client API\n    // generators for services in the FileDescriptorProto.\n    if (clientApiGenerators.isNotEmpty) {\n      importWriter.addImport(_asyncImportUrl, prefix: asyncImportPrefix);\n    }\n\n    importWriter.addImport(_coreImportUrl, prefix: coreImportPrefix);\n\n    if (_needsFixnumImport) {\n      importWriter.addImport(\n        'package:fixnum/fixnum.dart',\n        prefix: fixnumImportPrefix,\n      );\n    }\n\n    if (_needsProtobufImport) {\n      importWriter.addImport(_protobufImportUrl, prefix: protobufImportPrefix);\n    }\n\n    for (final libraryUri in findMixinImports()) {\n      importWriter.addImport(libraryUri, prefix: mixinImportPrefix);\n    }\n\n    // Import the .pb.dart files we depend on.\n    final imports = Set<FileGenerator>.identity();\n    final enumImports = Set<FileGenerator>.identity();\n    _findProtosToImport(imports, enumImports);\n\n    for (final target in imports) {\n      _addImport(importWriter, config, target, '.pb.dart');\n    }\n\n    for (final target in enumImports) {\n      // If we're already adding the main file (.pb.dart) as an import, we don't\n      // need to add the enums file, as that's exported from the main file.\n      if (!imports.contains(target)) {\n        _addImport(importWriter, config, target, '.pbenum.dart');\n      }\n    }\n\n    importWriter.addExport(\n      _protobufImportUrl,\n      members: ['GeneratedMessageGenericExtensions'],\n    );\n\n    for (final publicDependency in descriptor.publicDependency) {\n      _addExport(\n        importWriter,\n        config,\n        Uri.file(descriptor.dependency[publicDependency]),\n        '.pb.dart',\n      );\n    }\n\n    // Export enums in main file for backward compatibility.\n    if (hasEnums) {\n      final url = config.resolveImport(\n        protoFileUri,\n        protoFileUri,\n        '.pbenum.dart',\n      );\n      importWriter.addExport(url.toString());\n    }\n\n    // The well-known-types mixins create src/ refs into package:protobuf; we\n    // should likely refactor this so they're regular (non-src/) references.\n    //\n    // For now, we surpress the analysis warning.\n    _writeHeading(\n      out,\n      extraIgnores: {if (importWriter.hasSrcImport) 'implementation_imports'},\n    );\n\n    out.println(importWriter.emit());\n  }\n\n  bool get _needsFixnumImport {\n    for (final m in messageGenerators) {\n      if (m.needsFixnumImport) return true;\n    }\n    for (final x in extensionGenerators) {\n      if (x.needsFixnumImport) return true;\n    }\n    return false;\n  }\n\n  bool get _needsProtobufImport =>\n      messageGenerators.isNotEmpty ||\n      extensionGenerators.isNotEmpty ||\n      clientApiGenerators.isNotEmpty;\n\n  /// Returns the generator for each .pb.dart file we need to import.\n  void _findProtosToImport(\n    Set<FileGenerator> imports,\n    Set<FileGenerator> enumImports,\n  ) {\n    for (final m in messageGenerators) {\n      m.addImportsTo(imports, enumImports);\n    }\n    for (final x in extensionGenerators) {\n      x.addImportsTo(imports, enumImports);\n    }\n    // Add imports needed for client-side services.\n    for (final x in serviceGenerators) {\n      x.addImportsTo(imports);\n    }\n    // Don't need to import self. (But we may need to import the enums.)\n    imports.remove(this);\n  }\n\n  /// Returns a sorted list of imports needed to support all mixins.\n  List<String> findMixinImports() {\n    final mixins = <PbMixin>{};\n    for (final m in messageGenerators) {\n      m.addMixinsTo(mixins);\n    }\n\n    return mixins\n      .map((mixin) => mixin.importFrom)\n      .toSet()\n      .toList(growable: false)..sort();\n  }\n\n  /// Returns the contents of the .pbenum.dart file for this .proto file.\n  IndentingWriter generateEnumFile([\n    OutputConfiguration config = const DefaultOutputConfiguration(),\n  ]) {\n    if (!_linked) throw StateError('not linked');\n\n    final out = makeWriter();\n    _writeHeading(out);\n\n    final importWriter = ImportWriter();\n\n    if (hasEnums) {\n      // Make sure any other symbols in dart:core don't cause name conflicts\n      // with enums that have the same name.\n      importWriter.addImport(_coreImportUrl, prefix: coreImportPrefix);\n      importWriter.addImport(_protobufImportUrl, prefix: protobufImportPrefix);\n    }\n\n    for (final publicDependency in descriptor.publicDependency) {\n      _addExport(\n        importWriter,\n        config,\n        Uri.file(descriptor.dependency[publicDependency]),\n        '.pbenum.dart',\n      );\n    }\n\n    if (importWriter.hasImports) {\n      out.println(importWriter.emit());\n    }\n\n    for (final e in enumGenerators) {\n      e.generate(out);\n    }\n\n    for (final m in messageGenerators) {\n      m.generateEnums(out);\n    }\n\n    return out;\n  }\n\n  /// Returns the number of enum types generated in the .pbenum.dart file.\n  int get enumCount {\n    var count = enumGenerators.length;\n    for (final m in messageGenerators) {\n      count += m.enumCount;\n    }\n    return count;\n  }\n\n  /// Returns whether this proto file defines any enums (either top level or\n  /// nested within messages).\n  bool get hasEnums => enumCount > 0;\n\n  /// Returns the contents of the .pbserver.dart file for this .proto file.\n  String generateServerFile([\n    OutputConfiguration config = const DefaultOutputConfiguration(),\n  ]) {\n    if (!_linked) throw StateError('not linked');\n\n    final out = makeWriter();\n    _writeHeading(\n      out,\n      extraIgnores: {'deprecated_member_use_from_same_package'},\n    );\n\n    final importWriter = ImportWriter();\n\n    if (serviceGenerators.isNotEmpty) {\n      importWriter.addImport(_asyncImportUrl, prefix: asyncImportPrefix);\n      importWriter.addImport(_coreImportUrl, prefix: coreImportPrefix);\n      importWriter.addImport(_protobufImportUrl, prefix: protobufImportPrefix);\n    }\n\n    // Import .pb.dart files needed for requests and responses.\n    final imports = <FileGenerator>{};\n    for (final x in serviceGenerators) {\n      x.addImportsTo(imports);\n    }\n    for (final target in imports) {\n      _addImport(importWriter, config, target, '.pb.dart');\n    }\n\n    // Import .pbjson.dart file needed for $json and $messageJson.\n    if (serviceGenerators.isNotEmpty) {\n      _addImport(importWriter, config, this, '.pbjson.dart');\n    }\n\n    final url = config.resolveImport(protoFileUri, protoFileUri, '.pb.dart');\n    importWriter.addExport(url.toString());\n\n    if (importWriter.hasImports) {\n      out.println(importWriter.emit());\n    }\n\n    for (final s in serviceGenerators) {\n      s.generate(out);\n    }\n\n    return out.emitSource(format: true);\n  }\n\n  /// Returns the contents of the .pbgrpc.dart file for this .proto file.\n  String generateGrpcFile([\n    OutputConfiguration config = const DefaultOutputConfiguration(),\n  ]) {\n    if (!_linked) throw StateError('not linked');\n\n    final out = makeWriter();\n    _writeHeading(out);\n\n    final importWriter = ImportWriter();\n\n    importWriter.addImport(_asyncImportUrl, prefix: asyncImportPrefix);\n    importWriter.addImport(_coreImportUrl, prefix: coreImportPrefix);\n    importWriter.addImport(_grpcImportUrl, prefix: grpcImportPrefix);\n    importWriter.addImport(_protobufImportUrl, prefix: protobufImportPrefix);\n\n    // Import .pb.dart files needed for requests and responses.\n    final imports = <FileGenerator>{};\n    for (final generator in grpcGenerators) {\n      generator.addImportsTo(imports);\n    }\n    for (final target in imports) {\n      _addImport(importWriter, config, target, '.pb.dart');\n    }\n\n    final url = config.resolveImport(protoFileUri, protoFileUri, '.pb.dart');\n    importWriter.addExport(url.toString());\n\n    out.println(importWriter.emit());\n\n    for (final generator in grpcGenerators) {\n      generator.generate(out);\n    }\n\n    return out.emitSource(format: true);\n  }\n\n  void writeBinaryDescriptor(\n    IndentingWriter out,\n    String identifierName,\n    String name,\n    GeneratedMessage descriptor,\n  ) {\n    final base64 = base64Encode(descriptor.writeToBuffer());\n    out.println(\n      '/// Descriptor for `$name`. Decode as a '\n      '`${descriptor.info_.qualifiedMessageName}`.',\n    );\n\n    const indent = '    ';\n\n    final base64Lines = _splitString(\n      base64,\n      74,\n    ).map((s) => \"'$s'\").join('\\n$indent');\n    out.println(\n      'final $_typedDataImportPrefix.Uint8List '\n      '$identifierName = '\n      '$_convertImportPrefix.base64Decode(\\n$indent$base64Lines);',\n    );\n  }\n\n  /// Return the given [str], split into separate segments, where no segment is\n  /// longer than [segmentLength].\n  static List<String> _splitString(String str, int segmentLength) {\n    final result = <String>[];\n    while (str.length >= segmentLength) {\n      result.add(str.substring(0, segmentLength));\n      str = str.substring(segmentLength);\n    }\n    if (str.isNotEmpty) result.add(str);\n    return result;\n  }\n\n  /// Returns the contents of the .pbjson.dart file for this .proto file.\n  String generateJsonFile([\n    OutputConfiguration config = const DefaultOutputConfiguration(),\n  ]) {\n    if (!_linked) throw StateError('not linked');\n\n    final out = makeWriter();\n    _writeHeading(out, extraIgnores: {'unused_import'});\n\n    final importWriter = ImportWriter();\n    importWriter.addImport(_convertImportUrl, prefix: _convertImportPrefix);\n    importWriter.addImport(_coreImportUrl, prefix: coreImportPrefix);\n    importWriter.addImport(_typedDataImportUrl, prefix: _typedDataImportPrefix);\n\n    // Import the .pbjson.dart files we depend on.\n    final imports = _findJsonProtosToImport();\n    for (final target in imports) {\n      _addImport(importWriter, config, target, '.pbjson.dart');\n    }\n\n    out.println(importWriter.emit());\n\n    for (final e in enumGenerators) {\n      e.generateConstants(out);\n      writeBinaryDescriptor(\n        out,\n        e.binaryDescriptorName,\n        e._descriptor.name,\n        e._descriptor,\n      );\n      out.println('');\n    }\n    for (final m in messageGenerators) {\n      m.generateConstants(out);\n      writeBinaryDescriptor(\n        out,\n        m.binaryDescriptorName,\n        m._descriptor.name,\n        m._descriptor,\n      );\n      out.println('');\n    }\n    for (final s in serviceGenerators) {\n      s.generateConstants(out);\n      writeBinaryDescriptor(\n        out,\n        s.binaryDescriptorName,\n        s._descriptor.name,\n        s._descriptor,\n      );\n      out.println('');\n    }\n\n    return out.emitSource(format: true);\n  }\n\n  /// Returns the generator for each .pbjson.dart file the generated\n  /// .pbjson.dart needs to import.\n  Set<FileGenerator> _findJsonProtosToImport() {\n    final imports = Set<FileGenerator>.identity();\n    for (final m in messageGenerators) {\n      m.addConstantImportsTo(imports);\n    }\n    for (final x in extensionGenerators) {\n      x.addConstantImportsTo(imports);\n    }\n    for (final x in serviceGenerators) {\n      x.addConstantImportsTo(imports);\n    }\n    imports.remove(this); // Don't need to import self.\n    return imports;\n  }\n\n  /// Writes the header at the top of the dart file.\n  void _writeHeading(\n    IndentingWriter out, {\n    Set<String> extraIgnores = const <String>{},\n  }) {\n    final ignores = ({..._fileIgnores, ...extraIgnores}).toList()..sort();\n\n    // Group the ignores into lines not longer than 80 chars.\n    final ignorelines = <String>[];\n\n    if (ignores.isNotEmpty) {\n      ignorelines.add('// ignore_for_file: ${ignores.first}');\n\n      for (final ignore in ignores.skip(1)) {\n        if (ignorelines.last.length + ignore.length + ', '.length > 80) {\n          ignorelines.add('// ignore_for_file: $ignore');\n        } else {\n          ignorelines.add('${ignorelines.removeLast()}, $ignore');\n        }\n      }\n    }\n\n    out.println('''\n// This is a generated file - do not edit.\n//\n// Generated from ${descriptor.name}.\n\n// @dart = 3.3\n''');\n    ignorelines.forEach(out.println);\n    out.println('');\n  }\n\n  /// Writes an import of a .dart file corresponding to a .proto file.\n  /// (Possibly the same .proto file.)\n  void _addImport(\n    ImportWriter importWriter,\n    OutputConfiguration config,\n    FileGenerator target,\n    String ext,\n  ) {\n    final url = config.resolveImport(target.protoFileUri, protoFileUri, ext);\n    final import = url.toString();\n\n    // .pb.dart files should always be prefixed -- the protoFileUri check will\n    // evaluate to true not just for the main .pb.dart file based off the proto\n    // file, but also for the .pbserver.dart, .pbgrpc.dart files.\n    if (ext == '.pb.dart' || protoFileUri != target.protoFileUri) {\n      importWriter.addImport(import, prefix: fileGen.importPrefix(target));\n    } else {\n      importWriter.addImport(import);\n    }\n  }\n\n  /// Writes an export of a pb.dart file corresponding to a .proto file.\n  /// (Possibly the same .proto file.)\n  void _addExport(\n    ImportWriter importWriter,\n    OutputConfiguration config,\n    Uri target,\n    String ext,\n  ) {\n    final url = config.resolveImport(target, protoFileUri, ext);\n    importWriter.addExport(url.toString());\n  }\n}\n\nclass ConditionalConstDefinition {\n  final String envName;\n  final String constFieldName;\n\n  ConditionalConstDefinition(this.envName)\n    : constFieldName = _convertToCamelCase(envName);\n\n  String get constDefinition {\n    return 'const $coreImportPrefix.bool $constFieldName = '\n        \"$coreImportPrefix.bool.fromEnvironment(${quoted('protobuf.$envName')});\";\n  }\n\n  String createTernary(String ifFalse) {\n    return \"$constFieldName ? '' : ${quoted(ifFalse)}\";\n  }\n\n  // Convert foo_bar_baz to _fooBarBaz.\n  static String _convertToCamelCase(String lowerUnderscoreCase) {\n    final parts = lowerUnderscoreCase.split('_');\n    final rest =\n        parts.skip(1).map((item) {\n          return item.substring(0, 1).toUpperCase() + item.substring(1);\n        }).join();\n    return '_${parts.first}$rest';\n  }\n}\n\nEdition _getEdition(FileDescriptorProto file) {\n  if (file.edition != Edition.EDITION_UNKNOWN) {\n    return file.edition;\n  }\n  if (file.syntax == 'proto3') {\n    return Edition.EDITION_PROTO3;\n  }\n  return Edition.EDITION_PROTO2;\n}\n\nFeatureSet resolveFeatures(FeatureSet parent, FeatureSet child) {\n  final result = parent.deepCopy();\n  result.mergeFromMessage(child);\n  return result;\n}\n\nFeatureSet _getEditionDefaults(\n  FeatureSetDefaults editionDefaults,\n  Edition edition,\n) {\n  if (edition.value < editionDefaults.minimumEdition.value) {\n    throw ArgumentError(\n      'Edition $edition is earlier than the minimum supported edition ${editionDefaults.minimumEdition}!',\n    );\n  }\n  if (edition.value > editionDefaults.maximumEdition.value) {\n    throw ArgumentError(\n      'Edition $edition is later than the maximum supported edition ${editionDefaults.maximumEdition}!',\n    );\n  }\n  FeatureSetDefaults_FeatureSetEditionDefault? found;\n  for (final d in editionDefaults.defaults) {\n    if (d.edition.value > edition.value) {\n      break;\n    }\n    found = d;\n  }\n  if (found == null) {\n    throw ArgumentError('No default found for edition $edition!');\n  }\n  final defaults = found.fixedFeatures.deepCopy();\n  defaults.mergeFromMessage(found.overridableFeatures);\n  return defaults;\n}\n\n/// Reads and the declared mixins in the file, keyed by name.\n///\n/// Performs some basic validation on declared mixins, e.g. whether names\n/// are valid dart identifiers and whether there are cycles in the `parent`\n/// hierarchy.\n/// Does not check for existence of import files or classes.\nMap<String, PbMixin> _getDeclaredMixins(FileDescriptorProto desc) {\n  String mixinError(String error) => 'Option \"mixins\" in ${desc.name}: $error';\n\n  if (!desc.hasOptions() || !desc.options.hasExtension(Dart_options.imports)) {\n    return <String, PbMixin>{};\n  }\n  final dartMixins = <String, DartMixin>{};\n  final importedMixins =\n      desc.options.getExtension(Dart_options.imports) as Imports;\n  for (final mixin in importedMixins.mixins) {\n    if (dartMixins.containsKey(mixin.name)) {\n      throw mixinError('Duplicate mixin name: \"${mixin.name}\"');\n    }\n    if (!mixin.name.startsWith(_dartIdentifier)) {\n      throw mixinError('\"${mixin.name}\" is not a valid dart class identifier');\n    }\n    if (mixin.hasParent() && !mixin.parent.startsWith(_dartIdentifier)) {\n      throw mixinError(\n        'Mixin parent \"${mixin.parent}\" of \"${mixin.name}\" is '\n        'not a valid dart class identifier',\n      );\n    }\n    dartMixins[mixin.name] = mixin;\n  }\n\n  // Detect cycles and unknown parents.\n  for (final mixin in dartMixins.values) {\n    if (!mixin.hasParent()) continue;\n    var currentMixin = mixin;\n    final parentChain = <String>[];\n    while (currentMixin.hasParent()) {\n      final parentName = currentMixin.parent;\n\n      final declaredMixin = dartMixins.containsKey(parentName);\n      final internalMixin = !declaredMixin && findMixin(parentName) != null;\n\n      if (internalMixin) break; // No further validation of parent chain.\n\n      if (!declaredMixin) {\n        throw mixinError(\n          'Unknown mixin parent \"${mixin.parent}\" of '\n          '\"${currentMixin.name}\"',\n        );\n      }\n\n      if (parentChain.contains(parentName)) {\n        final cycle = '${parentChain.join('->')}->$parentName';\n        throw mixinError('Cycle in parent chain: $cycle');\n      }\n      parentChain.add(parentName);\n      currentMixin = dartMixins[parentName]!;\n    }\n  }\n\n  // Turn DartMixins into PbMixins.\n  final pbMixins = <String, PbMixin>{};\n  PbMixin? resolveMixin(String name) {\n    if (pbMixins.containsKey(name)) return pbMixins[name];\n    if (dartMixins.containsKey(name)) {\n      final dartMixin = dartMixins[name]!;\n      final pbMixin = PbMixin(\n        dartMixin.name,\n        importFrom: dartMixin.importFrom,\n        parent: resolveMixin(dartMixin.parent),\n      );\n      pbMixins[name] = pbMixin;\n      return pbMixin;\n    }\n    return findMixin(name);\n  }\n\n  for (final mixin in dartMixins.values) {\n    resolveMixin(mixin.name);\n  }\n  return pbMixins;\n}\n\nconst _fileIgnores = {\n  'annotate_overrides',\n  'camel_case_types',\n  'comment_references',\n  'constant_identifier_names',\n  'curly_braces_in_flow_control_structures',\n  'deprecated_member_use_from_same_package',\n  'library_prefixes',\n  'non_constant_identifier_names',\n  'prefer_relative_imports',\n};\n"
  },
  {
    "path": "protoc_plugin/lib/src/formatter.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:dart_style/dart_style.dart';\nimport 'package:pub_semver/pub_semver.dart';\n\n// Note: keep this in sync with the SDK constraint in pubspec.yaml.\nfinal Version formatUsingVersion = Version(3, 7, 0);\n\nfinal DartFormatter _formatter = DartFormatter(\n  languageVersion: formatUsingVersion,\n);\n\n/// Return the Dart formatted version of the given source.\nString format(String source) => _formatter.format(source);\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/dart_options.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from dart_options.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// A mixin that can be used in the 'with' clause of the generated Dart class\n/// for a proto message.\nclass DartMixin extends $pb.GeneratedMessage {\n  factory DartMixin({\n    $core.String? name,\n    $core.String? importFrom,\n    $core.String? parent,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (importFrom != null) result.importFrom = importFrom;\n    if (parent != null) result.parent = parent;\n    return result;\n  }\n\n  DartMixin._();\n\n  factory DartMixin.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory DartMixin.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'DartMixin',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'dart_options'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aOS(2, _omitFieldNames ? '' : 'importFrom')\n    ..aOS(3, _omitFieldNames ? '' : 'parent')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DartMixin clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DartMixin copyWith(void Function(DartMixin) updates) =>\n      super.copyWith((message) => updates(message as DartMixin)) as DartMixin;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static DartMixin create() => DartMixin._();\n  @$core.override\n  DartMixin createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static DartMixin getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<DartMixin>(create);\n  static DartMixin? _defaultInstance;\n\n  /// The name of the mixin class.\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// A URI pointing to the Dart library that defines the mixin.\n  /// The generated Dart code will use this in an import statement.\n  @$pb.TagNumber(2)\n  $core.String get importFrom => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set importFrom($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasImportFrom() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearImportFrom() => $_clearField(2);\n\n  /// The name of another mixin to be applied ahead of this one.\n  /// The generated class for the message will inherit from all mixins\n  /// in the parent chain.\n  @$pb.TagNumber(3)\n  $core.String get parent => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set parent($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasParent() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearParent() => $_clearField(3);\n}\n\n/// Defines additional Dart imports to be used with messages in this file.\nclass Imports extends $pb.GeneratedMessage {\n  factory Imports({\n    $core.Iterable<DartMixin>? mixins,\n  }) {\n    final result = create();\n    if (mixins != null) result.mixins.addAll(mixins);\n    return result;\n  }\n\n  Imports._();\n\n  factory Imports.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Imports.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Imports',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'dart_options'),\n      createEmptyInstance: create)\n    ..pPM<DartMixin>(1, _omitFieldNames ? '' : 'mixins',\n        subBuilder: DartMixin.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Imports clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Imports copyWith(void Function(Imports) updates) =>\n      super.copyWith((message) => updates(message as Imports)) as Imports;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Imports create() => Imports._();\n  @$core.override\n  Imports createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Imports getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Imports>(create);\n  static Imports? _defaultInstance;\n\n  /// Mixins to be used on messages in this file.\n  /// These mixins are in addition to internally defined mixins (e.g PbMapMixin)\n  /// and may override them.\n  ///\n  /// Warning: mixins are experimental. The protoc Dart plugin doesn't check\n  /// for name conflicts between mixin class members and generated class members,\n  /// so the generated code may contain errors. Therefore, running dartanalyzer\n  /// on the generated file is a good idea.\n  @$pb.TagNumber(1)\n  $pb.PbList<DartMixin> get mixins => $_getList(0);\n}\n\nclass Dart_options {\n  static final imports = $pb.Extension<Imports>(\n      _omitMessageNames ? '' : 'google.protobuf.FileOptions',\n      _omitFieldNames ? '' : 'imports',\n      28125061,\n      $pb.PbFieldType.OM,\n      defaultOrMaker: Imports.getDefault,\n      subBuilder: Imports.create);\n  static final defaultMixin = $pb.Extension<$core.String>(\n      _omitMessageNames ? '' : 'google.protobuf.FileOptions',\n      _omitFieldNames ? '' : 'defaultMixin',\n      96128839,\n      $pb.PbFieldType.OS);\n  static final mixin = $pb.Extension<$core.String>(\n      _omitMessageNames ? '' : 'google.protobuf.MessageOptions',\n      _omitFieldNames ? '' : 'mixin',\n      96128839,\n      $pb.PbFieldType.OS);\n  static final overrideGetter = $pb.Extension<$core.bool>(\n      _omitMessageNames ? '' : 'google.protobuf.FieldOptions',\n      _omitFieldNames ? '' : 'overrideGetter',\n      28205290,\n      $pb.PbFieldType.OB);\n  static final overrideSetter = $pb.Extension<$core.bool>(\n      _omitMessageNames ? '' : 'google.protobuf.FieldOptions',\n      _omitFieldNames ? '' : 'overrideSetter',\n      28937366,\n      $pb.PbFieldType.OB);\n  static final overrideHasMethod = $pb.Extension<$core.bool>(\n      _omitMessageNames ? '' : 'google.protobuf.FieldOptions',\n      _omitFieldNames ? '' : 'overrideHasMethod',\n      28937461,\n      $pb.PbFieldType.OB);\n  static final overrideClearMethod = $pb.Extension<$core.bool>(\n      _omitMessageNames ? '' : 'google.protobuf.FieldOptions',\n      _omitFieldNames ? '' : 'overrideClearMethod',\n      28907907,\n      $pb.PbFieldType.OB);\n  static final dartName = $pb.Extension<$core.String>(\n      _omitMessageNames ? '' : 'google.protobuf.FieldOptions',\n      _omitFieldNames ? '' : 'dartName',\n      28700919,\n      $pb.PbFieldType.OS);\n  static void registerAllExtensions($pb.ExtensionRegistry registry) {\n    registry.add(imports);\n    registry.add(defaultMixin);\n    registry.add(mixin);\n    registry.add(overrideGetter);\n    registry.add(overrideSetter);\n    registry.add(overrideHasMethod);\n    registry.add(overrideClearMethod);\n    registry.add(dartName);\n  }\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/dart_options.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from dart_options.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/api/client.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/api/client.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\nimport 'package:protobuf/well_known_types/google/protobuf/duration.pb.dart'\n    as $0;\n\nimport 'client.pbenum.dart';\nimport 'launch_stage.pbenum.dart' as $1;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'client.pbenum.dart';\n\n/// Required information for every language.\nclass CommonLanguageSettings extends $pb.GeneratedMessage {\n  factory CommonLanguageSettings({\n    @$core.Deprecated('This field is deprecated.')\n    $core.String? referenceDocsUri,\n    $core.Iterable<ClientLibraryDestination>? destinations,\n    SelectiveGapicGeneration? selectiveGapicGeneration,\n  }) {\n    final result = create();\n    if (referenceDocsUri != null) result.referenceDocsUri = referenceDocsUri;\n    if (destinations != null) result.destinations.addAll(destinations);\n    if (selectiveGapicGeneration != null)\n      result.selectiveGapicGeneration = selectiveGapicGeneration;\n    return result;\n  }\n\n  CommonLanguageSettings._();\n\n  factory CommonLanguageSettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CommonLanguageSettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CommonLanguageSettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'referenceDocsUri')\n    ..pc<ClientLibraryDestination>(\n        2, _omitFieldNames ? '' : 'destinations', $pb.PbFieldType.KE,\n        valueOf: ClientLibraryDestination.valueOf,\n        enumValues: ClientLibraryDestination.values,\n        defaultEnumValue:\n            ClientLibraryDestination.CLIENT_LIBRARY_DESTINATION_UNSPECIFIED)\n    ..aOM<SelectiveGapicGeneration>(\n        3, _omitFieldNames ? '' : 'selectiveGapicGeneration',\n        subBuilder: SelectiveGapicGeneration.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CommonLanguageSettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CommonLanguageSettings copyWith(\n          void Function(CommonLanguageSettings) updates) =>\n      super.copyWith((message) => updates(message as CommonLanguageSettings))\n          as CommonLanguageSettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CommonLanguageSettings create() => CommonLanguageSettings._();\n  @$core.override\n  CommonLanguageSettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CommonLanguageSettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CommonLanguageSettings>(create);\n  static CommonLanguageSettings? _defaultInstance;\n\n  /// Link to automatically generated reference documentation.  Example:\n  /// https://cloud.google.com/nodejs/docs/reference/asset/latest\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(1)\n  $core.String get referenceDocsUri => $_getSZ(0);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(1)\n  set referenceDocsUri($core.String value) => $_setString(0, value);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(1)\n  $core.bool hasReferenceDocsUri() => $_has(0);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(1)\n  void clearReferenceDocsUri() => $_clearField(1);\n\n  /// The destination where API teams want this client library to be published.\n  @$pb.TagNumber(2)\n  $pb.PbList<ClientLibraryDestination> get destinations => $_getList(1);\n\n  /// Configuration for which RPCs should be generated in the GAPIC client.\n  @$pb.TagNumber(3)\n  SelectiveGapicGeneration get selectiveGapicGeneration => $_getN(2);\n  @$pb.TagNumber(3)\n  set selectiveGapicGeneration(SelectiveGapicGeneration value) =>\n      $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasSelectiveGapicGeneration() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearSelectiveGapicGeneration() => $_clearField(3);\n  @$pb.TagNumber(3)\n  SelectiveGapicGeneration ensureSelectiveGapicGeneration() => $_ensure(2);\n}\n\n/// Details about how and where to publish client libraries.\nclass ClientLibrarySettings extends $pb.GeneratedMessage {\n  factory ClientLibrarySettings({\n    $core.String? version,\n    $1.LaunchStage? launchStage,\n    $core.bool? restNumericEnums,\n    JavaSettings? javaSettings,\n    CppSettings? cppSettings,\n    PhpSettings? phpSettings,\n    PythonSettings? pythonSettings,\n    NodeSettings? nodeSettings,\n    DotnetSettings? dotnetSettings,\n    RubySettings? rubySettings,\n    GoSettings? goSettings,\n  }) {\n    final result = create();\n    if (version != null) result.version = version;\n    if (launchStage != null) result.launchStage = launchStage;\n    if (restNumericEnums != null) result.restNumericEnums = restNumericEnums;\n    if (javaSettings != null) result.javaSettings = javaSettings;\n    if (cppSettings != null) result.cppSettings = cppSettings;\n    if (phpSettings != null) result.phpSettings = phpSettings;\n    if (pythonSettings != null) result.pythonSettings = pythonSettings;\n    if (nodeSettings != null) result.nodeSettings = nodeSettings;\n    if (dotnetSettings != null) result.dotnetSettings = dotnetSettings;\n    if (rubySettings != null) result.rubySettings = rubySettings;\n    if (goSettings != null) result.goSettings = goSettings;\n    return result;\n  }\n\n  ClientLibrarySettings._();\n\n  factory ClientLibrarySettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ClientLibrarySettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ClientLibrarySettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'version')\n    ..aE<$1.LaunchStage>(2, _omitFieldNames ? '' : 'launchStage',\n        enumValues: $1.LaunchStage.values)\n    ..aOB(3, _omitFieldNames ? '' : 'restNumericEnums')\n    ..aOM<JavaSettings>(21, _omitFieldNames ? '' : 'javaSettings',\n        subBuilder: JavaSettings.create)\n    ..aOM<CppSettings>(22, _omitFieldNames ? '' : 'cppSettings',\n        subBuilder: CppSettings.create)\n    ..aOM<PhpSettings>(23, _omitFieldNames ? '' : 'phpSettings',\n        subBuilder: PhpSettings.create)\n    ..aOM<PythonSettings>(24, _omitFieldNames ? '' : 'pythonSettings',\n        subBuilder: PythonSettings.create)\n    ..aOM<NodeSettings>(25, _omitFieldNames ? '' : 'nodeSettings',\n        subBuilder: NodeSettings.create)\n    ..aOM<DotnetSettings>(26, _omitFieldNames ? '' : 'dotnetSettings',\n        subBuilder: DotnetSettings.create)\n    ..aOM<RubySettings>(27, _omitFieldNames ? '' : 'rubySettings',\n        subBuilder: RubySettings.create)\n    ..aOM<GoSettings>(28, _omitFieldNames ? '' : 'goSettings',\n        subBuilder: GoSettings.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ClientLibrarySettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ClientLibrarySettings copyWith(\n          void Function(ClientLibrarySettings) updates) =>\n      super.copyWith((message) => updates(message as ClientLibrarySettings))\n          as ClientLibrarySettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ClientLibrarySettings create() => ClientLibrarySettings._();\n  @$core.override\n  ClientLibrarySettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ClientLibrarySettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ClientLibrarySettings>(create);\n  static ClientLibrarySettings? _defaultInstance;\n\n  /// Version of the API to apply these settings to. This is the full protobuf\n  /// package for the API, ending in the version element.\n  /// Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".\n  @$pb.TagNumber(1)\n  $core.String get version => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set version($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasVersion() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearVersion() => $_clearField(1);\n\n  /// Launch stage of this version of the API.\n  @$pb.TagNumber(2)\n  $1.LaunchStage get launchStage => $_getN(1);\n  @$pb.TagNumber(2)\n  set launchStage($1.LaunchStage value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasLaunchStage() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearLaunchStage() => $_clearField(2);\n\n  /// When using transport=rest, the client request will encode enums as\n  /// numbers rather than strings.\n  @$pb.TagNumber(3)\n  $core.bool get restNumericEnums => $_getBF(2);\n  @$pb.TagNumber(3)\n  set restNumericEnums($core.bool value) => $_setBool(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasRestNumericEnums() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearRestNumericEnums() => $_clearField(3);\n\n  /// Settings for legacy Java features, supported in the Service YAML.\n  @$pb.TagNumber(21)\n  JavaSettings get javaSettings => $_getN(3);\n  @$pb.TagNumber(21)\n  set javaSettings(JavaSettings value) => $_setField(21, value);\n  @$pb.TagNumber(21)\n  $core.bool hasJavaSettings() => $_has(3);\n  @$pb.TagNumber(21)\n  void clearJavaSettings() => $_clearField(21);\n  @$pb.TagNumber(21)\n  JavaSettings ensureJavaSettings() => $_ensure(3);\n\n  /// Settings for C++ client libraries.\n  @$pb.TagNumber(22)\n  CppSettings get cppSettings => $_getN(4);\n  @$pb.TagNumber(22)\n  set cppSettings(CppSettings value) => $_setField(22, value);\n  @$pb.TagNumber(22)\n  $core.bool hasCppSettings() => $_has(4);\n  @$pb.TagNumber(22)\n  void clearCppSettings() => $_clearField(22);\n  @$pb.TagNumber(22)\n  CppSettings ensureCppSettings() => $_ensure(4);\n\n  /// Settings for PHP client libraries.\n  @$pb.TagNumber(23)\n  PhpSettings get phpSettings => $_getN(5);\n  @$pb.TagNumber(23)\n  set phpSettings(PhpSettings value) => $_setField(23, value);\n  @$pb.TagNumber(23)\n  $core.bool hasPhpSettings() => $_has(5);\n  @$pb.TagNumber(23)\n  void clearPhpSettings() => $_clearField(23);\n  @$pb.TagNumber(23)\n  PhpSettings ensurePhpSettings() => $_ensure(5);\n\n  /// Settings for Python client libraries.\n  @$pb.TagNumber(24)\n  PythonSettings get pythonSettings => $_getN(6);\n  @$pb.TagNumber(24)\n  set pythonSettings(PythonSettings value) => $_setField(24, value);\n  @$pb.TagNumber(24)\n  $core.bool hasPythonSettings() => $_has(6);\n  @$pb.TagNumber(24)\n  void clearPythonSettings() => $_clearField(24);\n  @$pb.TagNumber(24)\n  PythonSettings ensurePythonSettings() => $_ensure(6);\n\n  /// Settings for Node client libraries.\n  @$pb.TagNumber(25)\n  NodeSettings get nodeSettings => $_getN(7);\n  @$pb.TagNumber(25)\n  set nodeSettings(NodeSettings value) => $_setField(25, value);\n  @$pb.TagNumber(25)\n  $core.bool hasNodeSettings() => $_has(7);\n  @$pb.TagNumber(25)\n  void clearNodeSettings() => $_clearField(25);\n  @$pb.TagNumber(25)\n  NodeSettings ensureNodeSettings() => $_ensure(7);\n\n  /// Settings for .NET client libraries.\n  @$pb.TagNumber(26)\n  DotnetSettings get dotnetSettings => $_getN(8);\n  @$pb.TagNumber(26)\n  set dotnetSettings(DotnetSettings value) => $_setField(26, value);\n  @$pb.TagNumber(26)\n  $core.bool hasDotnetSettings() => $_has(8);\n  @$pb.TagNumber(26)\n  void clearDotnetSettings() => $_clearField(26);\n  @$pb.TagNumber(26)\n  DotnetSettings ensureDotnetSettings() => $_ensure(8);\n\n  /// Settings for Ruby client libraries.\n  @$pb.TagNumber(27)\n  RubySettings get rubySettings => $_getN(9);\n  @$pb.TagNumber(27)\n  set rubySettings(RubySettings value) => $_setField(27, value);\n  @$pb.TagNumber(27)\n  $core.bool hasRubySettings() => $_has(9);\n  @$pb.TagNumber(27)\n  void clearRubySettings() => $_clearField(27);\n  @$pb.TagNumber(27)\n  RubySettings ensureRubySettings() => $_ensure(9);\n\n  /// Settings for Go client libraries.\n  @$pb.TagNumber(28)\n  GoSettings get goSettings => $_getN(10);\n  @$pb.TagNumber(28)\n  set goSettings(GoSettings value) => $_setField(28, value);\n  @$pb.TagNumber(28)\n  $core.bool hasGoSettings() => $_has(10);\n  @$pb.TagNumber(28)\n  void clearGoSettings() => $_clearField(28);\n  @$pb.TagNumber(28)\n  GoSettings ensureGoSettings() => $_ensure(10);\n}\n\n/// This message configures the settings for publishing [Google Cloud Client\n/// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)\n/// generated from the service config.\nclass Publishing extends $pb.GeneratedMessage {\n  factory Publishing({\n    $core.Iterable<MethodSettings>? methodSettings,\n    $core.String? newIssueUri,\n    $core.String? documentationUri,\n    $core.String? apiShortName,\n    $core.String? githubLabel,\n    $core.Iterable<$core.String>? codeownerGithubTeams,\n    $core.String? docTagPrefix,\n    ClientLibraryOrganization? organization,\n    $core.Iterable<ClientLibrarySettings>? librarySettings,\n    $core.String? protoReferenceDocumentationUri,\n    $core.String? restReferenceDocumentationUri,\n  }) {\n    final result = create();\n    if (methodSettings != null) result.methodSettings.addAll(methodSettings);\n    if (newIssueUri != null) result.newIssueUri = newIssueUri;\n    if (documentationUri != null) result.documentationUri = documentationUri;\n    if (apiShortName != null) result.apiShortName = apiShortName;\n    if (githubLabel != null) result.githubLabel = githubLabel;\n    if (codeownerGithubTeams != null)\n      result.codeownerGithubTeams.addAll(codeownerGithubTeams);\n    if (docTagPrefix != null) result.docTagPrefix = docTagPrefix;\n    if (organization != null) result.organization = organization;\n    if (librarySettings != null) result.librarySettings.addAll(librarySettings);\n    if (protoReferenceDocumentationUri != null)\n      result.protoReferenceDocumentationUri = protoReferenceDocumentationUri;\n    if (restReferenceDocumentationUri != null)\n      result.restReferenceDocumentationUri = restReferenceDocumentationUri;\n    return result;\n  }\n\n  Publishing._();\n\n  factory Publishing.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Publishing.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Publishing',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..pPM<MethodSettings>(2, _omitFieldNames ? '' : 'methodSettings',\n        subBuilder: MethodSettings.create)\n    ..aOS(101, _omitFieldNames ? '' : 'newIssueUri')\n    ..aOS(102, _omitFieldNames ? '' : 'documentationUri')\n    ..aOS(103, _omitFieldNames ? '' : 'apiShortName')\n    ..aOS(104, _omitFieldNames ? '' : 'githubLabel')\n    ..pPS(105, _omitFieldNames ? '' : 'codeownerGithubTeams')\n    ..aOS(106, _omitFieldNames ? '' : 'docTagPrefix')\n    ..aE<ClientLibraryOrganization>(107, _omitFieldNames ? '' : 'organization',\n        enumValues: ClientLibraryOrganization.values)\n    ..pPM<ClientLibrarySettings>(109, _omitFieldNames ? '' : 'librarySettings',\n        subBuilder: ClientLibrarySettings.create)\n    ..aOS(110, _omitFieldNames ? '' : 'protoReferenceDocumentationUri')\n    ..aOS(111, _omitFieldNames ? '' : 'restReferenceDocumentationUri')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Publishing clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Publishing copyWith(void Function(Publishing) updates) =>\n      super.copyWith((message) => updates(message as Publishing)) as Publishing;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Publishing create() => Publishing._();\n  @$core.override\n  Publishing createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Publishing getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<Publishing>(create);\n  static Publishing? _defaultInstance;\n\n  /// A list of API method settings, e.g. the behavior for methods that use the\n  /// long-running operation pattern.\n  @$pb.TagNumber(2)\n  $pb.PbList<MethodSettings> get methodSettings => $_getList(0);\n\n  /// Link to a *public* URI where users can report issues.  Example:\n  /// https://issuetracker.google.com/issues/new?component=190865&template=1161103\n  @$pb.TagNumber(101)\n  $core.String get newIssueUri => $_getSZ(1);\n  @$pb.TagNumber(101)\n  set newIssueUri($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(101)\n  $core.bool hasNewIssueUri() => $_has(1);\n  @$pb.TagNumber(101)\n  void clearNewIssueUri() => $_clearField(101);\n\n  /// Link to product home page.  Example:\n  /// https://cloud.google.com/asset-inventory/docs/overview\n  @$pb.TagNumber(102)\n  $core.String get documentationUri => $_getSZ(2);\n  @$pb.TagNumber(102)\n  set documentationUri($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(102)\n  $core.bool hasDocumentationUri() => $_has(2);\n  @$pb.TagNumber(102)\n  void clearDocumentationUri() => $_clearField(102);\n\n  /// Used as a tracking tag when collecting data about the APIs developer\n  /// relations artifacts like docs, packages delivered to package managers,\n  /// etc.  Example: \"speech\".\n  @$pb.TagNumber(103)\n  $core.String get apiShortName => $_getSZ(3);\n  @$pb.TagNumber(103)\n  set apiShortName($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(103)\n  $core.bool hasApiShortName() => $_has(3);\n  @$pb.TagNumber(103)\n  void clearApiShortName() => $_clearField(103);\n\n  /// GitHub label to apply to issues and pull requests opened for this API.\n  @$pb.TagNumber(104)\n  $core.String get githubLabel => $_getSZ(4);\n  @$pb.TagNumber(104)\n  set githubLabel($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(104)\n  $core.bool hasGithubLabel() => $_has(4);\n  @$pb.TagNumber(104)\n  void clearGithubLabel() => $_clearField(104);\n\n  /// GitHub teams to be added to CODEOWNERS in the directory in GitHub\n  /// containing source code for the client libraries for this API.\n  @$pb.TagNumber(105)\n  $pb.PbList<$core.String> get codeownerGithubTeams => $_getList(5);\n\n  /// A prefix used in sample code when demarking regions to be included in\n  /// documentation.\n  @$pb.TagNumber(106)\n  $core.String get docTagPrefix => $_getSZ(6);\n  @$pb.TagNumber(106)\n  set docTagPrefix($core.String value) => $_setString(6, value);\n  @$pb.TagNumber(106)\n  $core.bool hasDocTagPrefix() => $_has(6);\n  @$pb.TagNumber(106)\n  void clearDocTagPrefix() => $_clearField(106);\n\n  /// For whom the client library is being published.\n  @$pb.TagNumber(107)\n  ClientLibraryOrganization get organization => $_getN(7);\n  @$pb.TagNumber(107)\n  set organization(ClientLibraryOrganization value) => $_setField(107, value);\n  @$pb.TagNumber(107)\n  $core.bool hasOrganization() => $_has(7);\n  @$pb.TagNumber(107)\n  void clearOrganization() => $_clearField(107);\n\n  /// Client library settings.  If the same version string appears multiple\n  /// times in this list, then the last one wins.  Settings from earlier\n  /// settings with the same version string are discarded.\n  @$pb.TagNumber(109)\n  $pb.PbList<ClientLibrarySettings> get librarySettings => $_getList(8);\n\n  /// Optional link to proto reference documentation.  Example:\n  /// https://cloud.google.com/pubsub/lite/docs/reference/rpc\n  @$pb.TagNumber(110)\n  $core.String get protoReferenceDocumentationUri => $_getSZ(9);\n  @$pb.TagNumber(110)\n  set protoReferenceDocumentationUri($core.String value) =>\n      $_setString(9, value);\n  @$pb.TagNumber(110)\n  $core.bool hasProtoReferenceDocumentationUri() => $_has(9);\n  @$pb.TagNumber(110)\n  void clearProtoReferenceDocumentationUri() => $_clearField(110);\n\n  /// Optional link to REST reference documentation.  Example:\n  /// https://cloud.google.com/pubsub/lite/docs/reference/rest\n  @$pb.TagNumber(111)\n  $core.String get restReferenceDocumentationUri => $_getSZ(10);\n  @$pb.TagNumber(111)\n  set restReferenceDocumentationUri($core.String value) =>\n      $_setString(10, value);\n  @$pb.TagNumber(111)\n  $core.bool hasRestReferenceDocumentationUri() => $_has(10);\n  @$pb.TagNumber(111)\n  void clearRestReferenceDocumentationUri() => $_clearField(111);\n}\n\n/// Settings for Java client libraries.\nclass JavaSettings extends $pb.GeneratedMessage {\n  factory JavaSettings({\n    $core.String? libraryPackage,\n    $core.Iterable<$core.MapEntry<$core.String, $core.String>>?\n        serviceClassNames,\n    CommonLanguageSettings? common,\n  }) {\n    final result = create();\n    if (libraryPackage != null) result.libraryPackage = libraryPackage;\n    if (serviceClassNames != null)\n      result.serviceClassNames.addEntries(serviceClassNames);\n    if (common != null) result.common = common;\n    return result;\n  }\n\n  JavaSettings._();\n\n  factory JavaSettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory JavaSettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'JavaSettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'libraryPackage')\n    ..m<$core.String, $core.String>(\n        2, _omitFieldNames ? '' : 'serviceClassNames',\n        entryClassName: 'JavaSettings.ServiceClassNamesEntry',\n        keyFieldType: $pb.PbFieldType.OS,\n        valueFieldType: $pb.PbFieldType.OS,\n        packageName: const $pb.PackageName('google.api'))\n    ..aOM<CommonLanguageSettings>(3, _omitFieldNames ? '' : 'common',\n        subBuilder: CommonLanguageSettings.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  JavaSettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  JavaSettings copyWith(void Function(JavaSettings) updates) =>\n      super.copyWith((message) => updates(message as JavaSettings))\n          as JavaSettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static JavaSettings create() => JavaSettings._();\n  @$core.override\n  JavaSettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static JavaSettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<JavaSettings>(create);\n  static JavaSettings? _defaultInstance;\n\n  /// The package name to use in Java. Clobbers the java_package option\n  /// set in the protobuf. This should be used **only** by APIs\n  /// who have already set the language_settings.java.package_name\" field\n  /// in gapic.yaml. API teams should use the protobuf java_package option\n  /// where possible.\n  ///\n  /// Example of a YAML configuration::\n  ///\n  ///  publishing:\n  ///    java_settings:\n  ///      library_package: com.google.cloud.pubsub.v1\n  @$pb.TagNumber(1)\n  $core.String get libraryPackage => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set libraryPackage($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasLibraryPackage() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearLibraryPackage() => $_clearField(1);\n\n  /// Configure the Java class name to use instead of the service's for its\n  /// corresponding generated GAPIC client. Keys are fully-qualified\n  /// service names as they appear in the protobuf (including the full\n  /// the language_settings.java.interface_names\" field in gapic.yaml. API\n  /// teams should otherwise use the service name as it appears in the\n  /// protobuf.\n  ///\n  /// Example of a YAML configuration::\n  ///\n  ///  publishing:\n  ///    java_settings:\n  ///      service_class_names:\n  ///        - google.pubsub.v1.Publisher: TopicAdmin\n  ///        - google.pubsub.v1.Subscriber: SubscriptionAdmin\n  @$pb.TagNumber(2)\n  $pb.PbMap<$core.String, $core.String> get serviceClassNames => $_getMap(1);\n\n  /// Some settings.\n  @$pb.TagNumber(3)\n  CommonLanguageSettings get common => $_getN(2);\n  @$pb.TagNumber(3)\n  set common(CommonLanguageSettings value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasCommon() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearCommon() => $_clearField(3);\n  @$pb.TagNumber(3)\n  CommonLanguageSettings ensureCommon() => $_ensure(2);\n}\n\n/// Settings for C++ client libraries.\nclass CppSettings extends $pb.GeneratedMessage {\n  factory CppSettings({\n    CommonLanguageSettings? common,\n  }) {\n    final result = create();\n    if (common != null) result.common = common;\n    return result;\n  }\n\n  CppSettings._();\n\n  factory CppSettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CppSettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CppSettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOM<CommonLanguageSettings>(1, _omitFieldNames ? '' : 'common',\n        subBuilder: CommonLanguageSettings.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CppSettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CppSettings copyWith(void Function(CppSettings) updates) =>\n      super.copyWith((message) => updates(message as CppSettings))\n          as CppSettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CppSettings create() => CppSettings._();\n  @$core.override\n  CppSettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CppSettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CppSettings>(create);\n  static CppSettings? _defaultInstance;\n\n  /// Some settings.\n  @$pb.TagNumber(1)\n  CommonLanguageSettings get common => $_getN(0);\n  @$pb.TagNumber(1)\n  set common(CommonLanguageSettings value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasCommon() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearCommon() => $_clearField(1);\n  @$pb.TagNumber(1)\n  CommonLanguageSettings ensureCommon() => $_ensure(0);\n}\n\n/// Settings for Php client libraries.\nclass PhpSettings extends $pb.GeneratedMessage {\n  factory PhpSettings({\n    CommonLanguageSettings? common,\n  }) {\n    final result = create();\n    if (common != null) result.common = common;\n    return result;\n  }\n\n  PhpSettings._();\n\n  factory PhpSettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PhpSettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PhpSettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOM<CommonLanguageSettings>(1, _omitFieldNames ? '' : 'common',\n        subBuilder: CommonLanguageSettings.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PhpSettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PhpSettings copyWith(void Function(PhpSettings) updates) =>\n      super.copyWith((message) => updates(message as PhpSettings))\n          as PhpSettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PhpSettings create() => PhpSettings._();\n  @$core.override\n  PhpSettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PhpSettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PhpSettings>(create);\n  static PhpSettings? _defaultInstance;\n\n  /// Some settings.\n  @$pb.TagNumber(1)\n  CommonLanguageSettings get common => $_getN(0);\n  @$pb.TagNumber(1)\n  set common(CommonLanguageSettings value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasCommon() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearCommon() => $_clearField(1);\n  @$pb.TagNumber(1)\n  CommonLanguageSettings ensureCommon() => $_ensure(0);\n}\n\n/// Experimental features to be included during client library generation.\n/// These fields will be deprecated once the feature graduates and is enabled\n/// by default.\nclass PythonSettings_ExperimentalFeatures extends $pb.GeneratedMessage {\n  factory PythonSettings_ExperimentalFeatures({\n    $core.bool? restAsyncIoEnabled,\n    $core.bool? protobufPythonicTypesEnabled,\n    $core.bool? unversionedPackageDisabled,\n  }) {\n    final result = create();\n    if (restAsyncIoEnabled != null)\n      result.restAsyncIoEnabled = restAsyncIoEnabled;\n    if (protobufPythonicTypesEnabled != null)\n      result.protobufPythonicTypesEnabled = protobufPythonicTypesEnabled;\n    if (unversionedPackageDisabled != null)\n      result.unversionedPackageDisabled = unversionedPackageDisabled;\n    return result;\n  }\n\n  PythonSettings_ExperimentalFeatures._();\n\n  factory PythonSettings_ExperimentalFeatures.fromBuffer(\n          $core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PythonSettings_ExperimentalFeatures.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PythonSettings.ExperimentalFeatures',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOB(1, _omitFieldNames ? '' : 'restAsyncIoEnabled')\n    ..aOB(2, _omitFieldNames ? '' : 'protobufPythonicTypesEnabled')\n    ..aOB(3, _omitFieldNames ? '' : 'unversionedPackageDisabled')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PythonSettings_ExperimentalFeatures clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PythonSettings_ExperimentalFeatures copyWith(\n          void Function(PythonSettings_ExperimentalFeatures) updates) =>\n      super.copyWith((message) =>\n              updates(message as PythonSettings_ExperimentalFeatures))\n          as PythonSettings_ExperimentalFeatures;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PythonSettings_ExperimentalFeatures create() =>\n      PythonSettings_ExperimentalFeatures._();\n  @$core.override\n  PythonSettings_ExperimentalFeatures createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PythonSettings_ExperimentalFeatures getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<\n          PythonSettings_ExperimentalFeatures>(create);\n  static PythonSettings_ExperimentalFeatures? _defaultInstance;\n\n  /// Enables generation of asynchronous REST clients if `rest` transport is\n  /// enabled. By default, asynchronous REST clients will not be generated.\n  /// This feature will be enabled by default 1 month after launching the\n  /// feature in preview packages.\n  @$pb.TagNumber(1)\n  $core.bool get restAsyncIoEnabled => $_getBF(0);\n  @$pb.TagNumber(1)\n  set restAsyncIoEnabled($core.bool value) => $_setBool(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasRestAsyncIoEnabled() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearRestAsyncIoEnabled() => $_clearField(1);\n\n  /// Enables generation of protobuf code using new types that are more\n  /// Pythonic which are included in `protobuf>=5.29.x`. This feature will be\n  /// enabled by default 1 month after launching the feature in preview\n  /// packages.\n  @$pb.TagNumber(2)\n  $core.bool get protobufPythonicTypesEnabled => $_getBF(1);\n  @$pb.TagNumber(2)\n  set protobufPythonicTypesEnabled($core.bool value) => $_setBool(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasProtobufPythonicTypesEnabled() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearProtobufPythonicTypesEnabled() => $_clearField(2);\n\n  /// Disables generation of an unversioned Python package for this client\n  /// library. This means that the module names will need to be versioned in\n  /// import statements. For example `import google.cloud.library_v2` instead\n  /// of `import google.cloud.library`.\n  @$pb.TagNumber(3)\n  $core.bool get unversionedPackageDisabled => $_getBF(2);\n  @$pb.TagNumber(3)\n  set unversionedPackageDisabled($core.bool value) => $_setBool(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasUnversionedPackageDisabled() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearUnversionedPackageDisabled() => $_clearField(3);\n}\n\n/// Settings for Python client libraries.\nclass PythonSettings extends $pb.GeneratedMessage {\n  factory PythonSettings({\n    CommonLanguageSettings? common,\n    PythonSettings_ExperimentalFeatures? experimentalFeatures,\n  }) {\n    final result = create();\n    if (common != null) result.common = common;\n    if (experimentalFeatures != null)\n      result.experimentalFeatures = experimentalFeatures;\n    return result;\n  }\n\n  PythonSettings._();\n\n  factory PythonSettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PythonSettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PythonSettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOM<CommonLanguageSettings>(1, _omitFieldNames ? '' : 'common',\n        subBuilder: CommonLanguageSettings.create)\n    ..aOM<PythonSettings_ExperimentalFeatures>(\n        2, _omitFieldNames ? '' : 'experimentalFeatures',\n        subBuilder: PythonSettings_ExperimentalFeatures.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PythonSettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PythonSettings copyWith(void Function(PythonSettings) updates) =>\n      super.copyWith((message) => updates(message as PythonSettings))\n          as PythonSettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PythonSettings create() => PythonSettings._();\n  @$core.override\n  PythonSettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PythonSettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PythonSettings>(create);\n  static PythonSettings? _defaultInstance;\n\n  /// Some settings.\n  @$pb.TagNumber(1)\n  CommonLanguageSettings get common => $_getN(0);\n  @$pb.TagNumber(1)\n  set common(CommonLanguageSettings value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasCommon() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearCommon() => $_clearField(1);\n  @$pb.TagNumber(1)\n  CommonLanguageSettings ensureCommon() => $_ensure(0);\n\n  /// Experimental features to be included during client library generation.\n  @$pb.TagNumber(2)\n  PythonSettings_ExperimentalFeatures get experimentalFeatures => $_getN(1);\n  @$pb.TagNumber(2)\n  set experimentalFeatures(PythonSettings_ExperimentalFeatures value) =>\n      $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasExperimentalFeatures() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearExperimentalFeatures() => $_clearField(2);\n  @$pb.TagNumber(2)\n  PythonSettings_ExperimentalFeatures ensureExperimentalFeatures() =>\n      $_ensure(1);\n}\n\n/// Settings for Node client libraries.\nclass NodeSettings extends $pb.GeneratedMessage {\n  factory NodeSettings({\n    CommonLanguageSettings? common,\n  }) {\n    final result = create();\n    if (common != null) result.common = common;\n    return result;\n  }\n\n  NodeSettings._();\n\n  factory NodeSettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory NodeSettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'NodeSettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOM<CommonLanguageSettings>(1, _omitFieldNames ? '' : 'common',\n        subBuilder: CommonLanguageSettings.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  NodeSettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  NodeSettings copyWith(void Function(NodeSettings) updates) =>\n      super.copyWith((message) => updates(message as NodeSettings))\n          as NodeSettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static NodeSettings create() => NodeSettings._();\n  @$core.override\n  NodeSettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static NodeSettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<NodeSettings>(create);\n  static NodeSettings? _defaultInstance;\n\n  /// Some settings.\n  @$pb.TagNumber(1)\n  CommonLanguageSettings get common => $_getN(0);\n  @$pb.TagNumber(1)\n  set common(CommonLanguageSettings value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasCommon() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearCommon() => $_clearField(1);\n  @$pb.TagNumber(1)\n  CommonLanguageSettings ensureCommon() => $_ensure(0);\n}\n\n/// Settings for Dotnet client libraries.\nclass DotnetSettings extends $pb.GeneratedMessage {\n  factory DotnetSettings({\n    CommonLanguageSettings? common,\n    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? renamedServices,\n    $core.Iterable<$core.MapEntry<$core.String, $core.String>>?\n        renamedResources,\n    $core.Iterable<$core.String>? ignoredResources,\n    $core.Iterable<$core.String>? forcedNamespaceAliases,\n    $core.Iterable<$core.String>? handwrittenSignatures,\n  }) {\n    final result = create();\n    if (common != null) result.common = common;\n    if (renamedServices != null)\n      result.renamedServices.addEntries(renamedServices);\n    if (renamedResources != null)\n      result.renamedResources.addEntries(renamedResources);\n    if (ignoredResources != null)\n      result.ignoredResources.addAll(ignoredResources);\n    if (forcedNamespaceAliases != null)\n      result.forcedNamespaceAliases.addAll(forcedNamespaceAliases);\n    if (handwrittenSignatures != null)\n      result.handwrittenSignatures.addAll(handwrittenSignatures);\n    return result;\n  }\n\n  DotnetSettings._();\n\n  factory DotnetSettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory DotnetSettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'DotnetSettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOM<CommonLanguageSettings>(1, _omitFieldNames ? '' : 'common',\n        subBuilder: CommonLanguageSettings.create)\n    ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'renamedServices',\n        entryClassName: 'DotnetSettings.RenamedServicesEntry',\n        keyFieldType: $pb.PbFieldType.OS,\n        valueFieldType: $pb.PbFieldType.OS,\n        packageName: const $pb.PackageName('google.api'))\n    ..m<$core.String, $core.String>(\n        3, _omitFieldNames ? '' : 'renamedResources',\n        entryClassName: 'DotnetSettings.RenamedResourcesEntry',\n        keyFieldType: $pb.PbFieldType.OS,\n        valueFieldType: $pb.PbFieldType.OS,\n        packageName: const $pb.PackageName('google.api'))\n    ..pPS(4, _omitFieldNames ? '' : 'ignoredResources')\n    ..pPS(5, _omitFieldNames ? '' : 'forcedNamespaceAliases')\n    ..pPS(6, _omitFieldNames ? '' : 'handwrittenSignatures')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DotnetSettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DotnetSettings copyWith(void Function(DotnetSettings) updates) =>\n      super.copyWith((message) => updates(message as DotnetSettings))\n          as DotnetSettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static DotnetSettings create() => DotnetSettings._();\n  @$core.override\n  DotnetSettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static DotnetSettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<DotnetSettings>(create);\n  static DotnetSettings? _defaultInstance;\n\n  /// Some settings.\n  @$pb.TagNumber(1)\n  CommonLanguageSettings get common => $_getN(0);\n  @$pb.TagNumber(1)\n  set common(CommonLanguageSettings value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasCommon() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearCommon() => $_clearField(1);\n  @$pb.TagNumber(1)\n  CommonLanguageSettings ensureCommon() => $_ensure(0);\n\n  /// Map from original service names to renamed versions.\n  /// This is used when the default generated types\n  /// would cause a naming conflict. (Neither name is\n  /// fully-qualified.)\n  /// Example: Subscriber to SubscriberServiceApi.\n  @$pb.TagNumber(2)\n  $pb.PbMap<$core.String, $core.String> get renamedServices => $_getMap(1);\n\n  /// Map from full resource types to the effective short name\n  /// for the resource. This is used when otherwise resource\n  /// named from different services would cause naming collisions.\n  /// Example entry:\n  /// \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"\n  @$pb.TagNumber(3)\n  $pb.PbMap<$core.String, $core.String> get renamedResources => $_getMap(2);\n\n  /// List of full resource types to ignore during generation.\n  /// This is typically used for API-specific Location resources,\n  /// which should be handled by the generator as if they were actually\n  /// the common Location resources.\n  /// Example entry: \"documentai.googleapis.com/Location\"\n  @$pb.TagNumber(4)\n  $pb.PbList<$core.String> get ignoredResources => $_getList(3);\n\n  /// Namespaces which must be aliased in snippets due to\n  /// a known (but non-generator-predictable) naming collision\n  @$pb.TagNumber(5)\n  $pb.PbList<$core.String> get forcedNamespaceAliases => $_getList(4);\n\n  /// Method signatures (in the form \"service.method(signature)\")\n  /// which are provided separately, so shouldn't be generated.\n  /// Snippets *calling* these methods are still generated, however.\n  @$pb.TagNumber(6)\n  $pb.PbList<$core.String> get handwrittenSignatures => $_getList(5);\n}\n\n/// Settings for Ruby client libraries.\nclass RubySettings extends $pb.GeneratedMessage {\n  factory RubySettings({\n    CommonLanguageSettings? common,\n  }) {\n    final result = create();\n    if (common != null) result.common = common;\n    return result;\n  }\n\n  RubySettings._();\n\n  factory RubySettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory RubySettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'RubySettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOM<CommonLanguageSettings>(1, _omitFieldNames ? '' : 'common',\n        subBuilder: CommonLanguageSettings.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  RubySettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  RubySettings copyWith(void Function(RubySettings) updates) =>\n      super.copyWith((message) => updates(message as RubySettings))\n          as RubySettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static RubySettings create() => RubySettings._();\n  @$core.override\n  RubySettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static RubySettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<RubySettings>(create);\n  static RubySettings? _defaultInstance;\n\n  /// Some settings.\n  @$pb.TagNumber(1)\n  CommonLanguageSettings get common => $_getN(0);\n  @$pb.TagNumber(1)\n  set common(CommonLanguageSettings value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasCommon() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearCommon() => $_clearField(1);\n  @$pb.TagNumber(1)\n  CommonLanguageSettings ensureCommon() => $_ensure(0);\n}\n\n/// Settings for Go client libraries.\nclass GoSettings extends $pb.GeneratedMessage {\n  factory GoSettings({\n    CommonLanguageSettings? common,\n    $core.Iterable<$core.MapEntry<$core.String, $core.String>>? renamedServices,\n  }) {\n    final result = create();\n    if (common != null) result.common = common;\n    if (renamedServices != null)\n      result.renamedServices.addEntries(renamedServices);\n    return result;\n  }\n\n  GoSettings._();\n\n  factory GoSettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GoSettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GoSettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOM<CommonLanguageSettings>(1, _omitFieldNames ? '' : 'common',\n        subBuilder: CommonLanguageSettings.create)\n    ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'renamedServices',\n        entryClassName: 'GoSettings.RenamedServicesEntry',\n        keyFieldType: $pb.PbFieldType.OS,\n        valueFieldType: $pb.PbFieldType.OS,\n        packageName: const $pb.PackageName('google.api'))\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GoSettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GoSettings copyWith(void Function(GoSettings) updates) =>\n      super.copyWith((message) => updates(message as GoSettings)) as GoSettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GoSettings create() => GoSettings._();\n  @$core.override\n  GoSettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GoSettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GoSettings>(create);\n  static GoSettings? _defaultInstance;\n\n  /// Some settings.\n  @$pb.TagNumber(1)\n  CommonLanguageSettings get common => $_getN(0);\n  @$pb.TagNumber(1)\n  set common(CommonLanguageSettings value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasCommon() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearCommon() => $_clearField(1);\n  @$pb.TagNumber(1)\n  CommonLanguageSettings ensureCommon() => $_ensure(0);\n\n  /// Map of service names to renamed services. Keys are the package relative\n  /// service names and values are the name to be used for the service client\n  /// and call options.\n  ///\n  /// publishing:\n  ///   go_settings:\n  ///     renamed_services:\n  ///       Publisher: TopicAdmin\n  @$pb.TagNumber(2)\n  $pb.PbMap<$core.String, $core.String> get renamedServices => $_getMap(1);\n}\n\n/// Describes settings to use when generating API methods that use the\n/// long-running operation pattern.\n/// All default values below are from those used in the client library\n/// generators (e.g.\n/// [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).\nclass MethodSettings_LongRunning extends $pb.GeneratedMessage {\n  factory MethodSettings_LongRunning({\n    $0.Duration? initialPollDelay,\n    $core.double? pollDelayMultiplier,\n    $0.Duration? maxPollDelay,\n    $0.Duration? totalPollTimeout,\n  }) {\n    final result = create();\n    if (initialPollDelay != null) result.initialPollDelay = initialPollDelay;\n    if (pollDelayMultiplier != null)\n      result.pollDelayMultiplier = pollDelayMultiplier;\n    if (maxPollDelay != null) result.maxPollDelay = maxPollDelay;\n    if (totalPollTimeout != null) result.totalPollTimeout = totalPollTimeout;\n    return result;\n  }\n\n  MethodSettings_LongRunning._();\n\n  factory MethodSettings_LongRunning.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory MethodSettings_LongRunning.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'MethodSettings.LongRunning',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOM<$0.Duration>(1, _omitFieldNames ? '' : 'initialPollDelay',\n        subBuilder: $0.Duration.create)\n    ..aD(2, _omitFieldNames ? '' : 'pollDelayMultiplier',\n        fieldType: $pb.PbFieldType.OF)\n    ..aOM<$0.Duration>(3, _omitFieldNames ? '' : 'maxPollDelay',\n        subBuilder: $0.Duration.create)\n    ..aOM<$0.Duration>(4, _omitFieldNames ? '' : 'totalPollTimeout',\n        subBuilder: $0.Duration.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MethodSettings_LongRunning clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MethodSettings_LongRunning copyWith(\n          void Function(MethodSettings_LongRunning) updates) =>\n      super.copyWith(\n              (message) => updates(message as MethodSettings_LongRunning))\n          as MethodSettings_LongRunning;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static MethodSettings_LongRunning create() => MethodSettings_LongRunning._();\n  @$core.override\n  MethodSettings_LongRunning createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static MethodSettings_LongRunning getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<MethodSettings_LongRunning>(create);\n  static MethodSettings_LongRunning? _defaultInstance;\n\n  /// Initial delay after which the first poll request will be made.\n  /// Default value: 5 seconds.\n  @$pb.TagNumber(1)\n  $0.Duration get initialPollDelay => $_getN(0);\n  @$pb.TagNumber(1)\n  set initialPollDelay($0.Duration value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasInitialPollDelay() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearInitialPollDelay() => $_clearField(1);\n  @$pb.TagNumber(1)\n  $0.Duration ensureInitialPollDelay() => $_ensure(0);\n\n  /// Multiplier to gradually increase delay between subsequent polls until it\n  /// reaches max_poll_delay.\n  /// Default value: 1.5.\n  @$pb.TagNumber(2)\n  $core.double get pollDelayMultiplier => $_getN(1);\n  @$pb.TagNumber(2)\n  set pollDelayMultiplier($core.double value) => $_setFloat(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPollDelayMultiplier() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPollDelayMultiplier() => $_clearField(2);\n\n  /// Maximum time between two subsequent poll requests.\n  /// Default value: 45 seconds.\n  @$pb.TagNumber(3)\n  $0.Duration get maxPollDelay => $_getN(2);\n  @$pb.TagNumber(3)\n  set maxPollDelay($0.Duration value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasMaxPollDelay() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearMaxPollDelay() => $_clearField(3);\n  @$pb.TagNumber(3)\n  $0.Duration ensureMaxPollDelay() => $_ensure(2);\n\n  /// Total polling timeout.\n  /// Default value: 5 minutes.\n  @$pb.TagNumber(4)\n  $0.Duration get totalPollTimeout => $_getN(3);\n  @$pb.TagNumber(4)\n  set totalPollTimeout($0.Duration value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasTotalPollTimeout() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearTotalPollTimeout() => $_clearField(4);\n  @$pb.TagNumber(4)\n  $0.Duration ensureTotalPollTimeout() => $_ensure(3);\n}\n\n/// Describes the generator configuration for a method.\nclass MethodSettings extends $pb.GeneratedMessage {\n  factory MethodSettings({\n    $core.String? selector,\n    MethodSettings_LongRunning? longRunning,\n    $core.Iterable<$core.String>? autoPopulatedFields,\n  }) {\n    final result = create();\n    if (selector != null) result.selector = selector;\n    if (longRunning != null) result.longRunning = longRunning;\n    if (autoPopulatedFields != null)\n      result.autoPopulatedFields.addAll(autoPopulatedFields);\n    return result;\n  }\n\n  MethodSettings._();\n\n  factory MethodSettings.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory MethodSettings.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'MethodSettings',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'selector')\n    ..aOM<MethodSettings_LongRunning>(2, _omitFieldNames ? '' : 'longRunning',\n        subBuilder: MethodSettings_LongRunning.create)\n    ..pPS(3, _omitFieldNames ? '' : 'autoPopulatedFields')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MethodSettings clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MethodSettings copyWith(void Function(MethodSettings) updates) =>\n      super.copyWith((message) => updates(message as MethodSettings))\n          as MethodSettings;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static MethodSettings create() => MethodSettings._();\n  @$core.override\n  MethodSettings createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static MethodSettings getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<MethodSettings>(create);\n  static MethodSettings? _defaultInstance;\n\n  /// The fully qualified name of the method, for which the options below apply.\n  /// This is used to find the method to apply the options.\n  ///\n  /// Example:\n  ///\n  ///    publishing:\n  ///      method_settings:\n  ///      - selector: google.storage.control.v2.StorageControl.CreateFolder\n  ///        # method settings for CreateFolder...\n  @$pb.TagNumber(1)\n  $core.String get selector => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set selector($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSelector() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSelector() => $_clearField(1);\n\n  /// Describes settings to use for long-running operations when generating\n  /// API methods for RPCs. Complements RPCs that use the annotations in\n  /// google/longrunning/operations.proto.\n  ///\n  /// Example of a YAML configuration::\n  ///\n  ///    publishing:\n  ///      method_settings:\n  ///      - selector: google.cloud.speech.v2.Speech.BatchRecognize\n  ///        long_running:\n  ///          initial_poll_delay: 60s # 1 minute\n  ///          poll_delay_multiplier: 1.5\n  ///          max_poll_delay: 360s # 6 minutes\n  ///          total_poll_timeout: 54000s # 90 minutes\n  @$pb.TagNumber(2)\n  MethodSettings_LongRunning get longRunning => $_getN(1);\n  @$pb.TagNumber(2)\n  set longRunning(MethodSettings_LongRunning value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasLongRunning() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearLongRunning() => $_clearField(2);\n  @$pb.TagNumber(2)\n  MethodSettings_LongRunning ensureLongRunning() => $_ensure(1);\n\n  /// List of top-level fields of the request message, that should be\n  /// automatically populated by the client libraries based on their\n  /// (google.api.field_info).format. Currently supported format: UUID4.\n  ///\n  /// Example of a YAML configuration:\n  ///\n  ///    publishing:\n  ///      method_settings:\n  ///      - selector: google.example.v1.ExampleService.CreateExample\n  ///        auto_populated_fields:\n  ///        - request_id\n  @$pb.TagNumber(3)\n  $pb.PbList<$core.String> get autoPopulatedFields => $_getList(2);\n}\n\n/// This message is used to configure the generation of a subset of the RPCs in\n/// a service for client libraries.\nclass SelectiveGapicGeneration extends $pb.GeneratedMessage {\n  factory SelectiveGapicGeneration({\n    $core.Iterable<$core.String>? methods,\n    $core.bool? generateOmittedAsInternal,\n  }) {\n    final result = create();\n    if (methods != null) result.methods.addAll(methods);\n    if (generateOmittedAsInternal != null)\n      result.generateOmittedAsInternal = generateOmittedAsInternal;\n    return result;\n  }\n\n  SelectiveGapicGeneration._();\n\n  factory SelectiveGapicGeneration.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SelectiveGapicGeneration.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SelectiveGapicGeneration',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..pPS(1, _omitFieldNames ? '' : 'methods')\n    ..aOB(2, _omitFieldNames ? '' : 'generateOmittedAsInternal')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SelectiveGapicGeneration clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SelectiveGapicGeneration copyWith(\n          void Function(SelectiveGapicGeneration) updates) =>\n      super.copyWith((message) => updates(message as SelectiveGapicGeneration))\n          as SelectiveGapicGeneration;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SelectiveGapicGeneration create() => SelectiveGapicGeneration._();\n  @$core.override\n  SelectiveGapicGeneration createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SelectiveGapicGeneration getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SelectiveGapicGeneration>(create);\n  static SelectiveGapicGeneration? _defaultInstance;\n\n  /// An allowlist of the fully qualified names of RPCs that should be included\n  /// on public client surfaces.\n  @$pb.TagNumber(1)\n  $pb.PbList<$core.String> get methods => $_getList(0);\n\n  /// Setting this to true indicates to the client generators that methods\n  /// that would be excluded from the generation should instead be generated\n  /// in a way that indicates these methods should not be consumed by\n  /// end users. How this is expressed is up to individual language\n  /// implementations to decide. Some examples may be: added annotations,\n  /// obfuscated identifiers, or other language idiomatic patterns.\n  @$pb.TagNumber(2)\n  $core.bool get generateOmittedAsInternal => $_getBF(1);\n  @$pb.TagNumber(2)\n  set generateOmittedAsInternal($core.bool value) => $_setBool(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasGenerateOmittedAsInternal() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearGenerateOmittedAsInternal() => $_clearField(2);\n}\n\nclass Client {\n  static final methodSignature = $pb.Extension<$core.String>.repeated(\n      _omitMessageNames ? '' : 'google.protobuf.MethodOptions',\n      _omitFieldNames ? '' : 'methodSignature',\n      1051,\n      $pb.PbFieldType.PS,\n      check: $pb.getCheckFunction($pb.PbFieldType.PS));\n  static final defaultHost = $pb.Extension<$core.String>(\n      _omitMessageNames ? '' : 'google.protobuf.ServiceOptions',\n      _omitFieldNames ? '' : 'defaultHost',\n      1049,\n      $pb.PbFieldType.OS);\n  static final oauthScopes = $pb.Extension<$core.String>(\n      _omitMessageNames ? '' : 'google.protobuf.ServiceOptions',\n      _omitFieldNames ? '' : 'oauthScopes',\n      1050,\n      $pb.PbFieldType.OS);\n  static final apiVersion = $pb.Extension<$core.String>(\n      _omitMessageNames ? '' : 'google.protobuf.ServiceOptions',\n      _omitFieldNames ? '' : 'apiVersion',\n      525000001,\n      $pb.PbFieldType.OS);\n  static void registerAllExtensions($pb.ExtensionRegistry registry) {\n    registry.add(methodSignature);\n    registry.add(defaultHost);\n    registry.add(oauthScopes);\n    registry.add(apiVersion);\n  }\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/api/client.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/api/client.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// The organization for which the client libraries are being published.\n/// Affects the url where generated docs are published, etc.\nclass ClientLibraryOrganization extends $pb.ProtobufEnum {\n  /// Not useful.\n  static const ClientLibraryOrganization\n      CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = ClientLibraryOrganization._(\n          0, _omitEnumNames ? '' : 'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED');\n\n  /// Google Cloud Platform Org.\n  static const ClientLibraryOrganization CLOUD =\n      ClientLibraryOrganization._(1, _omitEnumNames ? '' : 'CLOUD');\n\n  /// Ads (Advertising) Org.\n  static const ClientLibraryOrganization ADS =\n      ClientLibraryOrganization._(2, _omitEnumNames ? '' : 'ADS');\n\n  /// Photos Org.\n  static const ClientLibraryOrganization PHOTOS =\n      ClientLibraryOrganization._(3, _omitEnumNames ? '' : 'PHOTOS');\n\n  /// Street View Org.\n  static const ClientLibraryOrganization STREET_VIEW =\n      ClientLibraryOrganization._(4, _omitEnumNames ? '' : 'STREET_VIEW');\n\n  /// Shopping Org.\n  static const ClientLibraryOrganization SHOPPING =\n      ClientLibraryOrganization._(5, _omitEnumNames ? '' : 'SHOPPING');\n\n  /// Geo Org.\n  static const ClientLibraryOrganization GEO =\n      ClientLibraryOrganization._(6, _omitEnumNames ? '' : 'GEO');\n\n  /// Generative AI - https://developers.generativeai.google\n  static const ClientLibraryOrganization GENERATIVE_AI =\n      ClientLibraryOrganization._(7, _omitEnumNames ? '' : 'GENERATIVE_AI');\n\n  static const $core.List<ClientLibraryOrganization> values =\n      <ClientLibraryOrganization>[\n    CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED,\n    CLOUD,\n    ADS,\n    PHOTOS,\n    STREET_VIEW,\n    SHOPPING,\n    GEO,\n    GENERATIVE_AI,\n  ];\n\n  static final $core.List<ClientLibraryOrganization?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 7);\n  static ClientLibraryOrganization? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const ClientLibraryOrganization._(super.value, super.name);\n}\n\n/// To where should client libraries be published?\nclass ClientLibraryDestination extends $pb.ProtobufEnum {\n  /// Client libraries will neither be generated nor published to package\n  /// managers.\n  static const ClientLibraryDestination CLIENT_LIBRARY_DESTINATION_UNSPECIFIED =\n      ClientLibraryDestination._(\n          0, _omitEnumNames ? '' : 'CLIENT_LIBRARY_DESTINATION_UNSPECIFIED');\n\n  /// Generate the client library in a repo under github.com/googleapis,\n  /// but don't publish it to package managers.\n  static const ClientLibraryDestination GITHUB =\n      ClientLibraryDestination._(10, _omitEnumNames ? '' : 'GITHUB');\n\n  /// Publish the library to package managers like nuget.org and npmjs.com.\n  static const ClientLibraryDestination PACKAGE_MANAGER =\n      ClientLibraryDestination._(20, _omitEnumNames ? '' : 'PACKAGE_MANAGER');\n\n  static const $core.List<ClientLibraryDestination> values =\n      <ClientLibraryDestination>[\n    CLIENT_LIBRARY_DESTINATION_UNSPECIFIED,\n    GITHUB,\n    PACKAGE_MANAGER,\n  ];\n\n  static final $core.Map<$core.int, ClientLibraryDestination> _byValue =\n      $pb.ProtobufEnum.initByValue(values);\n  static ClientLibraryDestination? valueOf($core.int value) => _byValue[value];\n\n  const ClientLibraryDestination._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/api/http.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/api/http.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// Defines the HTTP configuration for an API service. It contains a list of\n/// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method\n/// to one or more HTTP REST API methods.\nclass Http extends $pb.GeneratedMessage {\n  factory Http({\n    $core.Iterable<HttpRule>? rules,\n    $core.bool? fullyDecodeReservedExpansion,\n  }) {\n    final result = create();\n    if (rules != null) result.rules.addAll(rules);\n    if (fullyDecodeReservedExpansion != null)\n      result.fullyDecodeReservedExpansion = fullyDecodeReservedExpansion;\n    return result;\n  }\n\n  Http._();\n\n  factory Http.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Http.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Http',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..pPM<HttpRule>(1, _omitFieldNames ? '' : 'rules',\n        subBuilder: HttpRule.create)\n    ..aOB(2, _omitFieldNames ? '' : 'fullyDecodeReservedExpansion')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Http clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Http copyWith(void Function(Http) updates) =>\n      super.copyWith((message) => updates(message as Http)) as Http;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Http create() => Http._();\n  @$core.override\n  Http createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Http getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Http>(create);\n  static Http? _defaultInstance;\n\n  /// A list of HTTP configuration rules that apply to individual API methods.\n  ///\n  /// **NOTE:** All service configuration rules follow \"last one wins\" order.\n  @$pb.TagNumber(1)\n  $pb.PbList<HttpRule> get rules => $_getList(0);\n\n  /// When set to true, URL path parameters will be fully URI-decoded except in\n  /// cases of single segment matches in reserved expansion, where \"%2F\" will be\n  /// left encoded.\n  ///\n  /// The default behavior is to not decode RFC 6570 reserved characters in multi\n  /// segment matches.\n  @$pb.TagNumber(2)\n  $core.bool get fullyDecodeReservedExpansion => $_getBF(1);\n  @$pb.TagNumber(2)\n  set fullyDecodeReservedExpansion($core.bool value) => $_setBool(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasFullyDecodeReservedExpansion() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearFullyDecodeReservedExpansion() => $_clearField(2);\n}\n\nenum HttpRule_Pattern { get, put, post, delete, patch, custom, notSet }\n\n/// gRPC Transcoding\n///\n/// gRPC Transcoding is a feature for mapping between a gRPC method and one or\n/// more HTTP REST endpoints. It allows developers to build a single API service\n/// that supports both gRPC APIs and REST APIs. Many systems, including [Google\n/// APIs](https://github.com/googleapis/googleapis),\n/// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC\n/// Gateway](https://github.com/grpc-ecosystem/grpc-gateway),\n/// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature\n/// and use it for large scale production services.\n///\n/// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies\n/// how different portions of the gRPC request message are mapped to the URL\n/// path, URL query parameters, and HTTP request body. It also controls how the\n/// gRPC response message is mapped to the HTTP response body. `HttpRule` is\n/// typically specified as an `google.api.http` annotation on the gRPC method.\n///\n/// Each mapping specifies a URL path template and an HTTP method. The path\n/// template may refer to one or more fields in the gRPC request message, as long\n/// as each field is a non-repeated field with a primitive (non-message) type.\n/// The path template controls how fields of the request message are mapped to\n/// the URL path.\n///\n/// Example:\n///\n///     service Messaging {\n///       rpc GetMessage(GetMessageRequest) returns (Message) {\n///         option (google.api.http) = {\n///             get: \"/v1/{name=messages/*}\"\n///         };\n///       }\n///     }\n///     message GetMessageRequest {\n///       string name = 1; // Mapped to URL path.\n///     }\n///     message Message {\n///       string text = 1; // The resource content.\n///     }\n///\n/// This enables an HTTP REST to gRPC mapping as below:\n///\n/// - HTTP: `GET /v1/messages/123456`\n/// - gRPC: `GetMessage(name: \"messages/123456\")`\n///\n/// Any fields in the request message which are not bound by the path template\n/// automatically become HTTP query parameters if there is no HTTP request body.\n/// For example:\n///\n///     service Messaging {\n///       rpc GetMessage(GetMessageRequest) returns (Message) {\n///         option (google.api.http) = {\n///             get:\"/v1/messages/{message_id}\"\n///         };\n///       }\n///     }\n///     message GetMessageRequest {\n///       message SubMessage {\n///         string subfield = 1;\n///       }\n///       string message_id = 1; // Mapped to URL path.\n///       int64 revision = 2;    // Mapped to URL query parameter `revision`.\n///       SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.\n///     }\n///\n/// This enables a HTTP JSON to RPC mapping as below:\n///\n/// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`\n/// - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub:\n/// SubMessage(subfield: \"foo\"))`\n///\n/// Note that fields which are mapped to URL query parameters must have a\n/// primitive type or a repeated primitive type or a non-repeated message type.\n/// In the case of a repeated type, the parameter can be repeated in the URL\n/// as `...?param=A&param=B`. In the case of a message type, each field of the\n/// message is mapped to a separate parameter, such as\n/// `...?foo.a=A&foo.b=B&foo.c=C`.\n///\n/// For HTTP methods that allow a request body, the `body` field\n/// specifies the mapping. Consider a REST update method on the\n/// message resource collection:\n///\n///     service Messaging {\n///       rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n///         option (google.api.http) = {\n///           patch: \"/v1/messages/{message_id}\"\n///           body: \"message\"\n///         };\n///       }\n///     }\n///     message UpdateMessageRequest {\n///       string message_id = 1; // mapped to the URL\n///       Message message = 2;   // mapped to the body\n///     }\n///\n/// The following HTTP JSON to RPC mapping is enabled, where the\n/// representation of the JSON in the request body is determined by\n/// protos JSON encoding:\n///\n/// - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }`\n/// - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n///\n/// The special name `*` can be used in the body mapping to define that\n/// every field not bound by the path template should be mapped to the\n/// request body.  This enables the following alternative definition of\n/// the update method:\n///\n///     service Messaging {\n///       rpc UpdateMessage(Message) returns (Message) {\n///         option (google.api.http) = {\n///           patch: \"/v1/messages/{message_id}\"\n///           body: \"*\"\n///         };\n///       }\n///     }\n///     message Message {\n///       string message_id = 1;\n///       string text = 2;\n///     }\n///\n///\n/// The following HTTP JSON to RPC mapping is enabled:\n///\n/// - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }`\n/// - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n///\n/// Note that when using `*` in the body mapping, it is not possible to\n/// have HTTP parameters, as all fields not bound by the path end in\n/// the body. This makes this option more rarely used in practice when\n/// defining REST APIs. The common usage of `*` is in custom methods\n/// which don't use the URL at all for transferring data.\n///\n/// It is possible to define multiple HTTP methods for one RPC by using\n/// the `additional_bindings` option. Example:\n///\n///     service Messaging {\n///       rpc GetMessage(GetMessageRequest) returns (Message) {\n///         option (google.api.http) = {\n///           get: \"/v1/messages/{message_id}\"\n///           additional_bindings {\n///             get: \"/v1/users/{user_id}/messages/{message_id}\"\n///           }\n///         };\n///       }\n///     }\n///     message GetMessageRequest {\n///       string message_id = 1;\n///       string user_id = 2;\n///     }\n///\n/// This enables the following two alternative HTTP JSON to RPC mappings:\n///\n/// - HTTP: `GET /v1/messages/123456`\n/// - gRPC: `GetMessage(message_id: \"123456\")`\n///\n/// - HTTP: `GET /v1/users/me/messages/123456`\n/// - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")`\n///\n/// Rules for HTTP mapping\n///\n/// 1. Leaf request fields (recursive expansion nested messages in the request\n///    message) are classified into three categories:\n///    - Fields referred by the path template. They are passed via the URL path.\n///    - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They\n///    are passed via the HTTP\n///      request body.\n///    - All other fields are passed via the URL query parameters, and the\n///      parameter name is the field path in the request message. A repeated\n///      field can be represented as multiple query parameters under the same\n///      name.\n///  2. If [HttpRule.body][google.api.HttpRule.body] is \"*\", there is no URL\n///  query parameter, all fields\n///     are passed via URL path and HTTP request body.\n///  3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP\n///  request body, all\n///     fields are passed via URL path and URL query parameters.\n///\n/// Path template syntax\n///\n///     Template = \"/\" Segments [ Verb ] ;\n///     Segments = Segment { \"/\" Segment } ;\n///     Segment  = \"*\" | \"**\" | LITERAL | Variable ;\n///     Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n///     FieldPath = IDENT { \".\" IDENT } ;\n///     Verb     = \":\" LITERAL ;\n///\n/// The syntax `*` matches a single URL path segment. The syntax `**` matches\n/// zero or more URL path segments, which must be the last part of the URL path\n/// except the `Verb`.\n///\n/// The syntax `Variable` matches part of the URL path as specified by its\n/// template. A variable template must not contain other variables. If a variable\n/// matches a single path segment, its template may be omitted, e.g. `{var}`\n/// is equivalent to `{var=*}`.\n///\n/// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`\n/// contains any reserved character, such characters should be percent-encoded\n/// before the matching.\n///\n/// If a variable contains exactly one path segment, such as `\"{var}\"` or\n/// `\"{var=*}\"`, when such a variable is expanded into a URL path on the client\n/// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The\n/// server side does the reverse decoding. Such variables show up in the\n/// [Discovery\n/// Document](https://developers.google.com/discovery/v1/reference/apis) as\n/// `{var}`.\n///\n/// If a variable contains multiple path segments, such as `\"{var=foo/*}\"`\n/// or `\"{var=**}\"`, when such a variable is expanded into a URL path on the\n/// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.\n/// The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left\n/// unchanged. Such variables show up in the\n/// [Discovery\n/// Document](https://developers.google.com/discovery/v1/reference/apis) as\n/// `{+var}`.\n///\n/// Using gRPC API Service Configuration\n///\n/// gRPC API Service Configuration (service config) is a configuration language\n/// for configuring a gRPC service to become a user-facing product. The\n/// service config is simply the YAML representation of the `google.api.Service`\n/// proto message.\n///\n/// As an alternative to annotating your proto file, you can configure gRPC\n/// transcoding in your service config YAML files. You do this by specifying a\n/// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same\n/// effect as the proto annotation. This can be particularly useful if you\n/// have a proto that is reused in multiple services. Note that any transcoding\n/// specified in the service config will override any matching transcoding\n/// configuration in the proto.\n///\n/// The following example selects a gRPC method and applies an `HttpRule` to it:\n///\n///     http:\n///       rules:\n///         - selector: example.v1.Messaging.GetMessage\n///           get: /v1/messages/{message_id}/{sub.subfield}\n///\n/// Special notes\n///\n/// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the\n/// proto to JSON conversion must follow the [proto3\n/// specification](https://developers.google.com/protocol-buffers/docs/proto3#json).\n///\n/// While the single segment variable follows the semantics of\n/// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\n/// Expansion, the multi segment variable **does not** follow RFC 6570 Section\n/// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion\n/// does not expand special characters like `?` and `#`, which would lead\n/// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding\n/// for multi segment variables.\n///\n/// The path variables **must not** refer to any repeated or mapped field,\n/// because client libraries are not capable of handling such variable expansion.\n///\n/// The path variables **must not** capture the leading \"/\" character. The reason\n/// is that the most common use case \"{var}\" does not capture the leading \"/\"\n/// character. For consistency, all path variables must share the same behavior.\n///\n/// Repeated message fields must not be mapped to URL query parameters, because\n/// no client library can support such complicated mapping.\n///\n/// If an API needs to use a JSON array for request or response body, it can map\n/// the request or response body to a repeated field. However, some gRPC\n/// Transcoding implementations may not support this feature.\nclass HttpRule extends $pb.GeneratedMessage {\n  factory HttpRule({\n    $core.String? selector,\n    $core.String? get,\n    $core.String? put,\n    $core.String? post,\n    $core.String? delete,\n    $core.String? patch,\n    $core.String? body,\n    CustomHttpPattern? custom,\n    $core.Iterable<HttpRule>? additionalBindings,\n    $core.String? responseBody,\n  }) {\n    final result = create();\n    if (selector != null) result.selector = selector;\n    if (get != null) result.get = get;\n    if (put != null) result.put = put;\n    if (post != null) result.post = post;\n    if (delete != null) result.delete = delete;\n    if (patch != null) result.patch = patch;\n    if (body != null) result.body = body;\n    if (custom != null) result.custom = custom;\n    if (additionalBindings != null)\n      result.additionalBindings.addAll(additionalBindings);\n    if (responseBody != null) result.responseBody = responseBody;\n    return result;\n  }\n\n  HttpRule._();\n\n  factory HttpRule.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory HttpRule.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static const $core.Map<$core.int, HttpRule_Pattern> _HttpRule_PatternByTag = {\n    2: HttpRule_Pattern.get,\n    3: HttpRule_Pattern.put,\n    4: HttpRule_Pattern.post,\n    5: HttpRule_Pattern.delete,\n    6: HttpRule_Pattern.patch,\n    8: HttpRule_Pattern.custom,\n    0: HttpRule_Pattern.notSet\n  };\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'HttpRule',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..oo(0, [2, 3, 4, 5, 6, 8])\n    ..aOS(1, _omitFieldNames ? '' : 'selector')\n    ..aOS(2, _omitFieldNames ? '' : 'get')\n    ..aOS(3, _omitFieldNames ? '' : 'put')\n    ..aOS(4, _omitFieldNames ? '' : 'post')\n    ..aOS(5, _omitFieldNames ? '' : 'delete')\n    ..aOS(6, _omitFieldNames ? '' : 'patch')\n    ..aOS(7, _omitFieldNames ? '' : 'body')\n    ..aOM<CustomHttpPattern>(8, _omitFieldNames ? '' : 'custom',\n        subBuilder: CustomHttpPattern.create)\n    ..pPM<HttpRule>(11, _omitFieldNames ? '' : 'additionalBindings',\n        subBuilder: HttpRule.create)\n    ..aOS(12, _omitFieldNames ? '' : 'responseBody')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  HttpRule clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  HttpRule copyWith(void Function(HttpRule) updates) =>\n      super.copyWith((message) => updates(message as HttpRule)) as HttpRule;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static HttpRule create() => HttpRule._();\n  @$core.override\n  HttpRule createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static HttpRule getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<HttpRule>(create);\n  static HttpRule? _defaultInstance;\n\n  @$pb.TagNumber(2)\n  @$pb.TagNumber(3)\n  @$pb.TagNumber(4)\n  @$pb.TagNumber(5)\n  @$pb.TagNumber(6)\n  @$pb.TagNumber(8)\n  HttpRule_Pattern whichPattern() => _HttpRule_PatternByTag[$_whichOneof(0)]!;\n  @$pb.TagNumber(2)\n  @$pb.TagNumber(3)\n  @$pb.TagNumber(4)\n  @$pb.TagNumber(5)\n  @$pb.TagNumber(6)\n  @$pb.TagNumber(8)\n  void clearPattern() => $_clearField($_whichOneof(0));\n\n  /// Selects a method to which this rule applies.\n  ///\n  /// Refer to [selector][google.api.DocumentationRule.selector] for syntax\n  /// details.\n  @$pb.TagNumber(1)\n  $core.String get selector => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set selector($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSelector() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSelector() => $_clearField(1);\n\n  /// Maps to HTTP GET. Used for listing and getting information about\n  /// resources.\n  @$pb.TagNumber(2)\n  $core.String get get => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set get($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasGet() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearGet() => $_clearField(2);\n\n  /// Maps to HTTP PUT. Used for replacing a resource.\n  @$pb.TagNumber(3)\n  $core.String get put => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set put($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasPut() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearPut() => $_clearField(3);\n\n  /// Maps to HTTP POST. Used for creating a resource or performing an action.\n  @$pb.TagNumber(4)\n  $core.String get post => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set post($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasPost() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearPost() => $_clearField(4);\n\n  /// Maps to HTTP DELETE. Used for deleting a resource.\n  @$pb.TagNumber(5)\n  $core.String get delete => $_getSZ(4);\n  @$pb.TagNumber(5)\n  set delete($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasDelete() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearDelete() => $_clearField(5);\n\n  /// Maps to HTTP PATCH. Used for updating a resource.\n  @$pb.TagNumber(6)\n  $core.String get patch => $_getSZ(5);\n  @$pb.TagNumber(6)\n  set patch($core.String value) => $_setString(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasPatch() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearPatch() => $_clearField(6);\n\n  /// The name of the request field whose value is mapped to the HTTP request\n  /// body, or `*` for mapping all request fields not captured by the path\n  /// pattern to the HTTP body, or omitted for not having any HTTP request body.\n  ///\n  /// NOTE: the referred field must be present at the top-level of the request\n  /// message type.\n  @$pb.TagNumber(7)\n  $core.String get body => $_getSZ(6);\n  @$pb.TagNumber(7)\n  set body($core.String value) => $_setString(6, value);\n  @$pb.TagNumber(7)\n  $core.bool hasBody() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearBody() => $_clearField(7);\n\n  /// The custom pattern is used for specifying an HTTP method that is not\n  /// included in the `pattern` field, such as HEAD, or \"*\" to leave the\n  /// HTTP method unspecified for this rule. The wild-card rule is useful\n  /// for services that provide content to Web (HTML) clients.\n  @$pb.TagNumber(8)\n  CustomHttpPattern get custom => $_getN(7);\n  @$pb.TagNumber(8)\n  set custom(CustomHttpPattern value) => $_setField(8, value);\n  @$pb.TagNumber(8)\n  $core.bool hasCustom() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearCustom() => $_clearField(8);\n  @$pb.TagNumber(8)\n  CustomHttpPattern ensureCustom() => $_ensure(7);\n\n  /// Additional HTTP bindings for the selector. Nested bindings must\n  /// not contain an `additional_bindings` field themselves (that is,\n  /// the nesting may only be one level deep).\n  @$pb.TagNumber(11)\n  $pb.PbList<HttpRule> get additionalBindings => $_getList(8);\n\n  /// Optional. The name of the response field whose value is mapped to the HTTP\n  /// response body. When omitted, the entire response message will be used\n  /// as the HTTP response body.\n  ///\n  /// NOTE: The referred field must be present at the top-level of the response\n  /// message type.\n  @$pb.TagNumber(12)\n  $core.String get responseBody => $_getSZ(9);\n  @$pb.TagNumber(12)\n  set responseBody($core.String value) => $_setString(9, value);\n  @$pb.TagNumber(12)\n  $core.bool hasResponseBody() => $_has(9);\n  @$pb.TagNumber(12)\n  void clearResponseBody() => $_clearField(12);\n}\n\n/// A custom pattern is used for defining custom HTTP verb.\nclass CustomHttpPattern extends $pb.GeneratedMessage {\n  factory CustomHttpPattern({\n    $core.String? kind,\n    $core.String? path,\n  }) {\n    final result = create();\n    if (kind != null) result.kind = kind;\n    if (path != null) result.path = path;\n    return result;\n  }\n\n  CustomHttpPattern._();\n\n  factory CustomHttpPattern.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CustomHttpPattern.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CustomHttpPattern',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'kind')\n    ..aOS(2, _omitFieldNames ? '' : 'path')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CustomHttpPattern clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CustomHttpPattern copyWith(void Function(CustomHttpPattern) updates) =>\n      super.copyWith((message) => updates(message as CustomHttpPattern))\n          as CustomHttpPattern;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CustomHttpPattern create() => CustomHttpPattern._();\n  @$core.override\n  CustomHttpPattern createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CustomHttpPattern getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CustomHttpPattern>(create);\n  static CustomHttpPattern? _defaultInstance;\n\n  /// The name of this custom HTTP verb.\n  @$pb.TagNumber(1)\n  $core.String get kind => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set kind($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasKind() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearKind() => $_clearField(1);\n\n  /// The path matched by this custom verb.\n  @$pb.TagNumber(2)\n  $core.String get path => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set path($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPath() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPath() => $_clearField(2);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/api/http.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/api/http.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/api/launch_stage.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/api/launch_stage.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'launch_stage.pbenum.dart';\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/api/launch_stage.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/api/launch_stage.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// The launch stage as defined by [Google Cloud Platform\n/// Launch Stages](https://cloud.google.com/terms/launch-stages).\nclass LaunchStage extends $pb.ProtobufEnum {\n  /// Do not use this default value.\n  static const LaunchStage LAUNCH_STAGE_UNSPECIFIED =\n      LaunchStage._(0, _omitEnumNames ? '' : 'LAUNCH_STAGE_UNSPECIFIED');\n\n  /// The feature is not yet implemented. Users can not use it.\n  static const LaunchStage UNIMPLEMENTED =\n      LaunchStage._(6, _omitEnumNames ? '' : 'UNIMPLEMENTED');\n\n  /// Prelaunch features are hidden from users and are only visible internally.\n  static const LaunchStage PRELAUNCH =\n      LaunchStage._(7, _omitEnumNames ? '' : 'PRELAUNCH');\n\n  /// Early Access features are limited to a closed group of testers. To use\n  /// these features, you must sign up in advance and sign a Trusted Tester\n  /// agreement (which includes confidentiality provisions). These features may\n  /// be unstable, changed in backward-incompatible ways, and are not\n  /// guaranteed to be released.\n  static const LaunchStage EARLY_ACCESS =\n      LaunchStage._(1, _omitEnumNames ? '' : 'EARLY_ACCESS');\n\n  /// Alpha is a limited availability test for releases before they are cleared\n  /// for widespread use. By Alpha, all significant design issues are resolved\n  /// and we are in the process of verifying functionality. Alpha customers\n  /// need to apply for access, agree to applicable terms, and have their\n  /// projects allowlisted. Alpha releases don't have to be feature complete,\n  /// no SLAs are provided, and there are no technical support obligations, but\n  /// they will be far enough along that customers can actually use them in\n  /// test environments or for limited-use tests -- just like they would in\n  /// normal production cases.\n  static const LaunchStage ALPHA =\n      LaunchStage._(2, _omitEnumNames ? '' : 'ALPHA');\n\n  /// Beta is the point at which we are ready to open a release for any\n  /// customer to use. There are no SLA or technical support obligations in a\n  /// Beta release. Products will be complete from a feature perspective, but\n  /// may have some open outstanding issues. Beta releases are suitable for\n  /// limited production use cases.\n  static const LaunchStage BETA =\n      LaunchStage._(3, _omitEnumNames ? '' : 'BETA');\n\n  /// GA features are open to all developers and are considered stable and\n  /// fully qualified for production use.\n  static const LaunchStage GA = LaunchStage._(4, _omitEnumNames ? '' : 'GA');\n\n  /// Deprecated features are scheduled to be shut down and removed. For more\n  /// information, see the \"Deprecation Policy\" section of our [Terms of\n  /// Service](https://cloud.google.com/terms/)\n  /// and the [Google Cloud Platform Subject to the Deprecation\n  /// Policy](https://cloud.google.com/terms/deprecation) documentation.\n  static const LaunchStage DEPRECATED =\n      LaunchStage._(5, _omitEnumNames ? '' : 'DEPRECATED');\n\n  static const $core.List<LaunchStage> values = <LaunchStage>[\n    LAUNCH_STAGE_UNSPECIFIED,\n    UNIMPLEMENTED,\n    PRELAUNCH,\n    EARLY_ACCESS,\n    ALPHA,\n    BETA,\n    GA,\n    DEPRECATED,\n  ];\n\n  static final $core.List<LaunchStage?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 7);\n  static LaunchStage? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const LaunchStage._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/api/routing.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/api/routing.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// Specifies the routing information that should be sent along with the request\n/// in the form of routing header.\n/// **NOTE:** All service configuration rules follow the \"last one wins\" order.\n///\n/// The examples below will apply to an RPC which has the following request type:\n///\n/// Message Definition:\n///\n///     message Request {\n///       // The name of the Table\n///       // Values can be of the following formats:\n///       // - `projects/<project>/tables/<table>`\n///       // - `projects/<project>/instances/<instance>/tables/<table>`\n///       // - `region/<region>/zones/<zone>/tables/<table>`\n///       string table_name = 1;\n///\n///       // This value specifies routing for replication.\n///       // It can be in the following formats:\n///       // - `profiles/<profile_id>`\n///       // - a legacy `profile_id` that can be any string\n///       string app_profile_id = 2;\n///     }\n///\n/// Example message:\n///\n///     {\n///       table_name: projects/proj_foo/instances/instance_bar/table/table_baz,\n///       app_profile_id: profiles/prof_qux\n///     }\n///\n/// The routing header consists of one or multiple key-value pairs. Every key\n/// and value must be percent-encoded, and joined together in the format of\n/// `key1=value1&key2=value2`.\n/// The examples below skip the percent-encoding for readability.\n///\n/// Example 1\n///\n/// Extracting a field from the request to put into the routing header\n/// unchanged, with the key equal to the field name.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // Take the `app_profile_id`.\n///       routing_parameters {\n///         field: \"app_profile_id\"\n///       }\n///     };\n///\n/// result:\n///\n///     x-goog-request-params: app_profile_id=profiles/prof_qux\n///\n/// Example 2\n///\n/// Extracting a field from the request to put into the routing header\n/// unchanged, with the key different from the field name.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // Take the `app_profile_id`, but name it `routing_id` in the header.\n///       routing_parameters {\n///         field: \"app_profile_id\"\n///         path_template: \"{routing_id=**}\"\n///       }\n///     };\n///\n/// result:\n///\n///     x-goog-request-params: routing_id=profiles/prof_qux\n///\n/// Example 3\n///\n/// Extracting a field from the request to put into the routing\n/// header, while matching a path template syntax on the field's value.\n///\n/// NB: it is more useful to send nothing than to send garbage for the purpose\n/// of dynamic routing, since garbage pollutes cache. Thus the matching.\n///\n/// Sub-example 3a\n///\n/// The field matches the template.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // Take the `table_name`, if it's well-formed (with project-based\n///       // syntax).\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{table_name=projects/*/instances/*/**}\"\n///       }\n///     };\n///\n/// result:\n///\n///     x-goog-request-params:\n///     table_name=projects/proj_foo/instances/instance_bar/table/table_baz\n///\n/// Sub-example 3b\n///\n/// The field does not match the template.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // Take the `table_name`, if it's well-formed (with region-based\n///       // syntax).\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{table_name=regions/*/zones/*/**}\"\n///       }\n///     };\n///\n/// result:\n///\n///     <no routing header will be sent>\n///\n/// Sub-example 3c\n///\n/// Multiple alternative conflictingly named path templates are\n/// specified. The one that matches is used to construct the header.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // Take the `table_name`, if it's well-formed, whether\n///       // using the region- or projects-based syntax.\n///\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{table_name=regions/*/zones/*/**}\"\n///       }\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{table_name=projects/*/instances/*/**}\"\n///       }\n///     };\n///\n/// result:\n///\n///     x-goog-request-params:\n///     table_name=projects/proj_foo/instances/instance_bar/table/table_baz\n///\n/// Example 4\n///\n/// Extracting a single routing header key-value pair by matching a\n/// template syntax on (a part of) a single request field.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // Take just the project id from the `table_name` field.\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{routing_id=projects/*}/**\"\n///       }\n///     };\n///\n/// result:\n///\n///     x-goog-request-params: routing_id=projects/proj_foo\n///\n/// Example 5\n///\n/// Extracting a single routing header key-value pair by matching\n/// several conflictingly named path templates on (parts of) a single request\n/// field. The last template to match \"wins\" the conflict.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // If the `table_name` does not have instances information,\n///       // take just the project id for routing.\n///       // Otherwise take project + instance.\n///\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{routing_id=projects/*}/**\"\n///       }\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{routing_id=projects/*/instances/*}/**\"\n///       }\n///     };\n///\n/// result:\n///\n///     x-goog-request-params:\n///     routing_id=projects/proj_foo/instances/instance_bar\n///\n/// Example 6\n///\n/// Extracting multiple routing header key-value pairs by matching\n/// several non-conflicting path templates on (parts of) a single request field.\n///\n/// Sub-example 6a\n///\n/// Make the templates strict, so that if the `table_name` does not\n/// have an instance information, nothing is sent.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // The routing code needs two keys instead of one composite\n///       // but works only for the tables with the \"project-instance\" name\n///       // syntax.\n///\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{project_id=projects/*}/instances/*/**\"\n///       }\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"projects/*/{instance_id=instances/*}/**\"\n///       }\n///     };\n///\n/// result:\n///\n///     x-goog-request-params:\n///     project_id=projects/proj_foo&instance_id=instances/instance_bar\n///\n/// Sub-example 6b\n///\n/// Make the templates loose, so that if the `table_name` does not\n/// have an instance information, just the project id part is sent.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // The routing code wants two keys instead of one composite\n///       // but will work with just the `project_id` for tables without\n///       // an instance in the `table_name`.\n///\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{project_id=projects/*}/**\"\n///       }\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"projects/*/{instance_id=instances/*}/**\"\n///       }\n///     };\n///\n/// result (is the same as 6a for our example message because it has the instance\n/// information):\n///\n///     x-goog-request-params:\n///     project_id=projects/proj_foo&instance_id=instances/instance_bar\n///\n/// Example 7\n///\n/// Extracting multiple routing header key-value pairs by matching\n/// several path templates on multiple request fields.\n///\n/// NB: note that here there is no way to specify sending nothing if one of the\n/// fields does not match its template. E.g. if the `table_name` is in the wrong\n/// format, the `project_id` will not be sent, but the `routing_id` will be.\n/// The backend routing code has to be aware of that and be prepared to not\n/// receive a full complement of keys if it expects multiple.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // The routing needs both `project_id` and `routing_id`\n///       // (from the `app_profile_id` field) for routing.\n///\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{project_id=projects/*}/**\"\n///       }\n///       routing_parameters {\n///         field: \"app_profile_id\"\n///         path_template: \"{routing_id=**}\"\n///       }\n///     };\n///\n/// result:\n///\n///     x-goog-request-params:\n///     project_id=projects/proj_foo&routing_id=profiles/prof_qux\n///\n/// Example 8\n///\n/// Extracting a single routing header key-value pair by matching\n/// several conflictingly named path templates on several request fields. The\n/// last template to match \"wins\" the conflict.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // The `routing_id` can be a project id or a region id depending on\n///       // the table name format, but only if the `app_profile_id` is not set.\n///       // If `app_profile_id` is set it should be used instead.\n///\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{routing_id=projects/*}/**\"\n///       }\n///       routing_parameters {\n///          field: \"table_name\"\n///          path_template: \"{routing_id=regions/*}/**\"\n///       }\n///       routing_parameters {\n///         field: \"app_profile_id\"\n///         path_template: \"{routing_id=**}\"\n///       }\n///     };\n///\n/// result:\n///\n///     x-goog-request-params: routing_id=profiles/prof_qux\n///\n/// Example 9\n///\n/// Bringing it all together.\n///\n/// annotation:\n///\n///     option (google.api.routing) = {\n///       // For routing both `table_location` and a `routing_id` are needed.\n///       //\n///       // table_location can be either an instance id or a region+zone id.\n///       //\n///       // For `routing_id`, take the value of `app_profile_id`\n///       // - If it's in the format `profiles/<profile_id>`, send\n///       // just the `<profile_id>` part.\n///       // - If it's any other literal, send it as is.\n///       // If the `app_profile_id` is empty, and the `table_name` starts with\n///       // the project_id, send that instead.\n///\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"projects/*/{table_location=instances/*}/tables/*\"\n///       }\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{table_location=regions/*/zones/*}/tables/*\"\n///       }\n///       routing_parameters {\n///         field: \"table_name\"\n///         path_template: \"{routing_id=projects/*}/**\"\n///       }\n///       routing_parameters {\n///         field: \"app_profile_id\"\n///         path_template: \"{routing_id=**}\"\n///       }\n///       routing_parameters {\n///         field: \"app_profile_id\"\n///         path_template: \"profiles/{routing_id=*}\"\n///       }\n///     };\n///\n/// result:\n///\n///     x-goog-request-params:\n///     table_location=instances/instance_bar&routing_id=prof_qux\nclass RoutingRule extends $pb.GeneratedMessage {\n  factory RoutingRule({\n    $core.Iterable<RoutingParameter>? routingParameters,\n  }) {\n    final result = create();\n    if (routingParameters != null)\n      result.routingParameters.addAll(routingParameters);\n    return result;\n  }\n\n  RoutingRule._();\n\n  factory RoutingRule.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory RoutingRule.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'RoutingRule',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..pPM<RoutingParameter>(2, _omitFieldNames ? '' : 'routingParameters',\n        subBuilder: RoutingParameter.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  RoutingRule clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  RoutingRule copyWith(void Function(RoutingRule) updates) =>\n      super.copyWith((message) => updates(message as RoutingRule))\n          as RoutingRule;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static RoutingRule create() => RoutingRule._();\n  @$core.override\n  RoutingRule createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static RoutingRule getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<RoutingRule>(create);\n  static RoutingRule? _defaultInstance;\n\n  /// A collection of Routing Parameter specifications.\n  /// **NOTE:** If multiple Routing Parameters describe the same key\n  /// (via the `path_template` field or via the `field` field when\n  /// `path_template` is not provided), \"last one wins\" rule\n  /// determines which Parameter gets used.\n  /// See the examples for more details.\n  @$pb.TagNumber(2)\n  $pb.PbList<RoutingParameter> get routingParameters => $_getList(0);\n}\n\n/// A projection from an input message to the GRPC or REST header.\nclass RoutingParameter extends $pb.GeneratedMessage {\n  factory RoutingParameter({\n    $core.String? field_1,\n    $core.String? pathTemplate,\n  }) {\n    final result = create();\n    if (field_1 != null) result.field_1 = field_1;\n    if (pathTemplate != null) result.pathTemplate = pathTemplate;\n    return result;\n  }\n\n  RoutingParameter._();\n\n  factory RoutingParameter.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory RoutingParameter.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'RoutingParameter',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'field')\n    ..aOS(2, _omitFieldNames ? '' : 'pathTemplate')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  RoutingParameter clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  RoutingParameter copyWith(void Function(RoutingParameter) updates) =>\n      super.copyWith((message) => updates(message as RoutingParameter))\n          as RoutingParameter;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static RoutingParameter create() => RoutingParameter._();\n  @$core.override\n  RoutingParameter createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static RoutingParameter getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<RoutingParameter>(create);\n  static RoutingParameter? _defaultInstance;\n\n  /// A request field to extract the header key-value pair from.\n  @$pb.TagNumber(1)\n  $core.String get field_1 => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set field_1($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasField_1() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearField_1() => $_clearField(1);\n\n  /// A pattern matching the key-value field. Optional.\n  /// If not specified, the whole field specified in the `field` field will be\n  /// taken as value, and its name used as key. If specified, it MUST contain\n  /// exactly one named segment (along with any number of unnamed segments) The\n  /// pattern will be matched over the field specified in the `field` field, then\n  /// if the match is successful:\n  /// - the name of the single named segment will be used as a header name,\n  /// - the match value of the segment will be used as a header value;\n  /// if the match is NOT successful, nothing will be sent.\n  ///\n  /// Example:\n  ///\n  ///               -- This is a field in the request message\n  ///              |   that the header value will be extracted from.\n  ///              |\n  ///              |                     -- This is the key name in the\n  ///              |                    |   routing header.\n  ///              V                    |\n  ///     field: \"table_name\"           v\n  ///     path_template: \"projects/*/{table_location=instances/*}/tables/*\"\n  ///                                                ^            ^\n  ///                                                |            |\n  ///       In the {} brackets is the pattern that --             |\n  ///       specifies what to extract from the                    |\n  ///       field as a value to be sent.                          |\n  ///                                                             |\n  ///      The string in the field must match the whole pattern --\n  ///      before brackets, inside brackets, after brackets.\n  ///\n  /// When looking at this specific example, we can see that:\n  /// - A key-value pair with the key `table_location`\n  ///   and the value matching `instances/*` should be added\n  ///   to the x-goog-request-params routing header.\n  /// - The value is extracted from the request message's `table_name` field\n  ///   if it matches the full pattern specified:\n  ///   `projects/*/instances/*/tables/*`.\n  ///\n  /// **NB:** If the `path_template` field is not provided, the key name is\n  /// equal to the field name, and the whole field should be sent as a value.\n  /// This makes the pattern for the field and the value functionally equivalent\n  /// to `**`, and the configuration\n  ///\n  ///     {\n  ///       field: \"table_name\"\n  ///     }\n  ///\n  /// is a functionally equivalent shorthand to:\n  ///\n  ///     {\n  ///       field: \"table_name\"\n  ///       path_template: \"{table_name=**}\"\n  ///     }\n  ///\n  /// See Example 1 for more details.\n  @$pb.TagNumber(2)\n  $core.String get pathTemplate => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set pathTemplate($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPathTemplate() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPathTemplate() => $_clearField(2);\n}\n\nclass Routing {\n  static final routing = $pb.Extension<RoutingRule>(\n      _omitMessageNames ? '' : 'google.protobuf.MethodOptions',\n      _omitFieldNames ? '' : 'routing',\n      72295729,\n      $pb.PbFieldType.OM,\n      defaultOrMaker: RoutingRule.getDefault,\n      subBuilder: RoutingRule.create);\n  static void registerAllExtensions($pb.ExtensionRegistry registry) {\n    registry.add(routing);\n  }\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/api/routing.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/api/routing.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/protobuf/compiler/plugin.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/compiler/plugin.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport '../descriptor.pb.dart' as $0;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'plugin.pbenum.dart';\n\n/// The version number of protocol compiler.\nclass Version extends $pb.GeneratedMessage {\n  factory Version({\n    $core.int? major,\n    $core.int? minor,\n    $core.int? patch,\n    $core.String? suffix,\n  }) {\n    final result = create();\n    if (major != null) result.major = major;\n    if (minor != null) result.minor = minor;\n    if (patch != null) result.patch = patch;\n    if (suffix != null) result.suffix = suffix;\n    return result;\n  }\n\n  Version._();\n\n  factory Version.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Version.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Version',\n      package: const $pb.PackageName(\n          _omitMessageNames ? '' : 'google.protobuf.compiler'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'major')\n    ..aI(2, _omitFieldNames ? '' : 'minor')\n    ..aI(3, _omitFieldNames ? '' : 'patch')\n    ..aOS(4, _omitFieldNames ? '' : 'suffix')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Version clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Version copyWith(void Function(Version) updates) =>\n      super.copyWith((message) => updates(message as Version)) as Version;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Version create() => Version._();\n  @$core.override\n  Version createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Version getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Version>(create);\n  static Version? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.int get major => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set major($core.int value) => $_setSignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasMajor() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearMajor() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $core.int get minor => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set minor($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasMinor() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearMinor() => $_clearField(2);\n\n  @$pb.TagNumber(3)\n  $core.int get patch => $_getIZ(2);\n  @$pb.TagNumber(3)\n  set patch($core.int value) => $_setSignedInt32(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasPatch() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearPatch() => $_clearField(3);\n\n  /// A suffix for alpha, beta or rc release, e.g., \"alpha-1\", \"rc2\". It should\n  /// be empty for mainline stable releases.\n  @$pb.TagNumber(4)\n  $core.String get suffix => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set suffix($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasSuffix() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearSuffix() => $_clearField(4);\n}\n\n/// An encoded CodeGeneratorRequest is written to the plugin's stdin.\nclass CodeGeneratorRequest extends $pb.GeneratedMessage {\n  factory CodeGeneratorRequest({\n    $core.Iterable<$core.String>? fileToGenerate,\n    $core.String? parameter,\n    Version? compilerVersion,\n    $core.Iterable<$0.FileDescriptorProto>? protoFile,\n    $core.Iterable<$0.FileDescriptorProto>? sourceFileDescriptors,\n  }) {\n    final result = create();\n    if (fileToGenerate != null) result.fileToGenerate.addAll(fileToGenerate);\n    if (parameter != null) result.parameter = parameter;\n    if (compilerVersion != null) result.compilerVersion = compilerVersion;\n    if (protoFile != null) result.protoFile.addAll(protoFile);\n    if (sourceFileDescriptors != null)\n      result.sourceFileDescriptors.addAll(sourceFileDescriptors);\n    return result;\n  }\n\n  CodeGeneratorRequest._();\n\n  factory CodeGeneratorRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CodeGeneratorRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CodeGeneratorRequest',\n      package: const $pb.PackageName(\n          _omitMessageNames ? '' : 'google.protobuf.compiler'),\n      createEmptyInstance: create)\n    ..pPS(1, _omitFieldNames ? '' : 'fileToGenerate')\n    ..aOS(2, _omitFieldNames ? '' : 'parameter')\n    ..aOM<Version>(3, _omitFieldNames ? '' : 'compilerVersion',\n        subBuilder: Version.create)\n    ..pPM<$0.FileDescriptorProto>(15, _omitFieldNames ? '' : 'protoFile',\n        subBuilder: $0.FileDescriptorProto.create)\n    ..pPM<$0.FileDescriptorProto>(\n        17, _omitFieldNames ? '' : 'sourceFileDescriptors',\n        subBuilder: $0.FileDescriptorProto.create);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CodeGeneratorRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CodeGeneratorRequest copyWith(void Function(CodeGeneratorRequest) updates) =>\n      super.copyWith((message) => updates(message as CodeGeneratorRequest))\n          as CodeGeneratorRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CodeGeneratorRequest create() => CodeGeneratorRequest._();\n  @$core.override\n  CodeGeneratorRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CodeGeneratorRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CodeGeneratorRequest>(create);\n  static CodeGeneratorRequest? _defaultInstance;\n\n  /// The .proto files that were explicitly listed on the command-line.  The\n  /// code generator should generate code only for these files.  Each file's\n  /// descriptor will be included in proto_file, below.\n  @$pb.TagNumber(1)\n  $pb.PbList<$core.String> get fileToGenerate => $_getList(0);\n\n  /// The generator parameter passed on the command-line.\n  @$pb.TagNumber(2)\n  $core.String get parameter => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set parameter($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasParameter() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearParameter() => $_clearField(2);\n\n  /// The version number of protocol compiler.\n  @$pb.TagNumber(3)\n  Version get compilerVersion => $_getN(2);\n  @$pb.TagNumber(3)\n  set compilerVersion(Version value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasCompilerVersion() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearCompilerVersion() => $_clearField(3);\n  @$pb.TagNumber(3)\n  Version ensureCompilerVersion() => $_ensure(2);\n\n  /// FileDescriptorProtos for all files in files_to_generate and everything\n  /// they import.  The files will appear in topological order, so each file\n  /// appears before any file that imports it.\n  ///\n  /// Note: the files listed in files_to_generate will include runtime-retention\n  /// options only, but all other files will include source-retention options.\n  /// The source_file_descriptors field below is available in case you need\n  /// source-retention options for files_to_generate.\n  ///\n  /// protoc guarantees that all proto_files will be written after\n  /// the fields above, even though this is not technically guaranteed by the\n  /// protobuf wire format.  This theoretically could allow a plugin to stream\n  /// in the FileDescriptorProtos and handle them one by one rather than read\n  /// the entire set into memory at once.  However, as of this writing, this\n  /// is not similarly optimized on protoc's end -- it will store all fields in\n  /// memory at once before sending them to the plugin.\n  ///\n  /// Type names of fields and extensions in the FileDescriptorProto are always\n  /// fully qualified.\n  @$pb.TagNumber(15)\n  $pb.PbList<$0.FileDescriptorProto> get protoFile => $_getList(3);\n\n  /// File descriptors with all options, including source-retention options.\n  /// These descriptors are only provided for the files listed in\n  /// files_to_generate.\n  @$pb.TagNumber(17)\n  $pb.PbList<$0.FileDescriptorProto> get sourceFileDescriptors => $_getList(4);\n}\n\n/// Represents a single generated file.\nclass CodeGeneratorResponse_File extends $pb.GeneratedMessage {\n  factory CodeGeneratorResponse_File({\n    $core.String? name,\n    $core.String? insertionPoint,\n    $core.String? content,\n    $0.GeneratedCodeInfo? generatedCodeInfo,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (insertionPoint != null) result.insertionPoint = insertionPoint;\n    if (content != null) result.content = content;\n    if (generatedCodeInfo != null) result.generatedCodeInfo = generatedCodeInfo;\n    return result;\n  }\n\n  CodeGeneratorResponse_File._();\n\n  factory CodeGeneratorResponse_File.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CodeGeneratorResponse_File.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CodeGeneratorResponse.File',\n      package: const $pb.PackageName(\n          _omitMessageNames ? '' : 'google.protobuf.compiler'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aOS(2, _omitFieldNames ? '' : 'insertionPoint')\n    ..aOS(15, _omitFieldNames ? '' : 'content')\n    ..aOM<$0.GeneratedCodeInfo>(16, _omitFieldNames ? '' : 'generatedCodeInfo',\n        subBuilder: $0.GeneratedCodeInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CodeGeneratorResponse_File clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CodeGeneratorResponse_File copyWith(\n          void Function(CodeGeneratorResponse_File) updates) =>\n      super.copyWith(\n              (message) => updates(message as CodeGeneratorResponse_File))\n          as CodeGeneratorResponse_File;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CodeGeneratorResponse_File create() => CodeGeneratorResponse_File._();\n  @$core.override\n  CodeGeneratorResponse_File createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CodeGeneratorResponse_File getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CodeGeneratorResponse_File>(create);\n  static CodeGeneratorResponse_File? _defaultInstance;\n\n  /// The file name, relative to the output directory.  The name must not\n  /// contain \".\" or \"..\" components and must be relative, not be absolute (so,\n  /// the file cannot lie outside the output directory).  \"/\" must be used as\n  /// the path separator, not \"\\\".\n  ///\n  /// If the name is omitted, the content will be appended to the previous\n  /// file.  This allows the generator to break large files into small chunks,\n  /// and allows the generated text to be streamed back to protoc so that large\n  /// files need not reside completely in memory at one time.  Note that as of\n  /// this writing protoc does not optimize for this -- it will read the entire\n  /// CodeGeneratorResponse before writing files to disk.\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// If non-empty, indicates that the named file should already exist, and the\n  /// content here is to be inserted into that file at a defined insertion\n  /// point.  This feature allows a code generator to extend the output\n  /// produced by another code generator.  The original generator may provide\n  /// insertion points by placing special annotations in the file that look\n  /// like:\n  ///   @@protoc_insertion_point(NAME)\n  /// The annotation can have arbitrary text before and after it on the line,\n  /// which allows it to be placed in a comment.  NAME should be replaced with\n  /// an identifier naming the point -- this is what other generators will use\n  /// as the insertion_point.  Code inserted at this point will be placed\n  /// immediately above the line containing the insertion point (thus multiple\n  /// insertions to the same point will come out in the order they were added).\n  /// The double-@ is intended to make it unlikely that the generated code\n  /// could contain things that look like insertion points by accident.\n  ///\n  /// For example, the C++ code generator places the following line in the\n  /// .pb.h files that it generates:\n  ///   // @@protoc_insertion_point(namespace_scope)\n  /// This line appears within the scope of the file's package namespace, but\n  /// outside of any particular class.  Another plugin can then specify the\n  /// insertion_point \"namespace_scope\" to generate additional classes or\n  /// other declarations that should be placed in this scope.\n  ///\n  /// Note that if the line containing the insertion point begins with\n  /// whitespace, the same whitespace will be added to every line of the\n  /// inserted text.  This is useful for languages like Python, where\n  /// indentation matters.  In these languages, the insertion point comment\n  /// should be indented the same amount as any inserted code will need to be\n  /// in order to work correctly in that context.\n  ///\n  /// The code generator that generates the initial file and the one which\n  /// inserts into it must both run as part of a single invocation of protoc.\n  /// Code generators are executed in the order in which they appear on the\n  /// command line.\n  ///\n  /// If |insertion_point| is present, |name| must also be present.\n  @$pb.TagNumber(2)\n  $core.String get insertionPoint => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set insertionPoint($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasInsertionPoint() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearInsertionPoint() => $_clearField(2);\n\n  /// The file contents.\n  @$pb.TagNumber(15)\n  $core.String get content => $_getSZ(2);\n  @$pb.TagNumber(15)\n  set content($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(15)\n  $core.bool hasContent() => $_has(2);\n  @$pb.TagNumber(15)\n  void clearContent() => $_clearField(15);\n\n  /// Information describing the file content being inserted. If an insertion\n  /// point is used, this information will be appropriately offset and inserted\n  /// into the code generation metadata for the generated files.\n  @$pb.TagNumber(16)\n  $0.GeneratedCodeInfo get generatedCodeInfo => $_getN(3);\n  @$pb.TagNumber(16)\n  set generatedCodeInfo($0.GeneratedCodeInfo value) => $_setField(16, value);\n  @$pb.TagNumber(16)\n  $core.bool hasGeneratedCodeInfo() => $_has(3);\n  @$pb.TagNumber(16)\n  void clearGeneratedCodeInfo() => $_clearField(16);\n  @$pb.TagNumber(16)\n  $0.GeneratedCodeInfo ensureGeneratedCodeInfo() => $_ensure(3);\n}\n\n/// The plugin writes an encoded CodeGeneratorResponse to stdout.\nclass CodeGeneratorResponse extends $pb.GeneratedMessage {\n  factory CodeGeneratorResponse({\n    $core.String? error,\n    $fixnum.Int64? supportedFeatures,\n    $core.int? minimumEdition,\n    $core.int? maximumEdition,\n    $core.Iterable<CodeGeneratorResponse_File>? file,\n  }) {\n    final result = create();\n    if (error != null) result.error = error;\n    if (supportedFeatures != null) result.supportedFeatures = supportedFeatures;\n    if (minimumEdition != null) result.minimumEdition = minimumEdition;\n    if (maximumEdition != null) result.maximumEdition = maximumEdition;\n    if (file != null) result.file.addAll(file);\n    return result;\n  }\n\n  CodeGeneratorResponse._();\n\n  factory CodeGeneratorResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CodeGeneratorResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CodeGeneratorResponse',\n      package: const $pb.PackageName(\n          _omitMessageNames ? '' : 'google.protobuf.compiler'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'error')\n    ..a<$fixnum.Int64>(\n        2, _omitFieldNames ? '' : 'supportedFeatures', $pb.PbFieldType.OU6,\n        defaultOrMaker: $fixnum.Int64.ZERO)\n    ..aI(3, _omitFieldNames ? '' : 'minimumEdition')\n    ..aI(4, _omitFieldNames ? '' : 'maximumEdition')\n    ..pPM<CodeGeneratorResponse_File>(15, _omitFieldNames ? '' : 'file',\n        subBuilder: CodeGeneratorResponse_File.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CodeGeneratorResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CodeGeneratorResponse copyWith(\n          void Function(CodeGeneratorResponse) updates) =>\n      super.copyWith((message) => updates(message as CodeGeneratorResponse))\n          as CodeGeneratorResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CodeGeneratorResponse create() => CodeGeneratorResponse._();\n  @$core.override\n  CodeGeneratorResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CodeGeneratorResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CodeGeneratorResponse>(create);\n  static CodeGeneratorResponse? _defaultInstance;\n\n  /// Error message.  If non-empty, code generation failed.  The plugin process\n  /// should exit with status code zero even if it reports an error in this way.\n  ///\n  /// This should be used to indicate errors in .proto files which prevent the\n  /// code generator from generating correct code.  Errors which indicate a\n  /// problem in protoc itself -- such as the input CodeGeneratorRequest being\n  /// unparseable -- should be reported by writing a message to stderr and\n  /// exiting with a non-zero status code.\n  @$pb.TagNumber(1)\n  $core.String get error => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set error($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasError() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearError() => $_clearField(1);\n\n  /// A bitmask of supported features that the code generator supports.\n  /// This is a bitwise \"or\" of values from the Feature enum.\n  @$pb.TagNumber(2)\n  $fixnum.Int64 get supportedFeatures => $_getI64(1);\n  @$pb.TagNumber(2)\n  set supportedFeatures($fixnum.Int64 value) => $_setInt64(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasSupportedFeatures() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearSupportedFeatures() => $_clearField(2);\n\n  /// The minimum edition this plugin supports.  This will be treated as an\n  /// Edition enum, but we want to allow unknown values.  It should be specified\n  /// according the edition enum value, *not* the edition number.  Only takes\n  /// effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.\n  @$pb.TagNumber(3)\n  $core.int get minimumEdition => $_getIZ(2);\n  @$pb.TagNumber(3)\n  set minimumEdition($core.int value) => $_setSignedInt32(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasMinimumEdition() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearMinimumEdition() => $_clearField(3);\n\n  /// The maximum edition this plugin supports.  This will be treated as an\n  /// Edition enum, but we want to allow unknown values.  It should be specified\n  /// according the edition enum value, *not* the edition number.  Only takes\n  /// effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.\n  @$pb.TagNumber(4)\n  $core.int get maximumEdition => $_getIZ(3);\n  @$pb.TagNumber(4)\n  set maximumEdition($core.int value) => $_setSignedInt32(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasMaximumEdition() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearMaximumEdition() => $_clearField(4);\n\n  @$pb.TagNumber(15)\n  $pb.PbList<CodeGeneratorResponse_File> get file => $_getList(4);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/protobuf/compiler/plugin.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/compiler/plugin.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// Sync with code_generator.h.\nclass CodeGeneratorResponse_Feature extends $pb.ProtobufEnum {\n  static const CodeGeneratorResponse_Feature FEATURE_NONE =\n      CodeGeneratorResponse_Feature._(0, _omitEnumNames ? '' : 'FEATURE_NONE');\n  static const CodeGeneratorResponse_Feature FEATURE_PROTO3_OPTIONAL =\n      CodeGeneratorResponse_Feature._(\n          1, _omitEnumNames ? '' : 'FEATURE_PROTO3_OPTIONAL');\n  static const CodeGeneratorResponse_Feature FEATURE_SUPPORTS_EDITIONS =\n      CodeGeneratorResponse_Feature._(\n          2, _omitEnumNames ? '' : 'FEATURE_SUPPORTS_EDITIONS');\n\n  static const $core.List<CodeGeneratorResponse_Feature> values =\n      <CodeGeneratorResponse_Feature>[\n    FEATURE_NONE,\n    FEATURE_PROTO3_OPTIONAL,\n    FEATURE_SUPPORTS_EDITIONS,\n  ];\n\n  static final $core.List<CodeGeneratorResponse_Feature?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static CodeGeneratorResponse_Feature? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const CodeGeneratorResponse_Feature._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/protobuf/dart_edition_defaults.pb.dart",
    "content": "// Generated with third_party/dart/protoc_plugin/tool/regenerate.sh.\n// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// ignore_for_file: constant_identifier_names\n\nconst ProtobufInternalDartEditionDefaults =\n    'ChcYhAciACoQCAEQAhgCIAMoATACOAJAAQoXGOcHIgAqEAgCEAEYASACKAEwATgCQAEKFxjoByIMCAEQARgBIAIoATABKgQ4AkABChcY6QciEAgBEAEYASACKAEwATgBQAIqACDmByjpBw==';\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/protobuf/descriptor.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/descriptor.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'descriptor.pbenum.dart';\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'descriptor.pbenum.dart';\n\n/// The protocol compiler can output a FileDescriptorSet containing the .proto\n/// files it parses.\nclass FileDescriptorSet extends $pb.GeneratedMessage {\n  factory FileDescriptorSet({\n    $core.Iterable<FileDescriptorProto>? file,\n  }) {\n    final result = create();\n    if (file != null) result.file.addAll(file);\n    return result;\n  }\n\n  FileDescriptorSet._();\n\n  factory FileDescriptorSet.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FileDescriptorSet.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FileDescriptorSet',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..pPM<FileDescriptorProto>(1, _omitFieldNames ? '' : 'file',\n        subBuilder: FileDescriptorProto.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FileDescriptorSet clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FileDescriptorSet copyWith(void Function(FileDescriptorSet) updates) =>\n      super.copyWith((message) => updates(message as FileDescriptorSet))\n          as FileDescriptorSet;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FileDescriptorSet create() => FileDescriptorSet._();\n  @$core.override\n  FileDescriptorSet createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FileDescriptorSet getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FileDescriptorSet>(create);\n  static FileDescriptorSet? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $pb.PbList<FileDescriptorProto> get file => $_getList(0);\n}\n\n/// Describes a complete .proto file.\nclass FileDescriptorProto extends $pb.GeneratedMessage {\n  factory FileDescriptorProto({\n    $core.String? name,\n    $core.String? package,\n    $core.Iterable<$core.String>? dependency,\n    $core.Iterable<DescriptorProto>? messageType,\n    $core.Iterable<EnumDescriptorProto>? enumType,\n    $core.Iterable<ServiceDescriptorProto>? service,\n    $core.Iterable<FieldDescriptorProto>? extension,\n    FileOptions? options,\n    SourceCodeInfo? sourceCodeInfo,\n    $core.Iterable<$core.int>? publicDependency,\n    $core.Iterable<$core.int>? weakDependency,\n    $core.String? syntax,\n    Edition? edition,\n    $core.Iterable<$core.String>? optionDependency,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (package != null) result.package = package;\n    if (dependency != null) result.dependency.addAll(dependency);\n    if (messageType != null) result.messageType.addAll(messageType);\n    if (enumType != null) result.enumType.addAll(enumType);\n    if (service != null) result.service.addAll(service);\n    if (extension != null) result.extension.addAll(extension);\n    if (options != null) result.options = options;\n    if (sourceCodeInfo != null) result.sourceCodeInfo = sourceCodeInfo;\n    if (publicDependency != null)\n      result.publicDependency.addAll(publicDependency);\n    if (weakDependency != null) result.weakDependency.addAll(weakDependency);\n    if (syntax != null) result.syntax = syntax;\n    if (edition != null) result.edition = edition;\n    if (optionDependency != null)\n      result.optionDependency.addAll(optionDependency);\n    return result;\n  }\n\n  FileDescriptorProto._();\n\n  factory FileDescriptorProto.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FileDescriptorProto.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FileDescriptorProto',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aOS(2, _omitFieldNames ? '' : 'package')\n    ..pPS(3, _omitFieldNames ? '' : 'dependency')\n    ..pPM<DescriptorProto>(4, _omitFieldNames ? '' : 'messageType',\n        subBuilder: DescriptorProto.create)\n    ..pPM<EnumDescriptorProto>(5, _omitFieldNames ? '' : 'enumType',\n        subBuilder: EnumDescriptorProto.create)\n    ..pPM<ServiceDescriptorProto>(6, _omitFieldNames ? '' : 'service',\n        subBuilder: ServiceDescriptorProto.create)\n    ..pPM<FieldDescriptorProto>(7, _omitFieldNames ? '' : 'extension',\n        subBuilder: FieldDescriptorProto.create)\n    ..aOM<FileOptions>(8, _omitFieldNames ? '' : 'options',\n        subBuilder: FileOptions.create)\n    ..aOM<SourceCodeInfo>(9, _omitFieldNames ? '' : 'sourceCodeInfo',\n        subBuilder: SourceCodeInfo.create)\n    ..p<$core.int>(\n        10, _omitFieldNames ? '' : 'publicDependency', $pb.PbFieldType.P3)\n    ..p<$core.int>(\n        11, _omitFieldNames ? '' : 'weakDependency', $pb.PbFieldType.P3)\n    ..aOS(12, _omitFieldNames ? '' : 'syntax')\n    ..aE<Edition>(14, _omitFieldNames ? '' : 'edition',\n        enumValues: Edition.values)\n    ..pPS(15, _omitFieldNames ? '' : 'optionDependency');\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FileDescriptorProto clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FileDescriptorProto copyWith(void Function(FileDescriptorProto) updates) =>\n      super.copyWith((message) => updates(message as FileDescriptorProto))\n          as FileDescriptorProto;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FileDescriptorProto create() => FileDescriptorProto._();\n  @$core.override\n  FileDescriptorProto createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FileDescriptorProto getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FileDescriptorProto>(create);\n  static FileDescriptorProto? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $core.String get package => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set package($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPackage() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPackage() => $_clearField(2);\n\n  /// Names of files imported by this file.\n  @$pb.TagNumber(3)\n  $pb.PbList<$core.String> get dependency => $_getList(2);\n\n  /// All top-level definitions in this file.\n  @$pb.TagNumber(4)\n  $pb.PbList<DescriptorProto> get messageType => $_getList(3);\n\n  @$pb.TagNumber(5)\n  $pb.PbList<EnumDescriptorProto> get enumType => $_getList(4);\n\n  @$pb.TagNumber(6)\n  $pb.PbList<ServiceDescriptorProto> get service => $_getList(5);\n\n  @$pb.TagNumber(7)\n  $pb.PbList<FieldDescriptorProto> get extension => $_getList(6);\n\n  @$pb.TagNumber(8)\n  FileOptions get options => $_getN(7);\n  @$pb.TagNumber(8)\n  set options(FileOptions value) => $_setField(8, value);\n  @$pb.TagNumber(8)\n  $core.bool hasOptions() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearOptions() => $_clearField(8);\n  @$pb.TagNumber(8)\n  FileOptions ensureOptions() => $_ensure(7);\n\n  /// This field contains optional information about the original source code.\n  /// You may safely remove this entire field without harming runtime\n  /// functionality of the descriptors -- the information is needed only by\n  /// development tools.\n  @$pb.TagNumber(9)\n  SourceCodeInfo get sourceCodeInfo => $_getN(8);\n  @$pb.TagNumber(9)\n  set sourceCodeInfo(SourceCodeInfo value) => $_setField(9, value);\n  @$pb.TagNumber(9)\n  $core.bool hasSourceCodeInfo() => $_has(8);\n  @$pb.TagNumber(9)\n  void clearSourceCodeInfo() => $_clearField(9);\n  @$pb.TagNumber(9)\n  SourceCodeInfo ensureSourceCodeInfo() => $_ensure(8);\n\n  /// Indexes of the public imported files in the dependency list above.\n  @$pb.TagNumber(10)\n  $pb.PbList<$core.int> get publicDependency => $_getList(9);\n\n  /// Indexes of the weak imported files in the dependency list.\n  /// For Google-internal migration only. Do not use.\n  @$pb.TagNumber(11)\n  $pb.PbList<$core.int> get weakDependency => $_getList(10);\n\n  /// The syntax of the proto file.\n  /// The supported values are \"proto2\", \"proto3\", and \"editions\".\n  ///\n  /// If `edition` is present, this value must be \"editions\".\n  /// WARNING: This field should only be used by protobuf plugins or special\n  /// cases like the proto compiler. Other uses are discouraged and\n  /// developers should rely on the protoreflect APIs for their client language.\n  @$pb.TagNumber(12)\n  $core.String get syntax => $_getSZ(11);\n  @$pb.TagNumber(12)\n  set syntax($core.String value) => $_setString(11, value);\n  @$pb.TagNumber(12)\n  $core.bool hasSyntax() => $_has(11);\n  @$pb.TagNumber(12)\n  void clearSyntax() => $_clearField(12);\n\n  /// The edition of the proto file.\n  /// WARNING: This field should only be used by protobuf plugins or special\n  /// cases like the proto compiler. Other uses are discouraged and\n  /// developers should rely on the protoreflect APIs for their client language.\n  @$pb.TagNumber(14)\n  Edition get edition => $_getN(12);\n  @$pb.TagNumber(14)\n  set edition(Edition value) => $_setField(14, value);\n  @$pb.TagNumber(14)\n  $core.bool hasEdition() => $_has(12);\n  @$pb.TagNumber(14)\n  void clearEdition() => $_clearField(14);\n\n  /// Names of files imported by this file purely for the purpose of providing\n  /// option extensions. These are excluded from the dependency list above.\n  @$pb.TagNumber(15)\n  $pb.PbList<$core.String> get optionDependency => $_getList(13);\n}\n\nclass DescriptorProto_ExtensionRange extends $pb.GeneratedMessage {\n  factory DescriptorProto_ExtensionRange({\n    $core.int? start,\n    $core.int? end,\n    ExtensionRangeOptions? options,\n  }) {\n    final result = create();\n    if (start != null) result.start = start;\n    if (end != null) result.end = end;\n    if (options != null) result.options = options;\n    return result;\n  }\n\n  DescriptorProto_ExtensionRange._();\n\n  factory DescriptorProto_ExtensionRange.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory DescriptorProto_ExtensionRange.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'DescriptorProto.ExtensionRange',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'start')\n    ..aI(2, _omitFieldNames ? '' : 'end')\n    ..aOM<ExtensionRangeOptions>(3, _omitFieldNames ? '' : 'options',\n        subBuilder: ExtensionRangeOptions.create);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DescriptorProto_ExtensionRange clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DescriptorProto_ExtensionRange copyWith(\n          void Function(DescriptorProto_ExtensionRange) updates) =>\n      super.copyWith(\n              (message) => updates(message as DescriptorProto_ExtensionRange))\n          as DescriptorProto_ExtensionRange;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static DescriptorProto_ExtensionRange create() =>\n      DescriptorProto_ExtensionRange._();\n  @$core.override\n  DescriptorProto_ExtensionRange createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static DescriptorProto_ExtensionRange getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<DescriptorProto_ExtensionRange>(create);\n  static DescriptorProto_ExtensionRange? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.int get start => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set start($core.int value) => $_setSignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasStart() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearStart() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $core.int get end => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set end($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasEnd() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearEnd() => $_clearField(2);\n\n  @$pb.TagNumber(3)\n  ExtensionRangeOptions get options => $_getN(2);\n  @$pb.TagNumber(3)\n  set options(ExtensionRangeOptions value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasOptions() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearOptions() => $_clearField(3);\n  @$pb.TagNumber(3)\n  ExtensionRangeOptions ensureOptions() => $_ensure(2);\n}\n\n/// Range of reserved tag numbers. Reserved tag numbers may not be used by\n/// fields or extension ranges in the same message. Reserved ranges may\n/// not overlap.\nclass DescriptorProto_ReservedRange extends $pb.GeneratedMessage {\n  factory DescriptorProto_ReservedRange({\n    $core.int? start,\n    $core.int? end,\n  }) {\n    final result = create();\n    if (start != null) result.start = start;\n    if (end != null) result.end = end;\n    return result;\n  }\n\n  DescriptorProto_ReservedRange._();\n\n  factory DescriptorProto_ReservedRange.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory DescriptorProto_ReservedRange.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'DescriptorProto.ReservedRange',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'start')\n    ..aI(2, _omitFieldNames ? '' : 'end')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DescriptorProto_ReservedRange clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DescriptorProto_ReservedRange copyWith(\n          void Function(DescriptorProto_ReservedRange) updates) =>\n      super.copyWith(\n              (message) => updates(message as DescriptorProto_ReservedRange))\n          as DescriptorProto_ReservedRange;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static DescriptorProto_ReservedRange create() =>\n      DescriptorProto_ReservedRange._();\n  @$core.override\n  DescriptorProto_ReservedRange createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static DescriptorProto_ReservedRange getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<DescriptorProto_ReservedRange>(create);\n  static DescriptorProto_ReservedRange? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.int get start => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set start($core.int value) => $_setSignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasStart() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearStart() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $core.int get end => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set end($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasEnd() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearEnd() => $_clearField(2);\n}\n\n/// Describes a message type.\nclass DescriptorProto extends $pb.GeneratedMessage {\n  factory DescriptorProto({\n    $core.String? name,\n    $core.Iterable<FieldDescriptorProto>? field,\n    $core.Iterable<DescriptorProto>? nestedType,\n    $core.Iterable<EnumDescriptorProto>? enumType,\n    $core.Iterable<DescriptorProto_ExtensionRange>? extensionRange,\n    $core.Iterable<FieldDescriptorProto>? extension,\n    MessageOptions? options,\n    $core.Iterable<OneofDescriptorProto>? oneofDecl,\n    $core.Iterable<DescriptorProto_ReservedRange>? reservedRange,\n    $core.Iterable<$core.String>? reservedName,\n    SymbolVisibility? visibility,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (field != null) result.field.addAll(field);\n    if (nestedType != null) result.nestedType.addAll(nestedType);\n    if (enumType != null) result.enumType.addAll(enumType);\n    if (extensionRange != null) result.extensionRange.addAll(extensionRange);\n    if (extension != null) result.extension.addAll(extension);\n    if (options != null) result.options = options;\n    if (oneofDecl != null) result.oneofDecl.addAll(oneofDecl);\n    if (reservedRange != null) result.reservedRange.addAll(reservedRange);\n    if (reservedName != null) result.reservedName.addAll(reservedName);\n    if (visibility != null) result.visibility = visibility;\n    return result;\n  }\n\n  DescriptorProto._();\n\n  factory DescriptorProto.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory DescriptorProto.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'DescriptorProto',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..pPM<FieldDescriptorProto>(2, _omitFieldNames ? '' : 'field',\n        subBuilder: FieldDescriptorProto.create)\n    ..pPM<DescriptorProto>(3, _omitFieldNames ? '' : 'nestedType',\n        subBuilder: DescriptorProto.create)\n    ..pPM<EnumDescriptorProto>(4, _omitFieldNames ? '' : 'enumType',\n        subBuilder: EnumDescriptorProto.create)\n    ..pPM<DescriptorProto_ExtensionRange>(\n        5, _omitFieldNames ? '' : 'extensionRange',\n        subBuilder: DescriptorProto_ExtensionRange.create)\n    ..pPM<FieldDescriptorProto>(6, _omitFieldNames ? '' : 'extension',\n        subBuilder: FieldDescriptorProto.create)\n    ..aOM<MessageOptions>(7, _omitFieldNames ? '' : 'options',\n        subBuilder: MessageOptions.create)\n    ..pPM<OneofDescriptorProto>(8, _omitFieldNames ? '' : 'oneofDecl',\n        subBuilder: OneofDescriptorProto.create)\n    ..pPM<DescriptorProto_ReservedRange>(\n        9, _omitFieldNames ? '' : 'reservedRange',\n        subBuilder: DescriptorProto_ReservedRange.create)\n    ..pPS(10, _omitFieldNames ? '' : 'reservedName')\n    ..aE<SymbolVisibility>(11, _omitFieldNames ? '' : 'visibility',\n        enumValues: SymbolVisibility.values);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DescriptorProto clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DescriptorProto copyWith(void Function(DescriptorProto) updates) =>\n      super.copyWith((message) => updates(message as DescriptorProto))\n          as DescriptorProto;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static DescriptorProto create() => DescriptorProto._();\n  @$core.override\n  DescriptorProto createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static DescriptorProto getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<DescriptorProto>(create);\n  static DescriptorProto? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $pb.PbList<FieldDescriptorProto> get field => $_getList(1);\n\n  @$pb.TagNumber(3)\n  $pb.PbList<DescriptorProto> get nestedType => $_getList(2);\n\n  @$pb.TagNumber(4)\n  $pb.PbList<EnumDescriptorProto> get enumType => $_getList(3);\n\n  @$pb.TagNumber(5)\n  $pb.PbList<DescriptorProto_ExtensionRange> get extensionRange => $_getList(4);\n\n  @$pb.TagNumber(6)\n  $pb.PbList<FieldDescriptorProto> get extension => $_getList(5);\n\n  @$pb.TagNumber(7)\n  MessageOptions get options => $_getN(6);\n  @$pb.TagNumber(7)\n  set options(MessageOptions value) => $_setField(7, value);\n  @$pb.TagNumber(7)\n  $core.bool hasOptions() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearOptions() => $_clearField(7);\n  @$pb.TagNumber(7)\n  MessageOptions ensureOptions() => $_ensure(6);\n\n  @$pb.TagNumber(8)\n  $pb.PbList<OneofDescriptorProto> get oneofDecl => $_getList(7);\n\n  @$pb.TagNumber(9)\n  $pb.PbList<DescriptorProto_ReservedRange> get reservedRange => $_getList(8);\n\n  /// Reserved field names, which may not be used by fields in the same message.\n  /// A given name may only be reserved once.\n  @$pb.TagNumber(10)\n  $pb.PbList<$core.String> get reservedName => $_getList(9);\n\n  /// Support for `export` and `local` keywords on enums.\n  @$pb.TagNumber(11)\n  SymbolVisibility get visibility => $_getN(10);\n  @$pb.TagNumber(11)\n  set visibility(SymbolVisibility value) => $_setField(11, value);\n  @$pb.TagNumber(11)\n  $core.bool hasVisibility() => $_has(10);\n  @$pb.TagNumber(11)\n  void clearVisibility() => $_clearField(11);\n}\n\nclass ExtensionRangeOptions_Declaration extends $pb.GeneratedMessage {\n  factory ExtensionRangeOptions_Declaration({\n    $core.int? number,\n    $core.String? fullName,\n    $core.String? type,\n    $core.bool? reserved,\n    $core.bool? repeated,\n  }) {\n    final result = create();\n    if (number != null) result.number = number;\n    if (fullName != null) result.fullName = fullName;\n    if (type != null) result.type = type;\n    if (reserved != null) result.reserved = reserved;\n    if (repeated != null) result.repeated = repeated;\n    return result;\n  }\n\n  ExtensionRangeOptions_Declaration._();\n\n  factory ExtensionRangeOptions_Declaration.fromBuffer(\n          $core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ExtensionRangeOptions_Declaration.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ExtensionRangeOptions.Declaration',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'number')\n    ..aOS(2, _omitFieldNames ? '' : 'fullName')\n    ..aOS(3, _omitFieldNames ? '' : 'type')\n    ..aOB(5, _omitFieldNames ? '' : 'reserved')\n    ..aOB(6, _omitFieldNames ? '' : 'repeated')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ExtensionRangeOptions_Declaration clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ExtensionRangeOptions_Declaration copyWith(\n          void Function(ExtensionRangeOptions_Declaration) updates) =>\n      super.copyWith((message) =>\n              updates(message as ExtensionRangeOptions_Declaration))\n          as ExtensionRangeOptions_Declaration;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ExtensionRangeOptions_Declaration create() =>\n      ExtensionRangeOptions_Declaration._();\n  @$core.override\n  ExtensionRangeOptions_Declaration createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ExtensionRangeOptions_Declaration getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ExtensionRangeOptions_Declaration>(\n          create);\n  static ExtensionRangeOptions_Declaration? _defaultInstance;\n\n  /// The extension number declared within the extension range.\n  @$pb.TagNumber(1)\n  $core.int get number => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set number($core.int value) => $_setSignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasNumber() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearNumber() => $_clearField(1);\n\n  /// The fully-qualified name of the extension field. There must be a leading\n  /// dot in front of the full name.\n  @$pb.TagNumber(2)\n  $core.String get fullName => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set fullName($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasFullName() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearFullName() => $_clearField(2);\n\n  /// The fully-qualified type name of the extension field. Unlike\n  /// Metadata.type, Declaration.type must have a leading dot for messages\n  /// and enums.\n  @$pb.TagNumber(3)\n  $core.String get type => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set type($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasType() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearType() => $_clearField(3);\n\n  /// If true, indicates that the number is reserved in the extension range,\n  /// and any extension field with the number will fail to compile. Set this\n  /// when a declared extension field is deleted.\n  @$pb.TagNumber(5)\n  $core.bool get reserved => $_getBF(3);\n  @$pb.TagNumber(5)\n  set reserved($core.bool value) => $_setBool(3, value);\n  @$pb.TagNumber(5)\n  $core.bool hasReserved() => $_has(3);\n  @$pb.TagNumber(5)\n  void clearReserved() => $_clearField(5);\n\n  /// If true, indicates that the extension must be defined as repeated.\n  /// Otherwise the extension must be defined as optional.\n  @$pb.TagNumber(6)\n  $core.bool get repeated => $_getBF(4);\n  @$pb.TagNumber(6)\n  set repeated($core.bool value) => $_setBool(4, value);\n  @$pb.TagNumber(6)\n  $core.bool hasRepeated() => $_has(4);\n  @$pb.TagNumber(6)\n  void clearRepeated() => $_clearField(6);\n}\n\nclass ExtensionRangeOptions extends $pb.GeneratedMessage {\n  factory ExtensionRangeOptions({\n    $core.Iterable<ExtensionRangeOptions_Declaration>? declaration,\n    ExtensionRangeOptions_VerificationState? verification,\n    FeatureSet? features,\n    $core.Iterable<UninterpretedOption>? uninterpretedOption,\n  }) {\n    final result = create();\n    if (declaration != null) result.declaration.addAll(declaration);\n    if (verification != null) result.verification = verification;\n    if (features != null) result.features = features;\n    if (uninterpretedOption != null)\n      result.uninterpretedOption.addAll(uninterpretedOption);\n    return result;\n  }\n\n  ExtensionRangeOptions._();\n\n  factory ExtensionRangeOptions.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ExtensionRangeOptions.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ExtensionRangeOptions',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..pPM<ExtensionRangeOptions_Declaration>(\n        2, _omitFieldNames ? '' : 'declaration',\n        subBuilder: ExtensionRangeOptions_Declaration.create)\n    ..aE<ExtensionRangeOptions_VerificationState>(\n        3, _omitFieldNames ? '' : 'verification',\n        defaultOrMaker: ExtensionRangeOptions_VerificationState.UNVERIFIED,\n        enumValues: ExtensionRangeOptions_VerificationState.values)\n    ..aOM<FeatureSet>(50, _omitFieldNames ? '' : 'features',\n        subBuilder: FeatureSet.create)\n    ..pPM<UninterpretedOption>(\n        999, _omitFieldNames ? '' : 'uninterpretedOption',\n        subBuilder: UninterpretedOption.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ExtensionRangeOptions clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ExtensionRangeOptions copyWith(\n          void Function(ExtensionRangeOptions) updates) =>\n      super.copyWith((message) => updates(message as ExtensionRangeOptions))\n          as ExtensionRangeOptions;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ExtensionRangeOptions create() => ExtensionRangeOptions._();\n  @$core.override\n  ExtensionRangeOptions createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ExtensionRangeOptions getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ExtensionRangeOptions>(create);\n  static ExtensionRangeOptions? _defaultInstance;\n\n  /// For external users: DO NOT USE. We are in the process of open sourcing\n  /// extension declaration and executing internal cleanups before it can be\n  /// used externally.\n  @$pb.TagNumber(2)\n  $pb.PbList<ExtensionRangeOptions_Declaration> get declaration => $_getList(0);\n\n  /// The verification state of the range.\n  /// TODO: flip the default to DECLARATION once all empty ranges\n  /// are marked as UNVERIFIED.\n  @$pb.TagNumber(3)\n  ExtensionRangeOptions_VerificationState get verification => $_getN(1);\n  @$pb.TagNumber(3)\n  set verification(ExtensionRangeOptions_VerificationState value) =>\n      $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasVerification() => $_has(1);\n  @$pb.TagNumber(3)\n  void clearVerification() => $_clearField(3);\n\n  /// Any features defined in the specific edition.\n  @$pb.TagNumber(50)\n  FeatureSet get features => $_getN(2);\n  @$pb.TagNumber(50)\n  set features(FeatureSet value) => $_setField(50, value);\n  @$pb.TagNumber(50)\n  $core.bool hasFeatures() => $_has(2);\n  @$pb.TagNumber(50)\n  void clearFeatures() => $_clearField(50);\n  @$pb.TagNumber(50)\n  FeatureSet ensureFeatures() => $_ensure(2);\n\n  /// The parser stores options it doesn't recognize here. See above.\n  @$pb.TagNumber(999)\n  $pb.PbList<UninterpretedOption> get uninterpretedOption => $_getList(3);\n}\n\n/// Describes a field within a message.\nclass FieldDescriptorProto extends $pb.GeneratedMessage {\n  factory FieldDescriptorProto({\n    $core.String? name,\n    $core.String? extendee,\n    $core.int? number,\n    FieldDescriptorProto_Label? label,\n    FieldDescriptorProto_Type? type,\n    $core.String? typeName,\n    $core.String? defaultValue,\n    FieldOptions? options,\n    $core.int? oneofIndex,\n    $core.String? jsonName,\n    $core.bool? proto3Optional,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (extendee != null) result.extendee = extendee;\n    if (number != null) result.number = number;\n    if (label != null) result.label = label;\n    if (type != null) result.type = type;\n    if (typeName != null) result.typeName = typeName;\n    if (defaultValue != null) result.defaultValue = defaultValue;\n    if (options != null) result.options = options;\n    if (oneofIndex != null) result.oneofIndex = oneofIndex;\n    if (jsonName != null) result.jsonName = jsonName;\n    if (proto3Optional != null) result.proto3Optional = proto3Optional;\n    return result;\n  }\n\n  FieldDescriptorProto._();\n\n  factory FieldDescriptorProto.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FieldDescriptorProto.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FieldDescriptorProto',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aOS(2, _omitFieldNames ? '' : 'extendee')\n    ..aI(3, _omitFieldNames ? '' : 'number')\n    ..aE<FieldDescriptorProto_Label>(4, _omitFieldNames ? '' : 'label',\n        enumValues: FieldDescriptorProto_Label.values)\n    ..aE<FieldDescriptorProto_Type>(5, _omitFieldNames ? '' : 'type',\n        enumValues: FieldDescriptorProto_Type.values)\n    ..aOS(6, _omitFieldNames ? '' : 'typeName')\n    ..aOS(7, _omitFieldNames ? '' : 'defaultValue')\n    ..aOM<FieldOptions>(8, _omitFieldNames ? '' : 'options',\n        subBuilder: FieldOptions.create)\n    ..aI(9, _omitFieldNames ? '' : 'oneofIndex')\n    ..aOS(10, _omitFieldNames ? '' : 'jsonName')\n    ..aOB(17, _omitFieldNames ? '' : 'proto3Optional');\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FieldDescriptorProto clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FieldDescriptorProto copyWith(void Function(FieldDescriptorProto) updates) =>\n      super.copyWith((message) => updates(message as FieldDescriptorProto))\n          as FieldDescriptorProto;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FieldDescriptorProto create() => FieldDescriptorProto._();\n  @$core.override\n  FieldDescriptorProto createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FieldDescriptorProto getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FieldDescriptorProto>(create);\n  static FieldDescriptorProto? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// For extensions, this is the name of the type being extended.  It is\n  /// resolved in the same manner as type_name.\n  @$pb.TagNumber(2)\n  $core.String get extendee => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set extendee($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasExtendee() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearExtendee() => $_clearField(2);\n\n  @$pb.TagNumber(3)\n  $core.int get number => $_getIZ(2);\n  @$pb.TagNumber(3)\n  set number($core.int value) => $_setSignedInt32(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasNumber() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearNumber() => $_clearField(3);\n\n  @$pb.TagNumber(4)\n  FieldDescriptorProto_Label get label => $_getN(3);\n  @$pb.TagNumber(4)\n  set label(FieldDescriptorProto_Label value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasLabel() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearLabel() => $_clearField(4);\n\n  /// If type_name is set, this need not be set.  If both this and type_name\n  /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.\n  @$pb.TagNumber(5)\n  FieldDescriptorProto_Type get type => $_getN(4);\n  @$pb.TagNumber(5)\n  set type(FieldDescriptorProto_Type value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasType() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearType() => $_clearField(5);\n\n  /// For message and enum types, this is the name of the type.  If the name\n  /// starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping\n  /// rules are used to find the type (i.e. first the nested types within this\n  /// message are searched, then within the parent, on up to the root\n  /// namespace).\n  @$pb.TagNumber(6)\n  $core.String get typeName => $_getSZ(5);\n  @$pb.TagNumber(6)\n  set typeName($core.String value) => $_setString(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasTypeName() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearTypeName() => $_clearField(6);\n\n  /// For numeric types, contains the original text representation of the value.\n  /// For booleans, \"true\" or \"false\".\n  /// For strings, contains the default text contents (not escaped in any way).\n  /// For bytes, contains the C escaped value.  All bytes >= 128 are escaped.\n  @$pb.TagNumber(7)\n  $core.String get defaultValue => $_getSZ(6);\n  @$pb.TagNumber(7)\n  set defaultValue($core.String value) => $_setString(6, value);\n  @$pb.TagNumber(7)\n  $core.bool hasDefaultValue() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearDefaultValue() => $_clearField(7);\n\n  @$pb.TagNumber(8)\n  FieldOptions get options => $_getN(7);\n  @$pb.TagNumber(8)\n  set options(FieldOptions value) => $_setField(8, value);\n  @$pb.TagNumber(8)\n  $core.bool hasOptions() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearOptions() => $_clearField(8);\n  @$pb.TagNumber(8)\n  FieldOptions ensureOptions() => $_ensure(7);\n\n  /// If set, gives the index of a oneof in the containing type's oneof_decl\n  /// list.  This field is a member of that oneof.\n  @$pb.TagNumber(9)\n  $core.int get oneofIndex => $_getIZ(8);\n  @$pb.TagNumber(9)\n  set oneofIndex($core.int value) => $_setSignedInt32(8, value);\n  @$pb.TagNumber(9)\n  $core.bool hasOneofIndex() => $_has(8);\n  @$pb.TagNumber(9)\n  void clearOneofIndex() => $_clearField(9);\n\n  /// JSON name of this field. The value is set by protocol compiler. If the\n  /// user has set a \"json_name\" option on this field, that option's value\n  /// will be used. Otherwise, it's deduced from the field's name by converting\n  /// it to camelCase.\n  @$pb.TagNumber(10)\n  $core.String get jsonName => $_getSZ(9);\n  @$pb.TagNumber(10)\n  set jsonName($core.String value) => $_setString(9, value);\n  @$pb.TagNumber(10)\n  $core.bool hasJsonName() => $_has(9);\n  @$pb.TagNumber(10)\n  void clearJsonName() => $_clearField(10);\n\n  /// If true, this is a proto3 \"optional\". When a proto3 field is optional, it\n  /// tracks presence regardless of field type.\n  ///\n  /// When proto3_optional is true, this field must belong to a oneof to signal\n  /// to old proto3 clients that presence is tracked for this field. This oneof\n  /// is known as a \"synthetic\" oneof, and this field must be its sole member\n  /// (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs\n  /// exist in the descriptor only, and do not generate any API. Synthetic oneofs\n  /// must be ordered after all \"real\" oneofs.\n  ///\n  /// For message fields, proto3_optional doesn't create any semantic change,\n  /// since non-repeated message fields always track presence. However it still\n  /// indicates the semantic detail of whether the user wrote \"optional\" or not.\n  /// This can be useful for round-tripping the .proto file. For consistency we\n  /// give message fields a synthetic oneof also, even though it is not required\n  /// to track presence. This is especially important because the parser can't\n  /// tell if a field is a message or an enum, so it must always create a\n  /// synthetic oneof.\n  ///\n  /// Proto2 optional fields do not set this flag, because they already indicate\n  /// optional with `LABEL_OPTIONAL`.\n  @$pb.TagNumber(17)\n  $core.bool get proto3Optional => $_getBF(10);\n  @$pb.TagNumber(17)\n  set proto3Optional($core.bool value) => $_setBool(10, value);\n  @$pb.TagNumber(17)\n  $core.bool hasProto3Optional() => $_has(10);\n  @$pb.TagNumber(17)\n  void clearProto3Optional() => $_clearField(17);\n}\n\n/// Describes a oneof.\nclass OneofDescriptorProto extends $pb.GeneratedMessage {\n  factory OneofDescriptorProto({\n    $core.String? name,\n    OneofOptions? options,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (options != null) result.options = options;\n    return result;\n  }\n\n  OneofDescriptorProto._();\n\n  factory OneofDescriptorProto.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory OneofDescriptorProto.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'OneofDescriptorProto',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aOM<OneofOptions>(2, _omitFieldNames ? '' : 'options',\n        subBuilder: OneofOptions.create);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  OneofDescriptorProto clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  OneofDescriptorProto copyWith(void Function(OneofDescriptorProto) updates) =>\n      super.copyWith((message) => updates(message as OneofDescriptorProto))\n          as OneofDescriptorProto;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static OneofDescriptorProto create() => OneofDescriptorProto._();\n  @$core.override\n  OneofDescriptorProto createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static OneofDescriptorProto getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<OneofDescriptorProto>(create);\n  static OneofDescriptorProto? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  OneofOptions get options => $_getN(1);\n  @$pb.TagNumber(2)\n  set options(OneofOptions value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasOptions() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearOptions() => $_clearField(2);\n  @$pb.TagNumber(2)\n  OneofOptions ensureOptions() => $_ensure(1);\n}\n\n/// Range of reserved numeric values. Reserved values may not be used by\n/// entries in the same enum. Reserved ranges may not overlap.\n///\n/// Note that this is distinct from DescriptorProto.ReservedRange in that it\n/// is inclusive such that it can appropriately represent the entire int32\n/// domain.\nclass EnumDescriptorProto_EnumReservedRange extends $pb.GeneratedMessage {\n  factory EnumDescriptorProto_EnumReservedRange({\n    $core.int? start,\n    $core.int? end,\n  }) {\n    final result = create();\n    if (start != null) result.start = start;\n    if (end != null) result.end = end;\n    return result;\n  }\n\n  EnumDescriptorProto_EnumReservedRange._();\n\n  factory EnumDescriptorProto_EnumReservedRange.fromBuffer(\n          $core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory EnumDescriptorProto_EnumReservedRange.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'EnumDescriptorProto.EnumReservedRange',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'start')\n    ..aI(2, _omitFieldNames ? '' : 'end')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumDescriptorProto_EnumReservedRange clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumDescriptorProto_EnumReservedRange copyWith(\n          void Function(EnumDescriptorProto_EnumReservedRange) updates) =>\n      super.copyWith((message) =>\n              updates(message as EnumDescriptorProto_EnumReservedRange))\n          as EnumDescriptorProto_EnumReservedRange;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static EnumDescriptorProto_EnumReservedRange create() =>\n      EnumDescriptorProto_EnumReservedRange._();\n  @$core.override\n  EnumDescriptorProto_EnumReservedRange createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static EnumDescriptorProto_EnumReservedRange getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<\n          EnumDescriptorProto_EnumReservedRange>(create);\n  static EnumDescriptorProto_EnumReservedRange? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.int get start => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set start($core.int value) => $_setSignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasStart() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearStart() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $core.int get end => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set end($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasEnd() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearEnd() => $_clearField(2);\n}\n\n/// Describes an enum type.\nclass EnumDescriptorProto extends $pb.GeneratedMessage {\n  factory EnumDescriptorProto({\n    $core.String? name,\n    $core.Iterable<EnumValueDescriptorProto>? value,\n    EnumOptions? options,\n    $core.Iterable<EnumDescriptorProto_EnumReservedRange>? reservedRange,\n    $core.Iterable<$core.String>? reservedName,\n    SymbolVisibility? visibility,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (value != null) result.value.addAll(value);\n    if (options != null) result.options = options;\n    if (reservedRange != null) result.reservedRange.addAll(reservedRange);\n    if (reservedName != null) result.reservedName.addAll(reservedName);\n    if (visibility != null) result.visibility = visibility;\n    return result;\n  }\n\n  EnumDescriptorProto._();\n\n  factory EnumDescriptorProto.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory EnumDescriptorProto.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'EnumDescriptorProto',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..pPM<EnumValueDescriptorProto>(2, _omitFieldNames ? '' : 'value',\n        subBuilder: EnumValueDescriptorProto.create)\n    ..aOM<EnumOptions>(3, _omitFieldNames ? '' : 'options',\n        subBuilder: EnumOptions.create)\n    ..pPM<EnumDescriptorProto_EnumReservedRange>(\n        4, _omitFieldNames ? '' : 'reservedRange',\n        subBuilder: EnumDescriptorProto_EnumReservedRange.create)\n    ..pPS(5, _omitFieldNames ? '' : 'reservedName')\n    ..aE<SymbolVisibility>(6, _omitFieldNames ? '' : 'visibility',\n        enumValues: SymbolVisibility.values);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumDescriptorProto clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumDescriptorProto copyWith(void Function(EnumDescriptorProto) updates) =>\n      super.copyWith((message) => updates(message as EnumDescriptorProto))\n          as EnumDescriptorProto;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static EnumDescriptorProto create() => EnumDescriptorProto._();\n  @$core.override\n  EnumDescriptorProto createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static EnumDescriptorProto getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<EnumDescriptorProto>(create);\n  static EnumDescriptorProto? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $pb.PbList<EnumValueDescriptorProto> get value => $_getList(1);\n\n  @$pb.TagNumber(3)\n  EnumOptions get options => $_getN(2);\n  @$pb.TagNumber(3)\n  set options(EnumOptions value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasOptions() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearOptions() => $_clearField(3);\n  @$pb.TagNumber(3)\n  EnumOptions ensureOptions() => $_ensure(2);\n\n  /// Range of reserved numeric values. Reserved numeric values may not be used\n  /// by enum values in the same enum declaration. Reserved ranges may not\n  /// overlap.\n  @$pb.TagNumber(4)\n  $pb.PbList<EnumDescriptorProto_EnumReservedRange> get reservedRange =>\n      $_getList(3);\n\n  /// Reserved enum value names, which may not be reused. A given name may only\n  /// be reserved once.\n  @$pb.TagNumber(5)\n  $pb.PbList<$core.String> get reservedName => $_getList(4);\n\n  /// Support for `export` and `local` keywords on enums.\n  @$pb.TagNumber(6)\n  SymbolVisibility get visibility => $_getN(5);\n  @$pb.TagNumber(6)\n  set visibility(SymbolVisibility value) => $_setField(6, value);\n  @$pb.TagNumber(6)\n  $core.bool hasVisibility() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearVisibility() => $_clearField(6);\n}\n\n/// Describes a value within an enum.\nclass EnumValueDescriptorProto extends $pb.GeneratedMessage {\n  factory EnumValueDescriptorProto({\n    $core.String? name,\n    $core.int? number,\n    EnumValueOptions? options,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (number != null) result.number = number;\n    if (options != null) result.options = options;\n    return result;\n  }\n\n  EnumValueDescriptorProto._();\n\n  factory EnumValueDescriptorProto.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory EnumValueDescriptorProto.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'EnumValueDescriptorProto',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aI(2, _omitFieldNames ? '' : 'number')\n    ..aOM<EnumValueOptions>(3, _omitFieldNames ? '' : 'options',\n        subBuilder: EnumValueOptions.create);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumValueDescriptorProto clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumValueDescriptorProto copyWith(\n          void Function(EnumValueDescriptorProto) updates) =>\n      super.copyWith((message) => updates(message as EnumValueDescriptorProto))\n          as EnumValueDescriptorProto;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static EnumValueDescriptorProto create() => EnumValueDescriptorProto._();\n  @$core.override\n  EnumValueDescriptorProto createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static EnumValueDescriptorProto getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<EnumValueDescriptorProto>(create);\n  static EnumValueDescriptorProto? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $core.int get number => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set number($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasNumber() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearNumber() => $_clearField(2);\n\n  @$pb.TagNumber(3)\n  EnumValueOptions get options => $_getN(2);\n  @$pb.TagNumber(3)\n  set options(EnumValueOptions value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasOptions() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearOptions() => $_clearField(3);\n  @$pb.TagNumber(3)\n  EnumValueOptions ensureOptions() => $_ensure(2);\n}\n\n/// Describes a service.\nclass ServiceDescriptorProto extends $pb.GeneratedMessage {\n  factory ServiceDescriptorProto({\n    $core.String? name,\n    $core.Iterable<MethodDescriptorProto>? method,\n    ServiceOptions? options,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (method != null) result.method.addAll(method);\n    if (options != null) result.options = options;\n    return result;\n  }\n\n  ServiceDescriptorProto._();\n\n  factory ServiceDescriptorProto.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ServiceDescriptorProto.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ServiceDescriptorProto',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..pPM<MethodDescriptorProto>(2, _omitFieldNames ? '' : 'method',\n        subBuilder: MethodDescriptorProto.create)\n    ..aOM<ServiceOptions>(3, _omitFieldNames ? '' : 'options',\n        subBuilder: ServiceOptions.create);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ServiceDescriptorProto clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ServiceDescriptorProto copyWith(\n          void Function(ServiceDescriptorProto) updates) =>\n      super.copyWith((message) => updates(message as ServiceDescriptorProto))\n          as ServiceDescriptorProto;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ServiceDescriptorProto create() => ServiceDescriptorProto._();\n  @$core.override\n  ServiceDescriptorProto createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ServiceDescriptorProto getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ServiceDescriptorProto>(create);\n  static ServiceDescriptorProto? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $pb.PbList<MethodDescriptorProto> get method => $_getList(1);\n\n  @$pb.TagNumber(3)\n  ServiceOptions get options => $_getN(2);\n  @$pb.TagNumber(3)\n  set options(ServiceOptions value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasOptions() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearOptions() => $_clearField(3);\n  @$pb.TagNumber(3)\n  ServiceOptions ensureOptions() => $_ensure(2);\n}\n\n/// Describes a method of a service.\nclass MethodDescriptorProto extends $pb.GeneratedMessage {\n  factory MethodDescriptorProto({\n    $core.String? name,\n    $core.String? inputType,\n    $core.String? outputType,\n    MethodOptions? options,\n    $core.bool? clientStreaming,\n    $core.bool? serverStreaming,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    if (inputType != null) result.inputType = inputType;\n    if (outputType != null) result.outputType = outputType;\n    if (options != null) result.options = options;\n    if (clientStreaming != null) result.clientStreaming = clientStreaming;\n    if (serverStreaming != null) result.serverStreaming = serverStreaming;\n    return result;\n  }\n\n  MethodDescriptorProto._();\n\n  factory MethodDescriptorProto.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory MethodDescriptorProto.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'MethodDescriptorProto',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..aOS(2, _omitFieldNames ? '' : 'inputType')\n    ..aOS(3, _omitFieldNames ? '' : 'outputType')\n    ..aOM<MethodOptions>(4, _omitFieldNames ? '' : 'options',\n        subBuilder: MethodOptions.create)\n    ..aOB(5, _omitFieldNames ? '' : 'clientStreaming')\n    ..aOB(6, _omitFieldNames ? '' : 'serverStreaming');\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MethodDescriptorProto clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MethodDescriptorProto copyWith(\n          void Function(MethodDescriptorProto) updates) =>\n      super.copyWith((message) => updates(message as MethodDescriptorProto))\n          as MethodDescriptorProto;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static MethodDescriptorProto create() => MethodDescriptorProto._();\n  @$core.override\n  MethodDescriptorProto createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static MethodDescriptorProto getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<MethodDescriptorProto>(create);\n  static MethodDescriptorProto? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n\n  /// Input and output type names.  These are resolved in the same way as\n  /// FieldDescriptorProto.type_name, but must refer to a message type.\n  @$pb.TagNumber(2)\n  $core.String get inputType => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set inputType($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasInputType() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearInputType() => $_clearField(2);\n\n  @$pb.TagNumber(3)\n  $core.String get outputType => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set outputType($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasOutputType() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearOutputType() => $_clearField(3);\n\n  @$pb.TagNumber(4)\n  MethodOptions get options => $_getN(3);\n  @$pb.TagNumber(4)\n  set options(MethodOptions value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasOptions() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearOptions() => $_clearField(4);\n  @$pb.TagNumber(4)\n  MethodOptions ensureOptions() => $_ensure(3);\n\n  /// Identifies if client streams multiple client messages\n  @$pb.TagNumber(5)\n  $core.bool get clientStreaming => $_getBF(4);\n  @$pb.TagNumber(5)\n  set clientStreaming($core.bool value) => $_setBool(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasClientStreaming() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearClientStreaming() => $_clearField(5);\n\n  /// Identifies if server streams multiple server messages\n  @$pb.TagNumber(6)\n  $core.bool get serverStreaming => $_getBF(5);\n  @$pb.TagNumber(6)\n  set serverStreaming($core.bool value) => $_setBool(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasServerStreaming() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearServerStreaming() => $_clearField(6);\n}\n\nclass FileOptions extends $pb.GeneratedMessage {\n  factory FileOptions({\n    $core.String? javaPackage,\n    $core.String? javaOuterClassname,\n    FileOptions_OptimizeMode? optimizeFor,\n    $core.bool? javaMultipleFiles,\n    $core.String? goPackage,\n    $core.bool? ccGenericServices,\n    $core.bool? javaGenericServices,\n    $core.bool? pyGenericServices,\n    @$core.Deprecated('This field is deprecated.')\n    $core.bool? javaGenerateEqualsAndHash,\n    $core.bool? deprecated,\n    $core.bool? javaStringCheckUtf8,\n    $core.bool? ccEnableArenas,\n    $core.String? objcClassPrefix,\n    $core.String? csharpNamespace,\n    $core.String? swiftPrefix,\n    $core.String? phpClassPrefix,\n    $core.String? phpNamespace,\n    $core.String? phpMetadataNamespace,\n    $core.String? rubyPackage,\n    FeatureSet? features,\n    $core.Iterable<UninterpretedOption>? uninterpretedOption,\n  }) {\n    final result = create();\n    if (javaPackage != null) result.javaPackage = javaPackage;\n    if (javaOuterClassname != null)\n      result.javaOuterClassname = javaOuterClassname;\n    if (optimizeFor != null) result.optimizeFor = optimizeFor;\n    if (javaMultipleFiles != null) result.javaMultipleFiles = javaMultipleFiles;\n    if (goPackage != null) result.goPackage = goPackage;\n    if (ccGenericServices != null) result.ccGenericServices = ccGenericServices;\n    if (javaGenericServices != null)\n      result.javaGenericServices = javaGenericServices;\n    if (pyGenericServices != null) result.pyGenericServices = pyGenericServices;\n    if (javaGenerateEqualsAndHash != null)\n      result.javaGenerateEqualsAndHash = javaGenerateEqualsAndHash;\n    if (deprecated != null) result.deprecated = deprecated;\n    if (javaStringCheckUtf8 != null)\n      result.javaStringCheckUtf8 = javaStringCheckUtf8;\n    if (ccEnableArenas != null) result.ccEnableArenas = ccEnableArenas;\n    if (objcClassPrefix != null) result.objcClassPrefix = objcClassPrefix;\n    if (csharpNamespace != null) result.csharpNamespace = csharpNamespace;\n    if (swiftPrefix != null) result.swiftPrefix = swiftPrefix;\n    if (phpClassPrefix != null) result.phpClassPrefix = phpClassPrefix;\n    if (phpNamespace != null) result.phpNamespace = phpNamespace;\n    if (phpMetadataNamespace != null)\n      result.phpMetadataNamespace = phpMetadataNamespace;\n    if (rubyPackage != null) result.rubyPackage = rubyPackage;\n    if (features != null) result.features = features;\n    if (uninterpretedOption != null)\n      result.uninterpretedOption.addAll(uninterpretedOption);\n    return result;\n  }\n\n  FileOptions._();\n\n  factory FileOptions.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FileOptions.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FileOptions',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'javaPackage')\n    ..aOS(8, _omitFieldNames ? '' : 'javaOuterClassname')\n    ..aE<FileOptions_OptimizeMode>(9, _omitFieldNames ? '' : 'optimizeFor',\n        defaultOrMaker: FileOptions_OptimizeMode.SPEED,\n        enumValues: FileOptions_OptimizeMode.values)\n    ..aOB(10, _omitFieldNames ? '' : 'javaMultipleFiles')\n    ..aOS(11, _omitFieldNames ? '' : 'goPackage')\n    ..aOB(16, _omitFieldNames ? '' : 'ccGenericServices')\n    ..aOB(17, _omitFieldNames ? '' : 'javaGenericServices')\n    ..aOB(18, _omitFieldNames ? '' : 'pyGenericServices')\n    ..aOB(20, _omitFieldNames ? '' : 'javaGenerateEqualsAndHash')\n    ..aOB(23, _omitFieldNames ? '' : 'deprecated')\n    ..aOB(27, _omitFieldNames ? '' : 'javaStringCheckUtf8')\n    ..a<$core.bool>(\n        31, _omitFieldNames ? '' : 'ccEnableArenas', $pb.PbFieldType.OB,\n        defaultOrMaker: true)\n    ..aOS(36, _omitFieldNames ? '' : 'objcClassPrefix')\n    ..aOS(37, _omitFieldNames ? '' : 'csharpNamespace')\n    ..aOS(39, _omitFieldNames ? '' : 'swiftPrefix')\n    ..aOS(40, _omitFieldNames ? '' : 'phpClassPrefix')\n    ..aOS(41, _omitFieldNames ? '' : 'phpNamespace')\n    ..aOS(44, _omitFieldNames ? '' : 'phpMetadataNamespace')\n    ..aOS(45, _omitFieldNames ? '' : 'rubyPackage')\n    ..aOM<FeatureSet>(50, _omitFieldNames ? '' : 'features',\n        subBuilder: FeatureSet.create)\n    ..pPM<UninterpretedOption>(\n        999, _omitFieldNames ? '' : 'uninterpretedOption',\n        subBuilder: UninterpretedOption.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FileOptions clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FileOptions copyWith(void Function(FileOptions) updates) =>\n      super.copyWith((message) => updates(message as FileOptions))\n          as FileOptions;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FileOptions create() => FileOptions._();\n  @$core.override\n  FileOptions createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FileOptions getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FileOptions>(create);\n  static FileOptions? _defaultInstance;\n\n  /// Sets the Java package where classes generated from this .proto will be\n  /// placed.  By default, the proto package is used, but this is often\n  /// inappropriate because proto packages do not normally start with backwards\n  /// domain names.\n  @$pb.TagNumber(1)\n  $core.String get javaPackage => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set javaPackage($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasJavaPackage() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearJavaPackage() => $_clearField(1);\n\n  /// Controls the name of the wrapper Java class generated for the .proto file.\n  /// That class will always contain the .proto file's getDescriptor() method as\n  /// well as any top-level extensions defined in the .proto file.\n  /// If java_multiple_files is disabled, then all the other classes from the\n  /// .proto file will be nested inside the single wrapper outer class.\n  @$pb.TagNumber(8)\n  $core.String get javaOuterClassname => $_getSZ(1);\n  @$pb.TagNumber(8)\n  set javaOuterClassname($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(8)\n  $core.bool hasJavaOuterClassname() => $_has(1);\n  @$pb.TagNumber(8)\n  void clearJavaOuterClassname() => $_clearField(8);\n\n  @$pb.TagNumber(9)\n  FileOptions_OptimizeMode get optimizeFor => $_getN(2);\n  @$pb.TagNumber(9)\n  set optimizeFor(FileOptions_OptimizeMode value) => $_setField(9, value);\n  @$pb.TagNumber(9)\n  $core.bool hasOptimizeFor() => $_has(2);\n  @$pb.TagNumber(9)\n  void clearOptimizeFor() => $_clearField(9);\n\n  /// If enabled, then the Java code generator will generate a separate .java\n  /// file for each top-level message, enum, and service defined in the .proto\n  /// file.  Thus, these types will *not* be nested inside the wrapper class\n  /// named by java_outer_classname.  However, the wrapper class will still be\n  /// generated to contain the file's getDescriptor() method as well as any\n  /// top-level extensions defined in the file.\n  @$pb.TagNumber(10)\n  $core.bool get javaMultipleFiles => $_getBF(3);\n  @$pb.TagNumber(10)\n  set javaMultipleFiles($core.bool value) => $_setBool(3, value);\n  @$pb.TagNumber(10)\n  $core.bool hasJavaMultipleFiles() => $_has(3);\n  @$pb.TagNumber(10)\n  void clearJavaMultipleFiles() => $_clearField(10);\n\n  /// Sets the Go package where structs generated from this .proto will be\n  /// placed. If omitted, the Go package will be derived from the following:\n  ///   - The basename of the package import path, if provided.\n  ///   - Otherwise, the package statement in the .proto file, if present.\n  ///   - Otherwise, the basename of the .proto file, without extension.\n  @$pb.TagNumber(11)\n  $core.String get goPackage => $_getSZ(4);\n  @$pb.TagNumber(11)\n  set goPackage($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(11)\n  $core.bool hasGoPackage() => $_has(4);\n  @$pb.TagNumber(11)\n  void clearGoPackage() => $_clearField(11);\n\n  /// Should generic services be generated in each language?  \"Generic\" services\n  /// are not specific to any particular RPC system.  They are generated by the\n  /// main code generators in each language (without additional plugins).\n  /// Generic services were the only kind of service generation supported by\n  /// early versions of google.protobuf.\n  ///\n  /// Generic services are now considered deprecated in favor of using plugins\n  /// that generate code specific to your particular RPC system.  Therefore,\n  /// these default to false.  Old code which depends on generic services should\n  /// explicitly set them to true.\n  @$pb.TagNumber(16)\n  $core.bool get ccGenericServices => $_getBF(5);\n  @$pb.TagNumber(16)\n  set ccGenericServices($core.bool value) => $_setBool(5, value);\n  @$pb.TagNumber(16)\n  $core.bool hasCcGenericServices() => $_has(5);\n  @$pb.TagNumber(16)\n  void clearCcGenericServices() => $_clearField(16);\n\n  @$pb.TagNumber(17)\n  $core.bool get javaGenericServices => $_getBF(6);\n  @$pb.TagNumber(17)\n  set javaGenericServices($core.bool value) => $_setBool(6, value);\n  @$pb.TagNumber(17)\n  $core.bool hasJavaGenericServices() => $_has(6);\n  @$pb.TagNumber(17)\n  void clearJavaGenericServices() => $_clearField(17);\n\n  @$pb.TagNumber(18)\n  $core.bool get pyGenericServices => $_getBF(7);\n  @$pb.TagNumber(18)\n  set pyGenericServices($core.bool value) => $_setBool(7, value);\n  @$pb.TagNumber(18)\n  $core.bool hasPyGenericServices() => $_has(7);\n  @$pb.TagNumber(18)\n  void clearPyGenericServices() => $_clearField(18);\n\n  /// This option does nothing.\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(20)\n  $core.bool get javaGenerateEqualsAndHash => $_getBF(8);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(20)\n  set javaGenerateEqualsAndHash($core.bool value) => $_setBool(8, value);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(20)\n  $core.bool hasJavaGenerateEqualsAndHash() => $_has(8);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(20)\n  void clearJavaGenerateEqualsAndHash() => $_clearField(20);\n\n  /// Is this file deprecated?\n  /// Depending on the target platform, this can emit Deprecated annotations\n  /// for everything in the file, or it will be completely ignored; in the very\n  /// least, this is a formalization for deprecating files.\n  @$pb.TagNumber(23)\n  $core.bool get deprecated => $_getBF(9);\n  @$pb.TagNumber(23)\n  set deprecated($core.bool value) => $_setBool(9, value);\n  @$pb.TagNumber(23)\n  $core.bool hasDeprecated() => $_has(9);\n  @$pb.TagNumber(23)\n  void clearDeprecated() => $_clearField(23);\n\n  /// A proto2 file can set this to true to opt in to UTF-8 checking for Java,\n  /// which will throw an exception if invalid UTF-8 is parsed from the wire or\n  /// assigned to a string field.\n  ///\n  /// TODO: clarify exactly what kinds of field types this option\n  /// applies to, and update these docs accordingly.\n  ///\n  /// Proto3 files already perform these checks. Setting the option explicitly to\n  /// false has no effect: it cannot be used to opt proto3 files out of UTF-8\n  /// checks.\n  @$pb.TagNumber(27)\n  $core.bool get javaStringCheckUtf8 => $_getBF(10);\n  @$pb.TagNumber(27)\n  set javaStringCheckUtf8($core.bool value) => $_setBool(10, value);\n  @$pb.TagNumber(27)\n  $core.bool hasJavaStringCheckUtf8() => $_has(10);\n  @$pb.TagNumber(27)\n  void clearJavaStringCheckUtf8() => $_clearField(27);\n\n  /// Enables the use of arenas for the proto messages in this file. This applies\n  /// only to generated classes for C++.\n  @$pb.TagNumber(31)\n  $core.bool get ccEnableArenas => $_getB(11, true);\n  @$pb.TagNumber(31)\n  set ccEnableArenas($core.bool value) => $_setBool(11, value);\n  @$pb.TagNumber(31)\n  $core.bool hasCcEnableArenas() => $_has(11);\n  @$pb.TagNumber(31)\n  void clearCcEnableArenas() => $_clearField(31);\n\n  /// Sets the objective c class prefix which is prepended to all objective c\n  /// generated classes from this .proto. There is no default.\n  @$pb.TagNumber(36)\n  $core.String get objcClassPrefix => $_getSZ(12);\n  @$pb.TagNumber(36)\n  set objcClassPrefix($core.String value) => $_setString(12, value);\n  @$pb.TagNumber(36)\n  $core.bool hasObjcClassPrefix() => $_has(12);\n  @$pb.TagNumber(36)\n  void clearObjcClassPrefix() => $_clearField(36);\n\n  /// Namespace for generated classes; defaults to the package.\n  @$pb.TagNumber(37)\n  $core.String get csharpNamespace => $_getSZ(13);\n  @$pb.TagNumber(37)\n  set csharpNamespace($core.String value) => $_setString(13, value);\n  @$pb.TagNumber(37)\n  $core.bool hasCsharpNamespace() => $_has(13);\n  @$pb.TagNumber(37)\n  void clearCsharpNamespace() => $_clearField(37);\n\n  /// By default Swift generators will take the proto package and CamelCase it\n  /// replacing '.' with underscore and use that to prefix the types/symbols\n  /// defined. When this options is provided, they will use this value instead\n  /// to prefix the types/symbols defined.\n  @$pb.TagNumber(39)\n  $core.String get swiftPrefix => $_getSZ(14);\n  @$pb.TagNumber(39)\n  set swiftPrefix($core.String value) => $_setString(14, value);\n  @$pb.TagNumber(39)\n  $core.bool hasSwiftPrefix() => $_has(14);\n  @$pb.TagNumber(39)\n  void clearSwiftPrefix() => $_clearField(39);\n\n  /// Sets the php class prefix which is prepended to all php generated classes\n  /// from this .proto. Default is empty.\n  @$pb.TagNumber(40)\n  $core.String get phpClassPrefix => $_getSZ(15);\n  @$pb.TagNumber(40)\n  set phpClassPrefix($core.String value) => $_setString(15, value);\n  @$pb.TagNumber(40)\n  $core.bool hasPhpClassPrefix() => $_has(15);\n  @$pb.TagNumber(40)\n  void clearPhpClassPrefix() => $_clearField(40);\n\n  /// Use this option to change the namespace of php generated classes. Default\n  /// is empty. When this option is empty, the package name will be used for\n  /// determining the namespace.\n  @$pb.TagNumber(41)\n  $core.String get phpNamespace => $_getSZ(16);\n  @$pb.TagNumber(41)\n  set phpNamespace($core.String value) => $_setString(16, value);\n  @$pb.TagNumber(41)\n  $core.bool hasPhpNamespace() => $_has(16);\n  @$pb.TagNumber(41)\n  void clearPhpNamespace() => $_clearField(41);\n\n  /// Use this option to change the namespace of php generated metadata classes.\n  /// Default is empty. When this option is empty, the proto file name will be\n  /// used for determining the namespace.\n  @$pb.TagNumber(44)\n  $core.String get phpMetadataNamespace => $_getSZ(17);\n  @$pb.TagNumber(44)\n  set phpMetadataNamespace($core.String value) => $_setString(17, value);\n  @$pb.TagNumber(44)\n  $core.bool hasPhpMetadataNamespace() => $_has(17);\n  @$pb.TagNumber(44)\n  void clearPhpMetadataNamespace() => $_clearField(44);\n\n  /// Use this option to change the package of ruby generated classes. Default\n  /// is empty. When this option is not set, the package name will be used for\n  /// determining the ruby package.\n  @$pb.TagNumber(45)\n  $core.String get rubyPackage => $_getSZ(18);\n  @$pb.TagNumber(45)\n  set rubyPackage($core.String value) => $_setString(18, value);\n  @$pb.TagNumber(45)\n  $core.bool hasRubyPackage() => $_has(18);\n  @$pb.TagNumber(45)\n  void clearRubyPackage() => $_clearField(45);\n\n  /// Any features defined in the specific edition.\n  /// WARNING: This field should only be used by protobuf plugins or special\n  /// cases like the proto compiler. Other uses are discouraged and\n  /// developers should rely on the protoreflect APIs for their client language.\n  @$pb.TagNumber(50)\n  FeatureSet get features => $_getN(19);\n  @$pb.TagNumber(50)\n  set features(FeatureSet value) => $_setField(50, value);\n  @$pb.TagNumber(50)\n  $core.bool hasFeatures() => $_has(19);\n  @$pb.TagNumber(50)\n  void clearFeatures() => $_clearField(50);\n  @$pb.TagNumber(50)\n  FeatureSet ensureFeatures() => $_ensure(19);\n\n  /// The parser stores options it doesn't recognize here.\n  /// See the documentation for the \"Options\" section above.\n  @$pb.TagNumber(999)\n  $pb.PbList<UninterpretedOption> get uninterpretedOption => $_getList(20);\n}\n\nclass MessageOptions extends $pb.GeneratedMessage {\n  factory MessageOptions({\n    $core.bool? messageSetWireFormat,\n    $core.bool? noStandardDescriptorAccessor,\n    $core.bool? deprecated,\n    $core.bool? mapEntry,\n    @$core.Deprecated('This field is deprecated.')\n    $core.bool? deprecatedLegacyJsonFieldConflicts,\n    FeatureSet? features,\n    $core.Iterable<UninterpretedOption>? uninterpretedOption,\n  }) {\n    final result = create();\n    if (messageSetWireFormat != null)\n      result.messageSetWireFormat = messageSetWireFormat;\n    if (noStandardDescriptorAccessor != null)\n      result.noStandardDescriptorAccessor = noStandardDescriptorAccessor;\n    if (deprecated != null) result.deprecated = deprecated;\n    if (mapEntry != null) result.mapEntry = mapEntry;\n    if (deprecatedLegacyJsonFieldConflicts != null)\n      result.deprecatedLegacyJsonFieldConflicts =\n          deprecatedLegacyJsonFieldConflicts;\n    if (features != null) result.features = features;\n    if (uninterpretedOption != null)\n      result.uninterpretedOption.addAll(uninterpretedOption);\n    return result;\n  }\n\n  MessageOptions._();\n\n  factory MessageOptions.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory MessageOptions.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'MessageOptions',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOB(1, _omitFieldNames ? '' : 'messageSetWireFormat')\n    ..aOB(2, _omitFieldNames ? '' : 'noStandardDescriptorAccessor')\n    ..aOB(3, _omitFieldNames ? '' : 'deprecated')\n    ..aOB(7, _omitFieldNames ? '' : 'mapEntry')\n    ..aOB(11, _omitFieldNames ? '' : 'deprecatedLegacyJsonFieldConflicts')\n    ..aOM<FeatureSet>(12, _omitFieldNames ? '' : 'features',\n        subBuilder: FeatureSet.create)\n    ..pPM<UninterpretedOption>(\n        999, _omitFieldNames ? '' : 'uninterpretedOption',\n        subBuilder: UninterpretedOption.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MessageOptions clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MessageOptions copyWith(void Function(MessageOptions) updates) =>\n      super.copyWith((message) => updates(message as MessageOptions))\n          as MessageOptions;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static MessageOptions create() => MessageOptions._();\n  @$core.override\n  MessageOptions createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static MessageOptions getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<MessageOptions>(create);\n  static MessageOptions? _defaultInstance;\n\n  /// Set true to use the old proto1 MessageSet wire format for extensions.\n  /// This is provided for backwards-compatibility with the MessageSet wire\n  /// format.  You should not use this for any other reason:  It's less\n  /// efficient, has fewer features, and is more complicated.\n  ///\n  /// The message must be defined exactly as follows:\n  ///   message Foo {\n  ///     option message_set_wire_format = true;\n  ///     extensions 4 to max;\n  ///   }\n  /// Note that the message cannot have any defined fields; MessageSets only\n  /// have extensions.\n  ///\n  /// All extensions of your type must be singular messages; e.g. they cannot\n  /// be int32s, enums, or repeated messages.\n  ///\n  /// Because this is an option, the above two restrictions are not enforced by\n  /// the protocol compiler.\n  @$pb.TagNumber(1)\n  $core.bool get messageSetWireFormat => $_getBF(0);\n  @$pb.TagNumber(1)\n  set messageSetWireFormat($core.bool value) => $_setBool(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasMessageSetWireFormat() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearMessageSetWireFormat() => $_clearField(1);\n\n  /// Disables the generation of the standard \"descriptor()\" accessor, which can\n  /// conflict with a field of the same name.  This is meant to make migration\n  /// from proto1 easier; new code should avoid fields named \"descriptor\".\n  @$pb.TagNumber(2)\n  $core.bool get noStandardDescriptorAccessor => $_getBF(1);\n  @$pb.TagNumber(2)\n  set noStandardDescriptorAccessor($core.bool value) => $_setBool(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasNoStandardDescriptorAccessor() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearNoStandardDescriptorAccessor() => $_clearField(2);\n\n  /// Is this message deprecated?\n  /// Depending on the target platform, this can emit Deprecated annotations\n  /// for the message, or it will be completely ignored; in the very least,\n  /// this is a formalization for deprecating messages.\n  @$pb.TagNumber(3)\n  $core.bool get deprecated => $_getBF(2);\n  @$pb.TagNumber(3)\n  set deprecated($core.bool value) => $_setBool(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasDeprecated() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearDeprecated() => $_clearField(3);\n\n  /// Whether the message is an automatically generated map entry type for the\n  /// maps field.\n  ///\n  /// For maps fields:\n  ///     map<KeyType, ValueType> map_field = 1;\n  /// The parsed descriptor looks like:\n  ///     message MapFieldEntry {\n  ///         option map_entry = true;\n  ///         optional KeyType key = 1;\n  ///         optional ValueType value = 2;\n  ///     }\n  ///     repeated MapFieldEntry map_field = 1;\n  ///\n  /// Implementations may choose not to generate the map_entry=true message, but\n  /// use a native map in the target language to hold the keys and values.\n  /// The reflection APIs in such implementations still need to work as\n  /// if the field is a repeated message field.\n  ///\n  /// NOTE: Do not set the option in .proto files. Always use the maps syntax\n  /// instead. The option should only be implicitly set by the proto compiler\n  /// parser.\n  @$pb.TagNumber(7)\n  $core.bool get mapEntry => $_getBF(3);\n  @$pb.TagNumber(7)\n  set mapEntry($core.bool value) => $_setBool(3, value);\n  @$pb.TagNumber(7)\n  $core.bool hasMapEntry() => $_has(3);\n  @$pb.TagNumber(7)\n  void clearMapEntry() => $_clearField(7);\n\n  /// Enable the legacy handling of JSON field name conflicts.  This lowercases\n  /// and strips underscored from the fields before comparison in proto3 only.\n  /// The new behavior takes `json_name` into account and applies to proto2 as\n  /// well.\n  ///\n  /// This should only be used as a temporary measure against broken builds due\n  /// to the change in behavior for JSON field name conflicts.\n  ///\n  /// TODO This is legacy behavior we plan to remove once downstream\n  /// teams have had time to migrate.\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(11)\n  $core.bool get deprecatedLegacyJsonFieldConflicts => $_getBF(4);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(11)\n  set deprecatedLegacyJsonFieldConflicts($core.bool value) =>\n      $_setBool(4, value);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(11)\n  $core.bool hasDeprecatedLegacyJsonFieldConflicts() => $_has(4);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(11)\n  void clearDeprecatedLegacyJsonFieldConflicts() => $_clearField(11);\n\n  /// Any features defined in the specific edition.\n  /// WARNING: This field should only be used by protobuf plugins or special\n  /// cases like the proto compiler. Other uses are discouraged and\n  /// developers should rely on the protoreflect APIs for their client language.\n  @$pb.TagNumber(12)\n  FeatureSet get features => $_getN(5);\n  @$pb.TagNumber(12)\n  set features(FeatureSet value) => $_setField(12, value);\n  @$pb.TagNumber(12)\n  $core.bool hasFeatures() => $_has(5);\n  @$pb.TagNumber(12)\n  void clearFeatures() => $_clearField(12);\n  @$pb.TagNumber(12)\n  FeatureSet ensureFeatures() => $_ensure(5);\n\n  /// The parser stores options it doesn't recognize here. See above.\n  @$pb.TagNumber(999)\n  $pb.PbList<UninterpretedOption> get uninterpretedOption => $_getList(6);\n}\n\nclass FieldOptions_EditionDefault extends $pb.GeneratedMessage {\n  factory FieldOptions_EditionDefault({\n    $core.String? value,\n    Edition? edition,\n  }) {\n    final result = create();\n    if (value != null) result.value = value;\n    if (edition != null) result.edition = edition;\n    return result;\n  }\n\n  FieldOptions_EditionDefault._();\n\n  factory FieldOptions_EditionDefault.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FieldOptions_EditionDefault.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FieldOptions.EditionDefault',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOS(2, _omitFieldNames ? '' : 'value')\n    ..aE<Edition>(3, _omitFieldNames ? '' : 'edition',\n        enumValues: Edition.values)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FieldOptions_EditionDefault clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FieldOptions_EditionDefault copyWith(\n          void Function(FieldOptions_EditionDefault) updates) =>\n      super.copyWith(\n              (message) => updates(message as FieldOptions_EditionDefault))\n          as FieldOptions_EditionDefault;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FieldOptions_EditionDefault create() =>\n      FieldOptions_EditionDefault._();\n  @$core.override\n  FieldOptions_EditionDefault createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FieldOptions_EditionDefault getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FieldOptions_EditionDefault>(create);\n  static FieldOptions_EditionDefault? _defaultInstance;\n\n  @$pb.TagNumber(2)\n  $core.String get value => $_getSZ(0);\n  @$pb.TagNumber(2)\n  set value($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(2)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(2)\n  void clearValue() => $_clearField(2);\n\n  @$pb.TagNumber(3)\n  Edition get edition => $_getN(1);\n  @$pb.TagNumber(3)\n  set edition(Edition value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasEdition() => $_has(1);\n  @$pb.TagNumber(3)\n  void clearEdition() => $_clearField(3);\n}\n\n/// Information about the support window of a feature.\nclass FieldOptions_FeatureSupport extends $pb.GeneratedMessage {\n  factory FieldOptions_FeatureSupport({\n    Edition? editionIntroduced,\n    Edition? editionDeprecated,\n    $core.String? deprecationWarning,\n    Edition? editionRemoved,\n  }) {\n    final result = create();\n    if (editionIntroduced != null) result.editionIntroduced = editionIntroduced;\n    if (editionDeprecated != null) result.editionDeprecated = editionDeprecated;\n    if (deprecationWarning != null)\n      result.deprecationWarning = deprecationWarning;\n    if (editionRemoved != null) result.editionRemoved = editionRemoved;\n    return result;\n  }\n\n  FieldOptions_FeatureSupport._();\n\n  factory FieldOptions_FeatureSupport.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FieldOptions_FeatureSupport.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FieldOptions.FeatureSupport',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aE<Edition>(1, _omitFieldNames ? '' : 'editionIntroduced',\n        enumValues: Edition.values)\n    ..aE<Edition>(2, _omitFieldNames ? '' : 'editionDeprecated',\n        enumValues: Edition.values)\n    ..aOS(3, _omitFieldNames ? '' : 'deprecationWarning')\n    ..aE<Edition>(4, _omitFieldNames ? '' : 'editionRemoved',\n        enumValues: Edition.values)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FieldOptions_FeatureSupport clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FieldOptions_FeatureSupport copyWith(\n          void Function(FieldOptions_FeatureSupport) updates) =>\n      super.copyWith(\n              (message) => updates(message as FieldOptions_FeatureSupport))\n          as FieldOptions_FeatureSupport;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FieldOptions_FeatureSupport create() =>\n      FieldOptions_FeatureSupport._();\n  @$core.override\n  FieldOptions_FeatureSupport createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FieldOptions_FeatureSupport getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FieldOptions_FeatureSupport>(create);\n  static FieldOptions_FeatureSupport? _defaultInstance;\n\n  /// The edition that this feature was first available in.  In editions\n  /// earlier than this one, the default assigned to EDITION_LEGACY will be\n  /// used, and proto files will not be able to override it.\n  @$pb.TagNumber(1)\n  Edition get editionIntroduced => $_getN(0);\n  @$pb.TagNumber(1)\n  set editionIntroduced(Edition value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasEditionIntroduced() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearEditionIntroduced() => $_clearField(1);\n\n  /// The edition this feature becomes deprecated in.  Using this after this\n  /// edition may trigger warnings.\n  @$pb.TagNumber(2)\n  Edition get editionDeprecated => $_getN(1);\n  @$pb.TagNumber(2)\n  set editionDeprecated(Edition value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasEditionDeprecated() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearEditionDeprecated() => $_clearField(2);\n\n  /// The deprecation warning text if this feature is used after the edition it\n  /// was marked deprecated in.\n  @$pb.TagNumber(3)\n  $core.String get deprecationWarning => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set deprecationWarning($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasDeprecationWarning() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearDeprecationWarning() => $_clearField(3);\n\n  /// The edition this feature is no longer available in.  In editions after\n  /// this one, the last default assigned will be used, and proto files will\n  /// not be able to override it.\n  @$pb.TagNumber(4)\n  Edition get editionRemoved => $_getN(3);\n  @$pb.TagNumber(4)\n  set editionRemoved(Edition value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasEditionRemoved() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearEditionRemoved() => $_clearField(4);\n}\n\nclass FieldOptions extends $pb.GeneratedMessage {\n  factory FieldOptions({\n    FieldOptions_CType? ctype,\n    $core.bool? packed,\n    $core.bool? deprecated,\n    $core.bool? lazy,\n    FieldOptions_JSType? jstype,\n    @$core.Deprecated('This field is deprecated.') $core.bool? weak,\n    $core.bool? unverifiedLazy,\n    $core.bool? debugRedact,\n    FieldOptions_OptionRetention? retention,\n    $core.Iterable<FieldOptions_OptionTargetType>? targets,\n    $core.Iterable<FieldOptions_EditionDefault>? editionDefaults,\n    FeatureSet? features,\n    FieldOptions_FeatureSupport? featureSupport,\n    $core.Iterable<UninterpretedOption>? uninterpretedOption,\n  }) {\n    final result = create();\n    if (ctype != null) result.ctype = ctype;\n    if (packed != null) result.packed = packed;\n    if (deprecated != null) result.deprecated = deprecated;\n    if (lazy != null) result.lazy = lazy;\n    if (jstype != null) result.jstype = jstype;\n    if (weak != null) result.weak = weak;\n    if (unverifiedLazy != null) result.unverifiedLazy = unverifiedLazy;\n    if (debugRedact != null) result.debugRedact = debugRedact;\n    if (retention != null) result.retention = retention;\n    if (targets != null) result.targets.addAll(targets);\n    if (editionDefaults != null) result.editionDefaults.addAll(editionDefaults);\n    if (features != null) result.features = features;\n    if (featureSupport != null) result.featureSupport = featureSupport;\n    if (uninterpretedOption != null)\n      result.uninterpretedOption.addAll(uninterpretedOption);\n    return result;\n  }\n\n  FieldOptions._();\n\n  factory FieldOptions.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FieldOptions.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FieldOptions',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aE<FieldOptions_CType>(1, _omitFieldNames ? '' : 'ctype',\n        defaultOrMaker: FieldOptions_CType.STRING,\n        enumValues: FieldOptions_CType.values)\n    ..aOB(2, _omitFieldNames ? '' : 'packed')\n    ..aOB(3, _omitFieldNames ? '' : 'deprecated')\n    ..aOB(5, _omitFieldNames ? '' : 'lazy')\n    ..aE<FieldOptions_JSType>(6, _omitFieldNames ? '' : 'jstype',\n        defaultOrMaker: FieldOptions_JSType.JS_NORMAL,\n        enumValues: FieldOptions_JSType.values)\n    ..aOB(10, _omitFieldNames ? '' : 'weak')\n    ..aOB(15, _omitFieldNames ? '' : 'unverifiedLazy')\n    ..aOB(16, _omitFieldNames ? '' : 'debugRedact')\n    ..aE<FieldOptions_OptionRetention>(17, _omitFieldNames ? '' : 'retention',\n        enumValues: FieldOptions_OptionRetention.values)\n    ..pPE<FieldOptions_OptionTargetType>(19, _omitFieldNames ? '' : 'targets',\n        enumValues: FieldOptions_OptionTargetType.values)\n    ..pPM<FieldOptions_EditionDefault>(\n        20, _omitFieldNames ? '' : 'editionDefaults',\n        subBuilder: FieldOptions_EditionDefault.create)\n    ..aOM<FeatureSet>(21, _omitFieldNames ? '' : 'features',\n        subBuilder: FeatureSet.create)\n    ..aOM<FieldOptions_FeatureSupport>(\n        22, _omitFieldNames ? '' : 'featureSupport',\n        subBuilder: FieldOptions_FeatureSupport.create)\n    ..pPM<UninterpretedOption>(\n        999, _omitFieldNames ? '' : 'uninterpretedOption',\n        subBuilder: UninterpretedOption.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FieldOptions clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FieldOptions copyWith(void Function(FieldOptions) updates) =>\n      super.copyWith((message) => updates(message as FieldOptions))\n          as FieldOptions;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FieldOptions create() => FieldOptions._();\n  @$core.override\n  FieldOptions createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FieldOptions getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FieldOptions>(create);\n  static FieldOptions? _defaultInstance;\n\n  /// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.\n  /// The ctype option instructs the C++ code generator to use a different\n  /// representation of the field than it normally would.  See the specific\n  /// options below.  This option is only implemented to support use of\n  /// [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of\n  /// type \"bytes\" in the open source release.\n  /// TODO: make ctype actually deprecated.\n  @$pb.TagNumber(1)\n  FieldOptions_CType get ctype => $_getN(0);\n  @$pb.TagNumber(1)\n  set ctype(FieldOptions_CType value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasCtype() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearCtype() => $_clearField(1);\n\n  /// The packed option can be enabled for repeated primitive fields to enable\n  /// a more efficient representation on the wire. Rather than repeatedly\n  /// writing the tag and type for each element, the entire array is encoded as\n  /// a single length-delimited blob. In proto3, only explicit setting it to\n  /// false will avoid using packed encoding.  This option is prohibited in\n  /// Editions, but the `repeated_field_encoding` feature can be used to control\n  /// the behavior.\n  @$pb.TagNumber(2)\n  $core.bool get packed => $_getBF(1);\n  @$pb.TagNumber(2)\n  set packed($core.bool value) => $_setBool(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPacked() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPacked() => $_clearField(2);\n\n  /// Is this field deprecated?\n  /// Depending on the target platform, this can emit Deprecated annotations\n  /// for accessors, or it will be completely ignored; in the very least, this\n  /// is a formalization for deprecating fields.\n  @$pb.TagNumber(3)\n  $core.bool get deprecated => $_getBF(2);\n  @$pb.TagNumber(3)\n  set deprecated($core.bool value) => $_setBool(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasDeprecated() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearDeprecated() => $_clearField(3);\n\n  /// Should this field be parsed lazily?  Lazy applies only to message-type\n  /// fields.  It means that when the outer message is initially parsed, the\n  /// inner message's contents will not be parsed but instead stored in encoded\n  /// form.  The inner message will actually be parsed when it is first accessed.\n  ///\n  /// This is only a hint.  Implementations are free to choose whether to use\n  /// eager or lazy parsing regardless of the value of this option.  However,\n  /// setting this option true suggests that the protocol author believes that\n  /// using lazy parsing on this field is worth the additional bookkeeping\n  /// overhead typically needed to implement it.\n  ///\n  /// This option does not affect the public interface of any generated code;\n  /// all method signatures remain the same.  Furthermore, thread-safety of the\n  /// interface is not affected by this option; const methods remain safe to\n  /// call from multiple threads concurrently, while non-const methods continue\n  /// to require exclusive access.\n  ///\n  /// Note that lazy message fields are still eagerly verified to check\n  /// ill-formed wireformat or missing required fields. Calling IsInitialized()\n  /// on the outer message would fail if the inner message has missing required\n  /// fields. Failed verification would result in parsing failure (except when\n  /// uninitialized messages are acceptable).\n  @$pb.TagNumber(5)\n  $core.bool get lazy => $_getBF(3);\n  @$pb.TagNumber(5)\n  set lazy($core.bool value) => $_setBool(3, value);\n  @$pb.TagNumber(5)\n  $core.bool hasLazy() => $_has(3);\n  @$pb.TagNumber(5)\n  void clearLazy() => $_clearField(5);\n\n  /// The jstype option determines the JavaScript type used for values of the\n  /// field.  The option is permitted only for 64 bit integral and fixed types\n  /// (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING\n  /// is represented as JavaScript string, which avoids loss of precision that\n  /// can happen when a large value is converted to a floating point JavaScript.\n  /// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to\n  /// use the JavaScript \"number\" type.  The behavior of the default option\n  /// JS_NORMAL is implementation dependent.\n  ///\n  /// This option is an enum to permit additional types to be added, e.g.\n  /// goog.math.Integer.\n  @$pb.TagNumber(6)\n  FieldOptions_JSType get jstype => $_getN(4);\n  @$pb.TagNumber(6)\n  set jstype(FieldOptions_JSType value) => $_setField(6, value);\n  @$pb.TagNumber(6)\n  $core.bool hasJstype() => $_has(4);\n  @$pb.TagNumber(6)\n  void clearJstype() => $_clearField(6);\n\n  /// DEPRECATED. DO NOT USE!\n  /// For Google-internal migration only. Do not use.\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(10)\n  $core.bool get weak => $_getBF(5);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(10)\n  set weak($core.bool value) => $_setBool(5, value);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(10)\n  $core.bool hasWeak() => $_has(5);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(10)\n  void clearWeak() => $_clearField(10);\n\n  /// unverified_lazy does no correctness checks on the byte stream. This should\n  /// only be used where lazy with verification is prohibitive for performance\n  /// reasons.\n  @$pb.TagNumber(15)\n  $core.bool get unverifiedLazy => $_getBF(6);\n  @$pb.TagNumber(15)\n  set unverifiedLazy($core.bool value) => $_setBool(6, value);\n  @$pb.TagNumber(15)\n  $core.bool hasUnverifiedLazy() => $_has(6);\n  @$pb.TagNumber(15)\n  void clearUnverifiedLazy() => $_clearField(15);\n\n  /// Indicate that the field value should not be printed out when using debug\n  /// formats, e.g. when the field contains sensitive credentials.\n  @$pb.TagNumber(16)\n  $core.bool get debugRedact => $_getBF(7);\n  @$pb.TagNumber(16)\n  set debugRedact($core.bool value) => $_setBool(7, value);\n  @$pb.TagNumber(16)\n  $core.bool hasDebugRedact() => $_has(7);\n  @$pb.TagNumber(16)\n  void clearDebugRedact() => $_clearField(16);\n\n  @$pb.TagNumber(17)\n  FieldOptions_OptionRetention get retention => $_getN(8);\n  @$pb.TagNumber(17)\n  set retention(FieldOptions_OptionRetention value) => $_setField(17, value);\n  @$pb.TagNumber(17)\n  $core.bool hasRetention() => $_has(8);\n  @$pb.TagNumber(17)\n  void clearRetention() => $_clearField(17);\n\n  @$pb.TagNumber(19)\n  $pb.PbList<FieldOptions_OptionTargetType> get targets => $_getList(9);\n\n  @$pb.TagNumber(20)\n  $pb.PbList<FieldOptions_EditionDefault> get editionDefaults => $_getList(10);\n\n  /// Any features defined in the specific edition.\n  /// WARNING: This field should only be used by protobuf plugins or special\n  /// cases like the proto compiler. Other uses are discouraged and\n  /// developers should rely on the protoreflect APIs for their client language.\n  @$pb.TagNumber(21)\n  FeatureSet get features => $_getN(11);\n  @$pb.TagNumber(21)\n  set features(FeatureSet value) => $_setField(21, value);\n  @$pb.TagNumber(21)\n  $core.bool hasFeatures() => $_has(11);\n  @$pb.TagNumber(21)\n  void clearFeatures() => $_clearField(21);\n  @$pb.TagNumber(21)\n  FeatureSet ensureFeatures() => $_ensure(11);\n\n  @$pb.TagNumber(22)\n  FieldOptions_FeatureSupport get featureSupport => $_getN(12);\n  @$pb.TagNumber(22)\n  set featureSupport(FieldOptions_FeatureSupport value) =>\n      $_setField(22, value);\n  @$pb.TagNumber(22)\n  $core.bool hasFeatureSupport() => $_has(12);\n  @$pb.TagNumber(22)\n  void clearFeatureSupport() => $_clearField(22);\n  @$pb.TagNumber(22)\n  FieldOptions_FeatureSupport ensureFeatureSupport() => $_ensure(12);\n\n  /// The parser stores options it doesn't recognize here. See above.\n  @$pb.TagNumber(999)\n  $pb.PbList<UninterpretedOption> get uninterpretedOption => $_getList(13);\n}\n\nclass OneofOptions extends $pb.GeneratedMessage {\n  factory OneofOptions({\n    FeatureSet? features,\n    $core.Iterable<UninterpretedOption>? uninterpretedOption,\n  }) {\n    final result = create();\n    if (features != null) result.features = features;\n    if (uninterpretedOption != null)\n      result.uninterpretedOption.addAll(uninterpretedOption);\n    return result;\n  }\n\n  OneofOptions._();\n\n  factory OneofOptions.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory OneofOptions.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'OneofOptions',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOM<FeatureSet>(1, _omitFieldNames ? '' : 'features',\n        subBuilder: FeatureSet.create)\n    ..pPM<UninterpretedOption>(\n        999, _omitFieldNames ? '' : 'uninterpretedOption',\n        subBuilder: UninterpretedOption.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  OneofOptions clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  OneofOptions copyWith(void Function(OneofOptions) updates) =>\n      super.copyWith((message) => updates(message as OneofOptions))\n          as OneofOptions;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static OneofOptions create() => OneofOptions._();\n  @$core.override\n  OneofOptions createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static OneofOptions getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<OneofOptions>(create);\n  static OneofOptions? _defaultInstance;\n\n  /// Any features defined in the specific edition.\n  /// WARNING: This field should only be used by protobuf plugins or special\n  /// cases like the proto compiler. Other uses are discouraged and\n  /// developers should rely on the protoreflect APIs for their client language.\n  @$pb.TagNumber(1)\n  FeatureSet get features => $_getN(0);\n  @$pb.TagNumber(1)\n  set features(FeatureSet value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasFeatures() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearFeatures() => $_clearField(1);\n  @$pb.TagNumber(1)\n  FeatureSet ensureFeatures() => $_ensure(0);\n\n  /// The parser stores options it doesn't recognize here. See above.\n  @$pb.TagNumber(999)\n  $pb.PbList<UninterpretedOption> get uninterpretedOption => $_getList(1);\n}\n\nclass EnumOptions extends $pb.GeneratedMessage {\n  factory EnumOptions({\n    $core.bool? allowAlias,\n    $core.bool? deprecated,\n    @$core.Deprecated('This field is deprecated.')\n    $core.bool? deprecatedLegacyJsonFieldConflicts,\n    FeatureSet? features,\n    $core.Iterable<UninterpretedOption>? uninterpretedOption,\n  }) {\n    final result = create();\n    if (allowAlias != null) result.allowAlias = allowAlias;\n    if (deprecated != null) result.deprecated = deprecated;\n    if (deprecatedLegacyJsonFieldConflicts != null)\n      result.deprecatedLegacyJsonFieldConflicts =\n          deprecatedLegacyJsonFieldConflicts;\n    if (features != null) result.features = features;\n    if (uninterpretedOption != null)\n      result.uninterpretedOption.addAll(uninterpretedOption);\n    return result;\n  }\n\n  EnumOptions._();\n\n  factory EnumOptions.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory EnumOptions.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'EnumOptions',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOB(2, _omitFieldNames ? '' : 'allowAlias')\n    ..aOB(3, _omitFieldNames ? '' : 'deprecated')\n    ..aOB(6, _omitFieldNames ? '' : 'deprecatedLegacyJsonFieldConflicts')\n    ..aOM<FeatureSet>(7, _omitFieldNames ? '' : 'features',\n        subBuilder: FeatureSet.create)\n    ..pPM<UninterpretedOption>(\n        999, _omitFieldNames ? '' : 'uninterpretedOption',\n        subBuilder: UninterpretedOption.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumOptions clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumOptions copyWith(void Function(EnumOptions) updates) =>\n      super.copyWith((message) => updates(message as EnumOptions))\n          as EnumOptions;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static EnumOptions create() => EnumOptions._();\n  @$core.override\n  EnumOptions createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static EnumOptions getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<EnumOptions>(create);\n  static EnumOptions? _defaultInstance;\n\n  /// Set this option to true to allow mapping different tag names to the same\n  /// value.\n  @$pb.TagNumber(2)\n  $core.bool get allowAlias => $_getBF(0);\n  @$pb.TagNumber(2)\n  set allowAlias($core.bool value) => $_setBool(0, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAllowAlias() => $_has(0);\n  @$pb.TagNumber(2)\n  void clearAllowAlias() => $_clearField(2);\n\n  /// Is this enum deprecated?\n  /// Depending on the target platform, this can emit Deprecated annotations\n  /// for the enum, or it will be completely ignored; in the very least, this\n  /// is a formalization for deprecating enums.\n  @$pb.TagNumber(3)\n  $core.bool get deprecated => $_getBF(1);\n  @$pb.TagNumber(3)\n  set deprecated($core.bool value) => $_setBool(1, value);\n  @$pb.TagNumber(3)\n  $core.bool hasDeprecated() => $_has(1);\n  @$pb.TagNumber(3)\n  void clearDeprecated() => $_clearField(3);\n\n  /// Enable the legacy handling of JSON field name conflicts.  This lowercases\n  /// and strips underscored from the fields before comparison in proto3 only.\n  /// The new behavior takes `json_name` into account and applies to proto2 as\n  /// well.\n  /// TODO Remove this legacy behavior once downstream teams have\n  /// had time to migrate.\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(6)\n  $core.bool get deprecatedLegacyJsonFieldConflicts => $_getBF(2);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(6)\n  set deprecatedLegacyJsonFieldConflicts($core.bool value) =>\n      $_setBool(2, value);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(6)\n  $core.bool hasDeprecatedLegacyJsonFieldConflicts() => $_has(2);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(6)\n  void clearDeprecatedLegacyJsonFieldConflicts() => $_clearField(6);\n\n  /// Any features defined in the specific edition.\n  /// WARNING: This field should only be used by protobuf plugins or special\n  /// cases like the proto compiler. Other uses are discouraged and\n  /// developers should rely on the protoreflect APIs for their client language.\n  @$pb.TagNumber(7)\n  FeatureSet get features => $_getN(3);\n  @$pb.TagNumber(7)\n  set features(FeatureSet value) => $_setField(7, value);\n  @$pb.TagNumber(7)\n  $core.bool hasFeatures() => $_has(3);\n  @$pb.TagNumber(7)\n  void clearFeatures() => $_clearField(7);\n  @$pb.TagNumber(7)\n  FeatureSet ensureFeatures() => $_ensure(3);\n\n  /// The parser stores options it doesn't recognize here. See above.\n  @$pb.TagNumber(999)\n  $pb.PbList<UninterpretedOption> get uninterpretedOption => $_getList(4);\n}\n\nclass EnumValueOptions extends $pb.GeneratedMessage {\n  factory EnumValueOptions({\n    $core.bool? deprecated,\n    FeatureSet? features,\n    $core.bool? debugRedact,\n    FieldOptions_FeatureSupport? featureSupport,\n    $core.Iterable<UninterpretedOption>? uninterpretedOption,\n  }) {\n    final result = create();\n    if (deprecated != null) result.deprecated = deprecated;\n    if (features != null) result.features = features;\n    if (debugRedact != null) result.debugRedact = debugRedact;\n    if (featureSupport != null) result.featureSupport = featureSupport;\n    if (uninterpretedOption != null)\n      result.uninterpretedOption.addAll(uninterpretedOption);\n    return result;\n  }\n\n  EnumValueOptions._();\n\n  factory EnumValueOptions.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory EnumValueOptions.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'EnumValueOptions',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOB(1, _omitFieldNames ? '' : 'deprecated')\n    ..aOM<FeatureSet>(2, _omitFieldNames ? '' : 'features',\n        subBuilder: FeatureSet.create)\n    ..aOB(3, _omitFieldNames ? '' : 'debugRedact')\n    ..aOM<FieldOptions_FeatureSupport>(\n        4, _omitFieldNames ? '' : 'featureSupport',\n        subBuilder: FieldOptions_FeatureSupport.create)\n    ..pPM<UninterpretedOption>(\n        999, _omitFieldNames ? '' : 'uninterpretedOption',\n        subBuilder: UninterpretedOption.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumValueOptions clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  EnumValueOptions copyWith(void Function(EnumValueOptions) updates) =>\n      super.copyWith((message) => updates(message as EnumValueOptions))\n          as EnumValueOptions;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static EnumValueOptions create() => EnumValueOptions._();\n  @$core.override\n  EnumValueOptions createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static EnumValueOptions getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<EnumValueOptions>(create);\n  static EnumValueOptions? _defaultInstance;\n\n  /// Is this enum value deprecated?\n  /// Depending on the target platform, this can emit Deprecated annotations\n  /// for the enum value, or it will be completely ignored; in the very least,\n  /// this is a formalization for deprecating enum values.\n  @$pb.TagNumber(1)\n  $core.bool get deprecated => $_getBF(0);\n  @$pb.TagNumber(1)\n  set deprecated($core.bool value) => $_setBool(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasDeprecated() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearDeprecated() => $_clearField(1);\n\n  /// Any features defined in the specific edition.\n  /// WARNING: This field should only be used by protobuf plugins or special\n  /// cases like the proto compiler. Other uses are discouraged and\n  /// developers should rely on the protoreflect APIs for their client language.\n  @$pb.TagNumber(2)\n  FeatureSet get features => $_getN(1);\n  @$pb.TagNumber(2)\n  set features(FeatureSet value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasFeatures() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearFeatures() => $_clearField(2);\n  @$pb.TagNumber(2)\n  FeatureSet ensureFeatures() => $_ensure(1);\n\n  /// Indicate that fields annotated with this enum value should not be printed\n  /// out when using debug formats, e.g. when the field contains sensitive\n  /// credentials.\n  @$pb.TagNumber(3)\n  $core.bool get debugRedact => $_getBF(2);\n  @$pb.TagNumber(3)\n  set debugRedact($core.bool value) => $_setBool(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasDebugRedact() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearDebugRedact() => $_clearField(3);\n\n  /// Information about the support window of a feature value.\n  @$pb.TagNumber(4)\n  FieldOptions_FeatureSupport get featureSupport => $_getN(3);\n  @$pb.TagNumber(4)\n  set featureSupport(FieldOptions_FeatureSupport value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasFeatureSupport() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearFeatureSupport() => $_clearField(4);\n  @$pb.TagNumber(4)\n  FieldOptions_FeatureSupport ensureFeatureSupport() => $_ensure(3);\n\n  /// The parser stores options it doesn't recognize here. See above.\n  @$pb.TagNumber(999)\n  $pb.PbList<UninterpretedOption> get uninterpretedOption => $_getList(4);\n}\n\nclass ServiceOptions extends $pb.GeneratedMessage {\n  factory ServiceOptions({\n    $core.bool? deprecated,\n    FeatureSet? features,\n    $core.Iterable<UninterpretedOption>? uninterpretedOption,\n  }) {\n    final result = create();\n    if (deprecated != null) result.deprecated = deprecated;\n    if (features != null) result.features = features;\n    if (uninterpretedOption != null)\n      result.uninterpretedOption.addAll(uninterpretedOption);\n    return result;\n  }\n\n  ServiceOptions._();\n\n  factory ServiceOptions.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ServiceOptions.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ServiceOptions',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOB(33, _omitFieldNames ? '' : 'deprecated')\n    ..aOM<FeatureSet>(34, _omitFieldNames ? '' : 'features',\n        subBuilder: FeatureSet.create)\n    ..pPM<UninterpretedOption>(\n        999, _omitFieldNames ? '' : 'uninterpretedOption',\n        subBuilder: UninterpretedOption.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ServiceOptions clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ServiceOptions copyWith(void Function(ServiceOptions) updates) =>\n      super.copyWith((message) => updates(message as ServiceOptions))\n          as ServiceOptions;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ServiceOptions create() => ServiceOptions._();\n  @$core.override\n  ServiceOptions createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ServiceOptions getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ServiceOptions>(create);\n  static ServiceOptions? _defaultInstance;\n\n  /// Is this service deprecated?\n  /// Depending on the target platform, this can emit Deprecated annotations\n  /// for the service, or it will be completely ignored; in the very least,\n  /// this is a formalization for deprecating services.\n  @$pb.TagNumber(33)\n  $core.bool get deprecated => $_getBF(0);\n  @$pb.TagNumber(33)\n  set deprecated($core.bool value) => $_setBool(0, value);\n  @$pb.TagNumber(33)\n  $core.bool hasDeprecated() => $_has(0);\n  @$pb.TagNumber(33)\n  void clearDeprecated() => $_clearField(33);\n\n  /// Any features defined in the specific edition.\n  /// WARNING: This field should only be used by protobuf plugins or special\n  /// cases like the proto compiler. Other uses are discouraged and\n  /// developers should rely on the protoreflect APIs for their client language.\n  @$pb.TagNumber(34)\n  FeatureSet get features => $_getN(1);\n  @$pb.TagNumber(34)\n  set features(FeatureSet value) => $_setField(34, value);\n  @$pb.TagNumber(34)\n  $core.bool hasFeatures() => $_has(1);\n  @$pb.TagNumber(34)\n  void clearFeatures() => $_clearField(34);\n  @$pb.TagNumber(34)\n  FeatureSet ensureFeatures() => $_ensure(1);\n\n  /// The parser stores options it doesn't recognize here. See above.\n  @$pb.TagNumber(999)\n  $pb.PbList<UninterpretedOption> get uninterpretedOption => $_getList(2);\n}\n\nclass MethodOptions extends $pb.GeneratedMessage {\n  factory MethodOptions({\n    $core.bool? deprecated,\n    MethodOptions_IdempotencyLevel? idempotencyLevel,\n    FeatureSet? features,\n    $core.Iterable<UninterpretedOption>? uninterpretedOption,\n  }) {\n    final result = create();\n    if (deprecated != null) result.deprecated = deprecated;\n    if (idempotencyLevel != null) result.idempotencyLevel = idempotencyLevel;\n    if (features != null) result.features = features;\n    if (uninterpretedOption != null)\n      result.uninterpretedOption.addAll(uninterpretedOption);\n    return result;\n  }\n\n  MethodOptions._();\n\n  factory MethodOptions.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory MethodOptions.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'MethodOptions',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aOB(33, _omitFieldNames ? '' : 'deprecated')\n    ..aE<MethodOptions_IdempotencyLevel>(\n        34, _omitFieldNames ? '' : 'idempotencyLevel',\n        defaultOrMaker: MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN,\n        enumValues: MethodOptions_IdempotencyLevel.values)\n    ..aOM<FeatureSet>(35, _omitFieldNames ? '' : 'features',\n        subBuilder: FeatureSet.create)\n    ..pPM<UninterpretedOption>(\n        999, _omitFieldNames ? '' : 'uninterpretedOption',\n        subBuilder: UninterpretedOption.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MethodOptions clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MethodOptions copyWith(void Function(MethodOptions) updates) =>\n      super.copyWith((message) => updates(message as MethodOptions))\n          as MethodOptions;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static MethodOptions create() => MethodOptions._();\n  @$core.override\n  MethodOptions createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static MethodOptions getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<MethodOptions>(create);\n  static MethodOptions? _defaultInstance;\n\n  /// Is this method deprecated?\n  /// Depending on the target platform, this can emit Deprecated annotations\n  /// for the method, or it will be completely ignored; in the very least,\n  /// this is a formalization for deprecating methods.\n  @$pb.TagNumber(33)\n  $core.bool get deprecated => $_getBF(0);\n  @$pb.TagNumber(33)\n  set deprecated($core.bool value) => $_setBool(0, value);\n  @$pb.TagNumber(33)\n  $core.bool hasDeprecated() => $_has(0);\n  @$pb.TagNumber(33)\n  void clearDeprecated() => $_clearField(33);\n\n  @$pb.TagNumber(34)\n  MethodOptions_IdempotencyLevel get idempotencyLevel => $_getN(1);\n  @$pb.TagNumber(34)\n  set idempotencyLevel(MethodOptions_IdempotencyLevel value) =>\n      $_setField(34, value);\n  @$pb.TagNumber(34)\n  $core.bool hasIdempotencyLevel() => $_has(1);\n  @$pb.TagNumber(34)\n  void clearIdempotencyLevel() => $_clearField(34);\n\n  /// Any features defined in the specific edition.\n  /// WARNING: This field should only be used by protobuf plugins or special\n  /// cases like the proto compiler. Other uses are discouraged and\n  /// developers should rely on the protoreflect APIs for their client language.\n  @$pb.TagNumber(35)\n  FeatureSet get features => $_getN(2);\n  @$pb.TagNumber(35)\n  set features(FeatureSet value) => $_setField(35, value);\n  @$pb.TagNumber(35)\n  $core.bool hasFeatures() => $_has(2);\n  @$pb.TagNumber(35)\n  void clearFeatures() => $_clearField(35);\n  @$pb.TagNumber(35)\n  FeatureSet ensureFeatures() => $_ensure(2);\n\n  /// The parser stores options it doesn't recognize here. See above.\n  @$pb.TagNumber(999)\n  $pb.PbList<UninterpretedOption> get uninterpretedOption => $_getList(3);\n}\n\n/// The name of the uninterpreted option.  Each string represents a segment in\n/// a dot-separated name.  is_extension is true iff a segment represents an\n/// extension (denoted with parentheses in options specs in .proto files).\n/// E.g.,{ [\"foo\", false], [\"bar.baz\", true], [\"moo\", false] } represents\n/// \"foo.(bar.baz).moo\".\nclass UninterpretedOption_NamePart extends $pb.GeneratedMessage {\n  factory UninterpretedOption_NamePart({\n    $core.String? namePart,\n    $core.bool? isExtension,\n  }) {\n    final result = create();\n    if (namePart != null) result.namePart = namePart;\n    if (isExtension != null) result.isExtension = isExtension;\n    return result;\n  }\n\n  UninterpretedOption_NamePart._();\n\n  factory UninterpretedOption_NamePart.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory UninterpretedOption_NamePart.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'UninterpretedOption.NamePart',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aQS(1, _omitFieldNames ? '' : 'namePart')\n    ..a<$core.bool>(\n        2, _omitFieldNames ? '' : 'isExtension', $pb.PbFieldType.QB);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UninterpretedOption_NamePart clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UninterpretedOption_NamePart copyWith(\n          void Function(UninterpretedOption_NamePart) updates) =>\n      super.copyWith(\n              (message) => updates(message as UninterpretedOption_NamePart))\n          as UninterpretedOption_NamePart;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static UninterpretedOption_NamePart create() =>\n      UninterpretedOption_NamePart._();\n  @$core.override\n  UninterpretedOption_NamePart createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static UninterpretedOption_NamePart getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<UninterpretedOption_NamePart>(create);\n  static UninterpretedOption_NamePart? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get namePart => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set namePart($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasNamePart() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearNamePart() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $core.bool get isExtension => $_getBF(1);\n  @$pb.TagNumber(2)\n  set isExtension($core.bool value) => $_setBool(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasIsExtension() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearIsExtension() => $_clearField(2);\n}\n\n/// A message representing a option the parser does not recognize. This only\n/// appears in options protos created by the compiler::Parser class.\n/// DescriptorPool resolves these when building Descriptor objects. Therefore,\n/// options protos in descriptor objects (e.g. returned by Descriptor::options(),\n/// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions\n/// in them.\nclass UninterpretedOption extends $pb.GeneratedMessage {\n  factory UninterpretedOption({\n    $core.Iterable<UninterpretedOption_NamePart>? name,\n    $core.String? identifierValue,\n    $fixnum.Int64? positiveIntValue,\n    $fixnum.Int64? negativeIntValue,\n    $core.double? doubleValue,\n    $core.List<$core.int>? stringValue,\n    $core.String? aggregateValue,\n  }) {\n    final result = create();\n    if (name != null) result.name.addAll(name);\n    if (identifierValue != null) result.identifierValue = identifierValue;\n    if (positiveIntValue != null) result.positiveIntValue = positiveIntValue;\n    if (negativeIntValue != null) result.negativeIntValue = negativeIntValue;\n    if (doubleValue != null) result.doubleValue = doubleValue;\n    if (stringValue != null) result.stringValue = stringValue;\n    if (aggregateValue != null) result.aggregateValue = aggregateValue;\n    return result;\n  }\n\n  UninterpretedOption._();\n\n  factory UninterpretedOption.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory UninterpretedOption.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'UninterpretedOption',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..pPM<UninterpretedOption_NamePart>(2, _omitFieldNames ? '' : 'name',\n        subBuilder: UninterpretedOption_NamePart.create)\n    ..aOS(3, _omitFieldNames ? '' : 'identifierValue')\n    ..a<$fixnum.Int64>(\n        4, _omitFieldNames ? '' : 'positiveIntValue', $pb.PbFieldType.OU6,\n        defaultOrMaker: $fixnum.Int64.ZERO)\n    ..aInt64(5, _omitFieldNames ? '' : 'negativeIntValue')\n    ..aD(6, _omitFieldNames ? '' : 'doubleValue')\n    ..a<$core.List<$core.int>>(\n        7, _omitFieldNames ? '' : 'stringValue', $pb.PbFieldType.OY)\n    ..aOS(8, _omitFieldNames ? '' : 'aggregateValue');\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UninterpretedOption clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UninterpretedOption copyWith(void Function(UninterpretedOption) updates) =>\n      super.copyWith((message) => updates(message as UninterpretedOption))\n          as UninterpretedOption;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static UninterpretedOption create() => UninterpretedOption._();\n  @$core.override\n  UninterpretedOption createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static UninterpretedOption getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<UninterpretedOption>(create);\n  static UninterpretedOption? _defaultInstance;\n\n  @$pb.TagNumber(2)\n  $pb.PbList<UninterpretedOption_NamePart> get name => $_getList(0);\n\n  /// The value of the uninterpreted option, in whatever type the tokenizer\n  /// identified it as during parsing. Exactly one of these should be set.\n  @$pb.TagNumber(3)\n  $core.String get identifierValue => $_getSZ(1);\n  @$pb.TagNumber(3)\n  set identifierValue($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(3)\n  $core.bool hasIdentifierValue() => $_has(1);\n  @$pb.TagNumber(3)\n  void clearIdentifierValue() => $_clearField(3);\n\n  @$pb.TagNumber(4)\n  $fixnum.Int64 get positiveIntValue => $_getI64(2);\n  @$pb.TagNumber(4)\n  set positiveIntValue($fixnum.Int64 value) => $_setInt64(2, value);\n  @$pb.TagNumber(4)\n  $core.bool hasPositiveIntValue() => $_has(2);\n  @$pb.TagNumber(4)\n  void clearPositiveIntValue() => $_clearField(4);\n\n  @$pb.TagNumber(5)\n  $fixnum.Int64 get negativeIntValue => $_getI64(3);\n  @$pb.TagNumber(5)\n  set negativeIntValue($fixnum.Int64 value) => $_setInt64(3, value);\n  @$pb.TagNumber(5)\n  $core.bool hasNegativeIntValue() => $_has(3);\n  @$pb.TagNumber(5)\n  void clearNegativeIntValue() => $_clearField(5);\n\n  @$pb.TagNumber(6)\n  $core.double get doubleValue => $_getN(4);\n  @$pb.TagNumber(6)\n  set doubleValue($core.double value) => $_setDouble(4, value);\n  @$pb.TagNumber(6)\n  $core.bool hasDoubleValue() => $_has(4);\n  @$pb.TagNumber(6)\n  void clearDoubleValue() => $_clearField(6);\n\n  @$pb.TagNumber(7)\n  $core.List<$core.int> get stringValue => $_getN(5);\n  @$pb.TagNumber(7)\n  set stringValue($core.List<$core.int> value) => $_setBytes(5, value);\n  @$pb.TagNumber(7)\n  $core.bool hasStringValue() => $_has(5);\n  @$pb.TagNumber(7)\n  void clearStringValue() => $_clearField(7);\n\n  @$pb.TagNumber(8)\n  $core.String get aggregateValue => $_getSZ(6);\n  @$pb.TagNumber(8)\n  set aggregateValue($core.String value) => $_setString(6, value);\n  @$pb.TagNumber(8)\n  $core.bool hasAggregateValue() => $_has(6);\n  @$pb.TagNumber(8)\n  void clearAggregateValue() => $_clearField(8);\n}\n\nclass FeatureSet_VisibilityFeature extends $pb.GeneratedMessage {\n  factory FeatureSet_VisibilityFeature() => create();\n\n  FeatureSet_VisibilityFeature._();\n\n  factory FeatureSet_VisibilityFeature.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FeatureSet_VisibilityFeature.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FeatureSet.VisibilityFeature',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FeatureSet_VisibilityFeature clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FeatureSet_VisibilityFeature copyWith(\n          void Function(FeatureSet_VisibilityFeature) updates) =>\n      super.copyWith(\n              (message) => updates(message as FeatureSet_VisibilityFeature))\n          as FeatureSet_VisibilityFeature;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FeatureSet_VisibilityFeature create() =>\n      FeatureSet_VisibilityFeature._();\n  @$core.override\n  FeatureSet_VisibilityFeature createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FeatureSet_VisibilityFeature getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FeatureSet_VisibilityFeature>(create);\n  static FeatureSet_VisibilityFeature? _defaultInstance;\n}\n\n/// TODO Enums in C++ gencode (and potentially other languages) are\n/// not well scoped.  This means that each of the feature enums below can clash\n/// with each other.  The short names we've chosen maximize call-site\n/// readability, but leave us very open to this scenario.  A future feature will\n/// be designed and implemented to handle this, hopefully before we ever hit a\n/// conflict here.\nclass FeatureSet extends $pb.GeneratedMessage {\n  factory FeatureSet({\n    FeatureSet_FieldPresence? fieldPresence,\n    FeatureSet_EnumType? enumType,\n    FeatureSet_RepeatedFieldEncoding? repeatedFieldEncoding,\n    FeatureSet_Utf8Validation? utf8Validation,\n    FeatureSet_MessageEncoding? messageEncoding,\n    FeatureSet_JsonFormat? jsonFormat,\n    FeatureSet_EnforceNamingStyle? enforceNamingStyle,\n    FeatureSet_VisibilityFeature_DefaultSymbolVisibility?\n        defaultSymbolVisibility,\n  }) {\n    final result = create();\n    if (fieldPresence != null) result.fieldPresence = fieldPresence;\n    if (enumType != null) result.enumType = enumType;\n    if (repeatedFieldEncoding != null)\n      result.repeatedFieldEncoding = repeatedFieldEncoding;\n    if (utf8Validation != null) result.utf8Validation = utf8Validation;\n    if (messageEncoding != null) result.messageEncoding = messageEncoding;\n    if (jsonFormat != null) result.jsonFormat = jsonFormat;\n    if (enforceNamingStyle != null)\n      result.enforceNamingStyle = enforceNamingStyle;\n    if (defaultSymbolVisibility != null)\n      result.defaultSymbolVisibility = defaultSymbolVisibility;\n    return result;\n  }\n\n  FeatureSet._();\n\n  factory FeatureSet.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FeatureSet.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FeatureSet',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aE<FeatureSet_FieldPresence>(1, _omitFieldNames ? '' : 'fieldPresence',\n        enumValues: FeatureSet_FieldPresence.values)\n    ..aE<FeatureSet_EnumType>(2, _omitFieldNames ? '' : 'enumType',\n        enumValues: FeatureSet_EnumType.values)\n    ..aE<FeatureSet_RepeatedFieldEncoding>(\n        3, _omitFieldNames ? '' : 'repeatedFieldEncoding',\n        enumValues: FeatureSet_RepeatedFieldEncoding.values)\n    ..aE<FeatureSet_Utf8Validation>(4, _omitFieldNames ? '' : 'utf8Validation',\n        enumValues: FeatureSet_Utf8Validation.values)\n    ..aE<FeatureSet_MessageEncoding>(\n        5, _omitFieldNames ? '' : 'messageEncoding',\n        enumValues: FeatureSet_MessageEncoding.values)\n    ..aE<FeatureSet_JsonFormat>(6, _omitFieldNames ? '' : 'jsonFormat',\n        enumValues: FeatureSet_JsonFormat.values)\n    ..aE<FeatureSet_EnforceNamingStyle>(\n        7, _omitFieldNames ? '' : 'enforceNamingStyle',\n        enumValues: FeatureSet_EnforceNamingStyle.values)\n    ..aE<FeatureSet_VisibilityFeature_DefaultSymbolVisibility>(\n        8, _omitFieldNames ? '' : 'defaultSymbolVisibility',\n        enumValues: FeatureSet_VisibilityFeature_DefaultSymbolVisibility.values)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FeatureSet clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FeatureSet copyWith(void Function(FeatureSet) updates) =>\n      super.copyWith((message) => updates(message as FeatureSet)) as FeatureSet;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FeatureSet create() => FeatureSet._();\n  @$core.override\n  FeatureSet createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FeatureSet getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FeatureSet>(create);\n  static FeatureSet? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  FeatureSet_FieldPresence get fieldPresence => $_getN(0);\n  @$pb.TagNumber(1)\n  set fieldPresence(FeatureSet_FieldPresence value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasFieldPresence() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearFieldPresence() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  FeatureSet_EnumType get enumType => $_getN(1);\n  @$pb.TagNumber(2)\n  set enumType(FeatureSet_EnumType value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasEnumType() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearEnumType() => $_clearField(2);\n\n  @$pb.TagNumber(3)\n  FeatureSet_RepeatedFieldEncoding get repeatedFieldEncoding => $_getN(2);\n  @$pb.TagNumber(3)\n  set repeatedFieldEncoding(FeatureSet_RepeatedFieldEncoding value) =>\n      $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasRepeatedFieldEncoding() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearRepeatedFieldEncoding() => $_clearField(3);\n\n  @$pb.TagNumber(4)\n  FeatureSet_Utf8Validation get utf8Validation => $_getN(3);\n  @$pb.TagNumber(4)\n  set utf8Validation(FeatureSet_Utf8Validation value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasUtf8Validation() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearUtf8Validation() => $_clearField(4);\n\n  @$pb.TagNumber(5)\n  FeatureSet_MessageEncoding get messageEncoding => $_getN(4);\n  @$pb.TagNumber(5)\n  set messageEncoding(FeatureSet_MessageEncoding value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasMessageEncoding() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearMessageEncoding() => $_clearField(5);\n\n  @$pb.TagNumber(6)\n  FeatureSet_JsonFormat get jsonFormat => $_getN(5);\n  @$pb.TagNumber(6)\n  set jsonFormat(FeatureSet_JsonFormat value) => $_setField(6, value);\n  @$pb.TagNumber(6)\n  $core.bool hasJsonFormat() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearJsonFormat() => $_clearField(6);\n\n  @$pb.TagNumber(7)\n  FeatureSet_EnforceNamingStyle get enforceNamingStyle => $_getN(6);\n  @$pb.TagNumber(7)\n  set enforceNamingStyle(FeatureSet_EnforceNamingStyle value) =>\n      $_setField(7, value);\n  @$pb.TagNumber(7)\n  $core.bool hasEnforceNamingStyle() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearEnforceNamingStyle() => $_clearField(7);\n\n  @$pb.TagNumber(8)\n  FeatureSet_VisibilityFeature_DefaultSymbolVisibility\n      get defaultSymbolVisibility => $_getN(7);\n  @$pb.TagNumber(8)\n  set defaultSymbolVisibility(\n          FeatureSet_VisibilityFeature_DefaultSymbolVisibility value) =>\n      $_setField(8, value);\n  @$pb.TagNumber(8)\n  $core.bool hasDefaultSymbolVisibility() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearDefaultSymbolVisibility() => $_clearField(8);\n}\n\n/// A map from every known edition with a unique set of defaults to its\n/// defaults. Not all editions may be contained here.  For a given edition,\n/// the defaults at the closest matching edition ordered at or before it should\n/// be used.  This field must be in strict ascending order by edition.\nclass FeatureSetDefaults_FeatureSetEditionDefault extends $pb.GeneratedMessage {\n  factory FeatureSetDefaults_FeatureSetEditionDefault({\n    Edition? edition,\n    FeatureSet? overridableFeatures,\n    FeatureSet? fixedFeatures,\n  }) {\n    final result = create();\n    if (edition != null) result.edition = edition;\n    if (overridableFeatures != null)\n      result.overridableFeatures = overridableFeatures;\n    if (fixedFeatures != null) result.fixedFeatures = fixedFeatures;\n    return result;\n  }\n\n  FeatureSetDefaults_FeatureSetEditionDefault._();\n\n  factory FeatureSetDefaults_FeatureSetEditionDefault.fromBuffer(\n          $core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FeatureSetDefaults_FeatureSetEditionDefault.fromJson(\n          $core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FeatureSetDefaults.FeatureSetEditionDefault',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..aE<Edition>(3, _omitFieldNames ? '' : 'edition',\n        enumValues: Edition.values)\n    ..aOM<FeatureSet>(4, _omitFieldNames ? '' : 'overridableFeatures',\n        subBuilder: FeatureSet.create)\n    ..aOM<FeatureSet>(5, _omitFieldNames ? '' : 'fixedFeatures',\n        subBuilder: FeatureSet.create);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FeatureSetDefaults_FeatureSetEditionDefault clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FeatureSetDefaults_FeatureSetEditionDefault copyWith(\n          void Function(FeatureSetDefaults_FeatureSetEditionDefault) updates) =>\n      super.copyWith((message) =>\n              updates(message as FeatureSetDefaults_FeatureSetEditionDefault))\n          as FeatureSetDefaults_FeatureSetEditionDefault;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FeatureSetDefaults_FeatureSetEditionDefault create() =>\n      FeatureSetDefaults_FeatureSetEditionDefault._();\n  @$core.override\n  FeatureSetDefaults_FeatureSetEditionDefault createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FeatureSetDefaults_FeatureSetEditionDefault getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<\n          FeatureSetDefaults_FeatureSetEditionDefault>(create);\n  static FeatureSetDefaults_FeatureSetEditionDefault? _defaultInstance;\n\n  @$pb.TagNumber(3)\n  Edition get edition => $_getN(0);\n  @$pb.TagNumber(3)\n  set edition(Edition value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasEdition() => $_has(0);\n  @$pb.TagNumber(3)\n  void clearEdition() => $_clearField(3);\n\n  /// Defaults of features that can be overridden in this edition.\n  @$pb.TagNumber(4)\n  FeatureSet get overridableFeatures => $_getN(1);\n  @$pb.TagNumber(4)\n  set overridableFeatures(FeatureSet value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasOverridableFeatures() => $_has(1);\n  @$pb.TagNumber(4)\n  void clearOverridableFeatures() => $_clearField(4);\n  @$pb.TagNumber(4)\n  FeatureSet ensureOverridableFeatures() => $_ensure(1);\n\n  /// Defaults of features that can't be overridden in this edition.\n  @$pb.TagNumber(5)\n  FeatureSet get fixedFeatures => $_getN(2);\n  @$pb.TagNumber(5)\n  set fixedFeatures(FeatureSet value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasFixedFeatures() => $_has(2);\n  @$pb.TagNumber(5)\n  void clearFixedFeatures() => $_clearField(5);\n  @$pb.TagNumber(5)\n  FeatureSet ensureFixedFeatures() => $_ensure(2);\n}\n\n/// A compiled specification for the defaults of a set of features.  These\n/// messages are generated from FeatureSet extensions and can be used to seed\n/// feature resolution. The resolution with this object becomes a simple search\n/// for the closest matching edition, followed by proto merges.\nclass FeatureSetDefaults extends $pb.GeneratedMessage {\n  factory FeatureSetDefaults({\n    $core.Iterable<FeatureSetDefaults_FeatureSetEditionDefault>? defaults,\n    Edition? minimumEdition,\n    Edition? maximumEdition,\n  }) {\n    final result = create();\n    if (defaults != null) result.defaults.addAll(defaults);\n    if (minimumEdition != null) result.minimumEdition = minimumEdition;\n    if (maximumEdition != null) result.maximumEdition = maximumEdition;\n    return result;\n  }\n\n  FeatureSetDefaults._();\n\n  factory FeatureSetDefaults.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory FeatureSetDefaults.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'FeatureSetDefaults',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..pPM<FeatureSetDefaults_FeatureSetEditionDefault>(\n        1, _omitFieldNames ? '' : 'defaults',\n        subBuilder: FeatureSetDefaults_FeatureSetEditionDefault.create)\n    ..aE<Edition>(4, _omitFieldNames ? '' : 'minimumEdition',\n        enumValues: Edition.values)\n    ..aE<Edition>(5, _omitFieldNames ? '' : 'maximumEdition',\n        enumValues: Edition.values);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FeatureSetDefaults clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  FeatureSetDefaults copyWith(void Function(FeatureSetDefaults) updates) =>\n      super.copyWith((message) => updates(message as FeatureSetDefaults))\n          as FeatureSetDefaults;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static FeatureSetDefaults create() => FeatureSetDefaults._();\n  @$core.override\n  FeatureSetDefaults createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static FeatureSetDefaults getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<FeatureSetDefaults>(create);\n  static FeatureSetDefaults? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $pb.PbList<FeatureSetDefaults_FeatureSetEditionDefault> get defaults =>\n      $_getList(0);\n\n  /// The minimum supported edition (inclusive) when this was constructed.\n  /// Editions before this will not have defaults.\n  @$pb.TagNumber(4)\n  Edition get minimumEdition => $_getN(1);\n  @$pb.TagNumber(4)\n  set minimumEdition(Edition value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasMinimumEdition() => $_has(1);\n  @$pb.TagNumber(4)\n  void clearMinimumEdition() => $_clearField(4);\n\n  /// The maximum known edition (inclusive) when this was constructed. Editions\n  /// after this will not have reliable defaults.\n  @$pb.TagNumber(5)\n  Edition get maximumEdition => $_getN(2);\n  @$pb.TagNumber(5)\n  set maximumEdition(Edition value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasMaximumEdition() => $_has(2);\n  @$pb.TagNumber(5)\n  void clearMaximumEdition() => $_clearField(5);\n}\n\nclass SourceCodeInfo_Location extends $pb.GeneratedMessage {\n  factory SourceCodeInfo_Location({\n    $core.Iterable<$core.int>? path,\n    $core.Iterable<$core.int>? span,\n    $core.String? leadingComments,\n    $core.String? trailingComments,\n    $core.Iterable<$core.String>? leadingDetachedComments,\n  }) {\n    final result = create();\n    if (path != null) result.path.addAll(path);\n    if (span != null) result.span.addAll(span);\n    if (leadingComments != null) result.leadingComments = leadingComments;\n    if (trailingComments != null) result.trailingComments = trailingComments;\n    if (leadingDetachedComments != null)\n      result.leadingDetachedComments.addAll(leadingDetachedComments);\n    return result;\n  }\n\n  SourceCodeInfo_Location._();\n\n  factory SourceCodeInfo_Location.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SourceCodeInfo_Location.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SourceCodeInfo.Location',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..p<$core.int>(1, _omitFieldNames ? '' : 'path', $pb.PbFieldType.K3)\n    ..p<$core.int>(2, _omitFieldNames ? '' : 'span', $pb.PbFieldType.K3)\n    ..aOS(3, _omitFieldNames ? '' : 'leadingComments')\n    ..aOS(4, _omitFieldNames ? '' : 'trailingComments')\n    ..pPS(6, _omitFieldNames ? '' : 'leadingDetachedComments')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SourceCodeInfo_Location clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SourceCodeInfo_Location copyWith(\n          void Function(SourceCodeInfo_Location) updates) =>\n      super.copyWith((message) => updates(message as SourceCodeInfo_Location))\n          as SourceCodeInfo_Location;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SourceCodeInfo_Location create() => SourceCodeInfo_Location._();\n  @$core.override\n  SourceCodeInfo_Location createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SourceCodeInfo_Location getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SourceCodeInfo_Location>(create);\n  static SourceCodeInfo_Location? _defaultInstance;\n\n  /// Identifies which part of the FileDescriptorProto was defined at this\n  /// location.\n  ///\n  /// Each element is a field number or an index.  They form a path from\n  /// the root FileDescriptorProto to the place where the definition appears.\n  /// For example, this path:\n  ///   [ 4, 3, 2, 7, 1 ]\n  /// refers to:\n  ///   file.message_type(3)  // 4, 3\n  ///       .field(7)         // 2, 7\n  ///       .name()           // 1\n  /// This is because FileDescriptorProto.message_type has field number 4:\n  ///   repeated DescriptorProto message_type = 4;\n  /// and DescriptorProto.field has field number 2:\n  ///   repeated FieldDescriptorProto field = 2;\n  /// and FieldDescriptorProto.name has field number 1:\n  ///   optional string name = 1;\n  ///\n  /// Thus, the above path gives the location of a field name.  If we removed\n  /// the last element:\n  ///   [ 4, 3, 2, 7 ]\n  /// this path refers to the whole field declaration (from the beginning\n  /// of the label to the terminating semicolon).\n  @$pb.TagNumber(1)\n  $pb.PbList<$core.int> get path => $_getList(0);\n\n  /// Always has exactly three or four elements: start line, start column,\n  /// end line (optional, otherwise assumed same as start line), end column.\n  /// These are packed into a single field for efficiency.  Note that line\n  /// and column numbers are zero-based -- typically you will want to add\n  /// 1 to each before displaying to a user.\n  @$pb.TagNumber(2)\n  $pb.PbList<$core.int> get span => $_getList(1);\n\n  /// If this SourceCodeInfo represents a complete declaration, these are any\n  /// comments appearing before and after the declaration which appear to be\n  /// attached to the declaration.\n  ///\n  /// A series of line comments appearing on consecutive lines, with no other\n  /// tokens appearing on those lines, will be treated as a single comment.\n  ///\n  /// leading_detached_comments will keep paragraphs of comments that appear\n  /// before (but not connected to) the current element. Each paragraph,\n  /// separated by empty lines, will be one comment element in the repeated\n  /// field.\n  ///\n  /// Only the comment content is provided; comment markers (e.g. //) are\n  /// stripped out.  For block comments, leading whitespace and an asterisk\n  /// will be stripped from the beginning of each line other than the first.\n  /// Newlines are included in the output.\n  ///\n  /// Examples:\n  ///\n  ///   optional int32 foo = 1;  // Comment attached to foo.\n  ///   // Comment attached to bar.\n  ///   optional int32 bar = 2;\n  ///\n  ///   optional string baz = 3;\n  ///   // Comment attached to baz.\n  ///   // Another line attached to baz.\n  ///\n  ///   // Comment attached to moo.\n  ///   //\n  ///   // Another line attached to moo.\n  ///   optional double moo = 4;\n  ///\n  ///   // Detached comment for corge. This is not leading or trailing comments\n  ///   // to moo or corge because there are blank lines separating it from\n  ///   // both.\n  ///\n  ///   // Detached comment for corge paragraph 2.\n  ///\n  ///   optional string corge = 5;\n  ///   /* Block comment attached\n  ///    * to corge.  Leading asterisks\n  ///    * will be removed. */\n  ///   /* Block comment attached to\n  ///    * grault. */\n  ///   optional int32 grault = 6;\n  ///\n  ///   // ignored detached comments.\n  @$pb.TagNumber(3)\n  $core.String get leadingComments => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set leadingComments($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasLeadingComments() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearLeadingComments() => $_clearField(3);\n\n  @$pb.TagNumber(4)\n  $core.String get trailingComments => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set trailingComments($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasTrailingComments() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearTrailingComments() => $_clearField(4);\n\n  @$pb.TagNumber(6)\n  $pb.PbList<$core.String> get leadingDetachedComments => $_getList(4);\n}\n\n/// Encapsulates information about the original source file from which a\n/// FileDescriptorProto was generated.\nclass SourceCodeInfo extends $pb.GeneratedMessage {\n  factory SourceCodeInfo({\n    $core.Iterable<SourceCodeInfo_Location>? location,\n  }) {\n    final result = create();\n    if (location != null) result.location.addAll(location);\n    return result;\n  }\n\n  SourceCodeInfo._();\n\n  factory SourceCodeInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SourceCodeInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SourceCodeInfo',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..pPM<SourceCodeInfo_Location>(1, _omitFieldNames ? '' : 'location',\n        subBuilder: SourceCodeInfo_Location.create)\n    ..hasExtensions = true;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SourceCodeInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SourceCodeInfo copyWith(void Function(SourceCodeInfo) updates) =>\n      super.copyWith((message) => updates(message as SourceCodeInfo))\n          as SourceCodeInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SourceCodeInfo create() => SourceCodeInfo._();\n  @$core.override\n  SourceCodeInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SourceCodeInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SourceCodeInfo>(create);\n  static SourceCodeInfo? _defaultInstance;\n\n  /// A Location identifies a piece of source code in a .proto file which\n  /// corresponds to a particular definition.  This information is intended\n  /// to be useful to IDEs, code indexers, documentation generators, and similar\n  /// tools.\n  ///\n  /// For example, say we have a file like:\n  ///   message Foo {\n  ///     optional string foo = 1;\n  ///   }\n  /// Let's look at just the field definition:\n  ///   optional string foo = 1;\n  ///   ^       ^^     ^^  ^  ^^^\n  ///   a       bc     de  f  ghi\n  /// We have the following locations:\n  ///   span   path               represents\n  ///   [a,i)  [ 4, 0, 2, 0 ]     The whole field definition.\n  ///   [a,b)  [ 4, 0, 2, 0, 4 ]  The label (optional).\n  ///   [c,d)  [ 4, 0, 2, 0, 5 ]  The type (string).\n  ///   [e,f)  [ 4, 0, 2, 0, 1 ]  The name (foo).\n  ///   [g,h)  [ 4, 0, 2, 0, 3 ]  The number (1).\n  ///\n  /// Notes:\n  /// - A location may refer to a repeated field itself (i.e. not to any\n  ///   particular index within it).  This is used whenever a set of elements are\n  ///   logically enclosed in a single code segment.  For example, an entire\n  ///   extend block (possibly containing multiple extension definitions) will\n  ///   have an outer location whose path refers to the \"extensions\" repeated\n  ///   field without an index.\n  /// - Multiple locations may have the same path.  This happens when a single\n  ///   logical declaration is spread out across multiple places.  The most\n  ///   obvious example is the \"extend\" block again -- there may be multiple\n  ///   extend blocks in the same scope, each of which will have the same path.\n  /// - A location's span is not always a subset of its parent's span.  For\n  ///   example, the \"extendee\" of an extension declaration appears at the\n  ///   beginning of the \"extend\" block and is shared by all extensions within\n  ///   the block.\n  /// - Just because a location's span is a subset of some other location's span\n  ///   does not mean that it is a descendant.  For example, a \"group\" defines\n  ///   both a type and a field in a single declaration.  Thus, the locations\n  ///   corresponding to the type and field and their components will overlap.\n  /// - Code which tries to interpret locations should probably be designed to\n  ///   ignore those that it doesn't understand, as more types of locations could\n  ///   be recorded in the future.\n  @$pb.TagNumber(1)\n  $pb.PbList<SourceCodeInfo_Location> get location => $_getList(0);\n}\n\nclass GeneratedCodeInfo_Annotation extends $pb.GeneratedMessage {\n  factory GeneratedCodeInfo_Annotation({\n    $core.Iterable<$core.int>? path,\n    $core.String? sourceFile,\n    $core.int? begin,\n    $core.int? end,\n    GeneratedCodeInfo_Annotation_Semantic? semantic,\n  }) {\n    final result = create();\n    if (path != null) result.path.addAll(path);\n    if (sourceFile != null) result.sourceFile = sourceFile;\n    if (begin != null) result.begin = begin;\n    if (end != null) result.end = end;\n    if (semantic != null) result.semantic = semantic;\n    return result;\n  }\n\n  GeneratedCodeInfo_Annotation._();\n\n  factory GeneratedCodeInfo_Annotation.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GeneratedCodeInfo_Annotation.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GeneratedCodeInfo.Annotation',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..p<$core.int>(1, _omitFieldNames ? '' : 'path', $pb.PbFieldType.K3)\n    ..aOS(2, _omitFieldNames ? '' : 'sourceFile')\n    ..aI(3, _omitFieldNames ? '' : 'begin')\n    ..aI(4, _omitFieldNames ? '' : 'end')\n    ..aE<GeneratedCodeInfo_Annotation_Semantic>(\n        5, _omitFieldNames ? '' : 'semantic',\n        enumValues: GeneratedCodeInfo_Annotation_Semantic.values)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GeneratedCodeInfo_Annotation clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GeneratedCodeInfo_Annotation copyWith(\n          void Function(GeneratedCodeInfo_Annotation) updates) =>\n      super.copyWith(\n              (message) => updates(message as GeneratedCodeInfo_Annotation))\n          as GeneratedCodeInfo_Annotation;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GeneratedCodeInfo_Annotation create() =>\n      GeneratedCodeInfo_Annotation._();\n  @$core.override\n  GeneratedCodeInfo_Annotation createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GeneratedCodeInfo_Annotation getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GeneratedCodeInfo_Annotation>(create);\n  static GeneratedCodeInfo_Annotation? _defaultInstance;\n\n  /// Identifies the element in the original source .proto file. This field\n  /// is formatted the same as SourceCodeInfo.Location.path.\n  @$pb.TagNumber(1)\n  $pb.PbList<$core.int> get path => $_getList(0);\n\n  /// Identifies the filesystem path to the original source .proto.\n  @$pb.TagNumber(2)\n  $core.String get sourceFile => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set sourceFile($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasSourceFile() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearSourceFile() => $_clearField(2);\n\n  /// Identifies the starting offset in bytes in the generated code\n  /// that relates to the identified object.\n  @$pb.TagNumber(3)\n  $core.int get begin => $_getIZ(2);\n  @$pb.TagNumber(3)\n  set begin($core.int value) => $_setSignedInt32(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasBegin() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearBegin() => $_clearField(3);\n\n  /// Identifies the ending offset in bytes in the generated code that\n  /// relates to the identified object. The end offset should be one past\n  /// the last relevant byte (so the length of the text = end - begin).\n  @$pb.TagNumber(4)\n  $core.int get end => $_getIZ(3);\n  @$pb.TagNumber(4)\n  set end($core.int value) => $_setSignedInt32(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasEnd() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearEnd() => $_clearField(4);\n\n  @$pb.TagNumber(5)\n  GeneratedCodeInfo_Annotation_Semantic get semantic => $_getN(4);\n  @$pb.TagNumber(5)\n  set semantic(GeneratedCodeInfo_Annotation_Semantic value) =>\n      $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasSemantic() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearSemantic() => $_clearField(5);\n}\n\n/// Describes the relationship between generated code and its original source\n/// file. A GeneratedCodeInfo message is associated with only one generated\n/// source file, but may contain references to different source .proto files.\nclass GeneratedCodeInfo extends $pb.GeneratedMessage {\n  factory GeneratedCodeInfo({\n    $core.Iterable<GeneratedCodeInfo_Annotation>? annotation,\n  }) {\n    final result = create();\n    if (annotation != null) result.annotation.addAll(annotation);\n    return result;\n  }\n\n  GeneratedCodeInfo._();\n\n  factory GeneratedCodeInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GeneratedCodeInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GeneratedCodeInfo',\n      package:\n          const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),\n      createEmptyInstance: create)\n    ..pPM<GeneratedCodeInfo_Annotation>(1, _omitFieldNames ? '' : 'annotation',\n        subBuilder: GeneratedCodeInfo_Annotation.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GeneratedCodeInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GeneratedCodeInfo copyWith(void Function(GeneratedCodeInfo) updates) =>\n      super.copyWith((message) => updates(message as GeneratedCodeInfo))\n          as GeneratedCodeInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GeneratedCodeInfo create() => GeneratedCodeInfo._();\n  @$core.override\n  GeneratedCodeInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GeneratedCodeInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GeneratedCodeInfo>(create);\n  static GeneratedCodeInfo? _defaultInstance;\n\n  /// An Annotation connects some span of text in generated code to an element\n  /// of its generating .proto file.\n  @$pb.TagNumber(1)\n  $pb.PbList<GeneratedCodeInfo_Annotation> get annotation => $_getList(0);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/protobuf/descriptor.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/descriptor.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// The full set of known editions.\nclass Edition extends $pb.ProtobufEnum {\n  /// A placeholder for an unknown edition value.\n  static const Edition EDITION_UNKNOWN =\n      Edition._(0, _omitEnumNames ? '' : 'EDITION_UNKNOWN');\n\n  /// A placeholder edition for specifying default behaviors *before* a feature\n  /// was first introduced.  This is effectively an \"infinite past\".\n  static const Edition EDITION_LEGACY =\n      Edition._(900, _omitEnumNames ? '' : 'EDITION_LEGACY');\n\n  /// Legacy syntax \"editions\".  These pre-date editions, but behave much like\n  /// distinct editions.  These can't be used to specify the edition of proto\n  /// files, but feature definitions must supply proto2/proto3 defaults for\n  /// backwards compatibility.\n  static const Edition EDITION_PROTO2 =\n      Edition._(998, _omitEnumNames ? '' : 'EDITION_PROTO2');\n  static const Edition EDITION_PROTO3 =\n      Edition._(999, _omitEnumNames ? '' : 'EDITION_PROTO3');\n\n  /// Editions that have been released.  The specific values are arbitrary and\n  /// should not be depended on, but they will always be time-ordered for easy\n  /// comparison.\n  static const Edition EDITION_2023 =\n      Edition._(1000, _omitEnumNames ? '' : 'EDITION_2023');\n  static const Edition EDITION_2024 =\n      Edition._(1001, _omitEnumNames ? '' : 'EDITION_2024');\n\n  /// Placeholder editions for testing feature resolution.  These should not be\n  /// used or relied on outside of tests.\n  static const Edition EDITION_1_TEST_ONLY =\n      Edition._(1, _omitEnumNames ? '' : 'EDITION_1_TEST_ONLY');\n  static const Edition EDITION_2_TEST_ONLY =\n      Edition._(2, _omitEnumNames ? '' : 'EDITION_2_TEST_ONLY');\n  static const Edition EDITION_99997_TEST_ONLY =\n      Edition._(99997, _omitEnumNames ? '' : 'EDITION_99997_TEST_ONLY');\n  static const Edition EDITION_99998_TEST_ONLY =\n      Edition._(99998, _omitEnumNames ? '' : 'EDITION_99998_TEST_ONLY');\n  static const Edition EDITION_99999_TEST_ONLY =\n      Edition._(99999, _omitEnumNames ? '' : 'EDITION_99999_TEST_ONLY');\n\n  /// Placeholder for specifying unbounded edition support.  This should only\n  /// ever be used by plugins that can expect to never require any changes to\n  /// support a new edition.\n  static const Edition EDITION_MAX =\n      Edition._(2147483647, _omitEnumNames ? '' : 'EDITION_MAX');\n\n  static const $core.List<Edition> values = <Edition>[\n    EDITION_UNKNOWN,\n    EDITION_LEGACY,\n    EDITION_PROTO2,\n    EDITION_PROTO3,\n    EDITION_2023,\n    EDITION_2024,\n    EDITION_1_TEST_ONLY,\n    EDITION_2_TEST_ONLY,\n    EDITION_99997_TEST_ONLY,\n    EDITION_99998_TEST_ONLY,\n    EDITION_99999_TEST_ONLY,\n    EDITION_MAX,\n  ];\n\n  static final $core.Map<$core.int, Edition> _byValue =\n      $pb.ProtobufEnum.initByValue(values);\n  static Edition? valueOf($core.int value) => _byValue[value];\n\n  const Edition._(super.value, super.name);\n}\n\n/// Describes the 'visibility' of a symbol with respect to the proto import\n/// system. Symbols can only be imported when the visibility rules do not prevent\n/// it (ex: local symbols cannot be imported).  Visibility modifiers can only set\n/// on `message` and `enum` as they are the only types available to be referenced\n/// from other files.\nclass SymbolVisibility extends $pb.ProtobufEnum {\n  static const SymbolVisibility VISIBILITY_UNSET =\n      SymbolVisibility._(0, _omitEnumNames ? '' : 'VISIBILITY_UNSET');\n  static const SymbolVisibility VISIBILITY_LOCAL =\n      SymbolVisibility._(1, _omitEnumNames ? '' : 'VISIBILITY_LOCAL');\n  static const SymbolVisibility VISIBILITY_EXPORT =\n      SymbolVisibility._(2, _omitEnumNames ? '' : 'VISIBILITY_EXPORT');\n\n  static const $core.List<SymbolVisibility> values = <SymbolVisibility>[\n    VISIBILITY_UNSET,\n    VISIBILITY_LOCAL,\n    VISIBILITY_EXPORT,\n  ];\n\n  static final $core.List<SymbolVisibility?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static SymbolVisibility? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const SymbolVisibility._(super.value, super.name);\n}\n\n/// The verification state of the extension range.\nclass ExtensionRangeOptions_VerificationState extends $pb.ProtobufEnum {\n  /// All the extensions of the range must be declared.\n  static const ExtensionRangeOptions_VerificationState DECLARATION =\n      ExtensionRangeOptions_VerificationState._(\n          0, _omitEnumNames ? '' : 'DECLARATION');\n  static const ExtensionRangeOptions_VerificationState UNVERIFIED =\n      ExtensionRangeOptions_VerificationState._(\n          1, _omitEnumNames ? '' : 'UNVERIFIED');\n\n  static const $core.List<ExtensionRangeOptions_VerificationState> values =\n      <ExtensionRangeOptions_VerificationState>[\n    DECLARATION,\n    UNVERIFIED,\n  ];\n\n  static final $core.List<ExtensionRangeOptions_VerificationState?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 1);\n  static ExtensionRangeOptions_VerificationState? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const ExtensionRangeOptions_VerificationState._(super.value, super.name);\n}\n\nclass FieldDescriptorProto_Type extends $pb.ProtobufEnum {\n  /// 0 is reserved for errors.\n  /// Order is weird for historical reasons.\n  static const FieldDescriptorProto_Type TYPE_DOUBLE =\n      FieldDescriptorProto_Type._(1, _omitEnumNames ? '' : 'TYPE_DOUBLE');\n  static const FieldDescriptorProto_Type TYPE_FLOAT =\n      FieldDescriptorProto_Type._(2, _omitEnumNames ? '' : 'TYPE_FLOAT');\n\n  /// Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT64 if\n  /// negative values are likely.\n  static const FieldDescriptorProto_Type TYPE_INT64 =\n      FieldDescriptorProto_Type._(3, _omitEnumNames ? '' : 'TYPE_INT64');\n  static const FieldDescriptorProto_Type TYPE_UINT64 =\n      FieldDescriptorProto_Type._(4, _omitEnumNames ? '' : 'TYPE_UINT64');\n\n  /// Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT32 if\n  /// negative values are likely.\n  static const FieldDescriptorProto_Type TYPE_INT32 =\n      FieldDescriptorProto_Type._(5, _omitEnumNames ? '' : 'TYPE_INT32');\n  static const FieldDescriptorProto_Type TYPE_FIXED64 =\n      FieldDescriptorProto_Type._(6, _omitEnumNames ? '' : 'TYPE_FIXED64');\n  static const FieldDescriptorProto_Type TYPE_FIXED32 =\n      FieldDescriptorProto_Type._(7, _omitEnumNames ? '' : 'TYPE_FIXED32');\n  static const FieldDescriptorProto_Type TYPE_BOOL =\n      FieldDescriptorProto_Type._(8, _omitEnumNames ? '' : 'TYPE_BOOL');\n  static const FieldDescriptorProto_Type TYPE_STRING =\n      FieldDescriptorProto_Type._(9, _omitEnumNames ? '' : 'TYPE_STRING');\n\n  /// Tag-delimited aggregate.\n  /// Group type is deprecated and not supported after google.protobuf. However, Proto3\n  /// implementations should still be able to parse the group wire format and\n  /// treat group fields as unknown fields.  In Editions, the group wire format\n  /// can be enabled via the `message_encoding` feature.\n  static const FieldDescriptorProto_Type TYPE_GROUP =\n      FieldDescriptorProto_Type._(10, _omitEnumNames ? '' : 'TYPE_GROUP');\n  static const FieldDescriptorProto_Type TYPE_MESSAGE =\n      FieldDescriptorProto_Type._(11, _omitEnumNames ? '' : 'TYPE_MESSAGE');\n\n  /// New in version 2.\n  static const FieldDescriptorProto_Type TYPE_BYTES =\n      FieldDescriptorProto_Type._(12, _omitEnumNames ? '' : 'TYPE_BYTES');\n  static const FieldDescriptorProto_Type TYPE_UINT32 =\n      FieldDescriptorProto_Type._(13, _omitEnumNames ? '' : 'TYPE_UINT32');\n  static const FieldDescriptorProto_Type TYPE_ENUM =\n      FieldDescriptorProto_Type._(14, _omitEnumNames ? '' : 'TYPE_ENUM');\n  static const FieldDescriptorProto_Type TYPE_SFIXED32 =\n      FieldDescriptorProto_Type._(15, _omitEnumNames ? '' : 'TYPE_SFIXED32');\n  static const FieldDescriptorProto_Type TYPE_SFIXED64 =\n      FieldDescriptorProto_Type._(16, _omitEnumNames ? '' : 'TYPE_SFIXED64');\n  static const FieldDescriptorProto_Type TYPE_SINT32 =\n      FieldDescriptorProto_Type._(17, _omitEnumNames ? '' : 'TYPE_SINT32');\n  static const FieldDescriptorProto_Type TYPE_SINT64 =\n      FieldDescriptorProto_Type._(18, _omitEnumNames ? '' : 'TYPE_SINT64');\n\n  static const $core.List<FieldDescriptorProto_Type> values =\n      <FieldDescriptorProto_Type>[\n    TYPE_DOUBLE,\n    TYPE_FLOAT,\n    TYPE_INT64,\n    TYPE_UINT64,\n    TYPE_INT32,\n    TYPE_FIXED64,\n    TYPE_FIXED32,\n    TYPE_BOOL,\n    TYPE_STRING,\n    TYPE_GROUP,\n    TYPE_MESSAGE,\n    TYPE_BYTES,\n    TYPE_UINT32,\n    TYPE_ENUM,\n    TYPE_SFIXED32,\n    TYPE_SFIXED64,\n    TYPE_SINT32,\n    TYPE_SINT64,\n  ];\n\n  static final $core.List<FieldDescriptorProto_Type?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 18);\n  static FieldDescriptorProto_Type? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FieldDescriptorProto_Type._(super.value, super.name);\n}\n\nclass FieldDescriptorProto_Label extends $pb.ProtobufEnum {\n  /// 0 is reserved for errors\n  static const FieldDescriptorProto_Label LABEL_OPTIONAL =\n      FieldDescriptorProto_Label._(1, _omitEnumNames ? '' : 'LABEL_OPTIONAL');\n  static const FieldDescriptorProto_Label LABEL_REPEATED =\n      FieldDescriptorProto_Label._(3, _omitEnumNames ? '' : 'LABEL_REPEATED');\n\n  /// The required label is only allowed in google.protobuf.  In proto3 and Editions\n  /// it's explicitly prohibited.  In Editions, the `field_presence` feature\n  /// can be used to get this behavior.\n  static const FieldDescriptorProto_Label LABEL_REQUIRED =\n      FieldDescriptorProto_Label._(2, _omitEnumNames ? '' : 'LABEL_REQUIRED');\n\n  static const $core.List<FieldDescriptorProto_Label> values =\n      <FieldDescriptorProto_Label>[\n    LABEL_OPTIONAL,\n    LABEL_REPEATED,\n    LABEL_REQUIRED,\n  ];\n\n  static final $core.List<FieldDescriptorProto_Label?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 3);\n  static FieldDescriptorProto_Label? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FieldDescriptorProto_Label._(super.value, super.name);\n}\n\n/// Generated classes can be optimized for speed or code size.\nclass FileOptions_OptimizeMode extends $pb.ProtobufEnum {\n  static const FileOptions_OptimizeMode SPEED =\n      FileOptions_OptimizeMode._(1, _omitEnumNames ? '' : 'SPEED');\n\n  /// etc.\n  static const FileOptions_OptimizeMode CODE_SIZE =\n      FileOptions_OptimizeMode._(2, _omitEnumNames ? '' : 'CODE_SIZE');\n  static const FileOptions_OptimizeMode LITE_RUNTIME =\n      FileOptions_OptimizeMode._(3, _omitEnumNames ? '' : 'LITE_RUNTIME');\n\n  static const $core.List<FileOptions_OptimizeMode> values =\n      <FileOptions_OptimizeMode>[\n    SPEED,\n    CODE_SIZE,\n    LITE_RUNTIME,\n  ];\n\n  static final $core.List<FileOptions_OptimizeMode?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 3);\n  static FileOptions_OptimizeMode? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FileOptions_OptimizeMode._(super.value, super.name);\n}\n\nclass FieldOptions_CType extends $pb.ProtobufEnum {\n  /// Default mode.\n  static const FieldOptions_CType STRING =\n      FieldOptions_CType._(0, _omitEnumNames ? '' : 'STRING');\n\n  /// The option [ctype=CORD] may be applied to a non-repeated field of type\n  /// \"bytes\". It indicates that in C++, the data should be stored in a Cord\n  /// instead of a string.  For very large strings, this may reduce memory\n  /// fragmentation. It may also allow better performance when parsing from a\n  /// Cord, or when parsing with aliasing enabled, as the parsed Cord may then\n  /// alias the original buffer.\n  static const FieldOptions_CType CORD =\n      FieldOptions_CType._(1, _omitEnumNames ? '' : 'CORD');\n  static const FieldOptions_CType STRING_PIECE =\n      FieldOptions_CType._(2, _omitEnumNames ? '' : 'STRING_PIECE');\n\n  static const $core.List<FieldOptions_CType> values = <FieldOptions_CType>[\n    STRING,\n    CORD,\n    STRING_PIECE,\n  ];\n\n  static final $core.List<FieldOptions_CType?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static FieldOptions_CType? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FieldOptions_CType._(super.value, super.name);\n}\n\nclass FieldOptions_JSType extends $pb.ProtobufEnum {\n  /// Use the default type.\n  static const FieldOptions_JSType JS_NORMAL =\n      FieldOptions_JSType._(0, _omitEnumNames ? '' : 'JS_NORMAL');\n\n  /// Use JavaScript strings.\n  static const FieldOptions_JSType JS_STRING =\n      FieldOptions_JSType._(1, _omitEnumNames ? '' : 'JS_STRING');\n\n  /// Use JavaScript numbers.\n  static const FieldOptions_JSType JS_NUMBER =\n      FieldOptions_JSType._(2, _omitEnumNames ? '' : 'JS_NUMBER');\n\n  static const $core.List<FieldOptions_JSType> values = <FieldOptions_JSType>[\n    JS_NORMAL,\n    JS_STRING,\n    JS_NUMBER,\n  ];\n\n  static final $core.List<FieldOptions_JSType?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static FieldOptions_JSType? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FieldOptions_JSType._(super.value, super.name);\n}\n\n/// If set to RETENTION_SOURCE, the option will be omitted from the binary.\nclass FieldOptions_OptionRetention extends $pb.ProtobufEnum {\n  static const FieldOptions_OptionRetention RETENTION_UNKNOWN =\n      FieldOptions_OptionRetention._(\n          0, _omitEnumNames ? '' : 'RETENTION_UNKNOWN');\n  static const FieldOptions_OptionRetention RETENTION_RUNTIME =\n      FieldOptions_OptionRetention._(\n          1, _omitEnumNames ? '' : 'RETENTION_RUNTIME');\n  static const FieldOptions_OptionRetention RETENTION_SOURCE =\n      FieldOptions_OptionRetention._(\n          2, _omitEnumNames ? '' : 'RETENTION_SOURCE');\n\n  static const $core.List<FieldOptions_OptionRetention> values =\n      <FieldOptions_OptionRetention>[\n    RETENTION_UNKNOWN,\n    RETENTION_RUNTIME,\n    RETENTION_SOURCE,\n  ];\n\n  static final $core.List<FieldOptions_OptionRetention?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static FieldOptions_OptionRetention? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FieldOptions_OptionRetention._(super.value, super.name);\n}\n\n/// This indicates the types of entities that the field may apply to when used\n/// as an option. If it is unset, then the field may be freely used as an\n/// option on any kind of entity.\nclass FieldOptions_OptionTargetType extends $pb.ProtobufEnum {\n  static const FieldOptions_OptionTargetType TARGET_TYPE_UNKNOWN =\n      FieldOptions_OptionTargetType._(\n          0, _omitEnumNames ? '' : 'TARGET_TYPE_UNKNOWN');\n  static const FieldOptions_OptionTargetType TARGET_TYPE_FILE =\n      FieldOptions_OptionTargetType._(\n          1, _omitEnumNames ? '' : 'TARGET_TYPE_FILE');\n  static const FieldOptions_OptionTargetType TARGET_TYPE_EXTENSION_RANGE =\n      FieldOptions_OptionTargetType._(\n          2, _omitEnumNames ? '' : 'TARGET_TYPE_EXTENSION_RANGE');\n  static const FieldOptions_OptionTargetType TARGET_TYPE_MESSAGE =\n      FieldOptions_OptionTargetType._(\n          3, _omitEnumNames ? '' : 'TARGET_TYPE_MESSAGE');\n  static const FieldOptions_OptionTargetType TARGET_TYPE_FIELD =\n      FieldOptions_OptionTargetType._(\n          4, _omitEnumNames ? '' : 'TARGET_TYPE_FIELD');\n  static const FieldOptions_OptionTargetType TARGET_TYPE_ONEOF =\n      FieldOptions_OptionTargetType._(\n          5, _omitEnumNames ? '' : 'TARGET_TYPE_ONEOF');\n  static const FieldOptions_OptionTargetType TARGET_TYPE_ENUM =\n      FieldOptions_OptionTargetType._(\n          6, _omitEnumNames ? '' : 'TARGET_TYPE_ENUM');\n  static const FieldOptions_OptionTargetType TARGET_TYPE_ENUM_ENTRY =\n      FieldOptions_OptionTargetType._(\n          7, _omitEnumNames ? '' : 'TARGET_TYPE_ENUM_ENTRY');\n  static const FieldOptions_OptionTargetType TARGET_TYPE_SERVICE =\n      FieldOptions_OptionTargetType._(\n          8, _omitEnumNames ? '' : 'TARGET_TYPE_SERVICE');\n  static const FieldOptions_OptionTargetType TARGET_TYPE_METHOD =\n      FieldOptions_OptionTargetType._(\n          9, _omitEnumNames ? '' : 'TARGET_TYPE_METHOD');\n\n  static const $core.List<FieldOptions_OptionTargetType> values =\n      <FieldOptions_OptionTargetType>[\n    TARGET_TYPE_UNKNOWN,\n    TARGET_TYPE_FILE,\n    TARGET_TYPE_EXTENSION_RANGE,\n    TARGET_TYPE_MESSAGE,\n    TARGET_TYPE_FIELD,\n    TARGET_TYPE_ONEOF,\n    TARGET_TYPE_ENUM,\n    TARGET_TYPE_ENUM_ENTRY,\n    TARGET_TYPE_SERVICE,\n    TARGET_TYPE_METHOD,\n  ];\n\n  static final $core.List<FieldOptions_OptionTargetType?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 9);\n  static FieldOptions_OptionTargetType? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FieldOptions_OptionTargetType._(super.value, super.name);\n}\n\n/// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,\n/// or neither? HTTP based RPC implementation may choose GET verb for safe\n/// methods, and PUT verb for idempotent methods instead of the default POST.\nclass MethodOptions_IdempotencyLevel extends $pb.ProtobufEnum {\n  static const MethodOptions_IdempotencyLevel IDEMPOTENCY_UNKNOWN =\n      MethodOptions_IdempotencyLevel._(\n          0, _omitEnumNames ? '' : 'IDEMPOTENCY_UNKNOWN');\n  static const MethodOptions_IdempotencyLevel NO_SIDE_EFFECTS =\n      MethodOptions_IdempotencyLevel._(\n          1, _omitEnumNames ? '' : 'NO_SIDE_EFFECTS');\n  static const MethodOptions_IdempotencyLevel IDEMPOTENT =\n      MethodOptions_IdempotencyLevel._(2, _omitEnumNames ? '' : 'IDEMPOTENT');\n\n  static const $core.List<MethodOptions_IdempotencyLevel> values =\n      <MethodOptions_IdempotencyLevel>[\n    IDEMPOTENCY_UNKNOWN,\n    NO_SIDE_EFFECTS,\n    IDEMPOTENT,\n  ];\n\n  static final $core.List<MethodOptions_IdempotencyLevel?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static MethodOptions_IdempotencyLevel? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const MethodOptions_IdempotencyLevel._(super.value, super.name);\n}\n\nclass FeatureSet_FieldPresence extends $pb.ProtobufEnum {\n  static const FeatureSet_FieldPresence FIELD_PRESENCE_UNKNOWN =\n      FeatureSet_FieldPresence._(\n          0, _omitEnumNames ? '' : 'FIELD_PRESENCE_UNKNOWN');\n  static const FeatureSet_FieldPresence EXPLICIT =\n      FeatureSet_FieldPresence._(1, _omitEnumNames ? '' : 'EXPLICIT');\n  static const FeatureSet_FieldPresence IMPLICIT =\n      FeatureSet_FieldPresence._(2, _omitEnumNames ? '' : 'IMPLICIT');\n  static const FeatureSet_FieldPresence LEGACY_REQUIRED =\n      FeatureSet_FieldPresence._(3, _omitEnumNames ? '' : 'LEGACY_REQUIRED');\n\n  static const $core.List<FeatureSet_FieldPresence> values =\n      <FeatureSet_FieldPresence>[\n    FIELD_PRESENCE_UNKNOWN,\n    EXPLICIT,\n    IMPLICIT,\n    LEGACY_REQUIRED,\n  ];\n\n  static final $core.List<FeatureSet_FieldPresence?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 3);\n  static FeatureSet_FieldPresence? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FeatureSet_FieldPresence._(super.value, super.name);\n}\n\nclass FeatureSet_EnumType extends $pb.ProtobufEnum {\n  static const FeatureSet_EnumType ENUM_TYPE_UNKNOWN =\n      FeatureSet_EnumType._(0, _omitEnumNames ? '' : 'ENUM_TYPE_UNKNOWN');\n  static const FeatureSet_EnumType OPEN =\n      FeatureSet_EnumType._(1, _omitEnumNames ? '' : 'OPEN');\n  static const FeatureSet_EnumType CLOSED =\n      FeatureSet_EnumType._(2, _omitEnumNames ? '' : 'CLOSED');\n\n  static const $core.List<FeatureSet_EnumType> values = <FeatureSet_EnumType>[\n    ENUM_TYPE_UNKNOWN,\n    OPEN,\n    CLOSED,\n  ];\n\n  static final $core.List<FeatureSet_EnumType?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static FeatureSet_EnumType? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FeatureSet_EnumType._(super.value, super.name);\n}\n\nclass FeatureSet_RepeatedFieldEncoding extends $pb.ProtobufEnum {\n  static const FeatureSet_RepeatedFieldEncoding\n      REPEATED_FIELD_ENCODING_UNKNOWN = FeatureSet_RepeatedFieldEncoding._(\n          0, _omitEnumNames ? '' : 'REPEATED_FIELD_ENCODING_UNKNOWN');\n  static const FeatureSet_RepeatedFieldEncoding PACKED =\n      FeatureSet_RepeatedFieldEncoding._(1, _omitEnumNames ? '' : 'PACKED');\n  static const FeatureSet_RepeatedFieldEncoding EXPANDED =\n      FeatureSet_RepeatedFieldEncoding._(2, _omitEnumNames ? '' : 'EXPANDED');\n\n  static const $core.List<FeatureSet_RepeatedFieldEncoding> values =\n      <FeatureSet_RepeatedFieldEncoding>[\n    REPEATED_FIELD_ENCODING_UNKNOWN,\n    PACKED,\n    EXPANDED,\n  ];\n\n  static final $core.List<FeatureSet_RepeatedFieldEncoding?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static FeatureSet_RepeatedFieldEncoding? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FeatureSet_RepeatedFieldEncoding._(super.value, super.name);\n}\n\nclass FeatureSet_Utf8Validation extends $pb.ProtobufEnum {\n  static const FeatureSet_Utf8Validation UTF8_VALIDATION_UNKNOWN =\n      FeatureSet_Utf8Validation._(\n          0, _omitEnumNames ? '' : 'UTF8_VALIDATION_UNKNOWN');\n  static const FeatureSet_Utf8Validation VERIFY =\n      FeatureSet_Utf8Validation._(2, _omitEnumNames ? '' : 'VERIFY');\n  static const FeatureSet_Utf8Validation NONE =\n      FeatureSet_Utf8Validation._(3, _omitEnumNames ? '' : 'NONE');\n\n  static const $core.List<FeatureSet_Utf8Validation> values =\n      <FeatureSet_Utf8Validation>[\n    UTF8_VALIDATION_UNKNOWN,\n    VERIFY,\n    NONE,\n  ];\n\n  static final $core.List<FeatureSet_Utf8Validation?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 3);\n  static FeatureSet_Utf8Validation? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FeatureSet_Utf8Validation._(super.value, super.name);\n}\n\nclass FeatureSet_MessageEncoding extends $pb.ProtobufEnum {\n  static const FeatureSet_MessageEncoding MESSAGE_ENCODING_UNKNOWN =\n      FeatureSet_MessageEncoding._(\n          0, _omitEnumNames ? '' : 'MESSAGE_ENCODING_UNKNOWN');\n  static const FeatureSet_MessageEncoding LENGTH_PREFIXED =\n      FeatureSet_MessageEncoding._(1, _omitEnumNames ? '' : 'LENGTH_PREFIXED');\n  static const FeatureSet_MessageEncoding DELIMITED =\n      FeatureSet_MessageEncoding._(2, _omitEnumNames ? '' : 'DELIMITED');\n\n  static const $core.List<FeatureSet_MessageEncoding> values =\n      <FeatureSet_MessageEncoding>[\n    MESSAGE_ENCODING_UNKNOWN,\n    LENGTH_PREFIXED,\n    DELIMITED,\n  ];\n\n  static final $core.List<FeatureSet_MessageEncoding?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static FeatureSet_MessageEncoding? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FeatureSet_MessageEncoding._(super.value, super.name);\n}\n\nclass FeatureSet_JsonFormat extends $pb.ProtobufEnum {\n  static const FeatureSet_JsonFormat JSON_FORMAT_UNKNOWN =\n      FeatureSet_JsonFormat._(0, _omitEnumNames ? '' : 'JSON_FORMAT_UNKNOWN');\n  static const FeatureSet_JsonFormat ALLOW =\n      FeatureSet_JsonFormat._(1, _omitEnumNames ? '' : 'ALLOW');\n  static const FeatureSet_JsonFormat LEGACY_BEST_EFFORT =\n      FeatureSet_JsonFormat._(2, _omitEnumNames ? '' : 'LEGACY_BEST_EFFORT');\n\n  static const $core.List<FeatureSet_JsonFormat> values =\n      <FeatureSet_JsonFormat>[\n    JSON_FORMAT_UNKNOWN,\n    ALLOW,\n    LEGACY_BEST_EFFORT,\n  ];\n\n  static final $core.List<FeatureSet_JsonFormat?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static FeatureSet_JsonFormat? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FeatureSet_JsonFormat._(super.value, super.name);\n}\n\nclass FeatureSet_EnforceNamingStyle extends $pb.ProtobufEnum {\n  static const FeatureSet_EnforceNamingStyle ENFORCE_NAMING_STYLE_UNKNOWN =\n      FeatureSet_EnforceNamingStyle._(\n          0, _omitEnumNames ? '' : 'ENFORCE_NAMING_STYLE_UNKNOWN');\n  static const FeatureSet_EnforceNamingStyle STYLE2024 =\n      FeatureSet_EnforceNamingStyle._(1, _omitEnumNames ? '' : 'STYLE2024');\n  static const FeatureSet_EnforceNamingStyle STYLE_LEGACY =\n      FeatureSet_EnforceNamingStyle._(2, _omitEnumNames ? '' : 'STYLE_LEGACY');\n\n  static const $core.List<FeatureSet_EnforceNamingStyle> values =\n      <FeatureSet_EnforceNamingStyle>[\n    ENFORCE_NAMING_STYLE_UNKNOWN,\n    STYLE2024,\n    STYLE_LEGACY,\n  ];\n\n  static final $core.List<FeatureSet_EnforceNamingStyle?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static FeatureSet_EnforceNamingStyle? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FeatureSet_EnforceNamingStyle._(super.value, super.name);\n}\n\nclass FeatureSet_VisibilityFeature_DefaultSymbolVisibility\n    extends $pb.ProtobufEnum {\n  static const FeatureSet_VisibilityFeature_DefaultSymbolVisibility\n      DEFAULT_SYMBOL_VISIBILITY_UNKNOWN =\n      FeatureSet_VisibilityFeature_DefaultSymbolVisibility._(\n          0, _omitEnumNames ? '' : 'DEFAULT_SYMBOL_VISIBILITY_UNKNOWN');\n\n  /// Default pre-EDITION_2024, all UNSET visibility are export.\n  static const FeatureSet_VisibilityFeature_DefaultSymbolVisibility EXPORT_ALL =\n      FeatureSet_VisibilityFeature_DefaultSymbolVisibility._(\n          1, _omitEnumNames ? '' : 'EXPORT_ALL');\n\n  /// All top-level symbols default to export, nested default to local.\n  static const FeatureSet_VisibilityFeature_DefaultSymbolVisibility\n      EXPORT_TOP_LEVEL = FeatureSet_VisibilityFeature_DefaultSymbolVisibility._(\n          2, _omitEnumNames ? '' : 'EXPORT_TOP_LEVEL');\n\n  /// All symbols default to local.\n  static const FeatureSet_VisibilityFeature_DefaultSymbolVisibility LOCAL_ALL =\n      FeatureSet_VisibilityFeature_DefaultSymbolVisibility._(\n          3, _omitEnumNames ? '' : 'LOCAL_ALL');\n\n  /// All symbols local by default. Nested types cannot be exported.\n  /// With special case caveat for message { enum {} reserved 1 to max; }\n  /// This is the recommended setting for new protos.\n  static const FeatureSet_VisibilityFeature_DefaultSymbolVisibility STRICT =\n      FeatureSet_VisibilityFeature_DefaultSymbolVisibility._(\n          4, _omitEnumNames ? '' : 'STRICT');\n\n  static const $core.List<FeatureSet_VisibilityFeature_DefaultSymbolVisibility>\n      values = <FeatureSet_VisibilityFeature_DefaultSymbolVisibility>[\n    DEFAULT_SYMBOL_VISIBILITY_UNKNOWN,\n    EXPORT_ALL,\n    EXPORT_TOP_LEVEL,\n    LOCAL_ALL,\n    STRICT,\n  ];\n\n  static final $core.List<FeatureSet_VisibilityFeature_DefaultSymbolVisibility?>\n      _byValue = $pb.ProtobufEnum.$_initByValueList(values, 4);\n  static FeatureSet_VisibilityFeature_DefaultSymbolVisibility? valueOf(\n          $core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const FeatureSet_VisibilityFeature_DefaultSymbolVisibility._(\n      super.value, super.name);\n}\n\n/// Represents the identified object's effect on the element in the original\n/// .proto file.\nclass GeneratedCodeInfo_Annotation_Semantic extends $pb.ProtobufEnum {\n  /// There is no effect or the effect is indescribable.\n  static const GeneratedCodeInfo_Annotation_Semantic NONE =\n      GeneratedCodeInfo_Annotation_Semantic._(0, _omitEnumNames ? '' : 'NONE');\n\n  /// The element is set or otherwise mutated.\n  static const GeneratedCodeInfo_Annotation_Semantic SET =\n      GeneratedCodeInfo_Annotation_Semantic._(1, _omitEnumNames ? '' : 'SET');\n\n  /// An alias to the element is returned.\n  static const GeneratedCodeInfo_Annotation_Semantic ALIAS =\n      GeneratedCodeInfo_Annotation_Semantic._(2, _omitEnumNames ? '' : 'ALIAS');\n\n  static const $core.List<GeneratedCodeInfo_Annotation_Semantic> values =\n      <GeneratedCodeInfo_Annotation_Semantic>[\n    NONE,\n    SET,\n    ALIAS,\n  ];\n\n  static final $core.List<GeneratedCodeInfo_Annotation_Semantic?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static GeneratedCodeInfo_Annotation_Semantic? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const GeneratedCodeInfo_Annotation_Semantic._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/protobuf/unittest_features.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/unittest_features.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'unittest_features.pbenum.dart';\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'unittest_features.pbenum.dart';\n\nclass TestMessage_Nested extends $pb.GeneratedMessage {\n  factory TestMessage_Nested() => create();\n\n  TestMessage_Nested._();\n\n  factory TestMessage_Nested.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory TestMessage_Nested.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'TestMessage.Nested',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pb'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n  static final testNested = $pb.Extension<TestFeatures>(\n      _omitMessageNames ? '' : 'google.protobuf.FeatureSet',\n      _omitFieldNames ? '' : 'testNested',\n      9997,\n      $pb.PbFieldType.OM,\n      defaultOrMaker: TestFeatures.getDefault,\n      subBuilder: TestFeatures.create);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  TestMessage_Nested clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  TestMessage_Nested copyWith(void Function(TestMessage_Nested) updates) =>\n      super.copyWith((message) => updates(message as TestMessage_Nested))\n          as TestMessage_Nested;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static TestMessage_Nested create() => TestMessage_Nested._();\n  @$core.override\n  TestMessage_Nested createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static TestMessage_Nested getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<TestMessage_Nested>(create);\n  static TestMessage_Nested? _defaultInstance;\n}\n\nclass TestMessage extends $pb.GeneratedMessage {\n  factory TestMessage() => create();\n\n  TestMessage._();\n\n  factory TestMessage.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory TestMessage.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'TestMessage',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pb'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n  static final testMessage = $pb.Extension<TestFeatures>(\n      _omitMessageNames ? '' : 'google.protobuf.FeatureSet',\n      _omitFieldNames ? '' : 'testMessage',\n      9998,\n      $pb.PbFieldType.OM,\n      defaultOrMaker: TestFeatures.getDefault,\n      subBuilder: TestFeatures.create);\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  TestMessage clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  TestMessage copyWith(void Function(TestMessage) updates) =>\n      super.copyWith((message) => updates(message as TestMessage))\n          as TestMessage;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static TestMessage create() => TestMessage._();\n  @$core.override\n  TestMessage createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static TestMessage getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<TestMessage>(create);\n  static TestMessage? _defaultInstance;\n}\n\nclass TestFeatures extends $pb.GeneratedMessage {\n  factory TestFeatures({\n    EnumFeature? fileFeature,\n    EnumFeature? extensionRangeFeature,\n    EnumFeature? messageFeature,\n    EnumFeature? fieldFeature,\n    EnumFeature? oneofFeature,\n    EnumFeature? enumFeature,\n    EnumFeature? enumEntryFeature,\n    EnumFeature? serviceFeature,\n    EnumFeature? methodFeature,\n    EnumFeature? multipleFeature,\n    $core.bool? boolFieldFeature,\n    EnumFeature? sourceFeature,\n    EnumFeature? sourceFeature2,\n    EnumFeature? removedFeature,\n    EnumFeature? futureFeature,\n    EnumFeature? legacyFeature,\n    ValueLifetimeFeature? valueLifetimeFeature,\n  }) {\n    final result = create();\n    if (fileFeature != null) result.fileFeature = fileFeature;\n    if (extensionRangeFeature != null)\n      result.extensionRangeFeature = extensionRangeFeature;\n    if (messageFeature != null) result.messageFeature = messageFeature;\n    if (fieldFeature != null) result.fieldFeature = fieldFeature;\n    if (oneofFeature != null) result.oneofFeature = oneofFeature;\n    if (enumFeature != null) result.enumFeature = enumFeature;\n    if (enumEntryFeature != null) result.enumEntryFeature = enumEntryFeature;\n    if (serviceFeature != null) result.serviceFeature = serviceFeature;\n    if (methodFeature != null) result.methodFeature = methodFeature;\n    if (multipleFeature != null) result.multipleFeature = multipleFeature;\n    if (boolFieldFeature != null) result.boolFieldFeature = boolFieldFeature;\n    if (sourceFeature != null) result.sourceFeature = sourceFeature;\n    if (sourceFeature2 != null) result.sourceFeature2 = sourceFeature2;\n    if (removedFeature != null) result.removedFeature = removedFeature;\n    if (futureFeature != null) result.futureFeature = futureFeature;\n    if (legacyFeature != null) result.legacyFeature = legacyFeature;\n    if (valueLifetimeFeature != null)\n      result.valueLifetimeFeature = valueLifetimeFeature;\n    return result;\n  }\n\n  TestFeatures._();\n\n  factory TestFeatures.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory TestFeatures.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'TestFeatures',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pb'),\n      createEmptyInstance: create)\n    ..aE<EnumFeature>(1, _omitFieldNames ? '' : 'fileFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(2, _omitFieldNames ? '' : 'extensionRangeFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(3, _omitFieldNames ? '' : 'messageFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(4, _omitFieldNames ? '' : 'fieldFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(5, _omitFieldNames ? '' : 'oneofFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(6, _omitFieldNames ? '' : 'enumFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(7, _omitFieldNames ? '' : 'enumEntryFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(8, _omitFieldNames ? '' : 'serviceFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(9, _omitFieldNames ? '' : 'methodFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(10, _omitFieldNames ? '' : 'multipleFeature',\n        enumValues: EnumFeature.values)\n    ..aOB(11, _omitFieldNames ? '' : 'boolFieldFeature')\n    ..aE<EnumFeature>(15, _omitFieldNames ? '' : 'sourceFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(16, _omitFieldNames ? '' : 'sourceFeature2',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(17, _omitFieldNames ? '' : 'removedFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(18, _omitFieldNames ? '' : 'futureFeature',\n        enumValues: EnumFeature.values)\n    ..aE<EnumFeature>(19, _omitFieldNames ? '' : 'legacyFeature',\n        enumValues: EnumFeature.values)\n    ..aE<ValueLifetimeFeature>(\n        20, _omitFieldNames ? '' : 'valueLifetimeFeature',\n        enumValues: ValueLifetimeFeature.values)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  TestFeatures clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  TestFeatures copyWith(void Function(TestFeatures) updates) =>\n      super.copyWith((message) => updates(message as TestFeatures))\n          as TestFeatures;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static TestFeatures create() => TestFeatures._();\n  @$core.override\n  TestFeatures createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static TestFeatures getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<TestFeatures>(create);\n  static TestFeatures? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  EnumFeature get fileFeature => $_getN(0);\n  @$pb.TagNumber(1)\n  set fileFeature(EnumFeature value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasFileFeature() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearFileFeature() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  EnumFeature get extensionRangeFeature => $_getN(1);\n  @$pb.TagNumber(2)\n  set extensionRangeFeature(EnumFeature value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasExtensionRangeFeature() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearExtensionRangeFeature() => $_clearField(2);\n\n  @$pb.TagNumber(3)\n  EnumFeature get messageFeature => $_getN(2);\n  @$pb.TagNumber(3)\n  set messageFeature(EnumFeature value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasMessageFeature() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearMessageFeature() => $_clearField(3);\n\n  @$pb.TagNumber(4)\n  EnumFeature get fieldFeature => $_getN(3);\n  @$pb.TagNumber(4)\n  set fieldFeature(EnumFeature value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasFieldFeature() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearFieldFeature() => $_clearField(4);\n\n  @$pb.TagNumber(5)\n  EnumFeature get oneofFeature => $_getN(4);\n  @$pb.TagNumber(5)\n  set oneofFeature(EnumFeature value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasOneofFeature() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearOneofFeature() => $_clearField(5);\n\n  @$pb.TagNumber(6)\n  EnumFeature get enumFeature => $_getN(5);\n  @$pb.TagNumber(6)\n  set enumFeature(EnumFeature value) => $_setField(6, value);\n  @$pb.TagNumber(6)\n  $core.bool hasEnumFeature() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearEnumFeature() => $_clearField(6);\n\n  @$pb.TagNumber(7)\n  EnumFeature get enumEntryFeature => $_getN(6);\n  @$pb.TagNumber(7)\n  set enumEntryFeature(EnumFeature value) => $_setField(7, value);\n  @$pb.TagNumber(7)\n  $core.bool hasEnumEntryFeature() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearEnumEntryFeature() => $_clearField(7);\n\n  @$pb.TagNumber(8)\n  EnumFeature get serviceFeature => $_getN(7);\n  @$pb.TagNumber(8)\n  set serviceFeature(EnumFeature value) => $_setField(8, value);\n  @$pb.TagNumber(8)\n  $core.bool hasServiceFeature() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearServiceFeature() => $_clearField(8);\n\n  @$pb.TagNumber(9)\n  EnumFeature get methodFeature => $_getN(8);\n  @$pb.TagNumber(9)\n  set methodFeature(EnumFeature value) => $_setField(9, value);\n  @$pb.TagNumber(9)\n  $core.bool hasMethodFeature() => $_has(8);\n  @$pb.TagNumber(9)\n  void clearMethodFeature() => $_clearField(9);\n\n  @$pb.TagNumber(10)\n  EnumFeature get multipleFeature => $_getN(9);\n  @$pb.TagNumber(10)\n  set multipleFeature(EnumFeature value) => $_setField(10, value);\n  @$pb.TagNumber(10)\n  $core.bool hasMultipleFeature() => $_has(9);\n  @$pb.TagNumber(10)\n  void clearMultipleFeature() => $_clearField(10);\n\n  @$pb.TagNumber(11)\n  $core.bool get boolFieldFeature => $_getBF(10);\n  @$pb.TagNumber(11)\n  set boolFieldFeature($core.bool value) => $_setBool(10, value);\n  @$pb.TagNumber(11)\n  $core.bool hasBoolFieldFeature() => $_has(10);\n  @$pb.TagNumber(11)\n  void clearBoolFieldFeature() => $_clearField(11);\n\n  @$pb.TagNumber(15)\n  EnumFeature get sourceFeature => $_getN(11);\n  @$pb.TagNumber(15)\n  set sourceFeature(EnumFeature value) => $_setField(15, value);\n  @$pb.TagNumber(15)\n  $core.bool hasSourceFeature() => $_has(11);\n  @$pb.TagNumber(15)\n  void clearSourceFeature() => $_clearField(15);\n\n  @$pb.TagNumber(16)\n  EnumFeature get sourceFeature2 => $_getN(12);\n  @$pb.TagNumber(16)\n  set sourceFeature2(EnumFeature value) => $_setField(16, value);\n  @$pb.TagNumber(16)\n  $core.bool hasSourceFeature2() => $_has(12);\n  @$pb.TagNumber(16)\n  void clearSourceFeature2() => $_clearField(16);\n\n  @$pb.TagNumber(17)\n  EnumFeature get removedFeature => $_getN(13);\n  @$pb.TagNumber(17)\n  set removedFeature(EnumFeature value) => $_setField(17, value);\n  @$pb.TagNumber(17)\n  $core.bool hasRemovedFeature() => $_has(13);\n  @$pb.TagNumber(17)\n  void clearRemovedFeature() => $_clearField(17);\n\n  @$pb.TagNumber(18)\n  EnumFeature get futureFeature => $_getN(14);\n  @$pb.TagNumber(18)\n  set futureFeature(EnumFeature value) => $_setField(18, value);\n  @$pb.TagNumber(18)\n  $core.bool hasFutureFeature() => $_has(14);\n  @$pb.TagNumber(18)\n  void clearFutureFeature() => $_clearField(18);\n\n  @$pb.TagNumber(19)\n  EnumFeature get legacyFeature => $_getN(15);\n  @$pb.TagNumber(19)\n  set legacyFeature(EnumFeature value) => $_setField(19, value);\n  @$pb.TagNumber(19)\n  $core.bool hasLegacyFeature() => $_has(15);\n  @$pb.TagNumber(19)\n  void clearLegacyFeature() => $_clearField(19);\n\n  @$pb.TagNumber(20)\n  ValueLifetimeFeature get valueLifetimeFeature => $_getN(16);\n  @$pb.TagNumber(20)\n  set valueLifetimeFeature(ValueLifetimeFeature value) => $_setField(20, value);\n  @$pb.TagNumber(20)\n  $core.bool hasValueLifetimeFeature() => $_has(16);\n  @$pb.TagNumber(20)\n  void clearValueLifetimeFeature() => $_clearField(20);\n}\n\nclass Unittest_features {\n  static final test = $pb.Extension<TestFeatures>(\n      _omitMessageNames ? '' : 'google.protobuf.FeatureSet',\n      _omitFieldNames ? '' : 'test',\n      9999,\n      $pb.PbFieldType.OM,\n      defaultOrMaker: TestFeatures.getDefault,\n      subBuilder: TestFeatures.create);\n  static void registerAllExtensions($pb.ExtensionRegistry registry) {\n    registry.add(test);\n  }\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/gen/google/protobuf/unittest_features.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from google/protobuf/unittest_features.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nclass EnumFeature extends $pb.ProtobufEnum {\n  static const EnumFeature TEST_ENUM_FEATURE_UNKNOWN =\n      EnumFeature._(0, _omitEnumNames ? '' : 'TEST_ENUM_FEATURE_UNKNOWN');\n  static const EnumFeature VALUE1 =\n      EnumFeature._(1, _omitEnumNames ? '' : 'VALUE1');\n  static const EnumFeature VALUE2 =\n      EnumFeature._(2, _omitEnumNames ? '' : 'VALUE2');\n  static const EnumFeature VALUE3 =\n      EnumFeature._(3, _omitEnumNames ? '' : 'VALUE3');\n  static const EnumFeature VALUE4 =\n      EnumFeature._(4, _omitEnumNames ? '' : 'VALUE4');\n  static const EnumFeature VALUE5 =\n      EnumFeature._(5, _omitEnumNames ? '' : 'VALUE5');\n  static const EnumFeature VALUE6 =\n      EnumFeature._(6, _omitEnumNames ? '' : 'VALUE6');\n  static const EnumFeature VALUE7 =\n      EnumFeature._(7, _omitEnumNames ? '' : 'VALUE7');\n  static const EnumFeature VALUE8 =\n      EnumFeature._(8, _omitEnumNames ? '' : 'VALUE8');\n  static const EnumFeature VALUE9 =\n      EnumFeature._(9, _omitEnumNames ? '' : 'VALUE9');\n  static const EnumFeature VALUE10 =\n      EnumFeature._(10, _omitEnumNames ? '' : 'VALUE10');\n  static const EnumFeature VALUE11 =\n      EnumFeature._(11, _omitEnumNames ? '' : 'VALUE11');\n  static const EnumFeature VALUE12 =\n      EnumFeature._(12, _omitEnumNames ? '' : 'VALUE12');\n  static const EnumFeature VALUE13 =\n      EnumFeature._(13, _omitEnumNames ? '' : 'VALUE13');\n  static const EnumFeature VALUE14 =\n      EnumFeature._(14, _omitEnumNames ? '' : 'VALUE14');\n  static const EnumFeature VALUE15 =\n      EnumFeature._(15, _omitEnumNames ? '' : 'VALUE15');\n\n  static const $core.List<EnumFeature> values = <EnumFeature>[\n    TEST_ENUM_FEATURE_UNKNOWN,\n    VALUE1,\n    VALUE2,\n    VALUE3,\n    VALUE4,\n    VALUE5,\n    VALUE6,\n    VALUE7,\n    VALUE8,\n    VALUE9,\n    VALUE10,\n    VALUE11,\n    VALUE12,\n    VALUE13,\n    VALUE14,\n    VALUE15,\n  ];\n\n  static final $core.List<EnumFeature?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 15);\n  static EnumFeature? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const EnumFeature._(super.value, super.name);\n}\n\nclass ValueLifetimeFeature extends $pb.ProtobufEnum {\n  static const ValueLifetimeFeature TEST_VALUE_LIFETIME_UNKNOWN =\n      ValueLifetimeFeature._(\n          0, _omitEnumNames ? '' : 'TEST_VALUE_LIFETIME_UNKNOWN');\n  static const ValueLifetimeFeature VALUE_LIFETIME_INHERITED =\n      ValueLifetimeFeature._(\n          1, _omitEnumNames ? '' : 'VALUE_LIFETIME_INHERITED');\n  static const ValueLifetimeFeature VALUE_LIFETIME_SUPPORT =\n      ValueLifetimeFeature._(2, _omitEnumNames ? '' : 'VALUE_LIFETIME_SUPPORT');\n  static const ValueLifetimeFeature VALUE_LIFETIME_EMPTY_SUPPORT =\n      ValueLifetimeFeature._(\n          3, _omitEnumNames ? '' : 'VALUE_LIFETIME_EMPTY_SUPPORT');\n  static const ValueLifetimeFeature VALUE_LIFETIME_FUTURE =\n      ValueLifetimeFeature._(4, _omitEnumNames ? '' : 'VALUE_LIFETIME_FUTURE');\n  static const ValueLifetimeFeature VALUE_LIFETIME_DEPRECATED =\n      ValueLifetimeFeature._(\n          5, _omitEnumNames ? '' : 'VALUE_LIFETIME_DEPRECATED');\n  static const ValueLifetimeFeature VALUE_LIFETIME_REMOVED =\n      ValueLifetimeFeature._(6, _omitEnumNames ? '' : 'VALUE_LIFETIME_REMOVED');\n\n  static const $core.List<ValueLifetimeFeature> values = <ValueLifetimeFeature>[\n    TEST_VALUE_LIFETIME_UNKNOWN,\n    VALUE_LIFETIME_INHERITED,\n    VALUE_LIFETIME_SUPPORT,\n    VALUE_LIFETIME_EMPTY_SUPPORT,\n    VALUE_LIFETIME_FUTURE,\n    VALUE_LIFETIME_DEPRECATED,\n    VALUE_LIFETIME_REMOVED,\n  ];\n\n  static final $core.List<ValueLifetimeFeature?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 6);\n  static ValueLifetimeFeature? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const ValueLifetimeFeature._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protoc_plugin/lib/src/grpc_generator.dart",
    "content": "// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\nclass GrpcServiceGenerator {\n  final ServiceDescriptorProto _descriptor;\n\n  /// The generator of the .pb.dart file that will contain this service.\n  final FileGenerator fileGen;\n\n  final int _serviceIndex;\n\n  /// The message types needed directly by this service.\n  ///\n  /// The key is the fully qualified name.\n  /// Populated by [resolve].\n  final Map<String, MessageGenerator> _deps = {};\n\n  /// Maps each undefined type to a string describing its location.\n  ///\n  /// Populated by [resolve].\n  final Map<String, String> _undefinedDeps = {};\n\n  /// Fully-qualified gRPC service name.\n  late final String _fullServiceName;\n\n  /// Dart class name for client stub.\n  late final String _clientClassname;\n\n  /// Dart class name for server stub.\n  late final String _serviceClassname;\n\n  /// List of gRPC methods.\n  final List<_GrpcMethod> _methods = [];\n\n  late final List<int> _serviceDescriptorPath = [\n    ...fileGen.fieldPath,\n    ClientApiGenerator.fileDescriptorServiceTag,\n    _serviceIndex,\n  ];\n\n  GrpcServiceGenerator(this._descriptor, this.fileGen, this._serviceIndex) {\n    final name = _descriptor.name;\n    final package = fileGen.package;\n\n    if (package.isNotEmpty) {\n      _fullServiceName = '$package.$name';\n    } else {\n      _fullServiceName = name;\n    }\n\n    // avoid: ClientClient\n    _clientClassname = name.endsWith('Client') ? name : '${name}Client';\n    // avoid: ServiceServiceBase\n    _serviceClassname =\n        name.endsWith('Service') ? '${name}Base' : '${name}ServiceBase';\n  }\n\n  /// Finds all message types used by this service.\n  ///\n  /// Puts the types found in [_deps]. If a type name can't be resolved, puts it\n  /// in [_undefinedDeps].\n  /// Precondition: messages have been registered and resolved.\n  void resolve(GenerationContext ctx) {\n    for (final method in _descriptor.method) {\n      _methods.add(_GrpcMethod(this, ctx, method));\n    }\n  }\n\n  /// Adds a dependency on the given message type.\n  ///\n  /// If the type name can't be resolved, adds it to [_undefinedDeps].\n  void _addDependency(GenerationContext ctx, String fqname, String location) {\n    if (_deps.containsKey(fqname)) return; // Already added.\n\n    final mg = ctx.getFieldType(fqname) as MessageGenerator?;\n    if (mg == null) {\n      _undefinedDeps[fqname] = location;\n      return;\n    }\n    mg.checkResolved();\n    _deps[mg.dottedName] = mg;\n  }\n\n  /// Adds dependencies of [generate] to [imports].\n  ///\n  /// For each .pb.dart file that the generated code needs to import,\n  /// add its generator.\n  void addImportsTo(Set<FileGenerator> imports) {\n    for (final mg in _deps.values) {\n      imports.add(mg.fileGen);\n    }\n  }\n\n  /// Returns the Dart class name to use for a message type.\n  ///\n  /// Throws an exception if it can't be resolved.\n  String _getDartClassName(String fqName) {\n    final generator = _deps[fqName];\n    if (generator == null) {\n      final location = _undefinedDeps[fqName];\n      // TODO(nichite): Throw more actionable error.\n      throw 'FAILURE: Unknown type reference ($fqName) for $location';\n    }\n\n    return '${fileGen.importPrefix(generator)}.${generator.classname}';\n  }\n\n  void generate(IndentingWriter out) {\n    _generateClient(out);\n    out.println();\n    _generateService(out);\n  }\n\n  void _generateClient(IndentingWriter out) {\n    final commentBlock = fileGen.commentBlock(_serviceDescriptorPath);\n    if (commentBlock != null) {\n      out.println(commentBlock);\n    }\n    if (_descriptor.options.deprecated) {\n      out.println(\n        \"@$coreImportPrefix.Deprecated('This service is deprecated')\",\n      );\n    }\n    out.println(\"@$protobufImportPrefix.GrpcServiceName('$_fullServiceName')\");\n    out.addBlock('class $_clientClassname extends $_client {', '}', () {\n      // Look for and generate default_host info.\n      final defaultHost = _descriptor.options.defaultHost;\n      if (defaultHost != null) {\n        out.println('/// The hostname for this service.');\n        out.println(\"static const $_string defaultHost = '$defaultHost';\");\n        out.println();\n      }\n\n      // Look for and generate oauth_scopes info.\n      final oauthScopes = _descriptor.options.oauthScopes;\n      if (oauthScopes != null) {\n        out.println('/// OAuth scopes needed for the client.');\n        out.println('static const $_list<$_string> oauthScopes = [');\n        for (final scope in oauthScopes.split(',')) {\n          out.println(\"  '$scope',\");\n        }\n        out.println('];');\n        out.println();\n      }\n\n      // generate the constructor\n      out.println(\n        '$_clientClassname(super.channel, {super.options, super.interceptors});',\n      );\n\n      // generate the service call methods\n      for (var i = 0; i < _methods.length; i++) {\n        _methods[i].generateClientStub(out, this, i);\n      }\n\n      // generate the method descriptors\n      out.println();\n      if (_methods.isNotEmpty) {\n        out.println('  // method descriptors');\n        out.println();\n\n        for (final method in _methods) {\n          method.generateClientMethodDescriptor(out);\n        }\n      }\n    });\n  }\n\n  void _generateService(IndentingWriter out) {\n    out.println(\"@$protobufImportPrefix.GrpcServiceName('$_fullServiceName')\");\n    out.addBlock(\n      'abstract class $_serviceClassname extends $_service {',\n      '}',\n      () {\n        out.println(\n          \"$coreImportPrefix.String get \\$name => '$_fullServiceName';\",\n        );\n        out.println();\n        out.addBlock('$_serviceClassname() {', '}', () {\n          for (final method in _methods) {\n            method.generateServiceMethodRegistration(out);\n          }\n        });\n        out.println();\n        for (final method in _methods) {\n          if (!method._clientStreaming) {\n            method.generateServiceMethodPreamble(out);\n            out.println();\n          }\n          method.generateServiceMethodStub(out);\n          out.println();\n        }\n      },\n    );\n  }\n\n  static final String _callOptions = '$grpcImportPrefix.CallOptions';\n  static final String _client = '$grpcImportPrefix.Client';\n  static final String _service = '$grpcImportPrefix.Service';\n  static final String _list = '$coreImportPrefix.List';\n  static final String _string = '$coreImportPrefix.String';\n}\n\nclass _GrpcMethod {\n  final String _grpcName;\n  final String _dartName;\n  final String _serviceName;\n\n  final bool _clientStreaming;\n  final bool _serverStreaming;\n\n  final String _requestType;\n  final String _responseType;\n\n  final String _argumentType;\n  final String _clientReturnType;\n  final String _serverReturnType;\n\n  final bool _deprecated;\n\n  _GrpcMethod._(\n    this._grpcName,\n    this._dartName,\n    this._serviceName,\n    this._clientStreaming,\n    this._serverStreaming,\n    this._requestType,\n    this._responseType,\n    this._argumentType,\n    this._clientReturnType,\n    this._serverReturnType,\n    this._deprecated,\n  );\n\n  factory _GrpcMethod(\n    GrpcServiceGenerator service,\n    GenerationContext ctx,\n    MethodDescriptorProto method,\n  ) {\n    final grpcName = method.name;\n    final dartName = lowerCaseFirstLetter(grpcName);\n\n    final clientStreaming = method.clientStreaming;\n    final serverStreaming = method.serverStreaming;\n\n    service._addDependency(ctx, method.inputType, 'input type of $grpcName');\n    service._addDependency(ctx, method.outputType, 'output type of $grpcName');\n\n    final requestType = service._getDartClassName(method.inputType);\n    final responseType = service._getDartClassName(method.outputType);\n\n    final argumentType =\n        clientStreaming ? '$_stream<$requestType>' : requestType;\n    final clientReturnType =\n        serverStreaming\n            ? '$_responseStream<$responseType>'\n            : '$_responseFuture<$responseType>';\n    final serverReturnType =\n        serverStreaming ? '$_stream<$responseType>' : '$_future<$responseType>';\n\n    final deprecated = method.options.deprecated;\n\n    return _GrpcMethod._(\n      grpcName,\n      dartName,\n      service._fullServiceName,\n      clientStreaming,\n      serverStreaming,\n      requestType,\n      responseType,\n      argumentType,\n      clientReturnType,\n      serverReturnType,\n      deprecated,\n    );\n  }\n\n  void generateClientMethodDescriptor(IndentingWriter out) {\n    out.println(\n      'static final _\\$$_dartName = $_clientMethod<$_requestType, $_responseType>(',\n    );\n    out.println('    \\'/$_serviceName/$_grpcName\\',');\n    out.println('    ($_requestType value) => value.writeToBuffer(),');\n    out.println('    $_responseType.fromBuffer);');\n  }\n\n  List<int> _methodDescriptorPath(GrpcServiceGenerator generator, int index) {\n    return [\n      ...generator._serviceDescriptorPath,\n      ClientApiGenerator.serviceDescriptorMethodTag,\n      index,\n    ];\n  }\n\n  void generateClientStub(\n    IndentingWriter out,\n    GrpcServiceGenerator serviceGenerator,\n    int methodIndex,\n  ) {\n    out.println();\n    final commentBlock = serviceGenerator.fileGen.commentBlock(\n      _methodDescriptorPath(serviceGenerator, methodIndex),\n    );\n    if (commentBlock != null) {\n      out.println(commentBlock);\n    }\n    if (_deprecated) {\n      out.println(\n        '@$coreImportPrefix.Deprecated(\\'This method is deprecated\\')',\n      );\n    }\n    out.addBlock(\n      '$_clientReturnType $_dartName($_argumentType request, {${GrpcServiceGenerator._callOptions}? options,}) {',\n      '}',\n      () {\n        if (_clientStreaming && _serverStreaming) {\n          out.println(\n            'return \\$createStreamingCall(_\\$$_dartName, request, options: options);',\n          );\n        } else if (_clientStreaming && !_serverStreaming) {\n          out.println(\n            'return \\$createStreamingCall(_\\$$_dartName, request, options: options).single;',\n          );\n        } else if (!_clientStreaming && _serverStreaming) {\n          out.println(\n            'return \\$createStreamingCall(_\\$$_dartName, $_stream.fromIterable([request]), options: options);',\n          );\n        } else {\n          out.println(\n            'return \\$createUnaryCall(_\\$$_dartName, request, options: options);',\n          );\n        }\n      },\n    );\n  }\n\n  void generateServiceMethodRegistration(IndentingWriter out) {\n    out.println('\\$addMethod($_serviceMethod<$_requestType, $_responseType>(');\n    out.println('    \\'$_grpcName\\',');\n    out.println('    $_dartName${_clientStreaming ? '' : '_Pre'},');\n    out.println('    $_clientStreaming,');\n    out.println('    $_serverStreaming,');\n    out.println(\n      '    ($coreImportPrefix.List<$coreImportPrefix.int> value) => $_requestType.fromBuffer(value),',\n    );\n    out.println('    ($_responseType value) => value.writeToBuffer()));');\n  }\n\n  void generateServiceMethodPreamble(IndentingWriter out) {\n    out.addBlock(\n      '$_serverReturnType ${_dartName}_Pre($_serviceCall \\$call, $_future<$_requestType> \\$request) async${_serverStreaming ? '*' : ''} {',\n      '}',\n      () {\n        if (_serverStreaming) {\n          out.println('yield* $_dartName(\\$call, await \\$request);');\n        } else {\n          out.println('return $_dartName(\\$call, await \\$request);');\n        }\n      },\n    );\n  }\n\n  void generateServiceMethodStub(IndentingWriter out) {\n    out.println(\n      '$_serverReturnType $_dartName($_serviceCall call, $_argumentType request);',\n    );\n  }\n\n  static final String _serviceCall = '$grpcImportPrefix.ServiceCall';\n  static final String _serviceMethod = '$grpcImportPrefix.ServiceMethod';\n  static final String _clientMethod = '$grpcImportPrefix.ClientMethod';\n  static final String _future = '$asyncImportPrefix.Future';\n  static final String _stream = '$asyncImportPrefix.Stream';\n  static final String _responseFuture = '$grpcImportPrefix.ResponseFuture';\n  static final String _responseStream = '$grpcImportPrefix.ResponseStream';\n}\n\nextension on ServiceOptions {\n  String? get defaultHost => getExtension(Client.defaultHost) as String?;\n\n  String? get oauthScopes => getExtension(Client.oauthScopes) as String?;\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/linker.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport '../protoc.dart' show FileGenerator;\nimport 'code_generator.dart';\nimport 'options.dart';\n\n/// Resolves all cross-references in a set of proto files.\nvoid link(GenerationOptions? options, Iterable<FileGenerator> files) {\n  final ctx = GenerationContext(options);\n\n  // Register the targets of cross-references.\n  for (final f in files) {\n    ctx.registerProtoFile(f);\n\n    for (final m in f.messageGenerators) {\n      m.register(ctx);\n    }\n    for (final e in f.enumGenerators) {\n      e.register(ctx);\n    }\n  }\n\n  for (final f in files) {\n    f.resolve(ctx);\n  }\n\n  // Resolve service generators last.\n  // (They depend on all messages being resolved.)\n  for (final f in files) {\n    for (final s in f.serviceGenerators) {\n      s.resolve(ctx);\n    }\n    for (final s in f.grpcGenerators) {\n      s.resolve(ctx);\n    }\n  }\n}\n\nclass GenerationContext {\n  final GenerationOptions? options;\n\n  /// The files available for import.\n  final Map<String, FileGenerator> _files = <String, FileGenerator>{};\n\n  /// The types available to proto fields.\n  final Map<String, ProtobufContainer> _typeRegistry =\n      <String, ProtobufContainer>{};\n\n  GenerationContext(this.options);\n\n  /// Makes info about a .pb.dart file available for reference,\n  /// using the filename given to us by protoc.\n  void registerProtoFile(FileGenerator f) {\n    _files[f.descriptor.name] = f;\n  }\n\n  /// Makes a message, group, or enum available for reference.\n  void registerFieldType(ProtobufContainer type) {\n    // Register the name with a leading '.' to be compatible with input from\n    // protoc.\n    _typeRegistry[type.dottedName] = type;\n  }\n\n  /// Returns info about a .pb.dart being imported,\n  /// based on the filename given to us by protoc.\n  FileGenerator? getImportedProtoFile(String name) => _files[name];\n\n  /// Returns info about the type of a message, group, or enum field,\n  /// based on the fully qualified name given to us by protoc.\n  ProtobufContainer? getFieldType(String name) => _typeRegistry[name];\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/message_generator.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\n/// Generates the Dart enum corresponding to a oneof declaration.\n///\n/// The enum is used to represent the state of a oneof when using the\n/// corresponding which-method.\nclass OneofEnumGenerator {\n  static void generate(\n    IndentingWriter out,\n    OneofNames oneof,\n    List<ProtobufField> fields,\n    List<int> parentPath,\n  ) {\n    final enumName = oneof.oneofEnumName;\n    out.addAnnotatedBlock(\n      'enum $enumName {',\n      '}\\n',\n      [\n        NamedLocation(\n          name: enumName,\n          fieldPathSegment: Paths.buildOneofPath(parentPath, oneof),\n          start: 'enum '.length,\n        ),\n      ],\n      () {\n        for (final field in fields) {\n          final name = oneofEnumMemberName(field.memberNames!.fieldName);\n          out.printlnAnnotated('$name, ', [\n            NamedLocation(\n              name: name,\n              fieldPathSegment: Paths.buildFieldPath(parentPath, field),\n              start: 0,\n            ),\n          ]);\n        }\n        out.println('notSet');\n      },\n    );\n  }\n}\n\nclass MessageGenerator extends ProtobufContainer {\n  /// The name of the Dart class to generate.\n  @override\n  final String classname;\n\n  /// The fully-qualified name of the message (without any leading '.').\n  @override\n  final String fullName;\n\n  /// The part of the fully qualified name that comes after the package prefix.\n  ///\n  /// For nested messages this will include the names of the parents.\n  ///\n  /// For example:\n  /// ```\n  /// package foo;\n  ///\n  /// message Container {\n  ///   message Nested {\n  ///     int32 int32_value = 1;\n  ///   }\n  /// }\n  /// ```\n  /// The nested message will have a `fullName` of 'foo.Container.Nested', and a\n  /// `messageName` of 'Container.Nested'.\n  String get messageName =>\n      fullName.substring(package.isEmpty ? 0 : package.length + 1);\n\n  PbMixin? mixin;\n\n  @override\n  final ProtobufContainer parent;\n\n  @override\n  final FeatureSet features;\n\n  final DescriptorProto _descriptor;\n  final List<EnumGenerator> _enumGenerators = <EnumGenerator>[];\n  final List<MessageGenerator> _messageGenerators = <MessageGenerator>[];\n  final List<ExtensionGenerator> _extensionGenerators = <ExtensionGenerator>[];\n\n  /// Stores the list of fields belonging to each oneof declaration identified\n  /// by the index in the containing types's oneof_decl list.\n  /// Only contains the 'real' oneofs.\n  final List<List<ProtobufField>> _oneofFields;\n  final List<FeatureSet> _oneofFeatures;\n  late List<OneofNames> _oneofNames;\n\n  @override\n  final List<int> fieldPath;\n\n  // populated by resolve()\n  late List<ProtobufField> fieldList;\n  bool _resolved = false;\n\n  Set<String> _usedTopLevelNames;\n\n  MessageGenerator._(\n    DescriptorProto descriptor,\n    this.parent,\n    Map<String, PbMixin> declaredMixins,\n    PbMixin? defaultMixin,\n    this._usedTopLevelNames,\n    this.fieldPath,\n  ) : _descriptor = descriptor,\n      classname = messageOrEnumClassName(\n        descriptor.name,\n        _usedTopLevelNames,\n        parent: parent.classname ?? '',\n      ),\n      fullName =\n          parent.fullName == ''\n              ? descriptor.name\n              : '${parent.fullName}.${descriptor.name}',\n      _oneofFields = List.generate(\n        countRealOneofs(descriptor),\n        (int index) => [],\n      ),\n      _oneofFeatures = List.generate(\n        countRealOneofs(descriptor),\n        (int index) => FeatureSet(),\n      ),\n      features = resolveFeatures(parent.features, descriptor.options.features) {\n    mixin = _getMixin(declaredMixins, defaultMixin);\n    for (var i = 0; i < _descriptor.enumType.length; i++) {\n      final e = _descriptor.enumType[i];\n      _enumGenerators.add(EnumGenerator.nested(e, this, _usedTopLevelNames, i));\n    }\n\n    for (var i = 0; i < _descriptor.nestedType.length; i++) {\n      final n = _descriptor.nestedType[i];\n      _messageGenerators.add(\n        MessageGenerator.nested(\n          n,\n          this,\n          declaredMixins,\n          defaultMixin,\n          _usedTopLevelNames,\n          i,\n        ),\n      );\n    }\n\n    for (var oneof = 0; oneof < _oneofFeatures.length; oneof++) {\n      _oneofFeatures[oneof] = resolveFeatures(\n        features,\n        descriptor.oneofDecl[oneof].options.features,\n      );\n    }\n\n    // Extensions within messages won't create top-level classes and don't need\n    // to check against / be added to top-level reserved names.\n    final usedExtensionNames = {...forbiddenExtensionNames};\n    for (var i = 0; i < _descriptor.extension.length; i++) {\n      final x = _descriptor.extension[i];\n      _extensionGenerators.add(\n        ExtensionGenerator.nested(x, this, usedExtensionNames, i),\n      );\n    }\n  }\n\n  MessageGenerator.topLevel(\n    DescriptorProto descriptor,\n    ProtobufContainer parent,\n    Map<String, PbMixin> declaredMixins,\n    PbMixin? defaultMixin,\n    Set<String> usedNames,\n    int repeatedFieldIndex,\n  ) : this._(\n        descriptor,\n        parent,\n        declaredMixins,\n        defaultMixin,\n        usedNames,\n        Paths.buildTopLevelMessagePath(parent.fieldPath, repeatedFieldIndex),\n      );\n\n  MessageGenerator.nested(\n    DescriptorProto descriptor,\n    ProtobufContainer parent,\n    Map<String, PbMixin> declaredMixins,\n    PbMixin? defaultMixin,\n    Set<String> usedNames,\n    int repeatedFieldIndex,\n  ) : this._(\n        descriptor,\n        parent,\n        declaredMixins,\n        defaultMixin,\n        usedNames,\n        Paths.buildNestedMessagePath(parent.fieldPath, repeatedFieldIndex),\n      );\n\n  @override\n  String get package => parent.package;\n\n  /// The generator of the .pb.dart file that will declare this type.\n  @override\n  FileGenerator get fileGen => parent.fileGen!;\n\n  /// Throws an exception if [resolve] hasn't been called yet.\n  void checkResolved() {\n    if (!_resolved) {\n      throw StateError('message not resolved: $fullName');\n    }\n  }\n\n  /// Returns a const expression that evaluates to the JSON for this message.\n  ///\n  /// [context] represents the .pb.dart file where the expression will be used.\n  String getJsonConstant(FileGenerator context) {\n    final name = '$classname\\$json';\n    if (context.protoFileUri == fileGen.protoFileUri) {\n      return name;\n    }\n    return '${context.importPrefix(this)}.$name';\n  }\n\n  /// Adds all mixins used in this message and any submessages.\n  void addMixinsTo(Set<PbMixin> output) {\n    if (mixin != null) {\n      output.addAll(mixin!.findMixinsToApply());\n    }\n    for (final m in _messageGenerators) {\n      m.addMixinsTo(output);\n    }\n  }\n\n  // Registers message and enum types that can be used elsewhere.\n  void register(GenerationContext ctx) {\n    ctx.registerFieldType(this);\n    for (final m in _messageGenerators) {\n      m.register(ctx);\n    }\n    for (final e in _enumGenerators) {\n      e.register(ctx);\n    }\n  }\n\n  // Creates fields and resolves extension targets.\n  void resolve(GenerationContext ctx) {\n    if (_resolved) throw StateError('message already resolved');\n    _resolved = true;\n\n    final reserved = mixin?.findReservedNames() ?? const <String>[];\n    final members = messageMemberNames(\n      _descriptor,\n      classname,\n      _usedTopLevelNames,\n      reserved: reserved,\n      lowercaseGroupNames: false,\n    );\n\n    fieldList = <ProtobufField>[];\n    for (final names in members.fieldNames) {\n      final descriptor = names.descriptor;\n      ProtobufField field;\n      if (descriptor.hasOneofIndex() && !descriptor.proto3Optional) {\n        field = ProtobufField.message(\n          names,\n          this,\n          _oneofFeatures[descriptor.oneofIndex],\n          ctx,\n        );\n        _oneofFields[field.descriptor.oneofIndex].add(field);\n      } else {\n        field = ProtobufField.message(names, this, features, ctx);\n      }\n      fieldList.add(field);\n    }\n    _oneofNames = members.oneofNames;\n\n    for (final m in _messageGenerators) {\n      m.resolve(ctx);\n    }\n    for (final x in _extensionGenerators) {\n      x.resolve(ctx);\n    }\n  }\n\n  bool get needsFixnumImport {\n    checkResolved();\n    for (final field in fieldList) {\n      if (field.needsFixnumImport) return true;\n    }\n    for (final m in _messageGenerators) {\n      if (m.needsFixnumImport) return true;\n    }\n    for (final x in _extensionGenerators) {\n      if (x.needsFixnumImport) return true;\n    }\n    return false;\n  }\n\n  /// Adds dependencies of [generate] to [imports].\n  ///\n  /// For each .pb.dart file that the generated code needs to import,\n  /// add its generator.\n  void addImportsTo(\n    Set<FileGenerator> imports,\n    Set<FileGenerator> enumImports,\n  ) {\n    checkResolved();\n    for (final field in fieldList) {\n      final typeGen = field.baseType.generator;\n      if (typeGen is EnumGenerator) {\n        enumImports.add(typeGen.fileGen!);\n      } else if (typeGen != null) {\n        imports.add(typeGen.fileGen!);\n      }\n    }\n    for (final m in _messageGenerators) {\n      m.addImportsTo(imports, enumImports);\n    }\n    for (final x in _extensionGenerators) {\n      x.addImportsTo(imports, enumImports);\n    }\n  }\n\n  // Returns the number of enums in this message and all nested messages.\n  int get enumCount {\n    var count = _enumGenerators.length;\n    for (final m in _messageGenerators) {\n      count += m.enumCount;\n    }\n    return count;\n  }\n\n  /// Adds dependencies of [generateConstants] to [imports].\n  ///\n  /// For each .pbjson.dart file that the generated code needs to import,\n  /// add its generator.\n  void addConstantImportsTo(Set<FileGenerator> imports) {\n    checkResolved();\n    for (final m in _messageGenerators) {\n      m.addConstantImportsTo(imports);\n    }\n    for (final x in _extensionGenerators) {\n      x.addConstantImportsTo(imports);\n    }\n  }\n\n  void generate(IndentingWriter out) {\n    checkResolved();\n\n    for (final m in _messageGenerators) {\n      // Don't output the generated map entry type. Instead, the `PbMap` type\n      // from the protobuf library is used to hold the keys and values.\n      if (m._descriptor.options.hasMapEntry()) continue;\n      m.generate(out);\n    }\n\n    for (final oneof in _oneofNames) {\n      OneofEnumGenerator.generate(\n        out,\n        oneof,\n        _oneofFields[oneof.index],\n        fieldPath,\n      );\n    }\n\n    var mixinClause = '';\n    if (mixin != null) {\n      final mixinNames = mixin!.findMixinsToApply().map(\n        (m) => '$mixinImportPrefix.${m.name}',\n      );\n      mixinClause = ' with ${mixinNames.join(\", \")}';\n    }\n\n    final omitMessageNames = ConditionalConstDefinition('omit_message_names');\n    out.addSuffix(\n      omitMessageNames.constFieldName,\n      omitMessageNames.constDefinition,\n    );\n\n    final conditionalPackageName =\n        'const $protobufImportPrefix.PackageName'\n        '(${omitMessageNames.createTernary(package)})';\n\n    final packageClause =\n        package == '' ? '' : ', package: $conditionalPackageName';\n    final proto3JsonClause =\n        (mixin?.wellKnownType != null)\n            ? ', wellKnownType: $mixinImportPrefix.WellKnownType.${mixin!.wellKnownType}'\n            : '';\n\n    final String extendedClass;\n    if (_descriptor.options.messageSetWireFormat) {\n      extendedClass = '\\$_MessageSet';\n    } else {\n      extendedClass = 'GeneratedMessage';\n    }\n\n    final commentBlock = fileGen.commentBlock(fieldPath);\n    if (commentBlock != null) {\n      out.println(commentBlock);\n    }\n    if (_descriptor.options.deprecated) {\n      out.println(\n        '@$coreImportPrefix.Deprecated(\\'This message is deprecated\\')',\n      );\n    }\n    out.addAnnotatedBlock(\n      'class $classname extends $protobufImportPrefix.$extendedClass$mixinClause {',\n      '}',\n      [\n        NamedLocation(\n          name: classname,\n          fieldPathSegment: fieldPath,\n          start: 'class '.length,\n        ),\n      ],\n      () {\n        _generateFactory(out);\n\n        out.println();\n\n        out.printlnAnnotated('$classname._();', [\n          NamedLocation(name: classname, fieldPathSegment: fieldPath, start: 0),\n        ]);\n\n        out.println();\n\n        out.println(\n          'factory $classname.fromBuffer($coreImportPrefix.List<$coreImportPrefix.int> data,'\n          ' [$protobufImportPrefix.ExtensionRegistry registry = $protobufImportPrefix.ExtensionRegistry.EMPTY])'\n          ' => create()..mergeFromBuffer(data, registry);',\n        );\n        out.println(\n          'factory $classname.fromJson($coreImportPrefix.String json,'\n          ' [$protobufImportPrefix.ExtensionRegistry registry = $protobufImportPrefix.ExtensionRegistry.EMPTY])'\n          ' => create()..mergeFromJson(json, registry);',\n        );\n\n        out.println();\n        for (final oneof in _oneofNames) {\n          out.addBlock(\n            'static const $coreImportPrefix.Map<$coreImportPrefix.int, ${oneof.oneofEnumName}> ${oneof.byTagMapName} = {',\n            '};',\n            () {\n              for (final field in _oneofFields[oneof.index]) {\n                final oneofMemberName = oneofEnumMemberName(\n                  field.memberNames!.fieldName,\n                );\n                out.println(\n                  '${field.number} : ${oneof.oneofEnumName}.$oneofMemberName,',\n                );\n              }\n              out.println('0 : ${oneof.oneofEnumName}.notSet');\n            },\n          );\n        }\n\n        final omitMessageNames = ConditionalConstDefinition(\n          'omit_message_names',\n        );\n        out.addSuffix(\n          omitMessageNames.constFieldName,\n          omitMessageNames.constDefinition,\n        );\n\n        out.addBlock(\n          'static final $protobufImportPrefix.BuilderInfo _i = '\n              '$protobufImportPrefix.BuilderInfo(${omitMessageNames.createTernary(messageName)}'\n              '$packageClause'\n              ', createEmptyInstance: create'\n              '$proto3JsonClause)',\n          ';',\n          () {\n            for (var oneof = 0; oneof < _oneofFields.length; oneof++) {\n              final tags =\n                  _oneofFields[oneof]\n                      .map((ProtobufField f) => f.number)\n                      .toList();\n              out.println('..oo($oneof, $tags)');\n            }\n\n            for (final field in fieldList) {\n              field.generateBuilderInfoCall(out, package);\n            }\n\n            if (_descriptor.extensionRange.isNotEmpty) {\n              out.println('..hasExtensions = true');\n            }\n            if (!_hasRequiredFields(this, {})) {\n              out.println('..hasRequiredFields = false');\n            }\n          },\n        );\n\n        for (final x in _extensionGenerators) {\n          x.generate(out);\n        }\n\n        out.println();\n        out.println(\n          '@$coreImportPrefix.Deprecated('\n          \"'See https://github.com/google/protobuf.dart/issues/998.')\",\n        );\n        out.println('$classname clone() => deepCopy();');\n        out.println(\n          '@$coreImportPrefix.Deprecated('\n          \"'See https://github.com/google/protobuf.dart/issues/998.')\",\n        );\n        out.println(\n          '$classname copyWith(void Function($classname) updates) =>'\n          ' super.copyWith((message) => updates(message as $classname))'\n          ' as $classname;',\n        );\n\n        out.println();\n        out.println('@$coreImportPrefix.override');\n        out.println('$protobufImportPrefix.BuilderInfo get info_ => _i;');\n\n        // Factory functions which can be used as default value closures.\n        out.println();\n        out.println(\"@$coreImportPrefix.pragma('dart2js:noInline')\");\n        out.println('static $classname create() => $classname._();');\n        out.println('@$coreImportPrefix.override');\n        out.println('$classname createEmptyInstance() => create();');\n\n        out.println(\"@$coreImportPrefix.pragma('dart2js:noInline')\");\n        out.println(\n          'static $classname getDefault() =>'\n          ' _defaultInstance ??='\n          ' $protobufImportPrefix.GeneratedMessage.\\$_defaultFor<$classname>'\n          '(create);',\n        );\n        out.println('static $classname? _defaultInstance;');\n\n        generateFieldsAccessorsMutators(out);\n        mixin?.injectHelpers(out);\n      },\n    );\n    out.println();\n  }\n\n  void _generateFactory(IndentingWriter out) {\n    if (!fileGen.options.disableConstructorArgs && fieldList.isNotEmpty) {\n      out.println('factory $classname({');\n      for (final field in fieldList) {\n        _emitDeprecatedIf(field.isDeprecated, out);\n        if (field.isRepeated && !field.isMapField) {\n          out.println(\n            '  ${field.baseType.getRepeatedDartTypeIterable(fileGen)}? ${field.memberNames!.fieldName},',\n          );\n        } else if (field.isMapField) {\n          final keyType = field.getDartMapKeyType();\n          final valueType = field.getDartMapValueType();\n          out.println(\n            '  $coreImportPrefix.Iterable<$coreImportPrefix.MapEntry<$keyType, $valueType>>? '\n            '${field.memberNames!.fieldName},',\n          );\n        } else {\n          out.println(\n            '  ${field.getDartType()}? ${field.memberNames!.fieldName},',\n          );\n        }\n      }\n      out.print('}) ');\n\n      final names = fieldList.map((f) => f.memberNames!.fieldName).toSet();\n      var result = 'result';\n      if (names.contains(result)) {\n        result += r'$';\n      }\n      out.addBlock('{', '}', () {\n        out.println('final $result = create();');\n        for (final field in fieldList) {\n          out.print('if (${field.memberNames!.fieldName} != null) ');\n          if (field.isRepeated && !field.isMapField) {\n            out.println(\n              '$result.${field.memberNames!.fieldName}.addAll(${field.memberNames!.fieldName});',\n            );\n          } else if (field.isMapField) {\n            out.println(\n              '$result.${field.memberNames!.fieldName}.addEntries(${field.memberNames!.fieldName});',\n            );\n          } else {\n            out.println(\n              '$result.${field.memberNames!.fieldName} = ${field.memberNames!.fieldName};',\n            );\n          }\n        }\n        out.println('return $result;');\n      });\n    } else {\n      out.println('factory $classname() => create();');\n    }\n  }\n\n  // Returns true if the message type has any required fields.  If it doesn't,\n  // we can optimize out calls to its isInitialized()/_findInvalidFields()\n  // methods.\n  //\n  // already_seen is used to avoid checking the same type multiple times\n  // (and also to protect against unbounded recursion).\n  bool _hasRequiredFields(MessageGenerator type, Set<String> alreadySeen) {\n    checkResolved();\n\n    if (alreadySeen.contains(type.fullName)) {\n      // The type is already in cache.  This means that either:\n      // a. The type has no required fields.\n      // b. We are in the midst of checking if the type has required fields,\n      //    somewhere up the stack.  In this case, we know that if the type\n      //    has any required fields, they'll be found when we return to it,\n      //    and the whole call to HasRequiredFields() will return true.\n      //    Therefore, we don't have to check if this type has required fields\n      //    here.\n      return false;\n    }\n    alreadySeen.add(type.fullName);\n    // If the type has extensions, an extension with message type could contain\n    // required fields, so we have to be conservative and assume such an\n    // extension exists.\n    if (type._descriptor.extensionRange.isNotEmpty) {\n      return true;\n    }\n\n    for (final field in type.fieldList) {\n      if (field.isRequired) {\n        return true;\n      }\n      if (field.baseType.isMessage) {\n        final child = field.baseType.generator as MessageGenerator;\n        if (_hasRequiredFields(child, alreadySeen)) {\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n\n  void generateFieldsAccessorsMutators(IndentingWriter out) {\n    for (final oneof in _oneofNames) {\n      generateOneofAccessors(out, oneof);\n    }\n\n    for (final field in fieldList) {\n      out.println();\n      generateFieldAccessorsMutators(\n        field,\n        out,\n        Paths.buildFieldPath(fieldPath, field),\n      );\n    }\n  }\n\n  void generateOneofAccessors(IndentingWriter out, OneofNames oneof) {\n    out.println();\n    for (final field in _oneofFields[oneof.index]) {\n      _emitIndexAnnotation(field.number, out);\n    }\n    out.printlnAnnotated(\n      '${oneof.oneofEnumName} ${oneof.whichOneofMethodName}() '\n      '=> ${oneof.byTagMapName}[\\$_whichOneof(${oneof.index})]!;',\n      [\n        NamedLocation(\n          name: oneof.whichOneofMethodName,\n          fieldPathSegment: Paths.buildOneofPath(fieldPath, oneof),\n          start: '${oneof.oneofEnumName} '.length,\n        ),\n      ],\n    );\n    for (final field in _oneofFields[oneof.index]) {\n      _emitIndexAnnotation(field.number, out);\n    }\n    out.printlnAnnotated(\n      'void ${oneof.clearMethodName}() '\n      '=> \\$_clearField(\\$_whichOneof(${oneof.index}));',\n      [\n        NamedLocation(\n          name: oneof.clearMethodName,\n          fieldPathSegment: Paths.buildOneofPath(fieldPath, oneof),\n          start: 'void '.length,\n        ),\n      ],\n    );\n  }\n\n  void generateFieldAccessorsMutators(\n    ProtobufField field,\n    IndentingWriter out,\n    List<int> memberFieldPath,\n  ) {\n    final fieldTypeString = field.getDartType();\n    final defaultExpr = field.getDefaultExpr();\n    final names = field.memberNames;\n\n    final commentBlock = fileGen.commentBlock(memberFieldPath);\n    if (commentBlock != null) {\n      out.println(commentBlock);\n    }\n\n    _emitDeprecatedIf(field.isDeprecated, out);\n    _emitOverrideIf(field.overridesGetter, out);\n    _emitIndexAnnotation(field.number, out);\n    final getterExpr = _getterExpression(\n      fieldTypeString,\n      field.index!,\n      defaultExpr,\n      field.isRepeated,\n      field.isMapField,\n    );\n\n    out.printlnAnnotated(\n      '$fieldTypeString get ${names!.fieldName} => $getterExpr;',\n      [\n        NamedLocation(\n          name: names.fieldName,\n          fieldPathSegment: memberFieldPath,\n          start: '$fieldTypeString get '.length,\n        ),\n      ],\n    );\n\n    if (field.isRepeated) {\n      if (field.overridesSetter) {\n        throw 'Field ${field.fullName} cannot override a setter for '\n            '${names.fieldName} because it is repeated.';\n      }\n      if (field.overridesHasMethod) {\n        throw 'Field ${field.fullName} cannot override '\n            '${names.hasMethodName}() because it is repeated.';\n      }\n      if (field.overridesClearMethod) {\n        throw 'Field ${field.fullName} cannot override '\n            '${names.clearMethodName}() because it is repeated.';\n      }\n    } else {\n      final fastSetter = field.baseType.setter;\n      _emitDeprecatedIf(field.isDeprecated, out);\n      _emitOverrideIf(field.overridesSetter, out);\n      _emitIndexAnnotation(field.number, out);\n      if (fastSetter != null) {\n        out.printlnAnnotated(\n          'set ${names.fieldName}($fieldTypeString value) => '\n          '$fastSetter(${field.index}, value);',\n          [\n            NamedLocation(\n              name: names.fieldName,\n              fieldPathSegment: memberFieldPath,\n              start: 'set '.length,\n            ),\n          ],\n        );\n      } else {\n        out.printlnAnnotated(\n          'set ${names.fieldName}($fieldTypeString value) => '\n          '\\$_setField(${field.number}, value);',\n          [\n            NamedLocation(\n              name: names.fieldName,\n              fieldPathSegment: memberFieldPath,\n              start: 'set '.length,\n            ),\n          ],\n        );\n      }\n      if (field.hasPresence) {\n        _emitDeprecatedIf(field.isDeprecated, out);\n        _emitOverrideIf(field.overridesHasMethod, out);\n        _emitIndexAnnotation(field.number, out);\n        out.printlnAnnotated(\n          '$coreImportPrefix.bool ${names.hasMethodName}() =>'\n          ' \\$_has(${field.index});',\n          [\n            NamedLocation(\n              name: names.hasMethodName!,\n              fieldPathSegment: memberFieldPath,\n              start: '$coreImportPrefix.bool '.length,\n            ),\n          ],\n        );\n      }\n      _emitDeprecatedIf(field.isDeprecated, out);\n      _emitOverrideIf(field.overridesClearMethod, out);\n      _emitIndexAnnotation(field.number, out);\n      out.printlnAnnotated(\n        'void ${names.clearMethodName}() =>'\n        ' \\$_clearField(${field.number});',\n        [\n          NamedLocation(\n            name: names.clearMethodName!,\n            fieldPathSegment: memberFieldPath,\n            start: 'void '.length,\n          ),\n        ],\n      );\n      if (field.baseType.isMessage) {\n        _emitDeprecatedIf(field.isDeprecated, out);\n        _emitIndexAnnotation(field.number, out);\n        out.printlnAnnotated(\n          '$fieldTypeString ${names.ensureMethodName}() => '\n          '\\$_ensure(${field.index});',\n          <NamedLocation>[\n            NamedLocation(\n              name: names.ensureMethodName!,\n              fieldPathSegment: memberFieldPath,\n              start: '$fieldTypeString '.length,\n            ),\n          ],\n        );\n      }\n    }\n  }\n\n  String _getterExpression(\n    String fieldType,\n    int index,\n    String defaultExpr,\n    bool isRepeated,\n    bool isMapField,\n  ) {\n    if (isMapField) {\n      return '\\$_getMap($index)';\n    }\n    if (fieldType == '$coreImportPrefix.String') {\n      if (defaultExpr == '\"\"' || defaultExpr == \"''\") {\n        return '\\$_getSZ($index)';\n      }\n      return '\\$_getS($index, $defaultExpr)';\n    }\n    if (fieldType == '$coreImportPrefix.bool') {\n      if (defaultExpr == 'false') {\n        return '\\$_getBF($index)';\n      }\n      return '\\$_getB($index, $defaultExpr)';\n    }\n    if (fieldType == '$coreImportPrefix.int') {\n      if (defaultExpr == '0') {\n        return '\\$_getIZ($index)';\n      }\n      return '\\$_getI($index, $defaultExpr)';\n    }\n    if (fieldType == '$fixnumImportPrefix.Int64' && defaultExpr == 'null') {\n      return '\\$_getI64($index)';\n    }\n    if (defaultExpr == 'null') {\n      return isRepeated ? '\\$_getList($index)' : '\\$_getN($index)';\n    }\n    return '\\$_get($index, $defaultExpr)';\n  }\n\n  void _emitDeprecatedIf(bool condition, IndentingWriter out) {\n    if (condition) {\n      out.println(\n        '@$coreImportPrefix.Deprecated(\\'This field is deprecated.\\')',\n      );\n    }\n  }\n\n  void _emitOverrideIf(bool condition, IndentingWriter out) {\n    if (condition) {\n      out.println('@$coreImportPrefix.override');\n    }\n  }\n\n  void _emitIndexAnnotation(int index, IndentingWriter out) {\n    out.println('@$protobufImportPrefix.TagNumber($index)');\n  }\n\n  void generateEnums(IndentingWriter out) {\n    for (final e in _enumGenerators) {\n      e.generate(out);\n    }\n\n    for (final m in _messageGenerators) {\n      m.generateEnums(out);\n    }\n  }\n\n  /// Writes a Dart constant containing the JSON for the ProtoDescriptor.\n  /// Also writes a separate constant for each nested message,\n  /// to avoid duplication.\n  void generateConstants(IndentingWriter out) {\n    const nestedTypeTag = 3;\n    const enumTypeTag = 4;\n    assert(_descriptor.info_.fieldInfo[nestedTypeTag]!.name == 'nestedType');\n    assert(_descriptor.info_.fieldInfo[enumTypeTag]!.name == 'enumType');\n\n    final name = getJsonConstant(fileGen);\n    final json = _descriptor.writeToJsonMap();\n    final nestedTypeNames =\n        _messageGenerators.map((m) => m.getJsonConstant(fileGen)).toList();\n    final nestedEnumNames =\n        _enumGenerators.map((e) => e.getJsonConstant(fileGen)).toList();\n\n    out.println(\n      '@$coreImportPrefix.Deprecated'\n      '(\\'Use ${toplevelParent!.binaryDescriptorName} instead\\')',\n    );\n    out.addBlock('const $name = {', '};', () {\n      for (final key in json.keys) {\n        out.print(\"'$key': \");\n        if (key == '$nestedTypeTag') {\n          // refer to message constants by name instead of repeating each value\n          out.println(\"[${nestedTypeNames.join(\", \")}],\");\n          continue;\n        } else if (key == '$enumTypeTag') {\n          // refer to enum constants by name\n          out.println(\"[${nestedEnumNames.join(\", \")}],\");\n          continue;\n        }\n        writeJsonConst(out, json[key]);\n        out.println(',');\n      }\n    });\n    out.println();\n\n    for (final m in _messageGenerators) {\n      m.generateConstants(out);\n    }\n\n    for (final e in _enumGenerators) {\n      e.generateConstants(out);\n    }\n  }\n\n  /// Returns the mixin for this message, or null if none.\n  ///\n  /// First searches [_wellKnownMixins], then [declaredMixins],\n  /// then internal mixins declared by [findMixin].\n  PbMixin? _getMixin(\n    Map<String, PbMixin> declaredMixins,\n    PbMixin? defaultMixin,\n  ) {\n    final wellKnownMixin = wellKnownMixinForFullName(fullName);\n    if (wellKnownMixin != null) return wellKnownMixin;\n    if (!_descriptor.hasOptions() ||\n        !_descriptor.options.hasExtension(Dart_options.mixin)) {\n      return defaultMixin;\n    }\n\n    final name = _descriptor.options.getExtension(Dart_options.mixin) as String;\n    if (name.isEmpty) return null; // don't use any mixins (override default)\n    final mixin = declaredMixins[name] ?? findMixin(name);\n    if (mixin == null) {\n      throw '${_descriptor.name} in ${parent.fileGen!.descriptor.name}: mixin \"$name\" not found';\n    }\n    return mixin;\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/options.dart",
    "content": "// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'gen/google/protobuf/compiler/plugin.pb.dart';\n\ntypedef OnError = void Function(String details);\n\n/// Helper function implementing a generic option parser that reads\n/// `request.parameters` and treats each token as either a flag (\"name\") or a\n/// key-value pair (\"name=value\"). For each option \"name\", it looks up whether a\n/// [SingleOptionParser] exists in [parsers] and delegates the actual parsing of\n/// the option to it. Returns `true` if no errors were reported.\nbool genericOptionsParser(\n  CodeGeneratorRequest request,\n  CodeGeneratorResponse response,\n  Map<String, SingleOptionParser> parsers,\n) {\n  final parameter = request.parameter;\n  final options = parameter.trim().split(',');\n  final errors = [];\n\n  for (var option in options) {\n    option = option.trim();\n    if (option.isEmpty) continue;\n    void reportError(String details) {\n      errors.add('Error found trying to parse the option: $option.\\n$details');\n    }\n\n    final nameValue = option.split('=');\n    if (nameValue.length != 1 && nameValue.length != 2) {\n      reportError('Options should be a single token, or a name=value pair');\n      continue;\n    }\n    final name = nameValue[0].trim();\n    final parser = parsers[name];\n    if (parser == null) {\n      reportError('Unknown option ($name).');\n      continue;\n    }\n\n    final value = nameValue.length > 1 ? nameValue[1].trim() : null;\n    parser.parse(name, value, reportError);\n  }\n\n  if (errors.isEmpty) return true;\n\n  response.error = errors.join('\\n');\n  return false;\n}\n\n/// Options expected by the protoc code generation compiler.\nclass GenerationOptions {\n  final bool useGrpc;\n  final bool generateMetadata;\n  final bool disableConstructorArgs;\n\n  GenerationOptions({\n    this.useGrpc = false,\n    this.generateMetadata = false,\n    this.disableConstructorArgs = false,\n  });\n}\n\n/// A parser for a name-value pair option. Options parsed in\n/// [genericOptionsParser] delegate to instances of this class to\n/// parse the value of a specific option.\nabstract class SingleOptionParser {\n  /// Parse the [name]=[value] value pair and report any errors to [onError]. If\n  /// the option is a flag, [value] will be null. Note, [name] is commonly\n  /// unused. It is provided because [SingleOptionParser] can be registered for\n  /// multiple option names in [genericOptionsParser].\n  void parse(String name, String? value, OnError onError);\n}\n\nclass GrpcOptionParser implements SingleOptionParser {\n  bool grpcEnabled = false;\n\n  @override\n  void parse(String name, String? value, OnError onError) {\n    if (value != null) {\n      onError('Invalid grpc option. No value expected.');\n      return;\n    }\n    grpcEnabled = true;\n  }\n}\n\nclass GenerateMetadataParser implements SingleOptionParser {\n  bool generateKytheInfo = false;\n\n  @override\n  void parse(String name, String? value, OnError onError) {\n    if (value != null) {\n      onError('Invalid generate_kythe_info option. No value expected.');\n      return;\n    }\n    generateKytheInfo = true;\n  }\n}\n\nclass DisableConstructorArgsParser implements SingleOptionParser {\n  bool value = false;\n\n  @override\n  void parse(String name, String? value, OnError onError) {\n    if (value != null) {\n      onError('Invalid disable_constructor_args option. No value expected.');\n      return;\n    }\n    this.value = true;\n  }\n}\n\n/// Parser used by the compiler, which supports the `rpc` option (see\n/// [GrpcOptionParser]) and any additional option added in [parsers]. If\n/// [parsers] has a key for `rpc`, it will be ignored.\nGenerationOptions? parseGenerationOptions(\n  CodeGeneratorRequest request,\n  CodeGeneratorResponse response, [\n  Map<String, SingleOptionParser>? parsers,\n]) {\n  final newParsers = <String, SingleOptionParser>{};\n  if (parsers != null) newParsers.addAll(parsers);\n\n  final grpcOptionParser = GrpcOptionParser();\n  newParsers['grpc'] = grpcOptionParser;\n\n  final generateMetadataParser = GenerateMetadataParser();\n  newParsers['generate_kythe_info'] = generateMetadataParser;\n\n  final disableConstructorArgsParser = DisableConstructorArgsParser();\n  newParsers['disable_constructor_args'] = disableConstructorArgsParser;\n\n  if (genericOptionsParser(request, response, newParsers)) {\n    return GenerationOptions(\n      useGrpc: grpcOptionParser.grpcEnabled,\n      generateMetadata: generateMetadataParser.generateKytheInfo,\n      disableConstructorArgs: disableConstructorArgsParser.value,\n    );\n  }\n  return null;\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/output_config.dart",
    "content": "// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:path/path.dart' as path;\n\n/// Configures where output of the protoc compiler should be placed and how to\n/// import one generated file from another.\nabstract class OutputConfiguration {\n  const OutputConfiguration();\n\n  /// Resolves an import of a generated Dart file.\n  ///\n  /// Both [source] and [target] are .proto files, where [source] imports\n  /// [target].\n  ///\n  /// The returned URI can be used within one of the source's dart files to\n  /// import the target's generated file with the given extension.\n  Uri resolveImport(Uri target, Uri source, String extension);\n\n  /// Returns the path where the .pb.dart file will be placed.\n  ///\n  /// The input is a .proto file and the output is a path under the output\n  /// folder.\n  Uri outputPathFor(Uri inputPath, String extension);\n}\n\n/// Default [OutputConfiguration] that uses the same path as the input\n/// file for the output file (just replaces the extension), and that uses\n/// relative paths to resolve imports.\nclass DefaultOutputConfiguration extends OutputConfiguration {\n  const DefaultOutputConfiguration();\n\n  @override\n  Uri outputPathFor(Uri inputPath, String extension) {\n    final base = path.withoutExtension(path.url.fromUri(inputPath));\n    return path.url.toUri('$base$extension');\n  }\n\n  @override\n  Uri resolveImport(Uri target, Uri source, String extension) {\n    assert(extension.startsWith('.'));\n    final targetPath = path.url.fromUri(target);\n    final wellKnownImport = _wellKnownProtoImport(targetPath, extension);\n    if (wellKnownImport != null) {\n      return path.url.toUri(wellKnownImport);\n    }\n    final sourceDir = path.url.dirname(path.url.fromUri(source));\n    final base = path.withoutExtension(\n      path.url.relative(targetPath, from: sourceDir),\n    );\n    return path.url.toUri('$base$extension');\n  }\n}\n\nconst _wktImportPrefix = 'google/protobuf/';\n\nSet<String> _wellKnownTypeProtoPaths = {\n  '${_wktImportPrefix}any.proto',\n  '${_wktImportPrefix}api.proto',\n  '${_wktImportPrefix}duration.proto',\n  '${_wktImportPrefix}empty.proto',\n  '${_wktImportPrefix}field_mask.proto',\n  '${_wktImportPrefix}source_context.proto',\n  '${_wktImportPrefix}struct.proto',\n  '${_wktImportPrefix}timestamp.proto',\n  '${_wktImportPrefix}type.proto',\n  '${_wktImportPrefix}wrappers.proto',\n};\n\nString? _wellKnownProtoImport(String importPath, String extension) {\n  if (!_wellKnownTypeProtoPaths.contains(importPath)) {\n    return null;\n  }\n  final importPathWithoutExtension = path.withoutExtension(importPath);\n  return 'package:protobuf/well_known_types/$importPathWithoutExtension$extension';\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/paths.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\n/// Utility class for building paths of proto elements: messages, fields, enums, ooneofs.\n/// Each proto element contains a path which is a list of integers.\n/// They way they are constructed described in SourceCodeInfo proto in\n/// https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto\n///\n/// To build a path of an element you need to have path of the parent and call\n/// one of the methods in this class. It will return the new path.\nclass Paths {\n  // The tag numbers match tags in their containing types. For example, _oneofFieldTag = 8 because\n  // its containing descriptor is DescriptorProto which has:\n  // repeated OneofDescriptorProto oneof_decl = 8;\n\n  // Matches FileDescriptorProto.message_type = 4.\n  static final _topLevelMessageTag = 4;\n\n  // Matches DescriptorProto.nested_type = 3.\n  static final _nestedMessageTag = 3;\n\n  // Matches DescriptorProto.field = 2.\n  static final _messageFieldTag = 2;\n\n  // Matches DescriptorProto.oneof_decl = 8.\n  static final _oneofFieldTag = 8;\n\n  static List<int> buildTopLevelMessagePath(\n    List<int> parentPath,\n    int messageIndex,\n  ) {\n    return List.from(parentPath)..addAll([_topLevelMessageTag, messageIndex]);\n  }\n\n  static List<int> buildNestedMessagePath(\n    List<int> parentPath,\n    int messageIndex,\n  ) {\n    return List.from(parentPath)..addAll([_nestedMessageTag, messageIndex]);\n  }\n\n  static List<int> buildFieldPath(List<int> parentPath, ProtobufField field) {\n    return List.from(parentPath)\n      ..addAll([_messageFieldTag, field.sourcePosition!]);\n  }\n\n  static List<int> buildOneofPath(List<int> parentPath, OneofNames oneof) {\n    return List.from(parentPath)..addAll([_oneofFieldTag, oneof.index]);\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/protobuf_field.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\nclass ProtobufField {\n  static final RegExp _hexLiteralRegex = RegExp(\n    r'^0x[0-9a-f]+$',\n    multiLine: false,\n    caseSensitive: false,\n  );\n  static final RegExp _integerLiteralRegex = RegExp(r'^[+-]?[0-9]+$');\n  static final RegExp _decimalLiteralRegexA = RegExp(\n    r'^[+-]?([0-9]*)\\.[0-9]+(e[+-]?[0-9]+)?$',\n    multiLine: false,\n    caseSensitive: false,\n  );\n  static final RegExp _decimalLiteralRegexB = RegExp(\n    r'^[+-]?[0-9]+e[+-]?[0-9]+$',\n    multiLine: false,\n    caseSensitive: false,\n  );\n\n  final FieldDescriptorProto descriptor;\n\n  /// Dart names within a [GeneratedMessage] or `null` for an extension.\n  final FieldNames? memberNames;\n\n  final String fullName;\n  final BaseType baseType;\n  final ProtobufContainer parent;\n  final FeatureSet features;\n\n  ProtobufField.message(\n    FieldNames names,\n    ProtobufContainer parent,\n    FeatureSet inheritFeatures,\n    GenerationContext ctx,\n  ) : this._(names.descriptor, names, parent, inheritFeatures, ctx);\n\n  ProtobufField.extension(\n    FieldDescriptorProto descriptor,\n    ProtobufContainer parent,\n    GenerationContext ctx,\n  ) : this._(descriptor, null, parent, parent.features, ctx);\n\n  ProtobufField._(\n    FieldDescriptorProto descriptor,\n    FieldNames? dartNames,\n    ProtobufContainer parent,\n    FeatureSet inheritFeatures,\n    GenerationContext ctx,\n  ) : this._features(\n        descriptor,\n        resolveFeatures(\n          inheritFeatures,\n          _inferLegacyProtoFeatures(descriptor, parent.fileGen!.edition),\n        ),\n        dartNames,\n        parent,\n        ctx,\n      );\n\n  ProtobufField._features(\n    this.descriptor,\n    this.features,\n    FieldNames? dartNames,\n    this.parent,\n    GenerationContext ctx,\n  ) : memberNames = dartNames,\n      fullName = '${parent.fullName}.${descriptor.name}',\n      baseType = BaseType(descriptor, features, ctx);\n\n  /// The index of this field in MessageGenerator.fieldList.\n  ///\n  /// `null` for an extension.\n  int? get index => memberNames?.index;\n\n  String? get quotedProtoName =>\n      (_unCamelCase(descriptor.jsonName) == descriptor.name)\n          ? null\n          : \"'${descriptor.name}'\";\n\n  /// The position of this field as it appeared in the original\n  /// DescriptorProto.\n  ///\n  /// `null` for an extension.\n  int? get sourcePosition => memberNames?.sourcePosition;\n\n  /// Whether the field is to be encoded with [deprecated = true] encoding.\n  bool get isDeprecated => descriptor.options.deprecated;\n\n  bool get isRequired {\n    return features.fieldPresence == FeatureSet_FieldPresence.LEGACY_REQUIRED;\n  }\n\n  bool get isRepeated =>\n      descriptor.label == FieldDescriptorProto_Label.LABEL_REPEATED;\n\n  /// Whether a numeric field is repeated and must be encoded with packed\n  /// encoding.\n  ///\n  /// In proto3 repeated fields are encoded as packed by default. proto2\n  /// requires `[packed=true]` option.\n  bool get isPacked {\n    if (!isRepeated) {\n      return false; // only repeated fields can be packed\n    }\n\n    if (!baseType.isPackable) {\n      return false;\n    }\n\n    return features.repeatedFieldEncoding ==\n        FeatureSet_RepeatedFieldEncoding.PACKED;\n  }\n\n  /// Whether the field has the `overrideGetter` annotation set to true.\n  bool get overridesGetter => _hasBooleanOption(Dart_options.overrideGetter);\n\n  /// Whether the field has the `overrideSetter` annotation set to true.\n  bool get overridesSetter => _hasBooleanOption(Dart_options.overrideSetter);\n\n  /// Whether the field has the `overrideHasMethod` annotation set to true.\n  bool get overridesHasMethod =>\n      _hasBooleanOption(Dart_options.overrideHasMethod);\n\n  /// Whether the field has the `overrideClearMethod` annotation set to true.\n  bool get overridesClearMethod =>\n      _hasBooleanOption(Dart_options.overrideClearMethod);\n\n  /// Whether this field uses the Int64 from the fixnum package.\n  bool get needsFixnumImport =>\n      baseType.unprefixed == '$fixnumImportPrefix.Int64';\n\n  /// Whether this field is a map field definition:\n  /// `map<key_type, value_type> map_field = N`.\n  bool get isMapField {\n    if (!isRepeated || !baseType.isMessage) return false;\n    final generator = baseType.generator as MessageGenerator;\n    return generator._descriptor.options.mapEntry;\n  }\n\n  /// Whether this field should have a `hazzer` generated.\n  bool get hasPresence {\n    // NB. Map fields are represented as repeated message fields\n    if (isRepeated) return false;\n    return true;\n    // TODO(sigurdm): to provide the correct semantics for non-optional proto3\n    // fields would need something like the following:\n    // return baseType.isMessage ||\n    //   descriptor.proto3Optional ||\n    //   parent.fileGen.descriptor.syntax == \"proto2\";\n    //\n    // This change would break any accidental uses of the proto3 hazzers, and\n    // would require some clean-up.\n    //\n    // We could consider keeping hazzers for proto3-oneof fields. There they\n    // seem useful and not breaking proto3 semantics, and dart protobuf uses it\n    // for example in package:protobuf/src/protobuf/mixins/well_known.dart.\n  }\n\n  /// Returns the type to use for the Dart field type.\n  String getDartType() {\n    if (isMapField) {\n      final keyType = getDartMapKeyType();\n      final valueType = getDartMapValueType();\n      return '$protobufImportPrefix.PbMap<$keyType, $valueType>';\n    }\n    if (isRepeated) return baseType.getRepeatedDartType(parent.fileGen!);\n    return baseType.getDartType(parent.fileGen!);\n  }\n\n  /// Only for map fields: returns the type to use for Dart map field key type.\n  String getDartMapKeyType() {\n    assert(isMapField);\n    return (baseType.generator as MessageGenerator).fieldList[0].baseType\n        .getDartType(parent.fileGen!);\n  }\n\n  /// Only for map fields: returns the type to use for Dart map field value\n  /// type.\n  String getDartMapValueType() {\n    assert(isMapField);\n    return (baseType.generator as MessageGenerator).fieldList[1].baseType\n        .getDartType(parent.fileGen!);\n  }\n\n  /// Returns the tag number of the underlying proto field.\n  int get number => descriptor.number;\n\n  /// Returns the constant in PbFieldType corresponding to this type.\n  String get typeConstant {\n    var prefix = 'O';\n    if (isRequired) {\n      prefix = 'Q';\n    } else if (isPacked) {\n      prefix = 'K';\n    } else if (isRepeated) {\n      prefix = 'P';\n    }\n    return '$protobufImportPrefix.PbFieldType.$prefix${baseType.typeConstantSuffix}';\n  }\n\n  static String _formatArguments(\n    List<String> positionals,\n    Map<String, String?> named,\n  ) {\n    final args = positionals.toList();\n    named.forEach((key, value) {\n      if (value != null) {\n        args.add('$key: $value');\n      }\n    });\n    return args.join(', ');\n  }\n\n  /// Returns Dart code adding this field to a BuilderInfo object.\n  /// The call will start with \"..\" and a method name.\n  void generateBuilderInfoCall(IndentingWriter out, String package) {\n    assert(descriptor.hasJsonName());\n\n    final omitFieldNames = ConditionalConstDefinition('omit_field_names');\n    out.addSuffix(\n      omitFieldNames.constFieldName,\n      omitFieldNames.constDefinition,\n    );\n    final quotedName = omitFieldNames.createTernary(descriptor.jsonName);\n\n    final type = baseType.getDartType(parent.fileGen!);\n\n    String invocation;\n\n    final args = <String>[];\n    final named = <String, String?>{'protoName': quotedProtoName};\n    args.add('$number');\n    args.add(quotedName);\n\n    if (isMapField) {\n      final generator = baseType.generator as MessageGenerator;\n      final key = generator.fieldList[0];\n      final value = generator.fieldList[1];\n\n      // Key type is an integer type or string. No need to specify the default\n      // value as the library knows the defaults for integer and string fields.\n      final keyType = key.baseType.getDartType(parent.fileGen!);\n\n      // Value type can be anything other than another map.\n      final valueType = value.baseType.getDartType(parent.fileGen!);\n\n      invocation = 'm<$keyType, $valueType>';\n\n      named['entryClassName'] = \"'${generator.messageName}'\";\n      named['keyFieldType'] = key.typeConstant;\n      named['valueFieldType'] = value.typeConstant;\n      if (value.baseType.isMessage || value.baseType.isGroup) {\n        named['valueCreator'] = '$valueType.create';\n        named['valueDefaultOrMaker'] = value.generateDefaultFunction();\n      }\n      if (value.baseType.isEnum) {\n        named['valueOf'] = '$valueType.valueOf';\n        named['enumValues'] = '$valueType.values';\n        named['valueDefaultOrMaker'] = value.generateDefaultFunction();\n        named['defaultEnumValue'] = value.generateDefaultFunction();\n      }\n      if (package != '') {\n        named['packageName'] =\n            'const $protobufImportPrefix.PackageName(\\'$package\\')';\n      }\n    } else if (isRepeated) {\n      if (typeConstant == '$protobufImportPrefix.PbFieldType.PS') {\n        invocation = 'pPS';\n      } else if (typeConstant == '$protobufImportPrefix.PbFieldType.PE') {\n        invocation = 'pPE<$type>';\n        named['enumValues'] = '$type.values';\n        final makeDefault = generateDefaultFunction(omitIfFirstEnumValue: true);\n        if (makeDefault != null) {\n          named['defaultEnumValue'] = makeDefault;\n        }\n      } else if (typeConstant == '$protobufImportPrefix.PbFieldType.PM') {\n        invocation = 'pPM<$type>';\n        named['subBuilder'] = '$type.create';\n      } else {\n        args.add(typeConstant);\n        if (baseType.isMessage || baseType.isGroup || baseType.isEnum) {\n          invocation = 'pc<$type>';\n        } else {\n          invocation = 'p<$type>';\n        }\n\n        if (baseType.isMessage || baseType.isGroup) {\n          named['subBuilder'] = '$type.create';\n        } else if (baseType.isEnum) {\n          named['valueOf'] = '$type.valueOf';\n          named['enumValues'] = '$type.values';\n          named['defaultEnumValue'] = generateDefaultFunction();\n        }\n      }\n    } else {\n      // Singular field.\n      final makeDefault = generateDefaultFunction(omitIfFirstEnumValue: true);\n\n      if (baseType.isEnum) {\n        invocation = 'aE<$type>';\n        if (typeConstant != '$protobufImportPrefix.PbFieldType.OE') {\n          named['fieldType'] = typeConstant;\n        }\n        if (makeDefault != null) named['defaultOrMaker'] = makeDefault;\n        named['enumValues'] = '$type.values';\n      } else if (type == '$coreImportPrefix.int') {\n        invocation = 'aI';\n        if (typeConstant != '$protobufImportPrefix.PbFieldType.O3') {\n          named['fieldType'] = typeConstant;\n        }\n        if (makeDefault != null) named['defaultOrMaker'] = makeDefault;\n      } else if (type == '$coreImportPrefix.double') {\n        invocation = 'aD';\n        if (typeConstant != '$protobufImportPrefix.PbFieldType.OD') {\n          named['fieldType'] = typeConstant;\n        }\n        if (makeDefault != null) named['defaultOrMaker'] = makeDefault;\n      } else if (makeDefault == null) {\n        switch (type) {\n          case '$coreImportPrefix.String':\n            if (typeConstant == '$protobufImportPrefix.PbFieldType.OS') {\n              invocation = 'aOS';\n            } else if (typeConstant == '$protobufImportPrefix.PbFieldType.QS') {\n              invocation = 'aQS';\n            } else {\n              invocation = 'a<$type>';\n              args.add(typeConstant);\n            }\n            break;\n          case '$coreImportPrefix.bool':\n            if (typeConstant == '$protobufImportPrefix.PbFieldType.OB') {\n              invocation = 'aOB';\n            } else {\n              invocation = 'a<$type>';\n              args.add(typeConstant);\n            }\n            break;\n          default:\n            invocation = 'a<$type>';\n            args.add(typeConstant);\n            break;\n        }\n      } else {\n        if (makeDefault == '$fixnumImportPrefix.Int64.ZERO' &&\n            type == '$fixnumImportPrefix.Int64' &&\n            typeConstant == '$protobufImportPrefix.PbFieldType.O6') {\n          invocation = 'aInt64';\n        } else {\n          if (baseType.isMessage || baseType.isGroup) {\n            named['subBuilder'] = '$type.create';\n          }\n          if (baseType.isMessage) {\n            invocation = isRequired ? 'aQM<$type>' : 'aOM<$type>';\n          } else {\n            invocation = 'a<$type>';\n            named['defaultOrMaker'] = makeDefault;\n            args.add(typeConstant);\n          }\n        }\n      }\n    }\n\n    final result = '..$invocation(${_formatArguments(args, named)})';\n    out.println(result);\n  }\n\n  /// Returns a Dart expression that evaluates to this field's default value.\n  ///\n  /// Returns \"null\" if unavailable, in which case FieldSet._getDefault()\n  /// should be called instead.\n  String getDefaultExpr() {\n    if (isRepeated) return 'null';\n    switch (descriptor.type) {\n      case FieldDescriptorProto_Type.TYPE_BOOL:\n        return _getDefaultAsBoolExpr('false')!;\n      case FieldDescriptorProto_Type.TYPE_INT32:\n      case FieldDescriptorProto_Type.TYPE_UINT32:\n      case FieldDescriptorProto_Type.TYPE_SINT32:\n      case FieldDescriptorProto_Type.TYPE_FIXED32:\n      case FieldDescriptorProto_Type.TYPE_SFIXED32:\n        return _getDefaultAsInt32Expr('0')!;\n      case FieldDescriptorProto_Type.TYPE_STRING:\n        return _getDefaultAsStringExpr(\"''\")!;\n      default:\n        return 'null';\n    }\n  }\n\n  /// Returns a function expression that returns the field's default value.\n  String? generateDefaultFunction({bool omitIfFirstEnumValue = false}) {\n    switch (descriptor.type) {\n      case FieldDescriptorProto_Type.TYPE_BOOL:\n        return _getDefaultAsBoolExpr(null);\n      case FieldDescriptorProto_Type.TYPE_FLOAT:\n      case FieldDescriptorProto_Type.TYPE_DOUBLE:\n        if (!descriptor.hasDefaultValue()) {\n          return null;\n        } else if ('0.0' == descriptor.defaultValue ||\n            '0' == descriptor.defaultValue) {\n          return null;\n        } else if (descriptor.defaultValue == 'inf') {\n          return '$coreImportPrefix.double.infinity';\n        } else if (descriptor.defaultValue == '-inf') {\n          return '$coreImportPrefix.double.negativeInfinity';\n        } else if (descriptor.defaultValue == 'nan') {\n          return '$coreImportPrefix.double.nan';\n        } else if (_hexLiteralRegex.hasMatch(descriptor.defaultValue)) {\n          return '(${descriptor.defaultValue}).toDouble()';\n        } else if (_integerLiteralRegex.hasMatch(descriptor.defaultValue)) {\n          return '${descriptor.defaultValue}.0';\n        } else if (_decimalLiteralRegexA.hasMatch(descriptor.defaultValue) ||\n            _decimalLiteralRegexB.hasMatch(descriptor.defaultValue)) {\n          return descriptor.defaultValue;\n        }\n        throw _invalidDefaultValue;\n      case FieldDescriptorProto_Type.TYPE_INT32:\n      case FieldDescriptorProto_Type.TYPE_UINT32:\n      case FieldDescriptorProto_Type.TYPE_SINT32:\n      case FieldDescriptorProto_Type.TYPE_FIXED32:\n      case FieldDescriptorProto_Type.TYPE_SFIXED32:\n        return _getDefaultAsInt32Expr(null);\n      case FieldDescriptorProto_Type.TYPE_INT64:\n      case FieldDescriptorProto_Type.TYPE_UINT64:\n      case FieldDescriptorProto_Type.TYPE_SINT64:\n      case FieldDescriptorProto_Type.TYPE_FIXED64:\n      case FieldDescriptorProto_Type.TYPE_SFIXED64:\n        var value = '0';\n        if (descriptor.hasDefaultValue()) value = descriptor.defaultValue;\n        if (value == '0') return '$fixnumImportPrefix.Int64.ZERO';\n        return \"$protobufImportPrefix.parseLongInt('$value')\";\n      case FieldDescriptorProto_Type.TYPE_STRING:\n        return _getDefaultAsStringExpr(null);\n      case FieldDescriptorProto_Type.TYPE_BYTES:\n        if (!descriptor.hasDefaultValue() || descriptor.defaultValue.isEmpty) {\n          return null;\n        }\n        final byteList = descriptor.defaultValue.codeUnits\n            .map((b) => '0x${b.toRadixString(16)}')\n            .join(',');\n        return '() => <$coreImportPrefix.int>[$byteList]';\n      case FieldDescriptorProto_Type.TYPE_GROUP:\n      case FieldDescriptorProto_Type.TYPE_MESSAGE:\n        return '${baseType.getDartType(parent.fileGen!)}.getDefault';\n      case FieldDescriptorProto_Type.TYPE_ENUM:\n        final className = baseType.getDartType(parent.fileGen!);\n        final gen = baseType.generator as EnumGenerator;\n        if (descriptor.hasDefaultValue() &&\n            descriptor.defaultValue.isNotEmpty) {\n          return '$className.${descriptor.defaultValue}';\n        } else if (gen._canonicalValues.isNotEmpty) {\n          if (omitIfFirstEnumValue) return null;\n          return '$className.${gen.dartNames[gen._canonicalValues[0].name]}';\n        }\n        return null;\n      default:\n        throw _typeNotImplemented('generatedDefaultFunction');\n    }\n  }\n\n  String? _getDefaultAsBoolExpr(String? noDefault) {\n    if (descriptor.hasDefaultValue() && 'false' != descriptor.defaultValue) {\n      return descriptor.defaultValue;\n    }\n    return noDefault;\n  }\n\n  String? _getDefaultAsStringExpr(String? noDefault) {\n    if (!descriptor.hasDefaultValue() || descriptor.defaultValue.isEmpty) {\n      return noDefault;\n    }\n\n    return quoted(descriptor.defaultValue);\n  }\n\n  String? _getDefaultAsInt32Expr(String? noDefault) {\n    if (descriptor.hasDefaultValue() && '0' != descriptor.defaultValue) {\n      return descriptor.defaultValue;\n    }\n    return noDefault;\n  }\n\n  bool _hasBooleanOption(Extension extension) =>\n      descriptor.options.getExtension(extension) as bool? ?? false;\n\n  String get _invalidDefaultValue =>\n      'dart-protoc-plugin:'\n      ' invalid default value (${descriptor.defaultValue})'\n      ' found in field $fullName';\n\n  String _typeNotImplemented(String methodName) =>\n      'dart-protoc-plugin:'\n      ' $methodName not implemented for type (${descriptor.type})'\n      ' found in field $fullName';\n\n  static final RegExp _upperCase = RegExp('[A-Z]');\n\n  static String _unCamelCase(String name) {\n    return name.replaceAllMapped(\n      _upperCase,\n      (match) => '_${match.group(0)!.toLowerCase()}',\n    );\n  }\n}\n\nFeatureSet _inferLegacyProtoFeatures(\n  FieldDescriptorProto descriptor,\n  Edition edition,\n) {\n  if (edition.value >= Edition.EDITION_2023.value) {\n    return descriptor.options.features;\n  }\n  final features = FeatureSet();\n  if (descriptor.label == FieldDescriptorProto_Label.LABEL_REQUIRED) {\n    features.fieldPresence = FeatureSet_FieldPresence.LEGACY_REQUIRED;\n  }\n  if (descriptor.type == FieldDescriptorProto_Type.TYPE_GROUP) {\n    features.messageEncoding = FeatureSet_MessageEncoding.DELIMITED;\n  }\n  if (descriptor.options.packed) {\n    features.repeatedFieldEncoding = FeatureSet_RepeatedFieldEncoding.PACKED;\n  }\n  if (edition.value == Edition.EDITION_PROTO3.value &&\n      descriptor.options.hasPacked() &&\n      !descriptor.options.packed) {\n    features.repeatedFieldEncoding = FeatureSet_RepeatedFieldEncoding.EXPANDED;\n  }\n  return features;\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/service_generator.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\nclass ServiceGenerator {\n  final ServiceDescriptorProto _descriptor;\n\n  /// The generator of the .pb.dart file that will contain this service.\n  final FileGenerator fileGen;\n\n  /// The message types needed directly by this service.\n  ///\n  /// The key is the fully qualified name with a leading '.'.\n  /// Populated by [resolve].\n  final Map<String, MessageGenerator> _deps = {};\n\n  /// The message types needed transitively by this service.\n  ///\n  /// The key is the fully qualified name with a leading '.'.\n  /// Populated by [resolve].\n  final Map<String, MessageGenerator> _transitiveDeps = {};\n\n  /// Maps each undefined type to a string describing its location.\n  ///\n  /// Populated by [resolve].\n  final Map<String, String> _undefinedDeps = {};\n\n  final String classname;\n\n  static String serviceBaseName(String originalName) {\n    if (originalName.endsWith('Service')) {\n      return '${originalName}Base'; // avoid: ServiceServiceBase\n    } else {\n      return '${originalName}ServiceBase';\n    }\n  }\n\n  ServiceGenerator(this._descriptor, this.fileGen, Set<String> usedNames)\n    : classname = disambiguateName(\n        serviceBaseName(avoidInitialUnderscore(_descriptor.name)),\n        usedNames,\n        defaultSuffixes(),\n      );\n\n  /// Finds all message types used by this service.\n  ///\n  /// Puts the types found in [_deps] and [_transitiveDeps].\n  /// If a type name can't be resolved, puts it in [_undefinedDeps].\n  /// Precondition: messages have been registered and resolved.\n  void resolve(GenerationContext ctx) {\n    for (final m in _methodDescriptors) {\n      _addDependency(ctx, m.inputType, 'input type of ${m.name}');\n      _addDependency(ctx, m.outputType, 'output type of ${m.name}');\n    }\n    _resolveMoreTypes(ctx);\n  }\n\n  /// Hook for a subclass to register any additional types it uses.\n  void _resolveMoreTypes(GenerationContext ctx) {}\n\n  /// Adds a dependency on the given message type.\n  ///\n  /// If the type name can't be resolved, adds it to [_undefinedDeps].\n  /// If it can, recursively adds the types of its fields as well.\n  void _addDependency(GenerationContext ctx, String fqname, String location) {\n    if (_deps.containsKey(fqname)) return; // Already added.\n\n    final mg = ctx.getFieldType(fqname) as MessageGenerator?;\n    if (mg == null) {\n      _undefinedDeps[fqname] = location;\n      return;\n    }\n    _addDepsRecursively(mg, 0);\n  }\n\n  void _addDepsRecursively(MessageGenerator mg, int depth) {\n    if (_transitiveDeps.containsKey(mg.dottedName)) {\n      // Already added, but perhaps at a different depth.\n      if (depth == 0) _deps[mg.dottedName] = mg;\n      return;\n    }\n    mg.checkResolved();\n    if (depth == 0) _deps[mg.dottedName] = mg;\n    _transitiveDeps[mg.dottedName] = mg;\n    for (final field in mg.fieldList) {\n      if (field.baseType.isGroup || field.baseType.isMessage) {\n        _addDepsRecursively(\n          field.baseType.generator as MessageGenerator,\n          depth + 1,\n        );\n      }\n    }\n  }\n\n  /// Adds dependencies of [generate] to [imports].\n  ///\n  /// For each .pb.dart file that the generated code needs to import,\n  /// add its generator.\n  void addImportsTo(Set<FileGenerator> imports) {\n    for (final mg in _deps.values) {\n      imports.add(mg.fileGen);\n    }\n  }\n\n  /// Adds dependencies of [generateConstants] to [imports].\n  ///\n  /// For each .pbjson.dart file that the generated code needs to import,\n  /// add its generator.\n  void addConstantImportsTo(Set<FileGenerator> imports) {\n    for (final mg in _transitiveDeps.values) {\n      imports.add(mg.fileGen);\n    }\n  }\n\n  /// Returns the Dart class name to use for a message type or throws an\n  /// exception if it can't be resolved.\n  ///\n  /// When generating the main file (if [forMainFile] is true), all imports\n  /// should be prefixed unless the target file is the main file (the client\n  /// generator calls this method). Otherwise, prefix everything.\n  String _getDartClassName(String fqname, {bool forMainFile = false}) {\n    final generator = _deps[fqname];\n    if (generator == null) {\n      final location = _undefinedDeps[fqname];\n      throw 'FAILURE: Unknown type reference ($fqname) for $location';\n    }\n\n    if (forMainFile && fileGen.protoFileUri == generator.fileGen.protoFileUri) {\n      // If it's the same file, we import it without using \"as\".\n      return generator.classname;\n    }\n\n    return '${fileGen.importPrefix(generator)}.${generator.classname}';\n  }\n\n  List<MethodDescriptorProto> get _methodDescriptors => _descriptor.method;\n\n  String _methodName(String name) => lowerCaseFirstLetter(name);\n\n  void _generateStub(IndentingWriter out, MethodDescriptorProto m) {\n    final methodName = _methodName(m.name);\n    final inputClass = _getDartClassName(m.inputType);\n    final outputClass = _getDartClassName(m.outputType);\n\n    out.println(\n      '$_future<$outputClass> $methodName('\n      '$_serverContext ctx, $inputClass request);',\n    );\n  }\n\n  void _generateStubs(IndentingWriter out) {\n    for (final m in _methodDescriptors) {\n      _generateStub(out, m);\n    }\n    out.println();\n  }\n\n  void _generateRequestMethod(IndentingWriter out) {\n    out.addBlock(\n      '$_generatedMessage createRequest($coreImportPrefix.String methodName) {',\n      '}',\n      () {\n        out.addBlock('switch (methodName) {', '}', () {\n          for (final m in _methodDescriptors) {\n            final inputClass = _getDartClassName(m.inputType);\n            out.println(\"case '${m.name}': return $inputClass();\");\n          }\n          out.println(\n            'default: '\n            \"throw $coreImportPrefix.ArgumentError('Unknown method: \\$methodName');\",\n          );\n        });\n      },\n    );\n    out.println();\n  }\n\n  void _generateDispatchMethod(IndentingWriter out) {\n    out.addBlock(\n      '$_future<$_generatedMessage> handleCall($_serverContext ctx, '\n          '$coreImportPrefix.String methodName, $_generatedMessage request) {',\n      '}',\n      () {\n        out.addBlock('switch (methodName) {', '}', () {\n          for (final m in _methodDescriptors) {\n            final methodName = _methodName(m.name);\n            final inputClass = _getDartClassName(m.inputType);\n            out.println(\n              \"case '${m.name}': \"\n              'return $methodName(ctx, request as $inputClass);',\n            );\n          }\n          out.println(\n            'default: throw $coreImportPrefix.ArgumentError('\n            \"'Unknown method: \\$methodName');\",\n          );\n        });\n      },\n    );\n    out.println();\n  }\n\n  /// Hook for generating members added in subclasses.\n  void _generateMoreClassMembers(IndentingWriter out) {}\n\n  void generate(IndentingWriter out) {\n    out.addBlock(\n      'abstract class $classname extends '\n          '$_generatedService {',\n      '}',\n      () {\n        _generateStubs(out);\n        _generateRequestMethod(out);\n        _generateDispatchMethod(out);\n        _generateMoreClassMembers(out);\n        out.println(\n          '$coreImportPrefix.Map<$coreImportPrefix.String, $coreImportPrefix.dynamic> get \\$json => $jsonConstant;',\n        );\n        out.println(\n          '$coreImportPrefix.Map<$coreImportPrefix.String, $coreImportPrefix.Map<$coreImportPrefix.String,'\n          ' $coreImportPrefix.dynamic>> get \\$messageJson => $messageJsonConstant;',\n        );\n      },\n    );\n    out.println();\n  }\n\n  String get jsonConstant => '$classname\\$json';\n  String get messageJsonConstant => '$classname\\$messageJson';\n\n  /// Writes Dart constants for the service and message descriptors.\n  ///\n  /// The map includes an entry for every message type that might need\n  /// to be read or written (assuming the type name resolved).\n  void generateConstants(IndentingWriter out) {\n    out.print(\n      'const $coreImportPrefix.Map<$coreImportPrefix.String,'\n      ' $coreImportPrefix.dynamic> $jsonConstant = ',\n    );\n    writeJsonConst(out, _descriptor.writeToJsonMap());\n    out.println(';');\n    out.println();\n\n    final typeConstants = <String, String>{};\n    for (final key in _transitiveDeps.keys) {\n      typeConstants[key] = _transitiveDeps[key]!.getJsonConstant(fileGen);\n    }\n\n    out.println(\n      '@$coreImportPrefix.Deprecated'\n      '(\\'Use $binaryDescriptorName instead\\')',\n    );\n    out.addBlock(\n      'const $coreImportPrefix.Map<$coreImportPrefix.String,'\n          ' $coreImportPrefix.Map<$coreImportPrefix.String,'\n          ' $coreImportPrefix.dynamic>> $messageJsonConstant = {',\n      '};',\n      () {\n        for (final key in typeConstants.keys) {\n          final typeConst = typeConstants[key];\n          out.println(\"'$key': $typeConst,\");\n        }\n      },\n    );\n    out.println();\n\n    if (_undefinedDeps.isNotEmpty) {\n      for (final name in _undefinedDeps.keys) {\n        final location = _undefinedDeps[name];\n        out.println(\"// can't resolve ($name) used by $location\");\n      }\n      out.println();\n    }\n  }\n\n  String get binaryDescriptorName {\n    var prefix = lowerCaseFirstLetter(classname);\n    if (prefix.endsWith('Base')) {\n      prefix = prefix.substring(0, prefix.length - 4);\n    }\n    return '${prefix}Descriptor';\n  }\n\n  static final String _future = '$asyncImportPrefix.Future';\n  static final String _generatedMessage =\n      '$protobufImportPrefix.GeneratedMessage';\n  static final String _serverContext = '$protobufImportPrefix.ServerContext';\n  static final String _generatedService =\n      '$protobufImportPrefix.GeneratedService';\n}\n"
  },
  {
    "path": "protoc_plugin/lib/src/shared.dart",
    "content": "// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert';\nimport 'dart:io';\n\nimport '../protoc.dart';\nimport '../src/gen/google/protobuf/descriptor.pb.dart';\n\nconst protobufImportPrefix = r'$pb';\nconst asyncImportPrefix = r'$async';\nconst coreImportPrefix = r'$core';\nconst grpcImportPrefix = r'$grpc';\nconst fixnumImportPrefix = r'$fixnum';\nconst mixinImportPrefix = r'$mixin';\n\nextension FileDescriptorProtoExt on FileGenerator {\n  bool _listEquals(List<int> a, List<int> b) {\n    if (a.length != b.length) {\n      return false;\n    }\n    // Note: paths are much likely to share common prefixes than to share common\n    // suffixes, so it's probably faster to run this loop backwards ;)\n    for (var i = a.length - 1; i >= 0; i--) {\n      if (a[i] != b[i]) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /// Convert leading comments of a definition at [path] to Dart doc comment\n  /// syntax.\n  ///\n  /// This never returns an empty string: if the comment is empty it returns\n  /// `null`.\n  ///\n  /// The output can contain multiple lines. None of the lines will have\n  /// trailing whitespace.\n  String? commentBlock(List<int> path) {\n    SourceCodeInfo_Location? singleMatch;\n    for (final location in descriptor.sourceCodeInfo.location) {\n      if (_listEquals(location.path, path)) {\n        if (singleMatch == null) {\n          singleMatch = location;\n        } else {\n          // TODO: evaluate if we should just concatenate all of the matching\n          // entries.\n          stderr.writeln('Too many source code locations. Skipping.');\n          return null;\n        }\n      }\n    }\n\n    if (singleMatch != null) {\n      return toDartComment(singleMatch.leadingComments);\n    }\n\n    return null;\n  }\n}\n\n/// Convert a comment to Dart doc comment syntax.\n///\n/// This is the internal method for [FileDescriptorProtoExt.commentBlock],\n/// public to be able to test.\nString? toDartComment(String value) {\n  // TODO: Handle converting proto references to Dart references.\n  // \"[Foo][google.firestore.v1.Foo]\" => to either \"`Foo`\" or \"[Foo]\".\n\n  if (value.isEmpty) return null;\n\n  var lines = LineSplitter.split(value).toList();\n\n  // Find any leading spaces in the first line. If all of the lines have the\n  // same leading spaces, remove them all.\n  final leadingSpaces = _leadingSpaces.firstMatch(lines.first);\n  if (leadingSpaces != null) {\n    final prefix = leadingSpaces.group(0)!;\n    if (lines.every((line) => line.isEmpty || line.startsWith(prefix))) {\n      lines =\n          lines\n              .map(\n                (line) => line.isEmpty ? line : line.substring(prefix.length),\n              )\n              .toList();\n    }\n  }\n\n  // Remove empty, trailing lines.\n  while (lines.isNotEmpty && lines.last.trim().isEmpty) {\n    lines.removeLast();\n  }\n\n  // Don't generate a documentation comment if all lines are empty.\n  if (lines.isEmpty) {\n    return null;\n  }\n\n  return lines.map((e) => '/// $e'.trimRight()).join('\\n');\n}\n\nfinal _leadingSpaces = RegExp('^ +');\n"
  },
  {
    "path": "protoc_plugin/lib/src/well_known_types.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\npart of '../protoc.dart';\n\nPbMixin? wellKnownMixinForFullName(String qualifiedName) =>\n    _wellKnownMixins[qualifiedName];\n\nconst _wellKnownImportPath =\n    'package:protobuf/src/protobuf/mixins/well_known.dart';\n\nconst _wellKnownMixins = {\n  'google.protobuf.Any': PbMixin(\n    'AnyMixin',\n    importFrom: _wellKnownImportPath,\n    injectedHelpers: [\n      '''\n/// Creates a new [Any] encoding [message].\n///\n/// The [typeUrl] will be [typeUrlPrefix]/`fullName` where `fullName` is\n/// the fully qualified name of the type of [message].\nstatic Any pack($protobufImportPrefix.GeneratedMessage message,\n{$coreImportPrefix.String typeUrlPrefix = 'type.googleapis.com'}) {\n  final result = create();\n  $mixinImportPrefix.AnyMixin.packIntoAny(result, message,\n      typeUrlPrefix: typeUrlPrefix);\n  return result;\n}''',\n    ],\n    wellKnownType: 'any',\n  ),\n  'google.protobuf.Timestamp': PbMixin(\n    'TimestampMixin',\n    importFrom: _wellKnownImportPath,\n    injectedHelpers: [\n      '''\n/// Creates a new instance from [dateTime].\n///\n/// Time zone information will not be preserved.\nstatic Timestamp fromDateTime($coreImportPrefix.DateTime dateTime) {\n  final result = create();\n  $mixinImportPrefix.TimestampMixin.setFromDateTime(result, dateTime);\n  return result;\n}''',\n    ],\n    wellKnownType: 'timestamp',\n  ),\n  'google.protobuf.Duration': PbMixin(\n    'DurationMixin',\n    importFrom: _wellKnownImportPath,\n    injectedHelpers: [\n      '''\n/// Converts the [Duration] to [$coreImportPrefix.Duration].\n///\n/// This is a lossy conversion, as [$coreImportPrefix.Duration] is limited to [int]\n/// microseconds and also does not support nanosecond precision.\n$coreImportPrefix.Duration toDart() =>\n  $coreImportPrefix.Duration(\n    seconds: seconds.toInt(),\n    microseconds: nanos ~/ 1000,\n  );\n\n/// Creates a new instance from [$coreImportPrefix.Duration].\nstatic Duration fromDart($coreImportPrefix.Duration duration) => Duration()\n  ..seconds = $fixnumImportPrefix.Int64(duration.inSeconds)\n  ..nanos = (duration.inMicroseconds % $coreImportPrefix.Duration.microsecondsPerSecond) * 1000;\n''',\n    ],\n    wellKnownType: 'duration',\n  ),\n  'google.protobuf.Struct': PbMixin(\n    'StructMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'struct',\n  ),\n  'google.protobuf.Value': PbMixin(\n    'ValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'value',\n  ),\n  'google.protobuf.ListValue': PbMixin(\n    'ListValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'listValue',\n  ),\n  'google.protobuf.DoubleValue': PbMixin(\n    'DoubleValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'doubleValue',\n  ),\n  'google.protobuf.FloatValue': PbMixin(\n    'FloatValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'floatValue',\n  ),\n  'google.protobuf.Int64Value': PbMixin(\n    'Int64ValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'int64Value',\n  ),\n  'google.protobuf.UInt64Value': PbMixin(\n    'UInt64ValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'uint64Value',\n  ),\n  'google.protobuf.Int32Value': PbMixin(\n    'Int32ValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'int32Value',\n  ),\n  'google.protobuf.UInt32Value': PbMixin(\n    'UInt32ValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'uint32Value',\n  ),\n  'google.protobuf.BoolValue': PbMixin(\n    'BoolValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'boolValue',\n  ),\n  'google.protobuf.StringValue': PbMixin(\n    'StringValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'stringValue',\n  ),\n  'google.protobuf.BytesValue': PbMixin(\n    'BytesValueMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'bytesValue',\n  ),\n  'google.protobuf.FieldMask': PbMixin(\n    'FieldMaskMixin',\n    importFrom: _wellKnownImportPath,\n    wellKnownType: 'fieldMask',\n  ),\n};\n"
  },
  {
    "path": "protoc_plugin/lib/string_escape.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n/// Returns a quoted version of [input] with contents escaped as a Dart literal.\nString quoted(String input) {\n  final sb = StringBuffer();\n  for (final r in input.runes) {\n    sb.write(_escapeCharacter(r));\n  }\n  return '\\'${sb.toString()}\\'';\n}\n\n/// Escapes [char] such that it will have it's own value in a single\n/// quoted dart string.\nString _escapeCharacter(int char) {\n  // Handle characters with a specific escape.\n  const tab = 9;\n  const bell = 8;\n  const newline = 10;\n  const verticalTab = 11;\n  const ret = 13;\n  const dollar = 36;\n  const singleQuote = 39;\n  const backslash = 92;\n  switch (char) {\n    case backslash:\n      return r'\\\\';\n    case tab:\n      return r'\\t';\n    case verticalTab:\n      return r'\\v';\n    case bell:\n      return r'\\b';\n    case newline:\n      return r'\\n';\n    case ret:\n      return r'\\r';\n    case singleQuote:\n      return r\"\\'\";\n    case dollar:\n      return r'\\$';\n  }\n  // use \\xcc to represent other non-printable characters.\n  if (char < 32) return '\\\\x${char.toRadixString(16).padLeft(2, '0')}';\n  return String.fromCharCode(char);\n}\n"
  },
  {
    "path": "protoc_plugin/lib/testing/mixins.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nmixin Mixin1 {\n  String get overriddenString => 'mixin1';\n\n  String get interfaceString;\n  set interfaceString(String string);\n  bool hasInterfaceString();\n}\n\nmixin Mixin2 {\n  String get overriddenString => 'mixin2';\n\n  bool hasOverriddenHasMethod() => false;\n}\n\nmixin Mixin3 {}\n"
  },
  {
    "path": "protoc_plugin/protos/README.md",
    "content": "## What's this?\n\nThese are core protos that are used in the protoc_plugin generator. They allow\nus to read generation requests from the protoc tool as well as parse extensions\nfrom protos for things like gRPC generation parameter and other config\ninformation.\n\n## Regenerating\n\nTo regenerate the Dart code from the current protos, run:\n\n```\nmake update-pregenerated\n```\n\nThis will generate the associated Dart code in `lib/src/gen/`.\n\n## Updating the protos\n\nTo update the vendored protos to the most recent versions, run:\n`dart tool/update_protos.dart`. Then, run `make update-pregenerated` to rebuild\nthe Dart libraries in `lib/src/gen/`.\n\nThe contents of `google/protobuf/` can be found at \nhttps://github.com/protocolbuffers/protobuf/tree/main/src/google/protobuf.\n\nAll other 'google' protos can be found at\nhttps://github.com/googleapis/googleapis/tree/master/google.\n\n`dart_options.proto` is hand-maintained.\n"
  },
  {
    "path": "protoc_plugin/protos/dart_options.proto",
    "content": "// Experimental options controlling Dart code generation.\nsyntax = \"proto2\";\n\npackage dart_options;\n\n// This file must be modified for Google internal use, because custom options\n// only work when the package name agrees with the version of protoc we are\n// using (the import statement and \"google.protobuf.\" prefix need to be\n// changed).\n\nimport \"google/protobuf/descriptor.proto\";\n\n// A mixin that can be used in the 'with' clause of the generated Dart class\n// for a proto message.\nmessage DartMixin {\n  // The name of the mixin class.\n  optional string name = 1;\n\n  // A URI pointing to the Dart library that defines the mixin.\n  // The generated Dart code will use this in an import statement.\n  optional string import_from = 2;\n\n  // The name of another mixin to be applied ahead of this one.\n  // The generated class for the message will inherit from all mixins\n  // in the parent chain.\n  optional string parent = 3;\n}\n\n// Defines additional Dart imports to be used with messages in this file.\nmessage Imports {\n  // Mixins to be used on messages in this file.\n  // These mixins are in addition to internally defined mixins (e.g PbMapMixin)\n  // and may override them.\n  //\n  // Warning: mixins are experimental. The protoc Dart plugin doesn't check\n  // for name conflicts between mixin class members and generated class members,\n  // so the generated code may contain errors. Therefore, running dartanalyzer\n  // on the generated file is a good idea.\n  repeated DartMixin mixins = 1;\n}\n\nextend google.protobuf.FileOptions {\n  optional Imports imports = 28125061;\n\n  // Applies the named mixin to all messages in this file.\n  // (May be overridden by the \"mixin\" option on a message.)\n  // For now, \"PbMapMixin\" is the only available mixin.\n  optional string default_mixin = 96128839;\n}\n\nextend google.protobuf.MessageOptions {\n  // Applies the named mixin.\n  // For now, \"PbMapMixin\" is the only available mixin.\n  // The empty string can be used to turn off mixins for this message.\n  optional string mixin = 96128839;\n}\n\nextend google.protobuf.FieldOptions {\n  // Adds @override annotation to the field's getter (for use with mixins).\n  optional bool override_getter = 28205290;\n\n  // Adds @override annotation to the field's setter (for use with mixins).\n  optional bool override_setter = 28937366;\n\n  // Adds @override annotation to the field's hasX() method (for use with\n  // mixins).\n  optional bool override_has_method = 28937461;\n\n  // Adds @override annotation to the field's clearX() method (for use with\n  // mixins).\n  optional bool override_clear_method = 28907907;\n\n  // Uses the given name for getters, setters and as suffixes for has/clear\n  // methods in the generated Dart file. Should be lowerCamelCase.\n  optional string dart_name = 28700919;\n}\n"
  },
  {
    "path": "protoc_plugin/protos/google/api/client.proto",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nsyntax = \"proto3\";\n\npackage google.api;\n\nimport \"google/api/launch_stage.proto\";\nimport \"google/protobuf/descriptor.proto\";\nimport \"google/protobuf/duration.proto\";\n\noption go_package = \"google.golang.org/genproto/googleapis/api/annotations;annotations\";\noption java_multiple_files = true;\noption java_outer_classname = \"ClientProto\";\noption java_package = \"com.google.api\";\noption objc_class_prefix = \"GAPI\";\n\nextend google.protobuf.MethodOptions {\n  // A definition of a client library method signature.\n  //\n  // In client libraries, each proto RPC corresponds to one or more methods\n  // which the end user is able to call, and calls the underlying RPC.\n  // Normally, this method receives a single argument (a struct or instance\n  // corresponding to the RPC request object). Defining this field will\n  // add one or more overloads providing flattened or simpler method signatures\n  // in some languages.\n  //\n  // The fields on the method signature are provided as a comma-separated\n  // string.\n  //\n  // For example, the proto RPC and annotation:\n  //\n  //   rpc CreateSubscription(CreateSubscriptionRequest)\n  //       returns (Subscription) {\n  //     option (google.api.method_signature) = \"name,topic\";\n  //   }\n  //\n  // Would add the following Java overload (in addition to the method accepting\n  // the request object):\n  //\n  //   public final Subscription createSubscription(String name, String topic)\n  //\n  // The following backwards-compatibility guidelines apply:\n  //\n  //   * Adding this annotation to an unannotated method is backwards\n  //     compatible.\n  //   * Adding this annotation to a method which already has existing\n  //     method signature annotations is backwards compatible if and only if\n  //     the new method signature annotation is last in the sequence.\n  //   * Modifying or removing an existing method signature annotation is\n  //     a breaking change.\n  //   * Re-ordering existing method signature annotations is a breaking\n  //     change.\n  repeated string method_signature = 1051;\n}\n\nextend google.protobuf.ServiceOptions {\n  // The hostname for this service.\n  // This should be specified with no prefix or protocol.\n  //\n  // Example:\n  //\n  //   service Foo {\n  //     option (google.api.default_host) = \"foo.googleapi.com\";\n  //     ...\n  //   }\n  string default_host = 1049;\n\n  // OAuth scopes needed for the client.\n  //\n  // Example:\n  //\n  //   service Foo {\n  //     option (google.api.oauth_scopes) = \\\n  //       \"https://www.googleapis.com/auth/cloud-platform\";\n  //     ...\n  //   }\n  //\n  // If there is more than one scope, use a comma-separated string:\n  //\n  // Example:\n  //\n  //   service Foo {\n  //     option (google.api.oauth_scopes) = \\\n  //       \"https://www.googleapis.com/auth/cloud-platform,\"\n  //       \"https://www.googleapis.com/auth/monitoring\";\n  //     ...\n  //   }\n  string oauth_scopes = 1050;\n\n  // The API version of this service, which should be sent by version-aware\n  // clients to the service. This allows services to abide by the schema and\n  // behavior of the service at the time this API version was deployed.\n  // The format of the API version must be treated as opaque by clients.\n  // Services may use a format with an apparent structure, but clients must\n  // not rely on this to determine components within an API version, or attempt\n  // to construct other valid API versions. Note that this is for upcoming\n  // functionality and may not be implemented for all services.\n  //\n  // Example:\n  //\n  //   service Foo {\n  //     option (google.api.api_version) = \"v1_20230821_preview\";\n  //   }\n  string api_version = 525000001;\n}\n\n// Required information for every language.\nmessage CommonLanguageSettings {\n  // Link to automatically generated reference documentation.  Example:\n  // https://cloud.google.com/nodejs/docs/reference/asset/latest\n  string reference_docs_uri = 1 [deprecated = true];\n\n  // The destination where API teams want this client library to be published.\n  repeated ClientLibraryDestination destinations = 2;\n\n  // Configuration for which RPCs should be generated in the GAPIC client.\n  SelectiveGapicGeneration selective_gapic_generation = 3;\n}\n\n// Details about how and where to publish client libraries.\nmessage ClientLibrarySettings {\n  // Version of the API to apply these settings to. This is the full protobuf\n  // package for the API, ending in the version element.\n  // Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".\n  string version = 1;\n\n  // Launch stage of this version of the API.\n  LaunchStage launch_stage = 2;\n\n  // When using transport=rest, the client request will encode enums as\n  // numbers rather than strings.\n  bool rest_numeric_enums = 3;\n\n  // Settings for legacy Java features, supported in the Service YAML.\n  JavaSettings java_settings = 21;\n\n  // Settings for C++ client libraries.\n  CppSettings cpp_settings = 22;\n\n  // Settings for PHP client libraries.\n  PhpSettings php_settings = 23;\n\n  // Settings for Python client libraries.\n  PythonSettings python_settings = 24;\n\n  // Settings for Node client libraries.\n  NodeSettings node_settings = 25;\n\n  // Settings for .NET client libraries.\n  DotnetSettings dotnet_settings = 26;\n\n  // Settings for Ruby client libraries.\n  RubySettings ruby_settings = 27;\n\n  // Settings for Go client libraries.\n  GoSettings go_settings = 28;\n}\n\n// This message configures the settings for publishing [Google Cloud Client\n// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)\n// generated from the service config.\nmessage Publishing {\n  // A list of API method settings, e.g. the behavior for methods that use the\n  // long-running operation pattern.\n  repeated MethodSettings method_settings = 2;\n\n  // Link to a *public* URI where users can report issues.  Example:\n  // https://issuetracker.google.com/issues/new?component=190865&template=1161103\n  string new_issue_uri = 101;\n\n  // Link to product home page.  Example:\n  // https://cloud.google.com/asset-inventory/docs/overview\n  string documentation_uri = 102;\n\n  // Used as a tracking tag when collecting data about the APIs developer\n  // relations artifacts like docs, packages delivered to package managers,\n  // etc.  Example: \"speech\".\n  string api_short_name = 103;\n\n  // GitHub label to apply to issues and pull requests opened for this API.\n  string github_label = 104;\n\n  // GitHub teams to be added to CODEOWNERS in the directory in GitHub\n  // containing source code for the client libraries for this API.\n  repeated string codeowner_github_teams = 105;\n\n  // A prefix used in sample code when demarking regions to be included in\n  // documentation.\n  string doc_tag_prefix = 106;\n\n  // For whom the client library is being published.\n  ClientLibraryOrganization organization = 107;\n\n  // Client library settings.  If the same version string appears multiple\n  // times in this list, then the last one wins.  Settings from earlier\n  // settings with the same version string are discarded.\n  repeated ClientLibrarySettings library_settings = 109;\n\n  // Optional link to proto reference documentation.  Example:\n  // https://cloud.google.com/pubsub/lite/docs/reference/rpc\n  string proto_reference_documentation_uri = 110;\n\n  // Optional link to REST reference documentation.  Example:\n  // https://cloud.google.com/pubsub/lite/docs/reference/rest\n  string rest_reference_documentation_uri = 111;\n}\n\n// Settings for Java client libraries.\nmessage JavaSettings {\n  // The package name to use in Java. Clobbers the java_package option\n  // set in the protobuf. This should be used **only** by APIs\n  // who have already set the language_settings.java.package_name\" field\n  // in gapic.yaml. API teams should use the protobuf java_package option\n  // where possible.\n  //\n  // Example of a YAML configuration::\n  //\n  //  publishing:\n  //    java_settings:\n  //      library_package: com.google.cloud.pubsub.v1\n  string library_package = 1;\n\n  // Configure the Java class name to use instead of the service's for its\n  // corresponding generated GAPIC client. Keys are fully-qualified\n  // service names as they appear in the protobuf (including the full\n  // the language_settings.java.interface_names\" field in gapic.yaml. API\n  // teams should otherwise use the service name as it appears in the\n  // protobuf.\n  //\n  // Example of a YAML configuration::\n  //\n  //  publishing:\n  //    java_settings:\n  //      service_class_names:\n  //        - google.pubsub.v1.Publisher: TopicAdmin\n  //        - google.pubsub.v1.Subscriber: SubscriptionAdmin\n  map<string, string> service_class_names = 2;\n\n  // Some settings.\n  CommonLanguageSettings common = 3;\n}\n\n// Settings for C++ client libraries.\nmessage CppSettings {\n  // Some settings.\n  CommonLanguageSettings common = 1;\n}\n\n// Settings for Php client libraries.\nmessage PhpSettings {\n  // Some settings.\n  CommonLanguageSettings common = 1;\n}\n\n// Settings for Python client libraries.\nmessage PythonSettings {\n  // Experimental features to be included during client library generation.\n  // These fields will be deprecated once the feature graduates and is enabled\n  // by default.\n  message ExperimentalFeatures {\n    // Enables generation of asynchronous REST clients if `rest` transport is\n    // enabled. By default, asynchronous REST clients will not be generated.\n    // This feature will be enabled by default 1 month after launching the\n    // feature in preview packages.\n    bool rest_async_io_enabled = 1;\n\n    // Enables generation of protobuf code using new types that are more\n    // Pythonic which are included in `protobuf>=5.29.x`. This feature will be\n    // enabled by default 1 month after launching the feature in preview\n    // packages.\n    bool protobuf_pythonic_types_enabled = 2;\n\n    // Disables generation of an unversioned Python package for this client\n    // library. This means that the module names will need to be versioned in\n    // import statements. For example `import google.cloud.library_v2` instead\n    // of `import google.cloud.library`.\n    bool unversioned_package_disabled = 3;\n  }\n\n  // Some settings.\n  CommonLanguageSettings common = 1;\n\n  // Experimental features to be included during client library generation.\n  ExperimentalFeatures experimental_features = 2;\n}\n\n// Settings for Node client libraries.\nmessage NodeSettings {\n  // Some settings.\n  CommonLanguageSettings common = 1;\n}\n\n// Settings for Dotnet client libraries.\nmessage DotnetSettings {\n  // Some settings.\n  CommonLanguageSettings common = 1;\n\n  // Map from original service names to renamed versions.\n  // This is used when the default generated types\n  // would cause a naming conflict. (Neither name is\n  // fully-qualified.)\n  // Example: Subscriber to SubscriberServiceApi.\n  map<string, string> renamed_services = 2;\n\n  // Map from full resource types to the effective short name\n  // for the resource. This is used when otherwise resource\n  // named from different services would cause naming collisions.\n  // Example entry:\n  // \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"\n  map<string, string> renamed_resources = 3;\n\n  // List of full resource types to ignore during generation.\n  // This is typically used for API-specific Location resources,\n  // which should be handled by the generator as if they were actually\n  // the common Location resources.\n  // Example entry: \"documentai.googleapis.com/Location\"\n  repeated string ignored_resources = 4;\n\n  // Namespaces which must be aliased in snippets due to\n  // a known (but non-generator-predictable) naming collision\n  repeated string forced_namespace_aliases = 5;\n\n  // Method signatures (in the form \"service.method(signature)\")\n  // which are provided separately, so shouldn't be generated.\n  // Snippets *calling* these methods are still generated, however.\n  repeated string handwritten_signatures = 6;\n}\n\n// Settings for Ruby client libraries.\nmessage RubySettings {\n  // Some settings.\n  CommonLanguageSettings common = 1;\n}\n\n// Settings for Go client libraries.\nmessage GoSettings {\n  // Some settings.\n  CommonLanguageSettings common = 1;\n\n  // Map of service names to renamed services. Keys are the package relative\n  // service names and values are the name to be used for the service client\n  // and call options.\n  //\n  // publishing:\n  //   go_settings:\n  //     renamed_services:\n  //       Publisher: TopicAdmin\n  map<string, string> renamed_services = 2;\n}\n\n// Describes the generator configuration for a method.\nmessage MethodSettings {\n  // Describes settings to use when generating API methods that use the\n  // long-running operation pattern.\n  // All default values below are from those used in the client library\n  // generators (e.g.\n  // [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).\n  message LongRunning {\n    // Initial delay after which the first poll request will be made.\n    // Default value: 5 seconds.\n    google.protobuf.Duration initial_poll_delay = 1;\n\n    // Multiplier to gradually increase delay between subsequent polls until it\n    // reaches max_poll_delay.\n    // Default value: 1.5.\n    float poll_delay_multiplier = 2;\n\n    // Maximum time between two subsequent poll requests.\n    // Default value: 45 seconds.\n    google.protobuf.Duration max_poll_delay = 3;\n\n    // Total polling timeout.\n    // Default value: 5 minutes.\n    google.protobuf.Duration total_poll_timeout = 4;\n  }\n\n  // The fully qualified name of the method, for which the options below apply.\n  // This is used to find the method to apply the options.\n  //\n  // Example:\n  //\n  //    publishing:\n  //      method_settings:\n  //      - selector: google.storage.control.v2.StorageControl.CreateFolder\n  //        # method settings for CreateFolder...\n  string selector = 1;\n\n  // Describes settings to use for long-running operations when generating\n  // API methods for RPCs. Complements RPCs that use the annotations in\n  // google/longrunning/operations.proto.\n  //\n  // Example of a YAML configuration::\n  //\n  //    publishing:\n  //      method_settings:\n  //      - selector: google.cloud.speech.v2.Speech.BatchRecognize\n  //        long_running:\n  //          initial_poll_delay: 60s # 1 minute\n  //          poll_delay_multiplier: 1.5\n  //          max_poll_delay: 360s # 6 minutes\n  //          total_poll_timeout: 54000s # 90 minutes\n  LongRunning long_running = 2;\n\n  // List of top-level fields of the request message, that should be\n  // automatically populated by the client libraries based on their\n  // (google.api.field_info).format. Currently supported format: UUID4.\n  //\n  // Example of a YAML configuration:\n  //\n  //    publishing:\n  //      method_settings:\n  //      - selector: google.example.v1.ExampleService.CreateExample\n  //        auto_populated_fields:\n  //        - request_id\n  repeated string auto_populated_fields = 3;\n}\n\n// The organization for which the client libraries are being published.\n// Affects the url where generated docs are published, etc.\nenum ClientLibraryOrganization {\n  // Not useful.\n  CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0;\n\n  // Google Cloud Platform Org.\n  CLOUD = 1;\n\n  // Ads (Advertising) Org.\n  ADS = 2;\n\n  // Photos Org.\n  PHOTOS = 3;\n\n  // Street View Org.\n  STREET_VIEW = 4;\n\n  // Shopping Org.\n  SHOPPING = 5;\n\n  // Geo Org.\n  GEO = 6;\n\n  // Generative AI - https://developers.generativeai.google\n  GENERATIVE_AI = 7;\n}\n\n// To where should client libraries be published?\nenum ClientLibraryDestination {\n  // Client libraries will neither be generated nor published to package\n  // managers.\n  CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0;\n\n  // Generate the client library in a repo under github.com/googleapis,\n  // but don't publish it to package managers.\n  GITHUB = 10;\n\n  // Publish the library to package managers like nuget.org and npmjs.com.\n  PACKAGE_MANAGER = 20;\n}\n\n// This message is used to configure the generation of a subset of the RPCs in\n// a service for client libraries.\nmessage SelectiveGapicGeneration {\n  // An allowlist of the fully qualified names of RPCs that should be included\n  // on public client surfaces.\n  repeated string methods = 1;\n\n  // Setting this to true indicates to the client generators that methods\n  // that would be excluded from the generation should instead be generated\n  // in a way that indicates these methods should not be consumed by\n  // end users. How this is expressed is up to individual language\n  // implementations to decide. Some examples may be: added annotations,\n  // obfuscated identifiers, or other language idiomatic patterns.\n  bool generate_omitted_as_internal = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/protos/google/api/http.proto",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nsyntax = \"proto3\";\n\npackage google.api;\n\noption go_package = \"google.golang.org/genproto/googleapis/api/annotations;annotations\";\noption java_multiple_files = true;\noption java_outer_classname = \"HttpProto\";\noption java_package = \"com.google.api\";\noption objc_class_prefix = \"GAPI\";\n\n// Defines the HTTP configuration for an API service. It contains a list of\n// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method\n// to one or more HTTP REST API methods.\nmessage Http {\n  // A list of HTTP configuration rules that apply to individual API methods.\n  //\n  // **NOTE:** All service configuration rules follow \"last one wins\" order.\n  repeated HttpRule rules = 1;\n\n  // When set to true, URL path parameters will be fully URI-decoded except in\n  // cases of single segment matches in reserved expansion, where \"%2F\" will be\n  // left encoded.\n  //\n  // The default behavior is to not decode RFC 6570 reserved characters in multi\n  // segment matches.\n  bool fully_decode_reserved_expansion = 2;\n}\n\n// gRPC Transcoding\n//\n// gRPC Transcoding is a feature for mapping between a gRPC method and one or\n// more HTTP REST endpoints. It allows developers to build a single API service\n// that supports both gRPC APIs and REST APIs. Many systems, including [Google\n// APIs](https://github.com/googleapis/googleapis),\n// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC\n// Gateway](https://github.com/grpc-ecosystem/grpc-gateway),\n// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature\n// and use it for large scale production services.\n//\n// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies\n// how different portions of the gRPC request message are mapped to the URL\n// path, URL query parameters, and HTTP request body. It also controls how the\n// gRPC response message is mapped to the HTTP response body. `HttpRule` is\n// typically specified as an `google.api.http` annotation on the gRPC method.\n//\n// Each mapping specifies a URL path template and an HTTP method. The path\n// template may refer to one or more fields in the gRPC request message, as long\n// as each field is a non-repeated field with a primitive (non-message) type.\n// The path template controls how fields of the request message are mapped to\n// the URL path.\n//\n// Example:\n//\n//     service Messaging {\n//       rpc GetMessage(GetMessageRequest) returns (Message) {\n//         option (google.api.http) = {\n//             get: \"/v1/{name=messages/*}\"\n//         };\n//       }\n//     }\n//     message GetMessageRequest {\n//       string name = 1; // Mapped to URL path.\n//     }\n//     message Message {\n//       string text = 1; // The resource content.\n//     }\n//\n// This enables an HTTP REST to gRPC mapping as below:\n//\n// - HTTP: `GET /v1/messages/123456`\n// - gRPC: `GetMessage(name: \"messages/123456\")`\n//\n// Any fields in the request message which are not bound by the path template\n// automatically become HTTP query parameters if there is no HTTP request body.\n// For example:\n//\n//     service Messaging {\n//       rpc GetMessage(GetMessageRequest) returns (Message) {\n//         option (google.api.http) = {\n//             get:\"/v1/messages/{message_id}\"\n//         };\n//       }\n//     }\n//     message GetMessageRequest {\n//       message SubMessage {\n//         string subfield = 1;\n//       }\n//       string message_id = 1; // Mapped to URL path.\n//       int64 revision = 2;    // Mapped to URL query parameter `revision`.\n//       SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.\n//     }\n//\n// This enables a HTTP JSON to RPC mapping as below:\n//\n// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`\n// - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub:\n// SubMessage(subfield: \"foo\"))`\n//\n// Note that fields which are mapped to URL query parameters must have a\n// primitive type or a repeated primitive type or a non-repeated message type.\n// In the case of a repeated type, the parameter can be repeated in the URL\n// as `...?param=A&param=B`. In the case of a message type, each field of the\n// message is mapped to a separate parameter, such as\n// `...?foo.a=A&foo.b=B&foo.c=C`.\n//\n// For HTTP methods that allow a request body, the `body` field\n// specifies the mapping. Consider a REST update method on the\n// message resource collection:\n//\n//     service Messaging {\n//       rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n//         option (google.api.http) = {\n//           patch: \"/v1/messages/{message_id}\"\n//           body: \"message\"\n//         };\n//       }\n//     }\n//     message UpdateMessageRequest {\n//       string message_id = 1; // mapped to the URL\n//       Message message = 2;   // mapped to the body\n//     }\n//\n// The following HTTP JSON to RPC mapping is enabled, where the\n// representation of the JSON in the request body is determined by\n// protos JSON encoding:\n//\n// - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }`\n// - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n//\n// The special name `*` can be used in the body mapping to define that\n// every field not bound by the path template should be mapped to the\n// request body.  This enables the following alternative definition of\n// the update method:\n//\n//     service Messaging {\n//       rpc UpdateMessage(Message) returns (Message) {\n//         option (google.api.http) = {\n//           patch: \"/v1/messages/{message_id}\"\n//           body: \"*\"\n//         };\n//       }\n//     }\n//     message Message {\n//       string message_id = 1;\n//       string text = 2;\n//     }\n//\n//\n// The following HTTP JSON to RPC mapping is enabled:\n//\n// - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }`\n// - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n//\n// Note that when using `*` in the body mapping, it is not possible to\n// have HTTP parameters, as all fields not bound by the path end in\n// the body. This makes this option more rarely used in practice when\n// defining REST APIs. The common usage of `*` is in custom methods\n// which don't use the URL at all for transferring data.\n//\n// It is possible to define multiple HTTP methods for one RPC by using\n// the `additional_bindings` option. Example:\n//\n//     service Messaging {\n//       rpc GetMessage(GetMessageRequest) returns (Message) {\n//         option (google.api.http) = {\n//           get: \"/v1/messages/{message_id}\"\n//           additional_bindings {\n//             get: \"/v1/users/{user_id}/messages/{message_id}\"\n//           }\n//         };\n//       }\n//     }\n//     message GetMessageRequest {\n//       string message_id = 1;\n//       string user_id = 2;\n//     }\n//\n// This enables the following two alternative HTTP JSON to RPC mappings:\n//\n// - HTTP: `GET /v1/messages/123456`\n// - gRPC: `GetMessage(message_id: \"123456\")`\n//\n// - HTTP: `GET /v1/users/me/messages/123456`\n// - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")`\n//\n// Rules for HTTP mapping\n//\n// 1. Leaf request fields (recursive expansion nested messages in the request\n//    message) are classified into three categories:\n//    - Fields referred by the path template. They are passed via the URL path.\n//    - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They\n//    are passed via the HTTP\n//      request body.\n//    - All other fields are passed via the URL query parameters, and the\n//      parameter name is the field path in the request message. A repeated\n//      field can be represented as multiple query parameters under the same\n//      name.\n//  2. If [HttpRule.body][google.api.HttpRule.body] is \"*\", there is no URL\n//  query parameter, all fields\n//     are passed via URL path and HTTP request body.\n//  3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP\n//  request body, all\n//     fields are passed via URL path and URL query parameters.\n//\n// Path template syntax\n//\n//     Template = \"/\" Segments [ Verb ] ;\n//     Segments = Segment { \"/\" Segment } ;\n//     Segment  = \"*\" | \"**\" | LITERAL | Variable ;\n//     Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n//     FieldPath = IDENT { \".\" IDENT } ;\n//     Verb     = \":\" LITERAL ;\n//\n// The syntax `*` matches a single URL path segment. The syntax `**` matches\n// zero or more URL path segments, which must be the last part of the URL path\n// except the `Verb`.\n//\n// The syntax `Variable` matches part of the URL path as specified by its\n// template. A variable template must not contain other variables. If a variable\n// matches a single path segment, its template may be omitted, e.g. `{var}`\n// is equivalent to `{var=*}`.\n//\n// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`\n// contains any reserved character, such characters should be percent-encoded\n// before the matching.\n//\n// If a variable contains exactly one path segment, such as `\"{var}\"` or\n// `\"{var=*}\"`, when such a variable is expanded into a URL path on the client\n// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The\n// server side does the reverse decoding. Such variables show up in the\n// [Discovery\n// Document](https://developers.google.com/discovery/v1/reference/apis) as\n// `{var}`.\n//\n// If a variable contains multiple path segments, such as `\"{var=foo/*}\"`\n// or `\"{var=**}\"`, when such a variable is expanded into a URL path on the\n// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.\n// The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left\n// unchanged. Such variables show up in the\n// [Discovery\n// Document](https://developers.google.com/discovery/v1/reference/apis) as\n// `{+var}`.\n//\n// Using gRPC API Service Configuration\n//\n// gRPC API Service Configuration (service config) is a configuration language\n// for configuring a gRPC service to become a user-facing product. The\n// service config is simply the YAML representation of the `google.api.Service`\n// proto message.\n//\n// As an alternative to annotating your proto file, you can configure gRPC\n// transcoding in your service config YAML files. You do this by specifying a\n// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same\n// effect as the proto annotation. This can be particularly useful if you\n// have a proto that is reused in multiple services. Note that any transcoding\n// specified in the service config will override any matching transcoding\n// configuration in the proto.\n//\n// The following example selects a gRPC method and applies an `HttpRule` to it:\n//\n//     http:\n//       rules:\n//         - selector: example.v1.Messaging.GetMessage\n//           get: /v1/messages/{message_id}/{sub.subfield}\n//\n// Special notes\n//\n// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the\n// proto to JSON conversion must follow the [proto3\n// specification](https://developers.google.com/protocol-buffers/docs/proto3#json).\n//\n// While the single segment variable follows the semantics of\n// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\n// Expansion, the multi segment variable **does not** follow RFC 6570 Section\n// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion\n// does not expand special characters like `?` and `#`, which would lead\n// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding\n// for multi segment variables.\n//\n// The path variables **must not** refer to any repeated or mapped field,\n// because client libraries are not capable of handling such variable expansion.\n//\n// The path variables **must not** capture the leading \"/\" character. The reason\n// is that the most common use case \"{var}\" does not capture the leading \"/\"\n// character. For consistency, all path variables must share the same behavior.\n//\n// Repeated message fields must not be mapped to URL query parameters, because\n// no client library can support such complicated mapping.\n//\n// If an API needs to use a JSON array for request or response body, it can map\n// the request or response body to a repeated field. However, some gRPC\n// Transcoding implementations may not support this feature.\nmessage HttpRule {\n  // Selects a method to which this rule applies.\n  //\n  // Refer to [selector][google.api.DocumentationRule.selector] for syntax\n  // details.\n  string selector = 1;\n\n  // Determines the URL pattern is matched by this rules. This pattern can be\n  // used with any of the {get|put|post|delete|patch} methods. A custom method\n  // can be defined using the 'custom' field.\n  oneof pattern {\n    // Maps to HTTP GET. Used for listing and getting information about\n    // resources.\n    string get = 2;\n\n    // Maps to HTTP PUT. Used for replacing a resource.\n    string put = 3;\n\n    // Maps to HTTP POST. Used for creating a resource or performing an action.\n    string post = 4;\n\n    // Maps to HTTP DELETE. Used for deleting a resource.\n    string delete = 5;\n\n    // Maps to HTTP PATCH. Used for updating a resource.\n    string patch = 6;\n\n    // The custom pattern is used for specifying an HTTP method that is not\n    // included in the `pattern` field, such as HEAD, or \"*\" to leave the\n    // HTTP method unspecified for this rule. The wild-card rule is useful\n    // for services that provide content to Web (HTML) clients.\n    CustomHttpPattern custom = 8;\n  }\n\n  // The name of the request field whose value is mapped to the HTTP request\n  // body, or `*` for mapping all request fields not captured by the path\n  // pattern to the HTTP body, or omitted for not having any HTTP request body.\n  //\n  // NOTE: the referred field must be present at the top-level of the request\n  // message type.\n  string body = 7;\n\n  // Optional. The name of the response field whose value is mapped to the HTTP\n  // response body. When omitted, the entire response message will be used\n  // as the HTTP response body.\n  //\n  // NOTE: The referred field must be present at the top-level of the response\n  // message type.\n  string response_body = 12;\n\n  // Additional HTTP bindings for the selector. Nested bindings must\n  // not contain an `additional_bindings` field themselves (that is,\n  // the nesting may only be one level deep).\n  repeated HttpRule additional_bindings = 11;\n}\n\n// A custom pattern is used for defining custom HTTP verb.\nmessage CustomHttpPattern {\n  // The name of this custom HTTP verb.\n  string kind = 1;\n\n  // The path matched by this custom verb.\n  string path = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/protos/google/api/launch_stage.proto",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nsyntax = \"proto3\";\n\npackage google.api;\n\noption go_package = \"google.golang.org/genproto/googleapis/api;api\";\noption java_multiple_files = true;\noption java_outer_classname = \"LaunchStageProto\";\noption java_package = \"com.google.api\";\noption objc_class_prefix = \"GAPI\";\n\n// The launch stage as defined by [Google Cloud Platform\n// Launch Stages](https://cloud.google.com/terms/launch-stages).\nenum LaunchStage {\n  // Do not use this default value.\n  LAUNCH_STAGE_UNSPECIFIED = 0;\n\n  // The feature is not yet implemented. Users can not use it.\n  UNIMPLEMENTED = 6;\n\n  // Prelaunch features are hidden from users and are only visible internally.\n  PRELAUNCH = 7;\n\n  // Early Access features are limited to a closed group of testers. To use\n  // these features, you must sign up in advance and sign a Trusted Tester\n  // agreement (which includes confidentiality provisions). These features may\n  // be unstable, changed in backward-incompatible ways, and are not\n  // guaranteed to be released.\n  EARLY_ACCESS = 1;\n\n  // Alpha is a limited availability test for releases before they are cleared\n  // for widespread use. By Alpha, all significant design issues are resolved\n  // and we are in the process of verifying functionality. Alpha customers\n  // need to apply for access, agree to applicable terms, and have their\n  // projects allowlisted. Alpha releases don't have to be feature complete,\n  // no SLAs are provided, and there are no technical support obligations, but\n  // they will be far enough along that customers can actually use them in\n  // test environments or for limited-use tests -- just like they would in\n  // normal production cases.\n  ALPHA = 2;\n\n  // Beta is the point at which we are ready to open a release for any\n  // customer to use. There are no SLA or technical support obligations in a\n  // Beta release. Products will be complete from a feature perspective, but\n  // may have some open outstanding issues. Beta releases are suitable for\n  // limited production use cases.\n  BETA = 3;\n\n  // GA features are open to all developers and are considered stable and\n  // fully qualified for production use.\n  GA = 4;\n\n  // Deprecated features are scheduled to be shut down and removed. For more\n  // information, see the \"Deprecation Policy\" section of our [Terms of\n  // Service](https://cloud.google.com/terms/)\n  // and the [Google Cloud Platform Subject to the Deprecation\n  // Policy](https://cloud.google.com/terms/deprecation) documentation.\n  DEPRECATED = 5;\n}\n"
  },
  {
    "path": "protoc_plugin/protos/google/api/routing.proto",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nsyntax = \"proto3\";\n\npackage google.api;\n\nimport \"google/protobuf/descriptor.proto\";\n\noption go_package = \"google.golang.org/genproto/googleapis/api/annotations;annotations\";\noption java_multiple_files = true;\noption java_outer_classname = \"RoutingProto\";\noption java_package = \"com.google.api\";\noption objc_class_prefix = \"GAPI\";\n\nextend google.protobuf.MethodOptions {\n  // See RoutingRule.\n  google.api.RoutingRule routing = 72295729;\n}\n\n// Specifies the routing information that should be sent along with the request\n// in the form of routing header.\n// **NOTE:** All service configuration rules follow the \"last one wins\" order.\n//\n// The examples below will apply to an RPC which has the following request type:\n//\n// Message Definition:\n//\n//     message Request {\n//       // The name of the Table\n//       // Values can be of the following formats:\n//       // - `projects/<project>/tables/<table>`\n//       // - `projects/<project>/instances/<instance>/tables/<table>`\n//       // - `region/<region>/zones/<zone>/tables/<table>`\n//       string table_name = 1;\n//\n//       // This value specifies routing for replication.\n//       // It can be in the following formats:\n//       // - `profiles/<profile_id>`\n//       // - a legacy `profile_id` that can be any string\n//       string app_profile_id = 2;\n//     }\n//\n// Example message:\n//\n//     {\n//       table_name: projects/proj_foo/instances/instance_bar/table/table_baz,\n//       app_profile_id: profiles/prof_qux\n//     }\n//\n// The routing header consists of one or multiple key-value pairs. Every key\n// and value must be percent-encoded, and joined together in the format of\n// `key1=value1&key2=value2`.\n// The examples below skip the percent-encoding for readability.\n//\n// Example 1\n//\n// Extracting a field from the request to put into the routing header\n// unchanged, with the key equal to the field name.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // Take the `app_profile_id`.\n//       routing_parameters {\n//         field: \"app_profile_id\"\n//       }\n//     };\n//\n// result:\n//\n//     x-goog-request-params: app_profile_id=profiles/prof_qux\n//\n// Example 2\n//\n// Extracting a field from the request to put into the routing header\n// unchanged, with the key different from the field name.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // Take the `app_profile_id`, but name it `routing_id` in the header.\n//       routing_parameters {\n//         field: \"app_profile_id\"\n//         path_template: \"{routing_id=**}\"\n//       }\n//     };\n//\n// result:\n//\n//     x-goog-request-params: routing_id=profiles/prof_qux\n//\n// Example 3\n//\n// Extracting a field from the request to put into the routing\n// header, while matching a path template syntax on the field's value.\n//\n// NB: it is more useful to send nothing than to send garbage for the purpose\n// of dynamic routing, since garbage pollutes cache. Thus the matching.\n//\n// Sub-example 3a\n//\n// The field matches the template.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // Take the `table_name`, if it's well-formed (with project-based\n//       // syntax).\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{table_name=projects/*/instances/*/**}\"\n//       }\n//     };\n//\n// result:\n//\n//     x-goog-request-params:\n//     table_name=projects/proj_foo/instances/instance_bar/table/table_baz\n//\n// Sub-example 3b\n//\n// The field does not match the template.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // Take the `table_name`, if it's well-formed (with region-based\n//       // syntax).\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{table_name=regions/*/zones/*/**}\"\n//       }\n//     };\n//\n// result:\n//\n//     <no routing header will be sent>\n//\n// Sub-example 3c\n//\n// Multiple alternative conflictingly named path templates are\n// specified. The one that matches is used to construct the header.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // Take the `table_name`, if it's well-formed, whether\n//       // using the region- or projects-based syntax.\n//\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{table_name=regions/*/zones/*/**}\"\n//       }\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{table_name=projects/*/instances/*/**}\"\n//       }\n//     };\n//\n// result:\n//\n//     x-goog-request-params:\n//     table_name=projects/proj_foo/instances/instance_bar/table/table_baz\n//\n// Example 4\n//\n// Extracting a single routing header key-value pair by matching a\n// template syntax on (a part of) a single request field.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // Take just the project id from the `table_name` field.\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{routing_id=projects/*}/**\"\n//       }\n//     };\n//\n// result:\n//\n//     x-goog-request-params: routing_id=projects/proj_foo\n//\n// Example 5\n//\n// Extracting a single routing header key-value pair by matching\n// several conflictingly named path templates on (parts of) a single request\n// field. The last template to match \"wins\" the conflict.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // If the `table_name` does not have instances information,\n//       // take just the project id for routing.\n//       // Otherwise take project + instance.\n//\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{routing_id=projects/*}/**\"\n//       }\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{routing_id=projects/*/instances/*}/**\"\n//       }\n//     };\n//\n// result:\n//\n//     x-goog-request-params:\n//     routing_id=projects/proj_foo/instances/instance_bar\n//\n// Example 6\n//\n// Extracting multiple routing header key-value pairs by matching\n// several non-conflicting path templates on (parts of) a single request field.\n//\n// Sub-example 6a\n//\n// Make the templates strict, so that if the `table_name` does not\n// have an instance information, nothing is sent.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // The routing code needs two keys instead of one composite\n//       // but works only for the tables with the \"project-instance\" name\n//       // syntax.\n//\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{project_id=projects/*}/instances/*/**\"\n//       }\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"projects/*/{instance_id=instances/*}/**\"\n//       }\n//     };\n//\n// result:\n//\n//     x-goog-request-params:\n//     project_id=projects/proj_foo&instance_id=instances/instance_bar\n//\n// Sub-example 6b\n//\n// Make the templates loose, so that if the `table_name` does not\n// have an instance information, just the project id part is sent.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // The routing code wants two keys instead of one composite\n//       // but will work with just the `project_id` for tables without\n//       // an instance in the `table_name`.\n//\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{project_id=projects/*}/**\"\n//       }\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"projects/*/{instance_id=instances/*}/**\"\n//       }\n//     };\n//\n// result (is the same as 6a for our example message because it has the instance\n// information):\n//\n//     x-goog-request-params:\n//     project_id=projects/proj_foo&instance_id=instances/instance_bar\n//\n// Example 7\n//\n// Extracting multiple routing header key-value pairs by matching\n// several path templates on multiple request fields.\n//\n// NB: note that here there is no way to specify sending nothing if one of the\n// fields does not match its template. E.g. if the `table_name` is in the wrong\n// format, the `project_id` will not be sent, but the `routing_id` will be.\n// The backend routing code has to be aware of that and be prepared to not\n// receive a full complement of keys if it expects multiple.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // The routing needs both `project_id` and `routing_id`\n//       // (from the `app_profile_id` field) for routing.\n//\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{project_id=projects/*}/**\"\n//       }\n//       routing_parameters {\n//         field: \"app_profile_id\"\n//         path_template: \"{routing_id=**}\"\n//       }\n//     };\n//\n// result:\n//\n//     x-goog-request-params:\n//     project_id=projects/proj_foo&routing_id=profiles/prof_qux\n//\n// Example 8\n//\n// Extracting a single routing header key-value pair by matching\n// several conflictingly named path templates on several request fields. The\n// last template to match \"wins\" the conflict.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // The `routing_id` can be a project id or a region id depending on\n//       // the table name format, but only if the `app_profile_id` is not set.\n//       // If `app_profile_id` is set it should be used instead.\n//\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{routing_id=projects/*}/**\"\n//       }\n//       routing_parameters {\n//          field: \"table_name\"\n//          path_template: \"{routing_id=regions/*}/**\"\n//       }\n//       routing_parameters {\n//         field: \"app_profile_id\"\n//         path_template: \"{routing_id=**}\"\n//       }\n//     };\n//\n// result:\n//\n//     x-goog-request-params: routing_id=profiles/prof_qux\n//\n// Example 9\n//\n// Bringing it all together.\n//\n// annotation:\n//\n//     option (google.api.routing) = {\n//       // For routing both `table_location` and a `routing_id` are needed.\n//       //\n//       // table_location can be either an instance id or a region+zone id.\n//       //\n//       // For `routing_id`, take the value of `app_profile_id`\n//       // - If it's in the format `profiles/<profile_id>`, send\n//       // just the `<profile_id>` part.\n//       // - If it's any other literal, send it as is.\n//       // If the `app_profile_id` is empty, and the `table_name` starts with\n//       // the project_id, send that instead.\n//\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"projects/*/{table_location=instances/*}/tables/*\"\n//       }\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{table_location=regions/*/zones/*}/tables/*\"\n//       }\n//       routing_parameters {\n//         field: \"table_name\"\n//         path_template: \"{routing_id=projects/*}/**\"\n//       }\n//       routing_parameters {\n//         field: \"app_profile_id\"\n//         path_template: \"{routing_id=**}\"\n//       }\n//       routing_parameters {\n//         field: \"app_profile_id\"\n//         path_template: \"profiles/{routing_id=*}\"\n//       }\n//     };\n//\n// result:\n//\n//     x-goog-request-params:\n//     table_location=instances/instance_bar&routing_id=prof_qux\nmessage RoutingRule {\n  // A collection of Routing Parameter specifications.\n  // **NOTE:** If multiple Routing Parameters describe the same key\n  // (via the `path_template` field or via the `field` field when\n  // `path_template` is not provided), \"last one wins\" rule\n  // determines which Parameter gets used.\n  // See the examples for more details.\n  repeated RoutingParameter routing_parameters = 2;\n}\n\n// A projection from an input message to the GRPC or REST header.\nmessage RoutingParameter {\n  // A request field to extract the header key-value pair from.\n  string field = 1;\n\n  // A pattern matching the key-value field. Optional.\n  // If not specified, the whole field specified in the `field` field will be\n  // taken as value, and its name used as key. If specified, it MUST contain\n  // exactly one named segment (along with any number of unnamed segments) The\n  // pattern will be matched over the field specified in the `field` field, then\n  // if the match is successful:\n  // - the name of the single named segment will be used as a header name,\n  // - the match value of the segment will be used as a header value;\n  // if the match is NOT successful, nothing will be sent.\n  //\n  // Example:\n  //\n  //               -- This is a field in the request message\n  //              |   that the header value will be extracted from.\n  //              |\n  //              |                     -- This is the key name in the\n  //              |                    |   routing header.\n  //              V                    |\n  //     field: \"table_name\"           v\n  //     path_template: \"projects/*/{table_location=instances/*}/tables/*\"\n  //                                                ^            ^\n  //                                                |            |\n  //       In the {} brackets is the pattern that --             |\n  //       specifies what to extract from the                    |\n  //       field as a value to be sent.                          |\n  //                                                             |\n  //      The string in the field must match the whole pattern --\n  //      before brackets, inside brackets, after brackets.\n  //\n  // When looking at this specific example, we can see that:\n  // - A key-value pair with the key `table_location`\n  //   and the value matching `instances/*` should be added\n  //   to the x-goog-request-params routing header.\n  // - The value is extracted from the request message's `table_name` field\n  //   if it matches the full pattern specified:\n  //   `projects/*/instances/*/tables/*`.\n  //\n  // **NB:** If the `path_template` field is not provided, the key name is\n  // equal to the field name, and the whole field should be sent as a value.\n  // This makes the pattern for the field and the value functionally equivalent\n  // to `**`, and the configuration\n  //\n  //     {\n  //       field: \"table_name\"\n  //     }\n  //\n  // is a functionally equivalent shorthand to:\n  //\n  //     {\n  //       field: \"table_name\"\n  //       path_template: \"{table_name=**}\"\n  //     }\n  //\n  // See Example 1 for more details.\n  string path_template = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/protos/google/protobuf/compiler/plugin.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file or at\n// https://developers.google.com/open-source/licenses/bsd\n\n// Author: kenton@google.com (Kenton Varda)\n//\n// protoc (aka the Protocol Compiler) can be extended via plugins.  A plugin is\n// just a program that reads a CodeGeneratorRequest from stdin and writes a\n// CodeGeneratorResponse to stdout.\n//\n// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead\n// of dealing with the raw protocol defined here.\n//\n// A plugin executable needs only to be placed somewhere in the path.  The\n// plugin should be named \"protoc-gen-$NAME\", and will then be used when the\n// flag \"--${NAME}_out\" is passed to protoc.\n\nsyntax = \"proto2\";\n\npackage google.protobuf.compiler;\noption java_package = \"com.google.protobuf.compiler\";\noption java_outer_classname = \"PluginProtos\";\n\nimport \"google/protobuf/descriptor.proto\";\n\noption csharp_namespace = \"Google.Protobuf.Compiler\";\noption go_package = \"google.golang.org/protobuf/types/pluginpb\";\n\n// The version number of protocol compiler.\nmessage Version {\n  optional int32 major = 1;\n  optional int32 minor = 2;\n  optional int32 patch = 3;\n  // A suffix for alpha, beta or rc release, e.g., \"alpha-1\", \"rc2\". It should\n  // be empty for mainline stable releases.\n  optional string suffix = 4;\n}\n\n// An encoded CodeGeneratorRequest is written to the plugin's stdin.\nmessage CodeGeneratorRequest {\n  // The .proto files that were explicitly listed on the command-line.  The\n  // code generator should generate code only for these files.  Each file's\n  // descriptor will be included in proto_file, below.\n  repeated string file_to_generate = 1;\n\n  // The generator parameter passed on the command-line.\n  optional string parameter = 2;\n\n  // FileDescriptorProtos for all files in files_to_generate and everything\n  // they import.  The files will appear in topological order, so each file\n  // appears before any file that imports it.\n  //\n  // Note: the files listed in files_to_generate will include runtime-retention\n  // options only, but all other files will include source-retention options.\n  // The source_file_descriptors field below is available in case you need\n  // source-retention options for files_to_generate.\n  //\n  // protoc guarantees that all proto_files will be written after\n  // the fields above, even though this is not technically guaranteed by the\n  // protobuf wire format.  This theoretically could allow a plugin to stream\n  // in the FileDescriptorProtos and handle them one by one rather than read\n  // the entire set into memory at once.  However, as of this writing, this\n  // is not similarly optimized on protoc's end -- it will store all fields in\n  // memory at once before sending them to the plugin.\n  //\n  // Type names of fields and extensions in the FileDescriptorProto are always\n  // fully qualified.\n  repeated FileDescriptorProto proto_file = 15;\n\n  // File descriptors with all options, including source-retention options.\n  // These descriptors are only provided for the files listed in\n  // files_to_generate.\n  repeated FileDescriptorProto source_file_descriptors = 17;\n\n  // The version number of protocol compiler.\n  optional Version compiler_version = 3;\n}\n\n// The plugin writes an encoded CodeGeneratorResponse to stdout.\nmessage CodeGeneratorResponse {\n  // Error message.  If non-empty, code generation failed.  The plugin process\n  // should exit with status code zero even if it reports an error in this way.\n  //\n  // This should be used to indicate errors in .proto files which prevent the\n  // code generator from generating correct code.  Errors which indicate a\n  // problem in protoc itself -- such as the input CodeGeneratorRequest being\n  // unparseable -- should be reported by writing a message to stderr and\n  // exiting with a non-zero status code.\n  optional string error = 1;\n\n  // A bitmask of supported features that the code generator supports.\n  // This is a bitwise \"or\" of values from the Feature enum.\n  optional uint64 supported_features = 2;\n\n  // Sync with code_generator.h.\n  enum Feature {\n    FEATURE_NONE = 0;\n    FEATURE_PROTO3_OPTIONAL = 1;\n    FEATURE_SUPPORTS_EDITIONS = 2;\n  }\n\n  // The minimum edition this plugin supports.  This will be treated as an\n  // Edition enum, but we want to allow unknown values.  It should be specified\n  // according the edition enum value, *not* the edition number.  Only takes\n  // effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.\n  optional int32 minimum_edition = 3;\n\n  // The maximum edition this plugin supports.  This will be treated as an\n  // Edition enum, but we want to allow unknown values.  It should be specified\n  // according the edition enum value, *not* the edition number.  Only takes\n  // effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.\n  optional int32 maximum_edition = 4;\n\n  // Represents a single generated file.\n  message File {\n    // The file name, relative to the output directory.  The name must not\n    // contain \".\" or \"..\" components and must be relative, not be absolute (so,\n    // the file cannot lie outside the output directory).  \"/\" must be used as\n    // the path separator, not \"\\\".\n    //\n    // If the name is omitted, the content will be appended to the previous\n    // file.  This allows the generator to break large files into small chunks,\n    // and allows the generated text to be streamed back to protoc so that large\n    // files need not reside completely in memory at one time.  Note that as of\n    // this writing protoc does not optimize for this -- it will read the entire\n    // CodeGeneratorResponse before writing files to disk.\n    optional string name = 1;\n\n    // If non-empty, indicates that the named file should already exist, and the\n    // content here is to be inserted into that file at a defined insertion\n    // point.  This feature allows a code generator to extend the output\n    // produced by another code generator.  The original generator may provide\n    // insertion points by placing special annotations in the file that look\n    // like:\n    //   @@protoc_insertion_point(NAME)\n    // The annotation can have arbitrary text before and after it on the line,\n    // which allows it to be placed in a comment.  NAME should be replaced with\n    // an identifier naming the point -- this is what other generators will use\n    // as the insertion_point.  Code inserted at this point will be placed\n    // immediately above the line containing the insertion point (thus multiple\n    // insertions to the same point will come out in the order they were added).\n    // The double-@ is intended to make it unlikely that the generated code\n    // could contain things that look like insertion points by accident.\n    //\n    // For example, the C++ code generator places the following line in the\n    // .pb.h files that it generates:\n    //   // @@protoc_insertion_point(namespace_scope)\n    // This line appears within the scope of the file's package namespace, but\n    // outside of any particular class.  Another plugin can then specify the\n    // insertion_point \"namespace_scope\" to generate additional classes or\n    // other declarations that should be placed in this scope.\n    //\n    // Note that if the line containing the insertion point begins with\n    // whitespace, the same whitespace will be added to every line of the\n    // inserted text.  This is useful for languages like Python, where\n    // indentation matters.  In these languages, the insertion point comment\n    // should be indented the same amount as any inserted code will need to be\n    // in order to work correctly in that context.\n    //\n    // The code generator that generates the initial file and the one which\n    // inserts into it must both run as part of a single invocation of protoc.\n    // Code generators are executed in the order in which they appear on the\n    // command line.\n    //\n    // If |insertion_point| is present, |name| must also be present.\n    optional string insertion_point = 2;\n\n    // The file contents.\n    optional string content = 15;\n\n    // Information describing the file content being inserted. If an insertion\n    // point is used, this information will be appropriately offset and inserted\n    // into the code generation metadata for the generated files.\n    optional GeneratedCodeInfo generated_code_info = 16;\n  }\n  repeated File file = 15;\n}\n"
  },
  {
    "path": "protoc_plugin/protos/google/protobuf/descriptor.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Author: kenton@google.com (Kenton Varda)\n//  Based on original Protocol Buffers design by\n//  Sanjay Ghemawat, Jeff Dean, and others.\n//\n// The messages in this file describe the definitions found in .proto files.\n// A valid .proto file can be translated directly to a FileDescriptorProto\n// without any other information (e.g. without reading its imports).\n\nsyntax = \"proto2\";\n\npackage google.protobuf;\n\noption go_package = \"google.golang.org/protobuf/types/descriptorpb\";\noption java_package = \"com.google.protobuf\";\noption java_outer_classname = \"DescriptorProtos\";\noption csharp_namespace = \"Google.Protobuf.Reflection\";\noption objc_class_prefix = \"GPB\";\noption cc_enable_arenas = true;\n\n// descriptor.proto must be optimized for speed because reflection-based\n// algorithms don't work during bootstrapping.\noption optimize_for = SPEED;\n\n// The protocol compiler can output a FileDescriptorSet containing the .proto\n// files it parses.\nmessage FileDescriptorSet {\n  repeated FileDescriptorProto file = 1;\n\n  // Extensions for tooling.\n  extensions 536000000 [declaration = {\n    number: 536000000\n    type: \".buf.descriptor.v1.FileDescriptorSetExtension\"\n    full_name: \".buf.descriptor.v1.buf_file_descriptor_set_extension\"\n  }];\n}\n\n// The full set of known editions.\nenum Edition {\n  // A placeholder for an unknown edition value.\n  EDITION_UNKNOWN = 0;\n\n  // A placeholder edition for specifying default behaviors *before* a feature\n  // was first introduced.  This is effectively an \"infinite past\".\n  EDITION_LEGACY = 900;\n\n  // Legacy syntax \"editions\".  These pre-date editions, but behave much like\n  // distinct editions.  These can't be used to specify the edition of proto\n  // files, but feature definitions must supply proto2/proto3 defaults for\n  // backwards compatibility.\n  EDITION_PROTO2 = 998;\n  EDITION_PROTO3 = 999;\n\n  // Editions that have been released.  The specific values are arbitrary and\n  // should not be depended on, but they will always be time-ordered for easy\n  // comparison.\n  EDITION_2023 = 1000;\n  EDITION_2024 = 1001;\n\n  // Placeholder editions for testing feature resolution.  These should not be\n  // used or relied on outside of tests.\n  EDITION_1_TEST_ONLY = 1;\n  EDITION_2_TEST_ONLY = 2;\n  EDITION_99997_TEST_ONLY = 99997;\n  EDITION_99998_TEST_ONLY = 99998;\n  EDITION_99999_TEST_ONLY = 99999;\n\n  // Placeholder for specifying unbounded edition support.  This should only\n  // ever be used by plugins that can expect to never require any changes to\n  // support a new edition.\n  EDITION_MAX = 0x7FFFFFFF;\n}\n\n// Describes a complete .proto file.\nmessage FileDescriptorProto {\n  optional string name = 1;     // file name, relative to root of source tree\n  optional string package = 2;  // e.g. \"foo\", \"foo.bar\", etc.\n\n  // Names of files imported by this file.\n  repeated string dependency = 3;\n  // Indexes of the public imported files in the dependency list above.\n  repeated int32 public_dependency = 10;\n  // Indexes of the weak imported files in the dependency list.\n  // For Google-internal migration only. Do not use.\n  repeated int32 weak_dependency = 11;\n\n  // Names of files imported by this file purely for the purpose of providing\n  // option extensions. These are excluded from the dependency list above.\n  repeated string option_dependency = 15;\n\n  // All top-level definitions in this file.\n  repeated DescriptorProto message_type = 4;\n  repeated EnumDescriptorProto enum_type = 5;\n  repeated ServiceDescriptorProto service = 6;\n  repeated FieldDescriptorProto extension = 7;\n\n  optional FileOptions options = 8;\n\n  // This field contains optional information about the original source code.\n  // You may safely remove this entire field without harming runtime\n  // functionality of the descriptors -- the information is needed only by\n  // development tools.\n  optional SourceCodeInfo source_code_info = 9;\n\n  // The syntax of the proto file.\n  // The supported values are \"proto2\", \"proto3\", and \"editions\".\n  //\n  // If `edition` is present, this value must be \"editions\".\n  // WARNING: This field should only be used by protobuf plugins or special\n  // cases like the proto compiler. Other uses are discouraged and\n  // developers should rely on the protoreflect APIs for their client language.\n  optional string syntax = 12;\n\n  // The edition of the proto file.\n  // WARNING: This field should only be used by protobuf plugins or special\n  // cases like the proto compiler. Other uses are discouraged and\n  // developers should rely on the protoreflect APIs for their client language.\n  optional Edition edition = 14;\n}\n\n// Describes a message type.\nmessage DescriptorProto {\n  optional string name = 1;\n\n  repeated FieldDescriptorProto field = 2;\n  repeated FieldDescriptorProto extension = 6;\n\n  repeated DescriptorProto nested_type = 3;\n  repeated EnumDescriptorProto enum_type = 4;\n\n  message ExtensionRange {\n    optional int32 start = 1;  // Inclusive.\n    optional int32 end = 2;    // Exclusive.\n\n    optional ExtensionRangeOptions options = 3;\n  }\n  repeated ExtensionRange extension_range = 5;\n\n  repeated OneofDescriptorProto oneof_decl = 8;\n\n  optional MessageOptions options = 7;\n\n  // Range of reserved tag numbers. Reserved tag numbers may not be used by\n  // fields or extension ranges in the same message. Reserved ranges may\n  // not overlap.\n  message ReservedRange {\n    optional int32 start = 1;  // Inclusive.\n    optional int32 end = 2;    // Exclusive.\n  }\n  repeated ReservedRange reserved_range = 9;\n  // Reserved field names, which may not be used by fields in the same message.\n  // A given name may only be reserved once.\n  repeated string reserved_name = 10;\n\n  // Support for `export` and `local` keywords on enums.\n  optional SymbolVisibility visibility = 11;\n}\n\nmessage ExtensionRangeOptions {\n  // The parser stores options it doesn't recognize here. See above.\n  repeated UninterpretedOption uninterpreted_option = 999;\n\n  message Declaration {\n    // The extension number declared within the extension range.\n    optional int32 number = 1;\n\n    // The fully-qualified name of the extension field. There must be a leading\n    // dot in front of the full name.\n    optional string full_name = 2;\n\n    // The fully-qualified type name of the extension field. Unlike\n    // Metadata.type, Declaration.type must have a leading dot for messages\n    // and enums.\n    optional string type = 3;\n\n    // If true, indicates that the number is reserved in the extension range,\n    // and any extension field with the number will fail to compile. Set this\n    // when a declared extension field is deleted.\n    optional bool reserved = 5;\n\n    // If true, indicates that the extension must be defined as repeated.\n    // Otherwise the extension must be defined as optional.\n    optional bool repeated = 6;\n\n    reserved 4;  // removed is_repeated\n  }\n\n  // For external users: DO NOT USE. We are in the process of open sourcing\n  // extension declaration and executing internal cleanups before it can be\n  // used externally.\n  repeated Declaration declaration = 2 [retention = RETENTION_SOURCE];\n\n  // Any features defined in the specific edition.\n  optional FeatureSet features = 50;\n\n  // The verification state of the extension range.\n  enum VerificationState {\n    // All the extensions of the range must be declared.\n    DECLARATION = 0;\n    UNVERIFIED = 1;\n  }\n\n  // The verification state of the range.\n  // TODO: flip the default to DECLARATION once all empty ranges\n  // are marked as UNVERIFIED.\n  optional VerificationState verification = 3\n      [default = UNVERIFIED, retention = RETENTION_SOURCE];\n\n  // Clients can define custom options in extensions of this message. See above.\n  extensions 1000 to max;\n}\n\n// Describes a field within a message.\nmessage FieldDescriptorProto {\n  enum Type {\n    // 0 is reserved for errors.\n    // Order is weird for historical reasons.\n    TYPE_DOUBLE = 1;\n    TYPE_FLOAT = 2;\n    // Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT64 if\n    // negative values are likely.\n    TYPE_INT64 = 3;\n    TYPE_UINT64 = 4;\n    // Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT32 if\n    // negative values are likely.\n    TYPE_INT32 = 5;\n    TYPE_FIXED64 = 6;\n    TYPE_FIXED32 = 7;\n    TYPE_BOOL = 8;\n    TYPE_STRING = 9;\n    // Tag-delimited aggregate.\n    // Group type is deprecated and not supported after google.protobuf. However, Proto3\n    // implementations should still be able to parse the group wire format and\n    // treat group fields as unknown fields.  In Editions, the group wire format\n    // can be enabled via the `message_encoding` feature.\n    TYPE_GROUP = 10;\n    TYPE_MESSAGE = 11;  // Length-delimited aggregate.\n\n    // New in version 2.\n    TYPE_BYTES = 12;\n    TYPE_UINT32 = 13;\n    TYPE_ENUM = 14;\n    TYPE_SFIXED32 = 15;\n    TYPE_SFIXED64 = 16;\n    TYPE_SINT32 = 17;  // Uses ZigZag encoding.\n    TYPE_SINT64 = 18;  // Uses ZigZag encoding.\n  }\n\n  enum Label {\n    // 0 is reserved for errors\n    LABEL_OPTIONAL = 1;\n    LABEL_REPEATED = 3;\n    // The required label is only allowed in google.protobuf.  In proto3 and Editions\n    // it's explicitly prohibited.  In Editions, the `field_presence` feature\n    // can be used to get this behavior.\n    LABEL_REQUIRED = 2;\n  }\n\n  optional string name = 1;\n  optional int32 number = 3;\n  optional Label label = 4;\n\n  // If type_name is set, this need not be set.  If both this and type_name\n  // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.\n  optional Type type = 5;\n\n  // For message and enum types, this is the name of the type.  If the name\n  // starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping\n  // rules are used to find the type (i.e. first the nested types within this\n  // message are searched, then within the parent, on up to the root\n  // namespace).\n  optional string type_name = 6;\n\n  // For extensions, this is the name of the type being extended.  It is\n  // resolved in the same manner as type_name.\n  optional string extendee = 2;\n\n  // For numeric types, contains the original text representation of the value.\n  // For booleans, \"true\" or \"false\".\n  // For strings, contains the default text contents (not escaped in any way).\n  // For bytes, contains the C escaped value.  All bytes >= 128 are escaped.\n  optional string default_value = 7;\n\n  // If set, gives the index of a oneof in the containing type's oneof_decl\n  // list.  This field is a member of that oneof.\n  optional int32 oneof_index = 9;\n\n  // JSON name of this field. The value is set by protocol compiler. If the\n  // user has set a \"json_name\" option on this field, that option's value\n  // will be used. Otherwise, it's deduced from the field's name by converting\n  // it to camelCase.\n  optional string json_name = 10;\n\n  optional FieldOptions options = 8;\n\n  // If true, this is a proto3 \"optional\". When a proto3 field is optional, it\n  // tracks presence regardless of field type.\n  //\n  // When proto3_optional is true, this field must belong to a oneof to signal\n  // to old proto3 clients that presence is tracked for this field. This oneof\n  // is known as a \"synthetic\" oneof, and this field must be its sole member\n  // (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs\n  // exist in the descriptor only, and do not generate any API. Synthetic oneofs\n  // must be ordered after all \"real\" oneofs.\n  //\n  // For message fields, proto3_optional doesn't create any semantic change,\n  // since non-repeated message fields always track presence. However it still\n  // indicates the semantic detail of whether the user wrote \"optional\" or not.\n  // This can be useful for round-tripping the .proto file. For consistency we\n  // give message fields a synthetic oneof also, even though it is not required\n  // to track presence. This is especially important because the parser can't\n  // tell if a field is a message or an enum, so it must always create a\n  // synthetic oneof.\n  //\n  // Proto2 optional fields do not set this flag, because they already indicate\n  // optional with `LABEL_OPTIONAL`.\n  optional bool proto3_optional = 17;\n}\n\n// Describes a oneof.\nmessage OneofDescriptorProto {\n  optional string name = 1;\n  optional OneofOptions options = 2;\n}\n\n// Describes an enum type.\nmessage EnumDescriptorProto {\n  optional string name = 1;\n\n  repeated EnumValueDescriptorProto value = 2;\n\n  optional EnumOptions options = 3;\n\n  // Range of reserved numeric values. Reserved values may not be used by\n  // entries in the same enum. Reserved ranges may not overlap.\n  //\n  // Note that this is distinct from DescriptorProto.ReservedRange in that it\n  // is inclusive such that it can appropriately represent the entire int32\n  // domain.\n  message EnumReservedRange {\n    optional int32 start = 1;  // Inclusive.\n    optional int32 end = 2;    // Inclusive.\n  }\n\n  // Range of reserved numeric values. Reserved numeric values may not be used\n  // by enum values in the same enum declaration. Reserved ranges may not\n  // overlap.\n  repeated EnumReservedRange reserved_range = 4;\n\n  // Reserved enum value names, which may not be reused. A given name may only\n  // be reserved once.\n  repeated string reserved_name = 5;\n\n  // Support for `export` and `local` keywords on enums.\n  optional SymbolVisibility visibility = 6;\n}\n\n// Describes a value within an enum.\nmessage EnumValueDescriptorProto {\n  optional string name = 1;\n  optional int32 number = 2;\n\n  optional EnumValueOptions options = 3;\n}\n\n// Describes a service.\nmessage ServiceDescriptorProto {\n  optional string name = 1;\n  repeated MethodDescriptorProto method = 2;\n\n  optional ServiceOptions options = 3;\n\n  reserved 4;\n  reserved \"stream\";\n}\n\n// Describes a method of a service.\nmessage MethodDescriptorProto {\n  optional string name = 1;\n\n  // Input and output type names.  These are resolved in the same way as\n  // FieldDescriptorProto.type_name, but must refer to a message type.\n  optional string input_type = 2;\n  optional string output_type = 3;\n\n  optional MethodOptions options = 4;\n\n  // Identifies if client streams multiple client messages\n  optional bool client_streaming = 5 [default = false];\n  // Identifies if server streams multiple server messages\n  optional bool server_streaming = 6 [default = false];\n}\n\n// ===================================================================\n// Options\n\n// Each of the definitions above may have \"options\" attached.  These are\n// just annotations which may cause code to be generated slightly differently\n// or may contain hints for code that manipulates protocol messages.\n//\n// Clients may define custom options as extensions of the *Options messages.\n// These extensions may not yet be known at parsing time, so the parser cannot\n// store the values in them.  Instead it stores them in a field in the *Options\n// message called uninterpreted_option. This field must have the same name\n// across all *Options messages. We then use this field to populate the\n// extensions when we build a descriptor, at which point all protos have been\n// parsed and so all extensions are known.\n//\n// Extension numbers for custom options may be chosen as follows:\n// * For options which will only be used within a single application or\n//   organization, or for experimental options, use field numbers 50000\n//   through 99999.  It is up to you to ensure that you do not use the\n//   same number for multiple options.\n// * For options which will be published and used publicly by multiple\n//   independent entities, e-mail protobuf-global-extension-registry@google.com\n//   to reserve extension numbers. Simply provide your project name (e.g.\n//   Objective-C plugin) and your project website (if available) -- there's no\n//   need to explain how you intend to use them. Usually you only need one\n//   extension number. You can declare multiple options with only one extension\n//   number by putting them in a sub-message. See the Custom Options section of\n//   the docs for examples:\n//   https://developers.google.com/protocol-buffers/docs/proto#options\n//   If this turns out to be popular, a web service will be set up\n//   to automatically assign option numbers.\n\nmessage FileOptions {\n\n  // Sets the Java package where classes generated from this .proto will be\n  // placed.  By default, the proto package is used, but this is often\n  // inappropriate because proto packages do not normally start with backwards\n  // domain names.\n  optional string java_package = 1;\n\n  // Controls the name of the wrapper Java class generated for the .proto file.\n  // That class will always contain the .proto file's getDescriptor() method as\n  // well as any top-level extensions defined in the .proto file.\n  // If java_multiple_files is disabled, then all the other classes from the\n  // .proto file will be nested inside the single wrapper outer class.\n  optional string java_outer_classname = 8;\n\n  // If enabled, then the Java code generator will generate a separate .java\n  // file for each top-level message, enum, and service defined in the .proto\n  // file.  Thus, these types will *not* be nested inside the wrapper class\n  // named by java_outer_classname.  However, the wrapper class will still be\n  // generated to contain the file's getDescriptor() method as well as any\n  // top-level extensions defined in the file.\n  optional bool java_multiple_files = 10 [default = false];\n\n  // This option does nothing.\n  optional bool java_generate_equals_and_hash = 20 [deprecated=true];\n\n  // A proto2 file can set this to true to opt in to UTF-8 checking for Java,\n  // which will throw an exception if invalid UTF-8 is parsed from the wire or\n  // assigned to a string field.\n  //\n  // TODO: clarify exactly what kinds of field types this option\n  // applies to, and update these docs accordingly.\n  //\n  // Proto3 files already perform these checks. Setting the option explicitly to\n  // false has no effect: it cannot be used to opt proto3 files out of UTF-8\n  // checks.\n  optional bool java_string_check_utf8 = 27 [default = false];\n\n  // Generated classes can be optimized for speed or code size.\n  enum OptimizeMode {\n    SPEED = 1;         // Generate complete code for parsing, serialization,\n                       // etc.\n    CODE_SIZE = 2;     // Use ReflectionOps to implement these methods.\n    LITE_RUNTIME = 3;  // Generate code using MessageLite and the lite runtime.\n  }\n  optional OptimizeMode optimize_for = 9 [default = SPEED];\n\n  // Sets the Go package where structs generated from this .proto will be\n  // placed. If omitted, the Go package will be derived from the following:\n  //   - The basename of the package import path, if provided.\n  //   - Otherwise, the package statement in the .proto file, if present.\n  //   - Otherwise, the basename of the .proto file, without extension.\n  optional string go_package = 11;\n\n  // Should generic services be generated in each language?  \"Generic\" services\n  // are not specific to any particular RPC system.  They are generated by the\n  // main code generators in each language (without additional plugins).\n  // Generic services were the only kind of service generation supported by\n  // early versions of google.protobuf.\n  //\n  // Generic services are now considered deprecated in favor of using plugins\n  // that generate code specific to your particular RPC system.  Therefore,\n  // these default to false.  Old code which depends on generic services should\n  // explicitly set them to true.\n  optional bool cc_generic_services = 16 [default = false];\n  optional bool java_generic_services = 17 [default = false];\n  optional bool py_generic_services = 18 [default = false];\n  reserved 42;  // removed php_generic_services\n  reserved \"php_generic_services\";\n\n  // Is this file deprecated?\n  // Depending on the target platform, this can emit Deprecated annotations\n  // for everything in the file, or it will be completely ignored; in the very\n  // least, this is a formalization for deprecating files.\n  optional bool deprecated = 23 [default = false];\n\n  // Enables the use of arenas for the proto messages in this file. This applies\n  // only to generated classes for C++.\n  optional bool cc_enable_arenas = 31 [default = true];\n\n  // Sets the objective c class prefix which is prepended to all objective c\n  // generated classes from this .proto. There is no default.\n  optional string objc_class_prefix = 36;\n\n  // Namespace for generated classes; defaults to the package.\n  optional string csharp_namespace = 37;\n\n  // By default Swift generators will take the proto package and CamelCase it\n  // replacing '.' with underscore and use that to prefix the types/symbols\n  // defined. When this options is provided, they will use this value instead\n  // to prefix the types/symbols defined.\n  optional string swift_prefix = 39;\n\n  // Sets the php class prefix which is prepended to all php generated classes\n  // from this .proto. Default is empty.\n  optional string php_class_prefix = 40;\n\n  // Use this option to change the namespace of php generated classes. Default\n  // is empty. When this option is empty, the package name will be used for\n  // determining the namespace.\n  optional string php_namespace = 41;\n\n  // Use this option to change the namespace of php generated metadata classes.\n  // Default is empty. When this option is empty, the proto file name will be\n  // used for determining the namespace.\n  optional string php_metadata_namespace = 44;\n\n  // Use this option to change the package of ruby generated classes. Default\n  // is empty. When this option is not set, the package name will be used for\n  // determining the ruby package.\n  optional string ruby_package = 45;\n\n  // Any features defined in the specific edition.\n  // WARNING: This field should only be used by protobuf plugins or special\n  // cases like the proto compiler. Other uses are discouraged and\n  // developers should rely on the protoreflect APIs for their client language.\n  optional FeatureSet features = 50;\n\n  // The parser stores options it doesn't recognize here.\n  // See the documentation for the \"Options\" section above.\n  repeated UninterpretedOption uninterpreted_option = 999;\n\n  // Clients can define custom options in extensions of this message.\n  // See the documentation for the \"Options\" section above.\n  extensions 1000 to max;\n\n  reserved 38;\n}\n\nmessage MessageOptions {\n  // Set true to use the old proto1 MessageSet wire format for extensions.\n  // This is provided for backwards-compatibility with the MessageSet wire\n  // format.  You should not use this for any other reason:  It's less\n  // efficient, has fewer features, and is more complicated.\n  //\n  // The message must be defined exactly as follows:\n  //   message Foo {\n  //     option message_set_wire_format = true;\n  //     extensions 4 to max;\n  //   }\n  // Note that the message cannot have any defined fields; MessageSets only\n  // have extensions.\n  //\n  // All extensions of your type must be singular messages; e.g. they cannot\n  // be int32s, enums, or repeated messages.\n  //\n  // Because this is an option, the above two restrictions are not enforced by\n  // the protocol compiler.\n  optional bool message_set_wire_format = 1 [default = false];\n\n  // Disables the generation of the standard \"descriptor()\" accessor, which can\n  // conflict with a field of the same name.  This is meant to make migration\n  // from proto1 easier; new code should avoid fields named \"descriptor\".\n  optional bool no_standard_descriptor_accessor = 2 [default = false];\n\n  // Is this message deprecated?\n  // Depending on the target platform, this can emit Deprecated annotations\n  // for the message, or it will be completely ignored; in the very least,\n  // this is a formalization for deprecating messages.\n  optional bool deprecated = 3 [default = false];\n\n  reserved 4, 5, 6;\n\n  // Whether the message is an automatically generated map entry type for the\n  // maps field.\n  //\n  // For maps fields:\n  //     map<KeyType, ValueType> map_field = 1;\n  // The parsed descriptor looks like:\n  //     message MapFieldEntry {\n  //         option map_entry = true;\n  //         optional KeyType key = 1;\n  //         optional ValueType value = 2;\n  //     }\n  //     repeated MapFieldEntry map_field = 1;\n  //\n  // Implementations may choose not to generate the map_entry=true message, but\n  // use a native map in the target language to hold the keys and values.\n  // The reflection APIs in such implementations still need to work as\n  // if the field is a repeated message field.\n  //\n  // NOTE: Do not set the option in .proto files. Always use the maps syntax\n  // instead. The option should only be implicitly set by the proto compiler\n  // parser.\n  optional bool map_entry = 7;\n\n  reserved 8;  // javalite_serializable\n  reserved 9;  // javanano_as_lite\n\n  // Enable the legacy handling of JSON field name conflicts.  This lowercases\n  // and strips underscored from the fields before comparison in proto3 only.\n  // The new behavior takes `json_name` into account and applies to proto2 as\n  // well.\n  //\n  // This should only be used as a temporary measure against broken builds due\n  // to the change in behavior for JSON field name conflicts.\n  //\n  // TODO This is legacy behavior we plan to remove once downstream\n  // teams have had time to migrate.\n  optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];\n\n  // Any features defined in the specific edition.\n  // WARNING: This field should only be used by protobuf plugins or special\n  // cases like the proto compiler. Other uses are discouraged and\n  // developers should rely on the protoreflect APIs for their client language.\n  optional FeatureSet features = 12;\n\n  // The parser stores options it doesn't recognize here. See above.\n  repeated UninterpretedOption uninterpreted_option = 999;\n\n  // Clients can define custom options in extensions of this message. See above.\n  extensions 1000 to max;\n}\n\nmessage FieldOptions {\n  // NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.\n  // The ctype option instructs the C++ code generator to use a different\n  // representation of the field than it normally would.  See the specific\n  // options below.  This option is only implemented to support use of\n  // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of\n  // type \"bytes\" in the open source release.\n  // TODO: make ctype actually deprecated.\n  optional CType ctype = 1 [/*deprecated = true,*/ default = STRING];\n  enum CType {\n    // Default mode.\n    STRING = 0;\n\n    // The option [ctype=CORD] may be applied to a non-repeated field of type\n    // \"bytes\". It indicates that in C++, the data should be stored in a Cord\n    // instead of a string.  For very large strings, this may reduce memory\n    // fragmentation. It may also allow better performance when parsing from a\n    // Cord, or when parsing with aliasing enabled, as the parsed Cord may then\n    // alias the original buffer.\n    CORD = 1;\n\n    STRING_PIECE = 2;\n  }\n  // The packed option can be enabled for repeated primitive fields to enable\n  // a more efficient representation on the wire. Rather than repeatedly\n  // writing the tag and type for each element, the entire array is encoded as\n  // a single length-delimited blob. In proto3, only explicit setting it to\n  // false will avoid using packed encoding.  This option is prohibited in\n  // Editions, but the `repeated_field_encoding` feature can be used to control\n  // the behavior.\n  optional bool packed = 2;\n\n  // The jstype option determines the JavaScript type used for values of the\n  // field.  The option is permitted only for 64 bit integral and fixed types\n  // (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING\n  // is represented as JavaScript string, which avoids loss of precision that\n  // can happen when a large value is converted to a floating point JavaScript.\n  // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to\n  // use the JavaScript \"number\" type.  The behavior of the default option\n  // JS_NORMAL is implementation dependent.\n  //\n  // This option is an enum to permit additional types to be added, e.g.\n  // goog.math.Integer.\n  optional JSType jstype = 6 [default = JS_NORMAL];\n  enum JSType {\n    // Use the default type.\n    JS_NORMAL = 0;\n\n    // Use JavaScript strings.\n    JS_STRING = 1;\n\n    // Use JavaScript numbers.\n    JS_NUMBER = 2;\n  }\n\n  // Should this field be parsed lazily?  Lazy applies only to message-type\n  // fields.  It means that when the outer message is initially parsed, the\n  // inner message's contents will not be parsed but instead stored in encoded\n  // form.  The inner message will actually be parsed when it is first accessed.\n  //\n  // This is only a hint.  Implementations are free to choose whether to use\n  // eager or lazy parsing regardless of the value of this option.  However,\n  // setting this option true suggests that the protocol author believes that\n  // using lazy parsing on this field is worth the additional bookkeeping\n  // overhead typically needed to implement it.\n  //\n  // This option does not affect the public interface of any generated code;\n  // all method signatures remain the same.  Furthermore, thread-safety of the\n  // interface is not affected by this option; const methods remain safe to\n  // call from multiple threads concurrently, while non-const methods continue\n  // to require exclusive access.\n  //\n  // Note that lazy message fields are still eagerly verified to check\n  // ill-formed wireformat or missing required fields. Calling IsInitialized()\n  // on the outer message would fail if the inner message has missing required\n  // fields. Failed verification would result in parsing failure (except when\n  // uninitialized messages are acceptable).\n  optional bool lazy = 5 [default = false];\n\n  // unverified_lazy does no correctness checks on the byte stream. This should\n  // only be used where lazy with verification is prohibitive for performance\n  // reasons.\n  optional bool unverified_lazy = 15 [default = false];\n\n  // Is this field deprecated?\n  // Depending on the target platform, this can emit Deprecated annotations\n  // for accessors, or it will be completely ignored; in the very least, this\n  // is a formalization for deprecating fields.\n  optional bool deprecated = 3 [default = false];\n\n  // DEPRECATED. DO NOT USE!\n  // For Google-internal migration only. Do not use.\n  optional bool weak = 10 [default = false, deprecated = true];\n\n  // Indicate that the field value should not be printed out when using debug\n  // formats, e.g. when the field contains sensitive credentials.\n  optional bool debug_redact = 16 [default = false];\n\n  // If set to RETENTION_SOURCE, the option will be omitted from the binary.\n  enum OptionRetention {\n    RETENTION_UNKNOWN = 0;\n    RETENTION_RUNTIME = 1;\n    RETENTION_SOURCE = 2;\n  }\n\n  optional OptionRetention retention = 17;\n\n  // This indicates the types of entities that the field may apply to when used\n  // as an option. If it is unset, then the field may be freely used as an\n  // option on any kind of entity.\n  enum OptionTargetType {\n    TARGET_TYPE_UNKNOWN = 0;\n    TARGET_TYPE_FILE = 1;\n    TARGET_TYPE_EXTENSION_RANGE = 2;\n    TARGET_TYPE_MESSAGE = 3;\n    TARGET_TYPE_FIELD = 4;\n    TARGET_TYPE_ONEOF = 5;\n    TARGET_TYPE_ENUM = 6;\n    TARGET_TYPE_ENUM_ENTRY = 7;\n    TARGET_TYPE_SERVICE = 8;\n    TARGET_TYPE_METHOD = 9;\n  }\n\n  repeated OptionTargetType targets = 19;\n\n  message EditionDefault {\n    optional Edition edition = 3;\n    optional string value = 2;  // Textproto value.\n  }\n  repeated EditionDefault edition_defaults = 20;\n\n  // Any features defined in the specific edition.\n  // WARNING: This field should only be used by protobuf plugins or special\n  // cases like the proto compiler. Other uses are discouraged and\n  // developers should rely on the protoreflect APIs for their client language.\n  optional FeatureSet features = 21;\n\n  // Information about the support window of a feature.\n  message FeatureSupport {\n    // The edition that this feature was first available in.  In editions\n    // earlier than this one, the default assigned to EDITION_LEGACY will be\n    // used, and proto files will not be able to override it.\n    optional Edition edition_introduced = 1;\n\n    // The edition this feature becomes deprecated in.  Using this after this\n    // edition may trigger warnings.\n    optional Edition edition_deprecated = 2;\n\n    // The deprecation warning text if this feature is used after the edition it\n    // was marked deprecated in.\n    optional string deprecation_warning = 3;\n\n    // The edition this feature is no longer available in.  In editions after\n    // this one, the last default assigned will be used, and proto files will\n    // not be able to override it.\n    optional Edition edition_removed = 4;\n  }\n  optional FeatureSupport feature_support = 22;\n\n  // The parser stores options it doesn't recognize here. See above.\n  repeated UninterpretedOption uninterpreted_option = 999;\n\n  // Clients can define custom options in extensions of this message. See above.\n  extensions 1000 to max;\n\n  reserved 4;   // removed jtype\n  reserved 18;  // reserve target, target_obsolete_do_not_use\n}\n\nmessage OneofOptions {\n  // Any features defined in the specific edition.\n  // WARNING: This field should only be used by protobuf plugins or special\n  // cases like the proto compiler. Other uses are discouraged and\n  // developers should rely on the protoreflect APIs for their client language.\n  optional FeatureSet features = 1;\n\n  // The parser stores options it doesn't recognize here. See above.\n  repeated UninterpretedOption uninterpreted_option = 999;\n\n  // Clients can define custom options in extensions of this message. See above.\n  extensions 1000 to max;\n}\n\nmessage EnumOptions {\n\n  // Set this option to true to allow mapping different tag names to the same\n  // value.\n  optional bool allow_alias = 2;\n\n  // Is this enum deprecated?\n  // Depending on the target platform, this can emit Deprecated annotations\n  // for the enum, or it will be completely ignored; in the very least, this\n  // is a formalization for deprecating enums.\n  optional bool deprecated = 3 [default = false];\n\n  reserved 5;  // javanano_as_lite\n\n  // Enable the legacy handling of JSON field name conflicts.  This lowercases\n  // and strips underscored from the fields before comparison in proto3 only.\n  // The new behavior takes `json_name` into account and applies to proto2 as\n  // well.\n  // TODO Remove this legacy behavior once downstream teams have\n  // had time to migrate.\n  optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];\n\n  // Any features defined in the specific edition.\n  // WARNING: This field should only be used by protobuf plugins or special\n  // cases like the proto compiler. Other uses are discouraged and\n  // developers should rely on the protoreflect APIs for their client language.\n  optional FeatureSet features = 7;\n\n  // The parser stores options it doesn't recognize here. See above.\n  repeated UninterpretedOption uninterpreted_option = 999;\n\n  // Clients can define custom options in extensions of this message. See above.\n  extensions 1000 to max;\n}\n\nmessage EnumValueOptions {\n  // Is this enum value deprecated?\n  // Depending on the target platform, this can emit Deprecated annotations\n  // for the enum value, or it will be completely ignored; in the very least,\n  // this is a formalization for deprecating enum values.\n  optional bool deprecated = 1 [default = false];\n\n  // Any features defined in the specific edition.\n  // WARNING: This field should only be used by protobuf plugins or special\n  // cases like the proto compiler. Other uses are discouraged and\n  // developers should rely on the protoreflect APIs for their client language.\n  optional FeatureSet features = 2;\n\n  // Indicate that fields annotated with this enum value should not be printed\n  // out when using debug formats, e.g. when the field contains sensitive\n  // credentials.\n  optional bool debug_redact = 3 [default = false];\n\n  // Information about the support window of a feature value.\n  optional FieldOptions.FeatureSupport feature_support = 4;\n\n  // The parser stores options it doesn't recognize here. See above.\n  repeated UninterpretedOption uninterpreted_option = 999;\n\n  // Clients can define custom options in extensions of this message. See above.\n  extensions 1000 to max;\n}\n\nmessage ServiceOptions {\n\n  // Any features defined in the specific edition.\n  // WARNING: This field should only be used by protobuf plugins or special\n  // cases like the proto compiler. Other uses are discouraged and\n  // developers should rely on the protoreflect APIs for their client language.\n  optional FeatureSet features = 34;\n\n  // Note:  Field numbers 1 through 32 are reserved for Google's internal RPC\n  //   framework.  We apologize for hoarding these numbers to ourselves, but\n  //   we were already using them long before we decided to release Protocol\n  //   Buffers.\n\n  // Is this service deprecated?\n  // Depending on the target platform, this can emit Deprecated annotations\n  // for the service, or it will be completely ignored; in the very least,\n  // this is a formalization for deprecating services.\n  optional bool deprecated = 33 [default = false];\n\n  // The parser stores options it doesn't recognize here. See above.\n  repeated UninterpretedOption uninterpreted_option = 999;\n\n  // Clients can define custom options in extensions of this message. See above.\n  extensions 1000 to max;\n}\n\nmessage MethodOptions {\n\n  // Note:  Field numbers 1 through 32 are reserved for Google's internal RPC\n  //   framework.  We apologize for hoarding these numbers to ourselves, but\n  //   we were already using them long before we decided to release Protocol\n  //   Buffers.\n\n  // Is this method deprecated?\n  // Depending on the target platform, this can emit Deprecated annotations\n  // for the method, or it will be completely ignored; in the very least,\n  // this is a formalization for deprecating methods.\n  optional bool deprecated = 33 [default = false];\n\n  // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,\n  // or neither? HTTP based RPC implementation may choose GET verb for safe\n  // methods, and PUT verb for idempotent methods instead of the default POST.\n  enum IdempotencyLevel {\n    IDEMPOTENCY_UNKNOWN = 0;\n    NO_SIDE_EFFECTS = 1;  // implies idempotent\n    IDEMPOTENT = 2;       // idempotent, but may have side effects\n  }\n  optional IdempotencyLevel idempotency_level = 34\n      [default = IDEMPOTENCY_UNKNOWN];\n\n  // Any features defined in the specific edition.\n  // WARNING: This field should only be used by protobuf plugins or special\n  // cases like the proto compiler. Other uses are discouraged and\n  // developers should rely on the protoreflect APIs for their client language.\n  optional FeatureSet features = 35;\n\n  // The parser stores options it doesn't recognize here. See above.\n  repeated UninterpretedOption uninterpreted_option = 999;\n\n  // Clients can define custom options in extensions of this message. See above.\n  extensions 1000 to max;\n}\n\n// A message representing a option the parser does not recognize. This only\n// appears in options protos created by the compiler::Parser class.\n// DescriptorPool resolves these when building Descriptor objects. Therefore,\n// options protos in descriptor objects (e.g. returned by Descriptor::options(),\n// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions\n// in them.\nmessage UninterpretedOption {\n  // The name of the uninterpreted option.  Each string represents a segment in\n  // a dot-separated name.  is_extension is true iff a segment represents an\n  // extension (denoted with parentheses in options specs in .proto files).\n  // E.g.,{ [\"foo\", false], [\"bar.baz\", true], [\"moo\", false] } represents\n  // \"foo.(bar.baz).moo\".\n  message NamePart {\n    required string name_part = 1;\n    required bool is_extension = 2;\n  }\n  repeated NamePart name = 2;\n\n  // The value of the uninterpreted option, in whatever type the tokenizer\n  // identified it as during parsing. Exactly one of these should be set.\n  optional string identifier_value = 3;\n  optional uint64 positive_int_value = 4;\n  optional int64 negative_int_value = 5;\n  optional double double_value = 6;\n  optional bytes string_value = 7;\n  optional string aggregate_value = 8;\n}\n\n// ===================================================================\n// Features\n\n// TODO Enums in C++ gencode (and potentially other languages) are\n// not well scoped.  This means that each of the feature enums below can clash\n// with each other.  The short names we've chosen maximize call-site\n// readability, but leave us very open to this scenario.  A future feature will\n// be designed and implemented to handle this, hopefully before we ever hit a\n// conflict here.\nmessage FeatureSet {\n  enum FieldPresence {\n    FIELD_PRESENCE_UNKNOWN = 0;\n    EXPLICIT = 1;\n    IMPLICIT = 2;\n    LEGACY_REQUIRED = 3;\n  }\n  optional FieldPresence field_presence = 1 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FIELD,\n    targets = TARGET_TYPE_FILE,\n    feature_support = {\n      edition_introduced: EDITION_2023,\n    },\n    edition_defaults = { edition: EDITION_LEGACY, value: \"EXPLICIT\" },\n    edition_defaults = { edition: EDITION_PROTO3, value: \"IMPLICIT\" },\n    edition_defaults = { edition: EDITION_2023, value: \"EXPLICIT\" }\n  ];\n\n  enum EnumType {\n    ENUM_TYPE_UNKNOWN = 0;\n    OPEN = 1;\n    CLOSED = 2;\n  }\n  optional EnumType enum_type = 2 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_ENUM,\n    targets = TARGET_TYPE_FILE,\n    feature_support = {\n      edition_introduced: EDITION_2023,\n    },\n    edition_defaults = { edition: EDITION_LEGACY, value: \"CLOSED\" },\n    edition_defaults = { edition: EDITION_PROTO3, value: \"OPEN\" }\n  ];\n\n  enum RepeatedFieldEncoding {\n    REPEATED_FIELD_ENCODING_UNKNOWN = 0;\n    PACKED = 1;\n    EXPANDED = 2;\n  }\n  optional RepeatedFieldEncoding repeated_field_encoding = 3 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FIELD,\n    targets = TARGET_TYPE_FILE,\n    feature_support = {\n      edition_introduced: EDITION_2023,\n    },\n    edition_defaults = { edition: EDITION_LEGACY, value: \"EXPANDED\" },\n    edition_defaults = { edition: EDITION_PROTO3, value: \"PACKED\" }\n  ];\n\n  enum Utf8Validation {\n    UTF8_VALIDATION_UNKNOWN = 0;\n    VERIFY = 2;\n    NONE = 3;\n    reserved 1;\n  }\n  optional Utf8Validation utf8_validation = 4 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FIELD,\n    targets = TARGET_TYPE_FILE,\n    feature_support = {\n      edition_introduced: EDITION_2023,\n    },\n    edition_defaults = { edition: EDITION_LEGACY, value: \"NONE\" },\n    edition_defaults = { edition: EDITION_PROTO3, value: \"VERIFY\" }\n  ];\n\n  enum MessageEncoding {\n    MESSAGE_ENCODING_UNKNOWN = 0;\n    LENGTH_PREFIXED = 1;\n    DELIMITED = 2;\n  }\n  optional MessageEncoding message_encoding = 5 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FIELD,\n    targets = TARGET_TYPE_FILE,\n    feature_support = {\n      edition_introduced: EDITION_2023,\n    },\n    edition_defaults = { edition: EDITION_LEGACY, value: \"LENGTH_PREFIXED\" }\n  ];\n\n  enum JsonFormat {\n    JSON_FORMAT_UNKNOWN = 0;\n    ALLOW = 1;\n    LEGACY_BEST_EFFORT = 2;\n  }\n  optional JsonFormat json_format = 6 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_MESSAGE,\n    targets = TARGET_TYPE_ENUM,\n    targets = TARGET_TYPE_FILE,\n    feature_support = {\n      edition_introduced: EDITION_2023,\n    },\n    edition_defaults = { edition: EDITION_LEGACY, value: \"LEGACY_BEST_EFFORT\" },\n    edition_defaults = { edition: EDITION_PROTO3, value: \"ALLOW\" }\n  ];\n\n  enum EnforceNamingStyle {\n    ENFORCE_NAMING_STYLE_UNKNOWN = 0;\n    STYLE2024 = 1;\n    STYLE_LEGACY = 2;\n  }\n  optional EnforceNamingStyle enforce_naming_style = 7 [\n    retention = RETENTION_SOURCE,\n    targets = TARGET_TYPE_FILE,\n    targets = TARGET_TYPE_EXTENSION_RANGE,\n    targets = TARGET_TYPE_MESSAGE,\n    targets = TARGET_TYPE_FIELD,\n    targets = TARGET_TYPE_ONEOF,\n    targets = TARGET_TYPE_ENUM,\n    targets = TARGET_TYPE_ENUM_ENTRY,\n    targets = TARGET_TYPE_SERVICE,\n    targets = TARGET_TYPE_METHOD,\n    feature_support = {\n      edition_introduced: EDITION_2024,\n    },\n    edition_defaults = { edition: EDITION_LEGACY, value: \"STYLE_LEGACY\" },\n    edition_defaults = { edition: EDITION_2024, value: \"STYLE2024\" }\n  ];\n\n  message VisibilityFeature {\n    enum DefaultSymbolVisibility {\n      DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0;\n\n      // Default pre-EDITION_2024, all UNSET visibility are export.\n      EXPORT_ALL = 1;\n\n      // All top-level symbols default to export, nested default to local.\n      EXPORT_TOP_LEVEL = 2;\n\n      // All symbols default to local.\n      LOCAL_ALL = 3;\n\n      // All symbols local by default. Nested types cannot be exported.\n      // With special case caveat for message { enum {} reserved 1 to max; }\n      // This is the recommended setting for new protos.\n      STRICT = 4;\n    }\n    reserved 1 to max;\n  }\n  optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility =\n      8 [\n        retention = RETENTION_SOURCE,\n        targets = TARGET_TYPE_FILE,\n        feature_support = {\n          edition_introduced: EDITION_2024,\n        },\n        edition_defaults = { edition: EDITION_LEGACY, value: \"EXPORT_ALL\" },\n        edition_defaults = { edition: EDITION_2024, value: \"EXPORT_TOP_LEVEL\" }\n      ];\n\n  reserved 999;\n\n  extensions 1000 to 9994 [\n    declaration = {\n      number: 1000,\n      full_name: \".pb.cpp\",\n      type: \".pb.CppFeatures\"\n    },\n    declaration = {\n      number: 1001,\n      full_name: \".pb.java\",\n      type: \".pb.JavaFeatures\"\n    },\n    declaration = { number: 1002, full_name: \".pb.go\", type: \".pb.GoFeatures\" },\n    declaration = {\n      number: 1003,\n      full_name: \".pb.python\",\n      type: \".pb.PythonFeatures\"\n    },\n    declaration = {\n      number: 9989,\n      full_name: \".pb.java_mutable\",\n      type: \".pb.JavaMutableFeatures\"\n    },\n    declaration = {\n      number: 9990,\n      full_name: \".pb.proto1\",\n      type: \".pb.Proto1Features\"\n    }\n  ];\n\n  extensions 9995 to 9999;  // For internal testing\n  extensions 10000;         // for https://github.com/bufbuild/protobuf-es\n}\n\n// A compiled specification for the defaults of a set of features.  These\n// messages are generated from FeatureSet extensions and can be used to seed\n// feature resolution. The resolution with this object becomes a simple search\n// for the closest matching edition, followed by proto merges.\nmessage FeatureSetDefaults {\n  // A map from every known edition with a unique set of defaults to its\n  // defaults. Not all editions may be contained here.  For a given edition,\n  // the defaults at the closest matching edition ordered at or before it should\n  // be used.  This field must be in strict ascending order by edition.\n  message FeatureSetEditionDefault {\n    optional Edition edition = 3;\n\n    // Defaults of features that can be overridden in this edition.\n    optional FeatureSet overridable_features = 4;\n\n    // Defaults of features that can't be overridden in this edition.\n    optional FeatureSet fixed_features = 5;\n\n    reserved 1, 2;\n    reserved \"features\";\n  }\n  repeated FeatureSetEditionDefault defaults = 1;\n\n  // The minimum supported edition (inclusive) when this was constructed.\n  // Editions before this will not have defaults.\n  optional Edition minimum_edition = 4;\n\n  // The maximum known edition (inclusive) when this was constructed. Editions\n  // after this will not have reliable defaults.\n  optional Edition maximum_edition = 5;\n}\n\n// ===================================================================\n// Optional source code info\n\n// Encapsulates information about the original source file from which a\n// FileDescriptorProto was generated.\nmessage SourceCodeInfo {\n  // A Location identifies a piece of source code in a .proto file which\n  // corresponds to a particular definition.  This information is intended\n  // to be useful to IDEs, code indexers, documentation generators, and similar\n  // tools.\n  //\n  // For example, say we have a file like:\n  //   message Foo {\n  //     optional string foo = 1;\n  //   }\n  // Let's look at just the field definition:\n  //   optional string foo = 1;\n  //   ^       ^^     ^^  ^  ^^^\n  //   a       bc     de  f  ghi\n  // We have the following locations:\n  //   span   path               represents\n  //   [a,i)  [ 4, 0, 2, 0 ]     The whole field definition.\n  //   [a,b)  [ 4, 0, 2, 0, 4 ]  The label (optional).\n  //   [c,d)  [ 4, 0, 2, 0, 5 ]  The type (string).\n  //   [e,f)  [ 4, 0, 2, 0, 1 ]  The name (foo).\n  //   [g,h)  [ 4, 0, 2, 0, 3 ]  The number (1).\n  //\n  // Notes:\n  // - A location may refer to a repeated field itself (i.e. not to any\n  //   particular index within it).  This is used whenever a set of elements are\n  //   logically enclosed in a single code segment.  For example, an entire\n  //   extend block (possibly containing multiple extension definitions) will\n  //   have an outer location whose path refers to the \"extensions\" repeated\n  //   field without an index.\n  // - Multiple locations may have the same path.  This happens when a single\n  //   logical declaration is spread out across multiple places.  The most\n  //   obvious example is the \"extend\" block again -- there may be multiple\n  //   extend blocks in the same scope, each of which will have the same path.\n  // - A location's span is not always a subset of its parent's span.  For\n  //   example, the \"extendee\" of an extension declaration appears at the\n  //   beginning of the \"extend\" block and is shared by all extensions within\n  //   the block.\n  // - Just because a location's span is a subset of some other location's span\n  //   does not mean that it is a descendant.  For example, a \"group\" defines\n  //   both a type and a field in a single declaration.  Thus, the locations\n  //   corresponding to the type and field and their components will overlap.\n  // - Code which tries to interpret locations should probably be designed to\n  //   ignore those that it doesn't understand, as more types of locations could\n  //   be recorded in the future.\n  repeated Location location = 1;\n  message Location {\n    // Identifies which part of the FileDescriptorProto was defined at this\n    // location.\n    //\n    // Each element is a field number or an index.  They form a path from\n    // the root FileDescriptorProto to the place where the definition appears.\n    // For example, this path:\n    //   [ 4, 3, 2, 7, 1 ]\n    // refers to:\n    //   file.message_type(3)  // 4, 3\n    //       .field(7)         // 2, 7\n    //       .name()           // 1\n    // This is because FileDescriptorProto.message_type has field number 4:\n    //   repeated DescriptorProto message_type = 4;\n    // and DescriptorProto.field has field number 2:\n    //   repeated FieldDescriptorProto field = 2;\n    // and FieldDescriptorProto.name has field number 1:\n    //   optional string name = 1;\n    //\n    // Thus, the above path gives the location of a field name.  If we removed\n    // the last element:\n    //   [ 4, 3, 2, 7 ]\n    // this path refers to the whole field declaration (from the beginning\n    // of the label to the terminating semicolon).\n    repeated int32 path = 1 [packed = true];\n\n    // Always has exactly three or four elements: start line, start column,\n    // end line (optional, otherwise assumed same as start line), end column.\n    // These are packed into a single field for efficiency.  Note that line\n    // and column numbers are zero-based -- typically you will want to add\n    // 1 to each before displaying to a user.\n    repeated int32 span = 2 [packed = true];\n\n    // If this SourceCodeInfo represents a complete declaration, these are any\n    // comments appearing before and after the declaration which appear to be\n    // attached to the declaration.\n    //\n    // A series of line comments appearing on consecutive lines, with no other\n    // tokens appearing on those lines, will be treated as a single comment.\n    //\n    // leading_detached_comments will keep paragraphs of comments that appear\n    // before (but not connected to) the current element. Each paragraph,\n    // separated by empty lines, will be one comment element in the repeated\n    // field.\n    //\n    // Only the comment content is provided; comment markers (e.g. //) are\n    // stripped out.  For block comments, leading whitespace and an asterisk\n    // will be stripped from the beginning of each line other than the first.\n    // Newlines are included in the output.\n    //\n    // Examples:\n    //\n    //   optional int32 foo = 1;  // Comment attached to foo.\n    //   // Comment attached to bar.\n    //   optional int32 bar = 2;\n    //\n    //   optional string baz = 3;\n    //   // Comment attached to baz.\n    //   // Another line attached to baz.\n    //\n    //   // Comment attached to moo.\n    //   //\n    //   // Another line attached to moo.\n    //   optional double moo = 4;\n    //\n    //   // Detached comment for corge. This is not leading or trailing comments\n    //   // to moo or corge because there are blank lines separating it from\n    //   // both.\n    //\n    //   // Detached comment for corge paragraph 2.\n    //\n    //   optional string corge = 5;\n    //   /* Block comment attached\n    //    * to corge.  Leading asterisks\n    //    * will be removed. */\n    //   /* Block comment attached to\n    //    * grault. */\n    //   optional int32 grault = 6;\n    //\n    //   // ignored detached comments.\n    optional string leading_comments = 3;\n    optional string trailing_comments = 4;\n    repeated string leading_detached_comments = 6;\n  }\n\n  // Extensions for tooling.\n  extensions 536000000 [declaration = {\n    number: 536000000\n    type: \".buf.descriptor.v1.SourceCodeInfoExtension\"\n    full_name: \".buf.descriptor.v1.buf_source_code_info_extension\"\n  }];\n}\n\n// Describes the relationship between generated code and its original source\n// file. A GeneratedCodeInfo message is associated with only one generated\n// source file, but may contain references to different source .proto files.\nmessage GeneratedCodeInfo {\n  // An Annotation connects some span of text in generated code to an element\n  // of its generating .proto file.\n  repeated Annotation annotation = 1;\n  message Annotation {\n    // Identifies the element in the original source .proto file. This field\n    // is formatted the same as SourceCodeInfo.Location.path.\n    repeated int32 path = 1 [packed = true];\n\n    // Identifies the filesystem path to the original source .proto.\n    optional string source_file = 2;\n\n    // Identifies the starting offset in bytes in the generated code\n    // that relates to the identified object.\n    optional int32 begin = 3;\n\n    // Identifies the ending offset in bytes in the generated code that\n    // relates to the identified object. The end offset should be one past\n    // the last relevant byte (so the length of the text = end - begin).\n    optional int32 end = 4;\n\n    // Represents the identified object's effect on the element in the original\n    // .proto file.\n    enum Semantic {\n      // There is no effect or the effect is indescribable.\n      NONE = 0;\n      // The element is set or otherwise mutated.\n      SET = 1;\n      // An alias to the element is returned.\n      ALIAS = 2;\n    }\n    optional Semantic semantic = 5;\n  }\n}\n\n// Describes the 'visibility' of a symbol with respect to the proto import\n// system. Symbols can only be imported when the visibility rules do not prevent\n// it (ex: local symbols cannot be imported).  Visibility modifiers can only set\n// on `message` and `enum` as they are the only types available to be referenced\n// from other files.\nenum SymbolVisibility {\n  VISIBILITY_UNSET = 0;\n  VISIBILITY_LOCAL = 1;\n  VISIBILITY_EXPORT = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/protos/google/protobuf/unittest_features.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2023 Google Inc.  All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file or at\n// https://developers.google.com/open-source/licenses/bsd\n\nedition = \"2024\";\n\npackage pb;\n\nimport \"google/protobuf/descriptor.proto\";\n\noption java_outer_classname = \"UnittestFeatures\";\n\nextend google.protobuf.FeatureSet {\n  TestFeatures test = 9999;\n}\n\nmessage TestMessage {\n  extend google.protobuf.FeatureSet {\n    TestFeatures test_message = 9998;\n  }\n  message Nested {\n    extend google.protobuf.FeatureSet {\n      TestFeatures test_nested = 9997;\n    }\n  }\n}\n\nenum EnumFeature {\n  TEST_ENUM_FEATURE_UNKNOWN = 0;\n  VALUE1 = 1;\n  VALUE2 = 2;\n  VALUE3 = 3;\n  VALUE4 = 4;\n  VALUE5 = 5;\n  VALUE6 = 6;\n  VALUE7 = 7;\n  VALUE8 = 8;\n  VALUE9 = 9;\n  VALUE10 = 10;\n  VALUE11 = 11;\n  VALUE12 = 12;\n  VALUE13 = 13;\n  VALUE14 = 14;\n  VALUE15 = 15;\n}\n\nenum ValueLifetimeFeature {\n  TEST_VALUE_LIFETIME_UNKNOWN = 0;\n  VALUE_LIFETIME_INHERITED = 1;\n  VALUE_LIFETIME_SUPPORT = 2 [feature_support = {\n    edition_introduced: EDITION_99997_TEST_ONLY\n    edition_deprecated: EDITION_99998_TEST_ONLY\n    deprecation_warning: \"Custom feature deprecation warning\"\n    edition_removed: EDITION_99999_TEST_ONLY\n  }];\n  VALUE_LIFETIME_EMPTY_SUPPORT = 3 [feature_support = {}];\n  VALUE_LIFETIME_FUTURE = 4\n      [feature_support.edition_introduced = EDITION_99997_TEST_ONLY];\n  VALUE_LIFETIME_DEPRECATED = 5 [feature_support = {\n    edition_deprecated: EDITION_99997_TEST_ONLY\n    deprecation_warning: \"Custom feature deprecation warning\"\n  }];\n  VALUE_LIFETIME_REMOVED = 6 [feature_support = {\n    edition_deprecated: EDITION_2023\n    edition_removed: EDITION_99997_TEST_ONLY\n  }];\n}\n\nmessage TestFeatures {\n  EnumFeature file_feature = 1 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FILE,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" },\n    edition_defaults = { edition: EDITION_PROTO3, value: \"VALUE2\" },\n    edition_defaults = { edition: EDITION_2023, value: \"VALUE3\" },\n    edition_defaults = { edition: EDITION_99997_TEST_ONLY, value: \"VALUE4\" },\n    edition_defaults = { edition: EDITION_99998_TEST_ONLY, value: \"VALUE5\" }\n  ];\n  EnumFeature extension_range_feature = 2 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_EXTENSION_RANGE,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n  EnumFeature message_feature = 3 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_MESSAGE,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n  EnumFeature field_feature = 4 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FIELD,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n  EnumFeature oneof_feature = 5 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_ONEOF,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n  EnumFeature enum_feature = 6 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_ENUM,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n  EnumFeature enum_entry_feature = 7 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_ENUM_ENTRY,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n  EnumFeature service_feature = 8 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_SERVICE,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n  EnumFeature method_feature = 9 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_METHOD,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n  EnumFeature multiple_feature = 10 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FILE,\n    targets = TARGET_TYPE_FIELD,\n    targets = TARGET_TYPE_MESSAGE,\n    targets = TARGET_TYPE_ENUM,\n    targets = TARGET_TYPE_ENUM_ENTRY,\n    targets = TARGET_TYPE_SERVICE,\n    targets = TARGET_TYPE_METHOD,\n    targets = TARGET_TYPE_ONEOF,\n    targets = TARGET_TYPE_EXTENSION_RANGE,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n\n  bool bool_field_feature = 11 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FIELD,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"false\" },\n    edition_defaults = { edition: EDITION_99997_TEST_ONLY, value: \"true\" }\n  ];\n\n  EnumFeature source_feature = 15 [\n    retention = RETENTION_SOURCE,\n    targets = TARGET_TYPE_FILE,\n    targets = TARGET_TYPE_FIELD,\n    targets = TARGET_TYPE_MESSAGE,\n    targets = TARGET_TYPE_ENUM,\n    targets = TARGET_TYPE_ENUM_ENTRY,\n    targets = TARGET_TYPE_SERVICE,\n    targets = TARGET_TYPE_METHOD,\n    targets = TARGET_TYPE_ONEOF,\n    targets = TARGET_TYPE_EXTENSION_RANGE,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n\n  EnumFeature source_feature2 = 16 [\n    retention = RETENTION_SOURCE,\n    targets = TARGET_TYPE_FILE,\n    targets = TARGET_TYPE_FIELD,\n    targets = TARGET_TYPE_MESSAGE,\n    targets = TARGET_TYPE_ENUM,\n    targets = TARGET_TYPE_ENUM_ENTRY,\n    targets = TARGET_TYPE_SERVICE,\n    targets = TARGET_TYPE_METHOD,\n    targets = TARGET_TYPE_ONEOF,\n    targets = TARGET_TYPE_EXTENSION_RANGE,\n    feature_support.edition_introduced = EDITION_2023,\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" }\n  ];\n\n  EnumFeature removed_feature = 17 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FILE,\n    targets = TARGET_TYPE_FIELD,\n    feature_support = {\n      edition_introduced: EDITION_2023\n      edition_deprecated: EDITION_2023\n      deprecation_warning: \"Custom feature deprecation warning\"\n      edition_removed: EDITION_2024\n    },\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" },\n    edition_defaults = { edition: EDITION_2023, value: \"VALUE2\" },\n    edition_defaults = { edition: EDITION_2024, value: \"VALUE3\" }\n  ];\n\n  EnumFeature future_feature = 18 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FILE,\n    targets = TARGET_TYPE_FIELD,\n    feature_support = { edition_introduced: EDITION_2024 },\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" },\n    edition_defaults = { edition: EDITION_2024, value: \"VALUE2\" }\n  ];\n\n  EnumFeature legacy_feature = 19 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FILE,\n    targets = TARGET_TYPE_FIELD,\n    feature_support = {\n      edition_introduced: EDITION_PROTO3\n      edition_removed: EDITION_2023\n    },\n    edition_defaults = { edition: EDITION_LEGACY, value: \"VALUE1\" },\n    edition_defaults = { edition: EDITION_2023, value: \"VALUE2\" }\n  ];\n\n  ValueLifetimeFeature value_lifetime_feature = 20 [\n    retention = RETENTION_RUNTIME,\n    targets = TARGET_TYPE_FILE,\n    feature_support = {\n      edition_introduced: EDITION_2023\n      edition_deprecated: EDITION_99998_TEST_ONLY\n      deprecation_warning: \"Custom feature deprecation warning\"\n      edition_removed: EDITION_99999_TEST_ONLY\n    },\n    edition_defaults = {\n      edition: EDITION_LEGACY,\n      value: \"VALUE_LIFETIME_INHERITED\"\n    },\n    // Verify edition defaults can use future values.\n    edition_defaults = {\n      edition: EDITION_2023,\n      value: \"VALUE_LIFETIME_FUTURE\"\n    },\n    // Verify edition defaults can use removed values.\n    edition_defaults = {\n      edition: EDITION_99999_TEST_ONLY,\n      value: \"VALUE_LIFETIME_FUTURE\"\n    }\n  ];\n}\n"
  },
  {
    "path": "protoc_plugin/pubspec.yaml",
    "content": "name: protoc_plugin\nversion: 25.0.0\ndescription: A protobuf protoc compiler plugin used to generate Dart code.\nrepository: https://github.com/google/protobuf.dart/tree/master/protoc_plugin\n\nenvironment:\n  # Note: keep this in sync with the SDK version in lib/src/formatter.dart.\n  sdk: ^3.7.0\n\nresolution: workspace\n\ndependencies:\n  collection: ^1.15.0\n  dart_style: ^3.0.0\n  fixnum: ^1.0.0\n  path: ^1.8.0\n  protobuf: ^6.0.0\n  pub_semver: ^2.2.0\n\ndev_dependencies:\n  lints: '>=5.0.0 <7.0.0'\n  test: ^1.16.0\n\nexecutables:\n  protoc-gen-dart: protoc_plugin\n"
  },
  {
    "path": "protoc_plugin/test/any_test.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/any.pb.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/service.pb.dart';\nimport 'gen/toplevel.pb.dart' as toplevel;\nimport 'gen/using_any.pb.dart';\n\nvoid main() {\n  test('pack -> unpack', () {\n    final any = Any.pack(SearchRequest()..query = 'hest');\n    expect(any.typeUrl, 'type.googleapis.com/service.SearchRequest');\n    final any1 = Any.pack(\n      SearchRequest()..query = 'hest1',\n      typeUrlPrefix: 'example.com',\n    );\n    expect(any1.typeUrl, 'example.com/service.SearchRequest');\n    expect(any1.canUnpackInto(SearchRequest.getDefault()), true);\n    expect(any1.canUnpackInto(SearchResponse.getDefault()), false);\n    final searchRequest = any.unpackInto(SearchRequest());\n    expect(searchRequest.query, 'hest');\n    final searchRequest1 = any1.unpackInto(SearchRequest());\n    expect(searchRequest1.query, 'hest1');\n    expect(() {\n      any.unpackInto(SearchResponse());\n    }, throwsA(const TypeMatcher<InvalidProtocolBufferException>()));\n  });\n\n  test('any inside any', () {\n    final any = Any.pack(Any.pack(SearchRequest()..query = 'hest'));\n    expect(any.typeUrl, 'type.googleapis.com/google.protobuf.Any');\n    expect(any.canUnpackInto(Any.getDefault()), true);\n    expect(any.canUnpackInto(SearchRequest.getDefault()), false);\n    expect(\n      any.unpackInto(Any()).canUnpackInto(SearchRequest.getDefault()),\n      true,\n    );\n    expect(any.unpackInto(Any()).unpackInto(SearchRequest()).query, 'hest');\n  });\n\n  test('toplevel', () {\n    final any = Any.pack(\n      toplevel.T()\n        ..a = 127\n        ..b = 'hest',\n    );\n    expect(any.typeUrl, 'type.googleapis.com/toplevel.T');\n    final t2 = any.unpackInto(toplevel.T());\n    expect(t2.a, 127);\n    expect(t2.b, 'hest');\n  });\n\n  test('nested message', () {\n    final any = Any.pack(Container_Nested()..int32Value = 127);\n    expect(\n      any.typeUrl,\n      'type.googleapis.com/protobuf_unittest.Container.Nested',\n    );\n    final t2 = any.unpackInto(Container_Nested());\n    expect(t2.int32Value, 127);\n  });\n\n  test('using any', () {\n    final any = Any.pack(SearchRequest()..query = 'hest');\n    final any1 = Any.pack(SearchRequest()..query = 'hest1');\n    final any2 = Any.pack(SearchRequest()..query = 'hest2');\n    final testAny =\n        TestAny()\n          ..anyValue = any\n          ..repeatedAnyValue.addAll(<Any>[any1, any2]);\n    final testAnyFromBuffer = TestAny.fromBuffer(testAny.writeToBuffer());\n    expect(\n      testAnyFromBuffer.anyValue.unpackInto(SearchRequest()).query,\n      'hest',\n    );\n    expect(\n      testAnyFromBuffer.repeatedAnyValue[0].unpackInto(SearchRequest()).query,\n      'hest1',\n    );\n    expect(\n      testAnyFromBuffer.repeatedAnyValue[1].unpackInto(SearchRequest()).query,\n      'hest2',\n    );\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/bazel_test.dart",
    "content": "// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protoc_plugin/bazel.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group('BazelOptionParser', () {\n    late BazelOptionParser optionParser;\n    late Map<String, BazelPackage> packages;\n    late List<String> errors;\n    final optionName = 'name';\n    setUp(() {\n      packages = {};\n      optionParser = BazelOptionParser(packages);\n      errors = [];\n    });\n\n    void onError(String message) {\n      errors.add(message);\n    }\n\n    test('should call onError for null values', () {\n      optionParser.parse(optionName, null, onError);\n      expect(errors, isNotEmpty);\n    });\n\n    test('should call onError for empty values', () {\n      optionParser.parse(optionName, '', onError);\n      expect(errors, isNotEmpty);\n    });\n\n    test('should call onError for malformed entries', () {\n      optionParser.parse(optionName, 'foo', onError);\n      optionParser.parse(optionName, 'foo|bar', onError);\n      optionParser.parse(optionName, 'foo|bar|baz|quux', onError);\n      expect(errors.length, 3);\n      expect(packages, isEmpty);\n    });\n\n    test('should handle a single package|path entry', () {\n      optionParser.parse(optionName, 'foo|bar/baz|wibble/wobble', onError);\n      expect(errors, isEmpty);\n      expect(packages.length, 1);\n      expect(packages['bar/baz']!.name, 'foo');\n      expect(packages['bar/baz']!.inputRoot, 'bar/baz');\n      expect(packages['bar/baz']!.outputRoot, 'wibble/wobble');\n    });\n\n    test('should handle multiple package|path entries', () {\n      optionParser.parse(\n        optionName,\n        'foo|bar/baz|wibble/wobble;a|b/c/d|e/f;one.two|three|four/five',\n        onError,\n      );\n      expect(errors, isEmpty);\n      expect(packages.length, 3);\n      expect(packages['bar/baz']!.name, 'foo');\n      expect(packages['bar/baz']!.inputRoot, 'bar/baz');\n      expect(packages['bar/baz']!.outputRoot, 'wibble/wobble');\n      expect(packages['b/c/d']!.name, 'a');\n      expect(packages['b/c/d']!.inputRoot, 'b/c/d');\n      expect(packages['b/c/d']!.outputRoot, 'e/f');\n      expect(packages['three']!.name, 'one.two');\n      expect(packages['three']!.inputRoot, 'three');\n      expect(packages['three']!.outputRoot, 'four/five');\n    });\n\n    test('should skip and continue past malformed entries', () {\n      optionParser.parse(\n        optionName,\n        'foo|bar/baz|wibble/wobble;fizz;a.b|c/d|e/f;x|y|zz|y',\n        onError,\n      );\n      expect(errors.length, 2);\n      expect(packages.length, 2);\n      expect(packages['bar/baz']!.name, 'foo');\n      expect(packages['c/d']!.name, 'a.b');\n    });\n\n    test('should emit error for conflicting package names', () {\n      optionParser.parse(\n        optionName,\n        'foo|bar/baz|wibble/wobble;flob|bar/baz|wibble/wobble',\n        onError,\n      );\n      expect(errors.length, 1);\n      expect(packages.length, 1);\n      expect(packages['bar/baz']!.name, 'foo');\n    });\n\n    test('should emit error for conflicting outputRoots', () {\n      optionParser.parse(\n        optionName,\n        'foo|bar/baz|wibble/wobble;foo|bar/baz|womble/wumble',\n        onError,\n      );\n      expect(errors.length, 1);\n      expect(packages.length, 1);\n      expect(packages['bar/baz']!.outputRoot, 'wibble/wobble');\n    });\n\n    test('should normalize paths', () {\n      optionParser.parse(\n        optionName,\n        'foo|bar//baz/|quux/;a|b/|c;c|d//e/f///|g//h//',\n        onError,\n      );\n      expect(errors, isEmpty);\n      expect(packages.length, 3);\n      expect(packages['bar/baz']!.name, 'foo');\n      expect(packages['bar/baz']!.inputRoot, 'bar/baz');\n      expect(packages['bar/baz']!.outputRoot, 'quux');\n      expect(packages['b']!.name, 'a');\n      expect(packages['b']!.inputRoot, 'b');\n      expect(packages['b']!.outputRoot, 'c');\n      expect(packages['d/e/f']!.name, 'c');\n      expect(packages['d/e/f']!.inputRoot, 'd/e/f');\n      expect(packages['d/e/f']!.outputRoot, 'g/h');\n    });\n  });\n\n  group('BazelOutputConfiguration', () {\n    Map<String, BazelPackage> packages;\n    late BazelOutputConfiguration config;\n\n    setUp(() {\n      packages = {\n        'foo/bar': BazelPackage('a.b.c', 'foo/bar', 'baz/flob'),\n        'foo/bar/baz': BazelPackage('d.e.f', 'foo/bar/baz', 'baz/flob/foo'),\n        'wibble/wobble': BazelPackage(\n          'wibble.wobble',\n          'wibble/wobble',\n          'womble/wumble',\n        ),\n      };\n      config = BazelOutputConfiguration(packages);\n    });\n\n    group('outputPathForUri', () {\n      test('should handle files at package root', () {\n        final p = config.outputPathFor(\n          Uri.parse('foo/bar/quux.proto'),\n          '.pb.dart',\n        );\n        expect(p.path, 'baz/flob/quux.pb.dart');\n      });\n\n      test('should handle files below package root', () {\n        final p = config.outputPathFor(\n          Uri.parse('foo/bar/a/b/quux.proto'),\n          '.pb.dart',\n        );\n        expect(p.path, 'baz/flob/a/b/quux.pb.dart');\n      });\n\n      test('should handle files in a nested package root', () {\n        final p = config.outputPathFor(\n          Uri.parse('foo/bar/baz/quux.proto'),\n          '.pb.dart',\n        );\n        expect(p.path, 'baz/flob/foo/quux.pb.dart');\n      });\n\n      test('should handle files below a nested package root', () {\n        final p = config.outputPathFor(\n          Uri.parse('foo/bar/baz/a/b/quux.proto'),\n          '.pb.dart',\n        );\n        expect(p.path, 'baz/flob/foo/a/b/quux.pb.dart');\n      });\n\n      test('should throw if unable to locate the package for an input', () {\n        expect(\n          () => config.outputPathFor(Uri.parse('a/b/c/quux.proto'), '.pb.dart'),\n          throwsArgumentError,\n        );\n      });\n    });\n\n    group('resolveImport', () {\n      test('should emit relative import if in same package', () {\n        final target = Uri.parse('foo/bar/quux.proto');\n        final source = Uri.parse('foo/bar/baz.proto');\n        final uri = config.resolveImport(target, source, '.pb.dart');\n        expect(uri.path, 'quux.pb.dart');\n      });\n\n      test('should emit relative import if in subdir of same package', () {\n        final target = Uri.parse('foo/bar/a/b/quux.proto');\n        final source = Uri.parse('foo/bar/baz.proto');\n        final uri = config.resolveImport(target, source, '.pb.dart');\n        expect(uri.path, 'a/b/quux.pb.dart');\n      });\n\n      test('should emit relative import if in parent dir in same package', () {\n        final target = Uri.parse('foo/bar/quux.proto');\n        final source = Uri.parse('foo/bar/a/b/baz.proto');\n        final uri = config.resolveImport(target, source, '.pb.dart');\n        expect(uri.path, '../../quux.pb.dart');\n      });\n\n      test('should emit package: import if in different package', () {\n        final target = Uri.parse('wibble/wobble/quux.proto');\n        final source = Uri.parse('foo/bar/baz.proto');\n        final uri = config.resolveImport(target, source, '.pb.dart');\n        expect(uri.scheme, 'package');\n        expect(uri.path, 'wibble.wobble/quux.pb.dart');\n      });\n\n      test('should emit package: import if in subdir of different package', () {\n        final target = Uri.parse('wibble/wobble/foo/bar/quux.proto');\n        final source = Uri.parse('foo/bar/baz.proto');\n        final uri = config.resolveImport(target, source, '.pb.dart');\n        expect(uri.scheme, 'package');\n        expect(uri.path, 'wibble.wobble/foo/bar/quux.pb.dart');\n      });\n\n      test('should throw if target is in unknown package', () {\n        final target = Uri.parse('flob/flub/quux.proto');\n        final source = Uri.parse('foo/bar/baz.proto');\n        expect(\n          () => config.resolveImport(target, source, '.pb.dart'),\n          throwsA(startsWith('ERROR: cannot generate import for')),\n        );\n      });\n    });\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/client_generator_test.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n@TestOn('vm')\nlibrary;\n\nimport 'package:protoc_plugin/indenting_writer.dart';\nimport 'package:protoc_plugin/protoc.dart';\nimport 'package:protoc_plugin/src/linker.dart';\nimport 'package:protoc_plugin/src/options.dart';\nimport 'package:test/test.dart';\n\nimport 'src/golden_file.dart';\nimport 'src/service_util.dart';\nimport 'src/test_features.dart';\n\nvoid main() {\n  test('testClientGenerator', () {\n    final options = GenerationOptions();\n    final fd = buildFileDescriptor('testpkg', 'testpkg.proto', [\n      'SomeRequest',\n      'SomeReply',\n    ]);\n    fd.service.add(buildServiceDescriptor());\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n\n    final fd2 = buildFileDescriptor('foo.bar', 'foobar.proto', [\n      'EmptyMessage',\n      'AnotherReply',\n    ]);\n    final fg2 = FileGenerator(testEditionDefaults, fd2, options);\n\n    link(GenerationOptions(), [fg, fg2]);\n\n    final cag = fg.clientApiGenerators[0];\n\n    final writer = IndentingWriter();\n    cag.generate(writer);\n    expectGolden(writer.emitSource(format: true), 'client.pb.dart');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/coded_buffer_test.dart",
    "content": "// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/entity.pb.dart';\n\nvoid main() {\n  test('Does not reuse input buffer for bytes fields', () {\n    final message = BytesEntity()..value = [1, 2, 3];\n    final bytes = message.writeToBuffer();\n    final deserialized1 = BytesEntity()..mergeFromBuffer(bytes);\n    final deserialized2 = BytesEntity()..mergeFromBuffer(bytes);\n    deserialized1.value[0] = 100;\n    expect(deserialized1.value[0], 100);\n    expect(deserialized2.value[0], 1);\n  });\n\n  test('Does not reuse input buffer for repeated bytes fields', () {\n    final message = BytesEntity()..values.add([1, 2, 3]);\n    final bytes = message.writeToBuffer();\n    final deserialized1 = BytesEntity()..mergeFromBuffer(bytes);\n    final deserialized2 = BytesEntity()..mergeFromBuffer(bytes);\n    deserialized1.values.first[0] = 100;\n    expect(deserialized1.values.first[0], 100);\n    expect(deserialized2.values.first[0], 1);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/const_generator_test.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protoc_plugin/const_generator.dart';\nimport 'package:protoc_plugin/indenting_writer.dart';\nimport 'package:test/test.dart';\n\nString toConst(Object? val) {\n  final out = IndentingWriter();\n  writeJsonConst(out, val);\n  return out.emitSource(format: false);\n}\n\nvoid main() {\n  test('writeJsonConst examples', () {\n    expect(toConst(null), 'null');\n    expect(toConst(true), 'true');\n    expect(toConst(false), 'false');\n    expect(toConst(123), '123');\n    expect(toConst(123.456), '123.456');\n  });\n\n  test('writeJsonConst string examples', () {\n    expect(toConst(''), \"''\");\n    expect(toConst('hello'), \"'hello'\");\n    expect(toConst(r'backslash: \\'), r\"'backslash: \\\\'\");\n    expect(toConst(r'hello $world'), r\"'hello \\$world'\");\n    expect(toConst(\"She said, 'hello.'\"), r\"'She said, \\'hello.\\''\");\n    expect(toConst('single: \\' double: \"'), r\"\"\"'single: \\' double: \"'\"\"\");\n    expect(\n      toConst(\"\"\"single: ' double: '' triple: '''\"\"\"),\n      r\"'single: \\' double: \\'\\' triple: \\'\\'\\''\",\n    );\n    expect(\n      toConst(\"\"\"single: ' double: \" triples: ''' and \\\"\\\"\\\"!\"\"\"),\n      r\"\"\"'single: \\' double: \" triples: \\'\\'\\' and \"\"\"\n      '\"\"\"!\\'',\n    );\n  });\n\n  test('writeJsonConst list examples', () {\n    expect(toConst([]), '[]');\n    expect(toConst([1, 2, 3]), '[1, 2, 3]');\n    expect(\n      toConst([\n        [1, 2],\n        [3, 4],\n      ]),\n      '[\\n'\n      '  [1, 2],\\n'\n      '  [3, 4],\\n'\n      ']',\n    );\n  });\n\n  test('writeJsonConst map examples', () {\n    expect(toConst({}), '{}');\n    expect(toConst({'a': 1, 'b': 2}), \"{'a': 1, 'b': 2}\");\n    expect(\n      toConst({\n        'a': {'x': 1},\n        'b': {'x': 2},\n      }),\n      '{\\n'\n      \"  'a': {'x': 1},\\n\"\n      \"  'b': {'x': 2},\\n\"\n      '}',\n    );\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/constructor_args_test.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\nimport 'gen/google/protobuf/unittest_import.pb.dart';\nimport 'gen/map_field.pb.dart';\nimport 'src/test_util.dart';\n\nvoid main() {\n  group('map_field', () {\n    test('Constructor map arguments accept key-value iterators', () {\n      final msg = TestMap(\n        stringToInt32Field: [\n          MapEntry('a', 1),\n          MapEntry('b', 2),\n          MapEntry('a', 3),\n        ],\n        int32ToStringField: {1: 'hi'}.entries,\n      );\n      expect(msg.stringToInt32Field['a'], 3);\n      expect(msg.stringToInt32Field['b'], 2);\n      expect(msg.int32ToStringField[1], 'hi');\n    });\n  });\n\n  group('generated_message', () {\n    test('Named arguments in constructors', () {\n      final value = TestAllTypes(\n        optionalInt32: 101,\n        optionalInt64: make64(102),\n        optionalUint32: 103,\n        optionalUint64: make64(104),\n        optionalSint32: 105,\n        optionalSint64: make64(106),\n        optionalFixed32: 107,\n        optionalFixed64: make64(108),\n        optionalSfixed32: 109,\n        optionalSfixed64: make64(110),\n        optionalFloat: 111.0,\n        optionalDouble: 112.0,\n        optionalBool: true,\n        optionalString: '115',\n        optionalBytes: '116'.codeUnits,\n        optionalgroup: TestAllTypes_OptionalGroup(a: 117),\n        optionalNestedMessage: TestAllTypes_NestedMessage(bb: 118),\n        optionalForeignMessage: ForeignMessage(c: 119),\n        optionalImportMessage: ImportMessage(d: 120),\n        optionalNestedEnum: TestAllTypes_NestedEnum.BAZ,\n        optionalForeignEnum: ForeignEnum.FOREIGN_BAZ,\n        optionalImportEnum: ImportEnum.IMPORT_BAZ,\n        optionalStringPiece: '124',\n        optionalCord: '125',\n        repeatedInt32: [201, 301],\n        repeatedInt64: [make64(202), make64(302)],\n        repeatedUint32: [203, 303],\n        repeatedUint64: [make64(204), make64(304)],\n        repeatedSint32: [205, 305],\n        repeatedSint64: [make64(206), make64(306)],\n        repeatedFixed32: [207, 307],\n        repeatedFixed64: [make64(208), make64(308)],\n        repeatedSfixed32: [209, 309],\n        repeatedSfixed64: [make64(210), make64(310)],\n        repeatedFloat: [211.0, 311.0],\n        repeatedDouble: [212.0, 312.0],\n        repeatedBool: [true, false],\n        repeatedString: ['215', '315'],\n        repeatedBytes: ['216'.codeUnits, '316'.codeUnits],\n        repeatedgroup: [\n          TestAllTypes_RepeatedGroup(a: 217),\n          TestAllTypes_RepeatedGroup(a: 317),\n        ],\n        repeatedNestedMessage: [\n          TestAllTypes_NestedMessage(bb: 218),\n          TestAllTypes_NestedMessage(bb: 318),\n        ],\n        repeatedForeignMessage: [\n          ForeignMessage(c: 219),\n          ForeignMessage(c: 319),\n        ],\n        repeatedImportMessage: [ImportMessage(d: 220), ImportMessage(d: 320)],\n        repeatedNestedEnum: [\n          TestAllTypes_NestedEnum.BAR,\n          TestAllTypes_NestedEnum.BAZ,\n        ],\n        repeatedForeignEnum: [ForeignEnum.FOREIGN_BAR, ForeignEnum.FOREIGN_BAZ],\n        repeatedImportEnum: [ImportEnum.IMPORT_BAR, ImportEnum.IMPORT_BAZ],\n        repeatedStringPiece: ['224', '324'],\n        repeatedCord: ['225', '325'],\n        defaultInt32: 401,\n        defaultInt64: make64(402),\n        defaultUint32: 403,\n        defaultUint64: make64(404),\n        defaultSint32: 405,\n        defaultSint64: make64(406),\n        defaultFixed32: 407,\n        defaultFixed64: make64(408),\n        defaultSfixed32: 409,\n        defaultSfixed64: make64(410),\n        defaultFloat: 411.0,\n        defaultDouble: 412.0,\n        defaultBool: false,\n        defaultString: '415',\n        defaultBytes: '416'.codeUnits,\n        defaultNestedEnum: TestAllTypes_NestedEnum.FOO,\n        defaultForeignEnum: ForeignEnum.FOREIGN_FOO,\n        defaultImportEnum: ImportEnum.IMPORT_FOO,\n        defaultStringPiece: '424',\n        defaultCord: '425',\n      );\n\n      // Convert the message with constructor arguments to the message without\n      // constructor arguments, to be able to reuse `assertAllFieldsSet`.\n      assertAllFieldsSet(TestAllTypes.fromBuffer(value.writeToBuffer()));\n    });\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/default_value_escape_test.dart",
    "content": "// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/default_value_escape.pb.dart';\n\nvoid main() {\n  test('default values are escaped properly', () {\n    final f = F();\n    expect(f.a, 'a\\nb');\n    expect(f.b, 'a\\'b');\n    expect(f.c, 'a\"b');\n    expect(f.d, 'a\\$b');\n    expect(f.e, 'a\\\\b');\n    expect(f.f, 'a\\x00b');\n    expect(f.g, '🇺🇸');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/deprecations_test.dart",
    "content": "// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n@TestOn('vm')\nlibrary;\n\nimport 'dart:io';\n\nimport 'package:test/test.dart';\n\nimport 'src/golden_file.dart';\n\nvoid main() {\n  test('Deprecated annotation generation for messages', () {\n    final actual = File('test/gen/deprecations.pb.dart').readAsStringSync();\n    expectGolden(actual, 'deprecations.pb.dart');\n  });\n\n  test('Deprecated annotation generation for enums', () {\n    final actual = File('test/gen/deprecations.pbenum.dart').readAsStringSync();\n    expectGolden(actual, 'deprecations.pbenum.dart');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/descriptor_test.dart",
    "content": "// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/custom_option.pb.dart';\nimport 'gen/custom_option.pbjson.dart';\nimport 'gen/google/protobuf/unittest.pbjson.dart';\n\nvoid main() {\n  test('Can decode message descriptor', () {\n    final descriptor = DescriptorProto.fromBuffer(testAllTypesDescriptor);\n    expect(descriptor.name, 'TestAllTypes');\n    final nestedEnumDescriptor = descriptor.enumType.first;\n    expect(nestedEnumDescriptor.name, 'NestedEnum');\n  });\n  test('Can decode enum descriptor', () {\n    final descriptor = EnumDescriptorProto.fromBuffer(foreignEnumDescriptor);\n    expect(descriptor.name, 'ForeignEnum');\n    expect(descriptor.value.map((v) => v.name), [\n      'FOREIGN_FOO',\n      'FOREIGN_BAR',\n      'FOREIGN_BAZ',\n      'FOREIGN_BAX',\n      'FOREIGN_LARGE',\n    ]);\n  });\n  test('Can decode service descriptor', () {\n    final descriptor = ServiceDescriptorProto.fromBuffer(testServiceDescriptor);\n    expect(descriptor.name, 'TestService');\n    expect(descriptor.method.map((m) => m.name), ['Foo', 'Bar']);\n  });\n  test('Can read custom options', () {\n    final registry = ExtensionRegistry()..add(Custom_option.myOption);\n    final descriptor = DescriptorProto.fromBuffer(\n      myMessageDescriptor,\n      registry,\n    );\n    final option = descriptor.options.getExtension(Custom_option.myOption);\n    expect(option, 'Hello world!');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/doc_comments_test.dart",
    "content": "// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n@TestOn('vm')\nlibrary;\n\nimport 'dart:io';\n\nimport 'package:test/test.dart';\n\nimport 'src/golden_file.dart';\n\nvoid main() {\n  test('Doc comment generation for messages', () {\n    final actual = File('test/gen/doc_comments.pb.dart').readAsStringSync();\n    expectGolden(actual, 'doc_comments.pb.dart');\n  });\n\n  test('Doc comment generation for enums', () {\n    final actual = File('test/gen/doc_comments.pbenum.dart').readAsStringSync();\n    expectGolden(actual, 'doc_comments.pbenum.dart');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/duration_test.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/duration.pb.dart'\n    as pb;\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('core duration -> proto duration', () {\n    final coreDuration = Duration(\n      days: 1,\n      hours: 2,\n      minutes: 3,\n      seconds: 4,\n      milliseconds: 5,\n      microseconds: 6,\n    );\n\n    final protoDuration = pb.Duration.fromDart(coreDuration);\n\n    expect(protoDuration.seconds, Int64(86400 + 3600 * 2 + 60 * 3 + 4));\n    expect(protoDuration.nanos, 5006000);\n  });\n\n  test('core duration -> proto duration -> core duration', () {\n    final coreDuration = Duration(\n      days: 1,\n      hours: 2,\n      minutes: 3,\n      seconds: 4,\n      milliseconds: 5,\n      microseconds: 6,\n    );\n\n    expect(pb.Duration.fromDart(coreDuration).toDart(), coreDuration);\n  });\n\n  test('proto duration -> core duration -> proto duration', () {\n    final protoDuration =\n        pb.Duration()\n          ..seconds = Int64(987654321)\n          ..nanos = 999999000;\n\n    expect(pb.Duration.fromDart(protoDuration.toDart()), protoDuration);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/enum_generator_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n@TestOn('vm')\nlibrary;\n\nimport 'package:protoc_plugin/indenting_writer.dart';\nimport 'package:protoc_plugin/protoc.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart';\nimport 'package:protoc_plugin/src/options.dart';\nimport 'package:test/test.dart';\n\nimport 'src/golden_file.dart';\nimport 'src/test_features.dart';\n\nvoid main() {\n  late FileDescriptorProto fd;\n  late EnumDescriptorProto ed;\n  late DescriptorProto md;\n\n  setUp(() async {\n    fd = FileDescriptorProto();\n    ed =\n        EnumDescriptorProto()\n          ..name = 'PhoneType'\n          ..value.addAll([\n            EnumValueDescriptorProto()\n              ..name = 'MOBILE'\n              ..number = 0,\n            EnumValueDescriptorProto()\n              ..name = 'HOME'\n              ..number = 1,\n            EnumValueDescriptorProto()\n              ..name = 'WORK'\n              ..number = 2,\n            EnumValueDescriptorProto()\n              ..name = 'BUSINESS'\n              ..number = 2,\n          ]);\n    md = DescriptorProto()..enumType.add(ed);\n  });\n\n  test('testEnumGenerator', () {\n    final writer = IndentingWriter(\n      generateMetadata: true,\n      fileName: 'sample.proto',\n    );\n    final fg = FileGenerator(\n      testEditionDefaults,\n      FileDescriptorProto(),\n      GenerationOptions(),\n    );\n    final eg = EnumGenerator.topLevel(ed, fg, <String>{}, 0);\n    eg.generate(writer);\n    expectGolden(writer.emitSource(format: false), 'enum.pbenum.dart');\n    expectGolden(writer.sourceLocationInfo.toString(), 'enum.pbenum.dart.meta');\n  });\n\n  test('EnumGenerator inherits from a parent file', () {\n    setTestFeature(fd, 1);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final eg = EnumGenerator.topLevel(ed, fg, <String>{}, 0);\n\n    expect(getTestFeature(eg.features), 1);\n  });\n\n  test('EnumGenerator inherits from a parent message', () {\n    setTestFeature(md, 1);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.nested(md, fg, {}, null, <String>{}, 0);\n    final eg = EnumGenerator.nested(ed, mg, <String>{}, 0);\n\n    expect(getTestFeature(eg.features), 1);\n  });\n\n  test('EnumGenerator can override parent file features', () {\n    setTestFeature(fd, 1);\n    setTestFeature(ed, 2);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final eg = EnumGenerator.topLevel(ed, fg, <String>{}, 0);\n\n    expect(getTestFeature(eg.features), 2);\n  });\n\n  test('EnumGenerator can override parent message features', () {\n    setTestFeature(md, 1);\n    setTestFeature(ed, 2);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.nested(md, fg, {}, null, <String>{}, 0);\n    final eg = EnumGenerator.nested(ed, mg, <String>{}, 0);\n\n    expect(getTestFeature(eg.features), 2);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/extension_generator_test.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n@TestOn('vm')\nlibrary;\n\nimport 'package:protoc_plugin/indenting_writer.dart';\nimport 'package:protoc_plugin/protoc.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/compiler/plugin.pb.dart'\n    as pb;\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart' as pb;\nimport 'package:protoc_plugin/src/linker.dart';\nimport 'package:protoc_plugin/src/options.dart';\nimport 'package:test/test.dart';\n\nimport 'src/golden_file.dart';\nimport 'src/test_features.dart';\n\npb.FieldDescriptorProto makeExtension() {\n  return pb.FieldDescriptorProto()\n    ..name = 'client_info'\n    ..jsonName = 'clientInfo'\n    ..number = 261486461\n    ..label = pb.FieldDescriptorProto_Label.LABEL_OPTIONAL\n    ..type = pb.FieldDescriptorProto_Type.TYPE_STRING\n    ..extendee = '.Card';\n}\n\nvoid main() {\n  test('testExtensionGenerator', () {\n    final extensionFieldDescriptor = makeExtension();\n    final messageDescriptor =\n        pb.DescriptorProto()\n          ..name = 'Card'\n          ..extension.add(extensionFieldDescriptor);\n    final fileDescriptor =\n        pb.FileDescriptorProto()\n          ..messageType.add(messageDescriptor)\n          ..extension.add(extensionFieldDescriptor);\n\n    final fileGenerator = FileGenerator(\n      testEditionDefaults,\n      fileDescriptor,\n      GenerationOptions(),\n    );\n    final options = parseGenerationOptions(\n      pb.CodeGeneratorRequest(),\n      pb.CodeGeneratorResponse(),\n    );\n    link(options, [fileGenerator]);\n    final writer = IndentingWriter(\n      generateMetadata: true,\n      fileName: 'sample.proto',\n    );\n    fileGenerator.extensionGenerators.single.generate(writer);\n\n    expectGolden(writer.emitSource(format: false), 'extension.pb.dart');\n    expectGolden(\n      writer.sourceLocationInfo.toString(),\n      'extension.pb.dart.meta',\n    );\n  });\n\n  test('ExtensionGenerator inherits from a parent file', () {\n    final ed = makeExtension();\n    final fd = setTestFeature(\n      pb.FileDescriptorProto()\n        ..edition = pb.Edition.EDITION_2023\n        ..extension.add(ed),\n      1,\n    );\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    fg.resolve(GenerationContext(GenerationOptions()));\n\n    expect(getTestFeature(fg.extensionGenerators.single.features), 1);\n  });\n\n  test('ExtensionGenerator can override parent file features', () {\n    final ed = setTestFeature(makeExtension(), 2);\n    final fd = setTestFeature(\n      pb.FileDescriptorProto()\n        ..edition = pb.Edition.EDITION_2023\n        ..extension.add(ed),\n      1,\n    );\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    fg.resolve(GenerationContext(GenerationOptions()));\n\n    expect(getTestFeature(fg.extensionGenerators.single.features), 2);\n  });\n\n  test('ExtensionGenerator inherits from a parent message', () {\n    final ed = makeExtension();\n    final md = setTestFeature(pb.DescriptorProto()..extension.add(ed), 1);\n    final fd =\n        pb.FileDescriptorProto()\n          ..edition = pb.Edition.EDITION_2023\n          ..messageType.add(md);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n    final eg = ExtensionGenerator.nested(ed, mg, {}, 0);\n    eg.resolve(GenerationContext(GenerationOptions()));\n\n    expect(getTestFeature(eg.features), 1);\n  });\n\n  test('ExtensionGenerator can override parent message features', () {\n    final ed = setTestFeature(makeExtension(), 2);\n    final md = setTestFeature(pb.DescriptorProto()..extension.add(ed), 1);\n    final fd =\n        pb.FileDescriptorProto()\n          ..edition = pb.Edition.EDITION_2023\n          ..messageType.add(md);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n    final eg = ExtensionGenerator.nested(ed, mg, {}, 0);\n    eg.resolve(GenerationContext(GenerationOptions()));\n\n    expect(getTestFeature(eg.features), 2);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/extension_test.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/ExtensionEnumNameConflict.pb.dart';\nimport 'gen/ExtensionNameConflict.pb.dart';\nimport 'gen/enum_extension.pb.dart';\nimport 'gen/extend_unittest.pb.dart';\nimport 'gen/google/protobuf/unittest.pb.dart';\nimport 'gen/nested_extension.pb.dart';\nimport 'gen/non_nested_extension.pb.dart';\nimport 'src/test_util.dart';\n\nMatcher throwsArgError(String expectedMessage) => throwsA(\n  predicate((dynamic x) {\n    expect(x, isArgumentError);\n    expect(x.message, expectedMessage);\n    return true;\n  }),\n);\n\nfinal withExtensions =\n    TestAllExtensions()\n      ..setExtension(\n        Unittest.optionalForeignMessageExtension,\n        ForeignMessage()..c = 3,\n      )\n      ..setExtension(Unittest.defaultStringExtension, 'bar')\n      ..getExtension(Unittest.repeatedBytesExtension).add('pop'.codeUnits)\n      ..setExtension(\n        Extend_unittest.outer,\n        Outer()\n          ..inner = (Inner()..value = 'abc')\n          ..setExtension(\n            Extend_unittest.extensionInner,\n            Inner()..value = 'def',\n          ),\n      );\n\nvoid main() {\n  test('can set all extension types', () {\n    final message = TestAllExtensions();\n    setAllExtensions(message);\n    assertAllExtensionsSet(message);\n  });\n\n  test('can modify all repeated extension types', () {\n    final message = TestAllExtensions();\n    setAllExtensions(message);\n    modifyRepeatedExtensions(message);\n    assertRepeatedExtensionsModified(message);\n  });\n\n  test('unset extensions return default values', () {\n    assertExtensionsClear(TestAllExtensions());\n  });\n\n  // void testExtensionReflectionGetters() {} // UNSUPPORTED -- reflection\n  // void testExtensionReflectionSetters() {} // UNSUPPORTED -- reflection\n  // void testExtensionReflectionSettersRejectNull() {} // UNSUPPORTED\n  // void testExtensionReflectionRepeatedSetters() {} // UNSUPPORTED\n  // void testExtensionReflectionRepeatedSettersRejectNull() // UNSUPPORTED\n  // void testExtensionReflectionDefaults() // UNSUPPORTED\n\n  test('can clear an optional extension', () {\n    // clearExtension() is not actually used in test_util, so try it manually.\n    final message = TestAllExtensions();\n    message.setExtension(Unittest.optionalInt32Extension, 1);\n    message.clearExtension(Unittest.optionalInt32Extension);\n    expect(message.hasExtension(Unittest.optionalInt32Extension), isFalse);\n  });\n\n  test(\n    'clearing extension throws when the message is frozen, without extension field set',\n    () {\n      final message = TestAllExtensions()..freeze();\n      expect(\n        () => message.clearExtension(Unittest.optionalInt32Extension),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    },\n  );\n\n  test(\n    'clearing extension throws when the message is frozen, with extension field set',\n    () {\n      final message =\n          TestAllExtensions()\n            ..setExtension(Unittest.optionalInt32Extension, 1)\n            ..freeze();\n      expect(\n        () => message.clearExtension(Unittest.optionalInt32Extension),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    },\n  );\n\n  test('can clear a repeated extension', () {\n    final message = TestAllExtensions();\n    message.addExtension(Unittest.repeatedInt32Extension, 1);\n    message.clearExtension(Unittest.repeatedInt32Extension);\n    expect(message.getExtension(Unittest.repeatedInt32Extension).length, 0);\n  });\n\n  test('can clone an extension field', () {\n    final original = TestAllExtensions();\n    original.setExtension(Unittest.optionalInt32Extension, 1);\n    final clone = original.deepCopy();\n    expect(clone.hasExtension(Unittest.optionalInt32Extension), isTrue);\n    expect(clone.getExtension(Unittest.optionalInt32Extension), 1);\n  });\n\n  test('can clone all types of extension fields', () {\n    assertAllExtensionsSet(getAllExtensionsSet().deepCopy());\n  });\n\n  test('can merge extension', () {\n    final mergeSource =\n        TestAllExtensions()..addExtension(Unittest.repeatedInt32Extension, 123);\n\n    final mergeDest =\n        TestAllExtensions()..addExtension(Unittest.repeatedInt32Extension, 456);\n\n    final result =\n        TestAllExtensions()\n          ..mergeFromMessage(mergeSource)\n          ..mergeFromMessage(mergeDest);\n\n    expect(result.getExtension(Unittest.repeatedInt32Extension), [123, 456]);\n  });\n\n  test(\"throws if field number isn't allowed for extension\", () {\n    final message = TestAllTypes(); // does not allow extensions\n    expect(\n      () {\n        message.setExtension(Unittest.optionalInt32Extension, 0);\n      },\n      throwsArgError(\n        'Extension optionalInt32Extension not legal for message proto2_unittest.TestAllTypes',\n      ),\n    );\n\n    expect(\n      () {\n        message.getExtension(Unittest.optionalInt32Extension);\n      },\n      throwsArgError(\n        'Extension optionalInt32Extension not legal for message proto2_unittest.TestAllTypes',\n      ),\n    );\n  });\n\n  test('throws if an int32 extension is set to a bad value', () {\n    final message = TestAllExtensions();\n    expect(\n      () {\n        message.setExtension(Unittest.optionalInt32Extension, 'hello');\n      },\n      throwsArgError(\n        'Illegal to set field optionalInt32Extension (1) of proto2_unittest.TestAllExtensions'\n        ' to value (hello): not type int',\n      ),\n    );\n  });\n\n  test('throws if an int64 extension is set to a bad value', () {\n    final message = TestAllExtensions();\n    expect(\n      () {\n        message.setExtension(Unittest.optionalInt64Extension, 123);\n      },\n      throwsArgError(\n        'Illegal to set field optionalInt64Extension (2) of proto2_unittest.TestAllExtensions'\n        ' to value (123): not Int64',\n      ),\n    );\n  });\n\n  test('throws if a message extension is set to a bad value', () {\n    final message = TestAllExtensions();\n\n    // For a non-repeated message, we only check for a GeneratedMessage.\n    expect(\n      () {\n        message.setExtension(Unittest.optionalNestedMessageExtension, 123);\n      },\n      throwsArgError(\n        'Illegal to set field optionalNestedMessageExtension (18)'\n        ' of proto2_unittest.TestAllExtensions to value (123): not a GeneratedMessage',\n      ),\n    );\n\n    // For a repeated message, the type check is exact.\n    expect(() {\n      message.addExtension(\n        Unittest.repeatedNestedMessageExtension,\n        TestAllTypes(),\n      );\n    }, throwsATypeError);\n  });\n\n  test('throws if an enum extension is set to a bad value', () {\n    final message = TestAllExtensions();\n\n    // For a non-repeated enum, we only check for a ProtobufEnum.\n    expect(\n      () {\n        message.setExtension(Unittest.optionalNestedEnumExtension, 123);\n      },\n      throwsArgError(\n        'Illegal to set field optionalNestedEnumExtension (21)'\n        ' of proto2_unittest.TestAllExtensions to value (123): not type ProtobufEnum',\n      ),\n    );\n\n    // For a repeated enum, the type check is exact.\n    expect(() {\n      message.addExtension(\n        Unittest.repeatedForeignEnumExtension,\n        TestAllTypes_NestedEnum.FOO,\n      );\n    }, throwsATypeError);\n  });\n\n  test('can extend a message with a message field with a different type', () {\n    expect(\n      Non_nested_extension.nonNestedExtension.makeDefault!(),\n      TypeMatcher<MyNonNestedExtension>(),\n    );\n    expect(Non_nested_extension.nonNestedExtension.name, 'nonNestedExtension');\n  });\n\n  test('can extend a message with a message field of the same type', () {\n    expect(\n      MyNestedExtension.recursiveExtension.makeDefault!()\n          is MessageToBeExtended,\n      isTrue,\n    );\n    expect(MyNestedExtension.recursiveExtension.name, 'recursiveExtension');\n  });\n\n  test('can extend message with enum', () {\n    final msg = Extendable();\n    msg.setExtension(Enum_extension.animal, Animal.CAT);\n  });\n\n  test('extension class was renamed to avoid conflict with message', () {\n    expect(ExtensionNameConflictExt.someExtension.tagNumber, 1);\n  });\n\n  test('extension class was renamed to avoid conflict with enum', () {\n    expect(ExtensionEnumNameConflictExt.enumConflictExtension.tagNumber, 1);\n  });\n\n  test('to toDebugString', () {\n    final value =\n        TestAllExtensions()\n          ..setExtension(Unittest.optionalInt32Extension, 1)\n          ..addExtension(Unittest.repeatedStringExtension, 'hello')\n          ..addExtension(Unittest.repeatedStringExtension, 'world')\n          ..setExtension(\n            Unittest.optionalNestedMessageExtension,\n            TestAllTypes_NestedMessage()..bb = 42,\n          )\n          ..setExtension(\n            Unittest.optionalNestedEnumExtension,\n            TestAllTypes_NestedEnum.BAR,\n          );\n\n    final expected =\n        '[optionalInt32Extension]: 1\\n'\n        '[optionalNestedMessageExtension]: {\\n'\n        '  bb: 42\\n'\n        '}\\n'\n        '[optionalNestedEnumExtension]: BAR\\n'\n        '[repeatedStringExtension]: hello\\n'\n        '[repeatedStringExtension]: world\\n';\n\n    expect(value.toString(), expected);\n  });\n\n  test('can compare messages with and without extensions', () {\n    final withExtension =\n        TestFieldOrderings()\n          ..myString = 'foo'\n          ..setExtension(Unittest.myExtensionString, 'bar');\n    final b = withExtension.writeToBuffer();\n    final withUnknownField = TestFieldOrderings.fromBuffer(b);\n    final r = ExtensionRegistry();\n    Unittest.registerAllExtensions(r);\n    final decodedWithExtension = TestFieldOrderings.fromBuffer(b, r);\n    final noExtension = TestFieldOrderings()..myString = 'foo';\n    expect(withExtension == decodedWithExtension, true);\n    expect(withUnknownField == decodedWithExtension, false);\n    expect(decodedWithExtension == withUnknownField, false);\n    expect(withUnknownField == noExtension, false);\n    expect(noExtension == withUnknownField, false);\n    decodedWithExtension.setExtension(Unittest.myExtensionInt, 42);\n    expect(withExtension == decodedWithExtension, false);\n    expect(decodedWithExtension == withExtension, false);\n    expect(decodedWithExtension == withExtension, false);\n  });\n\n  test(\n    'ExtensionRegistry.reparseMessage will preserve already registered extensions',\n    () {\n      final r1 = ExtensionRegistry();\n      Unittest.registerAllExtensions(r1);\n\n      final r2 = ExtensionRegistry();\n      Extend_unittest.registerAllExtensions(r2);\n      final withUnknownFields = TestAllExtensions.fromBuffer(\n        withExtensions.writeToBuffer(),\n      );\n      final reparsedR1 = r1.reparseMessage(withUnknownFields);\n\n      expect(\n        reparsedR1.getExtension(Unittest.optionalForeignMessageExtension).c,\n        3,\n      );\n\n      expect(\n        r2\n            .reparseMessage(reparsedR1)\n            .getExtension(Unittest.optionalForeignMessageExtension)\n            .c,\n        3,\n      );\n    },\n  );\n\n  test(\n    'ExtensionRegistry.reparseMessage reparses extensions that were not in the original registry',\n    () {\n      final r = ExtensionRegistry();\n      Unittest.registerAllExtensions(r);\n      Extend_unittest.registerAllExtensions(r);\n\n      final withUnknownFields = TestAllExtensions.fromBuffer(\n        withExtensions.writeToBuffer(),\n      );\n      final reparsed = r.reparseMessage(withUnknownFields);\n\n      expect(\n        () => withUnknownFields.getExtension(Unittest.defaultStringExtension),\n        throwsA(const TypeMatcher<StateError>()),\n      );\n\n      expect(reparsed.getExtension(Unittest.defaultStringExtension), 'bar');\n\n      expect(\n        reparsed.unknownFields.getField(\n          Unittest.defaultStringExtension.tagNumber,\n        ),\n        null,\n        reason:\n            'ExtensionRegistry.reparseMessage does not leave reparsed fields in unknownFields',\n      );\n      expect(reparsed.getExtension(Unittest.repeatedBytesExtension), [\n        'pop'.codeUnits,\n      ]);\n\n      expect(\n        reparsed.getExtension(Unittest.optionalForeignMessageExtension).c,\n        3,\n      );\n\n      expect(reparsed.getExtension(Extend_unittest.outer).inner.value, 'abc');\n\n      final onlyOuter = ExtensionRegistry()..add(Extend_unittest.outer);\n      final onlyOuterReparsed = onlyOuter.reparseMessage(withUnknownFields);\n      expect(\n        onlyOuterReparsed\n            .getExtension(Extend_unittest.outer)\n            .hasExtension(Extend_unittest.extensionInner),\n        isFalse,\n      );\n      expect(\n        () => onlyOuter\n            .reparseMessage(withUnknownFields)\n            .getExtension(Extend_unittest.outer)\n            .getExtension(Extend_unittest.extensionInner),\n        throwsA(const TypeMatcher<StateError>()),\n      );\n\n      expect(\n        reparsed\n            .getExtension(Extend_unittest.outer)\n            .hasExtension(Extend_unittest.extensionInner),\n        isTrue,\n      );\n      expect(\n        reparsed\n            .getExtension(Extend_unittest.outer)\n            .getExtension(Extend_unittest.extensionInner)\n            .value,\n        'def',\n      );\n    },\n  );\n\n  test('ExtensionRegistry.reparseMessage does not update the original', () {\n    final r = ExtensionRegistry();\n    Unittest.registerAllExtensions(r);\n    Extend_unittest.registerAllExtensions(r);\n\n    final withUnknownFields = TestAllExtensions.fromBuffer(\n      withExtensions.writeToBuffer(),\n    );\n\n    final reparsedWithEmpty = ExtensionRegistry().reparseMessage(\n      withUnknownFields,\n    );\n    expect(reparsedWithEmpty, same(withUnknownFields));\n\n    final reparsed = r.reparseMessage(withUnknownFields);\n\n    final strings =\n        withUnknownFields.getExtension(Unittest.repeatedStringExtension)\n            as List<String>;\n    expect(strings, []);\n    strings.add('pop2');\n    expect(reparsed.getExtension(Unittest.repeatedStringExtension), []);\n  });\n\n  test('ExtensionRegistry.reparseMessage will throw on malformed buffers', () {\n    final r = ExtensionRegistry();\n    Unittest.registerAllExtensions(r);\n\n    final r2 = ExtensionRegistry();\n    Extend_unittest.registerAllExtensions(r2);\n\n    // The message encoded in this buffer has an encoding error in the\n    // Extend_unittest.outer extension field.\n    final withMalformedExtensionEncoding = TestAllExtensions.fromBuffer([\n      154, 1, 2, 8, 3, 210, //\n      4, 3, 98, 97, 114, 194, 6, 14, 10, 5, 10, 4,\n      97, 98, 99, 18, 5, 10, 3, 100, 101, 102,\n    ]);\n    expect(\n      r\n          .reparseMessage(withMalformedExtensionEncoding)\n          .getExtension(Unittest.defaultStringExtension),\n      'bar',\n      reason: 'this succeeds because it does not decode Extend_unittest.outer',\n    );\n    expect(\n      () => r2.reparseMessage(withMalformedExtensionEncoding),\n      throwsA(const TypeMatcher<InvalidProtocolBufferException>()),\n    );\n  });\n\n  test('ExtensionRegistry.reparseMessage preserves frozenness', () {\n    final r = ExtensionRegistry();\n    Unittest.registerAllExtensions(r);\n\n    final withUnknownFields = TestAllExtensions.fromBuffer(\n      withExtensions.writeToBuffer(),\n    );\n    withUnknownFields.freeze();\n\n    expect(\n      () => r\n          .reparseMessage(withUnknownFields)\n          .setExtension(Unittest.defaultStringExtension, 'blah'),\n      throwsA(TypeMatcher<UnsupportedError>()),\n    );\n  });\n\n  test(\n    'ExtensionRegistry.reparseMessage returns the same object when no new extensions are parsed',\n    () {\n      final original =\n          Outer()\n            ..inner =\n                (Inner()\n                  ..innerMost =\n                      (InnerMost()..setExtension(\n                        Extend_unittest.innerMostExtensionString,\n                        'a',\n                      )))\n            ..inners.addAll([\n              (Inner()\n                ..setExtension(Extend_unittest.innerExtensionString, 'a')),\n              Inner()..value = 'value',\n            ])\n            ..innerMap[0] =\n                (Inner()\n                  ..setExtension(Extend_unittest.innerExtensionString, 'a'));\n\n      final reparsed = ExtensionRegistry().reparseMessage(original);\n      expect(identical(reparsed, original), isTrue);\n    },\n  );\n\n  test(\n    'ExtensionRegistry.reparseMessage reparses extension in deeply nested subfield',\n    () {\n      final original =\n          Outer()\n            ..inner =\n                (Inner()\n                  ..innerMost =\n                      (InnerMost()..setExtension(\n                        Extend_unittest.innerMostExtensionString,\n                        'a',\n                      )));\n\n      final withUnknownFields = Outer.fromBuffer(original.writeToBuffer());\n\n      expect(\n        withUnknownFields.inner.innerMost.hasExtension(\n          Extend_unittest.innerMostExtensionString,\n        ),\n        isFalse,\n      );\n\n      final r =\n          ExtensionRegistry()..add(Extend_unittest.innerMostExtensionString);\n      final reparsed = r.reparseMessage(withUnknownFields);\n\n      expect(identical(reparsed.inner, withUnknownFields.inner), isFalse);\n      expect(\n        identical(reparsed.inner.innerMost, withUnknownFields.inner.innerMost),\n        isFalse,\n      );\n      expect(\n        reparsed.inner.innerMost.hasExtension(\n          Extend_unittest.innerMostExtensionString,\n        ),\n        isTrue,\n      );\n    },\n  );\n\n  test(\n    'ExtensionRegistry.reparseMessage reparses extensions in all nested subfields',\n    () {\n      final original =\n          Outer()\n            ..inner =\n                (Inner()\n                  ..setExtension(Extend_unittest.innerExtensionString, 'a')\n                  ..innerMost =\n                      (InnerMost()..setExtension(\n                        Extend_unittest.innerMostExtensionString,\n                        'a',\n                      )));\n\n      final withUnknownFields = Outer.fromBuffer(original.writeToBuffer());\n\n      expect(\n        withUnknownFields.inner.hasExtension(\n          Extend_unittest.innerExtensionString,\n        ),\n        isFalse,\n      );\n      expect(\n        withUnknownFields.inner.innerMost.hasExtension(\n          Extend_unittest.innerMostExtensionString,\n        ),\n        isFalse,\n      );\n\n      final r =\n          ExtensionRegistry()..addAll([\n            Extend_unittest.innerExtensionString,\n            Extend_unittest.innerMostExtensionString,\n          ]);\n      final reparsed = r.reparseMessage(withUnknownFields);\n\n      expect(identical(reparsed.inner, withUnknownFields.inner), isFalse);\n      expect(\n        identical(reparsed.inner.innerMost, withUnknownFields.inner.innerMost),\n        isFalse,\n      );\n      expect(\n        reparsed.inner.hasExtension(Extend_unittest.innerExtensionString),\n        isTrue,\n      );\n      expect(\n        reparsed.inner.innerMost.hasExtension(\n          Extend_unittest.innerMostExtensionString,\n        ),\n        isTrue,\n      );\n    },\n  );\n\n  test(\n    'ExtensionRegistry.reparseMessage doesn\\'t copy deepest subfield without extensions',\n    () {\n      final original =\n          Outer()\n            ..inner =\n                (Inner()\n                  ..setExtension(Extend_unittest.innerExtensionString, 'a')\n                  ..innerMost = InnerMost());\n\n      final withUnknownFields = Outer.fromBuffer(original.writeToBuffer());\n\n      expect(\n        withUnknownFields.inner.hasExtension(\n          Extend_unittest.innerExtensionString,\n        ),\n        false,\n      );\n\n      final r = ExtensionRegistry()..add(Extend_unittest.innerExtensionString);\n      final reparsed = r.reparseMessage(withUnknownFields);\n\n      expect(identical(reparsed.inner, withUnknownFields.inner), isFalse);\n      expect(\n        identical(reparsed.inner.innerMost, withUnknownFields.inner.innerMost),\n        isTrue,\n      );\n      expect(\n        reparsed.inner.hasExtension(Extend_unittest.innerExtensionString),\n        isTrue,\n      );\n    },\n  );\n\n  test(\n    'ExtensionRegistry.reparseMessage reparses extensions in repeated fields',\n    () {\n      final original =\n          Outer()\n            ..inners.addAll([\n              (Inner()\n                ..setExtension(Extend_unittest.innerExtensionString, 'a')),\n              Inner()..value = 'value',\n            ]);\n\n      final withUnknownFields = Outer.fromBuffer(original.writeToBuffer());\n\n      expect(\n        withUnknownFields.inners.first.hasExtension(\n          Extend_unittest.innerExtensionString,\n        ),\n        isFalse,\n      );\n\n      final r = ExtensionRegistry()..add(Extend_unittest.innerExtensionString);\n      final reparsed = r.reparseMessage(withUnknownFields);\n\n      expect(\n        reparsed.inners[0].hasExtension(Extend_unittest.innerExtensionString),\n        isTrue,\n      );\n      expect(\n        identical(withUnknownFields.inners[1], reparsed.inners[1]),\n        isTrue,\n      );\n    },\n  );\n\n  test(\n    'ExtensionRegistry.reparseMessage reparses extensions in map fields',\n    () {\n      final original =\n          Outer()\n            ..innerMap[0] =\n                (Inner()\n                  ..setExtension(Extend_unittest.innerExtensionString, 'a'))\n            ..innerMap[1] = (Inner())\n            ..stringMap['hello'] = 'world';\n\n      final withUnknownFields = Outer.fromBuffer(original.writeToBuffer());\n\n      expect(\n        withUnknownFields.innerMap[0]!.hasExtension(\n          Extend_unittest.innerExtensionString,\n        ),\n        isFalse,\n      );\n\n      final r = ExtensionRegistry()..add(Extend_unittest.innerExtensionString);\n      final reparsed = r.reparseMessage(withUnknownFields);\n\n      expect(\n        reparsed.innerMap[0]!.hasExtension(\n          Extend_unittest.innerExtensionString,\n        ),\n        isTrue,\n      );\n      expect(\n        identical(withUnknownFields.innerMap[1], reparsed.innerMap[1]),\n        isTrue,\n      );\n      expect(withUnknownFields.stringMap.length, 1);\n      expect(reparsed.stringMap.length, 1);\n      expect(\n        withUnknownFields.stringMap['hello']!,\n        reparsed.stringMap['hello']!,\n      );\n    },\n  );\n\n  test('consistent hashCode for reparsed messages with extensions', () {\n    final r = ExtensionRegistry()..add(Extend_unittest.outer);\n    final m =\n        TestAllExtensions()..setExtension(\n          Extend_unittest.outer,\n          Outer()..inner = (Inner()..value = 'hello'),\n        );\n    final b = m.writeToBuffer();\n    final c = TestAllExtensions.fromBuffer(b);\n    final d = r.reparseMessage(c);\n    expect(m.hashCode, d.hashCode);\n  });\n\n  test('setExtension throws when the extension field is repeated', () {\n    final m = Outer();\n    m.addExtension(Extend_unittest.extensionRepeated, 'hi');\n    expect(() {\n      m.setExtension(Extend_unittest.extensionRepeated, 'bye');\n    }, throwsArgumentError);\n  });\n\n  test('addExtension throws when the extension field is not repeated', () {\n    final m = Outer();\n    m.setExtension(Extend_unittest.extensionInner, Inner());\n    expect(() {\n      m.addExtension(Extend_unittest.extensionInner, Inner());\n    }, throwsArgumentError);\n  });\n\n  test('addExtension throws when the message is frozen', () {\n    final m = Outer()..freeze();\n    expect(\n      () => m.addExtension(Extend_unittest.extensionRepeated, 'hi'),\n      throwsUnsupportedError,\n    );\n  });\n\n  test('setExtension throws when the message is frozen', () {\n    final m = Outer()..freeze();\n    expect(\n      () => m.setExtension(Extend_unittest.extensionInner, Inner()),\n      throwsUnsupportedError,\n    );\n  });\n\n  test(\n    'getExtension returns frozen non-repeated value when the parent message is frozen',\n    () {\n      final m = Outer()..freeze();\n      final Inner ext = m.getExtension(Extend_unittest.extensionInner);\n      expect(() => ext.value = 'hi', throwsUnsupportedError);\n    },\n  );\n\n  test(\n    'getExtension returns frozen repeated value when the parent message is frozen',\n    () {\n      final m = Outer()..freeze();\n      final List ext = m.getExtension(Extend_unittest.extensionRepeated);\n      expect(() => ext.add('hi'), throwsUnsupportedError);\n    },\n  );\n\n  test(\n    'getExtension repeated value turns frozen when the parent message is frozen',\n    () {\n      final m = Outer();\n      final List ext = m.getExtension(Extend_unittest.extensionRepeated);\n      ext.add('hi');\n      m.freeze();\n      expect(() => ext.add('bye'), throwsUnsupportedError);\n    },\n  );\n\n  test(\n    'getExtension repeated value type is right when the field set is frozen',\n    () {\n      {\n        final m = Outer();\n        final ext = m.getExtension(Extend_unittest.extensionRepeated);\n        expect(ext, isA<PbList<String>>());\n      }\n\n      {\n        final m = Outer().freeze();\n        final ext = m.getExtension(Extend_unittest.extensionRepeated);\n        expect(ext, isA<PbList<String>>());\n      }\n    },\n  );\n}\n"
  },
  {
    "path": "protoc_plugin/test/extension_unknown_interaction_test.dart",
    "content": "// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\n\nvoid main() {\n  test('setExtension clears unknown field with same tag number', () {\n    final m = TestAllExtensions();\n    m.unknownFields.addField(\n      Unittest.optionalInt32Extension.tagNumber,\n      UnknownFieldSetField()..addFixed32(33),\n    );\n    expect(\n      m.unknownFields.hasField(Unittest.optionalInt32Extension.tagNumber),\n      isTrue,\n    );\n    m.setExtension(Unittest.optionalInt32Extension, 42);\n    expect(m.getExtension(Unittest.optionalInt32Extension), 42);\n    expect(\n      m.unknownFields.hasField(Unittest.optionalInt32Extension.tagNumber),\n      isFalse,\n    );\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/feature_set_defaults_test.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protoc_plugin/protoc.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  // The edition defaults should always stay synchronized with the supported\n  // edition range we report to protoc. It's not clear that the BUILD file\n  // definitions are load-bearing though, so we test them here.\n  test('Plugin supported editions are in sync with the defaults constant', () {\n    expect(pluginMinSupportedEdition, pluginFeatureSetDefaults.minimumEdition);\n    expect(pluginMaxSupportedEdition, pluginFeatureSetDefaults.maximumEdition);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/file_generator_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n@TestOn('vm')\nlibrary;\n\nimport 'package:protoc_plugin/indenting_writer.dart';\nimport 'package:protoc_plugin/protoc.dart';\nimport 'package:protoc_plugin/src/gen/google/api/client.pb.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/compiler/plugin.pb.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart';\nimport 'package:protoc_plugin/src/linker.dart';\nimport 'package:protoc_plugin/src/options.dart';\nimport 'package:test/test.dart';\n\nimport 'src/golden_file.dart';\nimport 'src/test_features.dart';\n\nFileDescriptorProto buildFileDescriptor({\n  bool phoneNumber = true,\n  bool topLevelEnum = false,\n}) {\n  final fd = FileDescriptorProto()..name = 'test';\n\n  if (topLevelEnum) {\n    fd.enumType.add(\n      EnumDescriptorProto()\n        ..name = 'PhoneType'\n        ..value.addAll([\n          EnumValueDescriptorProto()\n            ..name = 'MOBILE'\n            ..number = 0,\n          EnumValueDescriptorProto()\n            ..name = 'HOME'\n            ..number = 1,\n          EnumValueDescriptorProto()\n            ..name = 'WORK'\n            ..number = 2,\n          EnumValueDescriptorProto()\n            ..name = 'BUSINESS'\n            ..number = 2,\n        ]),\n    );\n  }\n\n  if (phoneNumber) {\n    fd.messageType.add(\n      DescriptorProto()\n        ..name = 'PhoneNumber'\n        ..field.addAll([\n          // required string number = 1;\n          FieldDescriptorProto()\n            ..name = 'number'\n            ..jsonName = 'number'\n            ..number = 1\n            ..label = FieldDescriptorProto_Label.LABEL_REQUIRED\n            ..type = FieldDescriptorProto_Type.TYPE_STRING,\n          // optional int32 type = 2;\n          // OR\n          // optional PhoneType type = 2;\n          FieldDescriptorProto()\n            ..name = 'type'\n            ..jsonName = 'type'\n            ..number = 2\n            ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n            ..type =\n                topLevelEnum\n                    ? FieldDescriptorProto_Type.TYPE_ENUM\n                    : FieldDescriptorProto_Type.TYPE_INT32\n            ..typeName = topLevelEnum ? '.PhoneType' : '',\n          // optional string name = 3 [default = \"$\"];\n          FieldDescriptorProto()\n            ..name = 'name'\n            ..jsonName = 'name'\n            ..number = 3\n            ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n            ..type = FieldDescriptorProto_Type.TYPE_STRING\n            ..defaultValue = r'$',\n        ]),\n    );\n  }\n  return fd;\n}\n\nFileDescriptorProto createInt64Proto() {\n  final fd = FileDescriptorProto()..name = 'test';\n  fd.messageType.add(\n    DescriptorProto()\n      ..name = 'Int64'\n      ..field.add(\n        // optional int64 value = 1;\n        FieldDescriptorProto()\n          ..name = 'value'\n          ..jsonName = 'value'\n          ..number = 1\n          ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n          ..type = FieldDescriptorProto_Type.TYPE_INT64,\n      ),\n  );\n\n  return fd;\n}\n\nvoid main() {\n  test(\n    'FileGenerator outputs a .pb.dart file for a proto with one message',\n    () {\n      final fd = buildFileDescriptor();\n      final options =\n          parseGenerationOptions(\n            CodeGeneratorRequest()..parameter = 'disable_constructor_args',\n            CodeGeneratorResponse(),\n          )!;\n      final fg = FileGenerator(testEditionDefaults, fd, options);\n      link(options, [fg]);\n      expectGolden(\n        fg.generateMainFile().emitSource(format: true),\n        'oneMessage.pb.dart',\n      );\n    },\n  );\n\n  test('FileGenerator outputs a .pb.dart file for an Int64 message', () {\n    final fd = createInt64Proto();\n    final options =\n        parseGenerationOptions(\n          CodeGeneratorRequest()..parameter = 'disable_constructor_args',\n          CodeGeneratorResponse(),\n        )!;\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    link(options, [fg]);\n    expectGolden(\n      fg.generateMainFile().emitSource(format: true),\n      'int64.pb.dart',\n    );\n  });\n\n  test(\n    'FileGenerator outputs a .pb.dart.meta file for a proto with one message',\n    () {\n      final fd = buildFileDescriptor();\n      final options =\n          parseGenerationOptions(\n            CodeGeneratorRequest()\n              ..parameter = 'generate_kythe_info,disable_constructor_args',\n            CodeGeneratorResponse(),\n          )!;\n      final fg = FileGenerator(testEditionDefaults, fd, options);\n      link(options, [fg]);\n      expectGolden(\n        fg.generateMainFile().sourceLocationInfo.toString(),\n        'oneMessage.pb.dart.meta',\n      );\n    },\n  );\n\n  test(\n    'FileGenerator outputs a pbjson.dart file for a proto with one message',\n    () {\n      final fd = buildFileDescriptor();\n      final options =\n          parseGenerationOptions(\n            CodeGeneratorRequest()..parameter = 'disable_constructor_args',\n            CodeGeneratorResponse(),\n          )!;\n      final fg = FileGenerator(testEditionDefaults, fd, options);\n      link(options, [fg]);\n      expectGolden(fg.generateJsonFile(), 'oneMessage.pbjson.dart');\n    },\n  );\n\n  test('FileGenerator generates files for a top-level enum', () {\n    final fd = buildFileDescriptor(phoneNumber: false, topLevelEnum: true);\n    final options =\n        parseGenerationOptions(\n          CodeGeneratorRequest()..parameter = 'disable_constructor_args',\n          CodeGeneratorResponse(),\n        )!;\n\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    link(options, [fg]);\n    expectGolden(\n      fg.generateMainFile().emitSource(format: true),\n      'topLevelEnum.pb.dart',\n    );\n    expectGolden(\n      fg.generateEnumFile().emitSource(format: true),\n      'topLevelEnum.pbenum.dart',\n    );\n  });\n\n  test('FileGenerator generates metadata files for a top-level enum', () {\n    final fd = buildFileDescriptor(phoneNumber: false, topLevelEnum: true);\n    final options =\n        parseGenerationOptions(\n          CodeGeneratorRequest()\n            ..parameter = 'generate_kythe_info,disable_constructor_args',\n          CodeGeneratorResponse(),\n        )!;\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    link(options, [fg]);\n\n    expectGolden(\n      fg.generateMainFile().sourceLocationInfo.toString(),\n      'topLevelEnum.pb.dart.meta',\n    );\n    expectGolden(\n      fg.generateEnumFile().sourceLocationInfo.toString(),\n      'topLevelEnum.pbenum.dart.meta',\n    );\n  });\n\n  test('FileGenerator generates a .pbjson.dart file for a top-level enum', () {\n    final fd = buildFileDescriptor(phoneNumber: false, topLevelEnum: true);\n    final options =\n        parseGenerationOptions(\n          CodeGeneratorRequest()..parameter = 'disable_constructor_args',\n          CodeGeneratorResponse(),\n        )!;\n\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    link(options, [fg]);\n    expectGolden(fg.generateJsonFile(), 'topLevelEnum.pbjson.dart');\n  });\n\n  test('FileGenerator outputs library for a .proto in a package', () {\n    final fd = buildFileDescriptor();\n    fd.package = 'pb_library';\n    final options =\n        parseGenerationOptions(\n          CodeGeneratorRequest()..parameter = 'disable_constructor_args',\n          CodeGeneratorResponse(),\n        )!;\n\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    link(options, [fg]);\n\n    final writer = IndentingWriter();\n    fg.writeMainHeader(writer);\n    expectGolden(writer.emitSource(format: true), 'header_in_package.pb.dart');\n  });\n\n  test('FileGenerator outputs a fixnum import when needed', () {\n    final fd =\n        FileDescriptorProto()\n          ..name = 'test'\n          ..messageType.add(\n            DescriptorProto()\n              ..name = 'Count'\n              ..field.addAll([\n                FieldDescriptorProto()\n                  ..name = 'count'\n                  ..jsonName = 'count'\n                  ..number = 1\n                  ..type = FieldDescriptorProto_Type.TYPE_INT64,\n              ]),\n          );\n\n    final options =\n        parseGenerationOptions(\n          CodeGeneratorRequest()..parameter = 'disable_constructor_args',\n          CodeGeneratorResponse(),\n        )!;\n\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    link(options, [fg]);\n\n    final writer = IndentingWriter();\n    fg.writeMainHeader(writer);\n    expectGolden(writer.emitSource(format: true), 'header_with_fixnum.pb.dart');\n  });\n\n  test('FileGenerator outputs files for a service', () {\n    final empty = DescriptorProto()..name = 'Empty';\n\n    final sd =\n        ServiceDescriptorProto()\n          ..name = 'Test'\n          ..method.add(\n            MethodDescriptorProto()\n              ..name = 'Ping'\n              ..inputType = '.Empty'\n              ..outputType = '.Empty',\n          );\n\n    final fd =\n        FileDescriptorProto()\n          ..name = 'test'\n          ..messageType.add(empty)\n          ..service.add(sd);\n\n    final options =\n        parseGenerationOptions(\n          CodeGeneratorRequest()..parameter = 'disable_constructor_args',\n          CodeGeneratorResponse(),\n        )!;\n\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    link(options, [fg]);\n\n    final writer = IndentingWriter();\n    fg.writeMainHeader(writer);\n    expectGolden(\n      fg.generateMainFile().emitSource(format: true),\n      'service.pb.dart',\n    );\n    expectGolden(fg.generateServerFile(), 'service.pbserver.dart');\n  });\n\n  test(\n    'FileGenerator does not output legacy service stubs if gRPC is selected',\n    () {\n      final empty = DescriptorProto()..name = 'Empty';\n\n      final sd =\n          ServiceDescriptorProto()\n            ..name = 'Test'\n            ..method.add(\n              MethodDescriptorProto()\n                ..name = 'Ping'\n                ..inputType = '.Empty'\n                ..outputType = '.Empty',\n            );\n\n      final fd =\n          FileDescriptorProto()\n            ..name = 'test'\n            ..messageType.add(empty)\n            ..service.add(sd);\n\n      final options = GenerationOptions(useGrpc: true);\n\n      final fg = FileGenerator(testEditionDefaults, fd, options);\n      link(options, [fg]);\n\n      final writer = IndentingWriter();\n      fg.writeMainHeader(writer);\n      expectGolden(\n        fg.generateMainFile().emitSource(format: true),\n        'grpc_service.pb.dart',\n      );\n    },\n  );\n\n  test('FileGenerator outputs gRPC stubs if gRPC is selected', () {\n    final input = DescriptorProto()..name = 'Input';\n    final output = DescriptorProto()..name = 'Output';\n\n    final unary =\n        MethodDescriptorProto()\n          ..name = 'Unary'\n          ..inputType = '.Input'\n          ..outputType = '.Output'\n          ..clientStreaming = false\n          ..serverStreaming = false;\n\n    final clientStreaming =\n        MethodDescriptorProto()\n          ..name = 'ClientStreaming'\n          ..inputType = '.Input'\n          ..outputType = '.Output'\n          ..clientStreaming = true\n          ..serverStreaming = false;\n\n    final serverStreaming =\n        MethodDescriptorProto()\n          ..name = 'ServerStreaming'\n          ..inputType = '.Input'\n          ..outputType = '.Output'\n          ..clientStreaming = false\n          ..serverStreaming = true;\n\n    final bidirectional =\n        MethodDescriptorProto()\n          ..name = 'Bidirectional'\n          ..inputType = '.Input'\n          ..outputType = '.Output'\n          ..clientStreaming = true\n          ..serverStreaming = true;\n\n    // A method with name 'call' to test that it doesn't conflict with the\n    // method arguments with the same name, see issue #963.\n    final keywordCall =\n        MethodDescriptorProto()\n          ..name = 'Call'\n          ..inputType = '.Input'\n          ..outputType = '.Output'\n          ..clientStreaming = false\n          ..serverStreaming = false;\n\n    // A method with name 'request' to test that it doesn't conflict with the\n    // method arguments with the same name, see issue #159.\n    final keywordRequest =\n        MethodDescriptorProto()\n          ..name = 'Request'\n          ..inputType = '.Input'\n          ..outputType = '.Output'\n          ..clientStreaming = false\n          ..serverStreaming = false;\n\n    final serviceOptions = ServiceOptions();\n    serviceOptions.setExtension(Client.defaultHost, 'www.example.com');\n    serviceOptions.setExtension(\n      Client.oauthScopes,\n      'https://www.googleapis.com/auth/cloud-platform,'\n      'https://www.googleapis.com/auth/datastore',\n    );\n\n    final sd =\n        ServiceDescriptorProto()\n          ..name = 'Test'\n          ..options = serviceOptions\n          ..method.addAll([\n            unary,\n            clientStreaming,\n            serverStreaming,\n            bidirectional,\n            keywordCall,\n            keywordRequest,\n          ]);\n\n    final fd =\n        FileDescriptorProto()\n          ..name = 'test'\n          ..messageType.addAll([input, output])\n          ..service.add(sd);\n\n    final options = GenerationOptions(useGrpc: true);\n\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    link(options, [fg]);\n\n    final writer = IndentingWriter();\n    fg.writeMainHeader(writer);\n    // We use a '.~dart' file extension here, insead of '.dart', so that\n    // 'pub publish' won't try and validate that all the imports for this file\n    // are listed in the pubspec.\n    expectGolden(fg.generateGrpcFile(), 'grpc_service.pbgrpc.~dart');\n  });\n\n  test('FileGenerator generates imports for .pb.dart files', () {\n    // This defines three .proto files package1.proto, package2.proto and\n    // test.proto with the following content:\n    //\n    // package1.proto:\n    // ---------------\n    // package p1;\n    // message M {\n    //   optional M m = 2;\n    // }\n    //\n    // package2.proto:\n    // ---------------\n    // package p2;\n    // message M {\n    //   optional M m = 2;\n    // }\n    //\n    // test.proto:\n    // ---------------\n    // package test;\n    // import \"package1.proto\";\n    // import \"package2.proto\";\n    // message M {\n    //   optional M m = 1;\n    //   optional p1.M m1 = 2;\n    //   optional p2.M m2 = 3;\n    // }\n\n    // Description of package1.proto.\n    final md1 =\n        DescriptorProto()\n          ..name = 'M'\n          ..field.addAll([\n            // optional M m = 1;\n            FieldDescriptorProto()\n              ..name = 'm'\n              ..jsonName = 'm'\n              ..number = 1\n              ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n              ..type = FieldDescriptorProto_Type.TYPE_MESSAGE\n              ..typeName = '.p1.M',\n          ]);\n    final fd1 =\n        FileDescriptorProto()\n          ..package = 'p1'\n          ..name = 'package1.proto'\n          ..messageType.add(md1);\n\n    // Description of package1.proto.\n    final md2 =\n        DescriptorProto()\n          ..name = 'M'\n          ..field.addAll([\n            // optional M m = 1;\n            FieldDescriptorProto()\n              ..name = 'x'\n              ..jsonName = 'x'\n              ..number = 1\n              ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n              ..type = FieldDescriptorProto_Type.TYPE_MESSAGE\n              ..typeName = '.p2.M',\n          ]);\n    final fd2 =\n        FileDescriptorProto()\n          ..package = 'p2'\n          ..name = 'package2.proto'\n          ..messageType.add(md2);\n\n    // Description of test.proto.\n    final md =\n        DescriptorProto()\n          ..name = 'M'\n          ..field.addAll([\n            // optional M m = 1;\n            FieldDescriptorProto()\n              ..name = 'm'\n              ..jsonName = 'm'\n              ..number = 1\n              ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n              ..type = FieldDescriptorProto_Type.TYPE_MESSAGE\n              ..typeName = '.M',\n            // optional p1.M m1 = 2;\n            FieldDescriptorProto()\n              ..name = 'm1'\n              ..jsonName = 'm1'\n              ..number = 2\n              ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n              ..type = FieldDescriptorProto_Type.TYPE_MESSAGE\n              ..typeName = '.p1.M',\n            // optional p2.M m2 = 3;\n            FieldDescriptorProto()\n              ..name = 'm2'\n              ..jsonName = 'm2'\n              ..number = 3\n              ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n              ..type = FieldDescriptorProto_Type.TYPE_MESSAGE\n              ..typeName = '.p2.M',\n          ]);\n    final fd =\n        FileDescriptorProto()\n          ..name = 'test.proto'\n          ..messageType.add(md);\n    fd.dependency.addAll(['package1.proto', 'package2.proto']);\n    final request =\n        CodeGeneratorRequest()..parameter = 'disable_constructor_args';\n    final response = CodeGeneratorResponse();\n    final options = parseGenerationOptions(request, response)!;\n\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    link(options, [\n      fg,\n      FileGenerator(testEditionDefaults, fd1, options),\n      FileGenerator(testEditionDefaults, fd2, options),\n    ]);\n    expectGolden(\n      fg.generateMainFile().emitSource(format: true),\n      'imports.pb.dart',\n    );\n    expectGolden(\n      fg.generateEnumFile().emitSource(format: true),\n      'imports.pbjson.dart',\n    );\n  });\n\n  test('FileGenerator rejects files without valid edition defaults', () {\n    final fd = buildFileDescriptor();\n    final editionDefaults =\n        FeatureSetDefaults()\n          ..defaults.add(\n            FeatureSetDefaults_FeatureSetEditionDefault()\n              ..edition = Edition.EDITION_2023\n              ..overridableFeatures =\n                  testEditionDefaults.defaults[0].overridableFeatures,\n          )\n          ..minimumEdition = Edition.EDITION_PROTO2\n          ..maximumEdition = Edition.EDITION_2023;\n\n    expect(\n      () => FileGenerator(editionDefaults, fd, GenerationOptions()),\n      throwsA(\n        const TypeMatcher<ArgumentError>().having(\n          (e) => e.message,\n          'message',\n          allOf(contains('No default found'), contains('EDITION_PROTO2')),\n        ),\n      ),\n    );\n  });\n\n  test('FileGenerator rejects files before the minimum supported edition', () {\n    final fd = buildFileDescriptor();\n    final editionDefaults =\n        FeatureSetDefaults()\n          ..defaults.addAll(testEditionDefaults.defaults.sublist(1))\n          ..minimumEdition = Edition.EDITION_PROTO3\n          ..maximumEdition = Edition.EDITION_2023;\n\n    expect(\n      () => FileGenerator(editionDefaults, fd, GenerationOptions()),\n      throwsA(\n        const TypeMatcher<ArgumentError>().having(\n          (e) => e.message,\n          'message',\n          contains('earlier than the minimum'),\n        ),\n      ),\n    );\n  });\n\n  test('FileGenerator rejects files after the maximum supported edition', () {\n    final fd = buildFileDescriptor()..edition = Edition.EDITION_2023;\n    final editionDefaults =\n        FeatureSetDefaults()\n          ..defaults.addAll(testEditionDefaults.defaults)\n          ..minimumEdition = Edition.EDITION_PROTO2\n          ..maximumEdition = Edition.EDITION_PROTO3;\n\n    expect(\n      () => FileGenerator(editionDefaults, fd, GenerationOptions()),\n      throwsA(\n        const TypeMatcher<ArgumentError>().having(\n          (e) => e.message,\n          'message',\n          contains('later than the maximum'),\n        ),\n      ),\n    );\n  });\n\n  test('FileGenerator initializes the file-level edition defaults', () {\n    final fd = buildFileDescriptor();\n    final editionDefaults = testEditionDefaults.deepCopy();\n    setTestFeature(editionDefaults.defaults[0].overridableFeatures, 1);\n\n    final fg = FileGenerator(editionDefaults, fd, GenerationOptions());\n    expect(fg.features.enumType, FeatureSet_EnumType.CLOSED);\n    expect(fg.features.fieldPresence, FeatureSet_FieldPresence.EXPLICIT);\n    expect(\n      fg.features.messageEncoding,\n      FeatureSet_MessageEncoding.LENGTH_PREFIXED,\n    );\n    expect(fg.features.utf8Validation, FeatureSet_Utf8Validation.NONE);\n    expect(\n      fg.features.repeatedFieldEncoding,\n      FeatureSet_RepeatedFieldEncoding.EXPANDED,\n    );\n    expect(fg.features.jsonFormat, FeatureSet_JsonFormat.LEGACY_BEST_EFFORT);\n    expect(getTestFeature(fg.features), 1);\n  });\n\n  test('FileGenerator uses file-level overrides', () {\n    final fd = setTestFeature(\n      buildFileDescriptor()..edition = Edition.EDITION_2023,\n      2,\n    );\n    final editionDefaults = testEditionDefaults.deepCopy();\n    setTestFeature(editionDefaults.defaults[0].overridableFeatures, 1);\n\n    final fg = FileGenerator(editionDefaults, fd, GenerationOptions());\n    expect(fg.features.enumType, FeatureSet_EnumType.OPEN);\n    expect(fg.features.fieldPresence, FeatureSet_FieldPresence.EXPLICIT);\n    expect(\n      fg.features.messageEncoding,\n      FeatureSet_MessageEncoding.LENGTH_PREFIXED,\n    );\n    expect(fg.features.utf8Validation, FeatureSet_Utf8Validation.VERIFY);\n    expect(\n      fg.features.repeatedFieldEncoding,\n      FeatureSet_RepeatedFieldEncoding.PACKED,\n    );\n    expect(fg.features.jsonFormat, FeatureSet_JsonFormat.ALLOW);\n    expect(getTestFeature(fg.features), 2);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/freeze_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/entity.pb.dart';\nimport 'gen/nested_message.pb.dart';\n\nvoid main() {\n  test('testFreezingNestedFields', () {\n    final top =\n        Top()\n          ..nestedMessageList.add(Nested()..a = 1)\n          ..nestedMessageMap[1] = (Nested()..a = 2)\n          ..nestedMessage = (Nested()..a = 3);\n\n    // Create aliases to lists, maps, nested messages\n    final list = top.nestedMessageList;\n    final map = top.nestedMessageMap;\n    final msg1 = top.nestedMessageList[0];\n    final msg2 = top.nestedMessageMap[1]!;\n    final msg3 = top.nestedMessage;\n\n    top.freeze();\n\n    expect(top.isFrozen, true);\n\n    // Check list field\n    expect(top.nestedMessageList.length, 1);\n    expect(top.nestedMessageList[0].isFrozen, true);\n    expect(\n      () => top.nestedMessageList.add(Nested()..a = 0),\n      throwsA(const TypeMatcher<UnsupportedError>()),\n    );\n\n    // Check map field\n    expect(top.nestedMessageMap.length, 1);\n    expect(top.nestedMessageMap[1]!.isFrozen, true);\n    expect(\n      () => top.nestedMessageMap[2] = Nested()..a = 0,\n      throwsA(const TypeMatcher<UnsupportedError>()),\n    );\n    expect(\n      () => map[0] = Nested()..a = 0,\n      throwsA(const TypeMatcher<UnsupportedError>()),\n    );\n\n    // Check message field\n    expect(top.nestedMessage.isFrozen, true);\n\n    // Check aliases\n    expect(\n      () => list.add(Nested()..a = 0),\n      throwsA(const TypeMatcher<UnsupportedError>()),\n    );\n    expect(\n      () => map[123] = Nested()..a = 0,\n      throwsA(const TypeMatcher<UnsupportedError>()),\n    );\n    expect(list[0].isFrozen, true);\n    expect(map[1]!.isFrozen, true);\n    expect(msg1.isFrozen, true);\n    expect(msg2.isFrozen, true);\n    expect(msg3.isFrozen, true);\n  });\n\n  test('frozen messages should not be updated by merge methods', () {\n    final top = TopEntity()..freeze();\n\n    expect(\n      () => top.mergeFromBuffer(<int>[]),\n      throwsA(TypeMatcher<UnsupportedError>()),\n    );\n\n    expect(\n      () => top.mergeFromJsonMap({}),\n      throwsA(TypeMatcher<UnsupportedError>()),\n    );\n\n    expect(\n      () => top.mergeFromMessage(TopEntity()),\n      throwsA(TypeMatcher<UnsupportedError>()),\n    );\n\n    expect(\n      () => top.mergeFromProto3Json({}),\n      throwsA(TypeMatcher<UnsupportedError>()),\n    );\n  });\n\n  test('nested frozen messages should not be updated by merge methods', () {\n    // Check that recursive calls to merge methods check mutability.\n    // `mergeFromJsonMap` cannot be tested because of #726.\n\n    {\n      final top = TopEntity()..sub = (SubEntity()..freeze());\n\n      top.mergeFromBuffer(<int>[\n        (1 << 3) | 0, // tag = 1, type = varint\n        123, // int64 id = 123\n      ]);\n      expect(top.id, Int64(123));\n\n      expect(\n        () => top.mergeFromBuffer(<int>[\n          (4 << 3) | 2, // tag = 4, type = length delimited\n          2, // length\n          (1 << 3) | 0, // tag = 1, type = varint\n          123, // int64 id = 123\n        ]),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    }\n\n    {\n      final top = TopEntity()..sub = (SubEntity()..freeze());\n\n      top.mergeFromMessage(TopEntity()..id = Int64(123));\n      expect(top.id, Int64(123));\n\n      expect(\n        () => top.mergeFromMessage(\n          TopEntity()..sub = (SubEntity()..id = Int64(123)),\n        ),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    }\n\n    {\n      final top = TopEntity()..sub = (SubEntity()..freeze());\n\n      top.mergeFromProto3Json({'id': 123});\n      expect(top.id, Int64(123));\n\n      expect(\n        () => top.mergeFromProto3Json({\n          'sub': {'id': 123},\n        }),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    }\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/generated_message_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\nimport 'package:fixnum/fixnum.dart';\n\nimport 'gen/duplicate_names_import.pb.dart';\nimport 'gen/enums.pb.dart';\nimport 'gen/google/protobuf/unittest.pb.dart';\nimport 'gen/google/protobuf/unittest_import.pb.dart';\nimport 'gen/google/protobuf/unittest_optimize_for.pb.dart';\nimport 'gen/multiple_files_test.pb.dart';\nimport 'gen/package1.pb.dart' as p1;\nimport 'gen/package2.pb.dart' as p2;\nimport 'gen/package3.pb.dart' as p3;\nimport 'gen/reserved_names.pb.dart';\nimport 'gen/reserved_names_extension.pb.dart';\nimport 'gen/reserved_names_message.pb.dart';\nimport 'src/test_util.dart';\n\nvoid main() {\n  final throwsInvalidProtocolBufferException = throwsA(\n    TypeMatcher<InvalidProtocolBufferException>(),\n  );\n  test('testProtosShareRepeatedArraysIfDidntChange', () {\n    final value1 =\n        TestAllTypes()\n          ..repeatedInt32.add(100)\n          ..repeatedImportEnum.add(ImportEnum.IMPORT_BAR)\n          ..repeatedForeignMessage.add(ForeignMessage());\n\n    final value2 = value1.deepCopy();\n\n    expect(value2.repeatedInt32, value1.repeatedInt32);\n    expect(value2.repeatedImportEnum, value1.repeatedImportEnum);\n    expect(value2.repeatedForeignMessage, value1.repeatedForeignMessage);\n  });\n\n  test('testDefaultMessageIsReadOnly', () {\n    var message = TestAllTypes();\n    expect(\n      message.optionalNestedMessage,\n      same(TestAllTypes_NestedMessage.getDefault()),\n    );\n    expect(() {\n      message.optionalNestedMessage.bb = 123;\n    }, throwsUnsupportedError);\n\n    message = TestAllTypes.getDefault();\n    expect(() {\n      message.clear();\n    }, throwsUnsupportedError);\n    expect(() {\n      message.optionalString = '123';\n    }, throwsUnsupportedError);\n    expect(() {\n      message.clearOptionalString();\n    }, throwsUnsupportedError);\n    expect(() {\n      message.repeatedString.add('123');\n    }, throwsUnsupportedError);\n    expect(() {\n      message.repeatedString.clear();\n    }, throwsUnsupportedError);\n    expect(() {\n      message.unknownFields.clear();\n    }, throwsUnsupportedError);\n  });\n\n  test('testRepeatedSetters', () {\n    final message = getAllSet();\n    modifyRepeatedFields(message);\n    assertRepeatedFieldsModified(message);\n  });\n\n  test('testRepeatedAppend', () {\n    final message =\n        TestAllTypes()\n          ..repeatedInt32.addAll([1, 2, 3, 4])\n          ..repeatedForeignEnum.addAll([ForeignEnum.FOREIGN_BAZ])\n          ..repeatedForeignMessage.addAll([ForeignMessage()..c = 12]);\n\n    expect(message.repeatedInt32, [1, 2, 3, 4]);\n    expect(message.repeatedForeignEnum, [ForeignEnum.FOREIGN_BAZ]);\n    expect(message.repeatedForeignMessage.length, 1);\n    expect(message.repeatedForeignMessage[0].c, 12);\n  });\n\n  test('testSettingForeignMessage', () {\n    final message =\n        TestAllTypes()..optionalForeignMessage = (ForeignMessage()..c = 123);\n\n    final expectedMessage =\n        TestAllTypes()..optionalForeignMessage = (ForeignMessage()..c = 123);\n\n    expect(message, expectedMessage);\n  });\n\n  test('testSettingRepeatedForeignMessage', () {\n    final message =\n        TestAllTypes()..repeatedForeignMessage.add(ForeignMessage()..c = 456);\n\n    final expectedMessage =\n        TestAllTypes()..repeatedForeignMessage.add(ForeignMessage()..c = 456);\n\n    expect(message, expectedMessage);\n  });\n\n  test('testDefaults', () {\n    assertClear(TestAllTypes());\n\n    final message = TestExtremeDefaultValues();\n\n    expect(message.utf8String, '\\u1234');\n    expect(message.infDouble, same(double.infinity));\n    expect(message.negInfDouble, same(double.negativeInfinity));\n    expect(message.nanDouble.isNaN, isTrue);\n    expect(message.infFloat, same(double.infinity));\n    expect(message.negInfFloat, same(double.negativeInfinity));\n    expect(message.nanFloat.isNaN, isTrue);\n    expect(message.cppTrigraph, '? ? ?? ?? ??? ??/ ??-');\n    expect(\n      message.smallInt64.toRadixString(16).toUpperCase(),\n      '-7FFFFFFFFFFFFFFF',\n    );\n  });\n\n  test('testClear', () {\n    final message = TestAllTypes();\n\n    assertClear(message);\n    setAllFields(message);\n    message.clear();\n    assertClear(message);\n  });\n\n  test('test ensure method', () {\n    final message = TestAllTypes();\n    expect(message.hasOptionalNestedMessage(), isFalse);\n    expect(message.ensureOptionalNestedMessage(), TestAllTypes_NestedMessage());\n    expect(message.hasOptionalNestedMessage(), isTrue);\n  });\n\n  // void testReflectionGetters() {} // UNSUPPORTED -- until reflection\n  // void testReflectionSetters() {} // UNSUPPORTED -- until reflection\n  // void testReflectionSettersRejectNull() {} // UNSUPPORTED - reflection\n  // void testReflectionRepeatedSetters() {} // UNSUPPORTED -- reflection\n  // void testReflectionRepeatedSettersRejectNull() {} // UNSUPPORTED\n  // void testReflectionDefaults() {} // UNSUPPORTED -- until reflection\n\n  test('testEnumInterface', () {\n    expect(TestAllTypes().defaultNestedEnum, TypeMatcher<ProtobufEnum>());\n  });\n\n  test('testEnumMap', () {\n    for (final value in ForeignEnum.values) {\n      expect(ForeignEnum.valueOf(value.value), value);\n    }\n    expect(ForeignEnum.valueOf(12345), isNull);\n  });\n\n  test('testParsePackedToUnpacked', () {\n    final message = TestUnpackedTypes.fromBuffer(\n      getPackedSet().writeToBuffer(),\n    );\n    assertUnpackedFieldsSet(message);\n  });\n\n  test('testParseUnpackedToPacked', () {\n    final message = TestPackedTypes.fromBuffer(\n      getUnpackedSet().writeToBuffer(),\n    );\n    assertPackedFieldsSet(message);\n  });\n\n  test('testIgnoreJavaMultipleFilesOption', () {\n    // UNSUPPORTED getFile\n    // We mostly just want to check that things compile.\n    final message =\n        MessageWithNoOuter()\n          ..nested = (MessageWithNoOuter_NestedMessage()..i = 1)\n          ..foreign.add(TestAllTypes()..optionalInt32 = 1)\n          ..nestedEnum = MessageWithNoOuter_NestedEnum.BAZ\n          ..foreignEnum = EnumWithNoOuter.BAR;\n\n    expect(MessageWithNoOuter.fromBuffer(message.writeToBuffer()), message);\n\n    // Not currently supported in Dart protobuf.\n    // expect(MessageWithNoOuter.getDescriptor().getFile(),\n    //        MultipleFilesTestProto.getDescriptor());\n\n    final tagNumber = message.getTagNumber('foreignEnum')!;\n    expect(message.getField(tagNumber), EnumWithNoOuter.BAR);\n\n    // Not currently supported in Dart protobuf.\n    // expect(ServiceWithNoOuter.getDescriptor().getFile()\n    //        MultipleFilesTestProto.getDescriptor());\n\n    expect(\n      TestAllExtensions().hasExtension(Multiple_files_test.extensionWithOuter),\n      isFalse,\n    );\n  });\n\n  test('testOptionalFieldWithRequiredSubfieldsOptimizedForSize', () {\n    expect(TestOptionalOptimizedForSize().isInitialized(), isTrue);\n\n    expect(\n      (TestOptionalOptimizedForSize()..o = TestRequiredOptimizedForSize())\n          .isInitialized(),\n      isFalse,\n    );\n\n    expect(\n      (TestOptionalOptimizedForSize()\n            ..o = (TestRequiredOptimizedForSize()..x = 5))\n          .isInitialized(),\n      isTrue,\n    );\n  });\n\n  test('testSetAllFieldsAndClone', () {\n    final message = getAllSet();\n    assertAllFieldsSet(message);\n    assertAllFieldsSet(message.deepCopy());\n  });\n\n  test('testReadWholeMessage', () {\n    final message = getAllSet();\n    final List<int> rawBytes = message.writeToBuffer();\n    assertAllFieldsSet(TestAllTypes.fromBuffer(rawBytes));\n  });\n\n  test('testReadHugeBlob', () {\n    // Allocate and initialize a 1MB blob.\n    final blob = List<int>.generate(1 << 20, (i) => i % 256);\n\n    // Make a message containing it.\n    final message = getAllSet();\n    message.optionalBytes = blob;\n\n    final message2 = TestAllTypes.fromBuffer(message.writeToBuffer());\n    expect(message2.optionalBytes, message.optionalBytes);\n  });\n\n  test('testRecursiveMessageDefaultInstance', () {\n    final message = TestRecursiveMessage();\n    expect(message.a, isNotNull);\n    expect(message, message.a);\n  });\n\n  test('testMaliciousRecursion', () {\n    TestRecursiveMessage makeRecursiveMessage(int depth) {\n      return depth == 0\n          ? (TestRecursiveMessage()..i = 5)\n          : (TestRecursiveMessage()..a = makeRecursiveMessage(depth - 1));\n    }\n\n    void assertMessageDepth(TestRecursiveMessage message, int depth) {\n      if (depth == 0) {\n        expect(message.hasA(), isFalse);\n        expect(message.i, 5);\n      } else {\n        expect(message.hasA(), isTrue);\n        assertMessageDepth(message.a, depth - 1);\n      }\n    }\n\n    // Message with exactly `DEFAULT_RECURSION_LIMIT` levels of nesting.\n    final List<int> dataShallow =\n        makeRecursiveMessage(\n          CodedBufferReader.DEFAULT_RECURSION_LIMIT,\n        ).writeToBuffer();\n    // Message with more than `DEFAULT_RECURSION_LIMIT` levels of nesting.\n    final List<int> dataDeep =\n        makeRecursiveMessage(\n          CodedBufferReader.DEFAULT_RECURSION_LIMIT + 1,\n        ).writeToBuffer();\n\n    assertMessageDepth(\n      TestRecursiveMessage.fromBuffer(dataShallow),\n      CodedBufferReader.DEFAULT_RECURSION_LIMIT,\n    );\n\n    expect(() {\n      TestRecursiveMessage.fromBuffer(dataDeep);\n    }, throwsInvalidProtocolBufferException);\n\n    final input = CodedBufferReader(dataShallow, recursionLimit: 8);\n    expect(() {\n      // Uncomfortable alternative to below...\n      TestRecursiveMessage().mergeFromCodedBufferReader(input);\n    }, throwsInvalidProtocolBufferException);\n  });\n\n  test('testSizeLimit', () {\n    final input = CodedBufferReader(getAllSet().writeToBuffer(), sizeLimit: 16);\n\n    expect(() {\n      // Uncomfortable alternative to below...\n      TestAllTypes().mergeFromCodedBufferReader(input);\n    }, throwsInvalidProtocolBufferException);\n  });\n  test('testSerialize', () {\n    final expected = getAllSet();\n    final List<int> out = expected.writeToBuffer();\n    final actual = TestAllTypes.fromBuffer(out);\n    expect(actual, expected);\n  });\n\n  test('testEnumValues', () {\n    expect(TestAllTypes_NestedEnum.values, [\n      TestAllTypes_NestedEnum.FOO,\n      TestAllTypes_NestedEnum.BAR,\n      TestAllTypes_NestedEnum.BAZ,\n      TestAllTypes_NestedEnum.NEG,\n    ]);\n    expect(TestAllTypes_NestedEnum.FOO.value, 1);\n    expect(TestAllTypes_NestedEnum.BAR.value, 2);\n    expect(TestAllTypes_NestedEnum.BAZ.value, 3);\n  });\n\n  test('testWriteWholeMessage', () {\n    final goldenMessage = const <int>[\n      // no `dart format`\n      0x08, 0x65, 0x10, 0x66, 0x18, 0x67, 0x20, 0x68, 0x28, 0xd2, 0x01, 0x30,\n      0xd4, 0x01, 0x3d, 0x6b, 0x00, 0x00, 0x00, 0x41, 0x6c, 0x00, 0x00, 0x00,\n      0x00, 0x00, 0x00, 0x00, 0x4d, 0x6d, 0x00, 0x00, 0x00, 0x51, 0x6e, 0x00,\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0xde, 0x42, 0x61,\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x40, 0x68, 0x01, 0x72, 0x03,\n      0x31, 0x31, 0x35, 0x7a, 0x03, 0x31, 0x31, 0x36, 0x83, 0x01, 0x88, 0x01,\n      0x75, 0x84, 0x01, 0x92, 0x01, 0x02, 0x08, 0x76, 0x9a, 0x01, 0x02, 0x08,\n      0x77, 0xa2, 0x01, 0x02, 0x08, 0x78, 0xa8, 0x01, 0x03, 0xb0, 0x01, 0x06,\n      0xb8, 0x01, 0x09, 0xc2, 0x01, 0x03, 0x31, 0x32, 0x34, 0xca, 0x01, 0x03,\n      0x31, 0x32, 0x35, 0xf8, 0x01, 0xc9, 0x01, 0xf8, 0x01, 0xad, 0x02, 0x80,\n      0x02, 0xca, 0x01, 0x80, 0x02, 0xae, 0x02, 0x88, 0x02, 0xcb, 0x01, 0x88,\n      0x02, 0xaf, 0x02, 0x90, 0x02, 0xcc, 0x01, 0x90, 0x02, 0xb0, 0x02, 0x98,\n      0x02, 0x9a, 0x03, 0x98, 0x02, 0xe2, 0x04, 0xa0, 0x02, 0x9c, 0x03, 0xa0,\n      0x02, 0xe4, 0x04, 0xad, 0x02, 0xcf, 0x00, 0x00, 0x00, 0xad, 0x02, 0x33,\n      0x01, 0x00, 0x00, 0xb1, 0x02, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n      0x00, 0xb1, 0x02, 0x34, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd,\n      0x02, 0xd1, 0x00, 0x00, 0x00, 0xbd, 0x02, 0x35, 0x01, 0x00, 0x00, 0xc1,\n      0x02, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x02, 0x36,\n      0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0x02, 0x00, 0x00, 0x53,\n      0x43, 0xcd, 0x02, 0x00, 0x80, 0x9b, 0x43, 0xd1, 0x02, 0x00, 0x00, 0x00,\n      0x00, 0x00, 0x80, 0x6a, 0x40, 0xd1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\n      0x80, 0x73, 0x40, 0xd8, 0x02, 0x01, 0xd8, 0x02, 0x00, 0xe2, 0x02, 0x03,\n      0x32, 0x31, 0x35, 0xe2, 0x02, 0x03, 0x33, 0x31, 0x35, 0xea, 0x02, 0x03,\n      0x32, 0x31, 0x36, 0xea, 0x02, 0x03, 0x33, 0x31, 0x36, 0xf3, 0x02, 0xf8,\n      0x02, 0xd9, 0x01, 0xf4, 0x02, 0xf3, 0x02, 0xf8, 0x02, 0xbd, 0x02, 0xf4,\n      0x02, 0x82, 0x03, 0x03, 0x08, 0xda, 0x01, 0x82, 0x03, 0x03, 0x08, 0xbe,\n      0x02, 0x8a, 0x03, 0x03, 0x08, 0xdb, 0x01, 0x8a, 0x03, 0x03, 0x08, 0xbf,\n      0x02, 0x92, 0x03, 0x03, 0x08, 0xdc, 0x01, 0x92, 0x03, 0x03, 0x08, 0xc0,\n      0x02, 0x98, 0x03, 0x02, 0x98, 0x03, 0x03, 0xa0, 0x03, 0x05, 0xa0, 0x03,\n      0x06, 0xa8, 0x03, 0x08, 0xa8, 0x03, 0x09, 0xb2, 0x03, 0x03, 0x32, 0x32,\n      0x34, 0xb2, 0x03, 0x03, 0x33, 0x32, 0x34, 0xba, 0x03, 0x03, 0x32, 0x32,\n      0x35, 0xba, 0x03, 0x03, 0x33, 0x32, 0x35, 0xe8, 0x03, 0x91, 0x03, 0xf0,\n      0x03, 0x92, 0x03, 0xf8, 0x03, 0x93, 0x03, 0x80, 0x04, 0x94, 0x03, 0x88,\n      0x04, 0xaa, 0x06, 0x90, 0x04, 0xac, 0x06, 0x9d, 0x04, 0x97, 0x01, 0x00,\n      0x00, 0xa1, 0x04, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad,\n      0x04, 0x99, 0x01, 0x00, 0x00, 0xb1, 0x04, 0x9a, 0x01, 0x00, 0x00, 0x00,\n      0x00, 0x00, 0x00, 0xbd, 0x04, 0x00, 0x80, 0xcd, 0x43, 0xc1, 0x04, 0x00,\n      0x00, 0x00, 0x00, 0x00, 0xc0, 0x79, 0x40, 0xc8, 0x04, 0x00, 0xd2, 0x04,\n      0x03, 0x34, 0x31, 0x35, 0xda, 0x04, 0x03, 0x34, 0x31, 0x36, 0x88, 0x05,\n      0x01, 0x90, 0x05, 0x04, 0x98, 0x05, 0x07, 0xa2, 0x05, 0x03, 0x34, 0x32,\n      0x34, 0xaa, 0x05, 0x03, 0x34, 0x32, 0x35,\n    ];\n    expect(getAllSet().writeToBuffer(), goldenMessage);\n  });\n\n  test('testWriteWholePackedFieldsMessage', () {\n    final goldenPackedMessage = const <int>[\n      // no `dart format`\n      0xd2, 0x05, 0x04, 0xd9, 0x04, 0xbd, 0x05, 0xda, 0x05, 0x04, 0xda, 0x04,\n      0xbe, 0x05, 0xe2, 0x05, 0x04, 0xdb, 0x04, 0xbf, 0x05, 0xea, 0x05, 0x04,\n      0xdc, 0x04, 0xc0, 0x05, 0xf2, 0x05, 0x04, 0xba, 0x09, 0x82, 0x0b, 0xfa,\n      0x05, 0x04, 0xbc, 0x09, 0x84, 0x0b, 0x82, 0x06, 0x08, 0x5f, 0x02, 0x00,\n      0x00, 0xc3, 0x02, 0x00, 0x00, 0x8a, 0x06, 0x10, 0x60, 0x02, 0x00, 0x00,\n      0x00, 0x00, 0x00, 0x00, 0xc4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n      0x92, 0x06, 0x08, 0x61, 0x02, 0x00, 0x00, 0xc5, 0x02, 0x00, 0x00, 0x9a,\n      0x06, 0x10, 0x62, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x02,\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x06, 0x08, 0x00, 0xc0, 0x18,\n      0x44, 0x00, 0xc0, 0x31, 0x44, 0xaa, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00,\n      0x00, 0x20, 0x83, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x86, 0x40,\n      0xb2, 0x06, 0x02, 0x01, 0x00, 0xba, 0x06, 0x02, 0x05, 0x06,\n    ];\n    expect(getPackedSet().writeToBuffer(), goldenPackedMessage);\n  });\n\n  test('testWriteMessageWithNegativeEnumValue', () {\n    final message = SparseEnumMessage()..sparseEnum = TestSparseEnum.SPARSE_E;\n    expect(\n      message.sparseEnum.value < 0,\n      isTrue,\n      reason: 'enum.value should be -53452',\n    );\n    final message2 = SparseEnumMessage.fromBuffer(message.writeToBuffer());\n    expect(\n      message2.sparseEnum,\n      TestSparseEnum.SPARSE_E,\n      reason: 'should resolve back to SPARSE_E',\n    );\n  });\n\n  test('testReservedNamesOptional', () {\n    final message = ReservedNamesOptional();\n    message.hashCode_1 = 1;\n    expect(message.hashCode_1, 1);\n    expect(message.hasHashCode_1(), isTrue);\n    message.clearHashCode_1();\n\n    message.noSuchMethod_2 = 1;\n    message.runtimeType_3 = 1;\n    message.toString_4 = 1;\n    message.hasRequiredFields_12 = 1;\n    message.isInitialized_13 = 1;\n    message.clear_14 = 1;\n    message.getTagNumber_15 = 1;\n    message.check_16 = 1;\n    message.writeToBuffer_17 = 1;\n    message.writeToCodedBufferWriter_18 = 1;\n    message.mergeFromCodedBufferReader_19 = 1;\n    message.mergeFromBuffer_20 = 1;\n    message.writeToJson_21 = 1;\n    message.mergeFromJson_22 = 1;\n    message.addExtension_23 = 1;\n    message.getExtension_24 = 1;\n    message.setExtension_25 = 1;\n    message.hasExtension_26 = 1;\n    message.clearExtension_27 = 1;\n    message.getField_28 = 1;\n    message.setField_29 = 1;\n    message.hasField_30 = 1;\n    message.clearField_31 = 1;\n    message.extensionsAreInitialized_32 = 1;\n    message.mergeFromMessage_33 = 1;\n    message.mergeUnknownFields_34 = 1;\n    message.hashCode1 = 1;\n    message.x = 1;\n    message.hasX_51 = 1;\n    message.clearX_53 = 1;\n    message.hasX51 = 1;\n    message.clearX53 = 1;\n  });\n\n  test('testReservedNamesRepeated', () {\n    final message = ReservedNamesRepeated();\n    message.hashCode_1.clear();\n    message.noSuchMethod_2.clear();\n    message.runtimeType_3.clear();\n    message.toString_4.clear();\n    message.hasRequiredFields_12.clear();\n    message.isInitialized_13.clear();\n    message.clear_14.clear();\n    message.getTagNumber_15.clear();\n    message.check_16.clear();\n    message.writeToBuffer_17.clear();\n    message.writeToCodedBufferWriter_18.clear();\n    message.mergeFromCodedBufferReader_19.clear();\n    message.mergeFromBuffer_20.clear();\n    message.writeToJson_21.clear();\n    message.mergeFromJson_22.clear();\n    message.addExtension_23.clear();\n    message.getExtension_24.clear();\n    message.setExtension_25.clear();\n    message.hasExtension_26.clear();\n    message.clearExtension_27.clear();\n    message.getField_28.clear();\n    message.setField_29.clear();\n    message.hasField_30.clear();\n    message.clearField_31.clear();\n    message.extensionsAreInitialized_32.clear();\n    message.mergeFromMessage_33.clear();\n    message.mergeUnknownFields_34.clear();\n    message.hashCode1.clear();\n    message.x.clear();\n    message.hasX.clear();\n    message.clearX.clear();\n    message.hasX51.clear();\n    message.clearX53.clear();\n  });\n\n  test('testReservedNamesRequired', () {\n    final message = ReservedNamesRequired();\n    message.hashCode_1 = 1;\n    expect(message.hashCode_1, 1);\n    expect(message.hasHashCode_1(), isTrue);\n    message.clearHashCode_1();\n\n    message.noSuchMethod_2 = 1;\n    message.runtimeType_3 = 1;\n    message.toString_4 = 1;\n    message.hasRequiredFields_12 = 1;\n    message.isInitialized_13 = 1;\n    message.clear_14 = 1;\n    message.getTagNumber_15 = 1;\n    message.check_16 = 1;\n    message.writeToBuffer_17 = 1;\n    message.writeToCodedBufferWriter_18 = 1;\n    message.mergeFromCodedBufferReader_19 = 1;\n    message.mergeFromBuffer_20 = 1;\n    message.writeToJson_21 = 1;\n    message.mergeFromJson_22 = 1;\n    message.addExtension_23 = 1;\n    message.getExtension_24 = 1;\n    message.setExtension_25 = 1;\n    message.hasExtension_26 = 1;\n    message.clearExtension_27 = 1;\n    message.getField_28 = 1;\n    message.setField_29 = 1;\n    message.hasField_30 = 1;\n    message.clearField_31 = 1;\n    message.extensionsAreInitialized_32 = 1;\n    message.mergeFromMessage_33 = 1;\n    message.mergeUnknownFields_34 = 1;\n    message.hashCode1 = 1;\n    message.x = 1;\n    message.hasX_51 = 1;\n    message.clearX_53 = 1;\n    message.hasX51 = 1;\n    message.clearX53 = 1;\n  });\n\n  test('testReservedWordsOptional', () {\n    final message = ReservedWordsOptional();\n    message.assert_1 = 1;\n    message.break_2 = 1;\n    message.case_3 = 1;\n    message.catch_4 = 1;\n    message.class_5 = 1;\n    message.const_6 = 1;\n    message.continue_7 = 1;\n    message.default_8 = 1;\n    message.do_9 = 1;\n    message.else_10 = 1;\n    message.enum_11 = 1;\n    message.extends_12 = 1;\n    message.false_13 = 1;\n    message.final_14 = 1;\n    message.finally_15 = 1;\n    message.for_16 = 1;\n    message.if_17 = 1;\n    message.in_18 = 1;\n    message.is_19 = 1;\n    message.new_20 = 1;\n    message.null_21 = 1;\n    message.rethrow_22 = 1;\n    message.return_23 = 1;\n    message.super_24 = 1;\n    message.switch_25 = 1;\n    message.this_26 = 1;\n    message.throw_27 = 1;\n    message.true_28 = 1;\n    message.try_29 = 1;\n    message.var_30 = 1;\n    message.void_31 = 1;\n    message.while_32 = 1;\n    message.with_33 = 1;\n  });\n\n  test('testReservedWordsRepeated', () {\n    final message = ReservedWordsRepeated();\n    message.assert_1.clear();\n    message.break_2.clear();\n    message.case_3.clear();\n    message.catch_4.clear();\n    message.class_5.clear();\n    message.const_6.clear();\n    message.continue_7.clear();\n    message.default_8.clear();\n    message.do_9.clear();\n    message.else_10.clear();\n    message.enum_11.clear();\n    message.extends_12.clear();\n    message.false_13.clear();\n    message.final_14.clear();\n    message.finally_15.clear();\n    message.for_16.clear();\n    message.if_17.clear();\n    message.in_18.clear();\n    message.is_19.clear();\n    message.new_20.clear();\n    message.null_21.clear();\n    message.rethrow_22.clear();\n    message.return_23.clear();\n    message.super_24.clear();\n    message.switch_25.clear();\n    message.this_26.clear();\n    message.throw_27.clear();\n    message.true_28.clear();\n    message.try_29.clear();\n    message.var_30.clear();\n    message.void_31.clear();\n    message.while_32.clear();\n    message.with_33.clear();\n  });\n\n  test('testReservedWordsRequired', () {\n    final message = ReservedWordsRequired();\n    message.assert_1 = 1;\n    message.break_2 = 1;\n    message.case_3 = 1;\n    message.catch_4 = 1;\n    message.class_5 = 1;\n    message.const_6 = 1;\n    message.continue_7 = 1;\n    message.default_8 = 1;\n    message.do_9 = 1;\n    message.else_10 = 1;\n    message.enum_11 = 1;\n    message.extends_12 = 1;\n    message.false_13 = 1;\n    message.final_14 = 1;\n    message.finally_15 = 1;\n    message.for_16 = 1;\n    message.if_17 = 1;\n    message.in_18 = 1;\n    message.is_19 = 1;\n    message.new_20 = 1;\n    message.null_21 = 1;\n    message.rethrow_22 = 1;\n    message.return_23 = 1;\n    message.super_24 = 1;\n    message.switch_25 = 1;\n    message.this_26 = 1;\n    message.throw_27 = 1;\n    message.true_28 = 1;\n    message.try_29 = 1;\n    message.var_30 = 1;\n    message.void_31 = 1;\n    message.while_32 = 1;\n    message.with_33 = 1;\n  });\n\n  test('testReservedWordsRequired', () {\n    final message = MessageWithReservedEnum();\n    message.enum_1 = ReservedEnum.assert_;\n    message.enum_1 = ReservedEnum.break_;\n    message.enum_1 = ReservedEnum.case_;\n    message.enum_1 = ReservedEnum.catch_;\n    message.enum_1 = ReservedEnum.class_;\n    message.enum_1 = ReservedEnum.const_;\n    message.enum_1 = ReservedEnum.continue_;\n    message.enum_1 = ReservedEnum.default_;\n    message.enum_1 = ReservedEnum.do_;\n    message.enum_1 = ReservedEnum.else_;\n    message.enum_1 = ReservedEnum.enum_;\n    message.enum_1 = ReservedEnum.extends_;\n    message.enum_1 = ReservedEnum.false_;\n    message.enum_1 = ReservedEnum.final_;\n    message.enum_1 = ReservedEnum.finally_;\n    message.enum_1 = ReservedEnum.for_;\n    message.enum_1 = ReservedEnum.if_;\n    message.enum_1 = ReservedEnum.in_;\n    message.enum_1 = ReservedEnum.is_;\n    message.enum_1 = ReservedEnum.new_;\n    message.enum_1 = ReservedEnum.null_;\n    message.enum_1 = ReservedEnum.rethrow_;\n    message.enum_1 = ReservedEnum.return_;\n    message.enum_1 = ReservedEnum.super_;\n    message.enum_1 = ReservedEnum.switch_;\n    message.enum_1 = ReservedEnum.this_;\n    message.enum_1 = ReservedEnum.throw_;\n    message.enum_1 = ReservedEnum.true_;\n    message.enum_1 = ReservedEnum.try_;\n    message.enum_1 = ReservedEnum.var_;\n    message.enum_1 = ReservedEnum.void_;\n    message.enum_1 = ReservedEnum.while_;\n    message.enum_1 = ReservedEnum.with_;\n  });\n\n  test('testReservedWordsExtension', () {\n    final message = ExtendMe();\n    message.setExtension(Reserved_names_extension.assert_1001, 1);\n    message.setExtension(Reserved_names_extension.break_1002, 1);\n    message.setExtension(Reserved_names_extension.case_1003, 1);\n    message.setExtension(Reserved_names_extension.catch_1004, 1);\n    message.setExtension(Reserved_names_extension.class_1005, 1);\n    message.setExtension(Reserved_names_extension.const_1006, 1);\n    message.setExtension(Reserved_names_extension.continue_1007, 1);\n    message.setExtension(Reserved_names_extension.default_1008, 1);\n    message.setExtension(Reserved_names_extension.do_1009, 1);\n    message.setExtension(Reserved_names_extension.else_1010, 1);\n    message.setExtension(Reserved_names_extension.enum_1011, 1);\n    message.setExtension(Reserved_names_extension.extends_1012, 1);\n    message.setExtension(Reserved_names_extension.false_1013, 1);\n    message.setExtension(Reserved_names_extension.final_1014, 1);\n    message.setExtension(Reserved_names_extension.finally_1015, 1);\n    message.setExtension(Reserved_names_extension.for_1016, 1);\n    message.setExtension(Reserved_names_extension.if_1017, 1);\n    message.setExtension(Reserved_names_extension.in_1018, 1);\n    message.setExtension(Reserved_names_extension.is_1019, 1);\n    message.setExtension(Reserved_names_extension.new_1020, 1);\n    message.setExtension(Reserved_names_extension.null_1021, 1);\n    message.setExtension(Reserved_names_extension.rethrow_1022, 1);\n    message.setExtension(Reserved_names_extension.return_1023, 1);\n    message.setExtension(Reserved_names_extension.super_1024, 1);\n    message.setExtension(Reserved_names_extension.switch_1025, 1);\n    message.setExtension(Reserved_names_extension.this_1026, 1);\n    message.setExtension(Reserved_names_extension.throw_1027, 1);\n    message.setExtension(Reserved_names_extension.true_1028, 1);\n    message.setExtension(Reserved_names_extension.try_1029, 1);\n    message.setExtension(Reserved_names_extension.var_1030, 1);\n    message.setExtension(Reserved_names_extension.void_1031, 1);\n    message.setExtension(Reserved_names_extension.while_1032, 1);\n    message.setExtension(Reserved_names_extension.with_1033, 1);\n  });\n\n  test('testReservedWordsMessage', () {\n    assert_();\n    break_();\n    case_();\n    catch_();\n    class_();\n    const_();\n    continue_();\n    default_();\n    do_();\n    else_();\n    enum_();\n    extends_();\n    false_();\n    final_();\n    finally_();\n    for_();\n    if_();\n    in_();\n    is_();\n    new_();\n    null_();\n    rethrow_();\n    return_();\n    super_();\n    switch_();\n    this_();\n    throw_();\n    true_();\n    try_();\n    var_();\n    void_();\n    while_();\n    with_();\n  });\n\n  test('testImportDuplicatenames', () {\n    final message = M();\n    message.m1 = p1.M();\n    message.m1M = p1.M_M();\n    message.m2 = p2.M();\n    message.m2M = p2.M_M();\n    message.m3 = p3.M();\n    message.m3M = p3.M_M();\n  });\n\n  test('to toDebugString', () {\n    final value1 = TestAllTypes()..optionalString = 'test 123';\n    expect(value1.toString(), 'optionalString: test 123\\n');\n  });\n\n  test('operator== and hashCode works for bytes', () {\n    final t1 = TestAllTypes()..optionalBytes = [1];\n    final t2 = TestAllTypes()..optionalBytes = [1];\n    final t3 = TestAllTypes.fromBuffer(t1.writeToBuffer());\n    expect(t1, equals(t2));\n    expect(t1.hashCode, equals(t2.hashCode));\n    expect(t1, equals(t3));\n    expect(t1.hashCode, equals(t3.hashCode));\n  });\n\n  test('rebuild updates value', () {\n    final value1 =\n        TestAllTypes()\n          ..optionalForeignMessage = (ForeignMessage()..c = 18)\n          ..freeze();\n    final value2 = value1.rebuild((v) {\n      v.optionalFloat = 50.1;\n      v.optionalForeignMessage = v.optionalForeignMessage.rebuild(\n        (o) => o.c = 10,\n      );\n    });\n    expect(value2.isFrozen, true);\n    expect(value2.optionalFloat, 50.1);\n    expect(value2.optionalForeignMessage.isFrozen, true);\n  });\n\n  test('rebuild requires a frozen message', () {\n    final value = TestAllTypes();\n    expect(() => value.rebuild((x) {}), throwsArgumentError);\n  });\n\n  test('rebuild shares structure', () {\n    final value1 =\n        TestAllTypes()\n          ..optionalForeignMessage = (ForeignMessage()..c = 18)\n          ..freeze();\n    final value2 = value1.rebuild((v) {\n      v.optionalFloat = 50.1;\n    });\n    expect(value2.isFrozen, true);\n    expect(value2.optionalFloat, 50.1);\n    expect(value1.optionalForeignMessage.isFrozen, true);\n    expect(value1.optionalForeignMessage, same(value2.optionalForeignMessage));\n  });\n\n  test('deepCopy', () {\n    final value1 = getAllSet();\n    final value2 = value1.deepCopy();\n    testCopy(value1, value2);\n  });\n\n  test('clone', () {\n    final value1 = getAllSet();\n    // ignore: deprecated_member_use_from_same_package\n    final value2 = value1.clone();\n    testCopy(value1, value2);\n  });\n\n  test('deepCopy extensions', () {\n    final value1 = TestAllExtensions();\n    setAllExtensions(value1);\n    final value2 = value1.deepCopy();\n    assertAllExtensionsSet(value2);\n  });\n\n  test('clone extensions', () {\n    final value1 = TestAllExtensions();\n    setAllExtensions(value1);\n    // ignore: deprecated_member_use_from_same_package\n    final value2 = value1.clone();\n    assertAllExtensionsSet(value2);\n  });\n\n  test('mergeFromMessage', () {\n    final value1 = getAllSet();\n    final value2 = TestAllTypes()..mergeFromMessage(value1);\n    testCopy(value1, value2);\n  });\n\n  test('mergeFromMessage extensions', () {\n    final value1 = TestAllExtensions();\n    setAllExtensions(value1);\n    final value2 = TestAllExtensions()..mergeFromMessage(value1);\n    assertAllExtensionsSet(value2);\n  });\n\n  test('Handling enums defined out of order', () {\n    final message = MessageWithEnums();\n    for (final enum_ in DenseEnum.values) {\n      message.denseEnums.add(enum_);\n    }\n    for (final enum_ in DenseEnumOutOfOrder.values) {\n      message.denseOutOfOrderEnums.add(enum_);\n    }\n    for (final enum_ in SparseEnum.values) {\n      message.sparseEnums.add(enum_);\n    }\n    for (final enum_ in SparseEnumOutOfOrder.values) {\n      message.sparseOutOfOrderEnums.add(enum_);\n    }\n\n    final encoded = message.writeToBuffer();\n    final decoded = MessageWithEnums.fromBuffer(encoded);\n    expect(decoded.denseEnums, DenseEnum.values);\n    expect(decoded.denseOutOfOrderEnums, DenseEnumOutOfOrder.values);\n    expect(decoded.sparseEnums, SparseEnum.values);\n    expect(decoded.sparseOutOfOrderEnums, SparseEnumOutOfOrder.values);\n  });\n}\n\n/// Shared test function to test `clone` and `deepCopy`.\n///\n/// `value2` should be the clone of `value1`, either with `clone` or `deepCopy`.\nvoid testCopy(TestAllTypes value1, TestAllTypes value2) {\n  assertAllFieldsSet(value2);\n  expect(value2, isNot(same(value1)));\n\n  // Check that updates to value2 does not update value1.\n  value2.optionalInt32 += 1;\n  value2.optionalInt64 += 1;\n  value2.optionalUint32 += 1;\n  value2.optionalUint64 += 1;\n  value2.optionalSint32 += 1;\n  value2.optionalSint64 += 1;\n  value2.optionalFixed32 += 1;\n  value2.optionalFixed64 += 1;\n  value2.optionalSfixed32 += 1;\n  value2.optionalSfixed64 += 1;\n  value2.optionalFloat += 1;\n  value2.optionalDouble += 1;\n  value2.optionalBool = !value2.optionalBool;\n  value2.optionalString = \"hi 1\";\n\n  // Don't test `bytes` fields: the semantics here depends on the field value:\n  // - If the value is `Uint8List` or a non-growable list, this will throw.\n  // - Otherwise it will update both messages as the library assumes `bytes`\n  //   fields are immutable and can be shared.\n  // value2.optionalBytes.add(123);\n\n  value2.optionalgroup.a += 1;\n  value2.optionalNestedMessage.bb += 1;\n  value2.optionalImportMessage.d += 1;\n  value2.optionalNestedEnum = TestAllTypes_NestedEnum.BAR;\n  value2.optionalForeignEnum = ForeignEnum.FOREIGN_BAR;\n  value2.optionalImportEnum = ImportEnum.IMPORT_BAR;\n  value2.optionalStringPiece = \"hi 2\";\n  value2.optionalCord = \"hi 3\";\n  modifyRepeatedFields(value2);\n\n  assertAllFieldsSet(value1);\n}\n\n/// Same as `testCopy`, but tests extension fields.\n///\n/// `value2` should be the clone of `value1`, either with `clone` or `deepCopy`.\nvoid testCopyExtensions(TestAllExtensions value1, TestAllExtensions value2) {\n  assertAllExtensionsSet(value2);\n  expect(value2, isNot(same(value1)));\n\n  value2.setExtension(\n    Unittest.optionalInt32Extension,\n    value2.getExtension(Unittest.optionalInt32Extension) + 1,\n  );\n  value2.setExtension(\n    Unittest.optionalInt64Extension,\n    value2.getExtension(Unittest.optionalInt64Extension) + 1,\n  );\n  value2.setExtension(\n    Unittest.optionalUint32Extension,\n    value2.getExtension(Unittest.optionalUint32Extension) + 1,\n  );\n  value2.setExtension(\n    Unittest.optionalUint64Extension,\n    value2.getExtension(Unittest.optionalUint64Extension) + 1,\n  );\n  value2.setExtension(\n    Unittest.optionalSint32Extension,\n    value2.getExtension(Unittest.optionalSint32Extension) + 1,\n  );\n  value2.setExtension(\n    Unittest.optionalSint64Extension,\n    value2.getExtension(Unittest.optionalSint64Extension) + 1,\n  );\n  value2.setExtension(\n    Unittest.optionalFixed32Extension,\n    value2.getExtension(Unittest.optionalFixed32Extension) + 1,\n  );\n  value2.setExtension(\n    Unittest.optionalFixed64Extension,\n    value2.getExtension(Unittest.optionalFixed64Extension) + 1,\n  );\n  value2.setExtension(\n    Unittest.optionalFloatExtension,\n    value2.getExtension(Unittest.optionalFloatExtension) + 1,\n  );\n  value2.setExtension(\n    Unittest.optionalDoubleExtension,\n    value2.getExtension(Unittest.optionalDoubleExtension) + 1,\n  );\n  value2.setExtension(\n    Unittest.optionalBoolExtension,\n    !value2.getExtension(Unittest.optionalBoolExtension),\n  );\n  value2.setExtension(Unittest.optionalStringExtension, \"hi 1\");\n\n  // Same as `testCopy`, don't test `bytes` fields.\n  // value2.getExtension(Unittest.optionalBytesExtension).add(987);\n\n  value2.getExtension(Unittest.optionalgroupExtension).a += 1;\n  value2.getExtension(Unittest.optionalNestedMessageExtension).bb += 1;\n  value2.getExtension(Unittest.optionalForeignMessageExtension).c += 1;\n  value2.getExtension(Unittest.optionalImportMessageExtension).d += 1;\n  value2.setExtension(\n    Unittest.optionalNestedEnumExtension,\n    TestAllTypes_NestedEnum.BAR,\n  );\n  value2.setExtension(\n    Unittest.optionalForeignEnumExtension,\n    ForeignEnum.FOREIGN_BAR,\n  );\n  value2.setExtension(\n    Unittest.optionalImportEnumExtension,\n    ImportEnum.IMPORT_BAR,\n  );\n  value2.setExtension(Unittest.optionalStringPieceExtension, \"hi 2\");\n  value2.setExtension(Unittest.optionalCordExtension, \"hi 3\");\n\n  value2.getExtension(Unittest.repeatedInt32Extension).add(123);\n  value2.getExtension(Unittest.repeatedInt64Extension).add(Int64(123));\n  value2.getExtension(Unittest.repeatedUint32Extension).add(123);\n  value2.getExtension(Unittest.repeatedUint64Extension).add(Int64(123));\n  value2.getExtension(Unittest.repeatedSint32Extension).add(123);\n  value2.getExtension(Unittest.repeatedSint64Extension).add(Int64(123));\n  value2.getExtension(Unittest.repeatedFixed32Extension).add(123);\n  value2.getExtension(Unittest.repeatedFixed64Extension).add(Int64(123));\n  value2.getExtension(Unittest.repeatedSfixed32Extension).add(123);\n  value2.getExtension(Unittest.repeatedSfixed64Extension).add(Int64(123));\n  value2.getExtension(Unittest.repeatedFloatExtension).add(123);\n  value2.getExtension(Unittest.repeatedDoubleExtension).add(123);\n  value2.getExtension(Unittest.repeatedDoubleExtension).add(true);\n  value2.getExtension(Unittest.repeatedStringExtension).add(\"hi 4\");\n  value2.getExtension(Unittest.repeatedBytesExtension).add(<int>[1, 2, 3]);\n  value2\n      .getExtension(Unittest.repeatedgroupExtension)\n      .add(RepeatedGroup_extension());\n  value2\n      .getExtension(Unittest.repeatedNestedMessageExtension)\n      .add(TestAllTypes_NestedMessage());\n  value2\n      .getExtension(Unittest.repeatedForeignMessageExtension)\n      .add(ForeignMessage());\n  value2\n      .getExtension(Unittest.repeatedImportMessageExtension)\n      .add(ImportMessage());\n  value2\n      .getExtension(Unittest.repeatedNestedEnumExtension)\n      .add(TestAllTypes_NestedEnum.BAR);\n  value2\n      .getExtension(Unittest.repeatedForeignEnumExtension)\n      .add(ForeignEnum.FOREIGN_BAR);\n  value2\n      .getExtension(Unittest.repeatedImportEnumExtension)\n      .add(ImportEnum.IMPORT_BAR);\n  value2.getExtension(Unittest.repeatedStringPieceExtension).add(\"hi 5\");\n  value2.getExtension(Unittest.repeatedCordExtension).add(\"hi 6\");\n\n  assertAllExtensionsSet(value1);\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/client.pb.dart",
    "content": "class TestApi {\n  final $pb.RpcClient _client;\n\n  TestApi(this._client);\n\n  $async.Future<SomeReply> aMethod(\n    $pb.ClientContext? ctx,\n    SomeRequest request,\n  ) => _client.invoke<SomeReply>(ctx, 'Test', 'AMethod', request, SomeReply());\n  $async.Future<$0.AnotherReply> anotherMethod(\n    $pb.ClientContext? ctx,\n    $0.EmptyMessage request,\n  ) => _client.invoke<$0.AnotherReply>(\n    ctx,\n    'Test',\n    'AnotherMethod',\n    request,\n    $0.AnotherReply(),\n  );\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/deprecations.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from deprecations.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'deprecations.pbenum.dart';\n\n@$core.Deprecated('This message is deprecated')\nclass HelloRequest extends $pb.GeneratedMessage {\n  factory HelloRequest({\n    @$core.Deprecated('This field is deprecated.') $core.String? name,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    return result;\n  }\n\n  HelloRequest._();\n\n  factory HelloRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory HelloRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'HelloRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'service2'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  HelloRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  HelloRequest copyWith(void Function(HelloRequest) updates) =>\n      super.copyWith((message) => updates(message as HelloRequest))\n          as HelloRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static HelloRequest create() => HelloRequest._();\n  @$core.override\n  HelloRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static HelloRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<HelloRequest>(create);\n  static HelloRequest? _defaultInstance;\n\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n}\n\nclass HelloReply extends $pb.GeneratedMessage {\n  factory HelloReply({\n    $core.String? message,\n  }) {\n    final result = create();\n    if (message != null) result.message = message;\n    return result;\n  }\n\n  HelloReply._();\n\n  factory HelloReply.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory HelloReply.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'HelloReply',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'service2'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'message')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  HelloReply clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  HelloReply copyWith(void Function(HelloReply) updates) =>\n      super.copyWith((message) => updates(message as HelloReply)) as HelloReply;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static HelloReply create() => HelloReply._();\n  @$core.override\n  HelloReply createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static HelloReply getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<HelloReply>(create);\n  static HelloReply? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get message => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set message($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasMessage() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearMessage() => $_clearField(1);\n}\n\n@$core.Deprecated('This service is deprecated')\nclass GreeterApi {\n  final $pb.RpcClient _client;\n\n  GreeterApi(this._client);\n\n  @$core.Deprecated('This method is deprecated')\n  $async.Future<HelloReply> sayHello(\n          $pb.ClientContext? ctx, HelloRequest request) =>\n      _client.invoke<HelloReply>(\n          ctx, 'Greeter', 'SayHello', request, HelloReply());\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/deprecations.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from deprecations.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n@$core.Deprecated('This enum is deprecated')\nclass A extends $pb.ProtobufEnum {\n  @$core.Deprecated('This enum value is deprecated')\n  static const A A1 = A._(0, _omitEnumNames ? '' : 'A1');\n  static const A A2 = A._(1, _omitEnumNames ? '' : 'A2');\n\n  static const $core.List<A> values = <A>[\n    A1,\n    A2,\n  ];\n\n  static final $core.List<A?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 1);\n  static A? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const A._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/doc_comments.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from doc_comments.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'doc_comments.pbenum.dart';\n\n/// This is a message.\nclass HelloRequest extends $pb.GeneratedMessage {\n  factory HelloRequest({\n    $core.String? name,\n  }) {\n    final result = create();\n    if (name != null) result.name = name;\n    return result;\n  }\n\n  HelloRequest._();\n\n  factory HelloRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory HelloRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'HelloRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'service1'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'name')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  HelloRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  HelloRequest copyWith(void Function(HelloRequest) updates) =>\n      super.copyWith((message) => updates(message as HelloRequest))\n          as HelloRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static HelloRequest create() => HelloRequest._();\n  @$core.override\n  HelloRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static HelloRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<HelloRequest>(create);\n  static HelloRequest? _defaultInstance;\n\n  /// This is a message field.\n  @$pb.TagNumber(1)\n  $core.String get name => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set name($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearName() => $_clearField(1);\n}\n\nclass HelloReply extends $pb.GeneratedMessage {\n  factory HelloReply({\n    $core.String? message,\n  }) {\n    final result = create();\n    if (message != null) result.message = message;\n    return result;\n  }\n\n  HelloReply._();\n\n  factory HelloReply.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory HelloReply.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'HelloReply',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'service1'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'message')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  HelloReply clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  HelloReply copyWith(void Function(HelloReply) updates) =>\n      super.copyWith((message) => updates(message as HelloReply)) as HelloReply;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static HelloReply create() => HelloReply._();\n  @$core.override\n  HelloReply createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static HelloReply getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<HelloReply>(create);\n  static HelloReply? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get message => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set message($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasMessage() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearMessage() => $_clearField(1);\n}\n\n/// This is a service.\nclass GreeterApi {\n  final $pb.RpcClient _client;\n\n  GreeterApi(this._client);\n\n  /// This is a service method.\n  $async.Future<HelloReply> sayHello(\n          $pb.ClientContext? ctx, HelloRequest request) =>\n      _client.invoke<HelloReply>(\n          ctx, 'Greeter', 'SayHello', request, HelloReply());\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/doc_comments.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from doc_comments.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// This is an enum.\nclass A extends $pb.ProtobufEnum {\n  /// This is an enum variant.\n  static const A A1 = A._(0, _omitEnumNames ? '' : 'A1');\n\n  /// This is another enum variant.\n  static const A A2 = A._(1, _omitEnumNames ? '' : 'A2');\n\n  static const $core.List<A> values = <A>[\n    A1,\n    A2,\n  ];\n\n  static final $core.List<A?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 1);\n  static A? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const A._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/enum.pbenum.dart",
    "content": "class PhoneType extends $pb.ProtobufEnum {\n  static const PhoneType MOBILE = PhoneType._(0, _omitEnumNames ? '' : 'MOBILE');\n  static const PhoneType HOME = PhoneType._(1, _omitEnumNames ? '' : 'HOME');\n  static const PhoneType WORK = PhoneType._(2, _omitEnumNames ? '' : 'WORK');\n\n  static const PhoneType BUSINESS = WORK;\n\n  static const $core.List<PhoneType> values = <PhoneType> [\n    MOBILE,\n    HOME,\n    WORK,\n  ];\n\n  static final $core.List<PhoneType?> _byValue = $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static PhoneType? valueOf($core.int value) =>  value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const PhoneType._(super.value, super.name);\n}\n\n\nconst $core.bool _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/enum.pbenum.dart.meta",
    "content": "annotation: {\n  path: 5\n  path: 0\n  sourceFile: sample.proto\n  begin: 6\n  end: 15\n}\nannotation: {\n  path: 5\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: sample.proto\n  begin: 68\n  end: 74\n}\nannotation: {\n  path: 5\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: sample.proto\n  begin: 150\n  end: 154\n}\nannotation: {\n  path: 5\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: sample.proto\n  begin: 228\n  end: 232\n}\nannotation: {\n  path: 5\n  path: 0\n  path: 2\n  path: 3\n  sourceFile: sample.proto\n  begin: 307\n  end: 315\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/extension.pb.dart",
    "content": "static final clientInfo = $pb.Extension<$core.String>(_omitMessageNames ? '' : 'Card', _omitFieldNames ? '' : 'clientInfo', 261486461, $pb.PbFieldType.OS);\n\nconst $core.bool _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/extension.pb.dart.meta",
    "content": "annotation: {\n  path: 7\n  path: 0\n  sourceFile: sample.proto\n  begin: 13\n  end: 23\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/grpc_service.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nclass Empty extends $pb.GeneratedMessage {\n  factory Empty() => create();\n\n  Empty._();\n\n  factory Empty.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Empty.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Empty',\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Empty clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Empty copyWith(void Function(Empty) updates) =>\n      super.copyWith((message) => updates(message as Empty)) as Empty;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Empty create() => Empty._();\n  @$core.override\n  Empty createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Empty getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Empty>(create);\n  static Empty? _defaultInstance;\n}\n\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/grpc_service.pbgrpc.~dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:grpc/service_api.dart' as $grpc;\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'test.pb.dart' as $0;\n\nexport 'test.pb.dart';\n\n@$pb.GrpcServiceName('Test')\nclass TestClient extends $grpc.Client {\n  /// The hostname for this service.\n  static const $core.String defaultHost = 'www.example.com';\n\n  /// OAuth scopes needed for the client.\n  static const $core.List<$core.String> oauthScopes = [\n    'https://www.googleapis.com/auth/cloud-platform',\n    'https://www.googleapis.com/auth/datastore',\n  ];\n\n  TestClient(super.channel, {super.options, super.interceptors});\n\n  $grpc.ResponseFuture<$0.Output> unary(\n    $0.Input request, {\n    $grpc.CallOptions? options,\n  }) {\n    return $createUnaryCall(_$unary, request, options: options);\n  }\n\n  $grpc.ResponseFuture<$0.Output> clientStreaming(\n    $async.Stream<$0.Input> request, {\n    $grpc.CallOptions? options,\n  }) {\n    return $createStreamingCall(_$clientStreaming, request, options: options)\n        .single;\n  }\n\n  $grpc.ResponseStream<$0.Output> serverStreaming(\n    $0.Input request, {\n    $grpc.CallOptions? options,\n  }) {\n    return $createStreamingCall(\n        _$serverStreaming, $async.Stream.fromIterable([request]),\n        options: options);\n  }\n\n  $grpc.ResponseStream<$0.Output> bidirectional(\n    $async.Stream<$0.Input> request, {\n    $grpc.CallOptions? options,\n  }) {\n    return $createStreamingCall(_$bidirectional, request, options: options);\n  }\n\n  $grpc.ResponseFuture<$0.Output> call(\n    $0.Input request, {\n    $grpc.CallOptions? options,\n  }) {\n    return $createUnaryCall(_$call, request, options: options);\n  }\n\n  $grpc.ResponseFuture<$0.Output> request(\n    $0.Input request, {\n    $grpc.CallOptions? options,\n  }) {\n    return $createUnaryCall(_$request, request, options: options);\n  }\n\n  // method descriptors\n\n  static final _$unary = $grpc.ClientMethod<$0.Input, $0.Output>('/Test/Unary',\n      ($0.Input value) => value.writeToBuffer(), $0.Output.fromBuffer);\n  static final _$clientStreaming = $grpc.ClientMethod<$0.Input, $0.Output>(\n      '/Test/ClientStreaming',\n      ($0.Input value) => value.writeToBuffer(),\n      $0.Output.fromBuffer);\n  static final _$serverStreaming = $grpc.ClientMethod<$0.Input, $0.Output>(\n      '/Test/ServerStreaming',\n      ($0.Input value) => value.writeToBuffer(),\n      $0.Output.fromBuffer);\n  static final _$bidirectional = $grpc.ClientMethod<$0.Input, $0.Output>(\n      '/Test/Bidirectional',\n      ($0.Input value) => value.writeToBuffer(),\n      $0.Output.fromBuffer);\n  static final _$call = $grpc.ClientMethod<$0.Input, $0.Output>('/Test/Call',\n      ($0.Input value) => value.writeToBuffer(), $0.Output.fromBuffer);\n  static final _$request = $grpc.ClientMethod<$0.Input, $0.Output>(\n      '/Test/Request',\n      ($0.Input value) => value.writeToBuffer(),\n      $0.Output.fromBuffer);\n}\n\n@$pb.GrpcServiceName('Test')\nabstract class TestServiceBase extends $grpc.Service {\n  $core.String get $name => 'Test';\n\n  TestServiceBase() {\n    $addMethod($grpc.ServiceMethod<$0.Input, $0.Output>(\n        'Unary',\n        unary_Pre,\n        false,\n        false,\n        ($core.List<$core.int> value) => $0.Input.fromBuffer(value),\n        ($0.Output value) => value.writeToBuffer()));\n    $addMethod($grpc.ServiceMethod<$0.Input, $0.Output>(\n        'ClientStreaming',\n        clientStreaming,\n        true,\n        false,\n        ($core.List<$core.int> value) => $0.Input.fromBuffer(value),\n        ($0.Output value) => value.writeToBuffer()));\n    $addMethod($grpc.ServiceMethod<$0.Input, $0.Output>(\n        'ServerStreaming',\n        serverStreaming_Pre,\n        false,\n        true,\n        ($core.List<$core.int> value) => $0.Input.fromBuffer(value),\n        ($0.Output value) => value.writeToBuffer()));\n    $addMethod($grpc.ServiceMethod<$0.Input, $0.Output>(\n        'Bidirectional',\n        bidirectional,\n        true,\n        true,\n        ($core.List<$core.int> value) => $0.Input.fromBuffer(value),\n        ($0.Output value) => value.writeToBuffer()));\n    $addMethod($grpc.ServiceMethod<$0.Input, $0.Output>(\n        'Call',\n        call_Pre,\n        false,\n        false,\n        ($core.List<$core.int> value) => $0.Input.fromBuffer(value),\n        ($0.Output value) => value.writeToBuffer()));\n    $addMethod($grpc.ServiceMethod<$0.Input, $0.Output>(\n        'Request',\n        request_Pre,\n        false,\n        false,\n        ($core.List<$core.int> value) => $0.Input.fromBuffer(value),\n        ($0.Output value) => value.writeToBuffer()));\n  }\n\n  $async.Future<$0.Output> unary_Pre(\n      $grpc.ServiceCall $call, $async.Future<$0.Input> $request) async {\n    return unary($call, await $request);\n  }\n\n  $async.Future<$0.Output> unary($grpc.ServiceCall call, $0.Input request);\n\n  $async.Future<$0.Output> clientStreaming(\n      $grpc.ServiceCall call, $async.Stream<$0.Input> request);\n\n  $async.Stream<$0.Output> serverStreaming_Pre(\n      $grpc.ServiceCall $call, $async.Future<$0.Input> $request) async* {\n    yield* serverStreaming($call, await $request);\n  }\n\n  $async.Stream<$0.Output> serverStreaming(\n      $grpc.ServiceCall call, $0.Input request);\n\n  $async.Stream<$0.Output> bidirectional(\n      $grpc.ServiceCall call, $async.Stream<$0.Input> request);\n\n  $async.Future<$0.Output> call_Pre(\n      $grpc.ServiceCall $call, $async.Future<$0.Input> $request) async {\n    return call($call, await $request);\n  }\n\n  $async.Future<$0.Output> call($grpc.ServiceCall call, $0.Input request);\n\n  $async.Future<$0.Output> request_Pre(\n      $grpc.ServiceCall $call, $async.Future<$0.Input> $request) async {\n    return request($call, await $request);\n  }\n\n  $async.Future<$0.Output> request($grpc.ServiceCall call, $0.Input request);\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/header_in_package.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n"
  },
  {
    "path": "protoc_plugin/test/goldens/header_with_fixnum.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n"
  },
  {
    "path": "protoc_plugin/test/goldens/imports.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'package1.pb.dart' as $0;\nimport 'package2.pb.dart' as $1;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nclass M extends $pb.GeneratedMessage {\n  factory M() => create();\n\n  M._();\n\n  factory M.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory M.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i =\n      $pb.BuilderInfo(_omitMessageNames ? '' : 'M', createEmptyInstance: create)\n        ..aOM<M>(1, _omitFieldNames ? '' : 'm', subBuilder: M.create)\n        ..aOM<$0.M>(2, _omitFieldNames ? '' : 'm1', subBuilder: $0.M.create)\n        ..aOM<$1.M>(3, _omitFieldNames ? '' : 'm2', subBuilder: $1.M.create)\n        ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  M clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  M copyWith(void Function(M) updates) =>\n      super.copyWith((message) => updates(message as M)) as M;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static M create() => M._();\n  @$core.override\n  M createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static M getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<M>(create);\n  static M? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  M get m => $_getN(0);\n  @$pb.TagNumber(1)\n  set m(M value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasM() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearM() => $_clearField(1);\n  @$pb.TagNumber(1)\n  M ensureM() => $_ensure(0);\n\n  @$pb.TagNumber(2)\n  $0.M get m1 => $_getN(1);\n  @$pb.TagNumber(2)\n  set m1($0.M value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasM1() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearM1() => $_clearField(2);\n  @$pb.TagNumber(2)\n  $0.M ensureM1() => $_ensure(1);\n\n  @$pb.TagNumber(3)\n  $1.M get m2 => $_getN(2);\n  @$pb.TagNumber(3)\n  set m2($1.M value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasM2() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearM2() => $_clearField(3);\n  @$pb.TagNumber(3)\n  $1.M ensureM2() => $_ensure(2);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/imports.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n"
  },
  {
    "path": "protoc_plugin/test/goldens/int64.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nclass Int64 extends $pb.GeneratedMessage {\n  factory Int64() => create();\n\n  Int64._();\n\n  factory Int64.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Int64.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Int64',\n      createEmptyInstance: create)\n    ..aInt64(1, _omitFieldNames ? '' : 'value')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Int64 clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Int64 copyWith(void Function(Int64) updates) =>\n      super.copyWith((message) => updates(message as Int64)) as Int64;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Int64 create() => Int64._();\n  @$core.override\n  Int64 createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Int64 getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Int64>(create);\n  static Int64? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $fixnum.Int64 get value => $_getI64(0);\n  @$pb.TagNumber(1)\n  set value($fixnum.Int64 value) => $_setInt64(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValue() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValue() => $_clearField(1);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/messageGenerator.pb.dart",
    "content": "class PhoneNumber extends $pb.GeneratedMessage {\n  factory PhoneNumber() => create();\n\n  PhoneNumber._();\n\n  factory PhoneNumber.fromBuffer($core.List<$core.int> data, [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(data, registry);\n  factory PhoneNumber.fromJson($core.String json, [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PhoneNumber', createEmptyInstance: create)\n    ..aQS(1, _omitFieldNames ? '' : 'number')\n    ..aE<PhoneNumber_PhoneType>(2, _omitFieldNames ? '' : 'type', enumValues: PhoneNumber_PhoneType.values)\n    ..a<$core.String>(3, _omitFieldNames ? '' : 'name', $pb.PbFieldType.OS, defaultOrMaker: '\\$')\n    ..aOS(4, _omitFieldNames ? '' : 'deprecatedField')\n  ;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PhoneNumber clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PhoneNumber copyWith(void Function(PhoneNumber) updates) => super.copyWith((message) => updates(message as PhoneNumber)) as PhoneNumber;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PhoneNumber create() => PhoneNumber._();\n  @$core.override\n  PhoneNumber createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PhoneNumber getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<PhoneNumber>(create);\n  static PhoneNumber? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get number => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set number($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasNumber() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearNumber() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  PhoneNumber_PhoneType get type => $_getN(1);\n  @$pb.TagNumber(2)\n  set type(PhoneNumber_PhoneType value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasType() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearType() => $_clearField(2);\n\n  @$pb.TagNumber(3)\n  $core.String get name => $_getS(2, '\\$');\n  @$pb.TagNumber(3)\n  set name($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasName() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearName() => $_clearField(3);\n\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(4)\n  $core.String get deprecatedField => $_getSZ(3);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(4)\n  set deprecatedField($core.String value) => $_setString(3, value);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(4)\n  $core.bool hasDeprecatedField() => $_has(3);\n  @$core.Deprecated('This field is deprecated.')\n  @$pb.TagNumber(4)\n  void clearDeprecatedField() => $_clearField(4);\n}\n\n\nconst $core.bool _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/messageGenerator.pb.dart.meta",
    "content": "annotation: {\n  path: 4\n  path: 0\n  sourceFile: \n  begin: 6\n  end: 17\n}\nannotation: {\n  path: 4\n  path: 0\n  sourceFile: \n  begin: 89\n  end: 100\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: \n  begin: 1642\n  end: 1648\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: \n  begin: 1690\n  end: 1696\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: \n  begin: 1776\n  end: 1785\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: \n  begin: 1828\n  end: 1839\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: \n  begin: 1911\n  end: 1915\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: \n  begin: 1956\n  end: 1960\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: \n  begin: 2048\n  end: 2055\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: \n  begin: 2098\n  end: 2107\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: \n  begin: 2170\n  end: 2174\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: \n  begin: 2221\n  end: 2225\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: \n  begin: 2305\n  end: 2312\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: \n  begin: 2355\n  end: 2364\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 3\n  sourceFile: \n  begin: 2476\n  end: 2491\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 3\n  sourceFile: \n  begin: 2582\n  end: 2597\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 3\n  sourceFile: \n  begin: 2726\n  end: 2744\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 3\n  sourceFile: \n  begin: 2836\n  end: 2856\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/messageGeneratorEnums.pb.dart",
    "content": "class PhoneNumber_PhoneType extends $pb.ProtobufEnum {\n  static const PhoneNumber_PhoneType MOBILE = PhoneNumber_PhoneType._(0, _omitEnumNames ? '' : 'MOBILE');\n  static const PhoneNumber_PhoneType HOME = PhoneNumber_PhoneType._(1, _omitEnumNames ? '' : 'HOME');\n  static const PhoneNumber_PhoneType WORK = PhoneNumber_PhoneType._(2, _omitEnumNames ? '' : 'WORK');\n\n  static const PhoneNumber_PhoneType BUSINESS = WORK;\n\n  static const $core.List<PhoneNumber_PhoneType> values = <PhoneNumber_PhoneType> [\n    MOBILE,\n    HOME,\n    WORK,\n  ];\n\n  static final $core.List<PhoneNumber_PhoneType?> _byValue = $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static PhoneNumber_PhoneType? valueOf($core.int value) =>  value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const PhoneNumber_PhoneType._(super.value, super.name);\n}\n\n\nconst $core.bool _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/messageGeneratorEnums.pb.dart.meta",
    "content": "annotation: {\n  path: 4\n  path: 0\n  path: 4\n  path: 0\n  sourceFile: \n  begin: 6\n  end: 27\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 4\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: \n  begin: 92\n  end: 98\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 4\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: \n  begin: 198\n  end: 202\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 4\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: \n  begin: 300\n  end: 304\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 4\n  path: 0\n  path: 2\n  path: 3\n  sourceFile: \n  begin: 403\n  end: 411\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/oneMessage.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nclass PhoneNumber extends $pb.GeneratedMessage {\n  factory PhoneNumber() => create();\n\n  PhoneNumber._();\n\n  factory PhoneNumber.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PhoneNumber.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PhoneNumber',\n      createEmptyInstance: create)\n    ..aQS(1, _omitFieldNames ? '' : 'number')\n    ..aI(2, _omitFieldNames ? '' : 'type')\n    ..a<$core.String>(3, _omitFieldNames ? '' : 'name', $pb.PbFieldType.OS,\n        defaultOrMaker: '\\$');\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PhoneNumber clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PhoneNumber copyWith(void Function(PhoneNumber) updates) =>\n      super.copyWith((message) => updates(message as PhoneNumber))\n          as PhoneNumber;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PhoneNumber create() => PhoneNumber._();\n  @$core.override\n  PhoneNumber createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PhoneNumber getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PhoneNumber>(create);\n  static PhoneNumber? _defaultInstance;\n\n  @$pb.TagNumber(1)\n  $core.String get number => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set number($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasNumber() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearNumber() => $_clearField(1);\n\n  @$pb.TagNumber(2)\n  $core.int get type => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set type($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasType() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearType() => $_clearField(2);\n\n  @$pb.TagNumber(3)\n  $core.String get name => $_getS(2, '\\$');\n  @$pb.TagNumber(3)\n  set name($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasName() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearName() => $_clearField(3);\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/oneMessage.pb.dart.meta",
    "content": "annotation: {\n  path: 4\n  path: 0\n  sourceFile: test\n  begin: 590\n  end: 601\n}\nannotation: {\n  path: 4\n  path: 0\n  sourceFile: test\n  begin: 673\n  end: 684\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: test\n  begin: 2106\n  end: 2112\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: test\n  begin: 2154\n  end: 2160\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: test\n  begin: 2240\n  end: 2249\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: test\n  begin: 2292\n  end: 2303\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: test\n  begin: 2363\n  end: 2367\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: test\n  begin: 2409\n  end: 2413\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: test\n  begin: 2495\n  end: 2502\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: test\n  begin: 2545\n  end: 2554\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: test\n  begin: 2617\n  end: 2621\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: test\n  begin: 2668\n  end: 2672\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: test\n  begin: 2752\n  end: 2759\n}\nannotation: {\n  path: 4\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: test\n  begin: 2802\n  end: 2811\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/oneMessage.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use phoneNumberDescriptor instead')\nconst PhoneNumber$json = {\n  '1': 'PhoneNumber',\n  '2': [\n    {'1': 'number', '3': 1, '4': 2, '5': 9, '10': 'number'},\n    {'1': 'type', '3': 2, '4': 1, '5': 5, '6': '', '10': 'type'},\n    {'1': 'name', '3': 3, '4': 1, '5': 9, '7': '\\$', '10': 'name'},\n  ],\n};\n\n/// Descriptor for `PhoneNumber`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List phoneNumberDescriptor = $convert.base64Decode(\n    'CgtQaG9uZU51bWJlchIWCgZudW1iZXIYASACKAlSBm51bWJlchIUCgR0eXBlGAIgASgFMgBSBH'\n    'R5cGUSFQoEbmFtZRgDIAEoCToBJFIEbmFtZQ==');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/service.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nclass Empty extends $pb.GeneratedMessage {\n  factory Empty() => create();\n\n  Empty._();\n\n  factory Empty.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Empty.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Empty',\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Empty clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Empty copyWith(void Function(Empty) updates) =>\n      super.copyWith((message) => updates(message as Empty)) as Empty;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Empty create() => Empty._();\n  @$core.override\n  Empty createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Empty getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Empty>(create);\n  static Empty? _defaultInstance;\n}\n\nclass TestApi {\n  final $pb.RpcClient _client;\n\n  TestApi(this._client);\n\n  $async.Future<Empty> ping($pb.ClientContext? ctx, Empty request) =>\n      _client.invoke<Empty>(ctx, 'Test', 'Ping', request, Empty());\n}\n\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/service.pbserver.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'test.pb.dart' as $0;\nimport 'test.pbjson.dart';\n\nexport 'test.pb.dart';\n\nabstract class TestServiceBase extends $pb.GeneratedService {\n  $async.Future<$0.Empty> ping($pb.ServerContext ctx, $0.Empty request);\n\n  $pb.GeneratedMessage createRequest($core.String methodName) {\n    switch (methodName) {\n      case 'Ping':\n        return $0.Empty();\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx,\n      $core.String methodName, $pb.GeneratedMessage request) {\n    switch (methodName) {\n      case 'Ping':\n        return ping(ctx, request as $0.Empty);\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $core.Map<$core.String, $core.dynamic> get $json => TestServiceBase$json;\n  $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n      get $messageJson => TestServiceBase$messageJson;\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/serviceGenerator.pb.dart",
    "content": "abstract class TestServiceBase extends $pb.GeneratedService {\n  $async.Future<$0.SomeReply> aMethod(\n    $pb.ServerContext ctx,\n    $0.SomeRequest request,\n  );\n  $async.Future<$1.AnotherReply> anotherMethod(\n    $pb.ServerContext ctx,\n    $1.EmptyMessage request,\n  );\n\n  $pb.GeneratedMessage createRequest($core.String methodName) {\n    switch (methodName) {\n      case 'AMethod':\n        return $0.SomeRequest();\n      case 'AnotherMethod':\n        return $1.EmptyMessage();\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $async.Future<$pb.GeneratedMessage> handleCall(\n    $pb.ServerContext ctx,\n    $core.String methodName,\n    $pb.GeneratedMessage request,\n  ) {\n    switch (methodName) {\n      case 'AMethod':\n        return aMethod(ctx, request as $0.SomeRequest);\n      case 'AnotherMethod':\n        return anotherMethod(ctx, request as $1.EmptyMessage);\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $core.Map<$core.String, $core.dynamic> get $json => TestServiceBase$json;\n  $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n  get $messageJson => TestServiceBase$messageJson;\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/serviceGenerator.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from testpkg.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\nimport 'foobar.pbjson.dart' as $1;\n\n@$core.Deprecated('Use someRequestDescriptor instead')\nconst SomeRequest$json = {\n  '1': 'SomeRequest',\n};\n\n/// Descriptor for `SomeRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List someRequestDescriptor =\n    $convert.base64Decode('CgtTb21lUmVxdWVzdA==');\n\n@$core.Deprecated('Use someReplyDescriptor instead')\nconst SomeReply$json = {\n  '1': 'SomeReply',\n};\n\n/// Descriptor for `SomeReply`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List someReplyDescriptor =\n    $convert.base64Decode('CglTb21lUmVwbHk=');\n\nconst $core.Map<$core.String, $core.dynamic> TestServiceBase$json = {\n  '1': 'Test',\n  '2': [\n    {'1': 'AMethod', '2': '.testpkg.SomeRequest', '3': '.testpkg.SomeReply'},\n    {\n      '1': 'AnotherMethod',\n      '2': '.foo.bar.EmptyMessage',\n      '3': '.foo.bar.AnotherReply'\n    },\n  ],\n};\n\n@$core.Deprecated('Use testServiceDescriptor instead')\nconst $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n    TestServiceBase$messageJson = {\n  '.testpkg.SomeRequest': SomeRequest$json,\n  '.testpkg.SomeReply': SomeReply$json,\n  '.foo.bar.EmptyMessage': $1.EmptyMessage$json,\n  '.foo.bar.AnotherReply': $1.AnotherReply$json,\n};\n\n/// Descriptor for `Test`. Decode as a `google.protobuf.ServiceDescriptorProto`.\nfinal $typed_data.Uint8List testServiceDescriptor = $convert.base64Decode(\n    'CgRUZXN0EjMKB0FNZXRob2QSFC50ZXN0cGtnLlNvbWVSZXF1ZXN0GhIudGVzdHBrZy5Tb21lUm'\n    'VwbHkSPQoNQW5vdGhlck1ldGhvZBIVLmZvby5iYXIuRW1wdHlNZXNzYWdlGhUuZm9vLmJhci5B'\n    'bm90aGVyUmVwbHk=');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/topLevelEnum.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'test.pbenum.dart';\n"
  },
  {
    "path": "protoc_plugin/test/goldens/topLevelEnum.pb.dart.meta",
    "content": ""
  },
  {
    "path": "protoc_plugin/test/goldens/topLevelEnum.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nclass PhoneType extends $pb.ProtobufEnum {\n  static const PhoneType MOBILE =\n      PhoneType._(0, _omitEnumNames ? '' : 'MOBILE');\n  static const PhoneType HOME = PhoneType._(1, _omitEnumNames ? '' : 'HOME');\n  static const PhoneType WORK = PhoneType._(2, _omitEnumNames ? '' : 'WORK');\n\n  static const PhoneType BUSINESS = WORK;\n\n  static const $core.List<PhoneType> values = <PhoneType>[\n    MOBILE,\n    HOME,\n    WORK,\n  ];\n\n  static final $core.List<PhoneType?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static PhoneType? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const PhoneType._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "protoc_plugin/test/goldens/topLevelEnum.pbenum.dart.meta",
    "content": "annotation: {\n  path: 5\n  path: 0\n  sourceFile: test\n  begin: 509\n  end: 518\n}\nannotation: {\n  path: 5\n  path: 0\n  path: 2\n  path: 0\n  sourceFile: test\n  begin: 571\n  end: 577\n}\nannotation: {\n  path: 5\n  path: 0\n  path: 2\n  path: 1\n  sourceFile: test\n  begin: 653\n  end: 657\n}\nannotation: {\n  path: 5\n  path: 0\n  path: 2\n  path: 2\n  sourceFile: test\n  begin: 731\n  end: 735\n}\nannotation: {\n  path: 5\n  path: 0\n  path: 2\n  path: 3\n  sourceFile: test\n  begin: 810\n  end: 818\n}\n"
  },
  {
    "path": "protoc_plugin/test/goldens/topLevelEnum.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from test.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use phoneTypeDescriptor instead')\nconst PhoneType$json = {\n  '1': 'PhoneType',\n  '2': [\n    {'1': 'MOBILE', '2': 0},\n    {'1': 'HOME', '2': 1},\n    {'1': 'WORK', '2': 2},\n    {'1': 'BUSINESS', '2': 2},\n  ],\n};\n\n/// Descriptor for `PhoneType`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List phoneTypeDescriptor = $convert.base64Decode(\n    'CglQaG9uZVR5cGUSCgoGTU9CSUxFEAASCAoESE9NRRABEggKBFdPUksQAhIMCghCVVNJTkVTUx'\n    'AC');\n"
  },
  {
    "path": "protoc_plugin/test/hash_code_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\n\nvoid main() {\n  test('testHashCodeEmptyMessage', () {\n    final m1 = TestAllTypes();\n    final m2 = TestAllTypes();\n    expect(m1.hashCode, m2.hashCode);\n  });\n\n  test('testHashCodeOptionalInt32', () {\n    final m1 = TestAllTypes()..optionalInt32 = 42;\n    final m2 = TestAllTypes()..optionalInt32 = 42;\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.optionalInt32 = 43;\n    expect(m1.hashCode, isNot(m2.hashCode));\n\n    m2.optionalInt32 = 43;\n    expect(m1.hashCode, m2.hashCode);\n  });\n\n  test('testHashCodeOptionalInt64', () {\n    final m1 = TestAllTypes()..optionalInt64 = Int64(42);\n    final m2 = TestAllTypes()..optionalInt64 = Int64(42);\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.optionalInt64 = Int64(43);\n    expect(m1.hashCode, isNot(m2.hashCode));\n\n    m2.optionalInt64 = Int64(43);\n    expect(m1.hashCode, m2.hashCode);\n  });\n\n  test('testHashCodeOptionalString', () {\n    final m1 = TestAllTypes()..optionalString = 'Dart';\n    final m2 = TestAllTypes()..optionalString = 'Dart';\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.optionalString = 'JavaScript';\n    expect(m1.hashCode, isNot(m2.hashCode));\n\n    m2.optionalString = 'JavaScript';\n    expect(m1.hashCode, m2.hashCode);\n  });\n\n  test('testHashCodeOptionalEnum', () {\n    final m1 = TestAllTypes()..optionalNestedEnum = TestAllTypes_NestedEnum.BAR;\n    final m2 = TestAllTypes()..optionalNestedEnum = TestAllTypes_NestedEnum.BAR;\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.optionalNestedEnum = TestAllTypes_NestedEnum.BAZ;\n    expect(m1.hashCode, isNot(m2.hashCode));\n\n    m2.optionalNestedEnum = TestAllTypes_NestedEnum.BAZ;\n    expect(m1.hashCode, m2.hashCode);\n  });\n\n  test('testHashCodeRepeatedInt32', () {\n    final m1 = TestAllTypes();\n    final m2 = TestAllTypes();\n    m1.repeatedInt32.add(42);\n    m2.repeatedInt32.add(42);\n    expect(m1.hashCode, m2.hashCode);\n  });\n\n  test('testHashCodeRepeatedInt64', () {\n    final m1 = TestAllTypes();\n    final m2 = TestAllTypes();\n    m1.repeatedInt32.add(42);\n    m2.repeatedInt32.add(42);\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.repeatedInt32.add(43);\n    expect(m1.hashCode, isNot(m2.hashCode));\n\n    m2.repeatedInt32.add(43);\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.repeatedInt32.clear();\n    expect(m1.hashCode, isNot(m2.hashCode));\n\n    m2.repeatedInt32.clear();\n    expect(m1.hashCode, m2.hashCode);\n  });\n\n  test('testHashCodeRepeatedString', () {\n    final m1 = TestAllTypes();\n    final m2 = TestAllTypes();\n    m1.repeatedString.add('Dart');\n    m2.repeatedString.add('Dart');\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.repeatedString.add('JavaScript');\n    expect(m1.hashCode, isNot(m2.hashCode));\n\n    m2.repeatedString.add('JavaScript');\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.repeatedString.clear();\n    expect(m1.hashCode, isNot(m2.hashCode));\n\n    m2.repeatedString.clear();\n    expect(m1.hashCode, m2.hashCode);\n  });\n\n  test('testHashCodeRepeatedEnum', () {\n    final m1 = TestAllTypes();\n    final m2 = TestAllTypes();\n    m1.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAR);\n    m2.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAR);\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAZ);\n    expect(m1.hashCode, isNot(m2.hashCode));\n\n    m2.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAZ);\n    expect(m1.hashCode, m2.hashCode);\n  });\n\n  test('testHashCodeUnknownFields', () {\n    final m1 = TestAllTypes();\n    final m2 = TestAllTypes();\n    m1.unknownFields.mergeVarintField(12345, Int64(123));\n    m2.unknownFields.mergeVarintField(12345, Int64(123));\n    expect(m1.hashCode, m2.hashCode);\n  });\n\n  test('testHashCodeCombined', () {\n    final m1 =\n        TestAllTypes()\n          ..optionalInt32 = 42\n          ..optionalInt64 = Int64(42)\n          ..optionalString = 'Dart'\n          ..optionalNestedEnum = TestAllTypes_NestedEnum.BAR;\n    final m2 =\n        TestAllTypes()\n          ..optionalInt32 = 42\n          ..optionalInt64 = Int64(42)\n          ..optionalString = 'Dart'\n          ..optionalNestedEnum = TestAllTypes_NestedEnum.BAR;\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.repeatedInt32\n      ..add(42)\n      ..add(43);\n    m2.repeatedInt32\n      ..add(42)\n      ..add(43);\n    m1.repeatedInt64\n      ..add(Int64(42))\n      ..add(Int64(43));\n    m2.repeatedInt64\n      ..add(Int64(42))\n      ..add(Int64(43));\n    m1.repeatedString\n      ..add('Dart')\n      ..add('JavaScript');\n    m2.repeatedString\n      ..add('Dart')\n      ..add('JavaScript');\n    m1.repeatedNestedEnum\n      ..add(TestAllTypes_NestedEnum.BAR)\n      ..add(TestAllTypes_NestedEnum.BAZ);\n    m2.repeatedNestedEnum\n      ..add(TestAllTypes_NestedEnum.BAR)\n      ..add(TestAllTypes_NestedEnum.BAZ);\n    expect(m1.hashCode, m2.hashCode);\n\n    m1.unknownFields.mergeVarintField(12345, Int64(123));\n    m2.unknownFields.mergeVarintField(12345, Int64(123));\n    expect(m1.hashCode, m2.hashCode);\n    expect(m1.hashCode, m2.hashCode);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/high_tagnumber_test.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/empty.pb.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/high_tagnumber.pb.dart';\n\nvoid main() {\n  test('round trip 29 bit tag number, binary encoding', () {\n    expect(M.fromBuffer((M()..a = 42).writeToBuffer()), M()..a = 42);\n    expect(M.fromBuffer((M()..b = 42).writeToBuffer()), M()..b = 42);\n  });\n  test('round trip 29 bit tag number, jspblite2', () {\n    expect(M.fromJson((M()..a = 43).writeToJson()), M()..a = 43);\n    expect(M.fromJson((M()..b = 43).writeToJson()), M()..b = 43);\n  });\n  test('unknown fields', () {\n    final empty = Empty.fromBuffer((M()..a = 44).writeToBuffer());\n    expect(empty.unknownFields.isEmpty, false);\n    expect(empty.unknownFields.getField(M().info_.tagNumber('a')!)!.varints, [\n      Int64(44),\n    ]);\n    expect(M.fromBuffer(empty.writeToBuffer()).a, 44);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/import_option_test.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'gen/custom_option.pb.dart';\nimport 'gen/import_option.pbjson.dart';\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf/protobuf.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('can read custom options from linked import option', () {\n    final registry = ExtensionRegistry()..add(Custom_option.myOption);\n    final descriptor = DescriptorProto.fromBuffer(\n      messageWithOptionsDescriptor,\n      registry,\n    );\n    final option = descriptor.options.getExtension(Custom_option.myOption);\n    expect(option, 'Hello world!');\n  });\n\n  test('unlinked options are in unknown fields', () {\n    final registry = ExtensionRegistry()..add(Custom_option.myOption);\n    final descriptor = DescriptorProto.fromBuffer(\n      messageWithOptionsDescriptor,\n      registry,\n    );\n    final ufs = descriptor.options.unknownFields;\n    expect(ufs.hasField(51235), true);\n    expect(ufs.getField(51235)!.varints.length, 1);\n    expect(ufs.getField(51235)!.varints.first, Int64(99));\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/import_public_test.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/import_public.pb.dart';\n\nvoid main() {\n  test('can reference a message type imported publicly', () {\n    expect(Foo(), TypeMatcher<Foo>());\n    expect(A(), TypeMatcher<A>());\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/import_test.dart",
    "content": "// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/foo.pb.dart' as foo;\nimport 'gen/import_clash.pb.dart' as pb;\n\nvoid main() {\n  test('Import prefixes in generated files do not clash with fields', () {\n    pb.Clasher().foo = foo.Foo();\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/indenting_writer_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protoc_plugin/indenting_writer.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group('IndentingWriter', () {\n    test('IndentingWriter can indent a block', () {\n      final out = IndentingWriter();\n      out.addBlock('class test {', '}', () {\n        out.println('first;');\n        out.println();\n        out.println('second;');\n      });\n\n      expect(out.emitSource(format: false), '''\nclass test {\n  first;\n\n  second;\n}\n''');\n    });\n\n    test('IndentingWriter annotation tracks previous output', () {\n      final out = IndentingWriter(\n        generateMetadata: true,\n        fileName: 'sample.proto',\n      );\n      out.print('13 characters');\n      out.printAnnotated('sample text', [\n        NamedLocation(name: 'text', fieldPathSegment: [1, 2, 3], start: 7),\n      ]);\n      final expected =\n          GeneratedCodeInfo_Annotation()\n            ..path.addAll([1, 2, 3])\n            ..sourceFile = 'sample.proto'\n            ..begin = 20\n            ..end = 24;\n      final annotation = out.sourceLocationInfo.annotation[0];\n      expect(annotation, equals(expected));\n    });\n\n    test('IndentingWriter annotation counts indents correctly', () {\n      final out = IndentingWriter(generateMetadata: true, fileName: '');\n      out.addBlock('34 characters including newline {', '}', () {\n        out.printlnAnnotated('sample text', [\n          NamedLocation(name: 'sample', fieldPathSegment: [], start: 0),\n        ]);\n      });\n      final annotation = out.sourceLocationInfo.annotation[0];\n      // The indent is 2 characters, so these should be shifted by 2.\n      expect(annotation.begin, equals(36));\n      expect(annotation.end, equals(42));\n    });\n\n    test('IndentingWriter annotations counts multiline output correctly', () {\n      final out = IndentingWriter(generateMetadata: true, fileName: '');\n      out.print('20 characters\\ntotal\\n');\n      out.printlnAnnotated('20 characters before this', [\n        NamedLocation(name: 'ch', fieldPathSegment: [], start: 3),\n      ]);\n      final annotation = out.sourceLocationInfo.annotation[0];\n      expect(annotation.begin, equals(23));\n      expect(annotation.end, equals(25));\n    });\n  });\n\n  group('ImportWriter', () {\n    late ImportWriter importWriter;\n\n    setUp(() {\n      importWriter = ImportWriter();\n    });\n\n    test('sorting', () {\n      importWriter.addImport('dart:typed_data');\n      importWriter.addImport('dart:convert', prefix: 'convert');\n      importWriter.addImport('dart:async');\n\n      expect(\n        importWriter.emit(),\n        equals('''\nimport 'dart:async';\nimport 'dart:convert' as convert;\nimport 'dart:typed_data';\n'''),\n      );\n    });\n\n    test('grouping', () {\n      importWriter.addImport('string_utilities.dart');\n      importWriter.addImport('package:path/path.dart', prefix: 'path');\n      importWriter.addImport('dart:convert', prefix: 'convert');\n\n      expect(\n        importWriter.emit(),\n        equals('''\nimport 'dart:convert' as convert;\n\nimport 'package:path/path.dart' as path;\n\nimport 'string_utilities.dart';\n'''),\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/json_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/foo.pb.dart' as foo;\nimport 'gen/google/protobuf/unittest.pb.dart';\nimport 'gen/map_enum_value.pb.dart';\nimport 'src/test_util.dart';\n\nvoid main() {\n  final testAllJsonTypes =\n      '{\"1\":101,\"2\":\"102\",\"3\":103,\"4\":\"104\",'\n      '\"5\":105,\"6\":\"106\",\"7\":107,\"8\":\"108\",\"9\":109,\"10\":\"110\",\"11\":111,'\n      '\"12\":112,\"13\":true,\"14\":\"115\",\"15\":\"MTE2\",\"16\":{\"17\":117},'\n      '\"18\":{\"1\":118},\"19\":{\"1\":119},\"20\":{\"1\":120},\"21\":3,\"22\":6,\"23\":9,'\n      '\"24\":\"124\",\"25\":\"125\",\"31\":[201,301],\"32\":[\"202\",\"302\"],'\n      '\"33\":[203,303],\"34\":[\"204\",\"304\"],\"35\":[205,305],\"36\":[\"206\",\"306\"],'\n      '\"37\":[207,307],\"38\":[\"208\",\"308\"],\"39\":[209,309],\"40\":[\"210\",\"310\"],'\n      '\"41\":[211,311],\"42\":[212,312],\"43\":[true,false],'\n      '\"44\":[\"215\",\"315\"],\"45\":[\"MjE2\",\"MzE2\"],\"46\":[{\"47\":217},{\"47\":317}],'\n      '\"48\":[{\"1\":218},{\"1\":318}],\"49\":[{\"1\":219},{\"1\":319}],'\n      '\"50\":[{\"1\":220},{\"1\":320}],\"51\":[2,3],\"52\":[5,6],\"53\":[8,9],'\n      '\"54\":[\"224\",\"324\"],\"55\":[\"225\",\"325\"],\"61\":401,\"62\":\"402\",\"63\":403,'\n      '\"64\":\"404\",\"65\":405,\"66\":\"406\",\"67\":407,\"68\":\"408\",\"69\":409,'\n      '\"70\":\"410\",\"71\":411,\"72\":412,\"73\":false,\"74\":\"415\",\"75\":\"NDE2\",'\n      '\"81\":1,\"82\":4,\"83\":7,\"84\":\"424\",\"85\":\"425\"}';\n\n  /// Checks that the message, once serialized to JSON, matches\n  /// [testAllJsonTypes] massaged with `replaceAll(from, to)`.\n  Matcher expectedJson(String from, String to) {\n    final expectedJson = testAllJsonTypes.replaceAll(from, to);\n    return predicate(\n      (GeneratedMessage message) => message.writeToJson() == expectedJson,\n      'Incorrect output',\n    );\n  }\n\n  test('testUnsignedOutput', () {\n    final message = TestAllTypes();\n    // These values selected because:\n    // (1) large enough to set the sign bit\n    // (2) don't set all of the first 10 bits under the sign bit\n    // (3) are near each other\n    message.optionalUint64 = Int64.parseHex('f0000000ffff0000');\n    message.optionalFixed64 = Int64.parseHex('f0000000ffff0001');\n\n    final expectedJsonValue =\n        '{\"4\":\"17293822573397606400\",\"8\":\"17293822573397606401\"}';\n    expect(message.writeToJson(), expectedJsonValue);\n  });\n\n  test('testOutput', () {\n    expect(getAllSet().writeToJson(), testAllJsonTypes);\n\n    // Test empty list.\n    expect(\n      getAllSet()..repeatedBool.clear(),\n      expectedJson('\"43\":[true,false],', ''),\n    );\n\n    // Test negative number.\n    expect(\n      getAllSet()..optionalInt32 = -1234567,\n      expectedJson(':101,', ':-1234567,'),\n    );\n\n    // All 64-bit numbers are quoted.\n    expect(\n      getAllSet()..optionalInt64 = make64(0, 0x200000),\n      expectedJson(':\"102\",', ':\"9007199254740992\",'),\n    );\n    expect(\n      getAllSet()..optionalInt64 = make64(1, 0x200000),\n      expectedJson(':\"102\",', ':\"9007199254740993\",'),\n    );\n    expect(\n      getAllSet()..optionalInt64 = -make64(0, 0x200000),\n      expectedJson(':\"102\",', ':\"-9007199254740992\",'),\n    );\n    expect(\n      getAllSet()..optionalInt64 = -make64(1, 0x200000),\n      expectedJson(':\"102\",', ':\"-9007199254740993\",'),\n    );\n\n    // Quotes, backslashes, and control characters in strings are quoted.\n    expect(\n      getAllSet()..optionalString = 'a\\u0000b\\u0001cd\\\\e\"fg',\n      expectedJson(':\"115\",', ':\"a\\\\u0000b\\\\u0001cd\\\\\\\\e\\\\\"fg\",'),\n    );\n  });\n\n  test('testBase64Encode', () {\n    expect(\n      getAllSet()..optionalBytes = 'Hello, world'.codeUnits,\n      expectedJson(':\"MTE2\",', ':\"SGVsbG8sIHdvcmxk\",'),\n    );\n\n    expect(\n      getAllSet()..optionalBytes = 'Hello, world!'.codeUnits,\n      expectedJson(':\"MTE2\",', ':\"SGVsbG8sIHdvcmxkIQ==\",'),\n    );\n\n    expect(\n      getAllSet()..optionalBytes = 'Hello, world!!'.codeUnits,\n      expectedJson(':\"MTE2\",', ':\"SGVsbG8sIHdvcmxkISE=\",'),\n    );\n\n    // An empty list should not appear in the output.\n    expect(getAllSet()..optionalBytes = [], expectedJson('\"15\":\"MTE2\",', ''));\n\n    expect(\n      getAllSet()..optionalBytes = 'a'.codeUnits,\n      expectedJson(':\"MTE2\",', ':\"YQ==\",'),\n    );\n  });\n\n  test('testBase64Decode', () {\n    String optionalBytes(String from, String to) {\n      final json = testAllJsonTypes.replaceAll(from, to);\n      return String.fromCharCodes(TestAllTypes.fromJson(json).optionalBytes);\n    }\n\n    expect(optionalBytes(':\"MTE2\",', ':\"SGVsbG8sIHdvcmxk\",'), 'Hello, world');\n\n    expect(\n      optionalBytes(':\"MTE2\",', ':\"SGVsbG8sIHdvcmxkIQ==\",'),\n      'Hello, world!',\n    );\n\n    expect(\n      optionalBytes(':\"MTE2\",', ':\"SGVsbG8sIHdvcmxkISE=\",'),\n      'Hello, world!!',\n    );\n\n    // Remove optionalBytes tag, reads back as empty list, hence empty string.\n    expect(optionalBytes('\"15\":\"MTE2\",', ''), isEmpty);\n\n    // Keep optionalBytes tag, set data to empty string, get back empty list.\n    expect(optionalBytes(':\"MTE2\",', ':\"\",'), isEmpty);\n\n    expect(optionalBytes(':\"MTE2\",', ':\"YQ==\",'), 'a');\n  });\n\n  test('testParseUnsigned', () {\n    final parsed = TestAllTypes.fromJson(\n      '{\"4\":\"17293822573397606400\",\"8\":\"17293822573397606401\"}',\n    );\n    final expected = TestAllTypes();\n    expected.optionalUint64 = Int64.parseHex('f0000000ffff0000');\n    expected.optionalFixed64 = Int64.parseHex('f0000000ffff0001');\n\n    expect(parsed, expected);\n  });\n\n  group('testConvertDouble', () {\n    test('WithDecimal', () {\n      final json = '{\"12\":1.2}';\n      final proto = TestAllTypes()..optionalDouble = 1.2;\n      expect(TestAllTypes.fromJson(json), proto);\n      expect(proto.writeToJson(), json);\n    });\n\n    test('WholeNumber', () {\n      final json = '{\"12\":5}';\n      final proto = TestAllTypes()..optionalDouble = 5.0;\n      expect(TestAllTypes.fromJson(json), proto);\n      expect(proto.writeToJson(), json);\n    });\n\n    test('Infinity', () {\n      final json = '{\"12\":\"Infinity\"}';\n      final proto = TestAllTypes()..optionalDouble = double.infinity;\n      expect(TestAllTypes.fromJson(json), proto);\n      expect(proto.writeToJson(), json);\n    });\n\n    test('NegativeInfinity', () {\n      final json = '{\"12\":\"-Infinity\"}';\n      final proto = TestAllTypes()..optionalDouble = double.negativeInfinity;\n      expect(TestAllTypes.fromJson(json), proto);\n      expect(proto.writeToJson(), json);\n    });\n  });\n\n  test('testParseUnsignedLegacy', () {\n    final parsed = TestAllTypes.fromJson(\n      '{\"4\":\"-1152921500311945216\",\"8\":\"-1152921500311945215\"}',\n    );\n    final expected = TestAllTypes();\n    expected.optionalUint64 = Int64.parseHex('f0000000ffff0000');\n    expected.optionalFixed64 = Int64.parseHex('f0000000ffff0001');\n\n    expect(parsed, expected);\n  });\n\n  test('testFixed32IntNegative', () {\n    var message = foo.Inner.fromJson('{\"5\": -1}');\n    expect(message.count, 4294967295);\n    message = foo.Inner.fromJson('{\"5\": -2080294357}');\n    expect(message.count, 2214672939);\n  });\n\n  test('testUint32Negative', () {\n    var message = foo.Inner.fromJson('{\"6\": -1}');\n    expect(message.countUint32, 4294967295);\n    message = foo.Inner.fromJson('{\"6\": -2080294357}');\n    expect(message.countUint32, 2214672939);\n  });\n\n  test('testParse', () {\n    expect(TestAllTypes.fromJson(testAllJsonTypes), getAllSet());\n  });\n\n  test('testExtensionsOutput', () {\n    expect(getAllExtensionsSet().writeToJson(), testAllJsonTypes);\n  });\n\n  test('testExtensionsParse', () {\n    final registry = getExtensionRegistry();\n    expect(\n      TestAllExtensions.fromJson(testAllJsonTypes, registry),\n      getAllExtensionsSet(),\n    );\n  });\n\n  test('testUnknownEnumValueInOptionalField', () {\n    // optional NestedEnum optional_nested_enum = 21;\n    final message = TestAllTypes.fromJson('{\"21\": 4}');\n    // 4 is an unknown value.\n    expect(message.optionalNestedEnum, equals(TestAllTypes_NestedEnum.FOO));\n  });\n\n  test('testUnknownEnumValueInRepeatedField', () {\n    // repeated NestedEnum repeated_nested_enum = 51;\n    var message = TestAllTypes.fromJson('{\"51\": [4]}');\n    // 4 is an unknown value, which should default to the enum's default value.\n    expect(message.repeatedNestedEnum, equals([TestAllTypes_NestedEnum.FOO]));\n\n    // 1 (FOO) and 2 (BAR) are known values. All unknowns should fill in to\n    // the default enum value (FOO).\n    message = TestAllTypes.fromJson('{\"51\": [1, 4, 2, 4, 1, 4]}');\n    expect(\n      message.repeatedNestedEnum,\n      equals([\n        TestAllTypes_NestedEnum.FOO,\n        TestAllTypes_NestedEnum.FOO,\n        TestAllTypes_NestedEnum.BAR,\n        TestAllTypes_NestedEnum.FOO,\n        TestAllTypes_NestedEnum.FOO,\n        TestAllTypes_NestedEnum.FOO,\n      ]),\n    );\n  });\n\n  test('testUnknownEnumValueInMapField', () {\n    final key = 'new_field';\n    // Only 0 and 1 are known enum values.\n    final message = MapEnumValue()..mergeFromJson('{\"1\":[{\"1\":\"$key\",\"2\":2}]}');\n    expect(message.values[key], equals(MapEnumValue_NestedEnum.UNKNOWN));\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/leading_underscores_test.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/_leading_underscores.pb.dart';\n\nvoid main() {\n  test('can set, read and clear all fields and refer to types', () {\n    final message = A_();\n    message.setExtension(Leading_underscores_.p, Int64(99));\n    expect(message.getExtension(Leading_underscores_.p), Int64(99));\n    message.f = 'foo';\n    message.f_2 = 'foo2';\n    expect(message.f, 'foo');\n    expect(message.f_2, 'foo2');\n    message.clearF();\n    message.clearF_2();\n    expect(message.hasF(), false);\n    expect(message.hasF_2(), false);\n    expect(message.f, '');\n    expect(message.f_2, '');\n    final messageA = A();\n    messageA.b = message;\n    messageA.b_6 = message;\n    expect(messageA.b_6, message);\n    messageA.amap['foo'] = message;\n    expect(messageA.amap['foo'], message);\n\n    messageA.red = 'r';\n    expect(messageA.red, 'r');\n    expect(messageA.green, '');\n    messageA.clearColors();\n    expect(messageA.red, '');\n    expect(messageA.green, '');\n    messageA.red = 'r';\n    messageA.clearRed();\n    expect(messageA.red, '');\n    expect(messageA.green, '');\n    messageA.green = 'g';\n    expect(messageA.green, 'g');\n    messageA.clearGreen();\n    expect(messageA.red, '');\n    expect(messageA.green, '');\n\n    messageA.e = Enum_.constant;\n    expect(messageA.e, Enum_.constant);\n    messageA.clearE();\n    expect(messageA.e, Enum_.default_);\n    messageA.clearE();\n    messageA.e = Enum_.x1digit_;\n    expect(messageA.e, Enum_.x1digit_);\n    messageA.r.add(message);\n    expect(messageA.r, [message]);\n    messageA.setExtension(Leading_underscores_.q, Int64(100));\n    expect(messageA.getExtension(Leading_underscores_.q), Int64(100));\n\n    final a = A__()..foo = 'hi';\n    expect(a.foo, 'hi');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/list_iterator_args_test.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\n\nvoid main() {\n  // If this test fails, it means we no longer have the \"check\" functions in\n  // `PbList`, and half of the tests below can be removed.\n  test(\"PbList checks value validity\", () {\n    expect(() {\n      TestAllTypes().repeatedInt32.add(2147483647 + 1);\n    }, throwsArgumentError);\n  });\n\n  // For every `PbList` method that updates the list with an `Iterable`\n  // argument, check that the `Iterable` argument is iterated only once.\n  test(\"addAll iterates iterator argument once (with check function)\", () {\n    var mapCount = 0;\n    final list = TestAllTypes().repeatedInt32;\n    list.addAll(\n      [1, 2, 3].map((i) {\n        mapCount += 1;\n        return i;\n      }),\n    );\n    expect(mapCount, 3);\n    expect(list, [1, 2, 3]);\n  });\n\n  test(\"addAll iterates iterator argument once (without check function)\", () {\n    var mapCount = 0;\n    final list = TestAllTypes().repeatedString;\n    list.addAll(\n      [\"a\", \"b\", \"c\"].map((i) {\n        mapCount += 1;\n        return i;\n      }),\n    );\n    expect(mapCount, 3);\n    expect(list, [\"a\", \"b\", \"c\"]);\n  });\n\n  test(\"insertAll iterates iterator argument once (with check function)\", () {\n    var mapCount = 0;\n    final list = TestAllTypes().repeatedInt32..addAll([1, 2]);\n    list.insertAll(\n      1,\n      [4, 5, 6].map((i) {\n        mapCount += 1;\n        return i;\n      }),\n    );\n    expect(mapCount, 3);\n    expect(list, [1, 4, 5, 6, 2]);\n  });\n\n  test(\n    \"insertAll iterates iterator argument once (without check function)\",\n    () {\n      var mapCount = 0;\n      final list = TestAllTypes().repeatedString..addAll([\"a\", \"b\"]);\n      list.insertAll(\n        1,\n        [\"c\", \"d\", \"e\"].map((i) {\n          mapCount += 1;\n          return i;\n        }),\n      );\n      expect(mapCount, 3);\n      expect(list, [\"a\", \"c\", \"d\", \"e\", \"b\"]);\n    },\n  );\n\n  test(\n    \"replaceRange iterates iterator argument once (with check function)\",\n    () {\n      var mapCount = 0;\n      final list = TestAllTypes().repeatedInt32..addAll([1, 2, 3]);\n      list.replaceRange(\n        1,\n        2,\n        [4, 5, 6].map((i) {\n          mapCount += 1;\n          return i;\n        }),\n      );\n      expect(mapCount, 3);\n      expect(list, [1, 4, 5, 6, 3]);\n    },\n  );\n\n  test(\n    \"replaceRange iterates iterator argument once (without check function)\",\n    () {\n      var mapCount = 0;\n      final list = TestAllTypes().repeatedString..addAll([\"a\", \"b\", \"c\"]);\n      list.replaceRange(\n        1,\n        2,\n        [\"d\", \"e\", \"f\"].map((i) {\n          mapCount += 1;\n          return i;\n        }),\n      );\n      expect(mapCount, 3);\n      expect(list, [\"a\", \"d\", \"e\", \"f\", \"c\"]);\n    },\n  );\n\n  test(\"setAll iterates iterator argument once (with check function)\", () {\n    var mapCount = 0;\n    final list = TestAllTypes().repeatedInt32..addAll([1, 2, 3, 4]);\n    list.setAll(\n      1,\n      [5, 6, 7].map((i) {\n        mapCount += 1;\n        return i;\n      }),\n    );\n    expect(mapCount, 3);\n    expect(list, [1, 5, 6, 7]);\n  });\n\n  test(\"setAll iterates iterator argument once (without check function)\", () {\n    var mapCount = 0;\n    final list = TestAllTypes().repeatedString..addAll([\"a\", \"b\", \"c\", \"d\"]);\n    list.setAll(\n      1,\n      [\"e\", \"f\", \"g\"].map((i) {\n        mapCount += 1;\n        return i;\n      }),\n    );\n    expect(mapCount, 3);\n    expect(list, [\"a\", \"e\", \"f\", \"g\"]);\n  });\n\n  test(\"setRange iterates iterator argument once (with check function)\", () {\n    var mapCount = 0;\n    final list = TestAllTypes().repeatedInt32..addAll([1, 2, 3]);\n    list.setRange(\n      0,\n      3,\n      [4, 5, 6].map((i) {\n        mapCount += 1;\n        return i;\n      }),\n    );\n    expect(mapCount, 3);\n    expect(list, [4, 5, 6]);\n  });\n\n  test(\"setRange iterates iterator argument once (without check function)\", () {\n    var mapCount = 0;\n    final list = TestAllTypes().repeatedString..addAll([\"a\", \"b\", \"c\"]);\n    list.setRange(\n      0,\n      3,\n      [\"d\", \"e\", \"f\"].map((i) {\n        mapCount += 1;\n        return i;\n      }),\n    );\n    expect(mapCount, 3);\n    expect(list, [\"d\", \"e\", \"f\"]);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/map_field_test.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert';\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/map_field.pb.dart';\n\nvoid main() {\n  int int32ToEnumFieldTag =\n      TestMap().info_.byName['int32ToEnumField']!.tagNumber;\n  int int32ToMessageFieldTag =\n      TestMap().info_.byName['int32ToMessageField']!.tagNumber;\n\n  void setValues(TestMap testMap) {\n    testMap\n      ..int32ToInt32Field[1] = 11\n      ..int32ToInt32Field[2] = 22\n      ..int32ToInt32Field[3] = 33\n      ..int32ToStringField[1] = '11'\n      ..int32ToStringField[2] = '22'\n      ..int32ToStringField[3] = '33'\n      ..int32ToBytesField[1] = utf8.encode('11')\n      ..int32ToBytesField[2] = utf8.encode('22')\n      ..int32ToBytesField[3] = utf8.encode('33')\n      ..int32ToEnumField[1] = TestMap_EnumValue.DEFAULT\n      ..int32ToEnumField[2] = TestMap_EnumValue.BAR\n      ..int32ToEnumField[3] = TestMap_EnumValue.BAZ\n      ..int32ToMessageField[1] = (TestMap_MessageValue()..value = 11)\n      ..int32ToMessageField[2] = (TestMap_MessageValue()..value = 22)\n      ..int32ToMessageField[3] = (TestMap_MessageValue()..value = 33)\n      ..stringToInt32Field['1'] = 11\n      ..stringToInt32Field['2'] = 22\n      ..stringToInt32Field['3'] = 33;\n  }\n\n  void updateValues(TestMap testMap) {\n    testMap\n      ..int32ToInt32Field[1] = 111\n      ..int32ToInt32Field.remove(2)\n      ..int32ToInt32Field[4] = 44\n      ..int32ToStringField[1] = '111'\n      ..int32ToStringField.remove(2)\n      ..int32ToStringField[4] = '44'\n      ..int32ToBytesField[1] = utf8.encode('111')\n      ..int32ToBytesField.remove(2)\n      ..int32ToBytesField[4] = utf8.encode('44')\n      ..int32ToEnumField[1] = TestMap_EnumValue.BAR\n      ..int32ToEnumField.remove(2)\n      ..int32ToEnumField[4] = TestMap_EnumValue.ZOP\n      ..int32ToMessageField[1] = (TestMap_MessageValue()..value = 111)\n      ..int32ToMessageField.remove(2)\n      ..int32ToMessageField[4] = (TestMap_MessageValue()..value = 44)\n      ..stringToInt32Field['1'] = 111\n      ..stringToInt32Field.remove('2')\n      ..stringToInt32Field['4'] = 44;\n  }\n\n  void expectEmpty(TestMap testMap) {\n    expect(testMap.int32ToInt32Field, isEmpty);\n    expect(testMap.int32ToStringField, isEmpty);\n    expect(testMap.int32ToBytesField, isEmpty);\n    expect(testMap.int32ToEnumField, isEmpty);\n    expect(testMap.int32ToMessageField, isEmpty);\n    expect(testMap.stringToInt32Field, isEmpty);\n  }\n\n  void expectMapValuesSet(TestMap testMap) {\n    expect(testMap.int32ToInt32Field[1], 11);\n    expect(testMap.int32ToInt32Field[2], 22);\n    expect(testMap.int32ToInt32Field[3], 33);\n\n    expect(testMap.int32ToStringField[1], '11');\n    expect(testMap.int32ToStringField[2], '22');\n    expect(testMap.int32ToStringField[3], '33');\n\n    expect(testMap.int32ToBytesField[1], utf8.encode('11'));\n    expect(testMap.int32ToBytesField[2], utf8.encode('22'));\n    expect(testMap.int32ToBytesField[3], utf8.encode('33'));\n\n    expect(testMap.int32ToEnumField[1], TestMap_EnumValue.DEFAULT);\n    expect(testMap.int32ToEnumField[2], TestMap_EnumValue.BAR);\n    expect(testMap.int32ToEnumField[3], TestMap_EnumValue.BAZ);\n\n    expect(testMap.int32ToMessageField[1]!.value, 11);\n    expect(testMap.int32ToMessageField[2]!.value, 22);\n    expect(testMap.int32ToMessageField[3]!.value, 33);\n\n    expect(testMap.stringToInt32Field['1'], 11);\n    expect(testMap.stringToInt32Field['2'], 22);\n    expect(testMap.stringToInt32Field['3'], 33);\n  }\n\n  void expectMapValuesUpdated(TestMap testMap) {\n    expect(testMap.int32ToInt32Field.length, 3);\n    expect(testMap.int32ToInt32Field[1], 111);\n    expect(testMap.int32ToInt32Field[3], 33);\n    expect(testMap.int32ToInt32Field[4], 44);\n\n    expect(testMap.int32ToStringField.length, 3);\n    expect(testMap.int32ToStringField[1], '111');\n    expect(testMap.int32ToStringField[3], '33');\n    expect(testMap.int32ToStringField[4], '44');\n\n    expect(testMap.int32ToBytesField.length, 3);\n    expect(testMap.int32ToBytesField[1], utf8.encode('111'));\n    expect(testMap.int32ToBytesField[3], utf8.encode('33'));\n    expect(testMap.int32ToBytesField[4], utf8.encode('44'));\n\n    expect(testMap.int32ToEnumField.length, 3);\n    expect(testMap.int32ToEnumField[1], TestMap_EnumValue.BAR);\n    expect(testMap.int32ToEnumField[3], TestMap_EnumValue.BAZ);\n    expect(testMap.int32ToEnumField[4], TestMap_EnumValue.ZOP);\n\n    expect(testMap.int32ToMessageField.length, 3);\n    expect(testMap.int32ToMessageField[1]!.value, 111);\n    expect(testMap.int32ToMessageField[3]!.value, 33);\n    expect(testMap.int32ToMessageField[4]!.value, 44);\n\n    expect(testMap.stringToInt32Field.length, 3);\n    expect(testMap.stringToInt32Field['1'], 111);\n    expect(testMap.stringToInt32Field['3'], 33);\n    expect(testMap.stringToInt32Field['4'], 44);\n  }\n\n  test('set and clear values', () {\n    final testMap = TestMap();\n    expectEmpty(testMap);\n\n    setValues(testMap);\n    expectMapValuesSet(testMap);\n\n    testMap.clear();\n    expectEmpty(testMap);\n  });\n\n  test('update map values', () {\n    final testMap = TestMap();\n    setValues(testMap);\n    updateValues(testMap);\n    expectMapValuesUpdated(testMap);\n  });\n\n  test('Serialize and parse map', () {\n    var testMap = TestMap();\n    setValues(testMap);\n\n    testMap = TestMap.fromBuffer(testMap.writeToBuffer());\n    expectMapValuesSet(testMap);\n\n    updateValues(testMap);\n    testMap = TestMap.fromBuffer(testMap.writeToBuffer());\n    expectMapValuesUpdated(testMap);\n\n    testMap.clear();\n    testMap = TestMap.fromBuffer(testMap.writeToBuffer());\n    expectEmpty(testMap);\n  });\n\n  test('json serialize map', () {\n    var testMap = TestMap();\n    setValues(testMap);\n\n    testMap = TestMap.fromJson(testMap.writeToJson());\n    expectMapValuesSet(testMap);\n\n    updateValues(testMap);\n    testMap = TestMap.fromJson(testMap.writeToJson());\n    expectMapValuesUpdated(testMap);\n\n    testMap.clear();\n    testMap = TestMap.fromJson(testMap.writeToJson());\n    expectEmpty(testMap);\n  });\n\n  test(\n    'PbMap` is equal to another PbMap with equal key/value pairs in any order',\n    () {\n      final t =\n          TestMap()\n            ..int32ToStringField[2] = 'test2'\n            ..int32ToStringField[1] = 'test';\n      final t2 =\n          TestMap()\n            ..int32ToStringField[1] = 'test'\n            ..int32ToStringField[2] = 'test2';\n      final t3 = TestMap()..int32ToStringField[1] = 'test';\n\n      final m = t.int32ToStringField;\n      final m2 = t2.int32ToStringField;\n      final m3 = t3.int32ToStringField;\n\n      expect(t, t2);\n      expect(t.hashCode, t2.hashCode);\n\n      expect(m, m2);\n      expect(m == m2, isTrue);\n      expect(m.hashCode, m2.hashCode);\n\n      expect(m, isNot(m3));\n      expect(m == m3, isFalse);\n      expect(m.hashCode, isNot(m3.hashCode));\n    },\n  );\n\n  test('Unitialized map field is equal to initialized', () {\n    final testMap1 = TestMap();\n    final testMap2 = TestMap();\n\n    // Do a trivial operation to initialize the map field of testMap2.\n    testMap2.int32ToStringField.clear();\n\n    expect(testMap1, equals(testMap2));\n    expect(testMap2, equals(testMap1));\n\n    expect(testMap1.hashCode, equals(testMap2.hashCode));\n  });\n\n  test('merge from other message', () {\n    var testMap = TestMap();\n    setValues(testMap);\n\n    var other = TestMap();\n    other.mergeFromMessage(testMap);\n    expectMapValuesSet(other);\n\n    testMap =\n        TestMap()\n          ..int32ToMessageField[1] = (TestMap_MessageValue()..value = 42)\n          ..int32ToMessageField[2] = (TestMap_MessageValue()..value = 44);\n    other =\n        TestMap()\n          ..int32ToMessageField[1] = (TestMap_MessageValue()..secondValue = 43);\n    testMap.mergeFromMessage(other);\n\n    expect(testMap.int32ToMessageField[1]!.value, 0);\n    expect(testMap.int32ToMessageField[1]!.secondValue, 43);\n    expect(testMap.int32ToMessageField[2]!.value, 44);\n  });\n\n  test('parse duplicate keys', () {\n    final testMap = TestMap()..int32ToStringField[1] = 'foo';\n    final testMap2 = TestMap()..int32ToStringField[1] = 'bar';\n\n    final merge = TestMap.fromBuffer([\n      ...testMap.writeToBuffer(),\n      ...testMap2.writeToBuffer(),\n    ]);\n\n    // When parsing from the wire, if there are duplicate map keys the last key\n    // seen should be used.\n    expect(merge.int32ToStringField.length, 1);\n    expect(merge.int32ToStringField[1], 'bar');\n  });\n\n  test('Deep merge from other message', () {\n    final i1 = Inner()..innerMap['a'] = 'a';\n    final i2 = Inner()..innerMap['b'] = 'b';\n\n    final o1 = Outer()..i = i1;\n    final o2 = Outer()..i = i2;\n\n    o1.mergeFromMessage(o2);\n    expect(o1.i.innerMap.length, 2);\n  });\n\n  test('retain explicit default values of sub-messages', () {\n    final testMap = TestMap()..int32ToMessageField[1] = TestMap_MessageValue();\n    expect(testMap.int32ToMessageField[1]!.secondValue, 42);\n\n    final testMap2 = TestMap()..int32ToMessageField[2] = TestMap_MessageValue();\n\n    testMap.mergeFromBuffer(testMap2.writeToBuffer());\n    expect(testMap.int32ToMessageField[2]!.secondValue, 42);\n  });\n\n  test('Freeze message with map field', () {\n    final testMap = TestMap();\n    setValues(testMap);\n    testMap.freeze();\n\n    expect(\n      () => updateValues(testMap),\n      throwsA(const TypeMatcher<UnsupportedError>()),\n    );\n    expect(\n      () => testMap.int32ToMessageField[1]!.value = 42,\n      throwsA(const TypeMatcher<UnsupportedError>()),\n    );\n    expect(\n      () => testMap.int32ToStringField.remove(1),\n      throwsA(const TypeMatcher<UnsupportedError>()),\n    );\n    expect(\n      () => testMap.int32ToStringField.clear(),\n      throwsA(const TypeMatcher<UnsupportedError>()),\n    );\n  });\n\n  test('Values for different keys are not merged together when decoding', () {\n    final testMap = TestMap();\n    testMap.int32ToMessageField[1] = (TestMap_MessageValue()..value = 11);\n    testMap.int32ToMessageField[2] = (TestMap_MessageValue()..secondValue = 12);\n\n    void testValues(TestMap candidate) {\n      final message1 = candidate.int32ToMessageField[1]!;\n      final message2 = candidate.int32ToMessageField[2]!;\n\n      expect(message1.hasValue(), true);\n      expect(message1.value, 11);\n      expect(message1.hasSecondValue(), false);\n      expect(message1.secondValue, 42);\n      expect(message2.hasValue(), false);\n      expect(message2.value, 0);\n      expect(message2.hasSecondValue(), true);\n      expect(message2.secondValue, 12);\n    }\n\n    testValues(TestMap.fromBuffer(testMap.writeToBuffer()));\n    testValues(TestMap.fromJson(testMap.writeToJson()));\n  });\n\n  test('Calling getField on map fields using reflective API works.', () {\n    final testMap = TestMap();\n    final mapFieldInfo =\n        testMap.info_.fieldInfo.values\n            .where(\n              (fieldInfo) =>\n                  fieldInfo is MapFieldInfo &&\n                  fieldInfo.name == 'int32ToBytesField',\n            )\n            .single;\n    final value = testMap.getField(mapFieldInfo.tagNumber);\n    expect(value is Map<int, List<int>>, true);\n  });\n\n  test('Parses null keys and values', () {\n    // Use a desugared version of the message to create missing\n    // values in the serialized form.\n    final d =\n        Desugared()\n          ..int32ToStringField.add(\n            Desugared_Int32ToString()\n              ..clearKey()\n              ..value = 'abc',\n          )\n          ..int32ToStringField.add(\n            Desugared_Int32ToString()\n              ..key = 42\n              ..clearValue(),\n          )\n          ..int32ToStringField.add(\n            Desugared_Int32ToString()\n              ..key = 11\n              ..value = 'def',\n          )\n          ..stringToInt32Field.add(\n            Desugared_StringToInt32()\n              ..clearKey()\n              ..value = 11,\n          )\n          ..stringToInt32Field.add(\n            Desugared_StringToInt32()\n              ..key = 'abc'\n              ..clearValue(),\n          )\n          ..stringToInt32Field.add(\n            Desugared_StringToInt32()\n              ..key = 'def'\n              ..value = 42,\n          );\n\n    final m = TestMap.fromBuffer(d.writeToBuffer());\n    expect(m.int32ToStringField[0], 'abc');\n    expect(m.int32ToStringField[42], '');\n    expect(m.int32ToStringField[11], 'def');\n    expect(m.stringToInt32Field['abc'], 0);\n    expect(m.stringToInt32Field[''], 11);\n    expect(m.stringToInt32Field['def'], 42);\n  });\n\n  test('Map field reads should not affect equality or hash of message', () {\n    final m1 = TestMap.create();\n    final m2 = TestMap.create();\n    expect(m1, equals(m2));\n    expect(m1.hashCode, equals(m2.hashCode));\n    m1.int32ToStringField; // read a map field\n    expect(m1, equals(m2));\n    expect(m1.hashCode, equals(m2.hashCode));\n  });\n\n  test('getField and \\$_getMap are in sync', () {\n    final msg1 = TestMap();\n    expect(msg1.hasField(1), false);\n    final map1 = msg1.getField(1) as Map<int, int>;\n    expect(msg1.hasField(1), true);\n    map1[1] = 2;\n    expect(msg1.int32ToInt32Field[1], 2);\n\n    final msg2 = TestMap();\n    expect(msg2.hasField(1), false);\n    final map2 = msg2.$_getMap(0) as Map<int, int>;\n    expect(msg2.hasField(1), true);\n    map2[1] = 2;\n    expect(msg2.int32ToInt32Field[1], 2);\n  });\n\n  test('Parses empty map fields', () {\n    // Map fields are encoded as messages (as length-delimited fields). Check\n    // that we handle 0 length fields. (#719)\n    {\n      final messageBytes = <int>[\n        ...varint32Bytes(\n          (int32ToMessageFieldTag << 3) | 2, // wire type = 2 (length delimited)\n        ),\n        0, // length = 0\n      ];\n      final message = TestMap.fromBuffer(messageBytes);\n      expect(\n        message,\n        TestMap()..int32ToMessageField[0] = TestMap_MessageValue(),\n      );\n    }\n\n    {\n      final messageBytes = <int>[\n        ...varint32Bytes(\n          (int32ToEnumFieldTag << 3) | 2, // wire type = 2 (length delimited)\n        ),\n        0, // length = 0\n      ];\n      final message = TestMap.fromBuffer(messageBytes);\n      expect(\n        message,\n        TestMap()..int32ToEnumField[0] = TestMap_EnumValue.DEFAULT,\n      );\n    }\n  });\n\n  test('Parses map field with just key', () {\n    // Similar to the case above, but the field just has key (no value)\n    {\n      final messageBytes = <int>[\n        ...varint32Bytes(\n          (int32ToMessageFieldTag << 3) | 2, // wire type = 2 (length delimited)\n        ),\n        2, // length = 2\n        (1 << 3) | 0, // tag = 1 (map key), wire type = 0 (varint)\n        1, // key = 1\n      ];\n      final message = TestMap.fromBuffer(messageBytes);\n      expect(\n        message,\n        TestMap()..int32ToMessageField[1] = TestMap_MessageValue(),\n      );\n    }\n\n    {\n      final messageBytes = <int>[\n        ...varint32Bytes(\n          (int32ToEnumFieldTag << 3) | 2, // wire type = 2 (length delimited)\n        ),\n        2, // length = 2\n        (1 << 3) | 0, // tag = 1 (map key), wire type = 0 (varint)\n        1, // key = 1\n      ];\n      final message = TestMap.fromBuffer(messageBytes);\n      expect(\n        message,\n        TestMap()..int32ToEnumField[1] = TestMap_EnumValue.DEFAULT,\n      );\n    }\n  });\n\n  test('Parses map field with just key', () {\n    // Similar to the case above, but the field just has value (no key)\n    {\n      final messageBytes = <int>[\n        ...varint32Bytes(\n          (int32ToMessageFieldTag << 3) | 2, // wire type = 2 (length delimited)\n        ),\n        2, // length = 2\n        (2 << 3) | 2, // tag = 2 (map value), wire type = 2 (length delimited)\n        0, // length = 0 (empty message)\n      ];\n      final message = TestMap.fromBuffer(messageBytes);\n      expect(\n        message,\n        TestMap()..int32ToMessageField[0] = TestMap_MessageValue(),\n      );\n    }\n\n    {\n      final messageBytes = <int>[\n        ...varint32Bytes(\n          (int32ToEnumFieldTag << 3) | 2, // wire type = 2 (length delimited)\n        ),\n        2, // length = 2\n        (2 << 3) | 2, // tag = 2 (map value), wire type = 2 (length delimited)\n        1, // enum value = 1\n      ];\n      final message = TestMap.fromBuffer(messageBytes);\n      expect(message, TestMap()..int32ToEnumField[0] = TestMap_EnumValue.BAR);\n    }\n  });\n\n  test('Read-only message uninitialized map field value is read-only', () {\n    final msg = TestMap()..freeze();\n    expect(() {\n      msg.int32ToInt32Field[0] = 1;\n    }, throwsA(const TypeMatcher<UnsupportedError>()));\n  });\n}\n\nList<int> varint32Bytes(int value) {\n  List<int> output = [];\n  while (value >= 0x80) {\n    output.add(0x80 | (value & 0x7f));\n    value >>= 7;\n  }\n  output.add(value);\n  return output;\n}\n"
  },
  {
    "path": "protoc_plugin/test/map_test.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart'\n    show expect, isA, predicate, same, test, throwsA, throwsArgumentError;\n\nimport 'gen/map_api.pb.dart' as pb;\nimport 'gen/map_api2.pb.dart' as pb2;\nimport 'gen/map_field.pb.dart';\n\nvoid main() {\n  test(\"message doesn't implement Map when turned off\", () {\n    expect(pb.NonMap(), predicate((x) => x is! Map));\n    expect(pb2.NonMap2(), predicate((x) => x is! Map));\n  });\n\n  test('message implements Map when turned on', () {\n    expect(pb.Rec(), predicate((x) => x is Map));\n    expect(pb2.Rec2(), predicate((x) => x is Map));\n  });\n\n  test('operator [] returns null for unrecognized keys', () {\n    final rec = pb.Rec();\n    expect(rec['noSuchField'], null);\n    expect(rec[1234], null);\n    expect(rec[null], null);\n  });\n\n  test('operator [] returns default value when not set', () {\n    final rec = pb.Rec();\n    expect(rec['num'], 0);\n    expect(rec['nums'], []);\n    expect(rec['str'], '');\n    expect(rec['msg'], predicate((x) => x is pb.NonMap));\n  });\n\n  test('operator [] returns new value when set', () {\n    final rec = pb.Rec();\n    rec.num = 42;\n    expect(rec['num'], 42);\n    rec.nums.add(123);\n    expect(rec['nums'], [123]);\n    rec.str = 'hello';\n    expect(rec['str'], 'hello');\n    final msg = pb.NonMap();\n    rec.msg = msg;\n    expect(rec['msg'], same(msg));\n  });\n\n  test('operator []= throws exception for invalid key', () {\n    final rec = pb.Rec();\n    expect(\n      () {\n        rec['unknown'] = 123;\n      },\n      throwsA(\n        isA<ArgumentError>().having(\n          (p0) => p0.message,\n          'message',\n          \"field 'unknown' not found in protobuf_unittest.Rec\",\n        ),\n      ),\n    );\n  });\n\n  test('operator []= throws exception for repeated field', () {\n    // Copying the values would be confusing.\n    final rec = pb.Rec();\n    expect(() {\n      rec['nums'] = [1, 2];\n    }, throwsArgumentError);\n  });\n\n  test('operator []= throws exception for invalid value type', () {\n    final rec = pb.Rec();\n    expect(() {\n      rec['num'] = 'hello';\n    }, throwsArgumentError);\n    expect(() {\n      rec['str'] = 123;\n    }, throwsArgumentError);\n  });\n\n  test('operator []= sets the field', () {\n    final rec = pb.Rec();\n    rec['num'] = 123;\n    expect(rec.num, 123);\n    rec['str'] = 'hello';\n    expect(rec.str, 'hello');\n  });\n\n  test('keys returns each field name (even when unset)', () {\n    final rec = pb.Rec();\n    expect(Set.from(rec.keys), {'msg', 'num', 'nums', 'str'});\n  });\n\n  test('containsKey returns true for fields that exist (even when unset)', () {\n    final rec = pb.Rec();\n    expect(rec.containsKey('unknown'), false);\n    expect(rec.containsKey('str'), true);\n    expect(rec.containsKey('num'), true);\n    expect(rec.containsKey('nums'), true);\n    expect(rec.containsKey('msg'), true);\n  });\n\n  test('length is constant', () {\n    final rec = pb.Rec();\n    expect(rec.length, 4);\n    rec.str = 'hello';\n    expect(rec.length, 4);\n  });\n\n  test(\"remove isn't supported\", () {\n    final rec = pb.Rec();\n    rec.str = 'hello';\n    expect(\n      () {\n        rec.remove('str');\n      },\n      throwsA(\n        isA<UnsupportedError>().having(\n          (p0) => p0.message,\n          'message',\n          'remove() not supported by protobuf_unittest.Rec',\n        ),\n      ),\n    );\n    expect(rec.str, 'hello');\n  });\n\n  test('clear sets each field to its default value (unlike a regular Map)', () {\n    // We have little choice here since the clear() method already existed.\n    final rec = pb.Rec();\n    rec.str = 'hello';\n    rec.num = 123;\n    rec.nums.add(456);\n    rec.clear();\n    expect(rec.length, 4);\n    expect(rec['str'], '');\n    expect(rec['num'], 0);\n    expect(rec['nums'], []);\n  });\n\n  test('addAll sets each field to a new value', () {\n    final rec = pb.Rec();\n    rec.addAll({'str': 'hello', 'num': 123});\n    expect(rec['str'], 'hello');\n    expect(rec['num'], 123);\n  });\n\n  test(\"addAll doesn't work for repeated fields\", () {\n    // It would be confusing to copy the values.\n    final rec = pb.Rec();\n    expect(() {\n      rec.addAll({\n        'nums': [1, 2, 3],\n      });\n    }, throwsArgumentError);\n  });\n\n  test(\n    \"Map equality check handles missing keys without type errors, bug #1075\",\n    () {\n      final message1 = TestMap();\n      final message2 = TestMap();\n      expect(message1, message2);\n\n      message1.int32ToInt32Field[1] = 2;\n      expect(message1 == message2, false);\n\n      message2.int32ToInt32Field[3] = 4;\n      expect(message1 == message2, false);\n\n      message1.int32ToInt32Field[3] = 4;\n      message2.int32ToInt32Field[1] = 2;\n      expect(message1, message2);\n    },\n  );\n}\n"
  },
  {
    "path": "protoc_plugin/test/merge_test.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:test/test.dart' show expect, test;\n\nimport 'gen/foo.pb.dart' as pb;\n\nvoid main() {\n  test('merges child message', () {\n    final top =\n        pb.Outer()\n          ..id = Int64(1)\n          ..value = 'sss'\n          ..strings.addAll(['s1', 's2'])\n          ..inner =\n              (pb.Inner()\n                ..id = Int64(2)\n                ..value = 'sub'\n                ..strings.addAll(['sub1', 'sub2']));\n\n    final update =\n        pb.Outer()\n          ..id = Int64(1)\n          ..value = 'new'\n          ..inner = (pb.Inner()..id = Int64(3));\n\n    top.mergeFromMessage(update);\n\n    final expected =\n        pb.Outer()\n          ..id = Int64(1)\n          ..value = 'new'\n          ..strings.addAll(['s1', 's2'])\n          // This is properly merged.\n          ..inner =\n              (pb.Inner()\n                ..id = Int64(3)\n                ..value = 'sub'\n                ..strings.addAll(['sub1', 'sub2']));\n\n    expect(top, expected);\n  });\n\n  test('merges grandchild message', () {\n    final empty = pb.Outer();\n    final mergeMe1 =\n        pb.Outer()..inner = (pb.Inner()..inner = (pb.Inner()..id = Int64(1)));\n    final mergeMe2 =\n        pb.Outer()..inner = (pb.Inner()..inner = (pb.Inner()..value = 'new'));\n\n    empty.mergeFromMessage(mergeMe1);\n    empty.mergeFromMessage(mergeMe2);\n\n    final expected =\n        pb.Outer()\n          ..inner =\n              (pb.Inner()\n                ..inner =\n                    (pb.Inner()\n                      ..id = Int64(1)\n                      ..value = 'new'));\n    expect(empty, expected);\n  });\n\n  test('merges repeated element of child', () {\n    final empty = pb.Outer();\n    final mergeMe = pb.Outer()..inner = (pb.Inner()..strings.add('one'));\n\n    empty.mergeFromMessage(mergeMe);\n\n    final expected = pb.Outer()..inner = (pb.Inner()..strings.add('one'));\n    expect(empty, expected);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/message_generator_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n@TestOn('vm')\nlibrary;\n\nimport 'dart:collection';\n\nimport 'package:collection/collection.dart';\nimport 'package:protoc_plugin/indenting_writer.dart';\nimport 'package:protoc_plugin/protoc.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/compiler/plugin.pb.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart';\nimport 'package:protoc_plugin/src/linker.dart';\nimport 'package:protoc_plugin/src/options.dart';\nimport 'package:test/test.dart';\n\nimport 'src/golden_file.dart';\nimport 'src/test_features.dart';\n\nvoid main() {\n  late FileDescriptorProto fd;\n  EnumDescriptorProto ed;\n  late DescriptorProto md;\n\n  setUp(() async {\n    fd = FileDescriptorProto();\n    ed =\n        EnumDescriptorProto()\n          ..name = 'PhoneType'\n          ..value.addAll([\n            EnumValueDescriptorProto()\n              ..name = 'MOBILE'\n              ..number = 0,\n            EnumValueDescriptorProto()\n              ..name = 'HOME'\n              ..number = 1,\n            EnumValueDescriptorProto()\n              ..name = 'WORK'\n              ..number = 2,\n            EnumValueDescriptorProto()\n              ..name = 'BUSINESS'\n              ..number = 2,\n          ]);\n    md =\n        DescriptorProto()\n          ..name = 'PhoneNumber'\n          ..field.addAll([\n            // optional PhoneType type = 2 [default = HOME];\n            FieldDescriptorProto()\n              ..name = 'type'\n              ..jsonName = 'type'\n              ..number = 2\n              ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n              ..type = FieldDescriptorProto_Type.TYPE_ENUM\n              ..typeName = '.PhoneNumber.PhoneType',\n            // required string number = 1;\n            FieldDescriptorProto()\n              ..name = 'number'\n              ..jsonName = 'number'\n              ..number = 1\n              ..label = FieldDescriptorProto_Label.LABEL_REQUIRED\n              ..type = FieldDescriptorProto_Type.TYPE_STRING,\n            FieldDescriptorProto()\n              ..name = 'name'\n              ..jsonName = 'name'\n              ..number = 3\n              ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n              ..type = FieldDescriptorProto_Type.TYPE_STRING\n              ..defaultValue = r'$',\n            FieldDescriptorProto()\n              ..name = 'deprecated_field'\n              ..jsonName = 'deprecatedField'\n              ..number = 4\n              ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n              ..type = FieldDescriptorProto_Type.TYPE_STRING\n              ..options = (FieldOptions()..deprecated = true),\n          ])\n          ..enumType.add(ed);\n  });\n\n  test('testMessageGenerator', () {\n    final options =\n        parseGenerationOptions(\n          CodeGeneratorRequest()..parameter = 'disable_constructor_args',\n          CodeGeneratorResponse(),\n        )!;\n\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n\n    final ctx = GenerationContext(options);\n    mg.register(ctx);\n    mg.resolve(ctx);\n\n    var writer = IndentingWriter(generateMetadata: true, fileName: '');\n    mg.generate(writer);\n    expectGolden(writer.emitSource(format: false), 'messageGenerator.pb.dart');\n    expectGolden(\n      writer.sourceLocationInfo.toString(),\n      'messageGenerator.pb.dart.meta',\n    );\n\n    writer = IndentingWriter(generateMetadata: true, fileName: '');\n    mg.generateEnums(writer);\n    expectGolden(\n      writer.emitSource(format: false),\n      'messageGeneratorEnums.pb.dart',\n    );\n    expectGolden(\n      writer.sourceLocationInfo.toString(),\n      'messageGeneratorEnums.pb.dart.meta',\n    );\n  });\n\n  test('testMetadataIndices', () {\n    final options =\n        parseGenerationOptions(\n          CodeGeneratorRequest()..parameter = 'disable_constructor_args',\n          CodeGeneratorResponse(),\n        )!;\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n\n    final ctx = GenerationContext(options);\n    mg.register(ctx);\n    mg.resolve(ctx);\n\n    final writer = IndentingWriter(generateMetadata: true, fileName: '');\n    mg.generate(writer);\n\n    final eq = ListEquality();\n    final fieldStringsMap = HashMap(\n      equals: eq.equals,\n      hashCode: eq.hash,\n      isValidKey: eq.isValidKey,\n    );\n    fieldStringsMap[[4, 0]] = ['PhoneNumber'];\n    fieldStringsMap[[4, 0, 2, 0]] = ['type', 'hasType', 'clearType'];\n    fieldStringsMap[[4, 0, 2, 1]] = ['number', 'hasNumber', 'clearNumber'];\n    fieldStringsMap[[4, 0, 2, 2]] = ['name', 'hasName', 'clearName'];\n    fieldStringsMap[[4, 0, 2, 3]] = [\n      'deprecatedField',\n      'hasDeprecatedField',\n      'clearDeprecatedField',\n    ];\n\n    final generatedContents = writer.emitSource(format: false);\n    final metadata = writer.sourceLocationInfo;\n    for (final annotation in metadata.annotation) {\n      final annotatedName = generatedContents.substring(\n        annotation.begin,\n        annotation.end,\n      );\n      final expectedStrings = fieldStringsMap[annotation.path];\n      if (expectedStrings == null) {\n        fail(\n          'The field path ${annotation.path} '\n          'did not match any expected field path.',\n        );\n      }\n      expect(annotatedName, isIn(expectedStrings));\n    }\n  });\n\n  test('MessageGenerator inherits from a parent file', () {\n    setTestFeature(fd, 1);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n\n    expect(getTestFeature(mg.features), 1);\n  });\n\n  test('MessageGenerator can override parent file features', () {\n    setTestFeature(fd, 1);\n    setTestFeature(md, 2);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n\n    expect(getTestFeature(mg.features), 2);\n  });\n\n  test('MessageGenerator inherits from a parent message', () {\n    final mdParent = setTestFeature(md.deepCopy(), 1);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mgParent = MessageGenerator.topLevel(\n      mdParent,\n      fg,\n      {},\n      null,\n      <String>{},\n      0,\n    );\n    final mg = MessageGenerator.nested(md, mgParent, {}, null, <String>{}, 0);\n\n    expect(getTestFeature(mg.features), 1);\n  });\n\n  test('MessageGenerator can override parent message features', () {\n    final mdParent = setTestFeature(md.deepCopy(), 1);\n    setTestFeature(md, 2);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mgParent = MessageGenerator.topLevel(\n      mdParent,\n      fg,\n      {},\n      null,\n      <String>{},\n      0,\n    );\n    final mg = MessageGenerator.nested(md, mgParent, {}, null, <String>{}, 0);\n\n    expect(getTestFeature(mg.features), 2);\n  });\n\n  test('MessageGenerator fields inherit from a parent message', () {\n    fd.edition = Edition.EDITION_2023;\n    (md.field..clear()).add(\n      FieldDescriptorProto()\n        ..name = 'number'\n        ..jsonName = 'number'\n        ..number = 1\n        ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n        ..type = FieldDescriptorProto_Type.TYPE_STRING,\n    );\n    setTestFeature(md, 1);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n\n    final ctx = GenerationContext(GenerationOptions());\n    mg.register(ctx);\n    mg.resolve(ctx);\n\n    expect(getTestFeature(mg.fieldList[0].features), 1);\n  });\n\n  test('MessageGenerator fields can override parent message features', () {\n    fd.edition = Edition.EDITION_2023;\n    (md.field..clear()).add(\n      FieldDescriptorProto()\n        ..name = 'number'\n        ..jsonName = 'number'\n        ..number = 1\n        ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n        ..type = FieldDescriptorProto_Type.TYPE_STRING,\n    );\n    setTestFeature(md, 1);\n    setTestFeature(md.field[0], 2);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n\n    final ctx = GenerationContext(GenerationOptions());\n    mg.register(ctx);\n    mg.resolve(ctx);\n\n    expect(getTestFeature(mg.fieldList[0].features), 2);\n  });\n\n  test('MessageGenerator fields inherit from a parent oneof', () {\n    fd.edition = Edition.EDITION_2023;\n    md.oneofDecl.add(OneofDescriptorProto()..name = 'oneof');\n    (md.field..clear()).add(\n      FieldDescriptorProto()\n        ..name = 'number'\n        ..jsonName = 'number'\n        ..number = 1\n        ..oneofIndex = 0\n        ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n        ..type = FieldDescriptorProto_Type.TYPE_STRING,\n    );\n    setTestFeature(md.oneofDecl[0], 1);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n\n    final ctx = GenerationContext(GenerationOptions());\n    mg.register(ctx);\n    mg.resolve(ctx);\n\n    expect(getTestFeature(mg.fieldList[0].features), 1);\n  });\n\n  test('MessageGenerator fields can override parent oneof', () {\n    fd.edition = Edition.EDITION_2023;\n    md.oneofDecl.add(OneofDescriptorProto()..name = 'oneof');\n    (md.field..clear()).add(\n      FieldDescriptorProto()\n        ..name = 'number'\n        ..jsonName = 'number'\n        ..number = 1\n        ..oneofIndex = 0\n        ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n        ..type = FieldDescriptorProto_Type.TYPE_STRING,\n    );\n    setTestFeature(md.oneofDecl[0], 1);\n    setTestFeature(md.field[0], 2);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n\n    final ctx = GenerationContext(GenerationOptions());\n    mg.register(ctx);\n    mg.resolve(ctx);\n\n    expect(getTestFeature(mg.fieldList[0].features), 2);\n  });\n\n  test('MessageGenerator oneof inherits from a parent message', () {\n    fd.edition = Edition.EDITION_2023;\n    md.oneofDecl.add(OneofDescriptorProto()..name = 'oneof');\n    (md.field..clear()).add(\n      FieldDescriptorProto()\n        ..name = 'number'\n        ..jsonName = 'number'\n        ..number = 1\n        ..oneofIndex = 0\n        ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n        ..type = FieldDescriptorProto_Type.TYPE_STRING,\n    );\n    setTestFeature(md, 1);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n\n    final ctx = GenerationContext(GenerationOptions());\n    mg.register(ctx);\n    mg.resolve(ctx);\n\n    expect(getTestFeature(mg.fieldList[0].features), 1);\n  });\n\n  test('MessageGenerator oneof can override parent message', () {\n    fd.edition = Edition.EDITION_2023;\n    md.oneofDecl.add(OneofDescriptorProto()..name = 'oneof');\n    (md.field..clear()).add(\n      FieldDescriptorProto()\n        ..name = 'number'\n        ..jsonName = 'number'\n        ..number = 1\n        ..oneofIndex = 0\n        ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n        ..type = FieldDescriptorProto_Type.TYPE_STRING,\n    );\n    setTestFeature(md, 1);\n    setTestFeature(md.oneofDecl[0], 2);\n    final fg = FileGenerator(testEditionDefaults, fd, GenerationOptions());\n    final mg = MessageGenerator.topLevel(md, fg, {}, null, <String>{}, 0);\n\n    final ctx = GenerationContext(GenerationOptions());\n    mg.register(ctx);\n    mg.resolve(ctx);\n\n    expect(getTestFeature(mg.fieldList[0].features), 2);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/message_set_test.dart",
    "content": "// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:typed_data';\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf/protobuf.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/empty.pb.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/message_set.pb.dart';\n\nvoid main() {\n  // Example message with a nested message set, encoded with the C++ library.\n  // `protoc --decode_raw` output:\n  //\n  // 1 {\n  //   1 {\n  //     2: 1758024\n  //     3 {\n  //       1: 123\n  //       2: \"testing\"\n  //       3 {\n  //         5: 0\n  //         5: 1\n  //         5: 2\n  //       }\n  //     }\n  //   }\n  //   1 {\n  //     2: 1832098\n  //     3 {\n  //       5: 987\n  //       5: 654\n  //       5: 321\n  //     }\n  //   }\n  // }\n  final encodedNested = [\n    10, 44, 11, 16, 200, 166, 107, 26, 19, 8, 123, 18, 7, 116, 101, 115, //\n    116, 105, 110, 103, 26, 6, 40, 0, 40, 1, 40, 2, 12, 11, 16, 162, 233, //\n    111, 26, 9, 40, 219, 7, 40, 142, 5, 40, 193, 2, 12,\n  ];\n\n  // Example message with a top-level message set, encoded with the C++\n  // library. `protoc --decode_raw` output:\n  //\n  // 1 {\n  //   2: 1758024\n  //   3 {\n  //     1: 123\n  //   }\n  // }\n  // 1 {\n  //   2: 1832098\n  //   3 {\n  //     5: 987\n  //   }\n  // }\n  final encodedTopLevel = [\n    11, 16, 200, 166, 107, 26, 2, 8, 123, 12, 11, 16, 162, 233, 111, 26, 3, //\n    40, 219, 7, 12,\n  ];\n\n  test('Parse message set extensions (nested)', () {\n    final registry =\n        ExtensionRegistry()\n          ..add(TestMessage.ext1)\n          ..add(TestMessage.ext2);\n    final msg = TestMessage.fromBuffer(encodedNested, registry);\n\n    final ext1Value =\n        msg.info.getExtension(TestMessage.ext1) as ExtensionMessage1;\n    expect(ext1Value.a, 123);\n    expect(ext1Value.b, 'testing');\n    expect(ext1Value.c.ints, [0, 1, 2]);\n\n    final ext2Value =\n        msg.info.getExtension(TestMessage.ext2) as ExtensionMessage2;\n    expect(ext2Value.ints, [987, 654, 321]);\n\n    expect(msg.writeToBuffer(), encodedNested);\n  });\n\n  test('Parse message set (top-level)', () {\n    final registry =\n        ExtensionRegistry()\n          ..add(TestMessage.ext1)\n          ..add(TestMessage.ext2);\n    final msg = MessageSet.fromBuffer(encodedTopLevel, registry);\n\n    final ext1Value = msg.getExtension(TestMessage.ext1) as ExtensionMessage1;\n    expect(ext1Value.a, 123);\n    expect(ext1Value.b, ''); // not set\n    expect(ext1Value.c.ints, []); // not set\n\n    final ext2Value = msg.getExtension(TestMessage.ext2) as ExtensionMessage2;\n    expect(ext2Value.ints, [987]);\n\n    expect(msg.writeToBuffer(), encodedTopLevel);\n  });\n\n  test('Parse as unknown fields and serialize', () {\n    final msg = TestMessage.fromBuffer(encodedNested);\n    expect(msg.writeToBuffer(), encodedNested);\n  });\n\n  test('Reparse with extensions (nested message)', () {\n    final msg = TestMessage.fromBuffer(encodedNested);\n    final registry =\n        ExtensionRegistry()\n          ..add(TestMessage.ext1)\n          ..add(TestMessage.ext2);\n    final reparsedInfo = registry.reparseMessage(msg.info);\n\n    final ext1Value =\n        reparsedInfo.getExtension(TestMessage.ext1) as ExtensionMessage1;\n    expect(ext1Value.a, 123);\n    expect(ext1Value.b, 'testing');\n\n    final ext2Value =\n        reparsedInfo.getExtension(TestMessage.ext2) as ExtensionMessage2;\n    expect(ext2Value.ints, [987, 654, 321]);\n\n    expect(reparsedInfo.unknownFields.isEmpty, true);\n  });\n\n  test('Reparse with extensions (top-level message)', () {\n    final msg = TestMessage.fromBuffer(encodedNested);\n    final registry =\n        ExtensionRegistry()\n          ..add(TestMessage.ext1)\n          ..add(TestMessage.ext2);\n    final reparsedMsg = registry.reparseMessage(msg);\n\n    final ext1Value =\n        reparsedMsg.info.getExtension(TestMessage.ext1) as ExtensionMessage1;\n    expect(ext1Value.a, 123);\n    expect(ext1Value.b, 'testing');\n\n    final ext2Value =\n        reparsedMsg.info.getExtension(TestMessage.ext2) as ExtensionMessage2;\n    expect(ext2Value.ints, [987, 654, 321]);\n\n    expect(msg.unknownFields.isEmpty, true);\n  });\n\n  test('Ignore extra tags in items', () {\n    // Generate a message set encoding using unknown fields. Message set item\n    // will have extra tags.\n\n    final encoded = encodeMessageSetWithExtraItemTags(Encoding.group);\n\n    final registry = ExtensionRegistry()..add(TestMessage.ext1);\n    final decodedMsg = MessageSet.fromBuffer(encoded, registry);\n    final extensionValue =\n        decodedMsg.getExtension(TestMessage.ext1) as ExtensionMessage1;\n\n    expect(extensionValue.a, 123456);\n    expect(extensionValue.b, 'test');\n    expect(decodedMsg.unknownFields.isEmpty, true);\n  });\n\n  test('Ignore extra tags in items (length delimited encoding)', () {\n    // Same as above, but tests length delimited encoding.\n\n    final encoded = encodeMessageSetWithExtraItemTags(Encoding.lengthDelimited);\n\n    final registry = ExtensionRegistry()..add(TestMessage.ext1);\n    final decodedMsg = MessageSet.fromBuffer(encoded, registry);\n    final extensionValue =\n        decodedMsg.getExtension(TestMessage.ext1) as ExtensionMessage1;\n\n    expect(extensionValue.a, 123456);\n    expect(extensionValue.b, 'test');\n    expect(decodedMsg.unknownFields.isEmpty, true);\n  });\n\n  test('Ignore invalid tags in repeated items', () {\n    // Extra fields other than `repeated Item items = 1` in the outer message.\n\n    final messageSetUnknownFields = UnknownFieldSet();\n    messageSetUnknownFields.addField(\n      2,\n      UnknownFieldSetField()..addVarint(Int64(987)),\n    );\n\n    final messageSetEncoded = CodedBufferWriter();\n    messageSetUnknownFields.writeToCodedBufferWriter(messageSetEncoded);\n\n    final encoded =\n        (Empty()\n              ..unknownFields.addField(\n                123,\n                UnknownFieldSetField()\n                  ..lengthDelimited.add(messageSetEncoded.toBuffer()),\n              ))\n            .writeToBuffer();\n\n    final registry = ExtensionRegistry()..add(TestMessage.ext1);\n    final msg = TestMessage.fromBuffer(encoded, registry);\n    expect(msg.info.hasExtension(TestMessage.ext1), false);\n  });\n\n  test('Encode message set as length prefixed', () {\n    // Message sets are generally encoded as groups, but we support length\n    // delimited as well.\n\n    final messageSetUnknownFields = UnknownFieldSet();\n    messageSetUnknownFields.addField(\n      2,\n      UnknownFieldSetField()..addVarint(Int64(987)),\n    );\n\n    final messageSetEncoded = CodedBufferWriter();\n    messageSetUnknownFields.writeToCodedBufferWriter(messageSetEncoded);\n\n    final encoded =\n        (Empty()\n              ..unknownFields.addField(\n                123,\n                UnknownFieldSetField()\n                  ..lengthDelimited.add(messageSetEncoded.toBuffer()),\n              ))\n            .writeToBuffer();\n\n    final registry = ExtensionRegistry()..add(TestMessage.ext1);\n    final msg = TestMessage.fromBuffer(encoded, registry);\n    expect(msg.info.hasExtension(TestMessage.ext1), false);\n  });\n}\n\nenum Encoding { lengthDelimited, group }\n\n/// Generate a message set encoding with one extension. Extension will have\n/// extra tags.\nUint8List encodeMessageSetWithExtraItemTags(Encoding encoding) {\n  final itemFieldGroup = UnknownFieldSet();\n\n  // Invalid field with tag 1.\n  itemFieldGroup.addField(\n    1,\n    UnknownFieldSetField()..addLengthDelimited([1, 2, 3]),\n  );\n\n  // Extension field.\n  itemFieldGroup.addField(\n    3,\n    UnknownFieldSetField()..addLengthDelimited(\n      (ExtensionMessage1()\n            ..a = 123456\n            ..b = 'test')\n          .writeToBuffer(),\n    ),\n  );\n\n  // Invalid field with tag 3.\n  itemFieldGroup.addField(4, UnknownFieldSetField()..addVarint(Int64(123456)));\n\n  // Type id field.\n  itemFieldGroup.addField(2, UnknownFieldSetField()..addVarint(Int64(1758024)));\n\n  final messageSet = Empty();\n  final messageSetUnknownFields = messageSet.unknownFields;\n\n  switch (encoding) {\n    case Encoding.lengthDelimited:\n      final writer = CodedBufferWriter();\n      itemFieldGroup.writeToCodedBufferWriter(writer);\n      messageSetUnknownFields.addField(\n        1,\n        UnknownFieldSetField()..addLengthDelimited(writer.toBuffer()),\n      );\n      break;\n    case Encoding.group:\n      messageSetUnknownFields.addField(\n        1,\n        UnknownFieldSetField()..addGroup(itemFieldGroup),\n      );\n      break;\n  }\n\n  messageSetUnknownFields.addField(\n    1,\n    UnknownFieldSetField()..addGroup(itemFieldGroup),\n  );\n\n  final messageSetEncoded = CodedBufferWriter();\n  messageSetUnknownFields.writeToCodedBufferWriter(messageSetEncoded);\n\n  return messageSet.writeToBuffer();\n}\n"
  },
  {
    "path": "protoc_plugin/test/message_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// ignore_for_file: deprecated_member_use_from_same_package\n\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart'\n    show DescriptorProto;\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\nimport 'gen/google/protobuf/unittest.pbjson.dart';\nimport 'src/test_util.dart';\n\nvoid main() {\n  final testRequiredUninitialized = TestRequired();\n\n  final testRequiredInitialized =\n      TestRequired()\n        ..a = 1\n        ..b = 2\n        ..c = 3;\n\n  test('testMergeFrom', () {\n    final mergeSource =\n        TestAllTypes()\n          ..optionalInt32 = 1\n          ..optionalString = 'foo'\n          ..optionalForeignMessage = ForeignMessage()\n          ..optionalNestedMessage = (TestAllTypes_NestedMessage()..bb = 42)\n          ..repeatedString.add('bar');\n\n    final mergeDest =\n        TestAllTypes()\n          ..optionalInt64 = make64(2)\n          ..optionalString = 'baz'\n          ..optionalForeignMessage = ForeignMessage()\n          ..optionalForeignMessage = (ForeignMessage()..c = 3)\n          ..optionalNestedMessage = (TestAllTypes_NestedMessage()..bb = 43)\n          ..repeatedString.add('qux');\n\n    final mergeResultExpected = '''\noptionalInt32: 1\noptionalInt64: 2\noptionalString: baz\noptionalNestedMessage: {\n  bb: 43\n}\noptionalForeignMessage: {\n  c: 3\n}\nrepeatedString: bar\nrepeatedString: qux\n''';\n\n    final result =\n        TestAllTypes()\n          ..mergeFromMessage(mergeSource)\n          ..mergeFromMessage(mergeDest);\n\n    expect(result.toString(), mergeResultExpected);\n  });\n\n  test('testRequired', () {\n    final message = TestRequired();\n\n    expect(message.isInitialized(), isFalse, reason: 'no required fields set');\n    message.a = 1;\n    expect(\n      message.isInitialized(),\n      isFalse,\n      reason: 'single required field set',\n    );\n    message.b = 1;\n    expect(\n      message.isInitialized(),\n      isFalse,\n      reason: 'all but one required field set',\n    );\n    message.c = 1;\n    expect(message.isInitialized(), isTrue, reason: 'required fields set');\n  });\n\n  test('testRequiredForeign', () {\n    final message = TestRequiredForeign();\n    expect(message.isInitialized(), isTrue);\n\n    message.optionalMessage = testRequiredUninitialized;\n    expect(message.isInitialized(), isFalse);\n\n    message.optionalMessage = testRequiredInitialized;\n    expect(message.isInitialized(), isTrue);\n\n    message.repeatedMessage.add(testRequiredUninitialized);\n    expect(message.isInitialized(), isFalse);\n\n    message.repeatedMessage[0] = testRequiredInitialized;\n    expect(message.isInitialized(), isTrue);\n  });\n\n  test('testRequiredExtension', () {\n    final message = TestAllExtensions();\n    expect(message.isInitialized(), isTrue);\n\n    message.setExtension(TestRequired.single, testRequiredUninitialized);\n    expect(message.isInitialized(), isFalse);\n\n    message.setExtension(TestRequired.single, testRequiredInitialized);\n    expect(message.isInitialized(), isTrue);\n\n    message.addExtension(TestRequired.multi, testRequiredUninitialized);\n    expect(message.isInitialized(), isFalse);\n\n    message.getExtension(TestRequired.multi)[0] = testRequiredInitialized;\n    expect(message.isInitialized(), isTrue);\n  });\n\n  test('testUninitializedException', () {\n    expect(\n      () => TestRequired().check(),\n      throwsA(\n        isA<StateError>().having(\n          (p0) => p0.message,\n          'message',\n          'Message missing required fields: a, b, c',\n        ),\n      ),\n    );\n  });\n\n  test('testBuildPartial', () {\n    // We're mostly testing that no exception is thrown.\n    final message = TestRequired();\n    expect(message.isInitialized(), isFalse);\n  });\n\n  test('testNestedUninitializedException', () {\n    final message = TestRequiredForeign();\n    message.optionalMessage = testRequiredUninitialized;\n    message.repeatedMessage.add(testRequiredUninitialized);\n    message.repeatedMessage.add(testRequiredUninitialized);\n    expect(\n      message.check,\n      // NOTE: error message differs from Java in that\n      // fields are referenced using Dart fieldnames r.t.\n      // proto field names.\n      throwsA(\n        isA<StateError>().having(\n          (p0) => p0.message,\n          'message',\n          'Message missing required fields: '\n              'optionalMessage.a, '\n              'optionalMessage.b, '\n              'optionalMessage.c, '\n              'repeatedMessage[0].a, '\n              'repeatedMessage[0].b, '\n              'repeatedMessage[0].c, '\n              'repeatedMessage[1].a, '\n              'repeatedMessage[1].b, '\n              'repeatedMessage[1].c',\n        ),\n      ),\n    );\n  });\n\n  test('testBuildNestedPartial', () {\n    // We're mostly testing that no exception is thrown.\n    final message = TestRequiredForeign();\n    message.optionalMessage = testRequiredUninitialized;\n    message.repeatedMessage.add(testRequiredUninitialized);\n    message.repeatedMessage.add(testRequiredUninitialized);\n    expect(message.isInitialized(), isFalse);\n  });\n\n  test('testParseUnititialized', () {\n    expect(\n      () => TestRequired.fromBuffer([]).check(),\n      throwsA(\n        isA<StateError>().having(\n          (p0) => p0.message,\n          'message',\n          'Message missing required fields: a, b, c',\n        ),\n      ),\n    );\n  });\n\n  test('testParseNestedUnititialized', () {\n    final message = TestRequiredForeign();\n    message.optionalMessage = testRequiredUninitialized;\n    message.repeatedMessage.add(testRequiredUninitialized);\n    message.repeatedMessage.add(testRequiredUninitialized);\n    final List<int> buffer = message.writeToBuffer();\n\n    expect(\n      () => TestRequiredForeign.fromBuffer(buffer).check(),\n      // NOTE: error message differs from Java in that\n      // fields are referenced using Dart fieldnames r.t.\n      // proto field names.\n      throwsA(\n        isA<StateError>().having(\n          (p0) => p0.message,\n          'message',\n          'Message missing required fields: '\n              'optionalMessage.a, '\n              'optionalMessage.b, '\n              'optionalMessage.c, '\n              'repeatedMessage[0].a, '\n              'repeatedMessage[0].b, '\n              'repeatedMessage[0].c, '\n              'repeatedMessage[1].a, '\n              'repeatedMessage[1].b, '\n              'repeatedMessage[1].c',\n        ),\n      ),\n    );\n  });\n\n  test('testClearField', () {\n    int fieldNo;\n    final message = TestAllTypes();\n\n    // Singular field with no default.\n    fieldNo = 1;\n    expect(message.hasField(fieldNo), isFalse);\n    expect(message.getField(fieldNo), 0);\n    message.clearField(fieldNo);\n    expect(message.hasField(fieldNo), isFalse);\n    message.setField(fieldNo, 0);\n    expect(message.getField(fieldNo), 0);\n    expect(message.hasField(fieldNo), isTrue);\n    message.clearField(fieldNo);\n    expect(message.hasField(fieldNo), isFalse);\n\n    // Repeated field.\n    fieldNo = 31;\n    expect(message.hasField(fieldNo), isFalse);\n    message.getField(fieldNo).add(1);\n    expect(message.hasField(fieldNo), isTrue);\n\n    // Singular field with default.\n    fieldNo = 61;\n    expect(message.hasField(fieldNo), isFalse);\n    expect(message.getField(fieldNo), 41);\n    message.clearField(fieldNo);\n    message.setField(fieldNo, 41);\n    expect(message.hasField(fieldNo), isTrue);\n    message.setField(fieldNo, 42);\n    expect(message.hasField(fieldNo), isTrue);\n    expect(message.getField(fieldNo), 42);\n    message.clearField(fieldNo);\n    expect(message.hasField(fieldNo), isFalse);\n    expect(message.getField(fieldNo), 41);\n  });\n\n  test('JSON constants share structure', () {\n    const nestedTypeTag = 3;\n    var fields = TestAllTypes$json['$nestedTypeTag'] as List;\n    expect(fields[0], same(TestAllTypes_NestedMessage$json));\n\n    const enumTypeTag = 4;\n    fields = TestAllTypes$json['$enumTypeTag'] as List;\n    expect(fields[0], same(TestAllTypes_NestedEnum$json));\n  });\n\n  test('Can read JSON constant into DescriptorProto', () {\n    final d = DescriptorProto()..mergeFromJsonMap(TestAllTypes$json);\n    expect(d.name, 'TestAllTypes');\n    expect(d.field[0].name, 'optional_int32');\n    expect(d.nestedType[0].name, 'NestedMessage');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/mixin_test.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protoc_plugin/testing/mixins.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/mixins.pb.dart' as pb;\n\nvoid main() {\n  group('Proto with Mixin1', () {\n    late pb.Mixin1PB proto;\n\n    setUp(() {\n      proto = pb.Mixin1PB();\n    });\n\n    test('is a Mixin1', () {\n      expect(proto, isA<Mixin1>());\n      expect(proto, isNot(isA<Mixin2>()));\n    });\n\n    test('implements interface defined by mixins', () {\n      proto.interfaceString = 'test';\n      expect(proto.hasInterfaceString(), isTrue);\n      expect(proto.interfaceString, equals('test'));\n    });\n  });\n\n  group('Proto with Mixin2', () {\n    late pb.Mixin2PB proto;\n\n    setUp(() {\n      proto = pb.Mixin2PB();\n    });\n\n    test('overrides has method', () {\n      expect(proto.hasOverriddenHasMethod(), isFalse);\n      proto.overriddenHasMethod = 'test';\n\n      expect(proto.hasOverriddenHasMethod(), isTrue);\n    });\n  });\n\n  group('Proto without mixins', () {\n    late pb.NoMixinPB proto;\n\n    setUp(() {\n      proto = pb.NoMixinPB();\n    });\n\n    test('is neither Mixin1 nor Mixin2', () {\n      expect(proto is Mixin1, isFalse);\n      expect(proto is Mixin2, isFalse);\n    });\n  });\n\n  group('Proto with Mixin3', () {\n    late pb.Mixin3PB proto;\n\n    setUp(() {\n      proto = pb.Mixin3PB();\n    });\n\n    test('is both Mixin1 (from parent) and Mixin3', () {\n      expect(proto, isA<Mixin1>());\n      expect(proto, isNot(isA<Mixin2>()));\n      expect(proto, isA<Mixin3>());\n    });\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/names_test.dart",
    "content": "// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protoc_plugin/names.dart' as names;\nimport 'package:protoc_plugin/src/gen/dart_options.pb.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/dart_name.pb.dart' as pb;\nimport 'gen/json_name.pb.dart' as json_name;\n\nMatcher throwsMessage(String msg) => throwsA(_ToStringMatcher(equals(msg)));\n\nclass _ToStringMatcher extends CustomMatcher {\n  _ToStringMatcher(Matcher matcher)\n    : super('object where toString() returns', 'toString()', matcher);\n  @override\n  String featureValueOf(dynamic actual) => actual.toString();\n}\n\nvoid main() {\n  test('Can access a field that was renamed using dart_name option', () {\n    final msg = pb.DartName();\n    expect(msg.hasRenamedField(), false);\n    msg.renamedField = 'test';\n    expect(msg.hasRenamedField(), true);\n    expect(msg.renamedField, 'test');\n    msg.clearRenamedField();\n    expect(msg.hasRenamedField(), false);\n  });\n\n  test('Can access a filed started with underscore and digit', () {\n    final msg = pb.UnderscoreDigitName();\n    msg.x3d = 'one';\n    expect(msg.getField(1), 'one');\n  });\n\n  test('Can swap field names using dart_name option', () {\n    final msg = pb.SwapNames();\n    msg.first = 'one';\n    msg.second = 'two';\n    expect(msg.getField(1), 'two');\n    expect(msg.getField(2), 'one');\n  });\n\n  test(\"Can take another field's name using dart_name option\", () {\n    final msg = pb.TakeExistingName();\n    msg.first = 'one';\n    expect(msg.getField(2), 'one');\n    msg.first_1 = 'renamed';\n    expect(msg.getField(1), 'renamed');\n  });\n\n  test('Throws exception for dart_name option containing a space', () {\n    final descriptor =\n        DescriptorProto()\n          ..name = 'Example'\n          ..field.add(stringField('first', 1, 'hello world'));\n    expect(\n      () {\n        names.messageMemberNames(descriptor, '', <String>{});\n      },\n      throwsMessage(\n        'Example.first: dart_name option is invalid: '\n        \"'hello world' is not a valid Dart field name\",\n      ),\n    );\n  });\n\n  test('Throws exception for dart_name option set to reserved word', () {\n    final descriptor =\n        DescriptorProto()\n          ..name = 'Example'\n          ..field.add(stringField('first', 1, 'class'));\n    expect(\n      () {\n        names.messageMemberNames(descriptor, '', <String>{});\n      },\n      throwsMessage(\n        'Example.first: '\n        \"dart_name option is invalid: 'class' is already used\",\n      ),\n    );\n  });\n\n  test('Throws exception for duplicate dart_name options', () {\n    final descriptor =\n        DescriptorProto()\n          ..name = 'Example'\n          ..field.addAll([\n            stringField('first', 1, 'renamed'),\n            stringField('second', 2, 'renamed'),\n          ]);\n    expect(\n      () {\n        names.messageMemberNames(descriptor, '', <String>{});\n      },\n      throwsMessage(\n        'Example.second: '\n        \"dart_name option is invalid: 'renamed' is already used\",\n      ),\n    );\n  });\n\n  test('message classes renamed to avoid Function keyword', () {\n    pb.Function_().fun = 'renamed';\n    pb.Function__().fun1 = 'also renamed';\n  });\n\n  test('disambiguateName', () {\n    Iterable<String> oneTwoThree() sync* {\n      yield* ['_one', '_two', '_three'];\n    }\n\n    {\n      final used = {'moo'};\n      expect(names.disambiguateName('foo', used, oneTwoThree()), 'foo');\n      expect(used, {'moo', 'foo'});\n    }\n    {\n      final used = {'foo'};\n      expect(names.disambiguateName('foo', used, oneTwoThree()), 'foo_one');\n      expect(used, {'foo', 'foo_one'});\n    }\n    {\n      final used = {'foo', 'foo_one'};\n      expect(names.disambiguateName('foo', used, oneTwoThree()), 'foo_two');\n      expect(used, {'foo', 'foo_one', 'foo_two'});\n    }\n\n    {\n      List<String> variants(String s) {\n        return ['a_$s', 'b_$s'];\n      }\n\n      final used = {'a_foo', 'b_foo_one'};\n      expect(\n        names.disambiguateName(\n          'foo',\n          used,\n          oneTwoThree(),\n          generateVariants: variants,\n        ),\n        'foo_two',\n      );\n      expect(used, {'a_foo', 'b_foo_one', 'a_foo_two', 'b_foo_two'});\n    }\n  });\n\n  test('avoidInitialUnderscore', () {\n    expect(names.avoidInitialUnderscore('foo'), 'foo');\n    expect(names.avoidInitialUnderscore('foo_'), 'foo_');\n    expect(names.avoidInitialUnderscore('_foo'), 'foo_');\n    expect(names.avoidInitialUnderscore('__foo'), 'foo__');\n    expect(names.avoidInitialUnderscore('_6E'), 'x6E_');\n    expect(names.avoidInitialUnderscore('__6E'), 'x6E__');\n  });\n\n  test('legalDartIdentifier', () {\n    expect(names.legalDartIdentifier('foo'), 'foo');\n    expect(names.legalDartIdentifier('_foo'), '_foo');\n    expect(names.legalDartIdentifier('-foo'), '_foo');\n    expect(names.legalDartIdentifier('foo.\\$a{b}c(d)e_'), 'foo_\\$a_b_c_d_e_');\n  });\n\n  test('defaultSuffixes', () {\n    expect(names.defaultSuffixes().take(5).toList(), [\n      '_',\n      '_0',\n      '_1',\n      '_2',\n      '_3',\n    ]);\n  });\n\n  test('oneof names no disambiguation', () {\n    final oneofDescriptor = oneofField('foo');\n    final descriptor =\n        DescriptorProto()\n          ..name = 'Parent'\n          ..field.addAll([stringFieldOneof('first', 1, 0)])\n          ..oneofDecl.add(oneofDescriptor);\n\n    final usedTopLevelNames = <String>{};\n    final memberNames = names.messageMemberNames(\n      descriptor,\n      'Parent',\n      usedTopLevelNames,\n    );\n\n    expect(usedTopLevelNames.length, 1);\n    expect(usedTopLevelNames, {'Parent_Foo'});\n    expect(memberNames.oneofNames.length, 1);\n    final oneof = memberNames.oneofNames[0];\n    expect(oneof.descriptor, oneofDescriptor);\n    expect(oneof.index, 0);\n    expect(oneof.oneofEnumName, 'Parent_Foo');\n    expect(oneof.byTagMapName, '_Parent_FooByTag');\n    expect(oneof.whichOneofMethodName, 'whichFoo');\n    expect(oneof.clearMethodName, 'clearFoo');\n  });\n\n  test('oneof names disambiguate method names', () {\n    final oneofDescriptor = oneofField('foo');\n    final descriptor =\n        DescriptorProto()\n          ..name = 'Parent'\n          ..field.addAll([stringFieldOneof('first', 1, 0)])\n          ..oneofDecl.add(oneofDescriptor);\n\n    final usedTopLevelNames = <String>{};\n    final memberNames = names.messageMemberNames(\n      descriptor,\n      'Parent',\n      usedTopLevelNames,\n      reserved: ['clearFoo'],\n    );\n\n    expect(usedTopLevelNames.length, 1);\n    expect(usedTopLevelNames, {'Parent_Foo'});\n    expect(memberNames.oneofNames.length, 1);\n    final oneof = memberNames.oneofNames[0];\n    expect(oneof.descriptor, oneofDescriptor);\n    expect(oneof.index, 0);\n    expect(oneof.oneofEnumName, 'Parent_Foo');\n    expect(oneof.byTagMapName, '_Parent_FooByTag');\n    expect(oneof.whichOneofMethodName, 'whichFoo_');\n    expect(oneof.clearMethodName, 'clearFoo_');\n  });\n\n  test('oneof names disambiguate top level name', () {\n    final oneofDescriptor = oneofField('foo');\n    final descriptor =\n        DescriptorProto()\n          ..name = 'Parent'\n          ..field.addAll([stringFieldOneof('first', 1, 0)])\n          ..oneofDecl.add(oneofDescriptor);\n\n    final usedTopLevelNames = {'Parent_Foo'};\n    final memberNames = names.messageMemberNames(\n      descriptor,\n      'Parent',\n      usedTopLevelNames,\n    );\n\n    expect(usedTopLevelNames.length, 2);\n    expect(usedTopLevelNames, {'Parent_Foo', 'Parent_Foo_'});\n    expect(memberNames.oneofNames.length, 1);\n    final oneof = memberNames.oneofNames[0];\n    expect(oneof.descriptor, oneofDescriptor);\n    expect(oneof.index, 0);\n    expect(oneof.oneofEnumName, 'Parent_Foo_');\n    expect(oneof.byTagMapName, '_Parent_Foo_ByTag');\n    expect(oneof.whichOneofMethodName, 'whichFoo');\n    expect(oneof.clearMethodName, 'clearFoo');\n  });\n\n  test('The field name is the json_name as given by protoc', () {\n    expect(json_name.JsonNamedMessage().getTagNumber('barName'), 1);\n  });\n\n  test('The proto name is set correctly', () {\n    expect(\n      json_name.JsonNamedMessage().info_.byName['barName']!.protoName,\n      'foo_name',\n    );\n  });\n\n  test('Invalid characters are escaped from json_name', () {\n    expect(json_name.JsonNamedMessage().getTagNumber('\\$name'), 2);\n  });\n}\n\nFieldDescriptorProto stringField(String name, int number, String dartName) {\n  return FieldDescriptorProto()\n    ..name = name\n    ..number = number\n    ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n    ..type = FieldDescriptorProto_Type.TYPE_STRING\n    ..options = (FieldOptions()..setExtension(Dart_options.dartName, dartName));\n}\n\nFieldDescriptorProto stringFieldOneof(String name, int number, int oneofIndex) {\n  return FieldDescriptorProto()\n    ..name = name\n    ..number = number\n    ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL\n    ..type = FieldDescriptorProto_Type.TYPE_STRING\n    ..oneofIndex = oneofIndex;\n}\n\nOneofDescriptorProto oneofField(String name) {\n  return OneofDescriptorProto()..name = name;\n}\n"
  },
  {
    "path": "protoc_plugin/test/omit_enum_names_test.dart",
    "content": "// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\n\n@pragma('dart2js:noInline')\nString constant() => 'SHOULD_BE_PRESENT';\n\nFuture<void> main() async {\n  test('enum name available depending on environment', () {\n    expect(\n      ForeignEnum.FOREIGN_FOO.name,\n      const bool.fromEnvironment('protobuf.omit_enum_names')\n          ? ''\n          : 'FOREIGN_FOO',\n    );\n    expect(\n      ForeignEnum.FOREIGN_FOO.toString(),\n      const bool.fromEnvironment('protobuf.omit_enum_names')\n          ? '4'\n          : 'FOREIGN_FOO',\n    );\n    expect(constant(), 'SHOULD_BE_PRESENT');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/omit_field_names_test.dart",
    "content": "// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\n\n@pragma('dart2js:noInline')\nString constant() => 'SHOULD_BE_PRESENT';\n\nFuture<void> main() async {\n  test('field name available depending on environment', () {\n    final proto = TestAllTypes()..optionalForeignMessage = ForeignMessage();\n\n    expect(\n      proto.toString(),\n      const bool.fromEnvironment('protobuf.omit_field_names')\n          ? '19: {\\n}\\n'\n          : 'optionalForeignMessage: {\\n}\\n',\n    );\n    expect(constant(), 'SHOULD_BE_PRESENT');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/omit_message_names_test.dart",
    "content": "// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\n\n@pragma('dart2js:noInline')\nString constant() => 'SHOULD_BE_PRESENT';\n\nFuture<void> main() async {\n  test('message name available depending on environment', () {\n    expect(\n      TestAllTypes_NestedMessage().info_.qualifiedMessageName,\n      const bool.fromEnvironment('protobuf.omit_message_names')\n          ? ''\n          : 'proto2_unittest.TestAllTypes.NestedMessage',\n    );\n    expect(constant(), 'SHOULD_BE_PRESENT');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/oneof_test.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/oneof.pb.dart';\n\nvoid main() {\n  test('empty oneof', () {\n    final foo = Foo();\n    expectOneofNotSet(foo);\n  });\n\n  test('set oneof', () {\n    final foo = Foo();\n    foo.first = 'oneof';\n    expectFirstSet(foo);\n\n    foo.second = 1;\n    expectSecondSet(foo);\n\n    foo.third = true;\n    expect(foo.whichOneofField(), Foo_OneofField.third);\n    expect(foo.hasFirst(), false);\n    expect(foo.first, '');\n    expect(foo.hasSecond(), false);\n    expect(foo.second, 0);\n    expect(foo.hasThird(), true);\n    expect(foo.third, true);\n    expect(foo.hasFourth(), false);\n    expect(foo.fourth, []);\n    expect(foo.hasIndex(), false);\n    expect(foo.index, Bar());\n    expect(foo.hasValues(), false);\n    expect(foo.values, EnumType.DEFAULT);\n\n    foo.fourth = [1, 2];\n    expect(foo.whichOneofField(), Foo_OneofField.fourth);\n    expect(foo.hasFirst(), false);\n    expect(foo.first, '');\n    expect(foo.hasSecond(), false);\n    expect(foo.second, 0);\n    expect(foo.hasThird(), false);\n    expect(foo.third, false);\n    expect(foo.hasFourth(), true);\n    expect(foo.fourth, [1, 2]);\n    expect(foo.hasIndex(), false);\n    expect(foo.index, Bar());\n    expect(foo.hasValues(), false);\n    expect(foo.values, EnumType.DEFAULT);\n\n    foo.index = Bar()..i = 1;\n    expect(foo.whichOneofField(), Foo_OneofField.index_);\n    expect(foo.hasFirst(), false);\n    expect(foo.first, '');\n    expect(foo.hasSecond(), false);\n    expect(foo.second, 0);\n    expect(foo.hasThird(), false);\n    expect(foo.third, false);\n    expect(foo.hasFourth(), false);\n    expect(foo.fourth, []);\n    expect(foo.hasIndex(), true);\n    expect(foo.index, Bar()..i = 1);\n    expect(foo.hasValues(), false);\n    expect(foo.values, EnumType.DEFAULT);\n\n    foo.values = EnumType.A;\n    expect(foo.whichOneofField(), Foo_OneofField.values_);\n    expect(foo.hasFirst(), false);\n    expect(foo.first, '');\n    expect(foo.hasSecond(), false);\n    expect(foo.second, 0);\n    expect(foo.hasThird(), false);\n    expect(foo.third, false);\n    expect(foo.hasFourth(), false);\n    expect(foo.fourth, []);\n    expect(foo.hasIndex(), false);\n    expect(foo.index, Bar());\n    expect(foo.hasValues(), true);\n    expect(foo.values, EnumType.A);\n  });\n\n  test('set and clear oneof', () {\n    final foo = Foo()..first = 'oneof';\n    expectFirstSet(foo);\n\n    foo.clearOneofField();\n    expectOneofNotSet(foo);\n\n    foo.first = 'oneof';\n    expectFirstSet(foo);\n\n    foo.clearFirst();\n    expectOneofNotSet(foo);\n\n    foo.first = 'oneof';\n    expectFirstSet(foo);\n\n    foo.clear();\n    expectOneofNotSet(foo);\n  });\n\n  test('serialize and parse oneof', () {\n    var foo = Foo()..first = 'oneof';\n    expectFirstSet(foo);\n\n    foo = Foo.fromBuffer(foo.writeToBuffer());\n    expectFirstSet(foo);\n  });\n\n  test('JSON serialize and parse oneof', () {\n    var foo = Foo()..second = 1;\n    expectSecondSet(foo);\n\n    foo = Foo.fromJson(foo.writeToJson());\n    expect(foo.whichOneofField(), Foo_OneofField.second);\n    expectSecondSet(foo);\n  });\n\n  test('serialize and parse concat oneof', () {\n    final foo1 = Foo()..first = 'oneof';\n    expectFirstSet(foo1);\n\n    final foo2 = Foo()..second = 1;\n    expectSecondSet(foo2);\n\n    final concat = [...foo1.writeToBuffer(), ...foo2.writeToBuffer()];\n    expectSecondSet(Foo.fromBuffer(concat));\n  });\n\n  test('JSON serialize and parse concat oneof', () {\n    final foo1 = Foo()..first = 'oneof';\n    expectFirstSet(foo1);\n\n    final foo2 = Foo()..second = 1;\n    expectSecondSet(foo2);\n\n    final jsonConcat =\n        '${foo2.writeToJson().substring(0, foo2.writeToJson().length - 1)}, '\n        '${foo1.writeToJson().substring(1)}';\n\n    final decoded = Foo.fromJson(jsonConcat);\n\n    // It's unclear how to handle the input `{5:..., 1:...}` in this format. In\n    // the browsers we want to use the browser's JSON decoder, for performance.\n    // However numeric properties in JS objects are always iterated in ascending\n    // order, so that makes `5` override the previous oneof value, regardless of\n    // the orders of keys in the JSON string. In the backends that have their\n    // own map types (VM and Wasm) the key that comes later override the\n    // previous one.\n    if (identical(1.0, 1)) {\n      // In JS: '5' comes last during object key iteration.\n      expectSecondSet(decoded);\n    } else {\n      // In VM and Wasm: '1' comes last during object iteration.\n      expectFirstSet(decoded);\n    }\n  });\n\n  test('set and clear second oneof field', () {\n    final foo = Foo();\n    expectOneofNotSet(foo);\n\n    foo.red = 'r';\n    expect(foo.whichColors(), Foo_Colors.red);\n    expect(foo.hasRed(), true);\n    expect(foo.red, 'r');\n    expect(foo.hasGreen(), false);\n    expect(foo.green, '');\n\n    foo.green = 'g';\n    expect(foo.whichColors(), Foo_Colors.green);\n    expect(foo.hasRed(), false);\n    expect(foo.red, '');\n    expect(foo.hasGreen(), true);\n    expect(foo.green, 'g');\n  });\n\n  test('copyWith preserves oneof state', () {\n    final foo = Foo();\n    expectOneofNotSet(foo);\n    final copy1 = foo.deepCopy().freeze().rebuild((_) {}) as Foo;\n    expectOneofNotSet(copy1);\n    foo.first = 'oneof';\n    expectFirstSet(foo);\n    final copy2 = foo.deepCopy();\n    expectFirstSet(copy2);\n  });\n\n  test('oneof semantics is preserved when using ensure method', () {\n    final foo = Foo();\n    foo.first = 'oneof';\n    expectFirstSet(foo);\n    foo.ensureIndex();\n    expect(foo.hasFirst(), false);\n    expect(foo.first, '');\n    expect(foo.whichOneofField(), Foo_OneofField.index_);\n    expect(foo.hasIndex(), true);\n    expect(foo.index, Bar());\n  });\n}\n\nvoid expectSecondSet(Foo foo) {\n  expect(foo.whichOneofField(), Foo_OneofField.second);\n  expect(foo.hasFirst(), false);\n  expect(foo.first, '');\n  expect(foo.hasSecond(), true);\n  expect(foo.second, 1);\n  expect(foo.hasThird(), false);\n  expect(foo.third, false);\n  expect(foo.hasFourth(), false);\n  expect(foo.fourth, []);\n  expect(foo.hasIndex(), false);\n  expect(foo.index, Bar());\n  expect(foo.hasValues(), false);\n  expect(foo.values, EnumType.DEFAULT);\n}\n\nvoid expectFirstSet(Foo foo) {\n  expect(foo.whichOneofField(), Foo_OneofField.first);\n  expect(foo.hasFirst(), true);\n  expect(foo.first, 'oneof');\n  expect(foo.hasSecond(), false);\n  expect(foo.second, 0);\n  expect(foo.hasThird(), false);\n  expect(foo.third, false);\n  expect(foo.hasFourth(), false);\n  expect(foo.fourth, []);\n  expect(foo.hasIndex(), false);\n  expect(foo.index, Bar());\n  expect(foo.hasValues(), false);\n  expect(foo.values, EnumType.DEFAULT);\n}\n\nvoid expectOneofNotSet(Foo foo) {\n  expect(foo.whichOneofField(), Foo_OneofField.notSet);\n  expect(foo.hasFirst(), false);\n  expect(foo.first, '');\n  expect(foo.hasSecond(), false);\n  expect(foo.second, 0);\n  expect(foo.hasThird(), false);\n  expect(foo.third, false);\n  expect(foo.hasFourth(), false);\n  expect(foo.fourth, []);\n  expect(foo.hasIndex(), false);\n  expect(foo.index, Bar());\n  expect(foo.hasValues(), false);\n  expect(foo.values, EnumType.DEFAULT);\n\n  expect(foo.whichColors(), Foo_Colors.notSet);\n  expect(foo.hasRed(), false);\n  expect(foo.red, '');\n  expect(foo.hasGreen(), false);\n  expect(foo.green, '');\n}\n"
  },
  {
    "path": "protoc_plugin/test/proto3_json_test.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert' show jsonEncode;\nimport 'dart:core' hide Duration;\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf/protobuf.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/any.pb.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/duration.pb.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/empty.pb.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/field_mask.pb.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/struct.pb.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/timestamp.pb.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/wrappers.pb.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/entity.pb.dart';\nimport 'gen/enum_name.pb.dart';\nimport 'gen/google/protobuf/unittest.pb.dart';\nimport 'gen/google/protobuf/unittest_well_known_types.pb.dart';\nimport 'gen/map_field.pb.dart';\nimport 'gen/nested_any.pb.dart';\nimport 'gen/oneof.pb.dart';\nimport 'oneof_test.dart';\nimport 'src/test_util.dart';\n\nfinal testAllTypesJson = {\n  'optionalInt32': 101,\n  'optionalInt64': '102',\n  'optionalUint32': 103,\n  'optionalUint64': '104',\n  'optionalSint32': 105,\n  'optionalSint64': '106',\n  'optionalFixed32': 107,\n  'optionalFixed64': '108',\n  'optionalSfixed32': 109,\n  'optionalSfixed64': '110',\n  'optionalFloat': 111.0,\n  'optionalDouble': 112.0,\n  'optionalBool': true,\n  'optionalString': '115',\n  'optionalBytes': 'MTE2',\n  'optionalgroup': {'a': 117},\n  'optionalNestedMessage': {'bb': 118},\n  'optionalForeignMessage': {'c': 119},\n  'optionalImportMessage': {'d': 120},\n  'optionalNestedEnum': 'BAZ',\n  'optionalForeignEnum': 'FOREIGN_BAZ',\n  'optionalImportEnum': 'IMPORT_BAZ',\n  'optionalStringPiece': '124',\n  'optionalCord': '125',\n  'repeatedInt32': [201, 301],\n  'repeatedInt64': ['202', '302'],\n  'repeatedUint32': [203, 303],\n  'repeatedUint64': ['204', '304'],\n  'repeatedSint32': [205, 305],\n  'repeatedSint64': ['206', '306'],\n  'repeatedFixed32': [207, 307],\n  'repeatedFixed64': ['208', '308'],\n  'repeatedSfixed32': [209, 309],\n  'repeatedSfixed64': ['210', '310'],\n  'repeatedFloat': [211.0, 311.0],\n  'repeatedDouble': [212.0, 312.0],\n  'repeatedBool': [true, false],\n  'repeatedString': ['215', '315'],\n  'repeatedBytes': ['MjE2', 'MzE2'],\n  'repeatedgroup': [\n    {'a': 217},\n    {'a': 317},\n  ],\n  'repeatedNestedMessage': [\n    {'bb': 218},\n    {'bb': 318},\n  ],\n  'repeatedForeignMessage': [\n    {'c': 219},\n    {'c': 319},\n  ],\n  'repeatedImportMessage': [\n    {'d': 220},\n    {'d': 320},\n  ],\n  'repeatedNestedEnum': ['BAR', 'BAZ'],\n  'repeatedForeignEnum': ['FOREIGN_BAR', 'FOREIGN_BAZ'],\n  'repeatedImportEnum': ['IMPORT_BAR', 'IMPORT_BAZ'],\n  'repeatedStringPiece': ['224', '324'],\n  'repeatedCord': ['225', '325'],\n  'defaultInt32': 401,\n  'defaultInt64': '402',\n  'defaultUint32': 403,\n  'defaultUint64': '404',\n  'defaultSint32': 405,\n  'defaultSint64': '406',\n  'defaultFixed32': 407,\n  'defaultFixed64': '408',\n  'defaultSfixed32': 409,\n  'defaultSfixed64': '410',\n  'defaultFloat': 411.0,\n  'defaultDouble': 412.0,\n  'defaultBool': false,\n  'defaultString': '415',\n  'defaultBytes': 'NDE2',\n  'defaultNestedEnum': 'FOO',\n  'defaultForeignEnum': 'FOREIGN_FOO',\n  'defaultImportEnum': 'IMPORT_FOO',\n  'defaultStringPiece': '424',\n  'defaultCord': '425',\n};\n\nvoid main() {\n  test('toProto3Json works', () {\n    final proto =\n        TopEntity()\n          ..id = Int64(1)\n          ..stringValue = 'foo'\n          ..strings.addAll(['test', 'repeated', 'field'])\n          ..anyValue = Any.pack(\n            SubEntity()\n              ..id = Int64(4)\n              ..anyValue = Any.pack(SubSubEntity()..id = Int64(5)),\n          )\n          ..sub =\n              (SubEntity()\n                ..id = Int64(2)\n                ..subSub = (SubSubEntity()..id = Int64(3)));\n    final typeRegistry = TypeRegistry([SubEntity(), SubSubEntity()]);\n    final json = proto.toProto3Json(typeRegistry: typeRegistry);\n    expect(\n      proto ==\n          (TopEntity()..mergeFromProto3Json(json, typeRegistry: typeRegistry)),\n      true,\n    );\n  });\n\n  group('encode', () {\n    test('testOutput', () {\n      expect(getAllSet().toProto3Json(), testAllTypesJson);\n    });\n\n    test('testFrozenOutput', () {\n      expect(getAllSet().freeze().toProto3Json(), testAllTypesJson);\n    });\n\n    test('testUnsignedOutput', () {\n      final message = TestAllTypes();\n      // These values are selected because they are large enough to set the sign bit.\n      message.optionalUint64 = Int64.parseHex('f0000000ffff0000');\n      message.optionalFixed64 = Int64.parseHex('f0000000ffff0001');\n\n      expect(message.toProto3Json(), {\n        'optionalUint64': '17293822573397606400',\n        'optionalFixed64': '-1152921500311945215',\n      });\n    });\n\n    test('doubles', () {\n      void testValue(double value, Object expected) {\n        final message =\n            TestAllTypes()\n              ..defaultFloat = value\n              ..defaultDouble = value;\n        expect(\n          (message.toProto3Json() as Map)['defaultDouble'],\n          equals(expected),\n        );\n      }\n\n      testValue(-0.0, -0.0);\n      testValue(0.0, 0);\n      testValue(1.0, 1);\n      testValue(-1.0, -1);\n      testValue(double.nan, 'NaN');\n      testValue(double.infinity, 'Infinity');\n      testValue(double.negativeInfinity, '-Infinity');\n    });\n\n    test('map value', () {\n      final message =\n          TestMap()\n            ..int32ToInt32Field[32] = 32\n            ..int32ToStringField[0] = 'foo'\n            ..int32ToStringField[1] = 'bar'\n            ..int32ToBytesField[-1] = [1, 2, 3]\n            ..int32ToEnumField[1] = TestMap_EnumValue.BAZ\n            ..int32ToMessageField[21] =\n                (TestMap_MessageValue()\n                  ..value = 2\n                  ..secondValue = 3)\n            ..stringToInt32Field['key'] = -1\n            ..uint32ToInt32Field[0] = 0\n            ..int64ToInt32Field[Int64.ZERO] = 0\n            ..int64ToInt32Field[Int64.ONE] = 1\n            ..int64ToInt32Field[-Int64.ONE] = -1\n            ..int64ToInt32Field[Int64.MIN_VALUE] = -2\n            ..int64ToInt32Field[Int64.MAX_VALUE] = 2\n            ..uint64ToInt32Field[Int64.MIN_VALUE] = -2;\n      expect(message.toProto3Json(), {\n        'int32ToInt32Field': {'32': 32},\n        'int32ToStringField': {'0': 'foo', '1': 'bar'},\n        'int32ToBytesField': {'-1': 'AQID'},\n        'int32ToEnumField': {'1': 'BAZ'},\n        'int32ToMessageField': {\n          '21': {'value': 2, 'secondValue': 3},\n        },\n        'stringToInt32Field': {'key': -1},\n        'uint32ToInt32Field': {'0': 0},\n        'int64ToInt32Field': {\n          '0': 0,\n          '1': 1,\n          '-1': -1,\n          '-9223372036854775808': -2,\n          '9223372036854775807': 2,\n        },\n        'uint64ToInt32Field': {'9223372036854775808': -2},\n      });\n    });\n\n    test('Timestamp', () {\n      expect(\n        Timestamp.fromDateTime(\n          DateTime.utc(1969, 7, 20, 20, 17, 40),\n        ).toProto3Json(),\n        '1969-07-20T20:17:40Z',\n      );\n      expect(\n        Timestamp.fromDateTime(DateTime.utc(9)).toProto3Json(),\n        '0009-01-01T00:00:00Z',\n      );\n      expect(\n        Timestamp.fromDateTime(DateTime.utc(420)).toProto3Json(),\n        '0420-01-01T00:00:00Z',\n      );\n      expect(\n        () => Timestamp.fromDateTime(DateTime.utc(42001)).toProto3Json(),\n        throwsA(TypeMatcher<ArgumentError>()),\n      );\n      expect(\n        () => Timestamp.fromDateTime(DateTime.utc(-1)).toProto3Json(),\n        throwsA(TypeMatcher<ArgumentError>()),\n      );\n      expect(\n        Timestamp.fromDateTime(\n          DateTime.utc(9999, 12, 31, 23, 59, 59),\n        ).toProto3Json(),\n        '9999-12-31T23:59:59Z',\n      );\n\n      expect(\n        (Timestamp()..nanos = 1).toProto3Json(),\n        '1970-01-01T00:00:00.000000001Z',\n      );\n      expect(\n        (Timestamp()..nanos = 8200000).toProto3Json(),\n        '1970-01-01T00:00:00.008200Z',\n      );\n      expect(\n        () => (Timestamp()..nanos = -8200000).toProto3Json(),\n        throwsA(TypeMatcher<ArgumentError>()),\n      );\n      expect(\n        () => (Timestamp()..nanos = -8200000).toProto3Json(),\n        throwsA(TypeMatcher<ArgumentError>()),\n      );\n      expect(\n        () => (Timestamp()..nanos = 1000000000).toProto3Json(),\n        throwsA(TypeMatcher<ArgumentError>()),\n      );\n    });\n\n    test('Duration', () {\n      expect(\n        (Duration()\n              ..seconds = Int64(0)\n              ..nanos = 0)\n            .toProto3Json(),\n        '0s',\n      );\n      expect(\n        (Duration()\n              ..seconds = Int64(10)\n              ..nanos = 0)\n            .toProto3Json(),\n        '10s',\n      );\n      expect(\n        (Duration()\n              ..seconds = Int64(10)\n              ..nanos = 1)\n            .toProto3Json(),\n        '10.000000001s',\n      );\n      expect(\n        (Duration()\n              ..seconds = Int64(10)\n              ..nanos = 10)\n            .toProto3Json(),\n        '10.00000001s',\n      );\n      expect(\n        (Duration()\n              ..seconds = -Int64(1)\n              ..nanos = -99000)\n            .toProto3Json(),\n        '-1.000099s',\n      );\n    });\n\n    test('Any', () {\n      expect(\n        Any.pack(\n          TestAllTypes()..optionalFixed64 = Int64(100),\n        ).toProto3Json(typeRegistry: TypeRegistry([TestAllTypes()])),\n        {\n          '@type': 'type.googleapis.com/proto2_unittest.TestAllTypes',\n          'optionalFixed64': '100',\n        },\n      );\n      expect(\n        Any.pack(\n          Timestamp.fromDateTime(DateTime.utc(1969, 7, 20, 20, 17)),\n        ).toProto3Json(typeRegistry: TypeRegistry([Timestamp()])),\n        {\n          '@type': 'type.googleapis.com/google.protobuf.Timestamp',\n          'value': '1969-07-20T20:17:00Z',\n        },\n      );\n      expect(\n        () =>\n            Any.pack(\n              Timestamp.fromDateTime(DateTime(1969, 7, 20, 20, 17)),\n            ).toProto3Json(),\n        throwsA(TypeMatcher<ArgumentError>()),\n      );\n    });\n\n    test('Nested Any', () {\n      final packedOne = Any.pack(AnyMessage1()..value = '1');\n      final packedTwo = Any.pack(\n        AnyMessage2()\n          ..value = '2'\n          ..anyField2 = packedOne,\n      );\n      expect(\n        packedTwo.toProto3Json(\n          typeRegistry: TypeRegistry([AnyMessage1(), AnyMessage2()]),\n        ),\n        {\n          'anyField2': {\n            'value': '1',\n            '@type': 'type.googleapis.com/nested_any.AnyMessage1',\n          },\n          'value': '2',\n          '@type': 'type.googleapis.com/nested_any.AnyMessage2',\n        },\n      );\n    });\n\n    test('struct', () {\n      final s =\n          Struct()\n            ..fields['null'] = (Value()..nullValue = NullValue.NULL_VALUE)\n            ..fields['number'] = (Value()..numberValue = 22.3)\n            ..fields['string'] = (Value()..stringValue = 'foo')\n            ..fields['bool'] = (Value()..boolValue = false)\n            ..fields['struct'] =\n                (Value()\n                  ..structValue =\n                      (Struct()..fields['a'] = (Value()..numberValue = 0.0)))\n            ..fields['list'] =\n                (Value()\n                  ..listValue =\n                      (ListValue()\n                        ..values.addAll([\n                          Value()..structValue = Struct(),\n                          Value()..listValue = ListValue(),\n                          Value()..stringValue = 'why',\n                        ])));\n      expect(s.toProto3Json(), {\n        'null': null,\n        'number': 22.3,\n        'string': 'foo',\n        'bool': false,\n        'struct': {'a': 0},\n        'list': [{}, [], 'why'],\n      });\n      expect(\n        () => Value().toProto3Json(),\n        throwsA(TypeMatcher<ArgumentError>()),\n      );\n    });\n\n    test('empty', () {\n      expect(Empty().toProto3Json(), {});\n    });\n\n    test('wrapper types', () {\n      final t =\n          TestWellKnownTypes()\n            ..doubleValueField = (DoubleValue()..value = 10.01)\n            ..floatValueField = (FloatValue()..value = 3.0)\n            ..int64ValueField = (Int64Value()..value = Int64.MIN_VALUE)\n            ..uint64ValueField = (UInt64Value()..value = Int64.MIN_VALUE)\n            ..int32ValueField = (Int32Value()..value = 101)\n            ..uint32ValueField = (UInt32Value()..value = 102)\n            ..boolValueField = (BoolValue()..value = false)\n            ..stringValueField = (StringValue()..value = 'Pop')\n            ..bytesValueField = (BytesValue()..value = [8, 9, 10]);\n      expect(t.toProto3Json(), {\n        'doubleValueField': 10.01,\n        'floatValueField': 3,\n        'int64ValueField': '-9223372036854775808',\n        'uint64ValueField': '9223372036854775808',\n        'int32ValueField': 101,\n        'uint32ValueField': 102,\n        'boolValueField': false,\n        'stringValueField': 'Pop',\n        'bytesValueField': 'CAkK',\n      });\n    });\n\n    test('field mask', () {\n      expect(FieldMask().toProto3Json(), '');\n      expect(\n        (FieldMask()..paths.addAll(['foo_bar_baz'])).toProto3Json(),\n        'fooBarBaz',\n      );\n      expect(\n        (FieldMask()..paths.addAll(['foo_bar', 'zop'])).toProto3Json(),\n        'fooBar,zop',\n      );\n      expect(\n        () => (FieldMask()..paths.add('foo_3_bar')).toProto3Json(),\n        throwsA(TypeMatcher<ArgumentError>()),\n      );\n      expect(\n        () => (FieldMask()..paths.add('foo__bar')).toProto3Json(),\n        throwsA(TypeMatcher<ArgumentError>()),\n      );\n      expect(\n        () => (FieldMask()..paths.add('fooBar')).toProto3Json(),\n        throwsA(TypeMatcher<ArgumentError>()),\n      );\n    });\n  });\n\n  group('decode', () {\n    Matcher parseFailure(List<String> expectedPath) => throwsA(\n      predicate((e) {\n        if (e is FormatException) {\n          final pathExpression =\n              RegExp(r'root(\\[\"[^\"]*\"]*\\])*').firstMatch(e.message)![0]!;\n          final actualPath =\n              RegExp(\n                r'\\[\"([^\"]*)\"\\]',\n              ).allMatches(pathExpression).map((match) => match[1]).toList();\n          if (actualPath.length != expectedPath.length) return false;\n          for (var i = 0; i < actualPath.length; i++) {\n            if (actualPath[i] != expectedPath[i]) return false;\n          }\n          return true;\n        }\n        return false;\n      }),\n    );\n\n    test('Nulls', () {\n      final decoded =\n          TestAllTypes()..mergeFromProto3Json({'defaultString': null});\n      expect(decoded, TestAllTypes());\n    });\n    test('decode TestAllTypes', () {\n      final decoded = TestAllTypes()..mergeFromProto3Json(testAllTypesJson);\n      expect(decoded, getAllSet());\n    });\n    test('Type expectations', () {\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({1: 1}),\n        parseFailure([]),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalBool': 1}),\n        parseFailure(['optionalBool']),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalBytes': 1}),\n        parseFailure(['optionalBytes']),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalBytes': '()'}),\n        parseFailure(['optionalBytes']),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalInt32': '()'}),\n        parseFailure(['optionalInt32']),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalInt32': 20.4}),\n        parseFailure(['optionalInt32']),\n      );\n      expect(\n        TestAllTypes()..mergeFromProto3Json({'optionalInt32': '28'}),\n        TestAllTypes()..optionalInt32 = 28,\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalInt64': '()'}),\n        parseFailure(['optionalInt64']),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalInt64': 20.4}),\n        parseFailure(['optionalInt64']),\n      );\n      expect(\n        TestAllTypes()..mergeFromProto3Json({'optionalInt64': '28'}),\n        TestAllTypes()..optionalInt64 = Int64(28),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalDouble': 'a'}),\n        parseFailure(['optionalDouble']),\n      );\n      expect(\n        TestAllTypes()..mergeFromProto3Json({'optionalDouble': 28}),\n        TestAllTypes()..optionalDouble = 28.0,\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalDouble': 'a'}),\n        parseFailure(['optionalDouble']),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalString': 11}),\n        parseFailure(['optionalString']),\n      );\n      expect(\n        () =>\n            TestAllTypes()..mergeFromProto3Json({'optionalEnum': 'wrongValue'}),\n        parseFailure(['optionalEnum']),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalEnum': []}),\n        parseFailure(['optionalEnum']),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'optionalNestedEnum': 100}),\n        parseFailure(['optionalNestedEnum']),\n      );\n      expect(\n        TestAllTypes()..mergeFromProto3Json({'optionalNestedEnum': 1}),\n        TestAllTypes()\n          ..optionalNestedEnum = TestAllTypes_NestedEnum.valueOf(1)!,\n      );\n      expect(\n        TestAllTypes()..mergeFromProto3Json({'repeatedBool': null}),\n        TestAllTypes(),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json({'repeatedBool': 100}),\n        parseFailure(['repeatedBool']),\n      );\n      expect(\n        () =>\n            TestAllTypes()..mergeFromProto3Json({\n              'repeatedBool': [true, false, 1],\n            }),\n        parseFailure(['repeatedBool', '2']),\n      );\n      expect(\n        () => TestAllTypes()..mergeFromProto3Json(Object()),\n        parseFailure([]),\n      );\n    });\n\n    test('merging behavior', () {\n      final t =\n          TestAllTypes()\n            ..optionalForeignMessage = ForeignMessage()\n            ..repeatedForeignMessage.add(ForeignMessage()..c = 1);\n      final f = t.optionalForeignMessage;\n      expect(\n        t..mergeFromProto3Json({\n          'repeatedForeignMessage': [\n            {'c': 2},\n          ],\n          'optionalForeignMessage': {'c': 2},\n        }),\n        TestAllTypes()\n          ..optionalForeignMessage = (ForeignMessage()..c = 2)\n          ..repeatedForeignMessage.addAll([\n            ForeignMessage()..c = 1,\n            ForeignMessage()..c = 2,\n          ]),\n      );\n      expect(f, ForeignMessage()..c = 2);\n    });\n\n    test('names_with_underscores', () {\n      expect(\n        TestAllTypes()..mergeFromProto3Json({\n          'optional_foreign_message': {'c': 1},\n        }),\n        TestAllTypes()..optionalForeignMessage = (ForeignMessage()..c = 1),\n      );\n      expect(\n        () =>\n            TestAllTypes()..mergeFromProto3Json({\n              'optional_foreign_message': {'c': 1},\n            }, supportNamesWithUnderscores: false),\n        parseFailure(['optional_foreign_message']),\n      );\n    });\n    test('permissive enums', () {\n      final sparseB = SparseEnumMessage()..sparseEnum = TestSparseEnum.SPARSE_B;\n      expect(\n        SparseEnumMessage()..mergeFromProto3Json({'sparseEnum': 'SPARSE_B'}),\n        sparseB,\n      );\n      expect(\n        () =>\n            SparseEnumMessage()\n              ..mergeFromProto3Json({'sparseEnum': 'sparse_b'}),\n        parseFailure(['sparseEnum']),\n      );\n      expect(\n        () =>\n            SparseEnumMessage()\n              ..mergeFromProto3Json({'sparseEnum': 'SPARSE-B'}),\n        parseFailure(['sparseEnum']),\n      );\n      expect(\n        () =>\n            SparseEnumMessage()\n              ..mergeFromProto3Json({'sparseEnum': 'sPaRsE_b'}),\n        parseFailure(['sparseEnum']),\n      );\n      expect(\n        () =>\n            SparseEnumMessage()..mergeFromProto3Json({'sparseEnum': 'sparseB'}),\n        parseFailure(['sparseEnum']),\n      );\n      expect(\n        () =>\n            SparseEnumMessage()..mergeFromProto3Json({'sparseEnum': 'spaRSEB'}),\n        parseFailure(['sparseEnum']),\n      );\n\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'x'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'X'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'x_'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'X_'}),\n        parseFailure(['a']),\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': '_x'}),\n        AMessage()..a = A.x_,\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': '_X'}),\n        parseFailure(['a']),\n      );\n\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'y'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'Y'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'y_'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'Y_'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': '_y'}),\n        parseFailure(['a']),\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': '_Y'}),\n        AMessage()..a = A.Y_,\n      );\n\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'z'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'Z'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'z_'}),\n        parseFailure(['a']),\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'Z_'}),\n        AMessage()..a = A.Z_,\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': '_z'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': '_Z'}),\n        parseFailure(['a']),\n      );\n\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'a_a'}),\n        parseFailure(['a']),\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'A_A'}),\n        AMessage()..a = A.A_A,\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'aA'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'AA'}),\n        parseFailure(['a']),\n      );\n\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'b_b'}),\n        AMessage()..a = A.b_b,\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'B_B'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'bB'}),\n        parseFailure(['a']),\n      );\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'BB'}),\n        parseFailure(['a']),\n      );\n\n      expect(\n        () => AMessage()..mergeFromProto3Json({'a': 'CAMEL_CASE'}),\n        parseFailure(['a']),\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'camelCase'}),\n        AMessage()..a = A.camelCase,\n      );\n\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'x'}, permissiveEnums: true),\n        AMessage()..a = A.x_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'X'}, permissiveEnums: true),\n        AMessage()..a = A.x_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'x_'}, permissiveEnums: true),\n        AMessage()..a = A.x_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'X_'}, permissiveEnums: true),\n        AMessage()..a = A.x_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': '_x'}, permissiveEnums: true),\n        AMessage()..a = A.x_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': '_X'}, permissiveEnums: true),\n        AMessage()..a = A.x_,\n      );\n\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'y'}, permissiveEnums: true),\n        AMessage()..a = A.Y_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'Y'}, permissiveEnums: true),\n        AMessage()..a = A.Y_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'y_'}, permissiveEnums: true),\n        AMessage()..a = A.Y_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'Y_'}, permissiveEnums: true),\n        AMessage()..a = A.Y_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': '_y'}, permissiveEnums: true),\n        AMessage()..a = A.Y_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': '_Y'}, permissiveEnums: true),\n        AMessage()..a = A.Y_,\n      );\n\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'z'}, permissiveEnums: true),\n        AMessage()..a = A.Z_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'Z'}, permissiveEnums: true),\n        AMessage()..a = A.Z_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'z_'}, permissiveEnums: true),\n        AMessage()..a = A.Z_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'Z_'}, permissiveEnums: true),\n        AMessage()..a = A.Z_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': '_z'}, permissiveEnums: true),\n        AMessage()..a = A.Z_,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': '_Z'}, permissiveEnums: true),\n        AMessage()..a = A.Z_,\n      );\n\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'a_a'}, permissiveEnums: true),\n        AMessage()..a = A.A_A,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'A_A'}, permissiveEnums: true),\n        AMessage()..a = A.A_A,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'aA'}, permissiveEnums: true),\n        AMessage()..a = A.A_A,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'AA'}, permissiveEnums: true),\n        AMessage()..a = A.A_A,\n      );\n\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'b_b'}, permissiveEnums: true),\n        AMessage()..a = A.b_b,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'B_B'}, permissiveEnums: true),\n        AMessage()..a = A.b_b,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'bB'}, permissiveEnums: true),\n        AMessage()..a = A.b_b,\n      );\n      expect(\n        AMessage()..mergeFromProto3Json({'a': 'BB'}, permissiveEnums: true),\n        AMessage()..a = A.b_b,\n      );\n\n      expect(\n        AMessage()\n          ..mergeFromProto3Json({'a': 'CAMEL_CASE'}, permissiveEnums: true),\n        AMessage()..a = A.camelCase,\n      );\n      expect(\n        AMessage()\n          ..mergeFromProto3Json({'a': 'camelCase'}, permissiveEnums: true),\n        AMessage()..a = A.camelCase,\n      );\n\n      expect(\n        SparseEnumMessage()..mergeFromProto3Json({\n          'sparseEnum': 'sparse_b',\n        }, permissiveEnums: true),\n        sparseB,\n      );\n      expect(\n        SparseEnumMessage()..mergeFromProto3Json({\n          'sparseEnum': 'SPARSE-B',\n        }, permissiveEnums: true),\n        sparseB,\n      );\n      expect(\n        SparseEnumMessage()..mergeFromProto3Json({\n          'sparseEnum': 'S-P-A-R-S-E-B',\n        }, permissiveEnums: true),\n        sparseB,\n      );\n      expect(\n        SparseEnumMessage()..mergeFromProto3Json({\n          'sparseEnum': 'sPaRsE_b',\n        }, permissiveEnums: true),\n        sparseB,\n      );\n      expect(\n        SparseEnumMessage()..mergeFromProto3Json({\n          'sparseEnum': 'sparseB',\n        }, permissiveEnums: true),\n        sparseB,\n      );\n      expect(\n        SparseEnumMessage()..mergeFromProto3Json({\n          'sparseEnum': 'spaRSEB',\n        }, permissiveEnums: true),\n        sparseB,\n      );\n      expect(\n        () =>\n            Any()..mergeFromProto3Json({\n              '@type': 'type.googleapis.com/proto2_unittest.SparseEnumMessage',\n              'sparseEnum': 'SPARSEB',\n            }, typeRegistry: TypeRegistry([SparseEnumMessage()])),\n        parseFailure(['sparseEnum']),\n      );\n      expect(\n        Any()..mergeFromProto3Json(\n          {\n            '@type': 'type.googleapis.com/proto2_unittest.SparseEnumMessage',\n            'sparseEnum': 'SPARSEB',\n          },\n          typeRegistry: TypeRegistry([SparseEnumMessage()]),\n          permissiveEnums: true,\n        ),\n        Any.pack(sparseB),\n        reason: 'Parsing options are passed through Any messages',\n      );\n    });\n\n    test('map value', () {\n      final expected =\n          TestMap()\n            ..int32ToInt32Field[32] = 32\n            ..int32ToStringField[0] = 'foo'\n            ..int32ToStringField[1] = 'bar'\n            ..int32ToBytesField[-1] = [1, 2, 3]\n            ..int32ToEnumField[1] = TestMap_EnumValue.BAZ\n            ..int32ToMessageField[21] =\n                (TestMap_MessageValue()\n                  ..value = 2\n                  ..secondValue = 3)\n            ..stringToInt32Field['key'] = -1\n            ..uint32ToInt32Field[0] = 0\n            ..int64ToInt32Field[Int64.ZERO] = 0\n            ..int64ToInt32Field[Int64.ONE] = 1\n            ..int64ToInt32Field[-Int64.ONE] = -1\n            ..int64ToInt32Field[Int64.MIN_VALUE] = -2\n            ..int64ToInt32Field[Int64.MAX_VALUE] = 2\n            ..uint64ToInt32Field[Int64.MIN_VALUE] = -2;\n      expect(\n        TestMap()..mergeFromProto3Json({\n          'int32ToInt32Field': {'32': 32},\n          'int32ToStringField': {'0': 'foo', '1': 'bar'},\n          'int32ToBytesField': {'-1': 'AQID'},\n          'int32ToEnumField': {'1': 'BAZ'},\n          'int32ToMessageField': {\n            '21': {'value': 2, 'secondValue': 3},\n          },\n          'stringToInt32Field': {'key': -1},\n          'uint32ToInt32Field': {'0': 0},\n          'int64ToInt32Field': {\n            '0': 0,\n            '1': 1,\n            '-1': -1,\n            '-9223372036854775808': -2,\n            '9223372036854775807': 2,\n          },\n          'uint64ToInt32Field': {'9223372036854775808': -2},\n        }),\n        expected,\n      );\n      expect(() => TestMap()..mergeFromProto3Json([]), parseFailure([]));\n      expect(\n        () =>\n            TestMap()..mergeFromProto3Json({\n              'int32ToInt32Field': {'32': 'a'},\n            }),\n        parseFailure(['int32ToInt32Field', '32']),\n      );\n      expect(\n        () =>\n            TestMap()..mergeFromProto3Json({\n              'int32ToInt32Field': {'2147483648': 1},\n            }),\n        parseFailure(['int32ToInt32Field', '2147483648']),\n      );\n      expect(\n        () =>\n            TestMap()..mergeFromProto3Json({\n              'uint32ToInt32Field': {'-32': 21},\n            }),\n        parseFailure(['uint32ToInt32Field', '-32']),\n      );\n      expect(\n        () =>\n            TestMap()..mergeFromProto3Json({\n              'uint32ToInt32Field': {'4294967296': 21},\n            }),\n        parseFailure(['uint32ToInt32Field', '4294967296']),\n      );\n      expect(\n        TestMap()..mergeFromProto3Json({\n          'int32ToInt32Field': <dynamic, dynamic>{'2': 21},\n        }),\n        TestMap()..int32ToInt32Field[2] = 21,\n      );\n    });\n    test('ints', () {\n      expect(\n        (TestAllTypes()\n              ..mergeFromProto3Json({'optionalUint64': '17293822573397606400'}))\n            .optionalUint64,\n        Int64.parseHex('f0000000ffff0000'),\n      );\n\n      // TODO(sigurdm): This should throw.\n      expect(\n        TestAllTypes()..mergeFromProto3Json({'optionalUint64': '-1'}),\n        TestAllTypes()\n          ..optionalUint64 = Int64.fromBytes([\n            255,\n            255,\n            255,\n            255,\n            255,\n            255,\n            255,\n            255,\n          ]),\n      );\n\n      void expectRoundTrip(String typeName, int value) {\n        final t = TestAllTypes()..mergeFromProto3Json({typeName: value});\n        expect(t.getField(t.getTagNumber(typeName)!), value);\n        final t2 =\n            TestAllTypes()..mergeFromProto3Json({typeName: value.toString()});\n        expect(t2.getField(t2.getTagNumber(typeName)!), value);\n      }\n\n      void expectFailure(String typeName, int value) {\n        expect(\n          () => TestAllTypes()..mergeFromProto3Json({typeName: -2147483649}),\n          parseFailure([typeName]),\n        );\n      }\n\n      void expectSigned32(String typeName) {\n        expectRoundTrip(typeName, 1);\n        expectRoundTrip(typeName, 0);\n        expectRoundTrip(typeName, 2147483647);\n        expectRoundTrip(typeName, -2147483648);\n        expectFailure(typeName, 2147483648);\n        expectFailure(typeName, -2147483649);\n      }\n\n      void expectUnsigned32(String typeName) {\n        expectRoundTrip(typeName, 1);\n        expectRoundTrip(typeName, 0);\n        expectRoundTrip(typeName, 0xFFFFFFFF);\n        expectFailure(typeName, 0xFFFFFFFF + 1);\n        expectFailure(typeName, -1);\n      }\n\n      expectUnsigned32('optionalFixed32');\n      expectUnsigned32('optionalUint32');\n      expectSigned32('optionalInt32');\n      expectSigned32('optionalSfixed32');\n      expectSigned32('optionalSint32');\n    });\n\n    test('unknown fields', () {\n      expect(\n        () =>\n            TestAllTypes()\n              ..mergeFromProto3Json({'myOwnInventedField': 'blahblahblah'}),\n        throwsA(const TypeMatcher<FormatException>()),\n      );\n      expect(\n        () =>\n            TestAllTypes()..mergeFromProto3Json({\n              'myOwnInventedField': 'blahblahblah',\n            }, ignoreUnknownFields: false),\n        throwsA(const TypeMatcher<FormatException>()),\n      );\n      final t =\n          TestAllTypes()..mergeFromProto3Json({\n            'myOwnInventedField': 'blahblahblah',\n          }, ignoreUnknownFields: true);\n      expect(t, TestAllTypes());\n      expect(t.unknownFields.isEmpty, isTrue);\n    });\n\n    test('Any', () {\n      final m1 =\n          Any()..mergeFromProto3Json({\n            '@type': 'type.googleapis.com/proto2_unittest.TestAllTypes',\n            'optionalFixed64': '100',\n          }, typeRegistry: TypeRegistry([TestAllTypes()]));\n\n      expect(m1.unpackInto(TestAllTypes()).optionalFixed64, Int64(100));\n\n      final m2 =\n          Any()..mergeFromProto3Json({\n            '@type': 'type.googleapis.com/google.protobuf.Timestamp',\n            'value': '1969-07-20T19:17:00Z',\n          }, typeRegistry: TypeRegistry([Timestamp()]));\n\n      expect(\n        m2.unpackInto(Timestamp()).toDateTime().millisecondsSinceEpoch,\n        DateTime.utc(1969, 7, 20, 19, 17).millisecondsSinceEpoch,\n      );\n\n      expect(\n        () =>\n            Any()..mergeFromProto3Json({\n              '@type': 'type.googleapis.com/google.protobuf.Timestamp',\n              'value': '1969-07-20T19:17:00Z',\n            }),\n        parseFailure([]),\n      );\n\n      expect(\n        () =>\n            Any()..mergeFromProto3Json({\n              '@type': 11,\n              'value': '1969-07-20T19:17:00Z',\n            }),\n        parseFailure([]),\n      );\n\n      final m3 =\n          Any()..mergeFromProto3Json({\n            '@type': 'type.googleapis.com/google.protobuf.Any',\n            'value': {\n              '@type': 'type.googleapis.com/google.protobuf.Timestamp',\n              'value': '1969-07-20T19:17:00Z',\n            },\n          }, typeRegistry: TypeRegistry([Timestamp(), Any()]));\n\n      expect(\n        m3\n            .unpackInto(Any())\n            .unpackInto(Timestamp())\n            .toDateTime()\n            .millisecondsSinceEpoch,\n        DateTime.utc(1969, 7, 20, 19, 17).millisecondsSinceEpoch,\n      );\n\n      // TODO(sigurdm): We would ideally like the error path to be\n      // ['value', 'value'].\n      expect(\n        () =>\n            Any()..mergeFromProto3Json({\n              '@type': 'type.googleapis.com/google.protobuf.Any',\n              'value': {\n                '@type': 'type.googleapis.com/google.protobuf.Timestamp',\n                'value': '1969',\n              },\n            }, typeRegistry: TypeRegistry([Timestamp(), Any()])),\n        parseFailure([]),\n      );\n\n      expect(() => Any()..mergeFromProto3Json('@type'), parseFailure([]));\n\n      expect(() => Any()..mergeFromProto3Json(11), parseFailure([]));\n\n      expect(() => Any()..mergeFromProto3Json(['@type']), parseFailure([]));\n\n      expect(\n        () =>\n            Any()..mergeFromProto3Json({\n              '@type': 'type.googleapis.com/google.protobuf.Timestamp',\n              'value': '1969-07-20T19:17:00Z',\n            }),\n        parseFailure([]),\n      );\n    });\n\n    test('Nested Any', () {\n      final m1 =\n          Any()..mergeFromProto3Json({\n            'anyField2': {\n              'value': '1',\n              '@type': 'type.googleapis.com/nested_any.AnyMessage1',\n            },\n            'value': '2',\n            '@type': 'type.googleapis.com/nested_any.AnyMessage2',\n          }, typeRegistry: TypeRegistry([AnyMessage1(), AnyMessage2()]));\n\n      expect(\n        m1.unpackInto(AnyMessage2()).anyField2.unpackInto(AnyMessage1()).value,\n        '1',\n      );\n    });\n\n    test('Duration', () {\n      expect(\n        Duration()..mergeFromProto3Json('0s'),\n        Duration()\n          ..seconds = Int64(0)\n          ..nanos = 0,\n      );\n      expect(\n        Duration()..mergeFromProto3Json('10s'),\n        Duration()\n          ..seconds = Int64(10)\n          ..nanos = 0,\n      );\n      expect(\n        Duration()..mergeFromProto3Json('10.000000001s'),\n        Duration()\n          ..seconds = Int64(10)\n          ..nanos = 1,\n      );\n      expect(\n        Duration()..mergeFromProto3Json('10.00000001s'),\n        Duration()\n          ..seconds = Int64(10)\n          ..nanos = 10,\n      );\n      expect(\n        Duration()..mergeFromProto3Json('-1.000099s'),\n        Duration()\n          ..seconds = -Int64(1)\n          ..nanos = -99000,\n      );\n\n      expect(\n        Duration()..mergeFromProto3Json('0.s'),\n        Duration()\n          ..seconds = Int64(0)\n          ..nanos = 0,\n      );\n      expect(\n        Duration()..mergeFromProto3Json('.0s'),\n        Duration()\n          ..seconds = Int64(0)\n          ..nanos = 0,\n      );\n      expect(\n        Duration()..mergeFromProto3Json('.5s'),\n        Duration()\n          ..seconds = Int64(0)\n          ..nanos = 500000000,\n      );\n      expect(\n        Duration()..mergeFromProto3Json('5.s'),\n        Duration()\n          ..seconds = Int64(5)\n          ..nanos = 0,\n      );\n      expect(\n        Duration()..mergeFromProto3Json('.s'),\n        Duration()\n          ..seconds = Int64(0)\n          ..nanos = 0,\n      );\n      expect(() => Duration()..mergeFromProto3Json('0.5'), parseFailure([]));\n      expect(() => Duration()..mergeFromProto3Json(100), parseFailure([]));\n    });\n\n    test('Timestamp', () {\n      expect(\n        Timestamp()..mergeFromProto3Json('1969-07-20T20:17:00Z'),\n        Timestamp.fromDateTime(DateTime.utc(1969, 7, 20, 20, 17)),\n      );\n      expect(\n        Timestamp()..mergeFromProto3Json('1970-01-01T00:00:00.000000001Z'),\n        Timestamp()\n          ..seconds = Int64(0)\n          ..nanos = 1,\n      );\n      expect(\n        Timestamp()..mergeFromProto3Json('1970-01-01T00:00:00.008200Z'),\n        Timestamp.fromDateTime(DateTime.utc(1970))..nanos = 8200000,\n      );\n      expect(\n        Timestamp()..mergeFromProto3Json('1970-01-01T18:50:00-04:00'),\n        Timestamp()\n          ..seconds = Int64(82200)\n          ..nanos = 0,\n      );\n      expect(\n        Timestamp()..mergeFromProto3Json('1970-01-01T18:50:00+04:00'),\n        Timestamp()\n          ..seconds = Int64(53400)\n          ..nanos = 0,\n      );\n      expect(\n        Timestamp()..mergeFromProto3Json('1970-01-01T18:50:00.0001+04:00'),\n        Timestamp()\n          ..seconds = Int64(53400)\n          ..nanos = 100000,\n      );\n      expect(\n        () =>\n            Timestamp()..mergeFromProto3Json('1970-01-01T00:00:00.0000000001Z'),\n        parseFailure([]),\n      );\n      expect(() => Timestamp()..mergeFromProto3Json(1970), parseFailure([]));\n      expect(\n        () => Timestamp()..mergeFromProto3Json('1970-01-01T18:50:00.'),\n        parseFailure([]),\n      );\n    });\n\n    test('wrapper types', () {\n      expect(\n        TestWellKnownTypes()..mergeFromProto3Json({\n          'doubleValueField': 10.01,\n          'floatValueField': 3,\n          'int64ValueField': '-9223372036854775808',\n          'uint64ValueField': '9223372036854775808',\n          'int32ValueField': 101,\n          'uint32ValueField': 102,\n          'boolValueField': false,\n          'stringValueField': 'Pop',\n          'bytesValueField': 'CAkK',\n        }),\n        TestWellKnownTypes()\n          ..doubleValueField = (DoubleValue()..value = 10.01)\n          ..floatValueField = (FloatValue()..value = 3.0)\n          ..int64ValueField = (Int64Value()..value = Int64.MIN_VALUE)\n          ..uint64ValueField = (UInt64Value()..value = Int64.MIN_VALUE)\n          ..int32ValueField = (Int32Value()..value = 101)\n          ..uint32ValueField = (UInt32Value()..value = 102)\n          ..boolValueField = (BoolValue()..value = false)\n          ..stringValueField = (StringValue()..value = 'Pop')\n          ..bytesValueField = (BytesValue()..value = [8, 9, 10]),\n      );\n\n      expect(\n        TestWellKnownTypes()..mergeFromProto3Json({\n          'doubleValueField': '10.01',\n          'floatValueField': '3',\n          'int64ValueField': -854775808,\n          'uint64ValueField': 854775808,\n          'int32ValueField': '101',\n          'uint32ValueField': '102',\n          'boolValueField': false,\n        }),\n        TestWellKnownTypes()\n          ..doubleValueField = (DoubleValue()..value = 10.01)\n          ..floatValueField = (FloatValue()..value = 3.0)\n          ..int64ValueField = (Int64Value()..value = Int64(-854775808))\n          ..uint64ValueField = (UInt64Value()..value = Int64(854775808))\n          ..int32ValueField = (Int32Value()..value = 101)\n          ..uint32ValueField = (UInt32Value()..value = 102)\n          ..boolValueField = (BoolValue()..value = false),\n        reason: 'alternative representations should be accepted',\n      );\n\n      expect(\n        () =>\n            TestWellKnownTypes()\n              ..mergeFromProto3Json({'doubleValueField': 'a'}),\n        parseFailure(['doubleValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()..mergeFromProto3Json({'doubleValueField': {}}),\n        parseFailure(['doubleValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()..mergeFromProto3Json({'floatValueField': 'a'}),\n        parseFailure(['floatValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()..mergeFromProto3Json({'floatValueField': {}}),\n        parseFailure(['floatValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()..mergeFromProto3Json({'int64ValueField': 'a'}),\n        parseFailure(['int64ValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()..mergeFromProto3Json({'int64ValueField': {}}),\n        parseFailure(['int64ValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()\n              ..mergeFromProto3Json({'int64ValueField': 10.4}),\n        parseFailure(['int64ValueField']),\n      );\n\n      expect(\n        () =>\n            TestWellKnownTypes()\n              ..mergeFromProto3Json({'uint64ValueField': 'a'}),\n        parseFailure(['uint64ValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()\n              ..mergeFromProto3Json({'uint64ValueField': 10.4}),\n        parseFailure(['uint64ValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()..mergeFromProto3Json({'int32ValueField': 'a'}),\n        parseFailure(['int32ValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()\n              ..mergeFromProto3Json({'int32ValueField': 10.4}),\n        parseFailure(['int32ValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()\n              ..mergeFromProto3Json({'uint32ValueField': 'a'}),\n        parseFailure(['uint32ValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()\n              ..mergeFromProto3Json({'uint32ValueField': 10.4}),\n        parseFailure(['uint32ValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()\n              ..mergeFromProto3Json({'boolValueField': 'false'}),\n        parseFailure(['boolValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()..mergeFromProto3Json({'stringValueField': 22}),\n        parseFailure(['stringValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()..mergeFromProto3Json({'bytesValueField': 22}),\n        parseFailure(['bytesValueField']),\n      );\n      expect(\n        () =>\n            TestWellKnownTypes()\n              ..mergeFromProto3Json({'bytesValueField': '()'}),\n        parseFailure(['bytesValueField']),\n      );\n\n      expect(\n        TestWellKnownTypes()..mergeFromProto3Json({\n          'doubleValueField': null,\n          'floatValueField': null,\n          'int64ValueField': null,\n          'uint64ValueField': null,\n          'int32ValueField': null,\n          'uint32ValueField': null,\n          'boolValueField': null,\n          'stringValueField': null,\n          'bytesValueField': null,\n        }),\n        TestWellKnownTypes(),\n        reason:\n            'having fields of wrapper types set to null will return an '\n            'empty wrapper (with unset .value field)',\n      );\n    });\n\n    test('struct', () {\n      final f = {\n        'null': null,\n        'number': 22.3,\n        'string': 'foo',\n        'bool': false,\n        'struct': {'a': 0},\n        'list': [{}, [], 'why'],\n      };\n\n      final s =\n          Struct()\n            ..fields['null'] = (Value()..nullValue = NullValue.NULL_VALUE)\n            ..fields['number'] = (Value()..numberValue = 22.3)\n            ..fields['string'] = (Value()..stringValue = 'foo')\n            ..fields['bool'] = (Value()..boolValue = false)\n            ..fields['struct'] =\n                (Value()\n                  ..structValue =\n                      (Struct()..fields['a'] = (Value()..numberValue = 0.0)))\n            ..fields['list'] =\n                (Value()\n                  ..listValue =\n                      (ListValue()\n                        ..values.addAll([\n                          Value()..structValue = Struct(),\n                          Value()..listValue = ListValue(),\n                          Value()..stringValue = 'why',\n                        ])));\n      expect(Struct()..mergeFromProto3Json(f), s);\n\n      expect(\n        Struct()..mergeFromProto3Json(<dynamic, dynamic>{'a': 12}),\n        (Struct()..fields['a'] = (Value()..numberValue = 12.0)),\n        reason: 'Allow key type to be `dynamic`',\n      );\n\n      expect(\n        () => Struct()..mergeFromProto3Json({1: 2}),\n        parseFailure([]),\n        reason: 'Non-string key in JSON object literal',\n      );\n\n      expect(\n        () => Struct()..mergeFromProto3Json([]),\n        parseFailure([]),\n        reason: 'Non object literal',\n      );\n\n      expect(\n        () => Struct()..mergeFromProto3Json([]),\n        parseFailure([]),\n        reason: 'Non-string key in JSON object literal',\n      );\n\n      expect(\n        () => Value()..mergeFromProto3Json(Object()),\n        parseFailure([]),\n        reason: 'Non JSON value',\n      );\n\n      expect(\n        () => ListValue()..mergeFromProto3Json({}),\n        parseFailure([]),\n        reason: 'Non-list',\n      );\n    });\n\n    test('field mask', () {\n      expect(\n        TestWellKnownTypes()\n          ..mergeFromProto3Json({'fieldMaskField': 'foo,barBaz'}),\n        TestWellKnownTypes()\n          ..fieldMaskField = (FieldMask()..paths.addAll(['foo', 'bar_baz'])),\n      );\n      expect(\n        () => FieldMask()..mergeFromProto3Json('foo,bar_bar'),\n        parseFailure([]),\n      );\n\n      expect(FieldMask()..mergeFromProto3Json(''), FieldMask());\n      expect(() => FieldMask()..mergeFromProto3Json(12), parseFailure([]));\n    });\n\n    test('one-of', () {\n      expectFirstSet(Foo()..mergeFromProto3Json({'first': 'oneof'}));\n      expectSecondSet(Foo()..mergeFromProto3Json({'second': 1}));\n      expectOneofNotSet(Foo()..mergeFromProto3Json({}));\n    });\n  });\n\n  group('Convert Double', () {\n    test('With Decimal', () {\n      final json = {'optionalDouble': 1.2};\n      final proto = TestAllTypes()..optionalDouble = 1.2;\n      expect(TestAllTypes()..mergeFromProto3Json(json), proto);\n      expect(proto.toProto3Json(), json);\n    });\n\n    test('Whole Number', () {\n      final json = {'optionalDouble': 5};\n      final proto = TestAllTypes()..optionalDouble = 5.0;\n      expect(TestAllTypes()..mergeFromProto3Json(json), proto);\n      expect(proto.toProto3Json(), json);\n      expect(jsonEncode(proto.toProto3Json()), '{\"optionalDouble\":5}');\n    });\n\n    test('Infinity', () {\n      final json = {'optionalDouble': 'Infinity'};\n      final proto = TestAllTypes()..optionalDouble = double.infinity;\n      expect(TestAllTypes()..mergeFromProto3Json(json), proto);\n      expect(proto.toProto3Json(), json);\n    });\n\n    test('Negative Infinity', () {\n      final json = {'optionalDouble': '-Infinity'};\n      final proto = TestAllTypes()..optionalDouble = double.negativeInfinity;\n      expect(TestAllTypes()..mergeFromProto3Json(json), proto);\n      expect(proto.toProto3Json(), json);\n    });\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/proto3_optional_test.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:core' hide Duration;\n\nimport 'package:test/test.dart';\n\nimport 'gen/proto3_optional.pb.dart';\n\nvoid main() {\n  test('optional fields have presence', () {\n    final f = Foo();\n    expect(f.hasOptionalSubmessage(), isFalse);\n    f.optionalSubmessage = Submessage();\n    expect(f.hasOptionalSubmessage(), isTrue);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/protoc_options_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protoc_plugin/src/gen/google/protobuf/compiler/plugin.pb.dart';\nimport 'package:protoc_plugin/src/options.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('testValidGeneratorOptions', () {\n    void checkValid(String? parameter) {\n      final request = CodeGeneratorRequest();\n      if (parameter != null) request.parameter = parameter;\n      final response = CodeGeneratorResponse();\n      final options = parseGenerationOptions(request, response);\n      expect(options, TypeMatcher<GenerationOptions>());\n      expect(response.error, '');\n    }\n\n    checkValid(null);\n    checkValid('');\n    checkValid(',');\n    checkValid(',,,');\n    checkValid('  , , ,');\n  });\n\n  test('testInvalidGeneratorOptions', () {\n    void checkInvalid(String parameter) {\n      final request = CodeGeneratorRequest();\n      request.parameter = parameter;\n      final response = CodeGeneratorResponse();\n      final options = parseGenerationOptions(request, response);\n      expect(options, isNull);\n    }\n\n    checkInvalid('abc');\n    checkInvalid('abc,def');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/ExtensionEnumNameConflict.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage protobuf_unittest;\n\n// Cause a conflict with the auto-generated extension class.\nenum ExtensionEnumNameConflict {\n  UNKNOWN = 0;\n}\n\nmessage YetAnotherMessageToBeExtended {\n  extensions 1 to max;\n}\n\nextend YetAnotherMessageToBeExtended {\n  optional int32 enumConflictExtension = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/ExtensionNameConflict.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage protobuf_unittest;\n\n// Cause a conflict with the auto-generated extension class.\nmessage ExtensionNameConflict {\n}\n\nmessage AnotherMessageToBeExtended {\n  extensions 1 to max;\n}\n\nextend AnotherMessageToBeExtended {\n  optional int32 someExtension = 1;\n}\n\n"
  },
  {
    "path": "protoc_plugin/test/protos/_leading_underscores.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage _leading_underscores;\n\nmessage _A {\n  optional string _f = 1;\n  optional string f = 2;\n  extensions 3 to 4;\n  extend A {\n    optional int64 _q = 3;\n  }\n}\n\nmessage A_ {\n  optional string foo = 1;\n}\n\nmessage A {\n  optional string _f = 1;\n  optional string f = 2;\n  extensions 3 to 4;\n  optional _A b = 5;\n  optional _A _b = 6;\n  optional _A _c = 7;\n  optional _Enum _e = 8;\n  map<string, _A> _amap = 9;\n  repeated _A _r = 10;\n\n  oneof _colors {\n    string _red = 11;\n    string _green = 12;\n  }\n}\n\nextend _A {\n  optional int64 _p = 3;\n  optional int64 p = 4;\n}\n\nextend A {\n  optional int64 _q = 4;\n}\n\nenum _Enum {\n  _default = 0;\n  constant = 1;\n  _1digit = 2;\n}\n\nservice _service {\n  rpc _search (_A) returns (_A);\n  rpc search (_A) returns (_A);\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/custom_option.proto",
    "content": "// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage custom_option;\n\nimport \"google/protobuf/descriptor.proto\";\n\nextend google.protobuf.MessageOptions {\n  optional string my_option = 51234;\n}\n\nmessage MyMessage {\n  option (my_option) = \"Hello world!\";\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/custom_option_unlinked.proto",
    "content": "// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n// This file defines an option that is not linked into the test, to verify that\n// it ends up in unknown fields as expected.\nsyntax = \"proto2\";\n\npackage custom_option;\n\nimport \"google/protobuf/descriptor.proto\";\n\nextend google.protobuf.MessageOptions {\n  optional int32 unlinked_option = 51235;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/dart_name.proto",
    "content": "// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage dart_name;\n\nimport \"dart_options.proto\";\n\nmessage DartName {\n  optional string field = 1 [\n    (dart_options.dart_name) = \"renamedField\"\n  ];\n}\n\nmessage SwapNames {\n  optional string first = 1 [\n    (dart_options.dart_name) = \"second\"\n  ];\n  optional string second = 2 [\n    (dart_options.dart_name) = \"first\"\n  ];\n}\n\nmessage TakeExistingName {\n  optional string first = 1;\n  optional string second = 2 [\n    (dart_options.dart_name) = \"first\"\n  ];\n}\n\nmessage Function {\n  optional string fun = 1;\n}\n\nmessage Function_ {\n  optional string fun1 = 1;\n}\n\nmessage UnderscoreDigitName {\n  optional string _3d = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/default_value_escape.proto",
    "content": "// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage default_value_escape;\n\nmessage F {\n  optional string a = 1 [default = \"a\\nb\"];\n  optional string b = 2 [default = \"a'b\"];\n  optional string c = 3 [default = \"a\\\"b\"];\n  optional string d = 4 [default = \"a$b\"];\n  optional string e = 5 [default = \"a\\\\b\"];\n  optional string f = 6 [default = \"a\\0b\"];\n  optional string g = 7 [default = \"\\uD83C\\uDDFA\\uD83C\\uDDF8\"];\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/deprecations.proto",
    "content": "// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\n\npackage service2;\n\nservice Greeter {\n  option deprecated = true;\n\n  rpc SayHello (HelloRequest) returns (HelloReply) {\n    option deprecated = true;\n  }\n}\n\nmessage HelloRequest {\n  option deprecated = true;\n\n  string name = 1 [deprecated = true];\n}\n\nmessage HelloReply {\n  string message = 1;\n}\n\nenum A {\n  option deprecated = true;\n\n  A1 = 0 [deprecated = true];\n  A2 = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/doc_comments.proto",
    "content": "// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\n\npackage service1;\n\n// This is a service.\nservice Greeter {\n  // This is a service method.\n  rpc SayHello (HelloRequest) returns (HelloReply) {}\n}\n\n// This is a message.\nmessage HelloRequest {\n  // This is a message field.\n  string name = 1;\n}\n\nmessage HelloReply {\n  string message = 1;\n}\n\n// This is an enum.\nenum A {\n  // This is an enum variant.\n  A1 = 0;\n  // This is another enum variant.\n  A2 = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/duplicate_names_import.proto",
    "content": "// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage pkg;\n\nimport \"package1.proto\";\nimport \"package2.proto\";\nimport \"package3.proto\";\n\nmessage M {\n  optional pkg1.M m1 = 1;\n  optional pkg1.M.M m1_m = 2;\n  optional pkg1.pkg2.M m2 = 3;\n  optional pkg1.pkg2.M.M m2_m = 4;\n  optional pkg1_pkg2.M m3 = 5;\n  optional pkg1_pkg2.M.M m3_m = 6;\n}\n\nmessage M2 {\n  optional int32 pkg1 = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/entity.proto",
    "content": "// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage protobuf_unittest;\n\nimport \"google/protobuf/any.proto\";\n\nmessage TopEntity {\n  optional int64 id = 1;\n  optional string string_value = 2;\n  repeated string strings = 3;\n  optional SubEntity sub = 4;\n  optional google.protobuf.Any any_value = 5;\n}\n\nmessage SubEntity {\n  optional int64 id = 1;\n  optional string string_value = 2;\n  repeated string strings = 3;\n  optional SubSubEntity sub_sub = 4;\n  optional google.protobuf.Any any_value = 5;\n}\n\nmessage SubSubEntity {\n  optional int64 id = 1;\n  optional string string_value = 2;\n  repeated string strings = 3;\n}\n\nmessage BytesEntity {\n  optional bytes value = 1;\n  repeated bytes values = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/enum_extension.proto",
    "content": "// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage protobuf_unittest;\n\nmessage Extendable {\n  extensions 1 to max;\n}\n\nenum Animal {\n  CAT = 1;\n  DOG = 2;\n}\n\nextend Extendable {\n  optional Animal animal = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/enum_name.proto",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage enum.name;\n\n// Enum with non-standard value-names.\nenum A {\n  _x = 0;\n  _Y = 1;\n  Z_ = 2;\n  A_A = 4;\n  b_b = 5;\n  camelCase = 6;\n}\n\nmessage AMessage {\n  optional A a = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/enum_test.proto",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\n\nenum A {\n  X = 0;\n  Y = 1;\n}\n\nmessage Message {\n  A enum_field = 1;\n  map<int32, A> map_value_field = 2;\n  repeated A repeated_enum_field = 3;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/enums.proto",
    "content": "enum DenseEnum {\n    DENSE_ENUM_0 = 0;\n    DENSE_ENUM_1 = 1;\n    DENSE_ENUM_2 = 2;\n    DENSE_ENUM_3 = 3;\n    DENSE_ENUM_4 = 4;\n}\n\nenum DenseEnumOutOfOrder {\n    DENSE_ENUM_OOO_0 = 0;\n    DENSE_ENUM_OOO_2 = 2;\n    DENSE_ENUM_OOO_4 = 4;\n    DENSE_ENUM_OOO_3 = 3;\n    DENSE_ENUM_OOO_1 = 1;\n}\n\nenum SparseEnum {\n    SPARSE_ENUM_ZERO = 0;\n    SPARSE_ENUM_MIN_INT = -2147483648;\n    SPARSE_ENUM_1 = -1000000000;\n    SPARSE_ENUM_2 = -100000000;\n    SPARSE_ENUM_3 = -10000000;\n    SPARSE_ENUM_4 = -1000000;\n    SPARSE_ENUM_5 = -100000;\n    SPARSE_ENUM_6 = 100000;\n    SPARSE_ENUM_7 = 1000000;\n    SPARSE_ENUM_8 = 10000000;\n    SPARSE_ENUM_9 = 100000000;\n    SPARSE_ENUM_10 = 1000000000;\n    SPARSE_ENUM_MAX_INT = 2147483647;\n}\n\nenum SparseEnumOutOfOrder {\n    SPARSE_ENUM_OOO_ZERO = 0;\n    SPARSE_ENUM_OOO_1 = -1000000000;\n    SPARSE_ENUM_OOO_MAX_INT = 2147483647;\n    SPARSE_ENUM_OOO_4 = -1000000;\n    SPARSE_ENUM_OOO_6 = 100000;\n    SPARSE_ENUM_OOO_MIN_INT = -2147483648;\n    SPARSE_ENUM_OOO_7 = 1000000;\n    SPARSE_ENUM_OOO_5 = -100000;\n    SPARSE_ENUM_OOO_8 = 10000000;\n    SPARSE_ENUM_OOO_3 = -10000000;\n    SPARSE_ENUM_OOO_10 = 1000000000;\n    SPARSE_ENUM_OOO_2 = -100000000;\n    SPARSE_ENUM_OOO_9 = 100000000;\n}\n\nmessage MessageWithEnums {\n    repeated DenseEnum denseEnums = 1;\n    repeated DenseEnumOutOfOrder denseOutOfOrderEnums = 2;\n    repeated SparseEnum sparseEnums = 3;\n    repeated SparseEnumOutOfOrder sparseOutOfOrderEnums = 4;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/extend_unittest.proto",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage extend_unittest;\n\nimport \"google/protobuf/unittest.proto\";\n\nmessage Outer {\n  optional Inner inner = 1;\n  repeated Inner inners = 2;\n  map<int32, Inner> inner_map = 3;\n  map<string, string> string_map = 4;\n  extensions 5 to max;\n}\n\nextend Outer {\n  optional Inner extension_inner = 5;\n}\n\nmessage Inner {\n  optional string value = 1;\n  optional InnerMost inner_most = 2;\n  extensions 3 to max;\n}\n\nextend Inner {\n  optional string inner_extension_string = 3;\n}\n\nmessage InnerMost {\n  optional string value = 1;\n  extensions 2 to max;\n}\n\nextend InnerMost {\n  optional string inner_most_extension_string = 2;\n}\n\nextend proto2_unittest.TestAllExtensions {\n  optional Outer outer = 104;\n}\n\nextend Outer {\n    repeated string extension_repeated = 6;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/foo.proto",
    "content": "// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage foo;\n\nmessage Foo {\n}\n\nmessage Outer {\n  optional string value = 1;\n  repeated string strings = 2;\n  optional int64 id = 3;\n  optional Inner inner = 4;\n  repeated Inner inners = 5;\n  extensions 6 to 7;\n}\n\nmessage OuterWithMap {\n  map<int32, Inner> inner_map = 3;\n}\n\nmessage Inner {\n  optional string value = 1;\n  optional int64 id = 2;\n  repeated string strings = 3;\n  optional Inner inner = 4;\n  optional fixed32 count = 5;\n  optional uint32 count_uint32 = 6;\n}\n\nextend Outer {\n  optional Inner inner = 6;\n  repeated Inner inners = 7;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/google/protobuf/unittest.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file or at\n// https://developers.google.com/open-source/licenses/bsd\n\n// Author: kenton@google.com (Kenton Varda)\n//  Based on original Protocol Buffers design by\n//  Sanjay Ghemawat, Jeff Dean, and others.\n//\n// A proto file we will use for unit testing.\n//\n// LINT: ALLOW_GROUPS, LEGACY_NAMES\n\nedition = \"2023\";\n\n// We don't put this in a package within proto2 because we need to make sure\n// that the generated code doesn't depend on being in the proto2 namespace.\n// In test_util.h we do \"using namespace unittest = proto2_unittest\".\npackage proto2_unittest;\n\nimport \"google/protobuf/unittest_import.proto\";\n\noption features = {\n  enum_type: CLOSED\n  repeated_field_encoding: EXPANDED\n  utf8_validation: NONE\n};\n\n// Some generic_services option(s) added automatically.\n// See:  http://go/proto2-generic-services-default\noption cc_generic_services = true; // auto-added\noption java_generic_services = true; // auto-added\noption py_generic_services = true; // auto-added\noption cc_enable_arenas = true;\n\n// Protos optimized for SPEED use a strict superset of the generated code\n// of equivalent ones optimized for CODE_SIZE, so we should optimize all our\n// tests for speed unless explicitly testing code size optimization.\noption optimize_for = SPEED;\noption java_outer_classname = \"UnittestProto\";\n\n// This proto includes every type of field in both singular and repeated\n// forms.\nmessage TestAllTypes {\n  message NestedMessage {\n    // The field name \"b\" fails to compile in proto1 because it conflicts with\n    // a local variable named \"b\" in one of the generated methods.  Doh.\n    // This file needs to compile in proto1 to test backwards-compatibility.\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 1;\n    BAR = 2;\n    BAZ = 3;\n    NEG = -1; // Intentionally negative.\n  }\n\n  // Singular\n  int32 optional_int32 = 1;\n  int64 optional_int64 = 2;\n  uint32 optional_uint32 = 3;\n  uint64 optional_uint64 = 4;\n  sint32 optional_sint32 = 5;\n  sint64 optional_sint64 = 6;\n  fixed32 optional_fixed32 = 7;\n  fixed64 optional_fixed64 = 8;\n  sfixed32 optional_sfixed32 = 9;\n  sfixed64 optional_sfixed64 = 10;\n  float optional_float = 11;\n  double optional_double = 12;\n  bool optional_bool = 13;\n  string optional_string = 14;\n  bytes optional_bytes = 15;\n\n  message OptionalGroup {\n    int32 a = 17;\n  }\n\n  OptionalGroup optionalgroup = 16 [\n    features.message_encoding = DELIMITED\n  ];\n\n  NestedMessage optional_nested_message = 18;\n  ForeignMessage optional_foreign_message = 19;\n  proto2_unittest_import.ImportMessage optional_import_message = 20;\n  NestedEnum optional_nested_enum = 21;\n  ForeignEnum optional_foreign_enum = 22;\n  proto2_unittest_import.ImportEnum optional_import_enum = 23;\n  string optional_string_piece = 24 [\n    ctype = STRING_PIECE\n  ];\n\n  string optional_cord = 25 [\n    ctype = CORD\n  ];\n  bytes optional_bytes_cord = 86 [ctype=CORD];\n\n  // Defined in unittest_import_public.proto\n  proto2_unittest_import.PublicImportMessage optional_public_import_message = 26;\n  NestedMessage optional_lazy_message = 27 [\n    lazy = true\n  ];\n\n  NestedMessage optional_unverified_lazy_message = 28 [\n    unverified_lazy = true\n  ];\n\n  // Repeated\n  repeated int32 repeated_int32 = 31;\n  repeated int64 repeated_int64 = 32;\n  repeated uint32 repeated_uint32 = 33;\n  repeated uint64 repeated_uint64 = 34;\n  repeated sint32 repeated_sint32 = 35;\n  repeated sint64 repeated_sint64 = 36;\n  repeated fixed32 repeated_fixed32 = 37;\n  repeated fixed64 repeated_fixed64 = 38;\n  repeated sfixed32 repeated_sfixed32 = 39;\n  repeated sfixed64 repeated_sfixed64 = 40;\n  repeated float repeated_float = 41;\n  repeated double repeated_double = 42;\n  repeated bool repeated_bool = 43;\n  repeated string repeated_string = 44;\n  repeated bytes repeated_bytes = 45;\n\n  message RepeatedGroup {\n    int32 a = 47;\n  }\n\n  repeated RepeatedGroup repeatedgroup = 46 [\n    features.message_encoding = DELIMITED\n  ];\n\n  repeated NestedMessage repeated_nested_message = 48;\n  repeated ForeignMessage repeated_foreign_message = 49;\n  repeated proto2_unittest_import.ImportMessage repeated_import_message = 50;\n  repeated NestedEnum repeated_nested_enum = 51;\n  repeated ForeignEnum repeated_foreign_enum = 52;\n  repeated proto2_unittest_import.ImportEnum repeated_import_enum = 53;\n  repeated string repeated_string_piece = 54 [\n    ctype = STRING_PIECE\n  ];\n\n  repeated string repeated_cord = 55 [\n    ctype = CORD\n  ];\n\n  repeated NestedMessage repeated_lazy_message = 57 [\n    lazy = true\n  ];\n\n  // Singular with defaults\n  int32 default_int32 = 61 [\n    default = 41\n  ];\n\n  int64 default_int64 = 62 [\n    default = 42\n  ];\n\n  uint32 default_uint32 = 63 [\n    default = 43\n  ];\n\n  uint64 default_uint64 = 64 [\n    default = 44\n  ];\n\n  sint32 default_sint32 = 65 [\n    default = -45\n  ];\n\n  sint64 default_sint64 = 66 [\n    default = 46\n  ];\n\n  fixed32 default_fixed32 = 67 [\n    default = 47\n  ];\n\n  fixed64 default_fixed64 = 68 [\n    default = 48\n  ];\n\n  sfixed32 default_sfixed32 = 69 [\n    default = 49\n  ];\n\n  sfixed64 default_sfixed64 = 70 [\n    default = -50\n  ];\n\n  float default_float = 71 [\n    default = 51.5\n  ];\n\n  double default_double = 72 [\n    default = 5.2e4\n  ];\n\n  bool default_bool = 73 [\n    default = true\n  ];\n\n  string default_string = 74 [\n    default = \"hello\"\n  ];\n\n  bytes default_bytes = 75 [\n    default = \"world\"\n  ];\n\n  NestedEnum default_nested_enum = 81 [\n    default = BAR\n  ];\n\n  ForeignEnum default_foreign_enum = 82 [\n    default = FOREIGN_BAR\n  ];\n\n  proto2_unittest_import.ImportEnum default_import_enum = 83 [\n    default = IMPORT_BAR\n  ];\n\n  string default_string_piece = 84 [\n    ctype = STRING_PIECE,\n    default = \"abc\"\n  ];\n\n  string default_cord = 85 [\n    ctype = CORD,\n    default = \"123\"\n  ];\n\n  // For oneof test\n  oneof oneof_field {\n    uint32 oneof_uint32 = 111;\n    NestedMessage oneof_nested_message = 112;\n    string oneof_string = 113;\n    bytes oneof_bytes = 114;\n    string oneof_cord = 115 [\n      ctype = CORD\n    ];\n\n    string oneof_string_piece = 116 [\n      ctype = STRING_PIECE\n    ];\n\n    NestedMessage oneof_lazy_nested_message = 117 [\n      lazy = true\n    ];\n  }\n}\n\n// This proto includes a recursively nested message.\nmessage NestedTestAllTypes {\n  NestedTestAllTypes child = 1;\n  TestAllTypes payload = 2;\n  repeated NestedTestAllTypes repeated_child = 3;\n  NestedTestAllTypes lazy_child = 4 [\n    lazy = true\n  ];\n\n  TestAllTypes eager_child = 5 [\n    lazy = false\n  ];\n}\n\nmessage TestDeprecatedFields {\n  int32 deprecated_int32 = 1 [\n    deprecated = true\n  ];\n\n  repeated string deprecated_repeated_string = 4 [\n    deprecated = true\n  ];\n\n  TestAllTypes.NestedMessage deprecated_message = 3 [\n    deprecated = true\n  ];\n\n  oneof oneof_fields {\n    int32 deprecated_int32_in_oneof = 2 [\n      deprecated = true\n    ];\n  }\n\n  TestDeprecatedFields nested = 5;\n}\n\nmessage TestDeprecatedMessage {\n  option deprecated = true;\n}\n\n// Define these after TestAllTypes to make sure the compiler can handle\n// that.\nmessage ForeignMessage {\n  int32 c = 1;\n  int32 d = 2;\n}\n\nenum ForeignEnum {\n  FOREIGN_FOO = 4;\n  FOREIGN_BAR = 5;\n  FOREIGN_BAZ = 6;\n  FOREIGN_BAX = 32; // (1 << 32) to generate a 64b bitmask would be incorrect.\n  FOREIGN_LARGE = 123456; // Large enough to escape the Boxed Integer cache.\n}\n\nmessage TestReservedFields {\n  reserved 2, 15, 9 to 11;\n\n  reserved bar, baz;\n}\n\nenum TestReservedEnumFields {\n  UNKNOWN = 0;\n\n  reserved 2, 15, 9 to 11;\n\n  reserved bar, baz;\n}\n\nmessage TestAllExtensions {\n  extensions 1 to max;\n}\n\nextend TestAllExtensions {\n  // Singular\n  int32 optional_int32_extension = 1;\n  int64 optional_int64_extension = 2;\n  uint32 optional_uint32_extension = 3;\n  uint64 optional_uint64_extension = 4;\n  sint32 optional_sint32_extension = 5;\n  sint64 optional_sint64_extension = 6;\n  fixed32 optional_fixed32_extension = 7;\n  fixed64 optional_fixed64_extension = 8;\n  sfixed32 optional_sfixed32_extension = 9;\n  sfixed64 optional_sfixed64_extension = 10;\n  float optional_float_extension = 11;\n  double optional_double_extension = 12;\n  bool optional_bool_extension = 13;\n  string optional_string_extension = 14;\n  bytes optional_bytes_extension = 15;\n  OptionalGroup_extension optionalgroup_extension = 16 [\n    features.message_encoding = DELIMITED\n  ];\n\n  TestAllTypes.NestedMessage optional_nested_message_extension = 18;\n  ForeignMessage optional_foreign_message_extension = 19;\n  proto2_unittest_import.ImportMessage optional_import_message_extension = 20;\n  TestAllTypes.NestedEnum optional_nested_enum_extension = 21;\n  ForeignEnum optional_foreign_enum_extension = 22;\n  proto2_unittest_import.ImportEnum optional_import_enum_extension = 23;\n  string optional_string_piece_extension = 24 [\n    ctype = STRING_PIECE\n  ];\n\n  // TODO: ctype=CORD is not supported for extension. Add\n  // ctype=CORD option back after it is supported.\n  string optional_cord_extension = 25;\n  bytes optional_bytes_cord_extension = 86;\n\n  proto2_unittest_import.PublicImportMessage\n      optional_public_import_message_extension = 26;\n  TestAllTypes.NestedMessage optional_lazy_message_extension = 27 [\n    lazy = true\n  ];\n\n  TestAllTypes.NestedMessage optional_unverified_lazy_message_extension = 28 [\n    unverified_lazy = true\n  ];\n\n  // Repeated\n  repeated int32 repeated_int32_extension = 31;\n  repeated int64 repeated_int64_extension = 32;\n  repeated uint32 repeated_uint32_extension = 33;\n  repeated uint64 repeated_uint64_extension = 34;\n  repeated sint32 repeated_sint32_extension = 35;\n  repeated sint64 repeated_sint64_extension = 36;\n  repeated fixed32 repeated_fixed32_extension = 37;\n  repeated fixed64 repeated_fixed64_extension = 38;\n  repeated sfixed32 repeated_sfixed32_extension = 39;\n  repeated sfixed64 repeated_sfixed64_extension = 40;\n  repeated float repeated_float_extension = 41;\n  repeated double repeated_double_extension = 42;\n  repeated bool repeated_bool_extension = 43;\n  repeated string repeated_string_extension = 44;\n  repeated bytes repeated_bytes_extension = 45;\n  repeated RepeatedGroup_extension repeatedgroup_extension = 46 [\n    features.message_encoding = DELIMITED\n  ];\n\n  repeated TestAllTypes.NestedMessage repeated_nested_message_extension = 48;\n  repeated ForeignMessage repeated_foreign_message_extension = 49;\n  repeated proto2_unittest_import.ImportMessage\n      repeated_import_message_extension = 50;\n  repeated TestAllTypes.NestedEnum repeated_nested_enum_extension = 51;\n  repeated ForeignEnum repeated_foreign_enum_extension = 52;\n  repeated proto2_unittest_import.ImportEnum repeated_import_enum_extension = 53;\n  repeated string repeated_string_piece_extension = 54 [\n    ctype = STRING_PIECE\n  ];\n\n  // TODO: ctype=CORD is not supported for extension. Add\n  // ctype=CORD option back after it is supported.\n  repeated string repeated_cord_extension = 55;\n  repeated TestAllTypes.NestedMessage repeated_lazy_message_extension = 57 [\n    lazy = true\n  ];\n\n  // Singular with defaults\n  int32 default_int32_extension = 61 [\n    default = 41\n  ];\n\n  int64 default_int64_extension = 62 [\n    default = 42\n  ];\n\n  uint32 default_uint32_extension = 63 [\n    default = 43\n  ];\n\n  uint64 default_uint64_extension = 64 [\n    default = 44\n  ];\n\n  sint32 default_sint32_extension = 65 [\n    default = -45\n  ];\n\n  sint64 default_sint64_extension = 66 [\n    default = 46\n  ];\n\n  fixed32 default_fixed32_extension = 67 [\n    default = 47\n  ];\n\n  fixed64 default_fixed64_extension = 68 [\n    default = 48\n  ];\n\n  sfixed32 default_sfixed32_extension = 69 [\n    default = 49\n  ];\n\n  sfixed64 default_sfixed64_extension = 70 [\n    default = -50\n  ];\n\n  float default_float_extension = 71 [\n    default = 51.5\n  ];\n\n  double default_double_extension = 72 [\n    default = 5.2e4\n  ];\n\n  bool default_bool_extension = 73 [\n    default = true\n  ];\n\n  string default_string_extension = 74 [\n    default = \"hello\"\n  ];\n\n  bytes default_bytes_extension = 75 [\n    default = \"world\"\n  ];\n\n  TestAllTypes.NestedEnum default_nested_enum_extension = 81 [\n    default = BAR\n  ];\n\n  ForeignEnum default_foreign_enum_extension = 82 [\n    default = FOREIGN_BAR\n  ];\n\n  proto2_unittest_import.ImportEnum default_import_enum_extension = 83 [\n    default = IMPORT_BAR\n  ];\n\n  string default_string_piece_extension = 84 [\n    ctype = STRING_PIECE,\n    default = \"abc\"\n  ];\n\n  // TODO: ctype=CORD is not supported for extension. Add\n  // ctype=CORD option back after it is supported.\n  string default_cord_extension = 85 [\n    default = \"123\"\n  ];\n\n  // For oneof test\n  uint32 oneof_uint32_extension = 111;\n  TestAllTypes.NestedMessage oneof_nested_message_extension = 112;\n  string oneof_string_extension = 113;\n  bytes oneof_bytes_extension = 114;\n\n  string optional_utf8_string_extension = 115 [\n    features.utf8_validation = VERIFY\n  ];\n  repeated string repeated_utf8_string_extension = 116 [\n    features.utf8_validation = VERIFY\n  ];\n\n  // Singular message containing required fields; used to test initialization.\n  TestRequired required_message_extension = 117;\n}\n\nmessage OptionalGroup_extension {\n  int32 a = 17;\n}\n\nmessage RepeatedGroup_extension {\n  int32 a = 47;\n}\n\nmessage TestMixedFieldsAndExtensions {\n  int32 a = 1;\n  repeated fixed32 b = 3;\n\n  extensions 2, 4;\n\n  extend TestMixedFieldsAndExtensions {\n    int32 c = 2;\n    repeated fixed32 d = 4;\n  }\n}\n\nmessage TestGroup {\n  message OptionalGroup {\n    int32 a = 17;\n    int32 zz = 89;  // fast table size must be at least 16, for this\n                    // field to be parsed by the fast parser, since\n                    // 89 - 17 = 72 is a multiple of 8.\n  }\n\n  OptionalGroup optionalgroup = 16 [\n    features.message_encoding = DELIMITED\n  ];\n\n  ForeignEnum optional_foreign_enum = 22;\n}\n\nmessage TestGroupExtension {\n  extensions 1 to max;\n}\n\nmessage TestNestedExtension {\n  extend TestAllExtensions {\n    // Check for bug where string extensions declared in tested scope did not\n    // compile.\n    string test = 1002 [\n      default = \"test\"\n    ];\n\n    // Used to test if generated extension name is correct when there are\n    // underscores.\n    string nested_string_extension = 1003;\n  }\n\n  extend TestGroupExtension {\n    OptionalGroup_extension optionalgroup_extension = 16 [\n      features.message_encoding = DELIMITED\n    ];\n\n    ForeignEnum optional_foreign_enum_extension = 22;\n  }\n\n  message OptionalGroup_extension {\n    int32 a = 17;\n  }\n}\n\nmessage TestChildExtension {\n  string a = 1;\n  string b = 2;\n  TestAllExtensions optional_extension = 3;\n}\n\n// Emulates wireformat data of TestChildExtension with dynamic extension\n// (DynamicExtension).\nmessage TestChildExtensionData {\n  message NestedTestAllExtensionsData {\n    message NestedDynamicExtensions {\n      int32 a = 1;\n      int32 b = 2;\n    }\n\n    NestedDynamicExtensions dynamic = 409707008;\n  }\n\n  string a = 1;\n  string b = 2;\n  NestedTestAllExtensionsData optional_extension = 3;\n}\n\nmessage TestNestedChildExtension {\n  int32 a = 1;\n  TestChildExtension child = 2;\n}\n\n// Emulates wireformat data of TestNestedChildExtension with dynamic extension\n// (DynamicExtension).\nmessage TestNestedChildExtensionData {\n  int32 a = 1;\n  TestChildExtensionData child = 2;\n}\n\n// Required and closed enum fields are considered unknown fields if the value is\n// not valid. We need to make sure it functions as expected.\nmessage TestRequiredEnum {\n  ForeignEnum required_enum = 1 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  // A dummy optional field.\n  int32 a = 2;\n}\n\n// Required and open enum accepts invalid enum values.\nenum ForeignOpenEnum {\n  option features.enum_type = OPEN;\n\n  FOREIGN_OPEN_UNKNOWN = 0;\n  FOREIGN_OPEN_FOO = 4;\n  FOREIGN_OPEN_BAR = 5;\n  FOREIGN_OPEN_BAZ = 6;\n  FOREIGN_OPEN_BAX = 32;  // (1 << 32) to generate a 64b bitmask would be\n                          // incorrect.\n}\n\nmessage TestRequiredOpenEnum {\n  ForeignOpenEnum required_enum = 1 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  // A dummy optional field.\n  int32 a = 2;\n}\n\n// TestRequiredEnum + using enum values that won't fit to 64 bitmask.\nmessage TestRequiredEnumNoMask {\n  enum NestedEnum {\n    UNSPECIFIED = 0;\n    FOO = 2;\n    BAR = 100;\n    BAZ = -1; // Intentionally negative.\n  }\n\n  NestedEnum required_enum = 1 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  // A dummy optional field.\n  int32 a = 2;\n}\n\nmessage TestRequiredEnumMulti {\n  enum NestedEnum {\n    UNSPECIFIED = 0;\n    FOO = 1;\n    BAR = 2;\n    BAZ = 100;\n  }\n\n  // Intentionally placed in descending field number to force sorting in closed\n  // enum verification.\n  NestedEnum required_enum_4 = 4 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  int32 a_3 = 3;\n  NestedEnum required_enum_2 = 2 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  ForeignEnum required_enum_1 = 1 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n}\n\nmessage TestRequiredNoMaskMulti {\n  enum NestedEnum {\n    UNSPECIFIED = 0;\n    FOO = 1;\n    BAR = 2;\n    BAZ = 100;\n  }\n\n  // Intentionally placed in descending field number to force sorting in closed\n  // enum verification. Also, using large field numbers to use tag only\n  // matching for required fields.\n  fixed32 required_fixed32_80 = 80 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  fixed32 required_fixed32_70 = 70 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  NestedEnum required_enum_64 = 64 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  NestedEnum required_enum_4 = 4 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  int32 a_3 = 3;\n  NestedEnum required_enum_2 = 2 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  ForeignEnum required_enum_1 = 1 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n}\n\n// We have separate messages for testing required fields because it's\n// annoying to have to fill in required fields in TestProto in order to\n// do anything with it.  Note that we don't need to test every type of\n// required filed because the code output is basically identical to\n// optional fields for all types.\nmessage TestRequired {\n  int32 a = 1 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  int32 dummy2 = 2;\n  int32 b = 3 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  extend TestAllExtensions {\n    TestRequired single = 1000;\n    repeated TestRequired multi = 1001;\n  }\n\n  // Pad the field count to 32 so that we can test that IsInitialized()\n  // properly checks multiple elements of has_bits_.\n  int32 dummy4 = 4;\n  int32 dummy5 = 5;\n  int32 dummy6 = 6;\n  int32 dummy7 = 7;\n  int32 dummy8 = 8;\n  int32 dummy9 = 9;\n  int32 dummy10 = 10;\n  int32 dummy11 = 11;\n  int32 dummy12 = 12;\n  int32 dummy13 = 13;\n  int32 dummy14 = 14;\n  int32 dummy15 = 15;\n  int32 dummy16 = 16;\n  int32 dummy17 = 17;\n  int32 dummy18 = 18;\n  int32 dummy19 = 19;\n  int32 dummy20 = 20;\n  int32 dummy21 = 21;\n  int32 dummy22 = 22;\n  int32 dummy23 = 23;\n  int32 dummy24 = 24;\n  int32 dummy25 = 25;\n  int32 dummy26 = 26;\n  int32 dummy27 = 27;\n  int32 dummy28 = 28;\n  int32 dummy29 = 29;\n  int32 dummy30 = 30;\n  int32 dummy31 = 31;\n  int32 dummy32 = 32;\n  int32 c = 33 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  // Add an optional child message to make this non-trivial for go/pdlazy.\n  ForeignMessage optional_foreign = 34;\n\n  map<string, TestRequired> map_field = 35;\n}\n\nmessage TestRequiredForeign {\n  TestRequired optional_message = 1;\n  repeated TestRequired repeated_message = 2;\n  int32 dummy = 3;\n\n  // Missing required fields must not affect verification of child messages.\n  NestedTestAllTypes optional_lazy_message = 4 [\n    lazy = true\n  ];\n}\n\nmessage TestRequiredMessage {\n  TestRequired optional_message = 1;\n  repeated TestRequired repeated_message = 2;\n  TestRequired required_message = 3 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n}\n\nmessage TestRequiredLazyMessage {\n  TestRequired child = 1 [lazy = true];\n  TestRequiredLazyMessage recurse = 2 [lazy = true];\n}\n\nmessage TestNestedRequiredForeign {\n  TestNestedRequiredForeign child = 1;\n  TestRequiredForeign payload = 2;\n  int32 dummy = 3;\n\n  // optional message to test required closed enum.\n  TestRequiredEnum required_enum = 5;\n  TestRequiredEnumNoMask required_enum_no_mask = 6;\n  TestRequiredEnumMulti required_enum_multi = 7;\n  TestRequiredNoMaskMulti required_no_mask = 9;\n}\n\n// Test that we can use NestedMessage from outside TestAllTypes.\nmessage TestForeignNested {\n  TestAllTypes.NestedMessage foreign_nested = 1;\n}\n\n// TestEmptyMessage is used to test unknown field support.\nmessage TestEmptyMessage {\n}\n\n// Like above, but declare all field numbers as potential extensions.  No\n// actual extensions should ever be defined for this type.\nmessage TestEmptyMessageWithExtensions {\n  extensions 1 to max;\n}\n\n// Needed for a Python test.\nmessage TestPickleNestedMessage {\n  message NestedMessage {\n    int32 bb = 1;\n\n    message NestedNestedMessage {\n      int32 cc = 1;\n    }\n  }\n}\n\nmessage TestMultipleExtensionRanges {\n  extensions 42;\n  extensions 4143 to 4243;\n  extensions 65536 to max;\n}\n\n// Test that really large tag numbers don't break anything.\nmessage TestReallyLargeTagNumber {\n  // The largest possible tag number is 2^28 - 1, since the wire format uses\n  // three bits to communicate wire type.\n  int32 a = 1;\n  int32 bb = 268435455;\n}\n\nmessage TestRecursiveMessage {\n  TestRecursiveMessage a = 1;\n  int32 i = 2;\n}\n\n// Test that mutual recursion works.\nmessage TestMutualRecursionA {\n  message SubMessage {\n    TestMutualRecursionB b = 1;\n  }\n\n  TestMutualRecursionB bb = 1;\n\n  message SubGroup {\n    SubMessage sub_message = 3; // Needed because of bug in javatest\n    TestAllTypes not_in_this_scc = 4;\n  }\n\n  SubGroup subgroup = 2 [\n    features.message_encoding = DELIMITED\n  ];\n\n  message SubGroupR {\n    TestAllTypes payload = 6;\n  }\n\n  repeated SubGroupR subgroupr = 5 [\n    features.message_encoding = DELIMITED\n  ];\n}\n\nmessage TestMutualRecursionB {\n  TestMutualRecursionA a = 1;\n  int32 optional_int32 = 2;\n}\n\nmessage TestIsInitialized {\n  message SubMessage {\n    message SubGroup {\n      int32 i = 2 [\n        features.field_presence = LEGACY_REQUIRED\n      ];\n    }\n\n    SubGroup subgroup = 1 [\n      features.message_encoding = DELIMITED\n    ];\n  }\n\n  SubMessage sub_message = 1;\n}\n\n// Test that groups have disjoint field numbers from their siblings and\n// parents.  This is NOT possible in proto1; only google.protobuf.  When attempting\n// to compile with proto1, this will emit an error; so we only include it\n// in proto2_unittest_proto.\nmessage TestDupFieldNumber {// NO_PROTO1\n  int32 a = 1; // NO_PROTO1\n  message Foo { // NO_PROTO1\n    int32 a = 1; // NO_PROTO1\n  } // NO_PROTO1\n  Foo foo = 2 [features.message_encoding = DELIMITED]; // NO_PROTO1\n  message Bar { // NO_PROTO1\n    int32 a = 1; // NO_PROTO1\n  } // NO_PROTO1\n  Bar bar = 3 [features.message_encoding = DELIMITED]; // NO_PROTO1\n} // NO_PROTO1\n\n// Additional messages for testing lazy fields.\nmessage TestEagerMessage {\n  TestAllTypes sub_message = 1 [\n    lazy = false\n  ];\n}\n\nmessage TestLazyMessage {\n  TestAllTypes sub_message = 1 [\n    lazy = true\n  ];\n}\n\nmessage TestLazyRequiredEnum {\n  TestRequiredOpenEnum optional_required_open_enum = 1 [lazy = true];\n  TestRequiredEnum optional_required_enum = 2 [lazy = true];\n  TestRequiredEnumNoMask optional_required_enum_no_mask = 3 [lazy = true];\n  TestRequiredEnumMulti optional_required_enum_multi = 4 [lazy = true];\n  TestRequiredNoMaskMulti optional_required_no_mask = 5 [lazy = true];\n}\n\nmessage TestLazyMessageRepeated {\n  repeated TestLazyMessage repeated_message = 1;\n}\n\nmessage TestEagerMaybeLazy {\n  message NestedMessage {\n    TestPackedTypes packed = 1;\n  }\n\n  TestAllTypes message_foo = 1;\n  TestAllTypes message_bar = 2;\n  NestedMessage message_baz = 3;\n}\n\n// Needed for a Python test.\nmessage TestNestedMessageHasBits {\n  message NestedMessage {\n    repeated int32 nestedmessage_repeated_int32 = 1;\n    repeated ForeignMessage nestedmessage_repeated_foreignmessage = 2;\n  }\n\n  NestedMessage optional_nested_message = 1;\n}\n\n// Test an enum that has multiple values with the same number.\nenum TestEnumWithDupValue {\n  option allow_alias = true;\n\n  FOO1 = 1;\n  BAR1 = 2;\n  BAZ = 3;\n  FOO2 = 1;\n  BAR2 = 2;\n}\n\n// Test an enum with large, unordered values.\nenum TestSparseEnum {\n  SPARSE_A = 123;\n  SPARSE_B = 62374;\n  SPARSE_C = 12589234;\n  SPARSE_D = -15;\n  SPARSE_E = -53452;\n  SPARSE_F = 0;\n  SPARSE_G = 2;\n}\n\n// Test message with CamelCase field names.  This violates Protocol Buffer\n// standard style.\nmessage TestCamelCaseFieldNames {\n  int32 PrimitiveField = 1;\n  string StringField = 2;\n  ForeignEnum EnumField = 3;\n  ForeignMessage MessageField = 4;\n  string StringPieceField = 5 [\n    ctype = STRING_PIECE\n  ];\n\n  string CordField = 6 [\n    ctype = CORD\n  ];\n\n  repeated int32 RepeatedPrimitiveField = 7;\n  repeated string RepeatedStringField = 8;\n  repeated ForeignEnum RepeatedEnumField = 9;\n  repeated ForeignMessage RepeatedMessageField = 10;\n  repeated string RepeatedStringPieceField = 11 [\n    ctype = STRING_PIECE\n  ];\n\n  repeated string RepeatedCordField = 12 [\n    ctype = CORD\n  ];\n}\n\n// We list fields out of order, to ensure that we're using field number and not\n// field index to determine serialization order.\nmessage TestFieldOrderings {\n  string my_string = 11;\n\n  extensions 2 to 10;\n\n  int64 my_int = 1;\n\n  extensions 12 to 100;\n\n  float my_float = 101;\n\n  message NestedMessage {\n    int64 oo = 2;\n\n    // The field name \"b\" fails to compile in proto1 because it conflicts with\n    // a local variable named \"b\" in one of the generated methods.  Doh.\n    // This file needs to compile in proto1 to test backwards-compatibility.\n    int32 bb = 1;\n  }\n\n  NestedMessage optional_nested_message = 200;\n}\n\nextend TestFieldOrderings {\n  string my_extension_string = 50;\n  int32 my_extension_int = 5;\n}\n\nmessage TestExtensionOrderings1 {\n  extend TestFieldOrderings {\n    TestExtensionOrderings1 test_ext_orderings1 = 13;\n  }\n\n  string my_string = 1;\n}\n\nmessage TestExtensionOrderings2 {\n  extend TestFieldOrderings {\n    TestExtensionOrderings2 test_ext_orderings2 = 12;\n  }\n\n  message TestExtensionOrderings3 {\n    extend TestFieldOrderings {\n      TestExtensionOrderings3 test_ext_orderings3 = 14;\n    }\n\n    string my_string = 1;\n  }\n\n  string my_string = 1;\n}\n\nmessage TestExtremeDefaultValues {\n  bytes escaped_bytes = 1 [\n    default =\n        \"\\0\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"\\xfe\"\n  ];\n\n  uint32 large_uint32 = 2 [\n    default = 0xFFFFFFFF\n  ];\n\n  uint64 large_uint64 = 3 [\n    default = 0xFFFFFFFFFFFFFFFF\n  ];\n\n  int32 small_int32 = 4 [\n    default = -0x7FFFFFFF\n  ];\n\n  int64 small_int64 = 5 [\n    default = -0x7FFFFFFFFFFFFFFF\n  ];\n\n  int32 really_small_int32 = 21 [\n    default = -0x80000000\n  ];\n\n  int64 really_small_int64 = 22 [\n    default = -0x8000000000000000\n  ];\n\n  // The default value here is UTF-8 for \"\\u1234\".  (We could also just type\n  // the UTF-8 text directly into this text file rather than escape it, but\n  // lots of people use editors that would be confused by this.)\n  string utf8_string = 6 [\n    default = \"\\341\\210\\264\"\n  ];\n\n  // Tests for single-precision floating-point values.\n  float zero_float = 7 [\n    default = 0\n  ];\n\n  float one_float = 8 [\n    default = 1\n  ];\n\n  float small_float = 9 [\n    default = 1.5\n  ];\n\n  float negative_one_float = 10 [\n    default = -1\n  ];\n\n  float negative_float = 11 [\n    default = -1.5\n  ];\n\n  // Using exponents\n  float large_float = 12 [\n    default = 2e8\n  ];\n\n  float small_negative_float = 13 [\n    default = -8e-28\n  ];\n\n  // Text for nonfinite floating-point values.\n  double inf_double = 14 [\n    default = inf\n  ];\n\n  double neg_inf_double = 15 [\n    default = -inf\n  ];\n\n  double nan_double = 16 [\n    default = nan\n  ];\n\n  float inf_float = 17 [\n    default = inf\n  ];\n\n  float neg_inf_float = 18 [\n    default = -inf\n  ];\n\n  float nan_float = 19 [\n    default = nan\n  ];\n\n  // Tests for C++ trigraphs.\n  // Trigraphs should be escaped in C++ generated files, but they should not be\n  // escaped for other languages.\n  // Note that in .proto file, \"\\?\" is a valid way to escape ? in string\n  // literals.\n  string cpp_trigraph = 20 [\n    default = \"? \\? ?? \\?? \\??? ??/ ?\\?-\"\n  ];\n\n  // String defaults containing the character '\\000'\n  string string_with_zero = 23 [\n    default = \"hel\\000lo\"\n  ];\n\n  bytes bytes_with_zero = 24 [\n    default = \"wor\\000ld\"\n  ];\n\n  string string_piece_with_zero = 25 [\n    ctype = STRING_PIECE,\n    default = \"ab\\000c\"\n  ];\n\n  string cord_with_zero = 26 [\n    ctype = CORD,\n    default = \"12\\0003\"\n  ];\n\n  string replacement_string = 27 [\n    default = \"${unknown}\"\n  ];\n}\n\nmessage SparseEnumMessage {\n  TestSparseEnum sparse_enum = 1;\n}\n\n// Test String and Bytes: string is for valid UTF-8 strings\nmessage OneString {\n  string data = 1;\n}\n\nmessage MoreString {\n  repeated string data = 1;\n}\n\nmessage OneBytes {\n  bytes data = 1;\n}\n\nmessage MoreBytes {\n  repeated bytes data = 1;\n}\n\nmessage ManyOptionalString {\n  string str1 = 1;\n  string str2 = 2;\n  string str3 = 3;\n  string str4 = 4;\n  string str5 = 5;\n  string str6 = 6;\n  string str7 = 7;\n  string str8 = 8;\n  string str9 = 9;\n  string str10 = 10;\n  string str11 = 11;\n  string str12 = 12;\n  string str13 = 13;\n  string str14 = 14;\n  string str15 = 15;\n  string str16 = 16;\n  string str17 = 17;\n  string str18 = 18;\n  string str19 = 19;\n  string str20 = 20;\n  string str21 = 21;\n  string str22 = 22;\n  string str23 = 23;\n  string str24 = 24;\n  string str25 = 25;\n  string str26 = 26;\n  string str27 = 27;\n  string str28 = 28;\n  string str29 = 29;\n  string str30 = 30;\n  string str31 = 31;\n  string str32 = 32;\n}\n\n// Test int32, uint32, int64, uint64, and bool are all compatible\nmessage Int32Message {\n  int32 data = 1;\n}\n\nmessage Uint32Message {\n  uint32 data = 1;\n}\n\nmessage Int64Message {\n  int64 data = 1;\n}\n\nmessage Uint64Message {\n  uint64 data = 1;\n}\n\nmessage BoolMessage {\n  bool data = 1;\n}\n\n// Test oneofs.\nmessage TestOneof {\n  oneof foo {\n    int32 foo_int = 1;\n    string foo_string = 2;\n    TestAllTypes foo_message = 3;\n    FooGroup foogroup = 4 [\n      features.message_encoding = DELIMITED\n    ];\n  }\n\n  message FooGroup {\n    int32 a = 5;\n    string b = 6;\n  }\n}\n\nmessage TestOneofBackwardsCompatible {\n  int32 foo_int = 1;\n  string foo_string = 2;\n  TestAllTypes foo_message = 3;\n\n  message FooGroup {\n    int32 a = 5;\n    string b = 6;\n  }\n\n  FooGroup foogroup = 4 [\n    features.message_encoding = DELIMITED\n  ];\n}\n\nmessage TestOneof2 {\n  oneof foo {\n    int32 foo_int = 1;\n    string foo_string = 2;\n    string foo_cord = 3 [\n      ctype = CORD\n    ];\n\n    string foo_string_piece = 4 [\n      ctype = STRING_PIECE\n    ];\n\n    bytes foo_bytes = 5;\n    NestedEnum foo_enum = 6;\n    NestedMessage foo_message = 7;\n    FooGroup foogroup = 8 [\n      features.message_encoding = DELIMITED\n    ];\n\n    NestedMessage foo_lazy_message = 11 [\n      lazy = true\n    ];\n\n    bytes foo_bytes_cord = 30 [\n      ctype = CORD\n    ];\n  }\n\n  message FooGroup {\n    int32 a = 9;\n    string b = 10;\n  }\n\n  oneof bar {\n    int32 bar_int = 12 [\n      default = 5\n    ];\n\n    string bar_string = 13 [\n      default = \"STRING\"\n    ];\n\n    string bar_cord = 14 [\n      ctype = CORD,\n      default = \"CORD\"\n    ];\n\n    string bar_string_piece = 15 [\n      ctype = STRING_PIECE,\n      default = \"SPIECE\"\n    ];\n\n    bytes bar_bytes = 16 [\n      default = \"BYTES\"\n    ];\n\n    NestedEnum bar_enum = 17 [\n      default = BAR\n    ];\n\n    string bar_string_with_empty_default = 20 [\n      default = \"\"\n    ];\n\n    string bar_cord_with_empty_default = 21 [\n      ctype = CORD,\n      default = \"\"\n    ];\n\n    string bar_string_piece_with_empty_default = 22 [\n      ctype = STRING_PIECE,\n      default = \"\"\n    ];\n\n    bytes bar_bytes_with_empty_default = 23 [\n      default = \"\"\n    ];\n  }\n\n  int32 baz_int = 18;\n  string baz_string = 19 [\n    default = \"BAZ\"\n  ];\n\n  message NestedMessage {\n    int64 moo_int = 1;\n    repeated int32 corge_int = 2;\n    NestedMessage child = 3;\n  }\n\n  enum NestedEnum {\n    FOO = 1;\n    BAR = 2;\n    BAZ = 3;\n  }\n}\n\nmessage TestRequiredOneof {\n  oneof foo {\n    int32 foo_int = 1;\n    string foo_string = 2;\n    NestedMessage foo_message = 3;\n    NestedMessage foo_lazy_message = 4 [\n      lazy = true\n    ];\n  }\n\n  message NestedMessage {\n    double required_double = 1 [\n      features.field_presence = LEGACY_REQUIRED\n    ];\n  }\n}\n\n// Test messages for packed fields\n\nmessage TestPackedTypes {\n  repeated int32 packed_int32 = 90 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated int64 packed_int64 = 91 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated uint32 packed_uint32 = 92 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated uint64 packed_uint64 = 93 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated sint32 packed_sint32 = 94 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated sint64 packed_sint64 = 95 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated fixed32 packed_fixed32 = 96 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated fixed64 packed_fixed64 = 97 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated sfixed32 packed_sfixed32 = 98 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated sfixed64 packed_sfixed64 = 99 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated float packed_float = 100 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated double packed_double = 101 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated bool packed_bool = 102 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated ForeignEnum packed_enum = 103 [\n    features.repeated_field_encoding = PACKED\n  ];\n}\n\n// A message with the same fields as TestPackedTypes, but without packing. Used\n// to test packed <-> unpacked wire compatibility.\nmessage TestUnpackedTypes {\n  repeated int32 unpacked_int32 = 90;\n  repeated int64 unpacked_int64 = 91;\n  repeated uint32 unpacked_uint32 = 92;\n  repeated uint64 unpacked_uint64 = 93;\n  repeated sint32 unpacked_sint32 = 94;\n  repeated sint64 unpacked_sint64 = 95;\n  repeated fixed32 unpacked_fixed32 = 96;\n  repeated fixed64 unpacked_fixed64 = 97;\n  repeated sfixed32 unpacked_sfixed32 = 98;\n  repeated sfixed64 unpacked_sfixed64 = 99;\n  repeated float unpacked_float = 100;\n  repeated double unpacked_double = 101;\n  repeated bool unpacked_bool = 102;\n  repeated ForeignEnum unpacked_enum = 103;\n}\n\nmessage TestPackedExtensions {\n  extensions 1 to max;\n}\n\nextend TestPackedExtensions {\n  repeated int32 packed_int32_extension = 90 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated int64 packed_int64_extension = 91 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated uint32 packed_uint32_extension = 92 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated uint64 packed_uint64_extension = 93 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated sint32 packed_sint32_extension = 94 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated sint64 packed_sint64_extension = 95 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated fixed32 packed_fixed32_extension = 96 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated fixed64 packed_fixed64_extension = 97 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated sfixed32 packed_sfixed32_extension = 98 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated sfixed64 packed_sfixed64_extension = 99 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated float packed_float_extension = 100 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated double packed_double_extension = 101 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated bool packed_bool_extension = 102 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated ForeignEnum packed_enum_extension = 103 [\n    features.repeated_field_encoding = PACKED\n  ];\n}\n\nmessage TestUnpackedExtensions {\n  extensions 1 to max;\n}\n\nextend TestUnpackedExtensions {\n  repeated int32 unpacked_int32_extension = 90;\n  repeated int64 unpacked_int64_extension = 91;\n  repeated uint32 unpacked_uint32_extension = 92;\n  repeated uint64 unpacked_uint64_extension = 93;\n  repeated sint32 unpacked_sint32_extension = 94;\n  repeated sint64 unpacked_sint64_extension = 95;\n  repeated fixed32 unpacked_fixed32_extension = 96;\n  repeated fixed64 unpacked_fixed64_extension = 97;\n  repeated sfixed32 unpacked_sfixed32_extension = 98;\n  repeated sfixed64 unpacked_sfixed64_extension = 99;\n  repeated float unpacked_float_extension = 100;\n  repeated double unpacked_double_extension = 101;\n  repeated bool unpacked_bool_extension = 102;\n  repeated ForeignEnum unpacked_enum_extension = 103;\n}\n\n// Used by ExtensionSetTest/DynamicExtensions.  The test actually builds\n// a set of extensions to TestAllExtensions dynamically, based on the fields\n// of this message type.\nmessage TestDynamicExtensions {\n  enum DynamicEnumType {\n    DYNAMIC_FOO = 2200;\n    DYNAMIC_BAR = 2201;\n    DYNAMIC_BAZ = 2202;\n  }\n\n  message DynamicMessageType {\n    int32 dynamic_field = 2100;\n  }\n\n  fixed32 scalar_extension = 2000;\n  ForeignEnum enum_extension = 2001;\n  DynamicEnumType dynamic_enum_extension = 2002;\n  ForeignMessage message_extension = 2003;\n  DynamicMessageType dynamic_message_extension = 2004;\n  repeated string repeated_extension = 2005;\n  repeated sint32 packed_extension = 2006 [\n    features.repeated_field_encoding = PACKED\n  ];\n}\n\nmessage TestRepeatedString {\n  repeated string repeated_string1 = 1;\n  repeated string repeated_string2 = 2;\n  repeated bytes repeated_bytes11 = 11;\n  repeated bytes repeated_bytes12 = 12;\n}\n\nmessage TestRepeatedScalarDifferentTagSizes {\n  // Parsing repeated fixed size values used to fail. This message needs to be\n  // used in order to get a tag of the right size; all of the repeated fields\n  // in TestAllTypes didn't trigger the check.\n  repeated fixed32 repeated_fixed32 = 12;\n\n  // Check for a varint type, just for good measure.\n  repeated int32 repeated_int32 = 13;\n\n  // These have two-byte tags.\n  repeated fixed64 repeated_fixed64 = 2046;\n  repeated int64 repeated_int64 = 2047;\n\n  // Three byte tags.\n  repeated float repeated_float = 262142;\n  repeated uint64 repeated_uint64 = 262143;\n}\n\n// Test that if an optional or required message/group field appears multiple\n// times in the input, they need to be merged.\nmessage TestParsingMerge {\n  // RepeatedFieldsGenerator defines matching field types as TestParsingMerge,\n  // except that all fields are repeated. In the tests, we will serialize the\n  // RepeatedFieldsGenerator to bytes, and parse the bytes to TestParsingMerge.\n  // Repeated fields in RepeatedFieldsGenerator are expected to be merged into\n  // the corresponding required/optional fields in TestParsingMerge.\n  message RepeatedFieldsGenerator {\n    repeated TestAllTypes field1 = 1;\n    repeated TestAllTypes field2 = 2;\n    repeated TestAllTypes field3 = 3;\n\n    message Group1 {\n      TestAllTypes field1 = 11;\n    }\n\n    repeated Group1 group1 = 10 [\n      features.message_encoding = DELIMITED\n    ];\n\n    message Group2 {\n      TestAllTypes field1 = 21;\n    }\n\n    repeated Group2 group2 = 20 [\n      features.message_encoding = DELIMITED\n    ];\n\n    repeated TestAllTypes ext1 = 1000;\n    repeated TestAllTypes ext2 = 1001;\n  }\n\n  TestAllTypes required_all_types = 1 [\n    features.field_presence = LEGACY_REQUIRED\n  ];\n\n  TestAllTypes optional_all_types = 2;\n  repeated TestAllTypes repeated_all_types = 3;\n\n  message OptionalGroup {\n    TestAllTypes optional_group_all_types = 11;\n  }\n\n  OptionalGroup optionalgroup = 10 [\n    features.message_encoding = DELIMITED\n  ];\n\n  message RepeatedGroup {\n    TestAllTypes repeated_group_all_types = 21;\n  }\n\n  repeated RepeatedGroup repeatedgroup = 20 [\n    features.message_encoding = DELIMITED\n  ];\n\n  extensions 1000 to max;\n\n  extend TestParsingMerge {\n    TestAllTypes optional_ext = 1000;\n    repeated TestAllTypes repeated_ext = 1001;\n  }\n}\n\n// Test that the correct exception is thrown by parseFrom in a corner case\n// involving merging, extensions, and required fields.\nmessage TestMergeException {\n  TestAllExtensions all_extensions = 1;\n}\n\nmessage TestCommentInjectionMessage {\n  // */ <- This should not close the generated doc comment\n  string a = 1 [\n    default = \"*/ <- Neither should this.\"\n  ];\n}\n\n// Used to check that the c++ code generator re-orders messages to reduce\n// padding.\nmessage TestMessageSize {\n  bool m1 = 1;\n  int64 m2 = 2;\n  bool m3 = 3;\n  string m4 = 4;\n  int32 m5 = 5;\n  int64 m6 = 6;\n}\n\nmessage OpenEnumMessage {\n  enum TestEnum {\n    option features.enum_type = OPEN;\n\n    UNKNOWN = 0;\n    FOO = 1;\n    BAR = 2;\n    BAZ = 3;\n  }\n\n  TestEnum opt_open = 1;\n\n  ForeignEnum opt_closed = 2;\n  repeated TestEnum repeated_open = 3;\n\n  repeated ForeignEnum repeated_closed = 4;\n}\n\n// Tests eager verification of a lazy message field.\nmessage TestEagerlyVerifiedLazyMessage {\n  message LazyMessage {\n    bytes bytes_field = 1;\n  }\n  LazyMessage lazy_message = 1 [lazy = true];\n}\n\n// Test that RPC services work.\nmessage FooRequest {\n}\n\nmessage FooResponse {\n}\n\nmessage FooClientMessage {\n}\n\nmessage FooServerMessage {\n}\n\nservice TestService {\n  rpc Foo(FooRequest) returns (FooResponse);\n\n  rpc Bar(BarRequest) returns (BarResponse);\n}\n\nmessage BarRequest {\n}\n\nmessage BarResponse {\n}\n\nmessage TestJsonName {\n  int32 field_name1 = 1;\n  int32 fieldName2 = 2;\n  int32 FieldName3 = 3;\n  int32 _field_name4 = 4;\n  int32 FIELD_NAME5 = 5;\n  int32 field_name6 = 6 [\n    json_name = \"@type\"\n  ];\n\n  int32 fieldname7 = 7;\n}\n\nmessage TestHugeFieldNumbers {\n  int32 optional_int32 = 536870000;\n  int32 fixed_32 = 536870001;\n  repeated int32 repeated_int32 = 536870002;\n  repeated int32 packed_int32 = 536870003 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  ForeignEnum optional_enum = 536870004;\n  string optional_string = 536870005;\n  bytes optional_bytes = 536870006;\n  ForeignMessage optional_message = 536870007;\n\n  message OptionalGroup {\n    int32 group_a = 536870009;\n  }\n\n  OptionalGroup optionalgroup = 536870008 [\n    features.message_encoding = DELIMITED\n  ];\n\n  map<string, string> string_string_map = 536870010;\n\n  oneof oneof_field {\n    uint32 oneof_uint32 = 536870011;\n    TestAllTypes oneof_test_all_types = 536870012;\n    string oneof_string = 536870013;\n    bytes oneof_bytes = 536870014;\n  }\n\n  bool optional_bool = 536870015;\n  int64 optional_int64 = 536870016;\n  float optional_float = 536870017;\n  double optional_double = 536870018;\n  string optional_utf8_string = 536870019 [\n    features.utf8_validation = VERIFY\n  ];\n  string optional_cord = 536870020 [\n    ctype=CORD, features.utf8_validation = VERIFY\n  ];\n  string optional_string_piece = 536870021 [\n    ctype=STRING_PIECE, features.utf8_validation = VERIFY\n  ];\n\n  extensions 536860000 to 536869999 [\n    declaration = {\n      number: 536860000\n      full_name: \".proto2_unittest.test_all_types\"\n      type: \".proto2_unittest.TestAllTypes\"\n    }\n  ];\n}\n\nextend TestHugeFieldNumbers {\n  TestAllTypes test_all_types = 536860000;\n}\n\nmessage TestExtensionInsideTable {\n  int32 field1 = 1;\n  int32 field2 = 2;\n  int32 field3 = 3;\n  int32 field4 = 4;\n\n  extensions 5;\n\n  int32 field6 = 6;\n  int32 field7 = 7;\n  int32 field8 = 8;\n  int32 field9 = 9;\n  int32 field10 = 10;\n}\n\nextend TestExtensionInsideTable {\n  int32 test_extension_inside_table_extension = 5;\n}\n\n// NOTE: Intentionally nested to mirror go/glep.\nmessage TestNestedGroupExtensionOuter {\n  message Layer1OptionalGroup {\n    message Layer2RepeatedGroup {\n      extensions 3\n      //  NOTE: extension metadata is not supported due to targets such as\n      //  `//google/protobuf_legacy_opensource/src:shell_scripts_test`,\n      //  eee https://screenshot.googleplex.com/Axz2QD8nxjdpyFF\n      // [metadata = {\n      //  NOTE: can't write type there due to some clever build gen code at\n      //  http://google3/google/protobuf/BUILD;l=1247;rcl=411090862\n      //  type: \"proto2_unittest.TestNestedGroupExtensionInnerExtension\",\n      //  name: \"inner\",\n      //  }]\n      ;\n\n      string another_field = 6;\n    }\n\n    repeated Layer2RepeatedGroup layer2repeatedgroup = 2 [\n      features.message_encoding = DELIMITED\n    ];\n\n    message Layer2AnotherOptionalRepeatedGroup {\n      string but_why_tho = 5;\n    }\n\n    repeated Layer2AnotherOptionalRepeatedGroup\n        layer2anotheroptionalrepeatedgroup = 4 [\n          features.message_encoding = DELIMITED\n        ];\n  }\n\n  Layer1OptionalGroup layer1optionalgroup = 1 [\n    features.message_encoding = DELIMITED\n  ];\n}\n\nmessage TestNestedGroupExtensionInnerExtension {\n  string inner_name = 1;\n}\n\nextend TestNestedGroupExtensionOuter.Layer1OptionalGroup.Layer2RepeatedGroup {\n  TestNestedGroupExtensionInnerExtension inner = 3;\n}\n\nenum VeryLargeEnum {\n  ENUM_LABEL_DEFAULT = 0;\n  ENUM_LABEL_1 = 1;\n  ENUM_LABEL_2 = 2;\n  ENUM_LABEL_3 = 3;\n  ENUM_LABEL_4 = 4;\n  ENUM_LABEL_5 = 5;\n  ENUM_LABEL_6 = 6;\n  ENUM_LABEL_7 = 7;\n  ENUM_LABEL_8 = 8;\n  ENUM_LABEL_9 = 9;\n  ENUM_LABEL_10 = 10;\n  ENUM_LABEL_11 = 11;\n  ENUM_LABEL_12 = 12;\n  ENUM_LABEL_13 = 13;\n  ENUM_LABEL_14 = 14;\n  ENUM_LABEL_15 = 15;\n  ENUM_LABEL_16 = 16;\n  ENUM_LABEL_17 = 17;\n  ENUM_LABEL_18 = 18;\n  ENUM_LABEL_19 = 19;\n  ENUM_LABEL_20 = 20;\n  ENUM_LABEL_21 = 21;\n  ENUM_LABEL_22 = 22;\n  ENUM_LABEL_23 = 23;\n  ENUM_LABEL_24 = 24;\n  ENUM_LABEL_25 = 25;\n  ENUM_LABEL_26 = 26;\n  ENUM_LABEL_27 = 27;\n  ENUM_LABEL_28 = 28;\n  ENUM_LABEL_29 = 29;\n  ENUM_LABEL_30 = 30;\n  ENUM_LABEL_31 = 31;\n  ENUM_LABEL_32 = 32;\n  ENUM_LABEL_33 = 33;\n  ENUM_LABEL_34 = 34;\n  ENUM_LABEL_35 = 35;\n  ENUM_LABEL_36 = 36;\n  ENUM_LABEL_37 = 37;\n  ENUM_LABEL_38 = 38;\n  ENUM_LABEL_39 = 39;\n  ENUM_LABEL_40 = 40;\n  ENUM_LABEL_41 = 41;\n  ENUM_LABEL_42 = 42;\n  ENUM_LABEL_43 = 43;\n  ENUM_LABEL_44 = 44;\n  ENUM_LABEL_45 = 45;\n  ENUM_LABEL_46 = 46;\n  ENUM_LABEL_47 = 47;\n  ENUM_LABEL_48 = 48;\n  ENUM_LABEL_49 = 49;\n  ENUM_LABEL_50 = 50;\n  ENUM_LABEL_51 = 51;\n  ENUM_LABEL_52 = 52;\n  ENUM_LABEL_53 = 53;\n  ENUM_LABEL_54 = 54;\n  ENUM_LABEL_55 = 55;\n  ENUM_LABEL_56 = 56;\n  ENUM_LABEL_57 = 57;\n  ENUM_LABEL_58 = 58;\n  ENUM_LABEL_59 = 59;\n  ENUM_LABEL_60 = 60;\n  ENUM_LABEL_61 = 61;\n  ENUM_LABEL_62 = 62;\n  ENUM_LABEL_63 = 63;\n  ENUM_LABEL_64 = 64;\n  ENUM_LABEL_65 = 65;\n  ENUM_LABEL_66 = 66;\n  ENUM_LABEL_67 = 67;\n  ENUM_LABEL_68 = 68;\n  ENUM_LABEL_69 = 69;\n  ENUM_LABEL_70 = 70;\n  ENUM_LABEL_71 = 71;\n  ENUM_LABEL_72 = 72;\n  ENUM_LABEL_73 = 73;\n  ENUM_LABEL_74 = 74;\n  ENUM_LABEL_75 = 75;\n  ENUM_LABEL_76 = 76;\n  ENUM_LABEL_77 = 77;\n  ENUM_LABEL_78 = 78;\n  ENUM_LABEL_79 = 79;\n  ENUM_LABEL_80 = 80;\n  ENUM_LABEL_81 = 81;\n  ENUM_LABEL_82 = 82;\n  ENUM_LABEL_83 = 83;\n  ENUM_LABEL_84 = 84;\n  ENUM_LABEL_85 = 85;\n  ENUM_LABEL_86 = 86;\n  ENUM_LABEL_87 = 87;\n  ENUM_LABEL_88 = 88;\n  ENUM_LABEL_89 = 89;\n  ENUM_LABEL_90 = 90;\n  ENUM_LABEL_91 = 91;\n  ENUM_LABEL_92 = 92;\n  ENUM_LABEL_93 = 93;\n  ENUM_LABEL_94 = 94;\n  ENUM_LABEL_95 = 95;\n  ENUM_LABEL_96 = 96;\n  ENUM_LABEL_97 = 97;\n  ENUM_LABEL_98 = 98;\n  ENUM_LABEL_99 = 99;\n  ENUM_LABEL_100 = 100;\n}\n\nmessage TestExtensionRangeSerialize {\n  int32 foo_one = 1;\n\n  extensions 2;\n  extensions 3 to 4;\n\n  int32 foo_two = 6;\n  int32 foo_three = 7;\n\n  extensions 9 to 10;\n\n  int32 foo_four = 13;\n\n  extensions 15 to 15;\n  extensions 17 to 17;\n  extensions 19 to 19;\n\n  extend TestExtensionRangeSerialize {\n    int32 bar_one = 2;\n    int32 bar_two = 4;\n    int32 bar_three = 10;\n    int32 bar_four = 15;\n    int32 bar_five = 19;\n  }\n}\n\nmessage TestVerifyInt32Simple {\n  int32 optional_int32_1 = 1;\n  int32 optional_int32_2 = 2;\n  int32 optional_int32_63 = 63;\n  int32 optional_int32_64 = 64;\n}\n\nmessage TestVerifyInt32 {\n  int32 optional_int32_1 = 1;\n  int32 optional_int32_2 = 2;\n  int32 optional_int32_63 = 63;\n  int32 optional_int32_64 = 64;\n  TestAllTypes optional_all_types = 9;\n  repeated TestAllTypes repeated_all_types = 10;\n}\n\nmessage TestVerifyMostlyInt32 {\n  int64 optional_int64_30 = 30;\n  int32 optional_int32_1 = 1;\n  int32 optional_int32_2 = 2;\n  int32 optional_int32_3 = 3;\n  int32 optional_int32_4 = 4;\n  int32 optional_int32_63 = 63;\n  int32 optional_int32_64 = 64;\n  TestAllTypes optional_all_types = 9;\n  repeated TestAllTypes repeated_all_types = 10;\n}\n\nmessage TestVerifyMostlyInt32BigFieldNumber {\n  int64 optional_int64_30 = 30;\n  int32 optional_int32_300 = 300;\n  int32 optional_int32_1 = 1;\n  int32 optional_int32_2 = 2;\n  int32 optional_int32_3 = 3;\n  int32 optional_int32_4 = 4;\n  int32 optional_int32_63 = 63;\n  int32 optional_int32_64 = 64;\n  TestAllTypes optional_all_types = 9;\n  repeated TestAllTypes repeated_all_types = 10;\n}\n\nmessage TestVerifyUint32Simple {\n  uint32 optional_uint32_1 = 1;\n  uint32 optional_uint32_2 = 2;\n  uint32 optional_uint32_63 = 63;\n  uint32 optional_uint32_64 = 64;\n}\n\nmessage TestVerifyUint32 {\n  uint32 optional_uint32_1 = 1;\n  uint32 optional_uint32_2 = 2;\n  uint32 optional_uint32_63 = 63;\n  uint32 optional_uint32_64 = 64;\n  TestAllTypes optional_all_types = 9;\n  repeated TestAllTypes repeated_all_types = 10;\n}\n\nmessage TestVerifyOneUint32 {\n  uint32 optional_uint32_1 = 1;\n  int32 optional_int32_2 = 2;\n  int32 optional_int32_63 = 63;\n  int32 optional_int32_64 = 64;\n  TestAllTypes optional_all_types = 9;\n  repeated TestAllTypes repeated_all_types = 10;\n}\n\nmessage TestVerifyOneInt32BigFieldNumber {\n  int32 optional_int32_65 = 65;\n  int64 optional_int64_1 = 1;\n  int64 optional_int64_2 = 2;\n  int64 optional_int64_63 = 63;\n  int64 optional_int64_64 = 64;\n  TestAllTypes optional_all_types = 9;\n  repeated TestAllTypes repeated_all_types = 10;\n}\n\nmessage TestVerifyInt32BigFieldNumber {\n  int32 optional_int32_1000 = 1000;\n  int32 optional_int32_65 = 65;\n  int32 optional_int32_1 = 1;\n  int32 optional_int32_2 = 2;\n  int32 optional_int32_63 = 63;\n  int32 optional_int32_64 = 64;\n  TestAllTypes optional_all_types = 9;\n  repeated TestAllTypes repeated_all_types = 10;\n}\n\nmessage TestVerifyUint32BigFieldNumber {\n  uint32 optional_uint32_1000 = 1000;\n  uint32 optional_uint32_65 = 65;\n  uint32 optional_uint32_1 = 1;\n  uint32 optional_uint32_2 = 2;\n  uint32 optional_uint32_63 = 63;\n  uint32 optional_uint32_64 = 64;\n  TestAllTypes optional_all_types = 9;\n  repeated TestAllTypes repeated_all_types = 10;\n}\n\nmessage TestVerifyBigFieldNumberUint32 {\n  message Nested {\n    uint32 optional_uint32_5000 = 5000;\n    uint32 optional_uint32_1000 = 1000;\n    uint32 optional_uint32_66 = 66;\n    uint32 optional_uint32_65 = 65;\n    uint32 optional_uint32_1 = 1;\n    uint32 optional_uint32_2 = 2;\n    uint32 optional_uint32_63 = 63;\n    uint32 optional_uint32_64 = 64;\n    Nested optional_nested = 9;\n    repeated Nested repeated_nested = 10;\n  }\n\n  Nested optional_nested = 1;\n}\n\n// This message contains different kind of enums to exercise the different\n// parsers in table-driven.\nmessage EnumParseTester {\n  enum SeqSmall0 {\n    SEQ_SMALL_0_DEFAULT = 0;\n    SEQ_SMALL_0_1 = 1;\n    SEQ_SMALL_0_2 = 2;\n  }\n\n  SeqSmall0 optional_seq_small_0_lowfield = 1;\n  SeqSmall0 optional_seq_small_0_midfield = 1001;\n  SeqSmall0 optional_seq_small_0_hifield = 1000001;\n  repeated SeqSmall0 repeated_seq_small_0_lowfield = 2;\n  repeated SeqSmall0 repeated_seq_small_0_midfield = 1002;\n  repeated SeqSmall0 repeated_seq_small_0_hifield = 1000002;\n  repeated SeqSmall0 packed_seq_small_0_lowfield = 3 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated SeqSmall0 packed_seq_small_0_midfield = 1003 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated SeqSmall0 packed_seq_small_0_hifield = 1000003 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  enum SeqSmall1 {\n    SEQ_SMALL_1_DEFAULT = 1;\n    SEQ_SMALL_1_2 = 2;\n    SEQ_SMALL_1_3 = 3;\n  }\n\n  SeqSmall1 optional_seq_small_1_lowfield = 4;\n  SeqSmall1 optional_seq_small_1_midfield = 1004;\n  SeqSmall1 optional_seq_small_1_hifield = 1000004;\n  repeated SeqSmall1 repeated_seq_small_1_lowfield = 5;\n  repeated SeqSmall1 repeated_seq_small_1_midfield = 1005;\n  repeated SeqSmall1 repeated_seq_small_1_hifield = 1000005;\n  repeated SeqSmall1 packed_seq_small_1_lowfield = 6 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated SeqSmall1 packed_seq_small_1_midfield = 1006 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated SeqSmall1 packed_seq_small_1_hifield = 1000006 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  enum SeqLarge {\n    SEQ_LARGE_DEFAULT = -1;\n    SEQ_LARGE_0 = 0;\n    SEQ_LARGE_1 = 1;\n    SEQ_LARGE_2 = 2;\n    SEQ_LARGE_3 = 3;\n    SEQ_LARGE_4 = 4;\n    SEQ_LARGE_5 = 5;\n    SEQ_LARGE_6 = 6;\n    SEQ_LARGE_7 = 7;\n    SEQ_LARGE_8 = 8;\n    SEQ_LARGE_9 = 9;\n    SEQ_LARGE_10 = 10;\n    SEQ_LARGE_11 = 11;\n    SEQ_LARGE_12 = 12;\n    SEQ_LARGE_13 = 13;\n    SEQ_LARGE_14 = 14;\n    SEQ_LARGE_15 = 15;\n    SEQ_LARGE_16 = 16;\n    SEQ_LARGE_17 = 17;\n    SEQ_LARGE_18 = 18;\n    SEQ_LARGE_19 = 19;\n    SEQ_LARGE_20 = 20;\n    SEQ_LARGE_21 = 21;\n    SEQ_LARGE_22 = 22;\n    SEQ_LARGE_23 = 23;\n    SEQ_LARGE_24 = 24;\n    SEQ_LARGE_25 = 25;\n    SEQ_LARGE_26 = 26;\n    SEQ_LARGE_27 = 27;\n    SEQ_LARGE_28 = 28;\n    SEQ_LARGE_29 = 29;\n    SEQ_LARGE_30 = 30;\n    SEQ_LARGE_31 = 31;\n    SEQ_LARGE_32 = 32;\n    SEQ_LARGE_33 = 33;\n  }\n\n  SeqLarge optional_seq_large_lowfield = 7;\n  SeqLarge optional_seq_large_midfield = 1007;\n  SeqLarge optional_seq_large_hifield = 1000007;\n  repeated SeqLarge repeated_seq_large_lowfield = 8;\n  repeated SeqLarge repeated_seq_large_midfield = 1008;\n  repeated SeqLarge repeated_seq_large_hifield = 1000008;\n  repeated SeqLarge packed_seq_large_lowfield = 9 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated SeqLarge packed_seq_large_midfield = 1009 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated SeqLarge packed_seq_large_hifield = 1000009 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  enum Arbitrary {\n    ARBITRARY_DEFAULT = -123123;\n    ARBITRARY_1 = -123;\n    ARBITRARY_2 = 213;\n    ARBITRARY_3 = 213213;\n    ARBITRARY_MIN = -2147483648;\n    ARBITRARY_MAX = 2147483647;\n  }\n\n  Arbitrary optional_arbitrary_lowfield = 10;\n  Arbitrary optional_arbitrary_midfield = 1010;\n  Arbitrary optional_arbitrary_hifield = 1000010;\n  repeated Arbitrary repeated_arbitrary_lowfield = 11;\n  repeated Arbitrary repeated_arbitrary_midfield = 1011;\n  repeated Arbitrary repeated_arbitrary_hifield = 1000011;\n  repeated Arbitrary packed_arbitrary_lowfield = 12 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated Arbitrary packed_arbitrary_midfield = 1012 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated Arbitrary packed_arbitrary_hifield = 1000012 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  extensions 2000000 to max;\n\n  extend EnumParseTester {\n    Arbitrary optional_arbitrary_ext = 2000000;\n    repeated Arbitrary repeated_arbitrary_ext = 2000001;\n    repeated Arbitrary packed_arbitrary_ext = 2000002 [\n      features.repeated_field_encoding = PACKED\n    ];\n  }\n\n  // An arbitrary field we can append to to break the runs of repeated fields.\n  int32 other_field = 99;\n}\n\n// This message contains different kind of bool fields to exercise the different\n// parsers in table-drived.\nmessage BoolParseTester {\n  bool optional_bool_lowfield = 1;\n  bool optional_bool_midfield = 1001;\n  bool optional_bool_hifield = 1000001;\n  repeated bool repeated_bool_lowfield = 2;\n  repeated bool repeated_bool_midfield = 1002;\n  repeated bool repeated_bool_hifield = 1000002;\n  repeated bool packed_bool_lowfield = 3 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated bool packed_bool_midfield = 1003 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated bool packed_bool_hifield = 1000003 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  extensions 2000000 to max;\n\n  extend BoolParseTester {\n    bool optional_bool_ext = 2000000;\n    repeated bool repeated_bool_ext = 2000001;\n    repeated bool packed_bool_ext = 2000002 [\n      features.repeated_field_encoding = PACKED\n    ];\n  }\n\n  // An arbitrary field we can append to to break the runs of repeated fields.\n  int32 other_field = 99;\n}\n\nmessage Int32ParseTester {\n  int32 optional_int32_lowfield = 1;\n  int32 optional_int32_midfield = 1001;\n  int32 optional_int32_hifield = 1000001;\n  repeated int32 repeated_int32_lowfield = 2;\n  repeated int32 repeated_int32_midfield = 1002;\n  repeated int32 repeated_int32_hifield = 1000002;\n  repeated int32 packed_int32_lowfield = 3 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated int32 packed_int32_midfield = 1003 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated int32 packed_int32_hifield = 1000003 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  extensions 2000000 to max;\n\n  extend Int32ParseTester {\n    int32 optional_int32_ext = 2000000;\n    repeated int32 repeated_int32_ext = 2000001;\n    repeated int32 packed_int32_ext = 2000002 [\n      features.repeated_field_encoding = PACKED\n    ];\n  }\n\n  // An arbitrary field we can append to to break the runs of repeated fields.\n  int32 other_field = 99;\n}\n\nmessage Int64ParseTester {\n  int64 optional_int64_lowfield = 1;\n  int64 optional_int64_midfield = 1001;\n  int64 optional_int64_hifield = 1000001;\n  repeated int64 repeated_int64_lowfield = 2;\n  repeated int64 repeated_int64_midfield = 1002;\n  repeated int64 repeated_int64_hifield = 1000002;\n  repeated int64 packed_int64_lowfield = 3 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated int64 packed_int64_midfield = 1003 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  repeated int64 packed_int64_hifield = 1000003 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  extensions 2000000 to max;\n\n  extend Int64ParseTester {\n    int64 optional_int64_ext = 2000000;\n    repeated int64 repeated_int64_ext = 2000001;\n    repeated int64 packed_int64_ext = 2000002 [\n      features.repeated_field_encoding = PACKED\n    ];\n  }\n\n  // An arbitrary field we can append to to break the runs of repeated fields.\n  int32 other_field = 99;\n}\n\nmessage InlinedStringIdxRegressionProto {\n  // We mix data to make sure aux ids and inlined string idx do not match.\n  // aux_idx == inlined_string_idx == 1\n  string str1 = 1;\n\n  // aux_idx == 2\n  InlinedStringIdxRegressionProto sub = 2;\n\n  // aux_idx == 3, inlined_string_idx == 2\n  string str2 = 3;\n\n  // aux_idx == 4, inlined_string_idx == 3\n  bytes str3 = 4;\n}\n\nmessage StringParseTester {\n  string optional_string_lowfield = 1;\n  string optional_string_midfield = 1001;\n  string optional_string_hifield = 1000001;\n  repeated string repeated_string_lowfield = 2;\n  repeated string repeated_string_midfield = 1002;\n  repeated string repeated_string_hifield = 1000002;\n\n  extensions 2000000 to max;\n\n  extend StringParseTester {\n    string optional_string_ext = 2000000;\n    repeated string repeated_string_ext = 2000001;\n  }\n}\n\nmessage BadFieldNames {\n  int32 OptionalInt32 = 1;\n  int32 for = 2;\n}\n\nmessage TestNestedMessageRedaction {\n  string optional_unredacted_nested_string = 1;\n  string optional_redacted_nested_string = 2 [\n    debug_redact = true\n  ];\n}\n\nmessage RedactedFields {\n  string optional_redacted_string = 1 [\n    debug_redact = true\n  ];\n\n  string optional_unredacted_string = 2;\n  repeated string repeated_redacted_string = 3 [\n    debug_redact = true\n  ];\n\n  repeated string repeated_unredacted_string = 4;\n  TestNestedMessageRedaction optional_redacted_message = 5 [\n    debug_redact = true\n  ];\n\n  TestNestedMessageRedaction optional_unredacted_message = 6;\n  repeated TestNestedMessageRedaction repeated_redacted_message = 7 [\n    debug_redact = true\n  ];\n\n  repeated TestNestedMessageRedaction repeated_unredacted_message = 8;\n  map<string, string> map_redacted_string = 9 [\n    debug_redact = true\n  ];\n\n  map<string, string> map_unredacted_string = 10;\n  string optional_redacted_false_string = 11 [\n    debug_redact = false\n  ];\n\n  extensions 20 to 30;\n}\n\nextend RedactedFields {\n  string redacted_extension = 20 [\n    debug_redact = true\n  ];\n}\n\nmessage TestString {\n  string optional_string = 1;\n}\n\nmessage TestCord {\n  bytes optional_bytes_cord = 1 [\n    ctype = CORD\n  ];\n\n  bytes optional_bytes_cord_default = 2 [\n    ctype = CORD,\n    default = \"hello\"\n  ];\n}\n\nmessage TestPackedEnumSmallRange {\n  enum NestedEnum {\n    UNSPECIFIED = 0;\n    FOO = 1;\n    BAR = 2;\n    BAZ = 3;\n  }\n\n  repeated NestedEnum vals = 1 [\n    features.repeated_field_encoding = PACKED\n  ];\n}\n\nmessage EnumsForBenchmark {\n  enum Flat {\n    A0 = 0;\n    A1 = 1;\n    A2 = 2;\n    A3 = 3;\n    A4 = 4;\n    A5 = 5;\n    A6 = 6;\n    A7 = 7;\n    A8 = 8;\n    A9 = 9;\n    A10 = 10;\n    A11 = 11;\n    A12 = 12;\n    A13 = 13;\n    A14 = 14;\n    A15 = 15;\n  }\n\n  // Has a few holes, bitmap can be used.\n  enum AlmostFlat {\n    B0 = 0;\n    B1 = 1;\n    B2 = 2;\n    B3 = 3;\n    B5 = 5;\n    B6 = 6;\n    B7 = 7;\n    B8 = 8;\n    B9 = 9;\n    B11 = 11;\n    B12 = 12;\n    B13 = 13;\n    B14 = 14;\n    B15 = 15;\n    B17 = 17;\n    B19 = 19;\n  }\n\n  enum Sparse {\n    C536 = 536;\n    C8387 = 8387;\n    C9673 = 9673;\n    C10285 = 10285;\n    C13318 = 13318;\n    C15963 = 15963;\n    C16439 = 16439;\n    C18197 = 18197;\n    C19430 = 19430;\n    C20361 = 20361;\n    C20706 = 20706;\n    C21050 = 21050;\n    C21906 = 21906;\n    C27265 = 27265;\n    C30109 = 30109;\n    C31670 = 31670;\n  }\n}\n\nmessage TestMessageWithManyRepeatedPtrFields {\n  repeated string repeated_string_1 = 1;\n  repeated string repeated_string_2 = 2;\n  repeated string repeated_string_3 = 3;\n  repeated string repeated_string_4 = 4;\n  repeated string repeated_string_5 = 5;\n  repeated string repeated_string_6 = 6;\n  repeated string repeated_string_7 = 7;\n  repeated string repeated_string_8 = 8;\n  repeated string repeated_string_9 = 9;\n  repeated string repeated_string_10 = 10;\n  repeated string repeated_string_11 = 11;\n  repeated string repeated_string_12 = 12;\n  repeated string repeated_string_13 = 13;\n  repeated string repeated_string_14 = 14;\n  repeated string repeated_string_15 = 15;\n  repeated string repeated_string_16 = 16;\n  repeated string repeated_string_17 = 17;\n  repeated string repeated_string_18 = 18;\n  repeated string repeated_string_19 = 19;\n  repeated string repeated_string_20 = 20;\n  repeated string repeated_string_21 = 21;\n  repeated string repeated_string_22 = 22;\n  repeated string repeated_string_23 = 23;\n  repeated string repeated_string_24 = 24;\n  repeated string repeated_string_25 = 25;\n  repeated string repeated_string_26 = 26;\n  repeated string repeated_string_27 = 27;\n  repeated string repeated_string_28 = 28;\n  repeated string repeated_string_29 = 29;\n  repeated string repeated_string_30 = 30;\n  repeated string repeated_string_31 = 31;\n  repeated string repeated_string_32 = 32;\n}\n\nmessage MessageCreatorZeroInit {\n  int32 i = 1;\n  double d = 2;\n  MessageCreatorZeroInit m = 3;\n\n  oneof one {\n    string os = 10;\n    string oc = 11 [\n      ctype = CORD\n    ];\n\n    fixed64 of = 12;\n    MessageCreatorZeroInit ol = 13 [\n      lazy = true\n    ];\n  }\n}\n\nmessage MessageCreatorMemcpy {\n  string s = 1;\n  repeated int32 i = 2 [\n    features.repeated_field_encoding = PACKED\n  ];\n\n  MessageCreatorMemcpy m = 3 [\n    lazy = true\n  ];\n\n  map<int32, int32> m2 = 4;\n}\n\nmessage MessageCreatorFunc {\n  // This one is ArenaDtorNeeds::kRequired so we must run the constructor.\n  string c = 3 [\n    ctype = CORD\n  ];\n}\n\nmessage FastParseTableCompression {\n  int32 important_field_1 = 1;\n  int32 important_field_2 = 2;\n  int32 unimportant_field_3 = 3;\n  int32 unimportant_field_4 = 4;\n  int32 unimportant_field_5 = 5;\n  reserved 6, 7, 8;\n\n  int32 unimportant_field_9 = 9;\n  reserved 10;\n  int32 important_field_11 = 11;\n  int32 unimportant_field_12 = 12;\n  reserved 13;\n  int32 important_field_14 = 14;\n  int32 unimportant_field_15 = 15;\n  reserved 16;\n}\n\nmessage TestMessageForMove_Small {\n  int32 a = 1;\n  int32 b = 2;\n}\n\nmessage TestMessageForMove_Large {\n  int32 a1 = 1;\n  int32 a2 = 2;\n  int32 a3 = 3;\n  int32 a4 = 4;\n  int32 a5 = 5;\n  int32 a6 = 6;\n  int32 a7 = 7;\n  int32 a8 = 8;\n  int32 a9 = 9;\n  repeated int32 a11 = 11;\n  repeated int32 a12 = 12;\n  repeated int32 a13 = 13;\n  repeated int32 a14 = 14;\n  repeated int32 a15 = 15;\n  repeated int32 a16 = 16;\n  repeated int32 a17 = 17;\n  repeated int32 a18 = 18;\n  repeated int32 a19 = 19;\n  string s101 = 101;\n  string s102 = 102;\n  string s103 = 103;\n  string s104 = 104;\n  string s105 = 105;\n  string s106 = 106;\n  string s107 = 107;\n  string s108 = 108;\n  string s109 = 109;\n  repeated string s111 = 111;\n  repeated string s112 = 112;\n  repeated string s113 = 113;\n  repeated string s114 = 114;\n  repeated string s115 = 115;\n  repeated string s116 = 116;\n  repeated string s117 = 117;\n  repeated string s118 = 118;\n  repeated string s119 = 119;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/google/protobuf/unittest_import.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file or at\n// https://developers.google.com/open-source/licenses/bsd\n\n// Author: kenton@google.com (Kenton Varda)\n//  Based on original Protocol Buffers design by\n//  Sanjay Ghemawat, Jeff Dean, and others.\n//\n// A proto file which is imported by unittest.proto to test importing.\n\nsyntax = \"proto2\";\n\n// We don't put this in a package within proto2 because we need to make sure\n// that the generated code doesn't depend on being in the proto2 namespace.\n// In test_util.h we do\n// \"using namespace unittest_import = proto2_unittest_import\".\npackage proto2_unittest_import;\n\noption optimize_for = SPEED;\noption cc_enable_arenas = true;\n\n// Exercise the java_package option.\noption java_package = \"com.google.protobuf.test\";\n\n// Do not set a java_outer_classname here to verify that Proto2 works without\n// one.\n\n// Test public import\nimport public \"google/protobuf/unittest_import_public.proto\";\n\nmessage ImportMessage {\n  optional int32 d = 1;\n}\n\nenum ImportEnum {\n  IMPORT_FOO = 7;\n  IMPORT_BAR = 8;\n  IMPORT_BAZ = 9;\n}\n\n// To use an enum in a map, it must has the first value as 0.\nenum ImportEnumForMap {\n  UNKNOWN = 0;\n  FOO = 1;\n  BAR = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/google/protobuf/unittest_import_public.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file or at\n// https://developers.google.com/open-source/licenses/bsd\n\n// Author: liujisi@google.com (Pherl Liu)\n\nsyntax = \"proto2\";\n\npackage proto2_unittest_import;\n\noption java_package = \"com.google.protobuf.test\";\n\nmessage PublicImportMessage {\n  optional int32 e = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/google/protobuf/unittest_optimize_for.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file or at\n// https://developers.google.com/open-source/licenses/bsd\n\n// Author: kenton@google.com (Kenton Varda)\n//  Based on original Protocol Buffers design by\n//  Sanjay Ghemawat, Jeff Dean, and others.\n//\n// A proto file which uses optimize_for = CODE_SIZE.\n\nsyntax = \"proto2\";\n\npackage proto2_unittest;\n\nimport \"google/protobuf/unittest.proto\";\n\noption optimize_for = CODE_SIZE;\n\nmessage TestOptimizedForSize {\n  optional int32 i = 1;\n  optional ForeignMessage msg = 19;\n\n  extensions 1000 to max;\n\n  extend TestOptimizedForSize {\n    optional int32 test_extension = 1234;\n    optional TestRequiredOptimizedForSize test_extension2 = 1235;\n  }\n\n  oneof foo {\n    int32 integer_field = 2;\n    string string_field = 3;\n  }\n}\n\nmessage TestRequiredOptimizedForSize {\n  required int32 x = 1;\n}\n\nmessage TestOptionalOptimizedForSize {\n  optional TestRequiredOptimizedForSize o = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/google/protobuf/unittest_well_known_types.proto",
    "content": "syntax = \"proto3\";\n\npackage protobuf_unittest;\n\noption csharp_namespace = \"Google.Protobuf.TestProtos\";\noption java_multiple_files = true;\noption java_package = \"com.google.protobuf.test\";\n\nimport \"google/protobuf/any.proto\";\nimport \"google/protobuf/api.proto\";\nimport \"google/protobuf/duration.proto\";\nimport \"google/protobuf/empty.proto\";\nimport \"google/protobuf/field_mask.proto\";\nimport \"google/protobuf/source_context.proto\";\nimport \"google/protobuf/struct.proto\";\nimport \"google/protobuf/timestamp.proto\";\nimport \"google/protobuf/type.proto\";\nimport \"google/protobuf/wrappers.proto\";\n\n// Test that we can include all well-known types. Each wrapper type is included\n// separately, as languages map handle different wrappers in different ways.\nmessage TestWellKnownTypes {\n    google.protobuf.Any any_field = 1;\n    google.protobuf.Api api_field = 2;\n    google.protobuf.BoolValue bool_value_field = 3;\n    google.protobuf.BytesValue bytes_value_field = 4;\n    google.protobuf.DoubleValue double_value_field = 5;\n    google.protobuf.Duration duration_field = 6;\n    google.protobuf.Empty empty_field = 7;\n    google.protobuf.Enum enum_field = 8;\n    google.protobuf.EnumValue enum_value_field = 9;\n    google.protobuf.Field field_field = 10;\n    google.protobuf.Field.Cardinality field_cardinality_field = 11;\n    google.protobuf.Field.Kind field_kind_field = 12;\n    google.protobuf.FieldMask field_mask_field = 13;\n    google.protobuf.FloatValue float_value_field = 14;\n    google.protobuf.Int32Value int32_value_field = 15;\n    google.protobuf.Int64Value int64_value_field = 16;\n    google.protobuf.ListValue list_value_field = 17;\n    google.protobuf.Method method_field = 18;\n    google.protobuf.Mixin mixin_field = 19;\n    google.protobuf.NullValue null_value_field = 20;\n    google.protobuf.Option option_field = 21;\n    google.protobuf.SourceContext source_context_field = 22;\n    google.protobuf.StringValue string_value_field = 23;\n    google.protobuf.Struct struct_field = 24;\n    google.protobuf.Syntax syntax_field = 25;\n    google.protobuf.Timestamp timestamp_field = 26;\n    google.protobuf.Type type_field = 27;\n    google.protobuf.UInt32Value uint32_value_field = 28;\n    google.protobuf.UInt64Value uint64_value_field = 29;\n    google.protobuf.Value value_field = 30;\n}\n\n// A repeated field for each well-known type.\nmessage RepeatedWellKnownTypes {\n  repeated google.protobuf.Any any_field = 1;\n  repeated google.protobuf.Api api_field = 2;\n  repeated google.protobuf.BoolValue bool_value_field = 3;\n  repeated google.protobuf.BytesValue bytes_value_field = 4;\n  repeated google.protobuf.DoubleValue double_value_field = 5;\n  repeated google.protobuf.Duration duration_field = 6;\n  repeated google.protobuf.Empty empty_field = 7;\n  repeated google.protobuf.Enum enum_field = 8;\n  repeated google.protobuf.EnumValue enum_value_field = 9;\n  repeated google.protobuf.Field field_field = 10;\n  repeated google.protobuf.Field.Cardinality field_cardinality_field = 11;\n  repeated google.protobuf.Field.Kind field_kind_field = 12;\n  repeated google.protobuf.FieldMask field_mask_field = 13;\n  repeated google.protobuf.FloatValue float_value_field = 14;\n  repeated google.protobuf.Int32Value int32_value_field = 15;\n  repeated google.protobuf.Int64Value int64_value_field = 16;\n  repeated google.protobuf.ListValue list_value_field = 17;\n  repeated google.protobuf.Method method_field = 18;\n  repeated google.protobuf.Mixin mixin_field = 19;\n  repeated google.protobuf.NullValue null_value_field = 20;\n  repeated google.protobuf.Option option_field = 21;\n  repeated google.protobuf.SourceContext source_context_field = 22;\n  repeated google.protobuf.StringValue string_value_field = 23;\n  repeated google.protobuf.Struct struct_field = 24;\n  repeated google.protobuf.Syntax syntax_field = 25;\n  repeated google.protobuf.Timestamp timestamp_field = 26;\n  repeated google.protobuf.Type type_field = 27;\n  repeated google.protobuf.UInt32Value uint32_value_field = 28;\n  repeated google.protobuf.UInt64Value uint64_value_field = 29;\n  repeated google.protobuf.Value value_field = 30;\n}\n\nmessage OneofWellKnownTypes {\n  oneof oneof_field {\n      google.protobuf.Any any_field = 1;\n      google.protobuf.Api api_field = 2;\n      google.protobuf.BoolValue bool_value_field = 3;\n      google.protobuf.BytesValue bytes_value_field = 4;\n      google.protobuf.DoubleValue double_value_field = 5;\n      google.protobuf.Duration duration_field = 6;\n      google.protobuf.Empty empty_field = 7;\n      google.protobuf.Enum enum_field = 8;\n      google.protobuf.EnumValue enum_value_field = 9;\n      google.protobuf.Field field_field = 10;\n      google.protobuf.Field.Cardinality field_cardinality_field = 11;\n      google.protobuf.Field.Kind field_kind_field = 12;\n      google.protobuf.FieldMask field_mask_field = 13;\n      google.protobuf.FloatValue float_value_field = 14;\n      google.protobuf.Int32Value int32_value_field = 15;\n      google.protobuf.Int64Value int64_value_field = 16;\n      google.protobuf.ListValue list_value_field = 17;\n      google.protobuf.Method method_field = 18;\n      google.protobuf.Mixin mixin_field = 19;\n      google.protobuf.NullValue null_value_field = 20;\n      google.protobuf.Option option_field = 21;\n      google.protobuf.SourceContext source_context_field = 22;\n      google.protobuf.StringValue string_value_field = 23;\n      google.protobuf.Struct struct_field = 24;\n      google.protobuf.Syntax syntax_field = 25;\n      google.protobuf.Timestamp timestamp_field = 26;\n      google.protobuf.Type type_field = 27;\n      google.protobuf.UInt32Value uint32_value_field = 28;\n      google.protobuf.UInt64Value uint64_value_field = 29;\n      google.protobuf.Value value_field = 30;\n  }\n}\n\n// A map field for each well-known type. We only need to worry about the value\n// part of the map being the well-known types, as messages can't be map keys.\nmessage MapWellKnownTypes {\n    map<int32, google.protobuf.Any> any_field = 1;\n    map<int32, google.protobuf.Api> api_field = 2;\n    map<int32, google.protobuf.BoolValue> bool_value_field = 3;\n    map<int32, google.protobuf.BytesValue> bytes_value_field = 4;\n    map<int32, google.protobuf.DoubleValue> double_value_field = 5;\n    map<int32, google.protobuf.Duration> duration_field = 6;\n    map<int32, google.protobuf.Empty> empty_field = 7;\n    map<int32, google.protobuf.Enum> enum_field = 8;\n    map<int32, google.protobuf.EnumValue> enum_value_field = 9;\n    map<int32, google.protobuf.Field> field_field = 10;\n    map<int32, google.protobuf.Field.Cardinality> field_cardinality_field = 11;\n    map<int32, google.protobuf.Field.Kind> field_kind_field = 12;\n    map<int32, google.protobuf.FieldMask> field_mask_field = 13;\n    map<int32, google.protobuf.FloatValue> float_value_field = 14;\n    map<int32, google.protobuf.Int32Value> int32_value_field = 15;\n    map<int32, google.protobuf.Int64Value> int64_value_field = 16;\n    map<int32, google.protobuf.ListValue> list_value_field = 17;\n    map<int32, google.protobuf.Method> method_field = 18;\n    map<int32, google.protobuf.Mixin> mixin_field = 19;\n    map<int32, google.protobuf.NullValue> null_value_field = 20;\n    map<int32, google.protobuf.Option> option_field = 21;\n    map<int32, google.protobuf.SourceContext> source_context_field = 22;\n    map<int32, google.protobuf.StringValue> string_value_field = 23;\n    map<int32, google.protobuf.Struct> struct_field = 24;\n    map<int32, google.protobuf.Syntax> syntax_field = 25;\n    map<int32, google.protobuf.Timestamp> timestamp_field = 26;\n    map<int32, google.protobuf.Type> type_field = 27;\n    map<int32, google.protobuf.UInt32Value> uint32_value_field = 28;\n    map<int32, google.protobuf.UInt64Value> uint64_value_field = 29;\n    map<int32, google.protobuf.Value> value_field = 30;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/high_tagnumber.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage high_tagnumber;\n\nmessage M {\n  // Make sure that we handle 29 bits of tagnumber.\n  // (1 << 28) + 1\n  optional int32 a = 268435457;\n  // (1 << 29) - 1\n  optional int32 b = 536870911;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/import_clash.proto",
    "content": "// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage import_clash;\n\nimport \"foo.proto\";\n\nmessage Clasher {\n  required foo.Foo foo = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/import_option.proto",
    "content": "edition = \"2024\";\n\npackage import_option;\n\nimport option \"custom_option.proto\";\nimport option \"custom_option_unlinked.proto\";\n\nmessage MessageWithOptions {\n  option (custom_option.my_option) = \"Hello world!\";\n  option (custom_option.unlinked_option) = 99;\n\n  string a = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/import_public.proto",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage import_public;\n\n// A public import can be used in the file importing this file. Similar to a\n// Dart export.\n//\n// See https://developers.google.com/protocol-buffers/docs/proto#importing-definitions\nimport public \"foo.proto\";\n\nmessage A {\n  optional foo.Foo a = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/json_name.proto",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\n\npackage json_name;\n\nmessage JsonNamedMessage {\n  int32 foo_name = 1 [json_name = \"barName\"];\n\n  int32 invalid_name = 2 [json_name = \"$name\"];\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/map_api.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage protobuf_unittest;\n\nimport \"dart_options.proto\";\n\nmessage Rec {\n  option (dart_options.mixin) = \"PbMapMixin\";\n\n  optional int32 num = 1;\n  repeated int32 nums = 2;\n  optional string str = 3;\n  optional NonMap msg = 4;\n}\n\nmessage NonMap {\n  optional string str = 1;\n  optional NonMap child = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/map_api2.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage protobuf_unittest;\n\nimport \"dart_options.proto\";\n\noption (dart_options.default_mixin) = \"PbMapMixin\";\n\nmessage Rec2 {\n  optional int32 num = 1;\n  repeated int32 nums = 2;\n  optional string str = 3;\n}\n\nmessage NonMap2 {\n  option (dart_options.mixin) = \"\";\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/map_enum_value.proto",
    "content": "// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage map_enum_value;\n\n// Test mapped enum value before with unknown values.\nmessage MapEnumValue {\n  enum NestedEnum {\n    // Unknown values should default to this.\n    UNKNOWN = 0;\n    // A known value to test control.\n    NEW_VALUE = 1;\n  }\n  map<string, NestedEnum> values = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/map_field.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage protobuf_unittest;\n\nmessage TestMap {\n    message MessageValue {\n        optional int32 value = 1;\n        optional int32 second_value = 2 [default = 42];\n    }\n\n    enum EnumValue {\n        DEFAULT = 0;\n        BAR = 1;\n        BAZ = 2;\n        ZOP = 3;\n    }\n\n    map<int32, int32>        int32_to_int32_field = 1;\n    map<int32, int64>        int32_to_int64_field = 2;\n    map<int32, uint32>       int32_to_uint32_field = 3;\n    map<int32, uint64>       int32_to_uint64_field = 4;\n    map<int32, sint32>       int32_to_sint32_field = 5;\n    map<int32, sint64>       int32_to_sint64_field = 6;\n    map<int32, fixed32>      int32_to_fixed32_field = 7;\n    map<int32, fixed64>      int32_to_fixed64_field = 8;\n    map<int32, sfixed32>     int32_to_sfixed32_field = 9;\n    map<int32, sfixed64>     int32_to_sfixed64_field = 10;\n    map<int32, float>        int32_to_float_field = 11;\n    map<int32, double>       int32_to_double_field = 12;\n    map<int32, bool>         int32_to_bool_field = 13;\n    map<int32, string>       int32_to_string_field = 14;\n    map<int32, bytes>        int32_to_bytes_field = 15;\n    map<int32, EnumValue>    int32_to_enum_field = 16;\n    map<int32, MessageValue> int32_to_message_field = 17;\n\n    map<int64, int32>        int64_to_int32_field = 18;\n    map<uint32, int32>       uint32_to_int32_field = 19;\n    map<uint64, int32>       uint64_to_int32_field = 20;\n    map<sint32, int32>       sint32_to_int32_field = 21;\n    map<sint64, int32>       sint64_to_int32_field = 22;\n    map<fixed32, int32>      fixed32_to_int32_field = 23;\n    map<fixed64, int32>      fixed64_to_int32_field = 24;\n    map<sfixed32, int32>     sfixed32_to_int32_field = 25;\n    map<sfixed64, int32>     sfixed64_to_int32_field = 26;\n    map<bool, int32>         bool_to_int32_field = 27;\n    map<string, int32>       string_to_int32_field = 28;\n}\n\nmessage Inner  {\n    map<string, string> inner_map = 1;\n}\n\nmessage Outer {\n    optional Inner i = 1;\n}\n\nmessage Desugared {\n    message Int32ToString {\n        optional int32 key = 1;\n        optional string value = 2;\n    }\n    message StringToInt32 {\n        optional string key = 1;\n        optional int32 value = 2;\n    }\n    repeated Int32ToString int32_to_string_field = 14;\n    repeated StringToInt32 string_to_int32_field = 28;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/message_set.proto",
    "content": "// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\nmessage MessageSet {\n  option message_set_wire_format = true;\n\n  extensions 4 to 524999999;\n  extensions 525000000 to max;\n}\n\nmessage TestMessage {\n  extend MessageSet {\n    optional ExtensionMessage1 ext1 = 1758024;\n    optional ExtensionMessage2 ext2 = 1832098;\n  }\n\n  optional MessageSet info = 1;\n  optional int32 i = 2;\n}\n\nmessage ExtensionMessage1 {\n  optional int32 a = 1;\n  optional string b = 2;\n  optional ExtensionMessage2 c = 3;\n}\n\nmessage ExtensionMessage2 {\n  repeated int32 ints = 5;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/mixins.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage mixins;\n\nimport \"dart_options.proto\";\n\noption (dart_options.imports) = {\n  mixins: [{\n    name: \"Mixin1\"\n    import_from: \"package:protoc_plugin/testing/mixins.dart\"\n  },\n  {\n    name: \"Mixin2\"\n    import_from: \"package:protoc_plugin/testing/mixins.dart\"\n  },\n  {\n    name: \"Mixin3\"\n    import_from: \"package:protoc_plugin/testing/mixins.dart\"\n    parent: \"Mixin1\"\n  }];\n};\n\noption (dart_options.default_mixin) = \"Mixin1\";\n\nmessage NoMixinPB {\n  option (dart_options.mixin) = \"\";\n}\n\nmessage Mixin1PB {\n  optional string interface_string = 1 [\n    (dart_options.override_getter) = true,\n    (dart_options.override_setter) = true,\n    (dart_options.override_has_method) = true\n  ];\n}\n\nmessage Mixin2PB {\n  option (dart_options.mixin) = \"Mixin2\";\n\n  optional string overridden_has_method = 3 [\n    (dart_options.override_has_method) = true\n  ];\n}\n\nmessage Mixin3PB {\n  option (dart_options.mixin) = \"Mixin3\";\n\n  optional string interface_string = 1 [\n    (dart_options.override_getter) = true,\n    (dart_options.override_setter) = true,\n    (dart_options.override_has_method) = true\n  ];\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/multiple_files_test.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file or at\n// https://developers.google.com/open-source/licenses/bsd\n\n// Author: kenton@google.com (Kenton Varda)\n//\n// A proto file which tests the java_multiple_files option.\n\nedition = \"2023\";\n\n// Some generic_services option(s) added automatically.\n// See:  http://go/proto2-generic-services-default\npackage proto2_unittest;\n\nimport \"google/protobuf/descriptor.proto\";\nimport \"google/protobuf/unittest.proto\";\n\noption features.enum_type = CLOSED;\noption java_generic_services = true;  // auto-added\noption java_multiple_files = true;\noption java_outer_classname = \"MultipleFilesTestProto\";\n\nmessage MessageWithNoOuter {\n  message NestedMessage {\n    int32 i = 1;\n  }\n\n  enum NestedEnum {\n    BAZ = 3;\n  }\n\n  NestedMessage nested = 1;\n  repeated TestAllTypes foreign = 2;\n  NestedEnum nested_enum = 3;\n  EnumWithNoOuter foreign_enum = 4;\n}\n\nextend google.protobuf.EnumValueOptions {\n  int32 enum_value_option = 7654321;\n}\n\nenum EnumWithNoOuter {\n  FOO = 1 [(enum_value_option) = 12345];\n\n  BAR = 2;\n}\n\nservice ServiceWithNoOuter {\n  rpc Foo(MessageWithNoOuter) returns (TestAllTypes);\n}\n\nextend TestAllExtensions {\n  int32 extension_with_outer = 1234567;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/nested_any.proto",
    "content": "// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\n\npackage nested_any;\n\nimport \"google/protobuf/any.proto\";\n\nmessage AnyMessage1 {\n  google.protobuf.Any any_field1 = 1;\n  string value = 2;\n}\n\nmessage AnyMessage2 {\n  google.protobuf.Any any_field2 = 1;\n  string value = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/nested_extension.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// http://code.google.com/p/protobuf/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Author: Darick Tong (darick@google.com)\n//\n// A proto file with nested extensions. Note that this must be defined in\n// a separate file to properly test the initialization of the outer class.\n\nsyntax = \"proto2\";\n\npackage protobuf_unittest;\n\nimport \"non_nested_extension.proto\";\n\nmessage MyNestedExtension {\n  extend MessageToBeExtended {\n    optional MessageToBeExtended recursiveExtension = 2;\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/nested_message.proto",
    "content": "// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\n\npackage nested_message;\n\nmessage Top {\n  repeated Nested nested_message_list = 1;\n  map<int32, Nested> nested_message_map = 2;\n  Nested nested_message = 3;\n}\n\nmessage Nested {\n  int32 a = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/non_nested_extension.proto",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// http://code.google.com/p/protobuf/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Author: Darick Tong (darick@google.com)\n//\n// A proto file with extensions.\n\nsyntax = \"proto2\";\n\npackage protobuf_unittest;\n\nmessage MessageToBeExtended {\n  extensions 1 to max;\n}\n\nmessage MyNonNestedExtension {\n}\n\nextend MessageToBeExtended {\n  optional MyNonNestedExtension nonNestedExtension = 1;\n}\n\n"
  },
  {
    "path": "protoc_plugin/test/protos/oneof.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\n\npackage protobuf_unittest;\n\nmessage Bar {\n  int32 i = 1;\n}\n\nenum EnumType {\n  DEFAULT = 0;\n  A = 1;\n}\n\nmessage Foo {\n  oneof oneof_field {\n    string first = 1;\n    int32 second = 5;\n    bool third = 3;\n    bytes fourth = 7;\n    Bar index = 8;\n    EnumType values = 6;\n  }\n\n  oneof colors {\n    string red = 2;\n    string green = 4;\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/package1.proto",
    "content": "// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage pkg1;\n\nmessage M {\n  message M {\n    optional int32 x = 1;\n  }\n  optional int32 a = 1;\n  optional string b = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/package2.proto",
    "content": "// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage pkg1.pkg2;\n\nmessage M {\n  message M {\n    optional int32 x = 1;\n  }\n  optional int32 a = 1;\n  optional string b = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/package3.proto",
    "content": "// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage pkg1_pkg2;\n\nmessage M {\n  message M {\n    optional int32 x = 1;\n  }\n  optional int32 a = 1;\n  optional string b = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/proto2_repeated.proto",
    "content": "// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage proto2_repeated;\n\nmessage Proto2Repeated {\n  repeated int32 ints_default = 1;\n  repeated int32 ints_packed = 2 [packed=true];\n  repeated int32 ints_not_packed = 3 [packed=false];\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/proto3_optional.proto",
    "content": "// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\n\npackage third_party.dart.protoc_plugin.test.protos;\n\nmessage Foo {\n  optional int32 optional_field = 1;\n  int32 non_optional_field = 2;\n  optional Submessage optional_submessage = 3;\n  Submessage non_optional_submessage = 4;\n\n}\n\nmessage Submessage {\n int32 a = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/proto3_repeated.proto",
    "content": "// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\n\npackage proto3_repeated;\n\nmessage Proto3Repeated {\n  repeated int32 ints_default = 1;\n  repeated int32 ints_packed = 2 [packed=true];\n  repeated int32 ints_not_packed = 3 [packed=false];\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/reserved_names.proto",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage protobuf_unittest;\n\nmessage ReservedNamesOptional {\n  // Conflicts with Object.\n  optional int32 hash_code = 1;\n  optional int32 no_such_method = 2;\n  optional int32 runtime_type = 3;\n  optional int32 to_string = 4;\n\n  // Conflicts with GeneratedMessage.\n  optional int32 has_required_fields = 12;\n  optional int32 is_initialized = 13;\n  optional int32 clear = 14;\n  optional int32 get_tag_number = 15;\n  optional int32 check = 16;\n  optional int32 write_to_buffer = 17;\n  optional int32 write_to_coded_buffer_writer = 18;\n  optional int32 merge_from_coded_buffer_reader = 19;\n  optional int32 merge_from_buffer = 20;\n  optional int32 write_to_json = 21;\n  optional int32 merge_from_json = 22;\n  optional int32 add_extension = 23;\n  optional int32 get_extension = 24;\n  optional int32 set_extension = 25;\n  optional int32 has_extension = 26;\n  optional int32 clear_extension = 27;\n  optional int32 get_field = 28;\n  optional int32 set_field = 29;\n  optional int32 has_field = 30;\n  optional int32 clear_field = 31;\n  optional int32 extensions_are_initialized = 32;\n  optional int32 merge_from_message = 33;\n  optional int32 merge_unknown_fields = 34;\n\n  // Other conflicts.\n  optional int32 hash_code_1 = 40;\n  optional int32 create = 41;\n  optional int32 create_repeated = 42;\n\n  optional int32 x = 50;\n  optional int32 has_x = 51;\n  optional int32 clear_x = 53;\n  optional int32 has_x_51 = 54;\n  optional int32 clear_x_53 = 55;\n}\n\nmessage ReservedNamesRepeated {\n  // Conflicts with Object.\n  repeated int32 hash_code = 1;\n  repeated int32 no_such_method = 2;\n  repeated int32 runtime_type = 3;\n  repeated int32 to_string = 4;\n\n  // Conflicts with GeneratedMessage.\n  repeated int32 has_required_fields = 12;\n  repeated int32 is_initialized = 13;\n  repeated int32 clear = 14;\n  repeated int32 get_tag_number = 15;\n  repeated int32 check = 16;\n  repeated int32 write_to_buffer = 17;\n  repeated int32 write_to_coded_buffer_writer = 18;\n  repeated int32 merge_from_coded_buffer_reader = 19;\n  repeated int32 merge_from_buffer = 20;\n  repeated int32 write_to_json = 21;\n  repeated int32 merge_from_json = 22;\n  repeated int32 add_extension = 23;\n  repeated int32 get_extension = 24;\n  repeated int32 set_extension = 25;\n  repeated int32 has_extension = 26;\n  repeated int32 clear_extension = 27;\n  repeated int32 get_field = 28;\n  repeated int32 set_field = 29;\n  repeated int32 has_field = 30;\n  repeated int32 clear_field = 31;\n  repeated int32 extensions_are_initialized = 32;\n  repeated int32 merge_from_message = 33;\n  repeated int32 merge_unknown_fields = 34;\n\n  // Other conflicts.\n  repeated int32 hash_code_1 = 40;\n  repeated int32 create = 41;\n  repeated int32 create_repeated = 42;\n\n  repeated int32 x = 50;\n  repeated int32 has_x = 51;\n  repeated int32 clear_x = 53;\n  repeated int32 has_x_51 = 54;\n  repeated int32 clear_x_53 = 55;\n}\n\nmessage ReservedNamesRequired {\n  // Conflicts with Object.\n  required int32 hash_code = 1;\n  required int32 no_such_method = 2;\n  required int32 runtime_type = 3;\n  required int32 to_string = 4;\n\n  // Conflicts with GeneratedMessage.\n  required int32 has_required_fields = 12;\n  required int32 is_initialized = 13;\n  required int32 clear = 14;\n  required int32 get_tag_number = 15;\n  required int32 check = 16;\n  required int32 write_to_buffer = 17;\n  required int32 write_to_coded_buffer_writer = 18;\n  required int32 merge_from_coded_buffer_reader = 19;\n  required int32 merge_from_buffer = 20;\n  required int32 write_to_json = 21;\n  required int32 merge_from_json = 22;\n  required int32 add_extension = 23;\n  required int32 get_extension = 24;\n  required int32 set_extension = 25;\n  required int32 has_extension = 26;\n  required int32 clear_extension = 27;\n  required int32 get_field = 28;\n  required int32 set_field = 29;\n  required int32 has_field = 30;\n  required int32 clear_field = 31;\n  required int32 extensions_are_initialized = 32;\n  required int32 merge_from_message = 33;\n  required int32 merge_unknown_fields = 34;\n\n  // Other conflicts.\n  required int32 hash_code_1 = 40;\n  required int32 create = 41;\n  required int32 create_repeated = 42;\n\n  required int32 x = 50;\n  required int32 has_x = 51;\n  required int32 clear_x = 53;\n  required int32 has_x_51 = 54;\n  required int32 clear_x_53 = 55;\n}\n\nmessage ReservedWordsOptional {\n  optional int32 assert = 1;\n  optional int32 break = 2;\n  optional int32 case = 3;\n  optional int32 catch = 4;\n  optional int32 class = 5;\n  optional int32 const = 6;\n  optional int32 continue = 7;\n  optional int32 default = 8;\n  optional int32 do = 9;\n  optional int32 else = 10;\n  optional int32 enum = 11;\n  optional int32 extends = 12;\n  optional int32 false = 13;\n  optional int32 final = 14;\n  optional int32 finally = 15;\n  optional int32 for = 16;\n  optional int32 if = 17;\n  optional int32 in = 18;\n  optional int32 is = 19;\n  optional int32 new = 20;\n  optional int32 null = 21;\n  optional int32 rethrow = 22;\n  optional int32 return = 23;\n  optional int32 super = 24;\n  optional int32 switch = 25;\n  optional int32 this = 26;\n  optional int32 throw = 27;\n  optional int32 true = 28;\n  optional int32 try = 29;\n  optional int32 var = 30;\n  optional int32 void = 31;\n  optional int32 while = 32;\n  optional int32 with = 33;\n}\n\nmessage ReservedWordsRepeated {\n  repeated int32 assert = 1;\n  repeated int32 break = 2;\n  repeated int32 case = 3;\n  repeated int32 catch = 4;\n  repeated int32 class = 5;\n  repeated int32 const = 6;\n  repeated int32 continue = 7;\n  repeated int32 default = 8;\n  repeated int32 do = 9;\n  repeated int32 else = 10;\n  repeated int32 enum = 11;\n  repeated int32 extends = 12;\n  repeated int32 false = 13;\n  repeated int32 final = 14;\n  repeated int32 finally = 15;\n  repeated int32 for = 16;\n  repeated int32 if = 17;\n  repeated int32 in = 18;\n  repeated int32 is = 19;\n  repeated int32 new = 20;\n  repeated int32 null = 21;\n  repeated int32 rethrow = 22;\n  repeated int32 return = 23;\n  repeated int32 super = 24;\n  repeated int32 switch = 25;\n  repeated int32 this = 26;\n  repeated int32 throw = 27;\n  repeated int32 true = 28;\n  repeated int32 try = 29;\n  repeated int32 var = 30;\n  repeated int32 void = 31;\n  repeated int32 while = 32;\n  repeated int32 with = 33;\n}\n\nmessage ReservedWordsRequired {\n  required int32 assert = 1;\n  required int32 break = 2;\n  required int32 case = 3;\n  required int32 catch = 4;\n  required int32 class = 5;\n  required int32 const = 6;\n  required int32 continue = 7;\n  required int32 default = 8;\n  required int32 do = 9;\n  required int32 else = 10;\n  required int32 enum = 11;\n  required int32 extends = 12;\n  required int32 false = 13;\n  required int32 final = 14;\n  required int32 finally = 15;\n  required int32 for = 16;\n  required int32 if = 17;\n  required int32 in = 18;\n  required int32 is = 19;\n  required int32 new = 20;\n  required int32 null = 21;\n  required int32 rethrow = 22;\n  required int32 return = 23;\n  required int32 super = 24;\n  required int32 switch = 25;\n  required int32 this = 26;\n  required int32 throw = 27;\n  required int32 true = 28;\n  required int32 try = 29;\n  required int32 var = 30;\n  required int32 void = 31;\n  required int32 while = 32;\n  required int32 with = 33;\n}\n\nmessage MessageWithReservedEnum {\n  optional ReservedEnum enum = 1;\n}\n\nenum ReservedEnum {\n  assert = 0;\n  break = 1;\n  case = 2;\n  catch = 3;\n  class = 4;\n  const = 5;\n  continue = 6;\n  default = 7;\n  do = 8;\n  else = 9;\n  enum = 10;\n  extends = 11;\n  false = 12;\n  final = 13;\n  finally = 14;\n  for = 15;\n  if = 16;\n  in = 17;\n  is = 18;\n  new = 19;\n  null = 20;\n  rethrow = 21;\n  return = 22;\n  super = 23;\n  switch = 24;\n  this = 25;\n  throw = 26;\n  true = 27;\n  try = 28;\n  var = 29;\n  void = 30;\n  while = 31;\n  with = 32;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/reserved_names_extension.proto",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage reserved_names_extension;\n\nmessage ExtendMe {\n  extensions 1000 to max;\n}\n\nextend ExtendMe {\n  optional int32 assert = 1001;\n  optional int32 break = 1002;\n  optional int32 case = 1003;\n  optional int32 catch = 1004;\n  optional int32 class = 1005;\n  optional int32 const = 1006;\n  optional int32 continue = 1007;\n  optional int32 default = 1008;\n  optional int32 do = 1009;\n  optional int32 else = 1010;\n  optional int32 enum = 1011;\n  optional int32 extends = 1012;\n  optional int32 false = 1013;\n  optional int32 final = 1014;\n  optional int32 finally = 1015;\n  optional int32 for = 1016;\n  optional int32 if = 1017;\n  optional int32 in = 1018;\n  optional int32 is = 1019;\n  optional int32 new = 1020;\n  optional int32 null = 1021;\n  optional int32 rethrow = 1022;\n  optional int32 return = 1023;\n  optional int32 super = 1024;\n  optional int32 switch = 1025;\n  optional int32 this = 1026;\n  optional int32 throw = 1027;\n  optional int32 true = 1028;\n  optional int32 try = 1029;\n  optional int32 var = 1030;\n  optional int32 void = 1031;\n  optional int32 while = 1032;\n  optional int32 with = 1033;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/reserved_names_message.proto",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage reserved_names_messages;\n\nmessage assert {\n}\nmessage break {\n}\nmessage case {\n}\nmessage catch {\n}\nmessage class {\n}\nmessage const {\n}\nmessage continue {\n}\nmessage default {\n}\nmessage do {\n}\nmessage else {\n}\nmessage enum {\n}\nmessage extends {\n}\nmessage false {\n}\nmessage final {\n}\nmessage finally {\n}\nmessage for {\n}\nmessage if {\n}\nmessage in {\n}\nmessage is {\n}\nmessage new {\n}\nmessage null {\n}\nmessage rethrow {\n}\nmessage return {\n}\nmessage super {\n}\nmessage switch {\n}\nmessage this {\n}\nmessage throw {\n}\nmessage true {\n}\nmessage try {\n}\nmessage var {\n}\nmessage void {\n}\nmessage while {\n}\nmessage with {\n}"
  },
  {
    "path": "protoc_plugin/test/protos/service.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage service;\n\nimport \"service2.proto\";\n\nmessage SearchRequest {\n  optional string query = 1;\n}\n\nmessage SearchResponse {\n  repeated string result = 1;\n}\n\nservice SearchService {\n  rpc Search (SearchRequest) returns (SearchResponse);\n  rpc Search2 (service2.SearchRequest) returns (service2.SearchResponse);\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/service2.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage service2;\n\nimport \"service3.proto\";\n\nmessage SearchRequest {\n  optional string query = 1;\n}\n\nmessage SearchResponse {\n  repeated service3.SearchResult results = 1;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/service3.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage service3;\n\nmessage SearchResult {\n  optional string url = 1;\n  optional string snippet = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/toplevel.proto",
    "content": "// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage toplevel;\n\nmessage T {\n  optional int32 a = 1;\n  optional string b = 2;\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/toplevel_import.proto",
    "content": "// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto2\";\n\npackage toplevel.import;\n\nimport \"toplevel.proto\";\n\nmessage M {\n  optional T t = 1;\n}\n\nservice S {\n  rpc Foo (T) returns (M);\n}\n"
  },
  {
    "path": "protoc_plugin/test/protos/using_any.proto",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nsyntax = \"proto3\";\n\npackage protobuf_unittest;\n\nimport \"google/protobuf/any.proto\";\n\nmessage TestAny {\n  int32 int32_value = 1;\n  google.protobuf.Any any_value = 2;\n  repeated google.protobuf.Any repeated_any_value = 3;\n}\n\nmessage Container {\n  message Nested {\n    int32 int32_value = 1;\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/test/repeated_encoding_test.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/proto2_repeated.pb.dart';\nimport 'gen/proto3_repeated.pb.dart';\n\nvoid main() {\n  test('check proto2 and proto3 repeated field encodings', () {\n    final proto2 = Proto2Repeated();\n    proto2.intsDefault.addAll([1, 2]);\n    proto2.intsPacked.addAll([1, 2]);\n    proto2.intsNotPacked.addAll([1, 2]);\n    final proto2Encoded = proto2.writeToBuffer();\n    expect(\n      proto2Encoded.toList(),\n      equals([\n        8, // field = 1, type = varint\n        1, // value = 1\n        8, // field = 1, type = varint\n        2, // value = 2\n        18, // field = 2, type = length delimited\n        2, // length = 2\n        1, 2, // values = [1, 2]\n        24, // field = 3, type = varint\n        1, // value = 1\n        24, // field = 3, type = varint\n        2, // value = 2\n      ]),\n    );\n\n    final proto3 = Proto3Repeated();\n    proto3.intsDefault.addAll([1, 2]);\n    proto3.intsPacked.addAll([1, 2]);\n    proto3.intsNotPacked.addAll([1, 2]);\n    final proto3Encoded = proto3.writeToBuffer();\n    expect(\n      proto3Encoded.toList(),\n      equals([\n        10, // field = 1, type = length delimited\n        2, // length = 2\n        1, 2, // values = [1, 2]\n        18, // field = 2, type = length delimited\n        2, // length = 2\n        1, 2, // values = [1, 2]\n        24, // field = 3, type = varint\n        1, // value = 1\n        24, // field = 3, type = varint\n        2, // value = 2\n      ]),\n    );\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/repeated_field_test.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\n\nvoid main() {\n  test('check properties are initialized for repeated fields', () {\n    final msg = TestAllTypes();\n    expect(\n      (msg.info_.byName['repeatedNestedMessage']\n              as FieldInfo<TestAllTypes_NestedMessage>)\n          .check,\n      isNotNull,\n    );\n\n    expect(\n      (msg.info_.byName['repeatedgroup']\n              as FieldInfo<TestAllTypes_RepeatedGroup>)\n          .check,\n      isNotNull,\n    );\n\n    expect(\n      (msg.info_.byName['repeatedNestedEnum']\n              as FieldInfo<TestAllTypes_NestedEnum>)\n          .check,\n      isNotNull,\n    );\n  });\n\n  test('check read-only default list type', () {\n    final msg = TestAllTypes()..freeze();\n    final list = msg.repeatedInt32;\n    expect(list.firstWhere((msgParam) => false, orElse: () => 123), 123);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/reserved_names_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n@TestOn('vm')\nlibrary;\n\nimport 'dart:collection' show MapMixin;\nimport 'dart:mirrors';\n\nimport 'package:protobuf/meta.dart'\n    show GeneratedMessage_reservedNames, ProtobufEnum_reservedNames;\n// Import the libraries we will access via the mirrors.\n// ignore_for_file: unused_import\nimport 'package:protobuf/protobuf.dart' show GeneratedMessage, ProtobufEnum;\nimport 'package:protobuf/src/protobuf/mixins/map_mixin.dart' show PbMapMixin;\nimport 'package:protoc_plugin/mixins.dart' show findMixin;\nimport 'package:test/test.dart';\n\nimport 'src/mirror_util.dart' show findMemberNames;\n\nvoid main() {\n  test('GeneratedMessage reserved names are up to date', () {\n    final actual = Set<String>.from(GeneratedMessage_reservedNames);\n    final expected = findMemberNames(\n      'package:protobuf/src/protobuf/internal.dart',\n      #GeneratedMessage,\n    );\n\n    expect(actual.toList()..sort(), equals(expected.toList()..sort()));\n  });\n\n  test('ProtobufEnum reserved names are up to date', () {\n    final actual = Set<String>.from(ProtobufEnum_reservedNames);\n    final expected = findMemberNames(\n      'package:protobuf/src/protobuf/internal.dart',\n      #ProtobufEnum,\n    );\n\n    expect(actual.toList()..sort(), equals(expected.toList()..sort()));\n  });\n\n  test(\"ReadonlyMessageMixin doesn't add any reserved names\", () {\n    final mixinNames = findMemberNames(\n      'package:protobuf/src/protobuf/internal.dart',\n      #ReadonlyMessageMixin,\n    );\n    final reservedNames = Set<String>.from(GeneratedMessage_reservedNames);\n    for (final name in mixinNames) {\n      if (name == 'ReadonlyMessageMixin' || name == 'unknownFields') continue;\n      if (!reservedNames.contains(name)) {\n        fail('name from ReadonlyMessageMixin is not reserved: $name');\n      }\n    }\n  });\n\n  test('PbMapMixin reserved names are up to date', () {\n    final meta = findMixin('PbMapMixin')!;\n    final actual = Set<String>.from(meta.findReservedNames());\n\n    final expected =\n        findMemberNames(meta.importFrom, #PbMapMixin)\n          ..addAll(findMemberNames('dart:collection', #MapMixin))\n          ..removeAll(GeneratedMessage_reservedNames);\n\n    expect(\n      actual.toList()..sort(),\n      containsAllInOrder(expected.toList()..sort()),\n    );\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/send_protos_via_sendports_test.dart",
    "content": "// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n@TestOn('vm')\nlibrary;\n\nimport 'dart:isolate';\n\nimport 'package:test/test.dart';\n\nimport 'gen/foo.pb.dart';\nimport 'gen/map_field.pb.dart' as map;\n\nFuture<T> sendReceive<T>(T object) async {\n  final rp = ReceivePort();\n  rp.sendPort.send(object);\n  return (await rp.first) as T;\n}\n\nvoid main() async {\n  test(\n    'Normal proto can be transferred via ports',\n    () async {\n      final object =\n          Outer()\n            ..inner = (Inner()..value = 'pip')\n            ..inners.add(Inner()..value = 'pop');\n\n      final clone = await sendReceive(object);\n\n      // Ensure the clone is actually containing the same data.\n      expect(clone, equals(object));\n      expect(clone.toString(), equals(object.toString()));\n      expect(clone.toDebugString(), equals(object.toDebugString()));\n      expect(clone.writeToBuffer(), equals(object.writeToBuffer()));\n\n      // Ensure the actual objects got transitively cloned, but the metadata in\n      // the `_info_` did not get cloned.\n      expect(!identical(object, clone), true);\n      expect(!identical(object.inner, clone.inner), true);\n      expect(identical(object.info_, clone.info_), true);\n    },\n    onPlatform: {'js': Skip('dart:isolate only works on Dart VM')},\n  );\n\n  test(\n    'Map-using proto can be transferred via ports',\n    () async {\n      final object =\n          map.TestMap()\n            ..int32ToMessageField[42] =\n                (map.TestMap_MessageValue()\n                  ..value = 1\n                  ..secondValue = 2);\n\n      final clone = await sendReceive(object);\n\n      // Ensure the clone is actually containing the same data.\n      expect(clone, equals(object));\n      expect(clone.toString(), equals(object.toString()));\n      expect(clone.toDebugString(), equals(object.toDebugString()));\n      expect(clone.writeToBuffer(), equals(object.writeToBuffer()));\n\n      // Ensure the actual objects got transitively cloned, but the metadata in\n      // the `_info_` did not get cloned.\n      expect(!identical(object, clone), true);\n      expect(identical(object.info_, clone.info_), true);\n    },\n    onPlatform: {'js': Skip('dart:isolate only works on Dart VM')},\n  );\n}\n"
  },
  {
    "path": "protoc_plugin/test/service_generator_test.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n@TestOn('vm')\nlibrary;\n\nimport 'package:protoc_plugin/indenting_writer.dart';\nimport 'package:protoc_plugin/protoc.dart';\nimport 'package:protoc_plugin/src/linker.dart';\nimport 'package:protoc_plugin/src/options.dart';\nimport 'package:test/test.dart';\n\nimport 'src/golden_file.dart';\nimport 'src/service_util.dart';\nimport 'src/test_features.dart';\n\nvoid main() {\n  test('testServiceGenerator', () {\n    final options = GenerationOptions();\n    final fd = buildFileDescriptor('testpkg', 'testpkg.proto', [\n      'SomeRequest',\n      'SomeReply',\n    ]);\n    fd.service.add(buildServiceDescriptor());\n    final fg = FileGenerator(testEditionDefaults, fd, options);\n\n    final fd2 = buildFileDescriptor('foo.bar', 'foobar.proto', [\n      'EmptyMessage',\n      'AnotherReply',\n    ]);\n    final fg2 = FileGenerator(testEditionDefaults, fd2, options);\n\n    link(GenerationOptions(), [fg, fg2]);\n\n    final serviceWriter = IndentingWriter();\n    fg.serviceGenerators[0].generate(serviceWriter);\n    expectGolden(\n      serviceWriter.emitSource(format: true),\n      'serviceGenerator.pb.dart',\n    );\n    expectGolden(fg.generateJsonFile(), 'serviceGenerator.pbjson.dart');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/service_test.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart'\n    show DescriptorProto, ServiceDescriptorProto;\nimport 'package:test/test.dart';\n\nimport 'gen/service.pbserver.dart' as pb;\nimport 'gen/service2.pb.dart' as pb2;\nimport 'gen/service3.pb.dart' as pb3;\n\nclass SearchService extends pb.SearchServiceBase {\n  @override\n  Future<pb.SearchResponse> search(\n    ServerContext ctx,\n    pb.SearchRequest request,\n  ) async {\n    final out = pb.SearchResponse();\n    if (request.query == 'hello' || request.query == 'world') {\n      out.result.add('hello, world!');\n    }\n    return out;\n  }\n\n  @override\n  Future<pb2.SearchResponse> search2(\n    ServerContext ctx,\n    pb2.SearchRequest request,\n  ) async {\n    final out = pb2.SearchResponse();\n    if (request.query == '2') {\n      final result =\n          pb3.SearchResult()\n            ..url = 'http://example.com/'\n            ..snippet = 'hello world (2)!';\n      out.results.add(result);\n    }\n    return out;\n  }\n}\n\nclass FakeJsonServer {\n  final GeneratedService searchService;\n  FakeJsonServer(this.searchService);\n\n  Future<String> messageHandler(\n    String serviceName,\n    String methodName,\n    String requestJson,\n  ) async {\n    if (serviceName == 'SearchService') {\n      final request = searchService.createRequest(methodName);\n      request.mergeFromJson(requestJson);\n      final ctx = ServerContext();\n      final reply = await searchService.handleCall(ctx, methodName, request);\n      return reply.writeToJson();\n    } else {\n      throw 'unknown service: $serviceName';\n    }\n  }\n}\n\nclass FakeJsonClient implements RpcClient {\n  final FakeJsonServer server;\n\n  FakeJsonClient(this.server);\n\n  @override\n  Future<T> invoke<T extends GeneratedMessage>(\n    ClientContext? ctx,\n    String serviceName,\n    String methodName,\n    GeneratedMessage request,\n    T response,\n  ) async {\n    final requestJson = request.writeToJson();\n    final replyJson = await server.messageHandler(\n      serviceName,\n      methodName,\n      requestJson,\n    );\n    response.mergeFromJson(replyJson);\n    return response;\n  }\n}\n\nvoid main() {\n  final service = SearchService();\n  final server = FakeJsonServer(service);\n  final api = pb.SearchServiceApi(FakeJsonClient(server));\n\n  test('end to end RPC using JSON', () async {\n    final request = pb.SearchRequest()..query = 'hello';\n    final reply = await api.search(ClientContext(), request);\n    expect(reply.result, ['hello, world!']);\n  });\n\n  test('end to end RPC using message from a different package', () async {\n    final request = pb2.SearchRequest()..query = '2';\n    final reply = await api.search2(ClientContext(), request);\n    expect(reply.results.length, 1);\n    expect(reply.results[0].url, 'http://example.com/');\n    expect(reply.results[0].snippet, 'hello world (2)!');\n  });\n\n  test('can read service descriptor from JSON', () {\n    final descriptor =\n        ServiceDescriptorProto()..mergeFromJsonMap(service.$json);\n    expect(descriptor.name, 'SearchService');\n    final methodNames = descriptor.method.map((m) => m.name).toList();\n    expect(methodNames, ['Search', 'Search2']);\n  });\n\n  test('can read message descriptors from JSON', () {\n    final map = service.$messageJson;\n    expect(map.keys, [\n      '.service.SearchRequest',\n      '.service.SearchResponse',\n      '.service2.SearchRequest',\n      '.service2.SearchResponse',\n      '.service3.SearchResult',\n    ]);\n\n    String readMessageName(fqname) {\n      final json = map[fqname]!;\n      final descriptor = DescriptorProto()..mergeFromJsonMap(json);\n      return descriptor.name;\n    }\n\n    expect(readMessageName('.service.SearchRequest'), 'SearchRequest');\n    expect(readMessageName('.service2.SearchRequest'), 'SearchRequest');\n    expect(readMessageName('.service3.SearchResult'), 'SearchResult');\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/shared_test.dart",
    "content": "// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protoc_plugin/src/shared.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  group('toDartComment', () {\n    test('empty', () {\n      expect(toDartComment(''), null);\n    });\n\n    test('just space', () {\n      expect(toDartComment(' '), null);\n    });\n\n    test('indent', () {\n      expect(\n        toDartComment('''\n A line is nice\n \n with one indent - trailing whitespace removed\n \n \n'''),\n        '''\n/// A line is nice\n///\n/// with one indent - trailing whitespace removed''',\n      );\n    });\n\n    test('indent with blank lines', () {\n      expect(\n        toDartComment('''\n This is indented.\n\n This is indented.\n'''),\n        '''\n/// This is indented.\n///\n/// This is indented.''',\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/src/golden_file.dart",
    "content": "// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:io';\n\nimport 'package:path/path.dart' as path;\nimport 'package:test/test.dart';\n\n/// Test [actual] against the contests of the file at [file].\n///\n/// When the `PROTOC_UPDATE_GOLDENS` environment variable is set, the [file]\n/// will be crated (overwritten if already exists) with the [actual] as the\n/// contents. This can be used to automatically update golden test expectations.\nvoid expectGolden(String actual, String file) {\n  var goldenFilePath = path.join('test', 'goldens', file);\n  if (Platform.environment.containsKey('PROTOC_UPDATE_GOLDENS')) {\n    final workspace = Platform.environment['BUILD_WORKSPACE_DIRECTORY'];\n    if (workspace != null) {\n      goldenFilePath = path.join(workspace, goldenFilePath);\n    }\n    File(goldenFilePath)\n      ..createSync(recursive: true)\n      ..writeAsStringSync(actual);\n  } else {\n    expect(\n      actual,\n      equals(File(goldenFilePath).readAsStringSync()),\n      reason: 'golden: \"$goldenFilePath\"',\n    );\n  }\n}\n"
  },
  {
    "path": "protoc_plugin/test/src/mirror_util.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:mirrors';\n\n/// Returns the names of the public properties and non-static methods of a\n/// class. Also visits its superclasses, recursively.\nSet<String> findMemberNames(String importName, Symbol classSymbol) {\n  final lib = currentMirrorSystem().libraries[Uri.parse(importName)]!;\n  var cls = lib.declarations[classSymbol] as ClassMirror?;\n\n  final result = <String>{};\n\n  void addNames(ClassMirror cls) {\n    final prefixToRemove = '${MirrorSystem.getName(cls.simpleName)}.';\n\n    String chooseName(Symbol sym) {\n      final name = MirrorSystem.getName(sym);\n      if (name.startsWith(prefixToRemove)) {\n        return name.substring(prefixToRemove.length);\n      }\n      return name;\n    }\n\n    for (final decl in cls.declarations.values) {\n      if (!decl.isPrivate &&\n          decl is! VariableMirror &&\n          decl is! TypeVariableMirror &&\n          !(decl is MethodMirror && decl.isStatic)) {\n        result.add(chooseName(decl.simpleName));\n      }\n    }\n  }\n\n  while (cls != null) {\n    addNames(cls);\n    cls = cls.superclass;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "protoc_plugin/test/src/service_util.dart",
    "content": "// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart';\n\nServiceDescriptorProto buildServiceDescriptor() {\n  final sd =\n      ServiceDescriptorProto()\n        ..name = 'Test'\n        ..method.addAll([\n          MethodDescriptorProto()\n            ..name = 'AMethod'\n            ..inputType = '.testpkg.SomeRequest'\n            ..outputType = '.testpkg.SomeReply',\n          MethodDescriptorProto()\n            ..name = 'AnotherMethod'\n            ..inputType = '.foo.bar.EmptyMessage'\n            ..outputType = '.foo.bar.AnotherReply',\n        ]);\n  return sd;\n}\n\nFileDescriptorProto buildFileDescriptor(\n  String package,\n  String fileUri,\n  List<String> messages,\n) {\n  final fd =\n      FileDescriptorProto()\n        ..package = package\n        ..name = fileUri;\n  for (final name in messages) {\n    final md = DescriptorProto()..name = name;\n\n    fd.messageType.add(md);\n  }\n  return fd;\n}\n"
  },
  {
    "path": "protoc_plugin/test/src/test_features.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protoc_plugin/protoc.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/descriptor.pb.dart';\nimport 'package:protoc_plugin/src/gen/google/protobuf/unittest_features.pb.dart';\n\nfinal testEditionDefaults = pluginFeatureSetDefaults;\n\n// Sets a test-only feature extension that can be applied to any type of descriptor.\ndynamic setTestFeature(dynamic descriptor, int value) {\n  var features = descriptor;\n  if (descriptor is! FeatureSet) {\n    descriptor.ensureOptions();\n    descriptor.options.ensureFeatures();\n    features = descriptor.options.features;\n  }\n  features.setExtension(\n    Unittest_features.test,\n    TestFeatures()..multipleFeature = EnumFeature.valueOf(value)!,\n  );\n  return descriptor;\n}\n\n// Retrieves a test-only feature extension on an arbitrary descriptor.\nint getTestFeature(FeatureSet features) {\n  return features.getExtension(Unittest_features.test).multipleFeature.value;\n}\n"
  },
  {
    "path": "protoc_plugin/test/src/test_util.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport '../gen/google/protobuf/unittest.pb.dart';\nimport '../gen/google/protobuf/unittest_import.pb.dart';\n\nfinal Matcher throwsATypeError = throwsA(TypeMatcher<TypeError>());\n\nInt64 make64(int lo, [int? hi]) {\n  hi ??= lo < 0 ? -1 : 0;\n  return Int64.fromInts(hi, lo);\n}\n\nMatcher expect64(int lo, [int? hi]) {\n  final expected = make64(lo, hi);\n  return predicate((Int64 actual) => actual == expected);\n}\n\nvoid assertAllExtensionsSet(TestAllExtensions message) {\n  // TODO(antonm): introduce hasExtension matcher and other domain\n  // specific ones.\n  expect(message.hasExtension(Unittest.optionalInt32Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalInt64Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalUint32Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalUint64Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalSint32Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalSint64Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalFixed32Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalFixed64Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalSfixed32Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalSfixed64Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalFloatExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalDoubleExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalBoolExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalStringExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalBytesExtension), isTrue);\n\n  expect(message.hasExtension(Unittest.optionalgroupExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalNestedMessageExtension), isTrue);\n  expect(\n    message.hasExtension(Unittest.optionalForeignMessageExtension),\n    isTrue,\n  );\n  expect(message.hasExtension(Unittest.optionalImportMessageExtension), isTrue);\n\n  expect(message.getExtension(Unittest.optionalgroupExtension).hasA(), isTrue);\n  expect(\n    message.getExtension(Unittest.optionalNestedMessageExtension).hasBb(),\n    isTrue,\n  );\n  expect(\n    message.getExtension(Unittest.optionalForeignMessageExtension).hasC(),\n    isTrue,\n  );\n  expect(\n    message.getExtension(Unittest.optionalImportMessageExtension).hasD(),\n    isTrue,\n  );\n\n  expect(message.hasExtension(Unittest.optionalNestedEnumExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalForeignEnumExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalImportEnumExtension), isTrue);\n\n  expect(message.hasExtension(Unittest.optionalStringPieceExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalCordExtension), isTrue);\n\n  expect(message.getExtension(Unittest.optionalInt32Extension), 101);\n  expect(message.getExtension(Unittest.optionalInt64Extension), expect64(102));\n  expect(message.getExtension(Unittest.optionalUint32Extension), 103);\n  expect(message.getExtension(Unittest.optionalUint64Extension), expect64(104));\n  expect(message.getExtension(Unittest.optionalSint32Extension), 105);\n  expect(message.getExtension(Unittest.optionalSint64Extension), expect64(106));\n  expect(message.getExtension(Unittest.optionalFixed32Extension), 107);\n  expect(\n    message.getExtension(Unittest.optionalFixed64Extension),\n    expect64(108),\n  );\n  expect(message.getExtension(Unittest.optionalSfixed32Extension), 109);\n  expect(\n    message.getExtension(Unittest.optionalSfixed64Extension),\n    expect64(110),\n  );\n  expect(message.getExtension(Unittest.optionalFloatExtension), 111.0);\n  expect(message.getExtension(Unittest.optionalDoubleExtension), 112.0);\n  expect(message.getExtension(Unittest.optionalBoolExtension), true);\n  expect(message.getExtension(Unittest.optionalStringExtension), '115');\n  expect(\n    message.getExtension(Unittest.optionalBytesExtension),\n    '116'.codeUnits,\n  );\n\n  expect(message.getExtension(Unittest.optionalgroupExtension).a, 117);\n  expect(message.getExtension(Unittest.optionalNestedMessageExtension).bb, 118);\n  expect(message.getExtension(Unittest.optionalForeignMessageExtension).c, 119);\n  expect(message.getExtension(Unittest.optionalImportMessageExtension).d, 120);\n\n  expect(\n    message.getExtension(Unittest.optionalNestedEnumExtension),\n    TestAllTypes_NestedEnum.BAZ,\n  );\n  expect(\n    message.getExtension(Unittest.optionalForeignEnumExtension),\n    ForeignEnum.FOREIGN_BAZ,\n  );\n  expect(\n    message.getExtension(Unittest.optionalImportEnumExtension),\n    ImportEnum.IMPORT_BAZ,\n  );\n\n  expect(message.getExtension(Unittest.optionalStringPieceExtension), '124');\n  expect(message.getExtension(Unittest.optionalCordExtension), '125');\n\n  // -----------------------------------------------------------------\n\n  expect(message.getExtension(Unittest.repeatedInt32Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedInt64Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedUint32Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedUint64Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedSint32Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedSint64Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedFixed32Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedFixed64Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedSfixed32Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedSfixed64Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedFloatExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedDoubleExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedBoolExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedStringExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedBytesExtension).length, 2);\n\n  expect(message.getExtension(Unittest.repeatedgroupExtension).length, 2);\n  expect(\n    message.getExtension(Unittest.repeatedNestedMessageExtension).length,\n    2,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignMessageExtension).length,\n    2,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportMessageExtension).length,\n    2,\n  );\n  expect(message.getExtension(Unittest.repeatedNestedEnumExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedForeignEnumExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedImportEnumExtension).length, 2);\n\n  expect(message.getExtension(Unittest.repeatedStringPieceExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedCordExtension).length, 2);\n\n  expect(message.getExtension(Unittest.repeatedInt32Extension)[0], 201);\n  expect(\n    message.getExtension(Unittest.repeatedInt64Extension)[0],\n    expect64(202),\n  );\n  expect(message.getExtension(Unittest.repeatedUint32Extension)[0], 203);\n  expect(\n    message.getExtension(Unittest.repeatedUint64Extension)[0],\n    expect64(204),\n  );\n  expect(message.getExtension(Unittest.repeatedSint32Extension)[0], 205);\n  expect(\n    message.getExtension(Unittest.repeatedSint64Extension)[0],\n    expect64(206),\n  );\n  expect(message.getExtension(Unittest.repeatedFixed32Extension)[0], 207);\n  expect(\n    message.getExtension(Unittest.repeatedFixed64Extension)[0],\n    expect64(208),\n  );\n  expect(message.getExtension(Unittest.repeatedSfixed32Extension)[0], 209);\n  expect(\n    message.getExtension(Unittest.repeatedSfixed64Extension)[0],\n    expect64(210),\n  );\n  expect(message.getExtension(Unittest.repeatedFloatExtension)[0], 211.0);\n  expect(message.getExtension(Unittest.repeatedDoubleExtension)[0], 212.0);\n  expect(message.getExtension(Unittest.repeatedBoolExtension)[0], true);\n  expect(message.getExtension(Unittest.repeatedStringExtension)[0], '215');\n  expect(\n    message.getExtension(Unittest.repeatedBytesExtension)[0],\n    '216'.codeUnits,\n  );\n\n  expect(message.getExtension(Unittest.repeatedgroupExtension)[0].a, 217);\n  expect(\n    message.getExtension(Unittest.repeatedNestedMessageExtension)[0].bb,\n    218,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignMessageExtension)[0].c,\n    219,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportMessageExtension)[0].d,\n    220,\n  );\n\n  expect(\n    message.getExtension(Unittest.repeatedNestedEnumExtension)[0],\n    TestAllTypes_NestedEnum.BAR,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignEnumExtension)[0],\n    ForeignEnum.FOREIGN_BAR,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportEnumExtension)[0],\n    ImportEnum.IMPORT_BAR,\n  );\n\n  expect(message.getExtension(Unittest.repeatedStringPieceExtension)[0], '224');\n  expect(message.getExtension(Unittest.repeatedCordExtension)[0], '225');\n\n  expect(message.getExtension(Unittest.repeatedInt32Extension)[1], 301);\n  expect(\n    message.getExtension(Unittest.repeatedInt64Extension)[1],\n    expect64(302),\n  );\n  expect(message.getExtension(Unittest.repeatedUint32Extension)[1], 303);\n  expect(\n    message.getExtension(Unittest.repeatedUint64Extension)[1],\n    expect64(304),\n  );\n  expect(message.getExtension(Unittest.repeatedSint32Extension)[1], 305);\n  expect(\n    message.getExtension(Unittest.repeatedSint64Extension)[1],\n    expect64(306),\n  );\n  expect(message.getExtension(Unittest.repeatedFixed32Extension)[1], 307);\n  expect(\n    message.getExtension(Unittest.repeatedFixed64Extension)[1],\n    expect64(308),\n  );\n  expect(message.getExtension(Unittest.repeatedSfixed32Extension)[1], 309);\n  expect(\n    message.getExtension(Unittest.repeatedSfixed64Extension)[1],\n    expect64(310),\n  );\n  expect(message.getExtension(Unittest.repeatedFloatExtension)[1], 311.0);\n  expect(message.getExtension(Unittest.repeatedDoubleExtension)[1], 312.0);\n  expect(message.getExtension(Unittest.repeatedBoolExtension)[1], false);\n  expect(message.getExtension(Unittest.repeatedStringExtension)[1], '315');\n  expect(\n    message.getExtension(Unittest.repeatedBytesExtension)[1],\n    '316'.codeUnits,\n  );\n\n  expect(message.getExtension(Unittest.repeatedgroupExtension)[1].a, 317);\n  expect(\n    message.getExtension(Unittest.repeatedNestedMessageExtension)[1].bb,\n    318,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignMessageExtension)[1].c,\n    319,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportMessageExtension)[1].d,\n    320,\n  );\n\n  expect(\n    message.getExtension(Unittest.repeatedNestedEnumExtension)[1],\n    TestAllTypes_NestedEnum.BAZ,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignEnumExtension)[1],\n    ForeignEnum.FOREIGN_BAZ,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportEnumExtension)[1],\n    ImportEnum.IMPORT_BAZ,\n  );\n\n  expect(message.getExtension(Unittest.repeatedStringPieceExtension)[1], '324');\n  expect(message.getExtension(Unittest.repeatedCordExtension)[1], '325');\n\n  // -----------------------------------------------------------------\n\n  expect(message.hasExtension(Unittest.defaultInt32Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultInt64Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultUint32Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultUint64Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultSint32Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultSint64Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultFixed32Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultFixed64Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultSfixed32Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultSfixed64Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultFloatExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultDoubleExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultBoolExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultStringExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultBytesExtension), isTrue);\n\n  expect(message.hasExtension(Unittest.defaultNestedEnumExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultForeignEnumExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultImportEnumExtension), isTrue);\n\n  expect(message.hasExtension(Unittest.defaultStringPieceExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultCordExtension), isTrue);\n  expect(message.getExtension(Unittest.defaultInt32Extension), 401);\n  expect(message.getExtension(Unittest.defaultInt64Extension), expect64(402));\n  expect(message.getExtension(Unittest.defaultUint32Extension), 403);\n  expect(message.getExtension(Unittest.defaultUint64Extension), expect64(404));\n  expect(message.getExtension(Unittest.defaultSint32Extension), 405);\n  expect(message.getExtension(Unittest.defaultSint64Extension), expect64(406));\n  expect(message.getExtension(Unittest.defaultFixed32Extension), 407);\n  expect(message.getExtension(Unittest.defaultFixed64Extension), expect64(408));\n  expect(message.getExtension(Unittest.defaultSfixed32Extension), 409);\n  expect(\n    message.getExtension(Unittest.defaultSfixed64Extension),\n    expect64(410),\n  );\n  expect(message.getExtension(Unittest.defaultFloatExtension), 411.0);\n  expect(message.getExtension(Unittest.defaultDoubleExtension), 412.0);\n  expect(message.getExtension(Unittest.defaultBoolExtension), false);\n  expect(message.getExtension(Unittest.defaultStringExtension), '415');\n  expect(message.getExtension(Unittest.defaultBytesExtension), '416'.codeUnits);\n\n  expect(\n    message.getExtension(Unittest.defaultNestedEnumExtension),\n    TestAllTypes_NestedEnum.FOO,\n  );\n  expect(\n    message.getExtension(Unittest.defaultForeignEnumExtension),\n    ForeignEnum.FOREIGN_FOO,\n  );\n  expect(\n    message.getExtension(Unittest.defaultImportEnumExtension),\n    ImportEnum.IMPORT_FOO,\n  );\n\n  expect(message.getExtension(Unittest.defaultStringPieceExtension), '424');\n  expect(message.getExtension(Unittest.defaultCordExtension), '425');\n}\n\nvoid assertAllFieldsSet(TestAllTypes message) {\n  expect(message.hasOptionalInt32(), isTrue);\n  expect(message.hasOptionalInt64(), isTrue);\n  expect(message.hasOptionalUint32(), isTrue);\n  expect(message.hasOptionalUint64(), isTrue);\n  expect(message.hasOptionalSint32(), isTrue);\n  expect(message.hasOptionalSint64(), isTrue);\n  expect(message.hasOptionalFixed32(), isTrue);\n  expect(message.hasOptionalFixed64(), isTrue);\n  expect(message.hasOptionalSfixed32(), isTrue);\n  expect(message.hasOptionalSfixed64(), isTrue);\n  expect(message.hasOptionalFloat(), isTrue);\n  expect(message.hasOptionalDouble(), isTrue);\n  expect(message.hasOptionalBool(), isTrue);\n  expect(message.hasOptionalString(), isTrue);\n  expect(message.hasOptionalBytes(), isTrue);\n\n  expect(message.hasOptionalgroup(), isTrue);\n  expect(message.hasOptionalNestedMessage(), isTrue);\n  expect(message.hasOptionalForeignMessage(), isTrue);\n  expect(message.hasOptionalImportMessage(), isTrue);\n\n  expect(message.optionalgroup.hasA(), isTrue);\n  expect(message.optionalNestedMessage.hasBb(), isTrue);\n  expect(message.optionalForeignMessage.hasC(), isTrue);\n  expect(message.optionalImportMessage.hasD(), isTrue);\n\n  expect(message.hasOptionalNestedEnum(), isTrue);\n  expect(message.hasOptionalForeignEnum(), isTrue);\n  expect(message.hasOptionalImportEnum(), isTrue);\n\n  expect(message.hasOptionalStringPiece(), isTrue);\n  expect(message.hasOptionalCord(), isTrue);\n\n  expect(message.optionalInt32, 101);\n  expect(message.optionalInt64, expect64(102));\n  expect(message.optionalUint32, 103);\n  expect(message.optionalUint64, expect64(104));\n  expect(message.optionalSint32, 105);\n  expect(message.optionalSint64, expect64(106));\n  expect(message.optionalFixed32, 107);\n  expect(message.optionalFixed64, expect64(108));\n  expect(message.optionalSfixed32, 109);\n  expect(message.optionalSfixed64, expect64(110));\n  expect(message.optionalFloat, 111.0);\n  expect(message.optionalDouble, 112.0);\n  expect(message.optionalBool, true);\n  expect(message.optionalString, '115');\n  expect(message.optionalBytes, '116'.codeUnits);\n\n  expect(message.optionalgroup.a, 117);\n  expect(message.optionalNestedMessage.bb, 118);\n  expect(message.optionalForeignMessage.c, 119);\n  expect(message.optionalImportMessage.d, 120);\n\n  expect(message.optionalNestedEnum, TestAllTypes_NestedEnum.BAZ);\n  expect(message.optionalForeignEnum, ForeignEnum.FOREIGN_BAZ);\n  expect(message.optionalImportEnum, ImportEnum.IMPORT_BAZ);\n\n  expect(message.optionalStringPiece, '124');\n  expect(message.optionalCord, '125');\n\n  // -----------------------------------------------------------------\n\n  expect(message.repeatedInt32.length, 2);\n  expect(message.repeatedInt64.length, 2);\n  expect(message.repeatedUint32.length, 2);\n  expect(message.repeatedUint64.length, 2);\n  expect(message.repeatedSint32.length, 2);\n  expect(message.repeatedSint64.length, 2);\n  expect(message.repeatedFixed32.length, 2);\n  expect(message.repeatedFixed64.length, 2);\n  expect(message.repeatedSfixed32.length, 2);\n  expect(message.repeatedSfixed64.length, 2);\n  expect(message.repeatedFloat.length, 2);\n  expect(message.repeatedDouble.length, 2);\n  expect(message.repeatedBool.length, 2);\n  expect(message.repeatedString.length, 2);\n  expect(message.repeatedBytes.length, 2);\n\n  expect(message.repeatedgroup.length, 2);\n  expect(message.repeatedNestedMessage.length, 2);\n  expect(message.repeatedForeignMessage.length, 2);\n  expect(message.repeatedImportMessage.length, 2);\n  expect(message.repeatedNestedEnum.length, 2);\n  expect(message.repeatedForeignEnum.length, 2);\n  expect(message.repeatedImportEnum.length, 2);\n\n  expect(message.repeatedStringPiece.length, 2);\n  expect(message.repeatedCord.length, 2);\n\n  expect(message.repeatedInt32[0], 201);\n  expect(message.repeatedInt64[0], expect64(202));\n  expect(message.repeatedUint32[0], 203);\n  expect(message.repeatedUint64[0], expect64(204));\n  expect(message.repeatedSint32[0], 205);\n  expect(message.repeatedSint64[0], expect64(206));\n  expect(message.repeatedFixed32[0], 207);\n  expect(message.repeatedFixed64[0], expect64(208));\n  expect(message.repeatedSfixed32[0], 209);\n  expect(message.repeatedSfixed64[0], expect64(210));\n  expect(message.repeatedFloat[0], 211.0);\n  expect(message.repeatedDouble[0], 212.0);\n  expect(message.repeatedBool[0], true);\n  expect(message.repeatedString[0], '215');\n  expect(message.repeatedBytes[0], '216'.codeUnits);\n\n  expect(message.repeatedgroup[0].a, 217);\n  expect(message.repeatedNestedMessage[0].bb, 218);\n  expect(message.repeatedForeignMessage[0].c, 219);\n  expect(message.repeatedImportMessage[0].d, 220);\n\n  expect(message.repeatedNestedEnum[0], TestAllTypes_NestedEnum.BAR);\n  expect(message.repeatedForeignEnum[0], ForeignEnum.FOREIGN_BAR);\n  expect(message.repeatedImportEnum[0], ImportEnum.IMPORT_BAR);\n\n  expect(message.repeatedStringPiece[0], '224');\n  expect(message.repeatedCord[0], '225');\n\n  expect(message.repeatedInt32[1], 301);\n  expect(message.repeatedInt64[1], expect64(302));\n  expect(message.repeatedUint32[1], 303);\n  expect(message.repeatedUint64[1], expect64(304));\n  expect(message.repeatedSint32[1], 305);\n  expect(message.repeatedSint64[1], expect64(306));\n  expect(message.repeatedFixed32[1], 307);\n  expect(message.repeatedFixed64[1], expect64(308));\n  expect(message.repeatedSfixed32[1], 309);\n  expect(message.repeatedSfixed64[1], expect64(310));\n  expect(message.repeatedFloat[1], 311.0);\n  expect(message.repeatedDouble[1], 312.0);\n  expect(message.repeatedBool[1], false);\n  expect(message.repeatedString[1], '315');\n  expect(message.repeatedBytes[1], '316'.codeUnits);\n\n  expect(message.repeatedgroup[1].a, 317);\n  expect(message.repeatedNestedMessage[1].bb, 318);\n  expect(message.repeatedForeignMessage[1].c, 319);\n  expect(message.repeatedImportMessage[1].d, 320);\n\n  expect(message.repeatedNestedEnum[1], TestAllTypes_NestedEnum.BAZ);\n  expect(message.repeatedForeignEnum[1], ForeignEnum.FOREIGN_BAZ);\n  expect(message.repeatedImportEnum[1], ImportEnum.IMPORT_BAZ);\n\n  expect(message.repeatedStringPiece[1], '324');\n  expect(message.repeatedCord[1], '325');\n\n  // -----------------------------------------------------------------\n\n  expect(message.hasDefaultInt32(), isTrue);\n  expect(message.hasDefaultInt64(), isTrue);\n  expect(message.hasDefaultUint32(), isTrue);\n  expect(message.hasDefaultUint64(), isTrue);\n  expect(message.hasDefaultSint32(), isTrue);\n  expect(message.hasDefaultSint64(), isTrue);\n  expect(message.hasDefaultFixed32(), isTrue);\n  expect(message.hasDefaultFixed64(), isTrue);\n  expect(message.hasDefaultSfixed32(), isTrue);\n  expect(message.hasDefaultSfixed64(), isTrue);\n  expect(message.hasDefaultFloat(), isTrue);\n  expect(message.hasDefaultDouble(), isTrue);\n  expect(message.hasDefaultBool(), isTrue);\n  expect(message.hasDefaultString(), isTrue);\n  expect(message.hasDefaultBytes(), isTrue);\n\n  expect(message.hasDefaultNestedEnum(), isTrue);\n  expect(message.hasDefaultForeignEnum(), isTrue);\n  expect(message.hasDefaultImportEnum(), isTrue);\n\n  expect(message.hasDefaultStringPiece(), isTrue);\n  expect(message.hasDefaultCord(), isTrue);\n\n  expect(message.defaultInt32, 401);\n  expect(message.defaultInt64, expect64(402));\n  expect(message.defaultUint32, 403);\n  expect(message.defaultUint64, expect64(404));\n  expect(message.defaultSint32, 405);\n  expect(message.defaultSint64, expect64(406));\n  expect(message.defaultFixed32, 407);\n  expect(message.defaultFixed64, expect64(408));\n  expect(message.defaultSfixed32, 409);\n  expect(message.defaultSfixed64, expect64(410));\n  expect(message.defaultFloat, 411.0);\n  expect(message.defaultDouble, 412.0);\n  expect(message.defaultBool, false);\n  expect(message.defaultString, '415');\n  expect(message.defaultBytes, '416'.codeUnits);\n\n  expect(message.defaultNestedEnum, TestAllTypes_NestedEnum.FOO);\n  expect(message.defaultForeignEnum, ForeignEnum.FOREIGN_FOO);\n  expect(message.defaultImportEnum, ImportEnum.IMPORT_FOO);\n\n  expect(message.defaultStringPiece, '424');\n  expect(message.defaultCord, '425');\n}\n\nvoid assertClear(TestAllTypes message) {\n  // hasBlah() should initially be false for all optional fields.\n  expect(message.hasOptionalInt32(), isFalse);\n  expect(message.hasOptionalInt64(), isFalse);\n  expect(message.hasOptionalUint32(), isFalse);\n  expect(message.hasOptionalUint64(), isFalse);\n  expect(message.hasOptionalSint32(), isFalse);\n  expect(message.hasOptionalSint64(), isFalse);\n  expect(message.hasOptionalFixed32(), isFalse);\n  expect(message.hasOptionalFixed64(), isFalse);\n  expect(message.hasOptionalSfixed32(), isFalse);\n  expect(message.hasOptionalSfixed64(), isFalse);\n  expect(message.hasOptionalFloat(), isFalse);\n  expect(message.hasOptionalDouble(), isFalse);\n  expect(message.hasOptionalBool(), isFalse);\n  expect(message.hasOptionalString(), isFalse);\n  expect(message.hasOptionalBytes(), isFalse);\n\n  expect(message.hasOptionalgroup(), isFalse);\n  expect(message.hasOptionalNestedMessage(), isFalse);\n  expect(message.hasOptionalForeignMessage(), isFalse);\n  expect(message.hasOptionalImportMessage(), isFalse);\n\n  expect(message.hasOptionalNestedEnum(), isFalse);\n  expect(message.hasOptionalForeignEnum(), isFalse);\n  expect(message.hasOptionalImportEnum(), isFalse);\n\n  expect(message.hasOptionalStringPiece(), isFalse);\n  expect(message.hasOptionalCord(), isFalse);\n\n  // Optional fields without defaults are set to zero or something like it.\n  expect(message.optionalInt32, 0);\n  expect(message.optionalInt64, expect64(0));\n  expect(message.optionalUint32, 0);\n  expect(message.optionalUint64, expect64(0));\n  expect(message.optionalSint32, 0);\n  expect(message.optionalSint64, expect64(0));\n  expect(message.optionalFixed32, 0);\n  expect(message.optionalFixed64, expect64(0));\n  expect(message.optionalSfixed32, 0);\n  expect(message.optionalSfixed64, expect64(0));\n  expect(message.optionalFloat, 0);\n  expect(message.optionalDouble, 0);\n  expect(message.optionalBool, false);\n  expect(message.optionalString, '');\n  expect(message.optionalBytes, <int>[]);\n\n  // Embedded messages should also be clear.\n  expect(message.optionalgroup.hasA(), isFalse);\n  expect(message.optionalNestedMessage.hasBb(), isFalse);\n  expect(message.optionalForeignMessage.hasC(), isFalse);\n  expect(message.optionalImportMessage.hasD(), isFalse);\n\n  expect(message.optionalgroup.a, 0);\n  expect(message.optionalNestedMessage.bb, 0);\n  expect(message.optionalForeignMessage.c, 0);\n  expect(message.optionalImportMessage.d, 0);\n\n  // Enums without defaults are set to the first value in the enum.\n  expect(message.optionalNestedEnum, TestAllTypes_NestedEnum.FOO);\n  expect(message.optionalForeignEnum, ForeignEnum.FOREIGN_FOO);\n  expect(message.optionalImportEnum, ImportEnum.IMPORT_FOO);\n\n  expect(message.optionalStringPiece, '');\n  expect(message.optionalCord, '');\n\n  // Repeated fields are empty.\n  expect(message.repeatedInt32.length, 0);\n  expect(message.repeatedInt64.length, 0);\n  expect(message.repeatedUint32.length, 0);\n  expect(message.repeatedUint64.length, 0);\n  expect(message.repeatedSint32.length, 0);\n  expect(message.repeatedSint64.length, 0);\n  expect(message.repeatedFixed32.length, 0);\n  expect(message.repeatedFixed64.length, 0);\n  expect(message.repeatedSfixed32.length, 0);\n  expect(message.repeatedSfixed64.length, 0);\n  expect(message.repeatedFloat.length, 0);\n  expect(message.repeatedDouble.length, 0);\n  expect(message.repeatedBool.length, 0);\n  expect(message.repeatedString.length, 0);\n  expect(message.repeatedBytes.length, 0);\n\n  expect(message.repeatedgroup.length, 0);\n  expect(message.repeatedNestedMessage.length, 0);\n  expect(message.repeatedForeignMessage.length, 0);\n  expect(message.repeatedImportMessage.length, 0);\n  expect(message.repeatedNestedEnum.length, 0);\n  expect(message.repeatedForeignEnum.length, 0);\n  expect(message.repeatedImportEnum.length, 0);\n\n  expect(message.repeatedStringPiece.length, 0);\n  expect(message.repeatedCord.length, 0);\n\n  // hasBlah() should also be false for all default fields.\n  expect(message.hasDefaultInt32(), isFalse);\n  expect(message.hasDefaultInt64(), isFalse);\n  expect(message.hasDefaultUint32(), isFalse);\n  expect(message.hasDefaultUint64(), isFalse);\n  expect(message.hasDefaultSint32(), isFalse);\n  expect(message.hasDefaultSint64(), isFalse);\n  expect(message.hasDefaultFixed32(), isFalse);\n  expect(message.hasDefaultFixed64(), isFalse);\n  expect(message.hasDefaultSfixed32(), isFalse);\n  expect(message.hasDefaultSfixed64(), isFalse);\n  expect(message.hasDefaultFloat(), isFalse);\n  expect(message.hasDefaultDouble(), isFalse);\n  expect(message.hasDefaultBool(), isFalse);\n  expect(message.hasDefaultString(), isFalse);\n  expect(message.hasDefaultBytes(), isFalse);\n\n  expect(message.hasDefaultNestedEnum(), isFalse);\n  expect(message.hasDefaultForeignEnum(), isFalse);\n  expect(message.hasDefaultImportEnum(), isFalse);\n\n  expect(message.hasDefaultStringPiece(), isFalse);\n  expect(message.hasDefaultCord(), isFalse);\n\n  // Fields with defaults have their default values(duh).\n  expect(message.defaultInt32, 41);\n  expect(message.defaultInt64, expect64(42));\n  expect(message.defaultUint32, 43);\n  expect(message.defaultUint64, expect64(44));\n  expect(message.defaultSint32, -45);\n  expect(message.defaultSint64, expect64(46));\n  expect(message.defaultFixed32, 47);\n  expect(message.defaultFixed64, expect64(48));\n  expect(message.defaultSfixed32, 49);\n  expect(message.defaultSfixed64, expect64(-50));\n  expect(message.defaultFloat, 51.5);\n  expect(message.defaultDouble, 52e3);\n  expect(message.defaultBool, isTrue);\n  expect(message.defaultString, 'hello');\n  expect(message.defaultBytes, 'world'.codeUnits);\n\n  expect(message.defaultNestedEnum, TestAllTypes_NestedEnum.BAR);\n  expect(message.defaultForeignEnum, ForeignEnum.FOREIGN_BAR);\n  expect(message.defaultImportEnum, ImportEnum.IMPORT_BAR);\n\n  expect(message.defaultStringPiece, 'abc');\n  expect(message.defaultCord, '123');\n}\n\nvoid assertExtensionsClear(TestAllExtensions message) {\n  // hasBlah() should initially be false for all optional fields.\n  expect(message.hasExtension(Unittest.optionalInt32Extension), isFalse);\n  expect(message.hasExtension(Unittest.optionalInt64Extension), isFalse);\n  expect(message.hasExtension(Unittest.optionalUint32Extension), isFalse);\n  expect(message.hasExtension(Unittest.optionalUint64Extension), isFalse);\n  expect(message.hasExtension(Unittest.optionalSint32Extension), isFalse);\n  expect(message.hasExtension(Unittest.optionalSint64Extension), isFalse);\n  expect(message.hasExtension(Unittest.optionalFixed32Extension), isFalse);\n  expect(message.hasExtension(Unittest.optionalFixed64Extension), isFalse);\n  expect(message.hasExtension(Unittest.optionalSfixed32Extension), isFalse);\n  expect(message.hasExtension(Unittest.optionalSfixed64Extension), isFalse);\n  expect(message.hasExtension(Unittest.optionalFloatExtension), isFalse);\n  expect(message.hasExtension(Unittest.optionalDoubleExtension), isFalse);\n  expect(message.hasExtension(Unittest.optionalBoolExtension), isFalse);\n  expect(message.hasExtension(Unittest.optionalStringExtension), isFalse);\n  expect(message.hasExtension(Unittest.optionalBytesExtension), isFalse);\n\n  expect(message.hasExtension(Unittest.optionalgroupExtension), isFalse);\n  expect(\n    message.hasExtension(Unittest.optionalNestedMessageExtension),\n    isFalse,\n  );\n  expect(\n    message.hasExtension(Unittest.optionalForeignMessageExtension),\n    isFalse,\n  );\n  expect(\n    message.hasExtension(Unittest.optionalImportMessageExtension),\n    isFalse,\n  );\n\n  expect(message.hasExtension(Unittest.optionalNestedEnumExtension), isFalse);\n  expect(message.hasExtension(Unittest.optionalForeignEnumExtension), isFalse);\n  expect(message.hasExtension(Unittest.optionalImportEnumExtension), isFalse);\n\n  expect(message.hasExtension(Unittest.optionalStringPieceExtension), isFalse);\n  expect(message.hasExtension(Unittest.optionalCordExtension), isFalse);\n\n  // Optional fields without defaults are set to zero or something like it.\n  expect(message.getExtension(Unittest.optionalInt32Extension), 0);\n  expect(message.getExtension(Unittest.optionalInt64Extension), expect64(0));\n  expect(message.getExtension(Unittest.optionalUint32Extension), 0);\n  expect(message.getExtension(Unittest.optionalUint64Extension), expect64(0));\n  expect(message.getExtension(Unittest.optionalSint32Extension), 0);\n  expect(message.getExtension(Unittest.optionalSint64Extension), expect64(0));\n  expect(message.getExtension(Unittest.optionalFixed32Extension), 0);\n  expect(message.getExtension(Unittest.optionalFixed64Extension), expect64(0));\n  expect(message.getExtension(Unittest.optionalSfixed32Extension), 0);\n  expect(message.getExtension(Unittest.optionalSfixed64Extension), expect64(0));\n  expect(message.getExtension(Unittest.optionalFloatExtension), 0.0);\n  expect(message.getExtension(Unittest.optionalDoubleExtension), 0.0);\n  expect(message.getExtension(Unittest.optionalBoolExtension), false);\n  expect(message.getExtension(Unittest.optionalStringExtension), '');\n  expect(message.getExtension(Unittest.optionalBytesExtension), <int>[]);\n\n  // Embedded messages should also be clear.\n  expect(message.getExtension(Unittest.optionalgroupExtension).hasA(), isFalse);\n  expect(\n    message.getExtension(Unittest.optionalNestedMessageExtension).hasBb(),\n    isFalse,\n  );\n  expect(\n    message.getExtension(Unittest.optionalForeignMessageExtension).hasC(),\n    isFalse,\n  );\n  expect(\n    message.getExtension(Unittest.optionalImportMessageExtension).hasD(),\n    isFalse,\n  );\n\n  expect(message.getExtension(Unittest.optionalgroupExtension).a, 0);\n  expect(message.getExtension(Unittest.optionalNestedMessageExtension).bb, 0);\n  expect(message.getExtension(Unittest.optionalForeignMessageExtension).c, 0);\n  expect(message.getExtension(Unittest.optionalImportMessageExtension).d, 0);\n\n  // Enums without defaults are set to the first value in the enum.\n  expect(\n    message.getExtension(Unittest.optionalNestedEnumExtension),\n    TestAllTypes_NestedEnum.FOO,\n  );\n  expect(\n    message.getExtension(Unittest.optionalForeignEnumExtension),\n    ForeignEnum.FOREIGN_FOO,\n  );\n  expect(\n    message.getExtension(Unittest.optionalImportEnumExtension),\n    ImportEnum.IMPORT_FOO,\n  );\n\n  expect(message.getExtension(Unittest.optionalStringPieceExtension), '');\n  expect(message.getExtension(Unittest.optionalCordExtension), '');\n\n  // Repeated fields are empty.\n  expect(message.getExtension(Unittest.repeatedInt32Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedInt64Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedUint32Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedUint64Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedSint32Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedSint64Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedFixed32Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedFixed64Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedSfixed32Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedSfixed64Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedFloatExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedDoubleExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedBoolExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedStringExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedBytesExtension).length, 0);\n\n  expect(message.getExtension(Unittest.repeatedgroupExtension).length, 0);\n  expect(\n    message.getExtension(Unittest.repeatedNestedMessageExtension).length,\n    0,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignMessageExtension).length,\n    0,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportMessageExtension).length,\n    0,\n  );\n  expect(message.getExtension(Unittest.repeatedNestedEnumExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedForeignEnumExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedImportEnumExtension).length, 0);\n\n  expect(message.getExtension(Unittest.repeatedStringPieceExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedCordExtension).length, 0);\n\n  // Repeated fields are empty via getExtension().length.\n  expect(message.getExtension(Unittest.repeatedInt32Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedInt64Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedUint32Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedUint64Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedSint32Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedSint64Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedFixed32Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedFixed64Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedSfixed32Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedSfixed64Extension).length, 0);\n  expect(message.getExtension(Unittest.repeatedFloatExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedDoubleExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedBoolExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedStringExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedBytesExtension).length, 0);\n\n  expect(message.getExtension(Unittest.repeatedgroupExtension).length, 0);\n  expect(\n    message.getExtension(Unittest.repeatedNestedMessageExtension).length,\n    0,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignMessageExtension).length,\n    0,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportMessageExtension).length,\n    0,\n  );\n  expect(message.getExtension(Unittest.repeatedNestedEnumExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedForeignEnumExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedImportEnumExtension).length, 0);\n\n  expect(message.getExtension(Unittest.repeatedStringPieceExtension).length, 0);\n  expect(message.getExtension(Unittest.repeatedCordExtension).length, 0);\n\n  // hasBlah() should also be false for all default fields.\n  expect(message.hasExtension(Unittest.defaultInt32Extension), isFalse);\n  expect(message.hasExtension(Unittest.defaultInt64Extension), isFalse);\n  expect(message.hasExtension(Unittest.defaultUint32Extension), isFalse);\n  expect(message.hasExtension(Unittest.defaultUint64Extension), isFalse);\n  expect(message.hasExtension(Unittest.defaultSint32Extension), isFalse);\n  expect(message.hasExtension(Unittest.defaultSint64Extension), isFalse);\n  expect(message.hasExtension(Unittest.defaultFixed32Extension), isFalse);\n  expect(message.hasExtension(Unittest.defaultFixed64Extension), isFalse);\n  expect(message.hasExtension(Unittest.defaultSfixed32Extension), isFalse);\n  expect(message.hasExtension(Unittest.defaultSfixed64Extension), isFalse);\n  expect(message.hasExtension(Unittest.defaultFloatExtension), isFalse);\n  expect(message.hasExtension(Unittest.defaultDoubleExtension), isFalse);\n  expect(message.hasExtension(Unittest.defaultBoolExtension), isFalse);\n  expect(message.hasExtension(Unittest.defaultStringExtension), isFalse);\n  expect(message.hasExtension(Unittest.defaultBytesExtension), isFalse);\n\n  expect(message.hasExtension(Unittest.defaultNestedEnumExtension), isFalse);\n  expect(message.hasExtension(Unittest.defaultForeignEnumExtension), isFalse);\n  expect(message.hasExtension(Unittest.defaultImportEnumExtension), isFalse);\n\n  expect(message.hasExtension(Unittest.defaultStringPieceExtension), isFalse);\n  expect(message.hasExtension(Unittest.defaultCordExtension), isFalse);\n\n  // Fields with defaults have their default values (duh).\n  expect(message.getExtension(Unittest.defaultInt32Extension), 41);\n  expect(message.getExtension(Unittest.defaultInt64Extension), expect64(42));\n  expect(message.getExtension(Unittest.defaultUint32Extension), 43);\n  expect(message.getExtension(Unittest.defaultUint64Extension), expect64(44));\n  expect(message.getExtension(Unittest.defaultSint32Extension), -45);\n  expect(message.getExtension(Unittest.defaultSint64Extension), expect64(46));\n  expect(message.getExtension(Unittest.defaultFixed32Extension), 47);\n  expect(message.getExtension(Unittest.defaultFixed64Extension), expect64(48));\n  expect(message.getExtension(Unittest.defaultSfixed32Extension), 49);\n  expect(\n    message.getExtension(Unittest.defaultSfixed64Extension),\n    expect64(-50),\n  );\n  expect(message.getExtension(Unittest.defaultFloatExtension), 51.5);\n  expect(message.getExtension(Unittest.defaultDoubleExtension), 52e3);\n  expect(message.getExtension(Unittest.defaultBoolExtension), true);\n  expect(message.getExtension(Unittest.defaultStringExtension), 'hello');\n  expect(\n    message.getExtension(Unittest.defaultBytesExtension),\n    'world'.codeUnits,\n  );\n\n  expect(\n    message.getExtension(Unittest.defaultNestedEnumExtension),\n    TestAllTypes_NestedEnum.BAR,\n  );\n  expect(\n    message.getExtension(Unittest.defaultForeignEnumExtension),\n    ForeignEnum.FOREIGN_BAR,\n  );\n  expect(\n    message.getExtension(Unittest.defaultImportEnumExtension),\n    ImportEnum.IMPORT_BAR,\n  );\n\n  expect(message.getExtension(Unittest.defaultStringPieceExtension), 'abc');\n  expect(message.getExtension(Unittest.defaultCordExtension), '123');\n}\n\nvoid assertPackedExtensionsSet(TestPackedExtensions message) {\n  expect(message.getExtension(Unittest.packedInt32Extension).length, 2);\n  expect(message.getExtension(Unittest.packedInt64Extension).length, 2);\n  expect(message.getExtension(Unittest.packedUint32Extension).length, 2);\n  expect(message.getExtension(Unittest.packedUint64Extension).length, 2);\n  expect(message.getExtension(Unittest.packedSint32Extension).length, 2);\n  expect(message.getExtension(Unittest.packedSint64Extension).length, 2);\n  expect(message.getExtension(Unittest.packedFixed32Extension).length, 2);\n  expect(message.getExtension(Unittest.packedFixed64Extension).length, 2);\n  expect(message.getExtension(Unittest.packedSfixed32Extension).length, 2);\n  expect(message.getExtension(Unittest.packedSfixed64Extension).length, 2);\n  expect(message.getExtension(Unittest.packedFloatExtension).length, 2);\n  expect(message.getExtension(Unittest.packedDoubleExtension).length, 2);\n  expect(message.getExtension(Unittest.packedBoolExtension).length, 2);\n  expect(message.getExtension(Unittest.packedEnumExtension).length, 2);\n  expect(message.getExtension(Unittest.packedInt32Extension)[0], 601);\n  expect(message.getExtension(Unittest.packedInt64Extension)[0], expect64(602));\n  expect(message.getExtension(Unittest.packedUint32Extension)[0], 603);\n  expect(\n    message.getExtension(Unittest.packedUint64Extension)[0],\n    expect64(604),\n  );\n  expect(message.getExtension(Unittest.packedSint32Extension)[0], 605);\n  expect(\n    message.getExtension(Unittest.packedSint64Extension)[0],\n    expect64(606),\n  );\n  expect(message.getExtension(Unittest.packedFixed32Extension)[0], 607);\n  expect(\n    message.getExtension(Unittest.packedFixed64Extension)[0],\n    expect64(608),\n  );\n  expect(message.getExtension(Unittest.packedSfixed32Extension)[0], 609);\n  expect(\n    message.getExtension(Unittest.packedSfixed64Extension)[0],\n    expect64(610),\n  );\n  expect(message.getExtension(Unittest.packedFloatExtension)[0], 611.0);\n  expect(message.getExtension(Unittest.packedDoubleExtension)[0], 612.0);\n  expect(message.getExtension(Unittest.packedBoolExtension)[0], true);\n  expect(\n    message.getExtension(Unittest.packedEnumExtension)[0],\n    ForeignEnum.FOREIGN_BAR,\n  );\n  expect(message.getExtension(Unittest.packedInt32Extension)[1], 701);\n  expect(message.getExtension(Unittest.packedInt64Extension)[1], expect64(702));\n  expect(message.getExtension(Unittest.packedUint32Extension)[1], 703);\n  expect(\n    message.getExtension(Unittest.packedUint64Extension)[1],\n    expect64(704),\n  );\n  expect(message.getExtension(Unittest.packedSint32Extension)[1], 705);\n  expect(\n    message.getExtension(Unittest.packedSint64Extension)[1],\n    expect64(706),\n  );\n  expect(message.getExtension(Unittest.packedFixed32Extension)[1], 707);\n  expect(\n    message.getExtension(Unittest.packedFixed64Extension)[1],\n    expect64(708),\n  );\n  expect(message.getExtension(Unittest.packedSfixed32Extension)[1], 709);\n  expect(\n    message.getExtension(Unittest.packedSfixed64Extension)[1],\n    expect64(710),\n  );\n  expect(message.getExtension(Unittest.packedFloatExtension)[1], 711.0);\n  expect(message.getExtension(Unittest.packedDoubleExtension)[1], 712.0);\n  expect(message.getExtension(Unittest.packedBoolExtension)[1], false);\n  expect(\n    message.getExtension(Unittest.packedEnumExtension)[1],\n    ForeignEnum.FOREIGN_BAZ,\n  );\n}\n\n// Assert (using expect} that all fields of [message] are set to the values\n// assigned by [setPackedFields].\nvoid assertPackedFieldsSet(TestPackedTypes message) {\n  expect(message.packedInt32.length, 2);\n  expect(message.packedInt64.length, 2);\n  expect(message.packedUint32.length, 2);\n  expect(message.packedUint64.length, 2);\n  expect(message.packedSint32.length, 2);\n  expect(message.packedSint64.length, 2);\n  expect(message.packedFixed32.length, 2);\n  expect(message.packedFixed64.length, 2);\n  expect(message.packedSfixed32.length, 2);\n  expect(message.packedSfixed64.length, 2);\n  expect(message.packedFloat.length, 2);\n  expect(message.packedDouble.length, 2);\n  expect(message.packedBool.length, 2);\n  expect(message.packedEnum.length, 2);\n  expect(message.packedInt32[0], 601);\n  expect(message.packedInt64[0], expect64(602));\n  expect(message.packedUint32[0], 603);\n  expect(message.packedUint64[0], expect64(604));\n  expect(message.packedSint32[0], 605);\n  expect(message.packedSint64[0], expect64(606));\n  expect(message.packedFixed32[0], 607);\n  expect(message.packedFixed64[0], expect64(608));\n  expect(message.packedSfixed32[0], 609);\n  expect(message.packedSfixed64[0], expect64(610));\n  expect(message.packedFloat[0], 611.0);\n  expect(message.packedDouble[0], 612.0);\n  expect(message.packedBool[0], true);\n  expect(message.packedEnum[0], ForeignEnum.FOREIGN_BAR);\n  expect(message.packedInt32[1], 701);\n  expect(message.packedInt64[1], expect64(702));\n  expect(message.packedUint32[1], 703);\n  expect(message.packedUint64[1], expect64(704));\n  expect(message.packedSint32[1], 705);\n  expect(message.packedSint64[1], expect64(706));\n  expect(message.packedFixed32[1], 707);\n  expect(message.packedFixed64[1], expect64(708));\n  expect(message.packedSfixed32[1], 709);\n  expect(message.packedSfixed64[1], expect64(710));\n  expect(message.packedFloat[1], 711.0);\n  expect(message.packedDouble[1], 712.0);\n  expect(message.packedBool[1], false);\n  expect(message.packedEnum[1], ForeignEnum.FOREIGN_BAZ);\n}\n\nvoid assertRepeatedExtensionsModified(TestAllExtensions message) {\n  expect(message.hasExtension(Unittest.optionalInt32Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalInt64Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalUint32Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalUint64Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalSint32Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalSint64Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalFixed32Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalFixed64Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalSfixed32Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalSfixed64Extension), isTrue);\n  expect(message.hasExtension(Unittest.optionalFloatExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalDoubleExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalBoolExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalStringExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalBytesExtension), isTrue);\n\n  expect(message.hasExtension(Unittest.optionalgroupExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalNestedMessageExtension), isTrue);\n  expect(\n    message.hasExtension(Unittest.optionalForeignMessageExtension),\n    isTrue,\n  );\n  expect(message.hasExtension(Unittest.optionalImportMessageExtension), isTrue);\n\n  expect(message.getExtension(Unittest.optionalgroupExtension).hasA(), isTrue);\n  expect(\n    message.getExtension(Unittest.optionalNestedMessageExtension).hasBb(),\n    isTrue,\n  );\n  expect(\n    message.getExtension(Unittest.optionalForeignMessageExtension).hasC(),\n    isTrue,\n  );\n  expect(\n    message.getExtension(Unittest.optionalImportMessageExtension).hasD(),\n    isTrue,\n  );\n\n  expect(message.hasExtension(Unittest.optionalNestedEnumExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalForeignEnumExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalImportEnumExtension), isTrue);\n\n  expect(message.hasExtension(Unittest.optionalStringPieceExtension), isTrue);\n  expect(message.hasExtension(Unittest.optionalCordExtension), isTrue);\n\n  expect(message.getExtension(Unittest.optionalInt32Extension), 101);\n  expect(message.getExtension(Unittest.optionalInt64Extension), expect64(102));\n  expect(message.getExtension(Unittest.optionalUint32Extension), 103);\n  expect(message.getExtension(Unittest.optionalUint64Extension), expect64(104));\n  expect(message.getExtension(Unittest.optionalSint32Extension), 105);\n  expect(message.getExtension(Unittest.optionalSint64Extension), expect64(106));\n  expect(message.getExtension(Unittest.optionalFixed32Extension), 107);\n  expect(\n    message.getExtension(Unittest.optionalFixed64Extension),\n    expect64(108),\n  );\n  expect(message.getExtension(Unittest.optionalSfixed32Extension), 109);\n  expect(\n    message.getExtension(Unittest.optionalSfixed64Extension),\n    expect64(110),\n  );\n  expect(message.getExtension(Unittest.optionalFloatExtension), 111.0);\n  expect(message.getExtension(Unittest.optionalDoubleExtension), 112.0);\n  expect(message.getExtension(Unittest.optionalBoolExtension), true);\n  expect(message.getExtension(Unittest.optionalStringExtension), '115');\n  expect(\n    message.getExtension(Unittest.optionalBytesExtension),\n    '116'.codeUnits,\n  );\n\n  expect(message.getExtension(Unittest.optionalgroupExtension).a, 117);\n  expect(message.getExtension(Unittest.optionalNestedMessageExtension).bb, 118);\n  expect(message.getExtension(Unittest.optionalForeignMessageExtension).c, 119);\n  expect(message.getExtension(Unittest.optionalImportMessageExtension).d, 120);\n\n  expect(\n    message.getExtension(Unittest.optionalNestedEnumExtension),\n    TestAllTypes_NestedEnum.BAZ,\n  );\n  expect(\n    message.getExtension(Unittest.optionalForeignEnumExtension),\n    ForeignEnum.FOREIGN_BAZ,\n  );\n  expect(\n    message.getExtension(Unittest.optionalImportEnumExtension),\n    ImportEnum.IMPORT_BAZ,\n  );\n\n  expect(message.getExtension(Unittest.optionalStringPieceExtension), '124');\n  expect(message.getExtension(Unittest.optionalCordExtension), '125');\n\n  // -----------------------------------------------------------------\n\n  expect(message.getExtension(Unittest.repeatedInt32Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedInt64Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedUint32Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedUint64Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedSint32Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedSint64Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedFixed32Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedFixed64Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedSfixed32Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedSfixed64Extension).length, 2);\n  expect(message.getExtension(Unittest.repeatedFloatExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedDoubleExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedBoolExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedStringExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedBytesExtension).length, 2);\n\n  expect(message.getExtension(Unittest.repeatedgroupExtension).length, 2);\n  expect(\n    message.getExtension(Unittest.repeatedNestedMessageExtension).length,\n    2,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignMessageExtension).length,\n    2,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportMessageExtension).length,\n    2,\n  );\n  expect(message.getExtension(Unittest.repeatedNestedEnumExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedForeignEnumExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedImportEnumExtension).length, 2);\n\n  expect(message.getExtension(Unittest.repeatedStringPieceExtension).length, 2);\n  expect(message.getExtension(Unittest.repeatedCordExtension).length, 2);\n\n  expect(message.getExtension(Unittest.repeatedInt32Extension)[0], 201);\n  expect(\n    message.getExtension(Unittest.repeatedInt64Extension)[0],\n    expect64(202),\n  );\n  expect(message.getExtension(Unittest.repeatedUint32Extension)[0], 203);\n  expect(\n    message.getExtension(Unittest.repeatedUint64Extension)[0],\n    expect64(204),\n  );\n  expect(message.getExtension(Unittest.repeatedSint32Extension)[0], 205);\n  expect(\n    message.getExtension(Unittest.repeatedSint64Extension)[0],\n    expect64(206),\n  );\n  expect(message.getExtension(Unittest.repeatedFixed32Extension)[0], 207);\n  expect(\n    message.getExtension(Unittest.repeatedFixed64Extension)[0],\n    expect64(208),\n  );\n  expect(message.getExtension(Unittest.repeatedSfixed32Extension)[0], 209);\n  expect(\n    message.getExtension(Unittest.repeatedSfixed64Extension)[0],\n    expect64(210),\n  );\n  expect(message.getExtension(Unittest.repeatedFloatExtension)[0], 211.0);\n  expect(message.getExtension(Unittest.repeatedDoubleExtension)[0], 212.0);\n  expect(message.getExtension(Unittest.repeatedBoolExtension)[0], true);\n  expect(message.getExtension(Unittest.repeatedStringExtension)[0], '215');\n  expect(\n    message.getExtension(Unittest.repeatedBytesExtension)[0],\n    '216'.codeUnits,\n  );\n\n  expect(message.getExtension(Unittest.repeatedgroupExtension)[0].a, 217);\n  expect(\n    message.getExtension(Unittest.repeatedNestedMessageExtension)[0].bb,\n    218,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignMessageExtension)[0].c,\n    219,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportMessageExtension)[0].d,\n    220,\n  );\n\n  expect(\n    message.getExtension(Unittest.repeatedNestedEnumExtension)[0],\n    TestAllTypes_NestedEnum.BAR,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignEnumExtension)[0],\n    ForeignEnum.FOREIGN_BAR,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportEnumExtension)[0],\n    ImportEnum.IMPORT_BAR,\n  );\n\n  expect(message.getExtension(Unittest.repeatedStringPieceExtension)[0], '224');\n  expect(message.getExtension(Unittest.repeatedCordExtension)[0], '225');\n\n  expect(message.getExtension(Unittest.repeatedInt32Extension)[1], 501);\n  expect(\n    message.getExtension(Unittest.repeatedInt64Extension)[1],\n    expect64(502),\n  );\n  expect(message.getExtension(Unittest.repeatedUint32Extension)[1], 503);\n  expect(\n    message.getExtension(Unittest.repeatedUint64Extension)[1],\n    expect64(504),\n  );\n  expect(message.getExtension(Unittest.repeatedSint32Extension)[1], 505);\n  expect(\n    message.getExtension(Unittest.repeatedSint64Extension)[1],\n    expect64(506),\n  );\n  expect(message.getExtension(Unittest.repeatedFixed32Extension)[1], 507);\n  expect(\n    message.getExtension(Unittest.repeatedFixed64Extension)[1],\n    expect64(508),\n  );\n  expect(message.getExtension(Unittest.repeatedSfixed32Extension)[1], 509);\n  expect(\n    message.getExtension(Unittest.repeatedSfixed64Extension)[1],\n    expect64(510),\n  );\n  expect(message.getExtension(Unittest.repeatedFloatExtension)[1], 511.0);\n  expect(message.getExtension(Unittest.repeatedDoubleExtension)[1], 512.0);\n  expect(message.getExtension(Unittest.repeatedBoolExtension)[1], true);\n  expect(message.getExtension(Unittest.repeatedStringExtension)[1], '515');\n  expect(\n    message.getExtension(Unittest.repeatedBytesExtension)[1],\n    '516'.codeUnits,\n  );\n\n  expect(message.getExtension(Unittest.repeatedgroupExtension)[1].a, 517);\n  expect(\n    message.getExtension(Unittest.repeatedNestedMessageExtension)[1].bb,\n    518,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignMessageExtension)[1].c,\n    519,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportMessageExtension)[1].d,\n    520,\n  );\n\n  expect(\n    message.getExtension(Unittest.repeatedNestedEnumExtension)[1],\n    TestAllTypes_NestedEnum.FOO,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedForeignEnumExtension)[1],\n    ForeignEnum.FOREIGN_FOO,\n  );\n  expect(\n    message.getExtension(Unittest.repeatedImportEnumExtension)[1],\n    ImportEnum.IMPORT_FOO,\n  );\n\n  expect(message.getExtension(Unittest.repeatedStringPieceExtension)[1], '524');\n  expect(message.getExtension(Unittest.repeatedCordExtension)[1], '525');\n\n  // -----------------------------------------------------------------\n\n  expect(message.hasExtension(Unittest.defaultInt32Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultInt64Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultUint32Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultUint64Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultSint32Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultSint64Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultFixed32Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultFixed64Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultSfixed32Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultSfixed64Extension), isTrue);\n  expect(message.hasExtension(Unittest.defaultFloatExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultDoubleExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultBoolExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultStringExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultBytesExtension), isTrue);\n\n  expect(message.hasExtension(Unittest.defaultNestedEnumExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultForeignEnumExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultImportEnumExtension), isTrue);\n\n  expect(message.hasExtension(Unittest.defaultStringPieceExtension), isTrue);\n  expect(message.hasExtension(Unittest.defaultCordExtension), isTrue);\n\n  expect(message.getExtension(Unittest.defaultInt32Extension), 401);\n  expect(message.getExtension(Unittest.defaultInt64Extension), expect64(402));\n  expect(message.getExtension(Unittest.defaultUint32Extension), 403);\n  expect(message.getExtension(Unittest.defaultUint64Extension), expect64(404));\n  expect(message.getExtension(Unittest.defaultSint32Extension), 405);\n  expect(message.getExtension(Unittest.defaultSint64Extension), expect64(406));\n  expect(message.getExtension(Unittest.defaultFixed32Extension), 407);\n  expect(message.getExtension(Unittest.defaultFixed64Extension), expect64(408));\n  expect(message.getExtension(Unittest.defaultSfixed32Extension), 409);\n  expect(\n    message.getExtension(Unittest.defaultSfixed64Extension),\n    expect64(410),\n  );\n  expect(message.getExtension(Unittest.defaultFloatExtension), 411.0);\n  expect(message.getExtension(Unittest.defaultDoubleExtension), 412.0);\n  expect(message.getExtension(Unittest.defaultBoolExtension), false);\n  expect(message.getExtension(Unittest.defaultStringExtension), '415');\n  expect(message.getExtension(Unittest.defaultBytesExtension), '416'.codeUnits);\n\n  expect(\n    message.getExtension(Unittest.defaultNestedEnumExtension),\n    TestAllTypes_NestedEnum.FOO,\n  );\n  expect(\n    message.getExtension(Unittest.defaultForeignEnumExtension),\n    ForeignEnum.FOREIGN_FOO,\n  );\n  expect(\n    message.getExtension(Unittest.defaultImportEnumExtension),\n    ImportEnum.IMPORT_FOO,\n  );\n\n  expect(message.getExtension(Unittest.defaultStringPieceExtension), '424');\n  expect(message.getExtension(Unittest.defaultCordExtension), '425');\n}\n\nvoid assertRepeatedFieldsModified(TestAllTypes message) {\n  // ModifyRepeatedFields only sets the second repeated element of each\n  // field.  In addition to verifying this, we also verify that the first\n  // element and size were *not* modified.\n  expect(message.repeatedInt32.length, 2);\n  expect(message.repeatedInt64.length, 2);\n  expect(message.repeatedUint32.length, 2);\n  expect(message.repeatedUint64.length, 2);\n  expect(message.repeatedSint32.length, 2);\n  expect(message.repeatedSint64.length, 2);\n  expect(message.repeatedFixed32.length, 2);\n  expect(message.repeatedFixed64.length, 2);\n  expect(message.repeatedSfixed32.length, 2);\n  expect(message.repeatedSfixed64.length, 2);\n  expect(message.repeatedFloat.length, 2);\n  expect(message.repeatedDouble.length, 2);\n  expect(message.repeatedBool.length, 2);\n  expect(message.repeatedString.length, 2);\n  expect(message.repeatedBytes.length, 2);\n\n  expect(message.repeatedgroup.length, 2);\n  expect(message.repeatedNestedMessage.length, 2);\n  expect(message.repeatedForeignMessage.length, 2);\n  expect(message.repeatedImportMessage.length, 2);\n  expect(message.repeatedNestedEnum.length, 2);\n  expect(message.repeatedForeignEnum.length, 2);\n  expect(message.repeatedImportEnum.length, 2);\n\n  expect(message.repeatedStringPiece.length, 2);\n  expect(message.repeatedCord.length, 2);\n\n  expect(message.repeatedInt32[0], 201);\n  expect(message.repeatedInt64[0], expect64(202));\n  expect(message.repeatedUint32[0], 203);\n  expect(message.repeatedUint64[0], expect64(204));\n  expect(message.repeatedSint32[0], 205);\n  expect(message.repeatedSint64[0], expect64(206));\n  expect(message.repeatedFixed32[0], 207);\n  expect(message.repeatedFixed64[0], expect64(208));\n  expect(message.repeatedSfixed32[0], 209);\n  expect(message.repeatedSfixed64[0], expect64(210));\n  expect(message.repeatedFloat[0], 211.0);\n  expect(message.repeatedDouble[0], 212.0);\n  expect(message.repeatedBool[0], true);\n  expect(message.repeatedString[0], '215');\n  expect(message.repeatedBytes[0], '216'.codeUnits);\n\n  expect(message.repeatedgroup[0].a, 217);\n  expect(message.repeatedNestedMessage[0].bb, 218);\n  expect(message.repeatedForeignMessage[0].c, 219);\n  expect(message.repeatedImportMessage[0].d, 220);\n\n  expect(message.repeatedNestedEnum[0], TestAllTypes_NestedEnum.BAR);\n  expect(message.repeatedForeignEnum[0], ForeignEnum.FOREIGN_BAR);\n  expect(message.repeatedImportEnum[0], ImportEnum.IMPORT_BAR);\n\n  expect(message.repeatedStringPiece[0], '224');\n  expect(message.repeatedCord[0], '225');\n\n  // Actually verify the second(modified) elements now.\n  expect(message.repeatedInt32[1], 501);\n  expect(message.repeatedInt64[1], expect64(502));\n  expect(message.repeatedUint32[1], 503);\n  expect(message.repeatedUint64[1], expect64(504));\n  expect(message.repeatedSint32[1], 505);\n  expect(message.repeatedSint64[1], expect64(506));\n  expect(message.repeatedFixed32[1], 507);\n  expect(message.repeatedFixed64[1], expect64(508));\n  expect(message.repeatedSfixed32[1], 509);\n  expect(message.repeatedSfixed64[1], expect64(510));\n  expect(message.repeatedFloat[1], 511.0);\n  expect(message.repeatedDouble[1], 512.0);\n  expect(message.repeatedBool[1], true);\n  expect(message.repeatedString[1], '515');\n  expect(message.repeatedBytes[1], '516'.codeUnits);\n\n  expect(message.repeatedgroup[1].a, 517);\n  expect(message.repeatedNestedMessage[1].bb, 518);\n  expect(message.repeatedForeignMessage[1].c, 519);\n  expect(message.repeatedImportMessage[1].d, 520);\n\n  expect(message.repeatedNestedEnum[1], TestAllTypes_NestedEnum.BAR);\n  expect(message.repeatedForeignEnum[1], ForeignEnum.FOREIGN_BAR);\n  expect(message.repeatedImportEnum[1], ImportEnum.IMPORT_BAR);\n\n  expect(message.repeatedStringPiece[1], '524');\n  expect(message.repeatedCord[1], '525');\n}\n\n// Assert (using expect} that all fields of [message] are set to the values\n// assigned by [setUnpackedFields].\nvoid assertUnpackedFieldsSet(TestUnpackedTypes message) {\n  expect(message.unpackedInt32.length, 2);\n  expect(message.unpackedInt64.length, 2);\n  expect(message.unpackedUint32.length, 2);\n  expect(message.unpackedUint64.length, 2);\n  expect(message.unpackedSint32.length, 2);\n  expect(message.unpackedSint64.length, 2);\n  expect(message.unpackedFixed32.length, 2);\n  expect(message.unpackedFixed64.length, 2);\n  expect(message.unpackedSfixed32.length, 2);\n  expect(message.unpackedSfixed64.length, 2);\n  expect(message.unpackedFloat.length, 2);\n  expect(message.unpackedDouble.length, 2);\n  expect(message.unpackedBool.length, 2);\n  expect(message.unpackedEnum.length, 2);\n  expect(message.unpackedInt32[0], 601);\n  expect(message.unpackedInt64[0], expect64(602));\n  expect(message.unpackedUint32[0], 603);\n  expect(message.unpackedUint64[0], expect64(604));\n  expect(message.unpackedSint32[0], 605);\n  expect(message.unpackedSint64[0], expect64(606));\n  expect(message.unpackedFixed32[0], 607);\n  expect(message.unpackedFixed64[0], expect64(608));\n  expect(message.unpackedSfixed32[0], 609);\n  expect(message.unpackedSfixed64[0], expect64(610));\n  expect(message.unpackedFloat[0], 611.0);\n  expect(message.unpackedDouble[0], 612.0);\n  expect(message.unpackedBool[0], true);\n  expect(message.unpackedEnum[0], ForeignEnum.FOREIGN_BAR);\n  expect(message.unpackedInt32[1], 701);\n  expect(message.unpackedInt64[1], expect64(702));\n  expect(message.unpackedUint32[1], 703);\n  expect(message.unpackedUint64[1], expect64(704));\n  expect(message.unpackedSint32[1], 705);\n  expect(message.unpackedSint64[1], expect64(706));\n  expect(message.unpackedFixed32[1], 707);\n  expect(message.unpackedFixed64[1], expect64(708));\n  expect(message.unpackedSfixed32[1], 709);\n  expect(message.unpackedSfixed64[1], expect64(710));\n  expect(message.unpackedFloat[1], 711.0);\n  expect(message.unpackedDouble[1], 712.0);\n  expect(message.unpackedBool[1], false);\n  expect(message.unpackedEnum[1], ForeignEnum.FOREIGN_BAZ);\n}\n\nTestAllExtensions getAllExtensionsSet() {\n  final message = TestAllExtensions();\n  setAllExtensions(message);\n  return message;\n}\n\n// Get a [TestAllTypes] with all fields set as they would\n// be by [setAllFields(TestAllTypes)].\nTestAllTypes getAllSet() {\n  final message = TestAllTypes();\n  setAllFields(message);\n  return message;\n}\n\nExtensionRegistry getExtensionRegistry() {\n  final registry = ExtensionRegistry();\n  registerAllExtensions(registry);\n  return registry /*.getUnmodifiable()*/;\n}\n\nTestPackedExtensions getPackedExtensionsSet() {\n  final message = TestPackedExtensions();\n  setPackedExtensions(message);\n  return message;\n}\n\nTestPackedTypes getPackedSet() {\n  final message = TestPackedTypes();\n  setPackedFields(message);\n  return message;\n}\n\nTestUnpackedTypes getUnpackedSet() {\n  final message = TestUnpackedTypes();\n  setUnpackedFields(message);\n  return message;\n}\n\nvoid modifyRepeatedExtensions(TestAllExtensions message) {\n  message.getExtension(Unittest.repeatedInt32Extension)[1] = 501;\n  message.getExtension(Unittest.repeatedInt64Extension)[1] = make64(502);\n  message.getExtension(Unittest.repeatedUint32Extension)[1] = 503;\n  message.getExtension(Unittest.repeatedUint64Extension)[1] = make64(504);\n  message.getExtension(Unittest.repeatedSint32Extension)[1] = 505;\n  message.getExtension(Unittest.repeatedSint64Extension)[1] = make64(506);\n  message.getExtension(Unittest.repeatedFixed32Extension)[1] = 507;\n  message.getExtension(Unittest.repeatedFixed64Extension)[1] = make64(508);\n  message.getExtension(Unittest.repeatedSfixed32Extension)[1] = 509;\n  message.getExtension(Unittest.repeatedSfixed64Extension)[1] = make64(510);\n  message.getExtension(Unittest.repeatedFloatExtension)[1] = 511.0;\n  message.getExtension(Unittest.repeatedDoubleExtension)[1] = 512.0;\n  message.getExtension(Unittest.repeatedBoolExtension)[1] = true;\n  message.getExtension(Unittest.repeatedStringExtension)[1] = '515';\n  message.getExtension(Unittest.repeatedBytesExtension)[1] = '516'.codeUnits;\n\n  dynamic msg;\n\n  msg = RepeatedGroup_extension();\n  msg.a = 517;\n  message.getExtension(Unittest.repeatedgroupExtension)[1] = msg;\n\n  msg = TestAllTypes_NestedMessage();\n  msg.bb = 518;\n  message.getExtension(Unittest.repeatedNestedMessageExtension)[1] = msg;\n\n  msg = ForeignMessage();\n  msg.c = 519;\n  message.getExtension(Unittest.repeatedForeignMessageExtension)[1] = msg;\n\n  msg = ImportMessage();\n  msg.d = 520;\n  message.getExtension(Unittest.repeatedImportMessageExtension)[1] = msg;\n\n  message.getExtension(Unittest.repeatedNestedEnumExtension)[1] =\n      TestAllTypes_NestedEnum.FOO;\n  message.getExtension(Unittest.repeatedForeignEnumExtension)[1] =\n      ForeignEnum.FOREIGN_FOO;\n  message.getExtension(Unittest.repeatedImportEnumExtension)[1] =\n      ImportEnum.IMPORT_FOO;\n\n  message.getExtension(Unittest.repeatedStringPieceExtension)[1] = '524';\n  message.getExtension(Unittest.repeatedCordExtension)[1] = '525';\n}\n\n// Modify the repeated fields of {@code message} to contain the values\n// expected by {@code assertRepeatedFieldsModified()}.\nvoid modifyRepeatedFields(TestAllTypes message) {\n  message.repeatedInt32[1] = 501;\n  message.repeatedInt64[1] = make64(502);\n  message.repeatedUint32[1] = 503;\n  message.repeatedUint64[1] = make64(504);\n  message.repeatedSint32[1] = 505;\n  message.repeatedSint64[1] = make64(506);\n  message.repeatedFixed32[1] = 507;\n  message.repeatedFixed64[1] = make64(508);\n  message.repeatedSfixed32[1] = 509;\n  message.repeatedSfixed64[1] = make64(510);\n  message.repeatedFloat[1] = 511.0;\n  message.repeatedDouble[1] = 512.0;\n  message.repeatedBool[1] = true;\n  message.repeatedString[1] = '515';\n  message.repeatedBytes[1] = '516'.codeUnits;\n\n  final repeatedGroup = TestAllTypes_RepeatedGroup();\n  repeatedGroup.a = 517;\n  message.repeatedgroup[1] = repeatedGroup;\n\n  final optionalNestedMessage = TestAllTypes_NestedMessage();\n  optionalNestedMessage.bb = 518;\n  message.repeatedNestedMessage[1] = optionalNestedMessage;\n\n  final optionalForeignMessage = ForeignMessage();\n  optionalForeignMessage.c = 519;\n  message.repeatedForeignMessage[1] = optionalForeignMessage;\n\n  final optionalImportMessage = ImportMessage();\n  optionalImportMessage.d = 520;\n  message.repeatedImportMessage[1] = optionalImportMessage;\n\n  message.repeatedNestedEnum[1] = TestAllTypes_NestedEnum.BAR;\n  message.repeatedForeignEnum[1] = ForeignEnum.FOREIGN_BAR;\n  message.repeatedImportEnum[1] = ImportEnum.IMPORT_BAR;\n\n  message.repeatedStringPiece[1] = '524';\n  message.repeatedCord[1] = '525';\n}\n\nvoid registerAllExtensions(ExtensionRegistry registry) {\n  Unittest.registerAllExtensions(registry);\n}\n\nvoid setAllExtensions(TestAllExtensions message) {\n  message.setExtension(Unittest.optionalInt32Extension, 101);\n  message.setExtension(Unittest.optionalInt64Extension, make64(102));\n  message.setExtension(Unittest.optionalUint32Extension, 103);\n  message.setExtension(Unittest.optionalUint64Extension, make64(104));\n  message.setExtension(Unittest.optionalSint32Extension, 105);\n  message.setExtension(Unittest.optionalSint64Extension, make64(106));\n  message.setExtension(Unittest.optionalFixed32Extension, 107);\n  message.setExtension(Unittest.optionalFixed64Extension, make64(108));\n  message.setExtension(Unittest.optionalSfixed32Extension, 109);\n  message.setExtension(Unittest.optionalSfixed64Extension, make64(110));\n  message.setExtension(Unittest.optionalFloatExtension, 111.0);\n  message.setExtension(Unittest.optionalDoubleExtension, 112.0);\n  message.setExtension(Unittest.optionalBoolExtension, true);\n  message.setExtension(Unittest.optionalStringExtension, '115');\n  message.setExtension(Unittest.optionalBytesExtension, '116'.codeUnits);\n\n  final msg = OptionalGroup_extension();\n  msg.a = 117;\n  message.setExtension(Unittest.optionalgroupExtension, msg);\n\n  final msg2 = TestAllTypes_NestedMessage();\n  msg2.bb = 118;\n  message.setExtension(Unittest.optionalNestedMessageExtension, msg2);\n\n  final msg3 = ForeignMessage();\n  msg3.c = 119;\n  message.setExtension(Unittest.optionalForeignMessageExtension, msg3);\n\n  final msg4 = ImportMessage();\n  msg4.d = 120;\n  message.setExtension(Unittest.optionalImportMessageExtension, msg4);\n\n  message.setExtension(\n    Unittest.optionalNestedEnumExtension,\n    TestAllTypes_NestedEnum.BAZ,\n  );\n  message.setExtension(\n    Unittest.optionalForeignEnumExtension,\n    ForeignEnum.FOREIGN_BAZ,\n  );\n  message.setExtension(\n    Unittest.optionalImportEnumExtension,\n    ImportEnum.IMPORT_BAZ,\n  );\n\n  message.setExtension(Unittest.optionalStringPieceExtension, '124');\n  message.setExtension(Unittest.optionalCordExtension, '125');\n\n  // -----------------------------------------------------------------\n\n  message.addExtension(Unittest.repeatedInt32Extension, 201);\n  message.addExtension(Unittest.repeatedInt64Extension, make64(202));\n  message.addExtension(Unittest.repeatedUint32Extension, 203);\n  message.addExtension(Unittest.repeatedUint64Extension, make64(204));\n  message.addExtension(Unittest.repeatedSint32Extension, 205);\n  message.addExtension(Unittest.repeatedSint64Extension, make64(206));\n  message.addExtension(Unittest.repeatedFixed32Extension, 207);\n  message.addExtension(Unittest.repeatedFixed64Extension, make64(208));\n  message.addExtension(Unittest.repeatedSfixed32Extension, 209);\n  message.addExtension(Unittest.repeatedSfixed64Extension, make64(210));\n  message.addExtension(Unittest.repeatedFloatExtension, 211.0);\n  message.addExtension(Unittest.repeatedDoubleExtension, 212.0);\n  message.addExtension(Unittest.repeatedBoolExtension, true);\n  message.addExtension(Unittest.repeatedStringExtension, '215');\n  message.addExtension(Unittest.repeatedBytesExtension, '216'.codeUnits);\n\n  final msg5 = RepeatedGroup_extension();\n  msg5.a = 217;\n  message.addExtension(Unittest.repeatedgroupExtension, msg5);\n\n  final msg6 = TestAllTypes_NestedMessage();\n  msg6.bb = 218;\n  message.addExtension(Unittest.repeatedNestedMessageExtension, msg6);\n\n  final msg7 = ForeignMessage();\n  msg7.c = 219;\n  message.addExtension(Unittest.repeatedForeignMessageExtension, msg7);\n\n  final msg8 = ImportMessage();\n  msg8.d = 220;\n  message.addExtension(Unittest.repeatedImportMessageExtension, msg8);\n\n  message.addExtension(\n    Unittest.repeatedNestedEnumExtension,\n    TestAllTypes_NestedEnum.BAR,\n  );\n  message.addExtension(\n    Unittest.repeatedForeignEnumExtension,\n    ForeignEnum.FOREIGN_BAR,\n  );\n  message.addExtension(\n    Unittest.repeatedImportEnumExtension,\n    ImportEnum.IMPORT_BAR,\n  );\n\n  message.addExtension(Unittest.repeatedStringPieceExtension, '224');\n  message.addExtension(Unittest.repeatedCordExtension, '225');\n\n  // Add a second one of each field.\n  message.addExtension(Unittest.repeatedInt32Extension, 301);\n  message.addExtension(Unittest.repeatedInt64Extension, make64(302));\n  message.addExtension(Unittest.repeatedUint32Extension, 303);\n  message.addExtension(Unittest.repeatedUint64Extension, make64(304));\n  message.addExtension(Unittest.repeatedSint32Extension, 305);\n  message.addExtension(Unittest.repeatedSint64Extension, make64(306));\n  message.addExtension(Unittest.repeatedFixed32Extension, 307);\n  message.addExtension(Unittest.repeatedFixed64Extension, make64(308));\n  message.addExtension(Unittest.repeatedSfixed32Extension, 309);\n  message.addExtension(Unittest.repeatedSfixed64Extension, make64(310));\n  message.addExtension(Unittest.repeatedFloatExtension, 311.0);\n  message.addExtension(Unittest.repeatedDoubleExtension, 312.0);\n  message.addExtension(Unittest.repeatedBoolExtension, false);\n  message.addExtension(Unittest.repeatedStringExtension, '315');\n  message.addExtension(Unittest.repeatedBytesExtension, '316'.codeUnits);\n\n  final msg9 = RepeatedGroup_extension();\n  msg9.a = 317;\n  message.addExtension(Unittest.repeatedgroupExtension, msg9);\n\n  final msg10 = TestAllTypes_NestedMessage();\n  msg10.bb = 318;\n  message.addExtension(Unittest.repeatedNestedMessageExtension, msg10);\n\n  final msg11 = ForeignMessage();\n  msg11.c = 319;\n  message.addExtension(Unittest.repeatedForeignMessageExtension, msg11);\n\n  final msg12 = ImportMessage();\n  msg12.d = 320;\n  message.addExtension(Unittest.repeatedImportMessageExtension, msg12);\n\n  message.addExtension(\n    Unittest.repeatedNestedEnumExtension,\n    TestAllTypes_NestedEnum.BAZ,\n  );\n  message.addExtension(\n    Unittest.repeatedForeignEnumExtension,\n    ForeignEnum.FOREIGN_BAZ,\n  );\n  message.addExtension(\n    Unittest.repeatedImportEnumExtension,\n    ImportEnum.IMPORT_BAZ,\n  );\n\n  message.addExtension(Unittest.repeatedStringPieceExtension, '324');\n  message.addExtension(Unittest.repeatedCordExtension, '325');\n\n  // -----------------------------------------------------------------\n\n  message.setExtension(Unittest.defaultInt32Extension, 401);\n  message.setExtension(Unittest.defaultInt64Extension, make64(402));\n  message.setExtension(Unittest.defaultUint32Extension, 403);\n  message.setExtension(Unittest.defaultUint64Extension, make64(404));\n  message.setExtension(Unittest.defaultSint32Extension, 405);\n  message.setExtension(Unittest.defaultSint64Extension, make64(406));\n  message.setExtension(Unittest.defaultFixed32Extension, 407);\n  message.setExtension(Unittest.defaultFixed64Extension, make64(408));\n  message.setExtension(Unittest.defaultSfixed32Extension, 409);\n  message.setExtension(Unittest.defaultSfixed64Extension, make64(410));\n  message.setExtension(Unittest.defaultFloatExtension, 411.0);\n  message.setExtension(Unittest.defaultDoubleExtension, 412.0);\n  message.setExtension(Unittest.defaultBoolExtension, false);\n  message.setExtension(Unittest.defaultStringExtension, '415');\n  message.setExtension(Unittest.defaultBytesExtension, '416'.codeUnits);\n\n  message.setExtension(\n    Unittest.defaultNestedEnumExtension,\n    TestAllTypes_NestedEnum.FOO,\n  );\n  message.setExtension(\n    Unittest.defaultForeignEnumExtension,\n    ForeignEnum.FOREIGN_FOO,\n  );\n  message.setExtension(\n    Unittest.defaultImportEnumExtension,\n    ImportEnum.IMPORT_FOO,\n  );\n\n  message.setExtension(Unittest.defaultStringPieceExtension, '424');\n  message.setExtension(Unittest.defaultCordExtension, '425');\n}\n\n// Set every field of {@code message} to the values expected by\n// {@code assertAllFieldsSet()}.\nvoid setAllFields(TestAllTypes message) {\n  message.optionalInt32 = 101;\n  message.optionalInt64 = make64(102);\n  message.optionalUint32 = 103;\n  message.optionalUint64 = make64(104);\n  message.optionalSint32 = 105;\n  message.optionalSint64 = make64(106);\n  message.optionalFixed32 = 107;\n  message.optionalFixed64 = make64(108);\n  message.optionalSfixed32 = 109;\n  message.optionalSfixed64 = make64(110);\n  message.optionalFloat = 111.0;\n  message.optionalDouble = 112.0;\n  message.optionalBool = true;\n  message.optionalString = '115';\n  message.optionalBytes = '116'.codeUnits;\n\n  final optionalgroup = TestAllTypes_OptionalGroup();\n  optionalgroup.a = 117;\n  message.optionalgroup = optionalgroup;\n\n  final optionalNestedMessage = TestAllTypes_NestedMessage();\n  optionalNestedMessage.bb = 118;\n  message.optionalNestedMessage = optionalNestedMessage;\n\n  final optionalForeignMessage = ForeignMessage();\n  optionalForeignMessage.c = 119;\n  message.optionalForeignMessage = optionalForeignMessage;\n\n  final optionalImportMessage = ImportMessage();\n  optionalImportMessage.d = 120;\n  message.optionalImportMessage = optionalImportMessage;\n\n  message.optionalNestedEnum = TestAllTypes_NestedEnum.BAZ;\n  message.optionalForeignEnum = ForeignEnum.FOREIGN_BAZ;\n  message.optionalImportEnum = ImportEnum.IMPORT_BAZ;\n\n  message.optionalStringPiece = '124';\n  message.optionalCord = '125';\n\n  // -----------------------------------------------------------------\n\n  message.repeatedInt32.add(201);\n  message.repeatedInt64.add(make64(202));\n  message.repeatedUint32.add(203);\n  message.repeatedUint64.add(make64(204));\n  message.repeatedSint32.add(205);\n  message.repeatedSint64.add(make64(206));\n  message.repeatedFixed32.add(207);\n  message.repeatedFixed64.add(make64(208));\n  message.repeatedSfixed32.add(209);\n  message.repeatedSfixed64.add(make64(210));\n  message.repeatedFloat.add(211.0);\n  message.repeatedDouble.add(212.0);\n  message.repeatedBool.add(true);\n  message.repeatedString.add('215');\n  message.repeatedBytes.add('216'.codeUnits);\n\n  var repeatedGroup = TestAllTypes_RepeatedGroup();\n  repeatedGroup.a = 217;\n  message.repeatedgroup.add(repeatedGroup);\n\n  var repeatedNested = TestAllTypes_NestedMessage();\n  repeatedNested.bb = 218;\n  message.repeatedNestedMessage.add(repeatedNested);\n\n  var repeatedForeignMessage = ForeignMessage();\n  repeatedForeignMessage.c = 219;\n  message.repeatedForeignMessage.add(repeatedForeignMessage);\n\n  var repeatedImportMessage = ImportMessage();\n  repeatedImportMessage.d = 220;\n  message.repeatedImportMessage.add(repeatedImportMessage);\n\n  message.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAR);\n  message.repeatedForeignEnum.add(ForeignEnum.FOREIGN_BAR);\n  message.repeatedImportEnum.add(ImportEnum.IMPORT_BAR);\n\n  message.repeatedStringPiece.add('224');\n  message.repeatedCord.add('225');\n\n  // Add a second one of each field.\n  message.repeatedInt32.add(301);\n  message.repeatedInt64.add(make64(302));\n  message.repeatedUint32.add(303);\n  message.repeatedUint64.add(make64(304));\n  message.repeatedSint32.add(305);\n  message.repeatedSint64.add(make64(306));\n  message.repeatedFixed32.add(307);\n  message.repeatedFixed64.add(make64(308));\n  message.repeatedSfixed32.add(309);\n  message.repeatedSfixed64.add(make64(310));\n  message.repeatedFloat.add(311.0);\n  message.repeatedDouble.add(312.0);\n  message.repeatedBool.add(false);\n  message.repeatedString.add('315');\n  message.repeatedBytes.add('316'.codeUnits);\n\n  repeatedGroup = TestAllTypes_RepeatedGroup();\n  repeatedGroup.a = 317;\n  message.repeatedgroup.add(repeatedGroup);\n\n  repeatedNested = TestAllTypes_NestedMessage();\n  repeatedNested.bb = 318;\n  message.repeatedNestedMessage.add(repeatedNested);\n\n  repeatedForeignMessage = ForeignMessage();\n  repeatedForeignMessage.c = 319;\n  message.repeatedForeignMessage.add(repeatedForeignMessage);\n\n  repeatedImportMessage = ImportMessage();\n  repeatedImportMessage.d = 320;\n  message.repeatedImportMessage.add(repeatedImportMessage);\n\n  message.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAZ);\n  message.repeatedForeignEnum.add(ForeignEnum.FOREIGN_BAZ);\n  message.repeatedImportEnum.add(ImportEnum.IMPORT_BAZ);\n\n  message.repeatedStringPiece.add('324');\n  message.repeatedCord.add('325');\n\n  // -----------------------------------------------------------------\n\n  message.defaultInt32 = 401;\n  message.defaultInt64 = make64(402);\n  message.defaultUint32 = 403;\n  message.defaultUint64 = make64(404);\n  message.defaultSint32 = 405;\n  message.defaultSint64 = make64(406);\n  message.defaultFixed32 = 407;\n  message.defaultFixed64 = make64(408);\n  message.defaultSfixed32 = 409;\n  message.defaultSfixed64 = make64(410);\n  message.defaultFloat = 411.0;\n  message.defaultDouble = 412.0;\n  message.defaultBool = false;\n  message.defaultString = '415';\n  message.defaultBytes = '416'.codeUnits;\n\n  message.defaultNestedEnum = TestAllTypes_NestedEnum.FOO;\n  message.defaultForeignEnum = ForeignEnum.FOREIGN_FOO;\n  message.defaultImportEnum = ImportEnum.IMPORT_FOO;\n\n  message.defaultStringPiece = '424';\n  message.defaultCord = '425';\n}\n\nvoid setPackedExtensions(TestPackedExtensions message) {\n  message.addExtension(Unittest.packedInt32Extension, 601);\n  message.addExtension(Unittest.packedInt64Extension, make64(602));\n  message.addExtension(Unittest.packedUint32Extension, 603);\n  message.addExtension(Unittest.packedUint64Extension, make64(604));\n  message.addExtension(Unittest.packedSint32Extension, 605);\n  message.addExtension(Unittest.packedSint64Extension, make64(606));\n  message.addExtension(Unittest.packedFixed32Extension, 607);\n  message.addExtension(Unittest.packedFixed64Extension, make64(608));\n  message.addExtension(Unittest.packedSfixed32Extension, 609);\n  message.addExtension(Unittest.packedSfixed64Extension, make64(610));\n  message.addExtension(Unittest.packedFloatExtension, 611.0);\n  message.addExtension(Unittest.packedDoubleExtension, 612.0);\n  message.addExtension(Unittest.packedBoolExtension, true);\n  message.addExtension(Unittest.packedEnumExtension, ForeignEnum.FOREIGN_BAR);\n  // Add a second one of each field.\n  message.addExtension(Unittest.packedInt32Extension, 701);\n  message.addExtension(Unittest.packedInt64Extension, make64(702));\n  message.addExtension(Unittest.packedUint32Extension, 703);\n  message.addExtension(Unittest.packedUint64Extension, make64(704));\n  message.addExtension(Unittest.packedSint32Extension, 705);\n  message.addExtension(Unittest.packedSint64Extension, make64(706));\n  message.addExtension(Unittest.packedFixed32Extension, 707);\n  message.addExtension(Unittest.packedFixed64Extension, make64(708));\n  message.addExtension(Unittest.packedSfixed32Extension, 709);\n  message.addExtension(Unittest.packedSfixed64Extension, make64(710));\n  message.addExtension(Unittest.packedFloatExtension, 711.0);\n  message.addExtension(Unittest.packedDoubleExtension, 712.0);\n  message.addExtension(Unittest.packedBoolExtension, false);\n  message.addExtension(Unittest.packedEnumExtension, ForeignEnum.FOREIGN_BAZ);\n}\n\n// Set every field of [message] to a unique value. Must correspond with\n// the values applied by [setUnpackedFields].\nvoid setPackedFields(TestPackedTypes message) {\n  message.packedInt32.add(601);\n  message.packedInt64.add(make64(602));\n  message.packedUint32.add(603);\n  message.packedUint64.add(make64(604));\n  message.packedSint32.add(605);\n  message.packedSint64.add(make64(606));\n  message.packedFixed32.add(607);\n  message.packedFixed64.add(make64(608));\n  message.packedSfixed32.add(609);\n  message.packedSfixed64.add(make64(610));\n  message.packedFloat.add(611.0);\n  message.packedDouble.add(612.0);\n  message.packedBool.add(true);\n  message.packedEnum.add(ForeignEnum.FOREIGN_BAR);\n  // Add a second one of each field.\n  message.packedInt32.add(701);\n  message.packedInt64.add(make64(702));\n  message.packedUint32.add(703);\n  message.packedUint64.add(make64(704));\n  message.packedSint32.add(705);\n  message.packedSint64.add(make64(706));\n  message.packedFixed32.add(707);\n  message.packedFixed64.add(make64(708));\n  message.packedSfixed32.add(709);\n  message.packedSfixed64.add(make64(710));\n  message.packedFloat.add(711.0);\n  message.packedDouble.add(712.0);\n  message.packedBool.add(false);\n  message.packedEnum.add(ForeignEnum.FOREIGN_BAZ);\n}\n\n// Set every field of [message] to a unique value. Must correspond with\n// the values applied by [setPackedFields].\nvoid setUnpackedFields(TestUnpackedTypes message) {\n  message.unpackedInt32.add(601);\n  message.unpackedInt64.add(make64(602));\n  message.unpackedUint32.add(603);\n  message.unpackedUint64.add(make64(604));\n  message.unpackedSint32.add(605);\n  message.unpackedSint64.add(make64(606));\n  message.unpackedFixed32.add(607);\n  message.unpackedFixed64.add(make64(608));\n  message.unpackedSfixed32.add(609);\n  message.unpackedSfixed64.add(make64(610));\n  message.unpackedFloat.add(611.0);\n  message.unpackedDouble.add(612.0);\n  message.unpackedBool.add(true);\n  message.unpackedEnum.add(ForeignEnum.FOREIGN_BAR);\n  // Add a second one of each field.\n  message.unpackedInt32.add(701);\n  message.unpackedInt64.add(make64(702));\n  message.unpackedUint32.add(703);\n  message.unpackedUint64.add(make64(704));\n  message.unpackedSint32.add(705);\n  message.unpackedSint64.add(make64(706));\n  message.unpackedFixed32.add(707);\n  message.unpackedFixed64.add(make64(708));\n  message.unpackedSfixed32.add(709);\n  message.unpackedSfixed64.add(make64(710));\n  message.unpackedFloat.add(711.0);\n  message.unpackedDouble.add(712.0);\n  message.unpackedBool.add(false);\n  message.unpackedEnum.add(ForeignEnum.FOREIGN_BAZ);\n}\n"
  },
  {
    "path": "protoc_plugin/test/timestamp_test.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:fixnum/fixnum.dart';\nimport 'package:protobuf/well_known_types/google/protobuf/timestamp.pb.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('timestamp -> datetime -> timestamp', () {\n    final timestamp =\n        Timestamp()\n          ..seconds = Int64(1550225928)\n          ..nanos = 12345000;\n    expect(Timestamp.fromDateTime(timestamp.toDateTime()), timestamp);\n  });\n\n  test('utc datetime -> timestamp -> datetime', () {\n    final dateTime = DateTime.utc(2019, 02, 15, 10, 21, 25, 5, 5);\n    final fromProto = Timestamp.fromDateTime(dateTime).toDateTime();\n\n    expect(fromProto.isUtc, true, reason: '$fromProto is not a UTC time.');\n    expect(fromProto, dateTime);\n  });\n\n  test('negative Timestamp', () {\n    final secondBeforeEpoch =\n        Timestamp()\n          ..seconds = Int64(-1)\n          ..nanos = 1000000;\n    final dateTime = DateTime.fromMillisecondsSinceEpoch(-999, isUtc: true);\n\n    expect(\n      secondBeforeEpoch.toDateTime().millisecondsSinceEpoch,\n      dateTime.millisecondsSinceEpoch,\n    );\n    expect(secondBeforeEpoch.toDateTime(), dateTime);\n    expect(Timestamp.fromDateTime(dateTime).nanos, 1000000);\n    expect(Timestamp.fromDateTime(dateTime).seconds, Int64(-1));\n  });\n\n  test('local datetime -> timestamp -> datetime', () {\n    final dateTime = DateTime(2019, 02, 15, 10, 21, 25, 5, 5);\n    final fromProto = Timestamp.fromDateTime(dateTime).toDateTime();\n\n    expect(fromProto.isUtc, true, reason: '$fromProto is not a UTC time.');\n    expect(fromProto, dateTime.toUtc());\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/to_builder_test.dart",
    "content": "// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:convert';\n\nimport 'package:fixnum/fixnum.dart' show Int64;\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/foo.pb.dart';\nimport 'gen/google/protobuf/unittest.pb.dart';\n\nvoid main() {\n  group('frozen and tobuilder', () {\n    final original =\n        Outer()\n          ..inner = (Inner()..value = 'foo')\n          ..inners.add(Inner()..value = 'repeatedInner')\n          ..setExtension(FooExt.inner, Inner()..value = 'extension')\n          ..getExtension(\n            FooExt.inners,\n          ).add(Inner()..value = 'repeatedExtension')\n          ..freeze();\n    test('can read extensions', () {\n      expect(original.getExtension(FooExt.inner).value, 'extension');\n      expect(\n        original.getExtension(FooExt.inners)[0].value,\n        'repeatedExtension',\n      );\n    });\n\n    test('frozen message cannot be modified', () {\n      expect(\n        () => original.inner = (Inner()..value = 'bar'),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => original.inner..value = 'bar',\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => original.inners.add(Inner()..value = 'bar'),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    });\n\n    test('extensions cannot be modified', () {\n      expect(\n        () => original.setExtension(FooExt.inner, Inner()..value = 'bar'),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => original.getExtension(FooExt.inner).value = 'bar',\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => original.getExtension(FooExt.inners).add(Inner()..value = 'bar'),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    });\n\n    final builder = original.toBuilder() as Outer;\n    test('builder is a shallow copy', () {\n      expect(builder.inner, same(original.inner));\n    });\n    test('builder extensions are also copied shallowly', () {\n      expect(\n        builder.getExtension(FooExt.inner),\n        same(original.getExtension(FooExt.inner)),\n      );\n    });\n\n    test('repeated fields are cloned', () {\n      expect(builder.inners, isNot(same(original.inners)));\n      expect(builder.inners[0], same(original.inners[0]));\n    });\n\n    test('repeated extensions are cloned', () {\n      expect(\n        builder.getExtension(FooExt.inners),\n        isNot(same(original.getExtension(FooExt.inners))),\n      );\n      expect(\n        builder.getExtension(FooExt.inners)[0],\n        same(original.getExtension(FooExt.inners)[0]),\n      );\n    });\n\n    test(\n      'the builder is only a shallow copy, the nested message is still frozen.',\n      () {\n        expect(\n          () => builder.inner.value = 'bar',\n          throwsA(TypeMatcher<UnsupportedError>()),\n        );\n      },\n    );\n    test('the builder is mutable', () {\n      builder.inner = (Inner()..value = 'zop');\n      expect(builder.inner.value, 'zop');\n      builder.inners.add(Inner()..value = 'bob');\n      expect(builder.inners.length, 2);\n      builder.setExtension(FooExt.inner, Inner()..value = 'nob');\n      expect(builder.getExtension(FooExt.inner).value, 'nob');\n      builder.getExtension(FooExt.inners).add(Inner()..value = 'rob');\n      expect(builder.getExtension(FooExt.inners).length, 2);\n    });\n    test('newly created `Inner` is mutable', () {\n      builder.inner.value = 'bar';\n      expect(builder.inner.value, 'bar');\n    });\n  });\n\n  group('map properties behave correctly', () {\n    late OuterWithMap original;\n    late OuterWithMap outerBuilder;\n    setUp(() {\n      original =\n          OuterWithMap()\n            ..innerMap[1] = (Inner()..value = 'mapInner')\n            ..freeze();\n      outerBuilder = original.toBuilder() as OuterWithMap;\n    });\n    test('map fields are cloned', () {\n      expect(outerBuilder.innerMap, isNot(same(original.innerMap)));\n      expect(outerBuilder.innerMap[1], same(original.innerMap[1]));\n    });\n    test('the builder is mutable', () {\n      outerBuilder.innerMap[1] = (Inner()..value = 'mob');\n      expect(outerBuilder.innerMap[1]!.value, 'mob');\n    });\n  });\n\n  group('frozen unknown fields', () {\n    late Inner inner;\n    late TestEmptyMessage emptyMessage;\n    late int tagNumber;\n    late UnknownFieldSet unknownFieldSet;\n    late UnknownFieldSetField field;\n\n    setUp(() {\n      inner = Inner()..value = 'bob';\n      emptyMessage = TestEmptyMessage.fromBuffer(inner.writeToBuffer());\n      tagNumber = inner.getTagNumber('value')!;\n      unknownFieldSet = emptyMessage.unknownFields;\n      field = unknownFieldSet.getField(tagNumber)!;\n    });\n\n    test('can read from a frozen unknown fieldset', () {\n      expect(unknownFieldSet.hasField(tagNumber), isTrue);\n      expect(field.lengthDelimited[0], utf8.encode(inner.value));\n\n      emptyMessage.freeze();\n      unknownFieldSet = emptyMessage.unknownFields;\n      field = unknownFieldSet.getField(tagNumber)!;\n\n      expect(unknownFieldSet.hasField(tagNumber), isTrue);\n      expect(field.lengthDelimited[0], utf8.encode(inner.value));\n    });\n\n    test('can add fields to a builder with unknown fields', () {\n      emptyMessage.freeze();\n      final builder = emptyMessage.toBuilder() as TestEmptyMessage;\n\n      builder.unknownFields.addField(\n        2,\n        UnknownFieldSetField()..fixed32s.add(42),\n      );\n      expect(builder.unknownFields.getField(2)!.fixed32s[0], 42);\n    });\n\n    test('cannot mutate already added UnknownFieldSetField on builder', () {\n      emptyMessage.freeze();\n      final builder = emptyMessage.toBuilder() as TestEmptyMessage;\n\n      expect(\n        () =>\n            builder.unknownFields.getField(1)!.lengthDelimited[0] = utf8.encode(\n              'alice',\n            ),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    });\n\n    test('cannot add to a frozen UnknownFieldSetField', () {\n      emptyMessage.freeze();\n\n      expect(\n        () => field.addFixed32(1),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => field.fixed32s.add(1),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => field.addFixed64(Int64(1)),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => field.fixed64s.add(Int64(1)),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => field.addLengthDelimited([1]),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => field.lengthDelimited.add([1]),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => field.addGroup(unknownFieldSet.clone()),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => field.groups.add(unknownFieldSet.clone()),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => field.addVarint(Int64(1)),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => field.varints.add(Int64(1)),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    });\n\n    test('cannot add or merge field to a frozen UnknownFieldSet', () {\n      emptyMessage.freeze();\n\n      expect(\n        () => unknownFieldSet.addField(2, field),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => unknownFieldSet.mergeField(2, field),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    });\n\n    test('cannot merge message into a frozen UnknownFieldSet', () {\n      emptyMessage.freeze();\n      final other = emptyMessage.deepCopy();\n\n      expect(\n        () => emptyMessage.mergeFromBuffer(other.writeToBuffer()),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n      expect(\n        () => emptyMessage.mergeFromMessage(other),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    });\n\n    test('cannot add a field to a frozen UnknownFieldSet', () {\n      emptyMessage.freeze();\n\n      expect(\n        () => unknownFieldSet.addField(tagNumber, field),\n        throwsA(TypeMatcher<UnsupportedError>()),\n      );\n    });\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/unknown_enums_test.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/enum_test.pb.dart';\n\nvoid main() {\n  // 'Z' below is an unknown enum value. Known values are 'X' and 'Y'.\n  group('Enum parsing in maps, lists, messages', () {\n    test('Parse known fields', () {\n      final json = {\n        'enumField': 'Y',\n        'mapValueField': {'1': 'Y'},\n        'repeatedEnumField': ['Y'],\n      };\n\n      final msg = Message();\n      msg.mergeFromProto3Json(json);\n      expect(msg.enumField, A.Y);\n      expect(msg.mapValueField.values.toList(), [A.Y]);\n      expect(msg.repeatedEnumField, [A.Y]);\n    });\n\n    test('Skip unknown fields', () {\n      final json = {\n        'enumField': 'Z',\n        'mapValueField': {'1': 'X', '2': 'Z', '3': 'Y'},\n        'repeatedEnumField': ['X', 'Z', 'Y'],\n      };\n\n      final msg = Message();\n      msg.enumField = A.Y;\n      msg.mergeFromProto3Json(json, ignoreUnknownFields: true);\n      expect(msg.enumField, A.Y);\n      expect(msg.mapValueField.values.toList(), [A.X, A.Y]);\n      expect(msg.repeatedEnumField, [A.X, A.Y]);\n    });\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/unknown_field_set_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'dart:typed_data';\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\nimport 'src/test_util.dart';\n\nvoid main() {\n  final testAllTypes = getAllSet();\n  final List<int> allFieldsData = testAllTypes.writeToBuffer();\n  final emptyMessage = TestEmptyMessage.fromBuffer(allFieldsData);\n  final unknownFields = emptyMessage.unknownFields;\n\n  UnknownFieldSetField getField(String name) {\n    final tagNumber = testAllTypes.getTagNumber(name)!;\n    assert(unknownFields.hasField(tagNumber));\n    return unknownFields.getField(tagNumber)!;\n  }\n\n  // Asserts that the given field sets are not equal and have different\n  // hash codes.\n  //\n  // N.B.: It is valid for non-equal objects to have the same hash code, so\n  // this test is more strict than necessary. However, in the test cases\n  // identifies, the hash codes should differ, and as a matter of principle\n  // hash collisions should be relatively rare.\n  void checkNotEqual(UnknownFieldSet s1, UnknownFieldSet s2) {\n    expect(s1 == s2, isFalse);\n    expect(s2 == s1, isFalse);\n\n    expect(\n      s1.hashCode == s2.hashCode,\n      isFalse,\n      reason:\n          '${s1.toString()} should have a different hash code '\n          'from ${s2.toString()}',\n    );\n  }\n\n  // Asserts that the given field sets are equal and have identical hash codes.\n  void checkEqualsIsConsistent(UnknownFieldSet set) {\n    // Object should be equal to itself.\n    expect(set, set);\n\n    // Object should be equal to a copy of itself.\n    final copy = set.clone();\n    expect(copy, set);\n    expect(set, copy);\n  }\n\n  test('testVarint', () {\n    final optionalInt32 = getField('optionalInt32');\n    expect(optionalInt32.varints[0], expect64(testAllTypes.optionalInt32));\n  });\n\n  test('testFixed32', () {\n    final optionalFixed32 = getField('optionalFixed32');\n    expect(optionalFixed32.fixed32s[0], testAllTypes.optionalFixed32);\n  });\n\n  test('testFixed64', () {\n    final optionalFixed64 = getField('optionalFixed64');\n    expect(optionalFixed64.fixed64s[0], testAllTypes.optionalFixed64);\n  });\n\n  test('testLengthDelimited', () {\n    final optionalBytes = getField('optionalBytes');\n    expect(optionalBytes.lengthDelimited[0], testAllTypes.optionalBytes);\n  });\n\n  test('testGroup', () {\n    final tagNumberA = TestAllTypes_OptionalGroup().getTagNumber('a')!;\n\n    final optionalGroupField = getField('optionalgroup');\n    expect(optionalGroupField.groups.length, 1);\n    final group = optionalGroupField.groups[0];\n    expect(group.hasField(tagNumberA), isTrue);\n    expect(\n      group.getField(tagNumberA)!.varints[0],\n      expect64(testAllTypes.optionalgroup.a),\n    );\n  });\n\n  test('testSerialize', () {\n    expect(emptyMessage.writeToBuffer(), allFieldsData);\n  });\n\n  test('testCopyFrom', () {\n    final message = emptyMessage.deepCopy();\n    expect(message.toString(), emptyMessage.toString());\n    expect(emptyMessage.toString().isEmpty, isFalse);\n  });\n\n  test('testMergeFrom', () {\n    // Source.\n    final sourceFieldSet =\n        UnknownFieldSet()\n          ..addField(2, UnknownFieldSetField()..addVarint(make64(2)))\n          ..addField(3, UnknownFieldSetField()..addVarint(make64(3)));\n\n    final source = TestEmptyMessage()..mergeUnknownFields(sourceFieldSet);\n\n    // Destination.\n    final destinationFieldSet =\n        UnknownFieldSet()\n          ..addField(1, UnknownFieldSetField()..addVarint(make64(1)))\n          ..addField(3, UnknownFieldSetField()..addVarint(make64(4)));\n\n    final destination =\n        TestEmptyMessage()\n          ..mergeUnknownFields(destinationFieldSet)\n          ..mergeFromMessage(source);\n\n    expect(\n      destination.toString(),\n      '1: 1\\n'\n      '2: 2\\n'\n      '3: 4\\n'\n      '3: 3\\n',\n    );\n  });\n\n  test('testClear', () {\n    final fsb = unknownFields.clone()..clear();\n    expect(fsb.asMap(), isEmpty);\n  });\n\n  test('testEmpty', () {\n    expect(UnknownFieldSet().asMap(), isEmpty);\n  });\n\n  test('testClearMessage', () {\n    final message = emptyMessage.deepCopy();\n    message.clear();\n    expect(message.writeToBuffer(), isEmpty);\n  });\n\n  test('testParseKnownAndUnknown', () {\n    // Test mixing known and unknown fields when parsing.\n    final fields =\n        unknownFields.clone()\n          ..addField(123456, UnknownFieldSetField()..addVarint(make64(654321)));\n\n    final writer = CodedBufferWriter();\n    fields.writeToCodedBufferWriter(writer);\n\n    final destination = TestAllTypes.fromBuffer(writer.toBuffer());\n\n    assertAllFieldsSet(destination);\n    expect(destination.unknownFields.asMap().length, 1);\n\n    final field = destination.unknownFields.getField(123456)!;\n    expect(field.varints.length, 1);\n    expect(field.varints[0], expect64(654321));\n  });\n\n  // Constructs a protocol buffer which contains fields with all the same\n  // numbers as allFieldsData except that each field is some other wire\n  // type.\n  List<int> getBizarroData() {\n    final bizarroFields = UnknownFieldSet();\n\n    final varintField = UnknownFieldSetField()..addVarint(make64(1));\n\n    final fixed32Field = UnknownFieldSetField()..addFixed32(1);\n\n    unknownFields.asMap().forEach((int tag, UnknownFieldSetField value) {\n      if (value.varints.isEmpty) {\n        // Original field is not a varint, so use a varint.\n        bizarroFields.addField(tag, varintField);\n      } else {\n        // Original field *is* a varint, so use something else.\n        bizarroFields.addField(tag, fixed32Field);\n      }\n    });\n    final writer = CodedBufferWriter();\n    bizarroFields.writeToCodedBufferWriter(writer);\n    return writer.toBuffer();\n  }\n\n  test('testWrongTypeTreatedAsUnknown', () {\n    // Test that fields of the wrong wire type are treated like unknown fields\n    // when parsing.\n    final bizarroData = getBizarroData();\n    final allTypesMessage = TestAllTypes.fromBuffer(bizarroData);\n    final emptyMessage_ = TestEmptyMessage.fromBuffer(bizarroData);\n    // All fields should have been interpreted as unknown, so the debug strings\n    // should be the same.\n    expect(allTypesMessage.toString(), emptyMessage_.toString());\n  });\n\n  test('testUnknownExtensions', () {\n    // Make sure fields are properly parsed to the UnknownFieldSet even when\n    // they are declared as extension numbers.\n    final message = TestEmptyMessageWithExtensions.fromBuffer(allFieldsData);\n\n    expect(message.unknownFields.asMap().length, unknownFields.asMap().length);\n    expect(message.writeToBuffer(), allFieldsData);\n  });\n\n  test('testWrongExtensionTypeTreatedAsUnknown', () {\n    // Test that fields of the wrong wire type are treated like unknown fields\n    // when parsing extensions.\n\n    final bizarroData = getBizarroData();\n    final allExtensionsMessage = TestAllExtensions.fromBuffer(bizarroData);\n    final emptyMessage_ = TestEmptyMessage.fromBuffer(bizarroData);\n\n    // All fields should have been interpreted as unknown, so the debug strings\n    // should be the same.\n    expect(allExtensionsMessage.toString(), emptyMessage_.toString());\n  });\n\n  test('testParseUnknownEnumValue', () {\n    final singularFieldNum = testAllTypes.getTagNumber('optionalNestedEnum')!;\n    final repeatedFieldNum = testAllTypes.getTagNumber('repeatedNestedEnum')!;\n    expect(singularFieldNum, isNotNull);\n    expect(repeatedFieldNum, isNotNull);\n\n    final fieldSet =\n        UnknownFieldSet()\n          ..addField(\n            singularFieldNum,\n            UnknownFieldSetField()\n              ..addVarint(make64(TestAllTypes_NestedEnum.BAR.value))\n              ..addVarint(make64(5)),\n          )\n          ..addField(\n            repeatedFieldNum,\n            UnknownFieldSetField()\n              ..addVarint(make64(TestAllTypes_NestedEnum.FOO.value))\n              ..addVarint(make64(4))\n              ..addVarint(make64(TestAllTypes_NestedEnum.BAZ.value))\n              ..addVarint(make64(6)),\n          );\n\n    final writer = CodedBufferWriter();\n    fieldSet.writeToCodedBufferWriter(writer);\n    {\n      final message = TestAllTypes.fromBuffer(writer.toBuffer());\n      expect(message.optionalNestedEnum, TestAllTypes_NestedEnum.BAR);\n      expect(message.repeatedNestedEnum, [\n        TestAllTypes_NestedEnum.FOO,\n        TestAllTypes_NestedEnum.BAZ,\n      ]);\n      final singularVarints =\n          message.unknownFields.getField(singularFieldNum)!.varints;\n      expect(singularVarints.length, 1);\n      expect(singularVarints[0], expect64(5));\n      final repeatedVarints =\n          message.unknownFields.getField(repeatedFieldNum)!.varints;\n      expect(repeatedVarints.length, 2);\n      expect(repeatedVarints[0], expect64(4));\n      expect(repeatedVarints[1], expect64(6));\n    }\n    {\n      final message = TestAllExtensions.fromBuffer(\n        writer.toBuffer(),\n        getExtensionRegistry(),\n      );\n      expect(\n        message.getExtension(Unittest.optionalNestedEnumExtension),\n        TestAllTypes_NestedEnum.BAR,\n      );\n\n      expect(message.getExtension(Unittest.repeatedNestedEnumExtension), [\n        TestAllTypes_NestedEnum.FOO,\n        TestAllTypes_NestedEnum.BAZ,\n      ]);\n      final singularVarints =\n          message.unknownFields.getField(singularFieldNum)!.varints;\n      expect(singularVarints.length, 1);\n      expect(singularVarints[0], expect64(5));\n      final repeatedVarints =\n          message.unknownFields.getField(repeatedFieldNum)!.varints;\n      expect(repeatedVarints.length, 2);\n      expect(repeatedVarints[0], expect64(4));\n      expect(repeatedVarints[1], expect64(6));\n    }\n  });\n\n  test('testLargeVarint', () {\n    final unknownFieldSet =\n        UnknownFieldSet()..addField(\n          1,\n          UnknownFieldSetField()..addVarint(make64(0x7FFFFFFF, 0xFFFFFFFF)),\n        );\n    final writer = CodedBufferWriter();\n    unknownFieldSet.writeToCodedBufferWriter(writer);\n\n    final parsed =\n        UnknownFieldSet()\n          ..mergeFromCodedBufferReader(CodedBufferReader(writer.toBuffer()));\n    final field = parsed.getField(1)!;\n    expect(field.varints.length, 1);\n    expect(field.varints[0], expect64(0x7FFFFFFF, 0xFFFFFFFFF));\n  });\n\n  test('testEquals', () {\n    final a =\n        UnknownFieldSet()..addField(1, UnknownFieldSetField()..addFixed32(1));\n\n    final b =\n        UnknownFieldSet()\n          ..addField(1, UnknownFieldSetField()..addFixed64(make64(1)));\n\n    final c =\n        UnknownFieldSet()\n          ..addField(1, UnknownFieldSetField()..addVarint(make64(1)));\n\n    final d =\n        UnknownFieldSet()\n          ..addField(1, UnknownFieldSetField()..addLengthDelimited([]));\n\n    final e =\n        UnknownFieldSet()\n          ..addField(1, UnknownFieldSetField()..addGroup(unknownFields));\n\n    checkEqualsIsConsistent(a);\n    checkEqualsIsConsistent(b);\n    checkEqualsIsConsistent(c);\n    checkEqualsIsConsistent(d);\n    checkEqualsIsConsistent(e);\n\n    checkNotEqual(a, b);\n    checkNotEqual(a, c);\n    checkNotEqual(a, d);\n    checkNotEqual(a, e);\n    checkNotEqual(b, c);\n    checkNotEqual(b, d);\n    checkNotEqual(b, e);\n    checkNotEqual(c, d);\n    checkNotEqual(c, e);\n    checkNotEqual(d, e);\n\n    final f1 =\n        UnknownFieldSet()\n          ..addField(1, UnknownFieldSetField()..addLengthDelimited([1, 2]));\n    final f2 =\n        UnknownFieldSet()\n          ..addField(1, UnknownFieldSetField()..addLengthDelimited([2, 1]));\n\n    checkEqualsIsConsistent(f1);\n    checkEqualsIsConsistent(f2);\n\n    checkNotEqual(f1, f2);\n  });\n\n  test(\n    'consistent hashcode for messages with no unknown fields set and an empty unknown field set',\n    () {\n      final m = TestAllExtensions();\n      // Force an unknown field set.\n      final m2 = TestAllExtensions()..unknownFields;\n      expect(m.hashCode, m2.hashCode);\n    },\n  );\n\n  test('Copy length delimited fields', () {\n    // Length-delimited fields should be copied before adding to the unknown\n    // field set to avoid aliasing.\n    final originalBytes = [1, 2, 3, 4, 5, 6];\n    final bytes = Uint8List.fromList([\n      10, // tag = 1, type = length delimited\n      originalBytes.length,\n      ...originalBytes,\n    ]);\n\n    final parsed =\n        UnknownFieldSet()..mergeFromCodedBufferReader(CodedBufferReader(bytes));\n\n    expect(parsed.getField(1)?.lengthDelimited, [originalBytes]);\n\n    // Modify the message. Input buffer should not be updated.\n    final newBytes = [9, 8, 7, 6, 5, 4];\n    parsed.getField(1)!.lengthDelimited[0].setRange(0, 6, newBytes);\n    expect(bytes.sublist(2), originalBytes);\n\n    // Modify the input buffer. Message should not be updated.\n    bytes.setRange(2, 8, [10, 11, 12, 13, 14, 15]);\n    expect(parsed.getField(1)!.lengthDelimited[0], newBytes);\n  });\n\n  test('WriteTextFormat', () {\n    final nestedFieldSet =\n        UnknownFieldSet()\n          ..addField(2, UnknownFieldSetField()..addVarint(make64(2)))\n          ..addField(3, UnknownFieldSetField()..addVarint(make64(-3)))\n          ..addField(4, UnknownFieldSetField()..addFixed32(1))\n          ..addField(5, UnknownFieldSetField()..addFixed64(make64(1)))\n          ..addField(6, UnknownFieldSetField()..addVarint(make64(1)))\n          ..addField(7, UnknownFieldSetField()..addLengthDelimited([1, 2, 3]))\n          ..addField(8, UnknownFieldSetField()..addFixed64(make64(-5)))\n          ..addField(9, UnknownFieldSetField()..addFixed32(-6));\n    final fieldSet =\n        UnknownFieldSet()\n          ..addField(8, UnknownFieldSetField()..addVarint(make64(3)))\n          ..addField(9, UnknownFieldSetField()..addVarint(make64(-4)))\n          ..addField(10, UnknownFieldSetField()..addFixed32(2))\n          ..addField(11, UnknownFieldSetField()..addFixed64(make64(5)))\n          ..addField(12, UnknownFieldSetField()..addVarint(make64(6)))\n          ..addField(13, UnknownFieldSetField()..addLengthDelimited([7, 8, 9]))\n          ..addField(14, UnknownFieldSetField()..addGroup(nestedFieldSet));\n\n    final out = StringBuffer();\n    fieldSet.writeTextFormat(out, 0);\n    expect(out.toString(), expectedTextFormat);\n  });\n}\n\nconst expectedTextFormat = '''8: 3\n9: 18446744073709551612\n10: 0x00000002\n11: 0x0000000000000005\n12: 6\n13: \"\\\\a\\\\b\\\\t\"\n14 {\n  2: 2\n  3: 18446744073709551613\n  4: 0x00000001\n  5: 0x0000000000000001\n  6: 1\n  7: \"\\\\001\\\\002\\\\003\"\n  8: 0xfffffffffffffffb\n  9: 0xfffffffa\n}\n''';\n"
  },
  {
    "path": "protoc_plugin/test/validate_fail_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\nimport 'gen/map_field.pb.dart';\n\nconst int minI32 = -2147483648;\n\nconst int maxI32 = 2147483647;\n\nconst int maxU32 = 4294967295;\n\nconst List<double> invalidFloats = [\n  -3.4028234663852886E39,\n  3.4028234663852886E39,\n];\n\nconst isTypeError = TypeMatcher<TypeError>();\n\n// ignore: deprecated_member_use\nconst Matcher throwsTypeError = Throws(isTypeError);\n\nvoid main() {\n  test('Fields validate values', () {\n    // Nullability and type checks\n    expect(() {\n      (TestAllTypes() as dynamic).optionalNestedMessage = null;\n    }, throwsTypeError);\n\n    expect(() {\n      (TestAllTypes() as dynamic).optionalBool = null;\n    }, throwsTypeError);\n\n    expect(() {\n      (TestAllTypes() as dynamic).optionalNestedMessage = 123;\n    }, throwsTypeError);\n\n    expect(() {\n      (TestAllTypes() as dynamic).optionalBool = 123;\n    }, throwsTypeError);\n\n    // int32\n    TestAllTypes().optionalInt32 = minI32;\n    TestAllTypes().optionalInt32 = -123;\n    TestAllTypes().optionalInt32 = maxI32;\n    TestAllTypes().optionalInt32 = 123;\n\n    expect(() {\n      TestAllTypes().optionalInt32 = minI32 - 1;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllTypes().optionalInt32 = maxI32 + 1;\n    }, throwsArgumentError);\n\n    // sint32\n    TestAllTypes().optionalSint32 = minI32;\n    TestAllTypes().optionalSint32 = -123;\n    TestAllTypes().optionalSint32 = maxI32;\n    TestAllTypes().optionalSint32 = 123;\n\n    expect(() {\n      TestAllTypes().optionalSint32 = minI32 - 1;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllTypes().optionalSint32 = maxI32 + 1;\n    }, throwsArgumentError);\n\n    // sfixed32\n    TestAllTypes().optionalSfixed32 = minI32;\n    TestAllTypes().optionalSfixed32 = -123;\n    TestAllTypes().optionalSfixed32 = maxI32;\n    TestAllTypes().optionalSfixed32 = 123;\n\n    expect(() {\n      TestAllTypes().optionalSfixed32 = minI32 - 1;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllTypes().optionalSfixed32 = maxI32 + 1;\n    }, throwsArgumentError);\n\n    // uint32\n    TestAllTypes().optionalUint32 = maxU32;\n    TestAllTypes().optionalUint32 = 123;\n\n    expect(() {\n      TestAllTypes().optionalUint32 = -1;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllTypes().optionalUint32 = maxU32 + 1;\n    }, throwsArgumentError);\n\n    // fixed32\n    TestAllTypes().optionalFixed32 = maxU32;\n    TestAllTypes().optionalFixed32 = 123;\n\n    expect(() {\n      TestAllTypes().optionalFixed32 = -1;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllTypes().optionalFixed32 = maxU32 + 1;\n    }, throwsArgumentError);\n\n    // float\n    TestAllTypes().optionalFloat = 1.2;\n\n    for (double invalid in invalidFloats) {\n      expect(() {\n        TestAllTypes().optionalFloat = invalid;\n      }, throwsArgumentError);\n    }\n  });\n\n  test('Repeated fields validate values', () {\n    // Nullability and type checks\n    expect(() {\n      (TestAllTypes() as dynamic).repeatedNestedMessage.add(null);\n    }, throwsTypeError);\n\n    expect(() {\n      (TestAllTypes() as dynamic).repeatedBool.add(null);\n    }, throwsTypeError);\n\n    expect(() {\n      (TestAllTypes() as dynamic).repeatedNestedMessage.add(123);\n    }, throwsTypeError);\n\n    expect(() {\n      (TestAllTypes() as dynamic).repeatedBool.add(123);\n    }, throwsTypeError);\n\n    // int32\n    TestAllTypes().repeatedInt32.add(minI32);\n    TestAllTypes().repeatedInt32.add(-123);\n    TestAllTypes().repeatedInt32.add(maxI32);\n    TestAllTypes().repeatedInt32.add(123);\n\n    expect(() {\n      TestAllTypes().repeatedInt32.add(minI32 - 1);\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllTypes().repeatedInt32.add(maxI32 + 1);\n    }, throwsArgumentError);\n\n    // sint32\n    TestAllTypes().repeatedSint32.add(minI32);\n    TestAllTypes().repeatedSint32.add(-123);\n    TestAllTypes().repeatedSint32.add(maxI32);\n    TestAllTypes().repeatedSint32.add(123);\n\n    expect(() {\n      TestAllTypes().repeatedSint32.add(minI32 - 1);\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllTypes().repeatedSint32.add(maxI32 + 1);\n    }, throwsArgumentError);\n\n    // sfixed32\n    TestAllTypes().repeatedSfixed32.add(minI32);\n    TestAllTypes().repeatedSfixed32.add(-123);\n    TestAllTypes().repeatedSfixed32.add(maxI32);\n    TestAllTypes().repeatedSfixed32.add(123);\n\n    expect(() {\n      TestAllTypes().repeatedSfixed32.add(minI32 - 1);\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllTypes().repeatedSfixed32.add(maxI32 + 1);\n    }, throwsArgumentError);\n\n    // uint32\n    TestAllTypes().repeatedUint32.add(maxU32);\n    TestAllTypes().repeatedUint32.add(123);\n\n    expect(() {\n      TestAllTypes().repeatedUint32.add(-1);\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllTypes().repeatedUint32.add(maxU32 + 1);\n    }, throwsArgumentError);\n\n    // fixed32\n    TestAllTypes().repeatedFixed32.add(maxU32);\n    TestAllTypes().repeatedFixed32.add(123);\n\n    expect(() {\n      TestAllTypes().repeatedFixed32.add(-1);\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllTypes().repeatedFixed32.add(maxU32 + 1);\n    }, throwsArgumentError);\n\n    // float\n    TestAllTypes().repeatedFloat.add(1.2);\n\n    for (double invalid in invalidFloats) {\n      expect(() {\n        TestAllTypes().repeatedFloat.add(invalid);\n      }, throwsArgumentError);\n    }\n  });\n\n  test('Extension fields validate values', () {\n    // Type checks\n    expect(() {\n      TestAllExtensions().setExtension(\n        Unittest.optionalNestedMessageExtension,\n        123,\n      );\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().setExtension(Unittest.optionalBoolExtension, 123);\n    }, throwsArgumentError);\n\n    // int32\n    TestAllExtensions().setExtension(Unittest.optionalInt32Extension, minI32);\n    TestAllExtensions().setExtension(Unittest.optionalInt32Extension, -123);\n    TestAllExtensions().setExtension(Unittest.optionalInt32Extension, maxI32);\n    TestAllExtensions().setExtension(Unittest.optionalInt32Extension, 123);\n\n    expect(() {\n      TestAllExtensions().setExtension(\n        Unittest.optionalInt32Extension,\n        minI32 - 1,\n      );\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().setExtension(\n        Unittest.optionalInt32Extension,\n        maxI32 + 1,\n      );\n    }, throwsArgumentError);\n\n    // sint32\n    TestAllExtensions().setExtension(Unittest.optionalSint32Extension, minI32);\n    TestAllExtensions().setExtension(Unittest.optionalSint32Extension, -123);\n    TestAllExtensions().setExtension(Unittest.optionalSint32Extension, maxI32);\n    TestAllExtensions().setExtension(Unittest.optionalSint32Extension, 123);\n\n    expect(() {\n      TestAllExtensions().setExtension(\n        Unittest.optionalSint32Extension,\n        minI32 - 1,\n      );\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().setExtension(\n        Unittest.optionalSint32Extension,\n        maxI32 + 1,\n      );\n    }, throwsArgumentError);\n\n    // sfixed32\n    TestAllExtensions().setExtension(\n      Unittest.optionalSfixed32Extension,\n      minI32,\n    );\n    TestAllExtensions().setExtension(Unittest.optionalSfixed32Extension, -123);\n    TestAllExtensions().setExtension(\n      Unittest.optionalSfixed32Extension,\n      maxI32,\n    );\n    TestAllExtensions().setExtension(Unittest.optionalSfixed32Extension, 123);\n\n    expect(() {\n      TestAllExtensions().setExtension(\n        Unittest.optionalSfixed32Extension,\n        minI32 - 1,\n      );\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().setExtension(\n        Unittest.optionalSfixed32Extension,\n        maxI32 + 1,\n      );\n    }, throwsArgumentError);\n\n    // uint32\n    TestAllExtensions().setExtension(Unittest.optionalUint32Extension, maxU32);\n    TestAllExtensions().setExtension(Unittest.optionalUint32Extension, 123);\n\n    expect(() {\n      TestAllExtensions().setExtension(Unittest.optionalUint32Extension, -1);\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().setExtension(\n        Unittest.optionalUint32Extension,\n        maxU32 + 1,\n      );\n    }, throwsArgumentError);\n\n    // fixed32\n    TestAllExtensions().setExtension(Unittest.optionalFixed32Extension, maxU32);\n    TestAllExtensions().setExtension(Unittest.optionalFixed32Extension, 123);\n\n    expect(() {\n      TestAllExtensions().setExtension(Unittest.optionalFixed32Extension, -1);\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().setExtension(\n        Unittest.optionalFixed32Extension,\n        maxU32 + 1,\n      );\n    }, throwsArgumentError);\n\n    // float\n    TestAllExtensions().setExtension(Unittest.optionalFloatExtension, 1.2);\n\n    for (double invalid in invalidFloats) {\n      expect(() {\n        TestAllExtensions().setExtension(\n          Unittest.optionalFloatExtension,\n          invalid,\n        );\n      }, throwsArgumentError);\n    }\n  });\n\n  test('Repeated extension fields validate values', () {\n    // Nullability and type checks\n    expect(() {\n      TestAllExtensions().addExtension(\n        Unittest.repeatedNestedMessageExtension,\n        null,\n      );\n    }, throwsTypeError);\n\n    expect(() {\n      TestAllExtensions().addExtension(\n        Unittest.repeatedNestedMessageExtension,\n        123,\n      );\n    }, throwsTypeError);\n\n    expect(() {\n      TestAllExtensions().addExtension(Unittest.repeatedBoolExtension, null);\n    }, throwsTypeError);\n\n    expect(() {\n      TestAllExtensions().addExtension(Unittest.repeatedBoolExtension, 123);\n    }, throwsTypeError);\n\n    // int32\n    TestAllExtensions().addExtension(Unittest.repeatedInt32Extension, minI32);\n    TestAllExtensions().addExtension(Unittest.repeatedInt32Extension, -123);\n    TestAllExtensions().addExtension(Unittest.repeatedInt32Extension, maxI32);\n    TestAllExtensions().addExtension(Unittest.repeatedInt32Extension, 123);\n\n    expect(() {\n      TestAllExtensions().addExtension(\n        Unittest.repeatedInt32Extension,\n        minI32 - 1,\n      );\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().addExtension(\n        Unittest.repeatedInt32Extension,\n        maxI32 + 1,\n      );\n    }, throwsArgumentError);\n\n    // sint32\n    TestAllExtensions().addExtension(Unittest.repeatedSint32Extension, minI32);\n    TestAllExtensions().addExtension(Unittest.repeatedSint32Extension, -123);\n    TestAllExtensions().addExtension(Unittest.repeatedSint32Extension, maxI32);\n    TestAllExtensions().addExtension(Unittest.repeatedSint32Extension, 123);\n\n    expect(() {\n      TestAllExtensions().addExtension(\n        Unittest.repeatedSint32Extension,\n        minI32 - 1,\n      );\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().addExtension(\n        Unittest.repeatedSint32Extension,\n        maxI32 + 1,\n      );\n    }, throwsArgumentError);\n\n    // sfixed32\n    TestAllExtensions().addExtension(\n      Unittest.repeatedSfixed32Extension,\n      minI32,\n    );\n    TestAllExtensions().addExtension(Unittest.repeatedSfixed32Extension, -123);\n    TestAllExtensions().addExtension(\n      Unittest.repeatedSfixed32Extension,\n      maxI32,\n    );\n    TestAllExtensions().addExtension(Unittest.repeatedSfixed32Extension, 123);\n\n    expect(() {\n      TestAllExtensions().addExtension(\n        Unittest.repeatedSfixed32Extension,\n        minI32 - 1,\n      );\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().addExtension(\n        Unittest.repeatedSfixed32Extension,\n        maxI32 + 1,\n      );\n    }, throwsArgumentError);\n\n    // uint32\n    TestAllExtensions().addExtension(Unittest.repeatedUint32Extension, maxU32);\n    TestAllExtensions().addExtension(Unittest.repeatedUint32Extension, 123);\n\n    expect(() {\n      TestAllExtensions().addExtension(Unittest.repeatedUint32Extension, -1);\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().addExtension(\n        Unittest.repeatedUint32Extension,\n        maxU32 + 1,\n      );\n    }, throwsArgumentError);\n\n    // fixed32\n    TestAllExtensions().addExtension(Unittest.repeatedFixed32Extension, maxU32);\n    TestAllExtensions().addExtension(Unittest.repeatedFixed32Extension, 123);\n\n    expect(() {\n      TestAllExtensions().addExtension(Unittest.repeatedFixed32Extension, -1);\n    }, throwsArgumentError);\n\n    expect(() {\n      TestAllExtensions().addExtension(\n        Unittest.repeatedFixed32Extension,\n        maxU32 + 1,\n      );\n    }, throwsArgumentError);\n\n    // float\n    TestAllExtensions().addExtension(Unittest.repeatedFloatExtension, 1.2);\n\n    for (double invalid in invalidFloats) {\n      expect(() {\n        TestAllExtensions().addExtension(\n          Unittest.repeatedFloatExtension,\n          invalid,\n        );\n      }, throwsArgumentError);\n    }\n  });\n\n  test('Maps validate keys', () {\n    // Nullability and type checks\n    expect(() {\n      (TestMap() as dynamic).int32ToInt32Field[null] = 0;\n    }, throwsTypeError);\n\n    expect(() {\n      (TestMap() as dynamic).boolToInt32Field[null] = 0;\n    }, throwsTypeError);\n\n    // int32\n    TestMap().int32ToInt32Field[minI32] = 0;\n    TestMap().int32ToInt32Field[-123] = 0;\n    TestMap().int32ToInt32Field[maxI32] = 0;\n    TestMap().int32ToInt32Field[123] = 0;\n\n    expect(() {\n      TestMap().int32ToInt32Field[minI32 - 1] = 0;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestMap().int32ToInt32Field[maxI32 + 1] = 0;\n    }, throwsArgumentError);\n\n    // sint32\n    TestMap().sint32ToInt32Field[minI32] = 0;\n    TestMap().sint32ToInt32Field[-123] = 0;\n    TestMap().sint32ToInt32Field[maxI32] = 0;\n    TestMap().sint32ToInt32Field[123] = 0;\n\n    expect(() {\n      TestMap().sint32ToInt32Field[minI32 - 1] = 0;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestMap().sint32ToInt32Field[maxI32 + 1] = 0;\n    }, throwsArgumentError);\n\n    // sfixed32\n    TestMap().sfixed32ToInt32Field[minI32] = 0;\n    TestMap().sfixed32ToInt32Field[-123] = 0;\n    TestMap().sfixed32ToInt32Field[maxI32] = 0;\n    TestMap().sfixed32ToInt32Field[123] = 0;\n\n    expect(() {\n      TestMap().sfixed32ToInt32Field[minI32 - 1] = 0;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestMap().sfixed32ToInt32Field[maxI32 + 1] = 0;\n    }, throwsArgumentError);\n\n    // uint32\n    TestMap().uint32ToInt32Field[maxU32] = 0;\n    TestMap().uint32ToInt32Field[123] = 0;\n\n    expect(() {\n      TestMap().uint32ToInt32Field[-1] = 0;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestMap().uint32ToInt32Field[maxU32 + 1] = 0;\n    }, throwsArgumentError);\n\n    // fixed32\n    TestMap().fixed32ToInt32Field[maxU32] = 0;\n    TestMap().fixed32ToInt32Field[123] = 0;\n\n    expect(() {\n      TestMap().fixed32ToInt32Field[-1] = 0;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestMap().fixed32ToInt32Field[maxU32 + 1] = 0;\n    }, throwsArgumentError);\n  });\n\n  test('Maps validate values', () {\n    // Nullability and type checks\n    expect(() {\n      (TestMap() as dynamic).int32ToInt32Field[0] = null;\n    }, throwsTypeError);\n\n    expect(() {\n      (TestMap() as dynamic).int32ToBoolField[0] = null;\n    }, throwsTypeError);\n\n    // int32\n    TestMap().int32ToInt32Field[0] = minI32;\n    TestMap().int32ToInt32Field[0] = -123;\n    TestMap().int32ToInt32Field[0] = maxI32;\n    TestMap().int32ToInt32Field[0] = 123;\n\n    expect(() {\n      TestMap().int32ToInt32Field[0] = minI32 - 1;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestMap().int32ToInt32Field[0] = maxI32 + 1;\n    }, throwsArgumentError);\n\n    // sint32\n    TestMap().int32ToSint32Field[0] = minI32;\n    TestMap().int32ToSint32Field[0] = -123;\n    TestMap().int32ToSint32Field[0] = maxI32;\n    TestMap().int32ToSint32Field[0] = 123;\n\n    expect(() {\n      TestMap().int32ToSint32Field[0] = minI32 - 1;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestMap().int32ToSint32Field[0] = maxI32 + 1;\n    }, throwsArgumentError);\n\n    // sfixed32\n    TestMap().int32ToSfixed32Field[0] = minI32;\n    TestMap().int32ToSfixed32Field[0] = -123;\n    TestMap().int32ToSfixed32Field[0] = maxI32;\n    TestMap().int32ToSfixed32Field[0] = 123;\n\n    expect(() {\n      TestMap().int32ToSfixed32Field[0] = minI32 - 1;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestMap().int32ToSfixed32Field[0] = maxI32 + 1;\n    }, throwsArgumentError);\n\n    // uint32\n    TestMap().int32ToUint32Field[0] = maxU32;\n    TestMap().int32ToUint32Field[0] = 123;\n\n    expect(() {\n      TestMap().int32ToUint32Field[0] = -1;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestMap().int32ToUint32Field[0] = maxU32 + 1;\n    }, throwsArgumentError);\n\n    // fixed32\n    TestMap().int32ToFixed32Field[0] = maxU32;\n    TestMap().int32ToFixed32Field[0] = 123;\n\n    expect(() {\n      TestMap().int32ToFixed32Field[0] = -1;\n    }, throwsArgumentError);\n\n    expect(() {\n      TestMap().int32ToFixed32Field[0] = maxU32 + 1;\n    }, throwsArgumentError);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/test/wire_format_test.dart",
    "content": "// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\nimport 'package:protobuf/protobuf.dart';\nimport 'package:test/test.dart';\n\nimport 'gen/google/protobuf/unittest.pb.dart';\nimport 'src/test_util.dart';\n\nvoid main() {\n  test('testSerialization', () {\n    assertAllFieldsSet(TestAllTypes.fromBuffer(getAllSet().writeToBuffer()));\n  });\n\n  test('testSerializationPacked', () {\n    assertPackedFieldsSet(\n      TestPackedTypes.fromBuffer(getPackedSet().writeToBuffer()),\n    );\n  });\n\n  test('testSerializeExtensions', () {\n    assertAllFieldsSet(\n      TestAllTypes.fromBuffer(getAllExtensionsSet().writeToBuffer()),\n    );\n  });\n\n  test('testSerializePackedExtensions', () {\n    expect(\n      getPackedExtensionsSet().writeToBuffer(),\n      getPackedSet().writeToBuffer(),\n    );\n  });\n\n  test('testParseExtensions', () {\n    // TestAllTypes and TestAllExtensions should have compatible wire formats,\n    // so if we serialize a TestAllTypes then parse it as TestAllExtensions\n    // it should work.\n    final List<int> rawBytes = getAllSet().writeToBuffer();\n    final registry = getExtensionRegistry();\n\n    assertAllExtensionsSet(TestAllExtensions.fromBuffer(rawBytes, registry));\n  });\n\n  test('testParsePackedExtensions', () {\n    // Ensure that packed extensions can be properly parsed.\n    final List<int> rawBytes = getPackedExtensionsSet().writeToBuffer();\n    final registry = getExtensionRegistry();\n\n    assertPackedExtensionsSet(\n      TestPackedExtensions.fromBuffer(rawBytes, registry),\n    );\n  });\n\n  test('testExtensionsSerialized', () {\n    expect(getAllExtensionsSet().writeToBuffer(), getAllSet().writeToBuffer());\n  });\n\n  test('testParseMultipleExtensionRanges', () {\n    // Make sure we can parse a message that contains multiple extensions\n    // ranges.\n    final source =\n        TestFieldOrderings()\n          ..myInt = make64(1)\n          ..myString = 'foo'\n          ..myFloat = 1.0\n          ..setExtension(Unittest.myExtensionInt, 23)\n          ..setExtension(Unittest.myExtensionString, 'bar');\n\n    final registry =\n        ExtensionRegistry()\n          ..add(Unittest.myExtensionInt)\n          ..add(Unittest.myExtensionString);\n\n    final dest = TestFieldOrderings.fromBuffer(\n      source.writeToBuffer(),\n      registry,\n    );\n\n    expect(dest, source);\n  });\n}\n"
  },
  {
    "path": "protoc_plugin/tool/update_protos.dart",
    "content": "// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file\n// for details. All rights reserved. Use of this source code is governed by a\n// BSD-style license that can be found in the LICENSE file.\n\n/// Run this script to update to the latest google/protobuf and googleapis\n/// protobufs.\nlibrary;\n\nimport 'dart:io';\n\nvoid main(List<String> args) async {\n  final cacheDir = Directory('.dart_tool/protoc_plugin');\n  final protobufDir = Directory('${cacheDir.path}/protobuf');\n  final googleapisDir = Directory('${cacheDir.path}/googleapis');\n\n  final destDir = Directory('protos');\n\n  // Update from protocolbuffers/protobuf.\n  if (protobufDir.existsSync()) {\n    await git(['pull'], cwd: protobufDir);\n  } else {\n    await git([\n      'clone',\n      'https://github.com/protocolbuffers/protobuf.git',\n      '--depth',\n      '1',\n    ], cwd: cacheDir);\n  }\n\n  copy(protobufDir, destDir, 'src', [\n    'google/protobuf/compiler/plugin.proto',\n    'google/protobuf/descriptor.proto',\n    'google/protobuf/duration.proto',\n    'google/protobuf/unittest_features.proto',\n  ]);\n\n  // Update from googleapis/googleapis.\n  if (googleapisDir.existsSync()) {\n    await git(['pull'], cwd: googleapisDir);\n  } else {\n    await git([\n      'clone',\n      'https://github.com/googleapis/googleapis.git',\n      '--depth',\n      '1',\n    ], cwd: cacheDir);\n  }\n\n  copy(googleapisDir, destDir, '', [\n    'google/api/client.proto',\n    'google/api/http.proto',\n    'google/api/launch_stage.proto',\n    'google/api/routing.proto',\n  ]);\n}\n\nFuture<void> git(List<String> args, {required Directory cwd}) async {\n  print('[${cwd.path}] git ${args.join(' ')}');\n\n  if (!cwd.existsSync()) {\n    cwd.createSync(recursive: true);\n  }\n\n  final result = await Process.run('git', args, workingDirectory: cwd.path);\n  stdout.write(result.stdout);\n  stderr.write(result.stderr);\n  if (result.exitCode != 0) {\n    exitCode = result.exitCode;\n    throw 'git exited with ${result.exitCode}';\n  }\n}\n\nvoid copy(Directory from, Directory to, String fromPrefix, List<String> files) {\n  print('copying ${from.path} => ${to.path}');\n\n  if (fromPrefix.isNotEmpty) {\n    fromPrefix = '$fromPrefix/';\n  }\n\n  for (final file in files) {\n    final source = File('${from.path}/$fromPrefix$file');\n    final target = File('${to.path}/$file');\n\n    if (!target.parent.existsSync()) {\n      target.parent.createSync(recursive: true);\n    }\n\n    final sourceContents = source.readAsStringSync();\n    if (!target.existsSync() || target.readAsStringSync() != sourceContents) {\n      print('  => $file');\n      target.writeAsStringSync(sourceContents);\n    }\n  }\n\n  print('');\n}\n"
  },
  {
    "path": "pubspec.yaml",
    "content": "name: workspace\npublish_to: none\n\nenvironment:\n  sdk: ^3.7.0\n\nworkspace:\n  - benchmarks\n  - protobuf\n  - protoc_plugin\n"
  },
  {
    "path": "tool/generate.sh",
    "content": "#!/bin/bash\n\npushd benchmarks\n./tool/compile_protos.sh\npopd\n\npushd protoc_plugin\nmake clean\nmake update-pregenerated\nmake protos\npopd\n"
  },
  {
    "path": "tool/setup.sh",
    "content": "#!/bin/bash\n\nwget -O protoc.zip \\\n  https://github.com/protocolbuffers/protobuf/releases/download/v32.1/protoc-32.1-linux-x86_64.zip\nunzip -d protoc protoc.zip\n\nif [[ -z \"${GITHUB_ENV}\" ]]; then\n  # Local run\n  export PATH=$PWD/protoc/bin:$PATH\nelse\n  # GitHub Actions\n  echo \"PATH=$PWD/protoc/bin:$PATH\" >> $GITHUB_ENV\nfi\n"
  }
]